@modelcontextprotocol/inspector-client 0.5.1 → 0.7.0
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.
|
@@ -77,7 +77,7 @@ function A$2(a) {
|
|
|
77
77
|
a = z$3 && a[z$3] || a["@@iterator"];
|
|
78
78
|
return "function" === typeof a ? a : null;
|
|
79
79
|
}
|
|
80
|
-
var B$
|
|
80
|
+
var B$4 = { isMounted: function() {
|
|
81
81
|
return false;
|
|
82
82
|
}, enqueueForceUpdate: function() {
|
|
83
83
|
}, enqueueReplaceState: function() {
|
|
@@ -87,7 +87,7 @@ function E$2(a, b2, e) {
|
|
|
87
87
|
this.props = a;
|
|
88
88
|
this.context = b2;
|
|
89
89
|
this.refs = D$3;
|
|
90
|
-
this.updater = e || B$
|
|
90
|
+
this.updater = e || B$4;
|
|
91
91
|
}
|
|
92
92
|
E$2.prototype.isReactComponent = {};
|
|
93
93
|
E$2.prototype.setState = function(a, b2) {
|
|
@@ -100,20 +100,20 @@ E$2.prototype.forceUpdate = function(a) {
|
|
|
100
100
|
function F() {
|
|
101
101
|
}
|
|
102
102
|
F.prototype = E$2.prototype;
|
|
103
|
-
function G$
|
|
103
|
+
function G$2(a, b2, e) {
|
|
104
104
|
this.props = a;
|
|
105
105
|
this.context = b2;
|
|
106
106
|
this.refs = D$3;
|
|
107
|
-
this.updater = e || B$
|
|
107
|
+
this.updater = e || B$4;
|
|
108
108
|
}
|
|
109
|
-
var H$3 = G$
|
|
110
|
-
H$3.constructor = G$
|
|
109
|
+
var H$3 = G$2.prototype = new F();
|
|
110
|
+
H$3.constructor = G$2;
|
|
111
111
|
C$2(H$3, E$2.prototype);
|
|
112
112
|
H$3.isPureReactComponent = true;
|
|
113
|
-
var I$
|
|
114
|
-
function M$
|
|
113
|
+
var I$2 = Array.isArray, J$1 = Object.prototype.hasOwnProperty, K$3 = { current: null }, L$3 = { key: true, ref: true, __self: true, __source: true };
|
|
114
|
+
function M$2(a, b2, e) {
|
|
115
115
|
var d2, c2 = {}, k2 = null, h2 = null;
|
|
116
|
-
if (null != b2) for (d2 in void 0 !== b2.ref && (h2 = b2.ref), void 0 !== b2.key && (k2 = "" + b2.key), b2) J$1.call(b2, d2) && !L$
|
|
116
|
+
if (null != b2) for (d2 in void 0 !== b2.ref && (h2 = b2.ref), void 0 !== b2.key && (k2 = "" + b2.key), b2) J$1.call(b2, d2) && !L$3.hasOwnProperty(d2) && (c2[d2] = b2[d2]);
|
|
117
117
|
var g2 = arguments.length - 2;
|
|
118
118
|
if (1 === g2) c2.children = e;
|
|
119
119
|
else if (1 < g2) {
|
|
@@ -135,8 +135,8 @@ function escape(a) {
|
|
|
135
135
|
return b2[a2];
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
var P$
|
|
139
|
-
function Q$
|
|
138
|
+
var P$3 = /\/+/g;
|
|
139
|
+
function Q$2(a, b2) {
|
|
140
140
|
return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b2.toString(36);
|
|
141
141
|
}
|
|
142
142
|
function R$2(a, b2, e, d2, c2) {
|
|
@@ -156,17 +156,17 @@ function R$2(a, b2, e, d2, c2) {
|
|
|
156
156
|
h2 = true;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
if (h2) return h2 = a, c2 = c2(h2), a = "" === d2 ? "." + Q$
|
|
159
|
+
if (h2) return h2 = a, c2 = c2(h2), a = "" === d2 ? "." + Q$2(h2, 0) : d2, I$2(c2) ? (e = "", null != a && (e = a.replace(P$3, "$&/") + "/"), R$2(c2, b2, e, "", function(a2) {
|
|
160
160
|
return a2;
|
|
161
|
-
})) : null != c2 && (O$2(c2) && (c2 = N$3(c2, e + (!c2.key || h2 && h2.key === c2.key ? "" : ("" + c2.key).replace(P$
|
|
161
|
+
})) : null != c2 && (O$2(c2) && (c2 = N$3(c2, e + (!c2.key || h2 && h2.key === c2.key ? "" : ("" + c2.key).replace(P$3, "$&/") + "/") + a)), b2.push(c2)), 1;
|
|
162
162
|
h2 = 0;
|
|
163
163
|
d2 = "" === d2 ? "." : d2 + ":";
|
|
164
|
-
if (I$
|
|
164
|
+
if (I$2(a)) for (var g2 = 0; g2 < a.length; g2++) {
|
|
165
165
|
k2 = a[g2];
|
|
166
|
-
var f2 = d2 + Q$
|
|
166
|
+
var f2 = d2 + Q$2(k2, g2);
|
|
167
167
|
h2 += R$2(k2, b2, e, f2, c2);
|
|
168
168
|
}
|
|
169
|
-
else if (f2 = A$2(a), "function" === typeof f2) for (a = f2.call(a), g2 = 0; !(k2 = a.next()).done; ) k2 = k2.value, f2 = d2 + Q$
|
|
169
|
+
else if (f2 = A$2(a), "function" === typeof f2) for (a = f2.call(a), g2 = 0; !(k2 = a.next()).done; ) k2 = k2.value, f2 = d2 + Q$2(k2, g2++), h2 += R$2(k2, b2, e, f2, c2);
|
|
170
170
|
else if ("object" === k2) throw b2 = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b2 ? "object with keys {" + Object.keys(a).join(", ") + "}" : b2) + "). If you meant to render a collection of children, use an array instead.");
|
|
171
171
|
return h2;
|
|
172
172
|
}
|
|
@@ -217,7 +217,7 @@ react_production_min.Children = { map: S$2, forEach: function(a, b2, e) {
|
|
|
217
217
|
react_production_min.Component = E$2;
|
|
218
218
|
react_production_min.Fragment = p$4;
|
|
219
219
|
react_production_min.Profiler = r$1;
|
|
220
|
-
react_production_min.PureComponent = G$
|
|
220
|
+
react_production_min.PureComponent = G$2;
|
|
221
221
|
react_production_min.StrictMode = q$2;
|
|
222
222
|
react_production_min.Suspense = w$1;
|
|
223
223
|
react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W$2;
|
|
@@ -229,7 +229,7 @@ react_production_min.cloneElement = function(a, b2, e) {
|
|
|
229
229
|
void 0 !== b2.ref && (k2 = b2.ref, h2 = K$3.current);
|
|
230
230
|
void 0 !== b2.key && (c2 = "" + b2.key);
|
|
231
231
|
if (a.type && a.type.defaultProps) var g2 = a.type.defaultProps;
|
|
232
|
-
for (f2 in b2) J$1.call(b2, f2) && !L$
|
|
232
|
+
for (f2 in b2) J$1.call(b2, f2) && !L$3.hasOwnProperty(f2) && (d2[f2] = void 0 === b2[f2] && void 0 !== g2 ? g2[f2] : b2[f2]);
|
|
233
233
|
}
|
|
234
234
|
var f2 = arguments.length - 2;
|
|
235
235
|
if (1 === f2) d2.children = e;
|
|
@@ -245,9 +245,9 @@ react_production_min.createContext = function(a) {
|
|
|
245
245
|
a.Provider = { $$typeof: t, _context: a };
|
|
246
246
|
return a.Consumer = a;
|
|
247
247
|
};
|
|
248
|
-
react_production_min.createElement = M$
|
|
248
|
+
react_production_min.createElement = M$2;
|
|
249
249
|
react_production_min.createFactory = function(a) {
|
|
250
|
-
var b2 = M$
|
|
250
|
+
var b2 = M$2.bind(null, a);
|
|
251
251
|
b2.type = a;
|
|
252
252
|
return b2;
|
|
253
253
|
};
|
|
@@ -323,10 +323,10 @@ react_production_min.version = "18.3.1";
|
|
|
323
323
|
react.exports = react_production_min;
|
|
324
324
|
}
|
|
325
325
|
var reactExports = react.exports;
|
|
326
|
-
const React$
|
|
327
|
-
const React$
|
|
326
|
+
const React$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactExports);
|
|
327
|
+
const React$2 = /* @__PURE__ */ _mergeNamespaces({
|
|
328
328
|
__proto__: null,
|
|
329
|
-
default: React$
|
|
329
|
+
default: React$1
|
|
330
330
|
}, [reactExports]);
|
|
331
331
|
/**
|
|
332
332
|
* @license React
|
|
@@ -1406,7 +1406,7 @@ function $b(a) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
return null;
|
|
1408
1408
|
}
|
|
1409
|
-
var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B$
|
|
1409
|
+
var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B$3 = ca.unstable_now, ec = ca.unstable_getCurrentPriorityLevel, fc = ca.unstable_ImmediatePriority, gc = ca.unstable_UserBlockingPriority, hc = ca.unstable_NormalPriority, ic = ca.unstable_LowPriority, jc = ca.unstable_IdlePriority, kc = null, lc = null;
|
|
1410
1410
|
function mc(a) {
|
|
1411
1411
|
if (lc && "function" === typeof lc.onCommitFiberRoot) try {
|
|
1412
1412
|
lc.onCommitFiberRoot(kc, a, void 0, 128 === (a.current.flags & 128));
|
|
@@ -1986,7 +1986,7 @@ var Qd = A$1({}, ud, { key: function(a) {
|
|
|
1986
1986
|
deltaMode: 0
|
|
1987
1987
|
}), Zd = rd(Yd), $d = [9, 13, 27, 32], ae = ia && "CompositionEvent" in window, be$1 = null;
|
|
1988
1988
|
ia && "documentMode" in document && (be$1 = document.documentMode);
|
|
1989
|
-
var ce = ia && "TextEvent" in window && !be$1, de$1 = ia && (!ae || be$1 && 8 < be$1 && 11 >= be$1), ee$1 = String.fromCharCode(32), fe$1 = false;
|
|
1989
|
+
var ce$1 = ia && "TextEvent" in window && !be$1, de$1 = ia && (!ae || be$1 && 8 < be$1 && 11 >= be$1), ee$1 = String.fromCharCode(32), fe$1 = false;
|
|
1990
1990
|
function ge(a, b2) {
|
|
1991
1991
|
switch (a) {
|
|
1992
1992
|
case "keyup":
|
|
@@ -2135,8 +2135,8 @@ function Ke(a, b2) {
|
|
|
2135
2135
|
c2 = Je(c2);
|
|
2136
2136
|
}
|
|
2137
2137
|
}
|
|
2138
|
-
function Le
|
|
2139
|
-
return a && b2 ? a === b2 ? true : a && 3 === a.nodeType ? false : b2 && 3 === b2.nodeType ? Le
|
|
2138
|
+
function Le(a, b2) {
|
|
2139
|
+
return a && b2 ? a === b2 ? true : a && 3 === a.nodeType ? false : b2 && 3 === b2.nodeType ? Le(a, b2.parentNode) : "contains" in a ? a.contains(b2) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b2) & 16) : false : false;
|
|
2140
2140
|
}
|
|
2141
2141
|
function Me$1() {
|
|
2142
2142
|
for (var a = window, b2 = Xa(); b2 instanceof a.HTMLIFrameElement; ) {
|
|
@@ -2157,7 +2157,7 @@ function Ne(a) {
|
|
|
2157
2157
|
}
|
|
2158
2158
|
function Oe(a) {
|
|
2159
2159
|
var b2 = Me$1(), c2 = a.focusedElem, d2 = a.selectionRange;
|
|
2160
|
-
if (b2 !== c2 && c2 && c2.ownerDocument && Le
|
|
2160
|
+
if (b2 !== c2 && c2 && c2.ownerDocument && Le(c2.ownerDocument.documentElement, c2)) {
|
|
2161
2161
|
if (null !== d2 && Ne(c2)) {
|
|
2162
2162
|
if (b2 = d2.start, a = d2.end, void 0 === a && (a = b2), "selectionStart" in c2) c2.selectionStart = b2, c2.selectionEnd = Math.min(a, c2.value.length);
|
|
2163
2163
|
else if (a = (b2 = c2.ownerDocument || document) && b2.defaultView || window, a.getSelection) {
|
|
@@ -2179,19 +2179,19 @@ function Oe(a) {
|
|
|
2179
2179
|
for (c2 = 0; c2 < b2.length; c2++) a = b2[c2], a.element.scrollLeft = a.left, a.element.scrollTop = a.top;
|
|
2180
2180
|
}
|
|
2181
2181
|
}
|
|
2182
|
-
var Pe$1 = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re = null, Se$1 = null, Te$1 = false;
|
|
2182
|
+
var Pe$1 = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re$1 = null, Se$1 = null, Te$1 = false;
|
|
2183
2183
|
function Ue(a, b2, c2) {
|
|
2184
2184
|
var d2 = c2.window === c2 ? c2.document : 9 === c2.nodeType ? c2 : c2.ownerDocument;
|
|
2185
|
-
Te$1 || null == Qe || Qe !== Xa(d2) || (d2 = Qe, "selectionStart" in d2 && Ne(d2) ? d2 = { start: d2.selectionStart, end: d2.selectionEnd } : (d2 = (d2.ownerDocument && d2.ownerDocument.defaultView || window).getSelection(), d2 = { anchorNode: d2.anchorNode, anchorOffset: d2.anchorOffset, focusNode: d2.focusNode, focusOffset: d2.focusOffset }), Se$1 && Ie$1(Se$1, d2) || (Se$1 = d2, d2 = oe(Re, "onSelect"), 0 < d2.length && (b2 = new td("onSelect", "select", null, b2, c2), a.push({ event: b2, listeners: d2 }), b2.target = Qe)));
|
|
2185
|
+
Te$1 || null == Qe || Qe !== Xa(d2) || (d2 = Qe, "selectionStart" in d2 && Ne(d2) ? d2 = { start: d2.selectionStart, end: d2.selectionEnd } : (d2 = (d2.ownerDocument && d2.ownerDocument.defaultView || window).getSelection(), d2 = { anchorNode: d2.anchorNode, anchorOffset: d2.anchorOffset, focusNode: d2.focusNode, focusOffset: d2.focusOffset }), Se$1 && Ie$1(Se$1, d2) || (Se$1 = d2, d2 = oe(Re$1, "onSelect"), 0 < d2.length && (b2 = new td("onSelect", "select", null, b2, c2), a.push({ event: b2, listeners: d2 }), b2.target = Qe)));
|
|
2186
2186
|
}
|
|
2187
|
-
function Ve
|
|
2187
|
+
function Ve(a, b2) {
|
|
2188
2188
|
var c2 = {};
|
|
2189
2189
|
c2[a.toLowerCase()] = b2.toLowerCase();
|
|
2190
2190
|
c2["Webkit" + a] = "webkit" + b2;
|
|
2191
2191
|
c2["Moz" + a] = "moz" + b2;
|
|
2192
2192
|
return c2;
|
|
2193
2193
|
}
|
|
2194
|
-
var We = { animationend: Ve
|
|
2194
|
+
var We = { animationend: Ve("Animation", "AnimationEnd"), animationiteration: Ve("Animation", "AnimationIteration"), animationstart: Ve("Animation", "AnimationStart"), transitionend: Ve("Transition", "TransitionEnd") }, Xe = {}, Ye = {};
|
|
2195
2195
|
ia && (Ye = document.createElement("div").style, "AnimationEvent" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), "TransitionEvent" in window || delete We.transitionend.transition);
|
|
2196
2196
|
function Ze(a) {
|
|
2197
2197
|
if (Xe[a]) return Xe[a];
|
|
@@ -2486,10 +2486,10 @@ function hd(a, b2, c2, d2, e) {
|
|
|
2486
2486
|
xa = d3 ? ue$1(d3) : window;
|
|
2487
2487
|
switch (a) {
|
|
2488
2488
|
case "focusin":
|
|
2489
|
-
if (me$1(xa) || "true" === xa.contentEditable) Qe = xa, Re = d3, Se$1 = null;
|
|
2489
|
+
if (me$1(xa) || "true" === xa.contentEditable) Qe = xa, Re$1 = d3, Se$1 = null;
|
|
2490
2490
|
break;
|
|
2491
2491
|
case "focusout":
|
|
2492
|
-
Se$1 = Re = Qe = null;
|
|
2492
|
+
Se$1 = Re$1 = Qe = null;
|
|
2493
2493
|
break;
|
|
2494
2494
|
case "mousedown":
|
|
2495
2495
|
Te$1 = true;
|
|
@@ -2523,7 +2523,7 @@ function hd(a, b2, c2, d2, e) {
|
|
|
2523
2523
|
}
|
|
2524
2524
|
else ie ? ge(a, c2) && (ba = "onCompositionEnd") : "keydown" === a && 229 === c2.keyCode && (ba = "onCompositionStart");
|
|
2525
2525
|
ba && (de$1 && "ko" !== c2.locale && (ie || "onCompositionStart" !== ba ? "onCompositionEnd" === ba && ie && ($a = nd()) : (kd = e2, ld = "value" in kd ? kd.value : kd.textContent, ie = true)), xa = oe(d3, ba), 0 < xa.length && (ba = new Ld(ba, a, null, c2, e2), g3.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he$1(c2), null !== $a && (ba.data = $a))));
|
|
2526
|
-
if ($a = ce ? je(a, c2) : ke$1(a, c2)) d3 = oe(d3, "onBeforeInput"), 0 < d3.length && (e2 = new Ld("onBeforeInput", "beforeinput", null, c2, e2), g3.push({ event: e2, listeners: d3 }), e2.data = $a);
|
|
2526
|
+
if ($a = ce$1 ? je(a, c2) : ke$1(a, c2)) d3 = oe(d3, "onBeforeInput"), 0 < d3.length && (e2 = new Ld("onBeforeInput", "beforeinput", null, c2, e2), g3.push({ event: e2, listeners: d3 }), e2.data = $a);
|
|
2527
2527
|
}
|
|
2528
2528
|
se(g3, b2);
|
|
2529
2529
|
});
|
|
@@ -2656,7 +2656,7 @@ function Uf(a) {
|
|
|
2656
2656
|
function E$1(a) {
|
|
2657
2657
|
0 > Tf || (a.current = Sf[Tf], Sf[Tf] = null, Tf--);
|
|
2658
2658
|
}
|
|
2659
|
-
function G$
|
|
2659
|
+
function G$1(a, b2) {
|
|
2660
2660
|
Tf++;
|
|
2661
2661
|
Sf[Tf] = a.current;
|
|
2662
2662
|
a.current = b2;
|
|
@@ -2682,8 +2682,8 @@ function $f() {
|
|
|
2682
2682
|
}
|
|
2683
2683
|
function ag(a, b2, c2) {
|
|
2684
2684
|
if (H$2.current !== Vf) throw Error(p$2(168));
|
|
2685
|
-
G$
|
|
2686
|
-
G$
|
|
2685
|
+
G$1(H$2, b2);
|
|
2686
|
+
G$1(Wf, c2);
|
|
2687
2687
|
}
|
|
2688
2688
|
function bg(a, b2, c2) {
|
|
2689
2689
|
var d2 = a.stateNode;
|
|
@@ -2696,15 +2696,15 @@ function bg(a, b2, c2) {
|
|
|
2696
2696
|
function cg(a) {
|
|
2697
2697
|
a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Vf;
|
|
2698
2698
|
Xf = H$2.current;
|
|
2699
|
-
G$
|
|
2700
|
-
G$
|
|
2699
|
+
G$1(H$2, a);
|
|
2700
|
+
G$1(Wf, Wf.current);
|
|
2701
2701
|
return true;
|
|
2702
2702
|
}
|
|
2703
2703
|
function dg(a, b2, c2) {
|
|
2704
2704
|
var d2 = a.stateNode;
|
|
2705
2705
|
if (!d2) throw Error(p$2(169));
|
|
2706
|
-
c2 ? (a = bg(a, b2, Xf), d2.__reactInternalMemoizedMergedChildContext = a, E$1(Wf), E$1(H$2), G$
|
|
2707
|
-
G$
|
|
2706
|
+
c2 ? (a = bg(a, b2, Xf), d2.__reactInternalMemoizedMergedChildContext = a, E$1(Wf), E$1(H$2), G$1(H$2, a)) : E$1(Wf);
|
|
2707
|
+
G$1(Wf, c2);
|
|
2708
2708
|
}
|
|
2709
2709
|
var eg = null, fg = false, gg = false;
|
|
2710
2710
|
function hg(a) {
|
|
@@ -2770,7 +2770,7 @@ function wg(a) {
|
|
|
2770
2770
|
for (; a === mg; ) mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null;
|
|
2771
2771
|
for (; a === qg; ) qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null;
|
|
2772
2772
|
}
|
|
2773
|
-
var xg = null, yg = null, I$
|
|
2773
|
+
var xg = null, yg = null, I$1 = false, zg = null;
|
|
2774
2774
|
function Ag(a, b2) {
|
|
2775
2775
|
var c2 = Bg(5, null, null, 0);
|
|
2776
2776
|
c2.elementType = "DELETED";
|
|
@@ -2797,7 +2797,7 @@ function Dg(a) {
|
|
|
2797
2797
|
return 0 !== (a.mode & 1) && 0 === (a.flags & 128);
|
|
2798
2798
|
}
|
|
2799
2799
|
function Eg(a) {
|
|
2800
|
-
if (I$
|
|
2800
|
+
if (I$1) {
|
|
2801
2801
|
var b2 = yg;
|
|
2802
2802
|
if (b2) {
|
|
2803
2803
|
var c2 = b2;
|
|
@@ -2805,12 +2805,12 @@ function Eg(a) {
|
|
|
2805
2805
|
if (Dg(a)) throw Error(p$2(418));
|
|
2806
2806
|
b2 = Lf(c2.nextSibling);
|
|
2807
2807
|
var d2 = xg;
|
|
2808
|
-
b2 && Cg(a, b2) ? Ag(d2, c2) : (a.flags = a.flags & -4097 | 2, I$
|
|
2808
|
+
b2 && Cg(a, b2) ? Ag(d2, c2) : (a.flags = a.flags & -4097 | 2, I$1 = false, xg = a);
|
|
2809
2809
|
}
|
|
2810
2810
|
} else {
|
|
2811
2811
|
if (Dg(a)) throw Error(p$2(418));
|
|
2812
2812
|
a.flags = a.flags & -4097 | 2;
|
|
2813
|
-
I$
|
|
2813
|
+
I$1 = false;
|
|
2814
2814
|
xg = a;
|
|
2815
2815
|
}
|
|
2816
2816
|
}
|
|
@@ -2821,7 +2821,7 @@ function Fg(a) {
|
|
|
2821
2821
|
}
|
|
2822
2822
|
function Gg(a) {
|
|
2823
2823
|
if (a !== xg) return false;
|
|
2824
|
-
if (!I$
|
|
2824
|
+
if (!I$1) return Fg(a), I$1 = true, false;
|
|
2825
2825
|
var b2;
|
|
2826
2826
|
(b2 = 3 !== a.tag) && !(b2 = 5 !== a.tag) && (b2 = a.type, b2 = "head" !== b2 && "body" !== b2 && !Ef(a.type, a.memoizedProps));
|
|
2827
2827
|
if (b2 && (b2 = yg)) {
|
|
@@ -2858,7 +2858,7 @@ function Hg() {
|
|
|
2858
2858
|
}
|
|
2859
2859
|
function Ig() {
|
|
2860
2860
|
yg = xg = null;
|
|
2861
|
-
I$
|
|
2861
|
+
I$1 = false;
|
|
2862
2862
|
}
|
|
2863
2863
|
function Jg(a) {
|
|
2864
2864
|
null === zg ? zg = [a] : zg.push(a);
|
|
@@ -3027,17 +3027,17 @@ function Og(a) {
|
|
|
3027
3027
|
m3 = n3;
|
|
3028
3028
|
u2 = x2;
|
|
3029
3029
|
}
|
|
3030
|
-
if (w2 === h3.length) return c2(e2, u2), I$
|
|
3030
|
+
if (w2 === h3.length) return c2(e2, u2), I$1 && tg(e2, w2), l3;
|
|
3031
3031
|
if (null === u2) {
|
|
3032
3032
|
for (; w2 < h3.length; w2++) u2 = q2(e2, h3[w2], k3), null !== u2 && (g3 = f2(u2, g3, w2), null === m3 ? l3 = u2 : m3.sibling = u2, m3 = u2);
|
|
3033
|
-
I$
|
|
3033
|
+
I$1 && tg(e2, w2);
|
|
3034
3034
|
return l3;
|
|
3035
3035
|
}
|
|
3036
3036
|
for (u2 = d2(e2, u2); w2 < h3.length; w2++) x2 = y2(u2, e2, w2, h3[w2], k3), null !== x2 && (a && null !== x2.alternate && u2.delete(null === x2.key ? w2 : x2.key), g3 = f2(x2, g3, w2), null === m3 ? l3 = x2 : m3.sibling = x2, m3 = x2);
|
|
3037
3037
|
a && u2.forEach(function(a2) {
|
|
3038
3038
|
return b2(e2, a2);
|
|
3039
3039
|
});
|
|
3040
|
-
I$
|
|
3040
|
+
I$1 && tg(e2, w2);
|
|
3041
3041
|
return l3;
|
|
3042
3042
|
}
|
|
3043
3043
|
function t2(e2, g3, h3, k3) {
|
|
@@ -3061,17 +3061,17 @@ function Og(a) {
|
|
|
3061
3061
|
if (n3.done) return c2(
|
|
3062
3062
|
e2,
|
|
3063
3063
|
m3
|
|
3064
|
-
), I$
|
|
3064
|
+
), I$1 && tg(e2, w2), l3;
|
|
3065
3065
|
if (null === m3) {
|
|
3066
3066
|
for (; !n3.done; w2++, n3 = h3.next()) n3 = q2(e2, n3.value, k3), null !== n3 && (g3 = f2(n3, g3, w2), null === u2 ? l3 = n3 : u2.sibling = n3, u2 = n3);
|
|
3067
|
-
I$
|
|
3067
|
+
I$1 && tg(e2, w2);
|
|
3068
3068
|
return l3;
|
|
3069
3069
|
}
|
|
3070
3070
|
for (m3 = d2(e2, m3); !n3.done; w2++, n3 = h3.next()) n3 = y2(m3, e2, w2, n3.value, k3), null !== n3 && (a && null !== n3.alternate && m3.delete(null === n3.key ? w2 : n3.key), g3 = f2(n3, g3, w2), null === u2 ? l3 = n3 : u2.sibling = n3, u2 = n3);
|
|
3071
3071
|
a && m3.forEach(function(a2) {
|
|
3072
3072
|
return b2(e2, a2);
|
|
3073
3073
|
});
|
|
3074
|
-
I$
|
|
3074
|
+
I$1 && tg(e2, w2);
|
|
3075
3075
|
return l3;
|
|
3076
3076
|
}
|
|
3077
3077
|
function J2(a2, d3, f3, h3) {
|
|
@@ -3341,9 +3341,9 @@ function xh(a) {
|
|
|
3341
3341
|
return a;
|
|
3342
3342
|
}
|
|
3343
3343
|
function yh(a, b2) {
|
|
3344
|
-
G$
|
|
3345
|
-
G$
|
|
3346
|
-
G$
|
|
3344
|
+
G$1(wh, b2);
|
|
3345
|
+
G$1(vh, a);
|
|
3346
|
+
G$1(uh, th);
|
|
3347
3347
|
a = b2.nodeType;
|
|
3348
3348
|
switch (a) {
|
|
3349
3349
|
case 9:
|
|
@@ -3354,7 +3354,7 @@ function yh(a, b2) {
|
|
|
3354
3354
|
a = 8 === a ? b2.parentNode : b2, b2 = a.namespaceURI || null, a = a.tagName, b2 = lb(b2, a);
|
|
3355
3355
|
}
|
|
3356
3356
|
E$1(uh);
|
|
3357
|
-
G$
|
|
3357
|
+
G$1(uh, b2);
|
|
3358
3358
|
}
|
|
3359
3359
|
function zh() {
|
|
3360
3360
|
E$1(uh);
|
|
@@ -3365,12 +3365,12 @@ function Ah(a) {
|
|
|
3365
3365
|
xh(wh.current);
|
|
3366
3366
|
var b2 = xh(uh.current);
|
|
3367
3367
|
var c2 = lb(b2, a.type);
|
|
3368
|
-
b2 !== c2 && (G$
|
|
3368
|
+
b2 !== c2 && (G$1(vh, a), G$1(uh, c2));
|
|
3369
3369
|
}
|
|
3370
3370
|
function Bh(a) {
|
|
3371
3371
|
vh.current === a && (E$1(uh), E$1(vh));
|
|
3372
3372
|
}
|
|
3373
|
-
var L$
|
|
3373
|
+
var L$2 = Uf(0);
|
|
3374
3374
|
function Ch(a) {
|
|
3375
3375
|
for (var b2 = a; null !== b2; ) {
|
|
3376
3376
|
if (13 === b2.tag) {
|
|
@@ -3398,8 +3398,8 @@ function Eh() {
|
|
|
3398
3398
|
for (var a = 0; a < Dh.length; a++) Dh[a]._workInProgressVersionPrimary = null;
|
|
3399
3399
|
Dh.length = 0;
|
|
3400
3400
|
}
|
|
3401
|
-
var Fh = ua.ReactCurrentDispatcher, Gh = ua.ReactCurrentBatchConfig, Hh = 0, M$
|
|
3402
|
-
function P$
|
|
3401
|
+
var Fh = ua.ReactCurrentDispatcher, Gh = ua.ReactCurrentBatchConfig, Hh = 0, M$1 = null, N$2 = null, O$1 = null, Ih = false, Jh = false, Kh = 0, Lh = 0;
|
|
3402
|
+
function P$2() {
|
|
3403
3403
|
throw Error(p$2(321));
|
|
3404
3404
|
}
|
|
3405
3405
|
function Mh(a, b2) {
|
|
@@ -3409,7 +3409,7 @@ function Mh(a, b2) {
|
|
|
3409
3409
|
}
|
|
3410
3410
|
function Nh(a, b2, c2, d2, e, f2) {
|
|
3411
3411
|
Hh = f2;
|
|
3412
|
-
M$
|
|
3412
|
+
M$1 = b2;
|
|
3413
3413
|
b2.memoizedState = null;
|
|
3414
3414
|
b2.updateQueue = null;
|
|
3415
3415
|
b2.lanes = 0;
|
|
@@ -3431,7 +3431,7 @@ function Nh(a, b2, c2, d2, e, f2) {
|
|
|
3431
3431
|
Fh.current = Rh;
|
|
3432
3432
|
b2 = null !== N$2 && null !== N$2.next;
|
|
3433
3433
|
Hh = 0;
|
|
3434
|
-
O$1 = N$2 = M$
|
|
3434
|
+
O$1 = N$2 = M$1 = null;
|
|
3435
3435
|
Ih = false;
|
|
3436
3436
|
if (b2) throw Error(p$2(300));
|
|
3437
3437
|
return a;
|
|
@@ -3443,21 +3443,21 @@ function Sh() {
|
|
|
3443
3443
|
}
|
|
3444
3444
|
function Th() {
|
|
3445
3445
|
var a = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
|
|
3446
|
-
null === O$1 ? M$
|
|
3446
|
+
null === O$1 ? M$1.memoizedState = O$1 = a : O$1 = O$1.next = a;
|
|
3447
3447
|
return O$1;
|
|
3448
3448
|
}
|
|
3449
3449
|
function Uh() {
|
|
3450
3450
|
if (null === N$2) {
|
|
3451
|
-
var a = M$
|
|
3451
|
+
var a = M$1.alternate;
|
|
3452
3452
|
a = null !== a ? a.memoizedState : null;
|
|
3453
3453
|
} else a = N$2.next;
|
|
3454
|
-
var b2 = null === O$1 ? M$
|
|
3454
|
+
var b2 = null === O$1 ? M$1.memoizedState : O$1.next;
|
|
3455
3455
|
if (null !== b2) O$1 = b2, N$2 = a;
|
|
3456
3456
|
else {
|
|
3457
3457
|
if (null === a) throw Error(p$2(310));
|
|
3458
3458
|
N$2 = a;
|
|
3459
3459
|
a = { memoizedState: N$2.memoizedState, baseState: N$2.baseState, baseQueue: N$2.baseQueue, queue: N$2.queue, next: null };
|
|
3460
|
-
null === O$1 ? M$
|
|
3460
|
+
null === O$1 ? M$1.memoizedState = O$1 = a : O$1 = O$1.next = a;
|
|
3461
3461
|
}
|
|
3462
3462
|
return O$1;
|
|
3463
3463
|
}
|
|
@@ -3494,7 +3494,7 @@ function Wh(a) {
|
|
|
3494
3494
|
next: null
|
|
3495
3495
|
};
|
|
3496
3496
|
null === k2 ? (h2 = k2 = q2, g2 = d2) : k2 = k2.next = q2;
|
|
3497
|
-
M$
|
|
3497
|
+
M$1.lanes |= m2;
|
|
3498
3498
|
rh |= m2;
|
|
3499
3499
|
}
|
|
3500
3500
|
l2 = l2.next;
|
|
@@ -3510,7 +3510,7 @@ function Wh(a) {
|
|
|
3510
3510
|
if (null !== a) {
|
|
3511
3511
|
e = a;
|
|
3512
3512
|
do
|
|
3513
|
-
f2 = e.lane, M$
|
|
3513
|
+
f2 = e.lane, M$1.lanes |= f2, rh |= f2, e = e.next;
|
|
3514
3514
|
while (e !== a);
|
|
3515
3515
|
} else null === e && (c2.lanes = 0);
|
|
3516
3516
|
return [b2.memoizedState, c2.dispatch];
|
|
@@ -3536,14 +3536,14 @@ function Xh(a) {
|
|
|
3536
3536
|
function Yh() {
|
|
3537
3537
|
}
|
|
3538
3538
|
function Zh(a, b2) {
|
|
3539
|
-
var c2 = M$
|
|
3539
|
+
var c2 = M$1, d2 = Uh(), e = b2(), f2 = !He(d2.memoizedState, e);
|
|
3540
3540
|
f2 && (d2.memoizedState = e, dh = true);
|
|
3541
3541
|
d2 = d2.queue;
|
|
3542
3542
|
$h(ai.bind(null, c2, d2, a), [a]);
|
|
3543
3543
|
if (d2.getSnapshot !== b2 || f2 || null !== O$1 && O$1.memoizedState.tag & 1) {
|
|
3544
3544
|
c2.flags |= 2048;
|
|
3545
3545
|
bi(9, ci.bind(null, c2, d2, e, b2), void 0, null);
|
|
3546
|
-
if (null === Q$
|
|
3546
|
+
if (null === Q$1) throw Error(p$2(349));
|
|
3547
3547
|
0 !== (Hh & 30) || di(c2, b2, e);
|
|
3548
3548
|
}
|
|
3549
3549
|
return e;
|
|
@@ -3551,8 +3551,8 @@ function Zh(a, b2) {
|
|
|
3551
3551
|
function di(a, b2, c2) {
|
|
3552
3552
|
a.flags |= 16384;
|
|
3553
3553
|
a = { getSnapshot: b2, value: c2 };
|
|
3554
|
-
b2 = M$
|
|
3555
|
-
null === b2 ? (b2 = { lastEffect: null, stores: null }, M$
|
|
3554
|
+
b2 = M$1.updateQueue;
|
|
3555
|
+
null === b2 ? (b2 = { lastEffect: null, stores: null }, M$1.updateQueue = b2, b2.stores = [a]) : (c2 = b2.stores, null === c2 ? b2.stores = [a] : c2.push(a));
|
|
3556
3556
|
}
|
|
3557
3557
|
function ci(a, b2, c2, d2) {
|
|
3558
3558
|
b2.value = c2;
|
|
@@ -3584,13 +3584,13 @@ function hi(a) {
|
|
|
3584
3584
|
b2.memoizedState = b2.baseState = a;
|
|
3585
3585
|
a = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Vh, lastRenderedState: a };
|
|
3586
3586
|
b2.queue = a;
|
|
3587
|
-
a = a.dispatch = ii.bind(null, M$
|
|
3587
|
+
a = a.dispatch = ii.bind(null, M$1, a);
|
|
3588
3588
|
return [b2.memoizedState, a];
|
|
3589
3589
|
}
|
|
3590
3590
|
function bi(a, b2, c2, d2) {
|
|
3591
3591
|
a = { tag: a, create: b2, destroy: c2, deps: d2, next: null };
|
|
3592
|
-
b2 = M$
|
|
3593
|
-
null === b2 ? (b2 = { lastEffect: null, stores: null }, M$
|
|
3592
|
+
b2 = M$1.updateQueue;
|
|
3593
|
+
null === b2 ? (b2 = { lastEffect: null, stores: null }, M$1.updateQueue = b2, b2.lastEffect = a.next = a) : (c2 = b2.lastEffect, null === c2 ? b2.lastEffect = a.next = a : (d2 = c2.next, c2.next = a, a.next = d2, b2.lastEffect = a));
|
|
3594
3594
|
return a;
|
|
3595
3595
|
}
|
|
3596
3596
|
function ji() {
|
|
@@ -3598,7 +3598,7 @@ function ji() {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
function ki(a, b2, c2, d2) {
|
|
3600
3600
|
var e = Th();
|
|
3601
|
-
M$
|
|
3601
|
+
M$1.flags |= a;
|
|
3602
3602
|
e.memoizedState = bi(1 | b2, c2, void 0, void 0 === d2 ? null : d2);
|
|
3603
3603
|
}
|
|
3604
3604
|
function li(a, b2, c2, d2) {
|
|
@@ -3613,7 +3613,7 @@ function li(a, b2, c2, d2) {
|
|
|
3613
3613
|
return;
|
|
3614
3614
|
}
|
|
3615
3615
|
}
|
|
3616
|
-
M$
|
|
3616
|
+
M$1.flags |= a;
|
|
3617
3617
|
e.memoizedState = bi(1 | b2, c2, f2, d2);
|
|
3618
3618
|
}
|
|
3619
3619
|
function mi(a, b2) {
|
|
@@ -3661,7 +3661,7 @@ function ti(a, b2) {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
function ui(a, b2, c2) {
|
|
3663
3663
|
if (0 === (Hh & 21)) return a.baseState && (a.baseState = false, dh = true), a.memoizedState = c2;
|
|
3664
|
-
He(c2, b2) || (c2 = yc(), M$
|
|
3664
|
+
He(c2, b2) || (c2 = yc(), M$1.lanes |= c2, rh |= c2, a.baseState = true);
|
|
3665
3665
|
return b2;
|
|
3666
3666
|
}
|
|
3667
3667
|
function vi(a, b2) {
|
|
@@ -3713,7 +3713,7 @@ function ii(a, b2, c2) {
|
|
|
3713
3713
|
}
|
|
3714
3714
|
function zi(a) {
|
|
3715
3715
|
var b2 = a.alternate;
|
|
3716
|
-
return a === M$
|
|
3716
|
+
return a === M$1 || null !== b2 && b2 === M$1;
|
|
3717
3717
|
}
|
|
3718
3718
|
function Ai(a, b2) {
|
|
3719
3719
|
Jh = Ih = true;
|
|
@@ -3730,7 +3730,7 @@ function Bi(a, b2, c2) {
|
|
|
3730
3730
|
Cc(a, c2);
|
|
3731
3731
|
}
|
|
3732
3732
|
}
|
|
3733
|
-
var Rh = { readContext: eh, useCallback: P$
|
|
3733
|
+
var Rh = { readContext: eh, useCallback: P$2, useContext: P$2, useEffect: P$2, useImperativeHandle: P$2, useInsertionEffect: P$2, useLayoutEffect: P$2, useMemo: P$2, useReducer: P$2, useRef: P$2, useState: P$2, useDebugValue: P$2, useDeferredValue: P$2, useTransition: P$2, useMutableSource: P$2, useSyncExternalStore: P$2, useId: P$2, unstable_isNewReconciler: false }, Oh = { readContext: eh, useCallback: function(a, b2) {
|
|
3734
3734
|
Th().memoizedState = [a, void 0 === b2 ? null : b2];
|
|
3735
3735
|
return a;
|
|
3736
3736
|
}, useContext: eh, useEffect: mi, useImperativeHandle: function(a, b2, c2) {
|
|
@@ -3757,7 +3757,7 @@ var Rh = { readContext: eh, useCallback: P$1, useContext: P$1, useEffect: P$1, u
|
|
|
3757
3757
|
d2.memoizedState = d2.baseState = b2;
|
|
3758
3758
|
a = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: a, lastRenderedState: b2 };
|
|
3759
3759
|
d2.queue = a;
|
|
3760
|
-
a = a.dispatch = xi.bind(null, M$
|
|
3760
|
+
a = a.dispatch = xi.bind(null, M$1, a);
|
|
3761
3761
|
return [d2.memoizedState, a];
|
|
3762
3762
|
}, useRef: function(a) {
|
|
3763
3763
|
var b2 = Th();
|
|
@@ -3772,13 +3772,13 @@ var Rh = { readContext: eh, useCallback: P$1, useContext: P$1, useEffect: P$1, u
|
|
|
3772
3772
|
return [b2, a];
|
|
3773
3773
|
}, useMutableSource: function() {
|
|
3774
3774
|
}, useSyncExternalStore: function(a, b2, c2) {
|
|
3775
|
-
var d2 = M$
|
|
3776
|
-
if (I$
|
|
3775
|
+
var d2 = M$1, e = Th();
|
|
3776
|
+
if (I$1) {
|
|
3777
3777
|
if (void 0 === c2) throw Error(p$2(407));
|
|
3778
3778
|
c2 = c2();
|
|
3779
3779
|
} else {
|
|
3780
3780
|
c2 = b2();
|
|
3781
|
-
if (null === Q$
|
|
3781
|
+
if (null === Q$1) throw Error(p$2(349));
|
|
3782
3782
|
0 !== (Hh & 30) || di(d2, b2, c2);
|
|
3783
3783
|
}
|
|
3784
3784
|
e.memoizedState = c2;
|
|
@@ -3794,8 +3794,8 @@ var Rh = { readContext: eh, useCallback: P$1, useContext: P$1, useEffect: P$1, u
|
|
|
3794
3794
|
bi(9, ci.bind(null, d2, f2, c2, b2), void 0, null);
|
|
3795
3795
|
return c2;
|
|
3796
3796
|
}, useId: function() {
|
|
3797
|
-
var a = Th(), b2 = Q$
|
|
3798
|
-
if (I$
|
|
3797
|
+
var a = Th(), b2 = Q$1.identifierPrefix;
|
|
3798
|
+
if (I$1) {
|
|
3799
3799
|
var c2 = sg;
|
|
3800
3800
|
var d2 = rg;
|
|
3801
3801
|
c2 = (d2 & ~(1 << 32 - oc(d2) - 1)).toString(32) + c2;
|
|
@@ -4011,7 +4011,7 @@ function Yi(a, b2, c2, d2, e) {
|
|
|
4011
4011
|
d2 = Nh(a, b2, c2, d2, f2, e);
|
|
4012
4012
|
c2 = Sh();
|
|
4013
4013
|
if (null !== a && !dh) return b2.updateQueue = a.updateQueue, b2.flags &= -2053, a.lanes &= ~e, Zi(a, b2, e);
|
|
4014
|
-
I$
|
|
4014
|
+
I$1 && c2 && vg(b2);
|
|
4015
4015
|
b2.flags |= 1;
|
|
4016
4016
|
Xi(a, b2, d2, e);
|
|
4017
4017
|
return b2.child;
|
|
@@ -4048,15 +4048,15 @@ function bj(a, b2, c2, d2, e) {
|
|
|
4048
4048
|
}
|
|
4049
4049
|
function dj(a, b2, c2) {
|
|
4050
4050
|
var d2 = b2.pendingProps, e = d2.children, f2 = null !== a ? a.memoizedState : null;
|
|
4051
|
-
if ("hidden" === d2.mode) if (0 === (b2.mode & 1)) b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G$
|
|
4051
|
+
if ("hidden" === d2.mode) if (0 === (b2.mode & 1)) b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G$1(ej, fj), fj |= c2;
|
|
4052
4052
|
else {
|
|
4053
|
-
if (0 === (c2 & 1073741824)) return a = null !== f2 ? f2.baseLanes | c2 : c2, b2.lanes = b2.childLanes = 1073741824, b2.memoizedState = { baseLanes: a, cachePool: null, transitions: null }, b2.updateQueue = null, G$
|
|
4053
|
+
if (0 === (c2 & 1073741824)) return a = null !== f2 ? f2.baseLanes | c2 : c2, b2.lanes = b2.childLanes = 1073741824, b2.memoizedState = { baseLanes: a, cachePool: null, transitions: null }, b2.updateQueue = null, G$1(ej, fj), fj |= a, null;
|
|
4054
4054
|
b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null };
|
|
4055
4055
|
d2 = null !== f2 ? f2.baseLanes : c2;
|
|
4056
|
-
G$
|
|
4056
|
+
G$1(ej, fj);
|
|
4057
4057
|
fj |= d2;
|
|
4058
4058
|
}
|
|
4059
|
-
else null !== f2 ? (d2 = f2.baseLanes | c2, b2.memoizedState = null) : d2 = c2, G$
|
|
4059
|
+
else null !== f2 ? (d2 = f2.baseLanes | c2, b2.memoizedState = null) : d2 = c2, G$1(ej, fj), fj |= d2;
|
|
4060
4060
|
Xi(a, b2, e, c2);
|
|
4061
4061
|
return b2.child;
|
|
4062
4062
|
}
|
|
@@ -4071,7 +4071,7 @@ function cj(a, b2, c2, d2, e) {
|
|
|
4071
4071
|
c2 = Nh(a, b2, c2, d2, f2, e);
|
|
4072
4072
|
d2 = Sh();
|
|
4073
4073
|
if (null !== a && !dh) return b2.updateQueue = a.updateQueue, b2.flags &= -2053, a.lanes &= ~e, Zi(a, b2, e);
|
|
4074
|
-
I$
|
|
4074
|
+
I$1 && d2 && vg(b2);
|
|
4075
4075
|
b2.flags |= 1;
|
|
4076
4076
|
Xi(a, b2, c2, e);
|
|
4077
4077
|
return b2.child;
|
|
@@ -4147,11 +4147,11 @@ function nj(a) {
|
|
|
4147
4147
|
return { baseLanes: a, cachePool: null, transitions: null };
|
|
4148
4148
|
}
|
|
4149
4149
|
function oj(a, b2, c2) {
|
|
4150
|
-
var d2 = b2.pendingProps, e = L$
|
|
4150
|
+
var d2 = b2.pendingProps, e = L$2.current, f2 = false, g2 = 0 !== (b2.flags & 128), h2;
|
|
4151
4151
|
(h2 = g2) || (h2 = null !== a && null === a.memoizedState ? false : 0 !== (e & 2));
|
|
4152
4152
|
if (h2) f2 = true, b2.flags &= -129;
|
|
4153
4153
|
else if (null === a || null !== a.memoizedState) e |= 1;
|
|
4154
|
-
G$
|
|
4154
|
+
G$1(L$2, e & 1);
|
|
4155
4155
|
if (null === a) {
|
|
4156
4156
|
Eg(b2);
|
|
4157
4157
|
a = b2.memoizedState;
|
|
@@ -4236,7 +4236,7 @@ function rj(a, b2, c2, d2, e, f2, g2) {
|
|
|
4236
4236
|
}
|
|
4237
4237
|
h2 = 0 !== (g2 & a.childLanes);
|
|
4238
4238
|
if (dh || h2) {
|
|
4239
|
-
d2 = Q$
|
|
4239
|
+
d2 = Q$1;
|
|
4240
4240
|
if (null !== d2) {
|
|
4241
4241
|
switch (g2 & -g2) {
|
|
4242
4242
|
case 4:
|
|
@@ -4285,7 +4285,7 @@ function rj(a, b2, c2, d2, e, f2, g2) {
|
|
|
4285
4285
|
a = f2.treeContext;
|
|
4286
4286
|
yg = Lf(e.nextSibling);
|
|
4287
4287
|
xg = b2;
|
|
4288
|
-
I$
|
|
4288
|
+
I$1 = true;
|
|
4289
4289
|
zg = null;
|
|
4290
4290
|
null !== a && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a.id, sg = a.overflow, qg = b2);
|
|
4291
4291
|
b2 = qj(b2, d2.children);
|
|
@@ -4305,7 +4305,7 @@ function wj(a, b2, c2, d2, e) {
|
|
|
4305
4305
|
function xj(a, b2, c2) {
|
|
4306
4306
|
var d2 = b2.pendingProps, e = d2.revealOrder, f2 = d2.tail;
|
|
4307
4307
|
Xi(a, b2, d2.children, c2);
|
|
4308
|
-
d2 = L$
|
|
4308
|
+
d2 = L$2.current;
|
|
4309
4309
|
if (0 !== (d2 & 2)) d2 = d2 & 1 | 2, b2.flags |= 128;
|
|
4310
4310
|
else {
|
|
4311
4311
|
if (null !== a && 0 !== (a.flags & 128)) a: for (a = b2.child; null !== a; ) {
|
|
@@ -4326,7 +4326,7 @@ function xj(a, b2, c2) {
|
|
|
4326
4326
|
}
|
|
4327
4327
|
d2 &= 1;
|
|
4328
4328
|
}
|
|
4329
|
-
G$
|
|
4329
|
+
G$1(L$2, d2);
|
|
4330
4330
|
if (0 === (b2.mode & 1)) b2.memoizedState = null;
|
|
4331
4331
|
else switch (e) {
|
|
4332
4332
|
case "forwards":
|
|
@@ -4394,19 +4394,19 @@ function yj(a, b2, c2) {
|
|
|
4394
4394
|
break;
|
|
4395
4395
|
case 10:
|
|
4396
4396
|
var d2 = b2.type._context, e = b2.memoizedProps.value;
|
|
4397
|
-
G$
|
|
4397
|
+
G$1(Wg, d2._currentValue);
|
|
4398
4398
|
d2._currentValue = e;
|
|
4399
4399
|
break;
|
|
4400
4400
|
case 13:
|
|
4401
4401
|
d2 = b2.memoizedState;
|
|
4402
4402
|
if (null !== d2) {
|
|
4403
|
-
if (null !== d2.dehydrated) return G$
|
|
4403
|
+
if (null !== d2.dehydrated) return G$1(L$2, L$2.current & 1), b2.flags |= 128, null;
|
|
4404
4404
|
if (0 !== (c2 & b2.child.childLanes)) return oj(a, b2, c2);
|
|
4405
|
-
G$
|
|
4405
|
+
G$1(L$2, L$2.current & 1);
|
|
4406
4406
|
a = Zi(a, b2, c2);
|
|
4407
4407
|
return null !== a ? a.sibling : null;
|
|
4408
4408
|
}
|
|
4409
|
-
G$
|
|
4409
|
+
G$1(L$2, L$2.current & 1);
|
|
4410
4410
|
break;
|
|
4411
4411
|
case 19:
|
|
4412
4412
|
d2 = 0 !== (c2 & b2.childLanes);
|
|
@@ -4416,7 +4416,7 @@ function yj(a, b2, c2) {
|
|
|
4416
4416
|
}
|
|
4417
4417
|
e = b2.memoizedState;
|
|
4418
4418
|
null !== e && (e.rendering = null, e.tail = null, e.lastEffect = null);
|
|
4419
|
-
G$
|
|
4419
|
+
G$1(L$2, L$2.current);
|
|
4420
4420
|
if (d2) break;
|
|
4421
4421
|
else return null;
|
|
4422
4422
|
case 22:
|
|
@@ -4498,7 +4498,7 @@ Cj = function(a, b2, c2, d2) {
|
|
|
4498
4498
|
c2 !== d2 && (b2.flags |= 4);
|
|
4499
4499
|
};
|
|
4500
4500
|
function Dj(a, b2) {
|
|
4501
|
-
if (!I$
|
|
4501
|
+
if (!I$1) switch (a.tailMode) {
|
|
4502
4502
|
case "hidden":
|
|
4503
4503
|
b2 = a.tail;
|
|
4504
4504
|
for (var c2 = null; null !== b2; ) null !== b2.alternate && (c2 = b2), b2 = b2.sibling;
|
|
@@ -4775,10 +4775,10 @@ function Ej(a, b2, c2) {
|
|
|
4775
4775
|
S$1(b2);
|
|
4776
4776
|
return null;
|
|
4777
4777
|
case 13:
|
|
4778
|
-
E$1(L$
|
|
4778
|
+
E$1(L$2);
|
|
4779
4779
|
d2 = b2.memoizedState;
|
|
4780
4780
|
if (null === a || null !== a.memoizedState && null !== a.memoizedState.dehydrated) {
|
|
4781
|
-
if (I$
|
|
4781
|
+
if (I$1 && null !== yg && 0 !== (b2.mode & 1) && 0 === (b2.flags & 128)) Hg(), Ig(), b2.flags |= 98560, f2 = false;
|
|
4782
4782
|
else if (f2 = Gg(b2), null !== d2 && null !== d2.dehydrated) {
|
|
4783
4783
|
if (null === a) {
|
|
4784
4784
|
if (!f2) throw Error(p$2(318));
|
|
@@ -4794,7 +4794,7 @@ function Ej(a, b2, c2) {
|
|
|
4794
4794
|
}
|
|
4795
4795
|
if (0 !== (b2.flags & 128)) return b2.lanes = c2, b2;
|
|
4796
4796
|
d2 = null !== d2;
|
|
4797
|
-
d2 !== (null !== a && null !== a.memoizedState) && d2 && (b2.child.flags |= 8192, 0 !== (b2.mode & 1) && (null === a || 0 !== (L$
|
|
4797
|
+
d2 !== (null !== a && null !== a.memoizedState) && d2 && (b2.child.flags |= 8192, 0 !== (b2.mode & 1) && (null === a || 0 !== (L$2.current & 1) ? 0 === T$2 && (T$2 = 3) : tj()));
|
|
4798
4798
|
null !== b2.updateQueue && (b2.flags |= 4);
|
|
4799
4799
|
S$1(b2);
|
|
4800
4800
|
return null;
|
|
@@ -4805,7 +4805,7 @@ function Ej(a, b2, c2) {
|
|
|
4805
4805
|
case 17:
|
|
4806
4806
|
return Zf(b2.type) && $f(), S$1(b2), null;
|
|
4807
4807
|
case 19:
|
|
4808
|
-
E$1(L$
|
|
4808
|
+
E$1(L$2);
|
|
4809
4809
|
f2 = b2.memoizedState;
|
|
4810
4810
|
if (null === f2) return S$1(b2), null;
|
|
4811
4811
|
d2 = 0 !== (b2.flags & 128);
|
|
@@ -4822,20 +4822,20 @@ function Ej(a, b2, c2) {
|
|
|
4822
4822
|
b2.subtreeFlags = 0;
|
|
4823
4823
|
d2 = c2;
|
|
4824
4824
|
for (c2 = b2.child; null !== c2; ) f2 = c2, a = d2, f2.flags &= 14680066, g2 = f2.alternate, null === g2 ? (f2.childLanes = 0, f2.lanes = a, f2.child = null, f2.subtreeFlags = 0, f2.memoizedProps = null, f2.memoizedState = null, f2.updateQueue = null, f2.dependencies = null, f2.stateNode = null) : (f2.childLanes = g2.childLanes, f2.lanes = g2.lanes, f2.child = g2.child, f2.subtreeFlags = 0, f2.deletions = null, f2.memoizedProps = g2.memoizedProps, f2.memoizedState = g2.memoizedState, f2.updateQueue = g2.updateQueue, f2.type = g2.type, a = g2.dependencies, f2.dependencies = null === a ? null : { lanes: a.lanes, firstContext: a.firstContext }), c2 = c2.sibling;
|
|
4825
|
-
G$
|
|
4825
|
+
G$1(L$2, L$2.current & 1 | 2);
|
|
4826
4826
|
return b2.child;
|
|
4827
4827
|
}
|
|
4828
4828
|
a = a.sibling;
|
|
4829
4829
|
}
|
|
4830
|
-
null !== f2.tail && B$
|
|
4830
|
+
null !== f2.tail && B$3() > Gj && (b2.flags |= 128, d2 = true, Dj(f2, false), b2.lanes = 4194304);
|
|
4831
4831
|
}
|
|
4832
4832
|
else {
|
|
4833
4833
|
if (!d2) if (a = Ch(g2), null !== a) {
|
|
4834
|
-
if (b2.flags |= 128, d2 = true, c2 = a.updateQueue, null !== c2 && (b2.updateQueue = c2, b2.flags |= 4), Dj(f2, true), null === f2.tail && "hidden" === f2.tailMode && !g2.alternate && !I$
|
|
4835
|
-
} else 2 * B$
|
|
4834
|
+
if (b2.flags |= 128, d2 = true, c2 = a.updateQueue, null !== c2 && (b2.updateQueue = c2, b2.flags |= 4), Dj(f2, true), null === f2.tail && "hidden" === f2.tailMode && !g2.alternate && !I$1) return S$1(b2), null;
|
|
4835
|
+
} else 2 * B$3() - f2.renderingStartTime > Gj && 1073741824 !== c2 && (b2.flags |= 128, d2 = true, Dj(f2, false), b2.lanes = 4194304);
|
|
4836
4836
|
f2.isBackwards ? (g2.sibling = b2.child, b2.child = g2) : (c2 = f2.last, null !== c2 ? c2.sibling = g2 : b2.child = g2, f2.last = g2);
|
|
4837
4837
|
}
|
|
4838
|
-
if (null !== f2.tail) return b2 = f2.tail, f2.rendering = b2, f2.tail = b2.sibling, f2.renderingStartTime = B$
|
|
4838
|
+
if (null !== f2.tail) return b2 = f2.tail, f2.rendering = b2, f2.tail = b2.sibling, f2.renderingStartTime = B$3(), b2.sibling = null, c2 = L$2.current, G$1(L$2, d2 ? c2 & 1 | 2 : c2 & 1), b2;
|
|
4839
4839
|
S$1(b2);
|
|
4840
4840
|
return null;
|
|
4841
4841
|
case 22:
|
|
@@ -4858,7 +4858,7 @@ function Ij(a, b2) {
|
|
|
4858
4858
|
case 5:
|
|
4859
4859
|
return Bh(b2), null;
|
|
4860
4860
|
case 13:
|
|
4861
|
-
E$1(L$
|
|
4861
|
+
E$1(L$2);
|
|
4862
4862
|
a = b2.memoizedState;
|
|
4863
4863
|
if (null !== a && null !== a.dehydrated) {
|
|
4864
4864
|
if (null === b2.alternate) throw Error(p$2(340));
|
|
@@ -4867,7 +4867,7 @@ function Ij(a, b2) {
|
|
|
4867
4867
|
a = b2.flags;
|
|
4868
4868
|
return a & 65536 ? (b2.flags = a & -65537 | 128, b2) : null;
|
|
4869
4869
|
case 19:
|
|
4870
|
-
return E$1(L$
|
|
4870
|
+
return E$1(L$2), null;
|
|
4871
4871
|
case 4:
|
|
4872
4872
|
return zh(), null;
|
|
4873
4873
|
case 10:
|
|
@@ -5292,7 +5292,7 @@ function dk(a, b2) {
|
|
|
5292
5292
|
ck(b2, a);
|
|
5293
5293
|
ek(a);
|
|
5294
5294
|
e = a.child;
|
|
5295
|
-
e.flags & 8192 && (f2 = null !== e.memoizedState, e.stateNode.isHidden = f2, !f2 || null !== e.alternate && null !== e.alternate.memoizedState || (fk = B$
|
|
5295
|
+
e.flags & 8192 && (f2 = null !== e.memoizedState, e.stateNode.isHidden = f2, !f2 || null !== e.alternate && null !== e.alternate.memoizedState || (fk = B$3()));
|
|
5296
5296
|
d2 & 4 && ak(a);
|
|
5297
5297
|
break;
|
|
5298
5298
|
case 22:
|
|
@@ -5616,9 +5616,9 @@ function jk(a) {
|
|
|
5616
5616
|
V = b2.return;
|
|
5617
5617
|
}
|
|
5618
5618
|
}
|
|
5619
|
-
var lk = Math.ceil, mk = ua.ReactCurrentDispatcher, nk = ua.ReactCurrentOwner, ok = ua.ReactCurrentBatchConfig, K$2 = 0, Q$
|
|
5619
|
+
var lk = Math.ceil, mk = ua.ReactCurrentDispatcher, nk = ua.ReactCurrentOwner, ok = ua.ReactCurrentBatchConfig, K$2 = 0, Q$1 = null, Y$2 = null, Z$1 = 0, fj = 0, ej = Uf(0), T$2 = 0, pk = null, rh = 0, qk = 0, rk = 0, sk = null, tk = null, fk = 0, Gj = Infinity, uk = null, Oi = false, Pi = null, Ri = null, vk = false, wk = null, xk = 0, yk = 0, zk = null, Ak = -1, Bk = 0;
|
|
5620
5620
|
function R$1() {
|
|
5621
|
-
return 0 !== (K$2 & 6) ? B$
|
|
5621
|
+
return 0 !== (K$2 & 6) ? B$3() : -1 !== Ak ? Ak : Ak = B$3();
|
|
5622
5622
|
}
|
|
5623
5623
|
function yi(a) {
|
|
5624
5624
|
if (0 === (a.mode & 1)) return 1;
|
|
@@ -5633,12 +5633,12 @@ function yi(a) {
|
|
|
5633
5633
|
function gi(a, b2, c2, d2) {
|
|
5634
5634
|
if (50 < yk) throw yk = 0, zk = null, Error(p$2(185));
|
|
5635
5635
|
Ac(a, c2, d2);
|
|
5636
|
-
if (0 === (K$2 & 2) || a !== Q$
|
|
5636
|
+
if (0 === (K$2 & 2) || a !== Q$1) a === Q$1 && (0 === (K$2 & 2) && (qk |= c2), 4 === T$2 && Ck(a, Z$1)), Dk(a, d2), 1 === c2 && 0 === K$2 && 0 === (b2.mode & 1) && (Gj = B$3() + 500, fg && jg());
|
|
5637
5637
|
}
|
|
5638
5638
|
function Dk(a, b2) {
|
|
5639
5639
|
var c2 = a.callbackNode;
|
|
5640
5640
|
wc(a, b2);
|
|
5641
|
-
var d2 = uc(a, a === Q$
|
|
5641
|
+
var d2 = uc(a, a === Q$1 ? Z$1 : 0);
|
|
5642
5642
|
if (0 === d2) null !== c2 && bc(c2), a.callbackNode = null, a.callbackPriority = 0;
|
|
5643
5643
|
else if (b2 = d2 & -d2, a.callbackPriority !== b2) {
|
|
5644
5644
|
null != c2 && bc(c2);
|
|
@@ -5674,7 +5674,7 @@ function Gk(a, b2) {
|
|
|
5674
5674
|
if (0 !== (K$2 & 6)) throw Error(p$2(327));
|
|
5675
5675
|
var c2 = a.callbackNode;
|
|
5676
5676
|
if (Hk() && a.callbackNode !== c2) return null;
|
|
5677
|
-
var d2 = uc(a, a === Q$
|
|
5677
|
+
var d2 = uc(a, a === Q$1 ? Z$1 : 0);
|
|
5678
5678
|
if (0 === d2) return null;
|
|
5679
5679
|
if (0 !== (d2 & 30) || 0 !== (d2 & a.expiredLanes) || b2) b2 = Ik(a, d2);
|
|
5680
5680
|
else {
|
|
@@ -5682,7 +5682,7 @@ function Gk(a, b2) {
|
|
|
5682
5682
|
var e = K$2;
|
|
5683
5683
|
K$2 |= 2;
|
|
5684
5684
|
var f2 = Jk();
|
|
5685
|
-
if (Q$
|
|
5685
|
+
if (Q$1 !== a || Z$1 !== b2) uk = null, Gj = B$3() + 500, Kk(a, b2);
|
|
5686
5686
|
do
|
|
5687
5687
|
try {
|
|
5688
5688
|
Lk();
|
|
@@ -5694,15 +5694,15 @@ function Gk(a, b2) {
|
|
|
5694
5694
|
$g();
|
|
5695
5695
|
mk.current = f2;
|
|
5696
5696
|
K$2 = e;
|
|
5697
|
-
null !== Y$2 ? b2 = 0 : (Q$
|
|
5697
|
+
null !== Y$2 ? b2 = 0 : (Q$1 = null, Z$1 = 0, b2 = T$2);
|
|
5698
5698
|
}
|
|
5699
5699
|
if (0 !== b2) {
|
|
5700
5700
|
2 === b2 && (e = xc(a), 0 !== e && (d2 = e, b2 = Nk(a, e)));
|
|
5701
|
-
if (1 === b2) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B$
|
|
5701
|
+
if (1 === b2) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B$3()), c2;
|
|
5702
5702
|
if (6 === b2) Ck(a, d2);
|
|
5703
5703
|
else {
|
|
5704
5704
|
e = a.current.alternate;
|
|
5705
|
-
if (0 === (d2 & 30) && !Ok(e) && (b2 = Ik(a, d2), 2 === b2 && (f2 = xc(a), 0 !== f2 && (d2 = f2, b2 = Nk(a, f2))), 1 === b2)) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B$
|
|
5705
|
+
if (0 === (d2 & 30) && !Ok(e) && (b2 = Ik(a, d2), 2 === b2 && (f2 = xc(a), 0 !== f2 && (d2 = f2, b2 = Nk(a, f2))), 1 === b2)) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B$3()), c2;
|
|
5706
5706
|
a.finishedWork = e;
|
|
5707
5707
|
a.finishedLanes = d2;
|
|
5708
5708
|
switch (b2) {
|
|
@@ -5714,7 +5714,7 @@ function Gk(a, b2) {
|
|
|
5714
5714
|
break;
|
|
5715
5715
|
case 3:
|
|
5716
5716
|
Ck(a, d2);
|
|
5717
|
-
if ((d2 & 130023424) === d2 && (b2 = fk + 500 - B$
|
|
5717
|
+
if ((d2 & 130023424) === d2 && (b2 = fk + 500 - B$3(), 10 < b2)) {
|
|
5718
5718
|
if (0 !== uc(a, 0)) break;
|
|
5719
5719
|
e = a.suspendedLanes;
|
|
5720
5720
|
if ((e & d2) !== d2) {
|
|
@@ -5739,7 +5739,7 @@ function Gk(a, b2) {
|
|
|
5739
5739
|
d2 &= ~f2;
|
|
5740
5740
|
}
|
|
5741
5741
|
d2 = e;
|
|
5742
|
-
d2 = B$
|
|
5742
|
+
d2 = B$3() - d2;
|
|
5743
5743
|
d2 = (120 > d2 ? 120 : 480 > d2 ? 480 : 1080 > d2 ? 1080 : 1920 > d2 ? 1920 : 3e3 > d2 ? 3e3 : 4320 > d2 ? 4320 : 1960 * lk(d2 / 1960)) - d2;
|
|
5744
5744
|
if (10 < d2) {
|
|
5745
5745
|
a.timeoutHandle = Ff(Pk.bind(null, a, tk, uk), d2);
|
|
@@ -5755,7 +5755,7 @@ function Gk(a, b2) {
|
|
|
5755
5755
|
}
|
|
5756
5756
|
}
|
|
5757
5757
|
}
|
|
5758
|
-
Dk(a, B$
|
|
5758
|
+
Dk(a, B$3());
|
|
5759
5759
|
return a.callbackNode === c2 ? Gk.bind(null, a) : null;
|
|
5760
5760
|
}
|
|
5761
5761
|
function Nk(a, b2) {
|
|
@@ -5811,18 +5811,18 @@ function Ek(a) {
|
|
|
5811
5811
|
if (0 !== (K$2 & 6)) throw Error(p$2(327));
|
|
5812
5812
|
Hk();
|
|
5813
5813
|
var b2 = uc(a, 0);
|
|
5814
|
-
if (0 === (b2 & 1)) return Dk(a, B$
|
|
5814
|
+
if (0 === (b2 & 1)) return Dk(a, B$3()), null;
|
|
5815
5815
|
var c2 = Ik(a, b2);
|
|
5816
5816
|
if (0 !== a.tag && 2 === c2) {
|
|
5817
5817
|
var d2 = xc(a);
|
|
5818
5818
|
0 !== d2 && (b2 = d2, c2 = Nk(a, d2));
|
|
5819
5819
|
}
|
|
5820
|
-
if (1 === c2) throw c2 = pk, Kk(a, 0), Ck(a, b2), Dk(a, B$
|
|
5820
|
+
if (1 === c2) throw c2 = pk, Kk(a, 0), Ck(a, b2), Dk(a, B$3()), c2;
|
|
5821
5821
|
if (6 === c2) throw Error(p$2(345));
|
|
5822
5822
|
a.finishedWork = a.current.alternate;
|
|
5823
5823
|
a.finishedLanes = b2;
|
|
5824
5824
|
Pk(a, tk, uk);
|
|
5825
|
-
Dk(a, B$
|
|
5825
|
+
Dk(a, B$3());
|
|
5826
5826
|
return null;
|
|
5827
5827
|
}
|
|
5828
5828
|
function Qk(a, b2) {
|
|
@@ -5831,7 +5831,7 @@ function Qk(a, b2) {
|
|
|
5831
5831
|
try {
|
|
5832
5832
|
return a(b2);
|
|
5833
5833
|
} finally {
|
|
5834
|
-
K$2 = c2, 0 === K$2 && (Gj = B$
|
|
5834
|
+
K$2 = c2, 0 === K$2 && (Gj = B$3() + 500, fg && jg());
|
|
5835
5835
|
}
|
|
5836
5836
|
}
|
|
5837
5837
|
function Rk(a) {
|
|
@@ -5875,10 +5875,10 @@ function Kk(a, b2) {
|
|
|
5875
5875
|
zh();
|
|
5876
5876
|
break;
|
|
5877
5877
|
case 13:
|
|
5878
|
-
E$1(L$
|
|
5878
|
+
E$1(L$2);
|
|
5879
5879
|
break;
|
|
5880
5880
|
case 19:
|
|
5881
|
-
E$1(L$
|
|
5881
|
+
E$1(L$2);
|
|
5882
5882
|
break;
|
|
5883
5883
|
case 10:
|
|
5884
5884
|
ah(d2.type._context);
|
|
@@ -5889,7 +5889,7 @@ function Kk(a, b2) {
|
|
|
5889
5889
|
}
|
|
5890
5890
|
c2 = c2.return;
|
|
5891
5891
|
}
|
|
5892
|
-
Q$
|
|
5892
|
+
Q$1 = a;
|
|
5893
5893
|
Y$2 = a = Pg(a.current, null);
|
|
5894
5894
|
Z$1 = fj = b2;
|
|
5895
5895
|
T$2 = 0;
|
|
@@ -5918,7 +5918,7 @@ function Mk(a, b2) {
|
|
|
5918
5918
|
$g();
|
|
5919
5919
|
Fh.current = Rh;
|
|
5920
5920
|
if (Ih) {
|
|
5921
|
-
for (var d2 = M$
|
|
5921
|
+
for (var d2 = M$1.memoizedState; null !== d2; ) {
|
|
5922
5922
|
var e = d2.queue;
|
|
5923
5923
|
null !== e && (e.pending = null);
|
|
5924
5924
|
d2 = d2.next;
|
|
@@ -5926,7 +5926,7 @@ function Mk(a, b2) {
|
|
|
5926
5926
|
Ih = false;
|
|
5927
5927
|
}
|
|
5928
5928
|
Hh = 0;
|
|
5929
|
-
O$1 = N$2 = M$
|
|
5929
|
+
O$1 = N$2 = M$1 = null;
|
|
5930
5930
|
Jh = false;
|
|
5931
5931
|
Kh = 0;
|
|
5932
5932
|
nk.current = null;
|
|
@@ -5968,7 +5968,7 @@ function Mk(a, b2) {
|
|
|
5968
5968
|
}
|
|
5969
5969
|
k2 = Error(p$2(426));
|
|
5970
5970
|
}
|
|
5971
|
-
} else if (I$
|
|
5971
|
+
} else if (I$1 && h2.mode & 1) {
|
|
5972
5972
|
var J2 = Ui(g2);
|
|
5973
5973
|
if (null !== J2) {
|
|
5974
5974
|
0 === (J2.flags & 65536) && (J2.flags |= 256);
|
|
@@ -6021,13 +6021,13 @@ function Jk() {
|
|
|
6021
6021
|
}
|
|
6022
6022
|
function tj() {
|
|
6023
6023
|
if (0 === T$2 || 3 === T$2 || 2 === T$2) T$2 = 4;
|
|
6024
|
-
null === Q$
|
|
6024
|
+
null === Q$1 || 0 === (rh & 268435455) && 0 === (qk & 268435455) || Ck(Q$1, Z$1);
|
|
6025
6025
|
}
|
|
6026
6026
|
function Ik(a, b2) {
|
|
6027
6027
|
var c2 = K$2;
|
|
6028
6028
|
K$2 |= 2;
|
|
6029
6029
|
var d2 = Jk();
|
|
6030
|
-
if (Q$
|
|
6030
|
+
if (Q$1 !== a || Z$1 !== b2) uk = null, Kk(a, b2);
|
|
6031
6031
|
do
|
|
6032
6032
|
try {
|
|
6033
6033
|
Tk();
|
|
@@ -6040,7 +6040,7 @@ function Ik(a, b2) {
|
|
|
6040
6040
|
K$2 = c2;
|
|
6041
6041
|
mk.current = d2;
|
|
6042
6042
|
if (null !== Y$2) throw Error(p$2(261));
|
|
6043
|
-
Q$
|
|
6043
|
+
Q$1 = null;
|
|
6044
6044
|
Z$1 = 0;
|
|
6045
6045
|
return T$2;
|
|
6046
6046
|
}
|
|
@@ -6113,7 +6113,7 @@ function Wk(a, b2, c2, d2) {
|
|
|
6113
6113
|
a.callbackPriority = 0;
|
|
6114
6114
|
var f2 = c2.lanes | c2.childLanes;
|
|
6115
6115
|
Bc(a, f2);
|
|
6116
|
-
a === Q$
|
|
6116
|
+
a === Q$1 && (Y$2 = Q$1 = null, Z$1 = 0);
|
|
6117
6117
|
0 === (c2.subtreeFlags & 2064) && 0 === (c2.flags & 2064) || vk || (vk = true, Fk(hc, function() {
|
|
6118
6118
|
Hk();
|
|
6119
6119
|
return null;
|
|
@@ -6143,7 +6143,7 @@ function Wk(a, b2, c2, d2) {
|
|
|
6143
6143
|
f2 = a.pendingLanes;
|
|
6144
6144
|
0 === f2 && (Ri = null);
|
|
6145
6145
|
mc(c2.stateNode);
|
|
6146
|
-
Dk(a, B$
|
|
6146
|
+
Dk(a, B$3());
|
|
6147
6147
|
if (null !== b2) for (d2 = a.onRecoverableError, c2 = 0; c2 < b2.length; c2++) e = b2[c2], d2(e.value, { componentStack: e.stack, digest: e.digest });
|
|
6148
6148
|
if (Oi) throw Oi = false, a = Pi, Pi = null, a;
|
|
6149
6149
|
0 !== (xk & 1) && 0 !== a.tag && Hk();
|
|
@@ -6310,7 +6310,7 @@ function Ti(a, b2, c2) {
|
|
|
6310
6310
|
null !== d2 && d2.delete(b2);
|
|
6311
6311
|
b2 = R$1();
|
|
6312
6312
|
a.pingedLanes |= a.suspendedLanes & c2;
|
|
6313
|
-
Q$
|
|
6313
|
+
Q$1 === a && (Z$1 & c2) === c2 && (4 === T$2 || 3 === T$2 && (Z$1 & 130023424) === Z$1 && 500 > B$3() - fk ? Kk(a, 0) : rk |= c2);
|
|
6314
6314
|
Dk(a, b2);
|
|
6315
6315
|
}
|
|
6316
6316
|
function Yk(a, b2) {
|
|
@@ -6348,7 +6348,7 @@ Vk = function(a, b2, c2) {
|
|
|
6348
6348
|
if (0 === (a.lanes & c2) && 0 === (b2.flags & 128)) return dh = false, yj(a, b2, c2);
|
|
6349
6349
|
dh = 0 !== (a.flags & 131072) ? true : false;
|
|
6350
6350
|
}
|
|
6351
|
-
else dh = false, I$
|
|
6351
|
+
else dh = false, I$1 && 0 !== (b2.flags & 1048576) && ug(b2, ng, b2.index);
|
|
6352
6352
|
b2.lanes = 0;
|
|
6353
6353
|
switch (b2.tag) {
|
|
6354
6354
|
case 2:
|
|
@@ -6360,7 +6360,7 @@ Vk = function(a, b2, c2) {
|
|
|
6360
6360
|
e = Nh(null, b2, d2, a, e, c2);
|
|
6361
6361
|
var f2 = Sh();
|
|
6362
6362
|
b2.flags |= 1;
|
|
6363
|
-
"object" === typeof e && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ? (b2.tag = 1, b2.memoizedState = null, b2.updateQueue = null, Zf(d2) ? (f2 = true, cg(b2)) : f2 = false, b2.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null, kh(b2), e.updater = Ei, b2.stateNode = e, e._reactInternals = b2, Ii(b2, d2, a, c2), b2 = jj(null, b2, d2, true, f2, c2)) : (b2.tag = 0, I$
|
|
6363
|
+
"object" === typeof e && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ? (b2.tag = 1, b2.memoizedState = null, b2.updateQueue = null, Zf(d2) ? (f2 = true, cg(b2)) : f2 = false, b2.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null, kh(b2), e.updater = Ei, b2.stateNode = e, e._reactInternals = b2, Ii(b2, d2, a, c2), b2 = jj(null, b2, d2, true, f2, c2)) : (b2.tag = 0, I$1 && f2 && vg(b2), Xi(null, b2, e, c2), b2 = b2.child);
|
|
6364
6364
|
return b2;
|
|
6365
6365
|
case 16:
|
|
6366
6366
|
d2 = b2.elementType;
|
|
@@ -6416,7 +6416,7 @@ Vk = function(a, b2, c2) {
|
|
|
6416
6416
|
e = Ji(Error(p$2(424)), b2);
|
|
6417
6417
|
b2 = lj(a, b2, d2, c2, e);
|
|
6418
6418
|
break a;
|
|
6419
|
-
} else for (yg = Lf(b2.stateNode.containerInfo.firstChild), xg = b2, I$
|
|
6419
|
+
} else for (yg = Lf(b2.stateNode.containerInfo.firstChild), xg = b2, I$1 = true, zg = null, c2 = Vg(b2, null, d2, c2), b2.child = c2; c2; ) c2.flags = c2.flags & -3 | 4096, c2 = c2.sibling;
|
|
6420
6420
|
else {
|
|
6421
6421
|
Ig();
|
|
6422
6422
|
if (d2 === e) {
|
|
@@ -6450,7 +6450,7 @@ Vk = function(a, b2, c2) {
|
|
|
6450
6450
|
e = b2.pendingProps;
|
|
6451
6451
|
f2 = b2.memoizedProps;
|
|
6452
6452
|
g2 = e.value;
|
|
6453
|
-
G$
|
|
6453
|
+
G$1(Wg, d2._currentValue);
|
|
6454
6454
|
d2._currentValue = g2;
|
|
6455
6455
|
if (null !== f2) if (He(f2.value, g2)) {
|
|
6456
6456
|
if (f2.children === e.children && !Wf.current) {
|
|
@@ -6854,7 +6854,7 @@ Ec = function(a) {
|
|
|
6854
6854
|
var b2 = a.stateNode;
|
|
6855
6855
|
if (b2.current.memoizedState.isDehydrated) {
|
|
6856
6856
|
var c2 = tc(b2.pendingLanes);
|
|
6857
|
-
0 !== c2 && (Cc(b2, c2 | 1), Dk(b2, B$
|
|
6857
|
+
0 !== c2 && (Cc(b2, c2 | 1), Dk(b2, B$3()), 0 === (K$2 & 6) && (Gj = B$3() + 500, jg()));
|
|
6858
6858
|
}
|
|
6859
6859
|
break;
|
|
6860
6860
|
case 13:
|
|
@@ -7066,7 +7066,7 @@ function g(t2) {
|
|
|
7066
7066
|
e.removeEventListener("animationend", t4), l2 ? f(e, m2, c2) : m2();
|
|
7067
7067
|
};
|
|
7068
7068
|
y2 || (p2 ? t4() : (E2.current = 1, e.className += ` ${T2}`, e.addEventListener("animationend", t4)));
|
|
7069
|
-
}, [y2]), React$
|
|
7069
|
+
}, [y2]), React$1.createElement(React$1.Fragment, null, d2);
|
|
7070
7070
|
};
|
|
7071
7071
|
}
|
|
7072
7072
|
function y(e, t2) {
|
|
@@ -7075,7 +7075,7 @@ function y(e, t2) {
|
|
|
7075
7075
|
const v = /* @__PURE__ */ new Map();
|
|
7076
7076
|
let h = [];
|
|
7077
7077
|
const T$1 = /* @__PURE__ */ new Set(), E = (e) => T$1.forEach((t2) => t2(e)), b = () => v.size > 0;
|
|
7078
|
-
function I
|
|
7078
|
+
function I(e, t2) {
|
|
7079
7079
|
var n2;
|
|
7080
7080
|
if (t2) return !(null == (n2 = v.get(t2)) || !n2.isToastActive(e));
|
|
7081
7081
|
let o = false;
|
|
@@ -7093,7 +7093,7 @@ function C(e, t2) {
|
|
|
7093
7093
|
null != t2 && null != t2 && t2.containerId ? (null == t2 ? void 0 : t2.containerId) === n2.id && n2.toggle(e, null == t2 ? void 0 : t2.id) : n2.toggle(e, null == t2 ? void 0 : t2.id);
|
|
7094
7094
|
});
|
|
7095
7095
|
}
|
|
7096
|
-
function L(e) {
|
|
7096
|
+
function L$1(e) {
|
|
7097
7097
|
const { subscribe: o, getSnapshot: s, setProps: i } = reactExports.useRef(function(e2) {
|
|
7098
7098
|
const n2 = e2.containerId || 1;
|
|
7099
7099
|
return { subscribe(o2) {
|
|
@@ -7166,7 +7166,7 @@ function L(e) {
|
|
|
7166
7166
|
const { position: t3 } = e2.props;
|
|
7167
7167
|
n2.has(t3) || n2.set(t3, []), n2.get(t3).push(e2);
|
|
7168
7168
|
}), Array.from(n2, (e2) => t2(e2[0], e2[1]));
|
|
7169
|
-
}, isToastActive: I
|
|
7169
|
+
}, isToastActive: I, count: null == l2 ? void 0 : l2.length };
|
|
7170
7170
|
}
|
|
7171
7171
|
function N$1(e) {
|
|
7172
7172
|
const [t2, o] = reactExports.useState(false), [a, r2] = reactExports.useState(false), l2 = reactExports.useRef(null), c2 = reactExports.useRef({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: true, canDrag: false, didMove: false }).current, { autoClose: d2, pauseOnHover: u2, closeToast: p2, onClick: m2, closeOnClick: f2 } = e;
|
|
@@ -7215,35 +7215,35 @@ function $$1(t2) {
|
|
|
7215
7215
|
const h2 = clsx("Toastify__progress-bar", d2 ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${g2}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": m2 }), T2 = u$1(i) ? i({ rtl: m2, type: a, defaultClassName: h2 }) : clsx(h2, i), E2 = { [d2 && p2 >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: d2 && p2 < 1 ? null : () => {
|
|
7216
7216
|
f2 && s();
|
|
7217
7217
|
} };
|
|
7218
|
-
return React$
|
|
7218
|
+
return React$1.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": y2 }, React$1.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${g2} Toastify__progress-bar--${a}` }), React$1.createElement("div", { role: "progressbar", "aria-hidden": y2 ? "true" : "false", "aria-label": "notification timer", className: T2, style: v2, ...E2 }));
|
|
7219
7219
|
}
|
|
7220
7220
|
let w = 1;
|
|
7221
7221
|
const k$2 = () => "" + w++;
|
|
7222
|
-
function P(e) {
|
|
7222
|
+
function P$1(e) {
|
|
7223
7223
|
return e && (d(e.toastId) || c(e.toastId)) ? e.toastId : k$2();
|
|
7224
7224
|
}
|
|
7225
|
-
function M
|
|
7225
|
+
function M(e, t2) {
|
|
7226
7226
|
return _(e, t2), t2.toastId;
|
|
7227
7227
|
}
|
|
7228
7228
|
function x(e, t2) {
|
|
7229
|
-
return { ...t2, type: t2 && t2.type || e, toastId: P(t2) };
|
|
7229
|
+
return { ...t2, type: t2 && t2.type || e, toastId: P$1(t2) };
|
|
7230
7230
|
}
|
|
7231
7231
|
function A(e) {
|
|
7232
|
-
return (t2, n2) => M
|
|
7232
|
+
return (t2, n2) => M(t2, x(e, n2));
|
|
7233
7233
|
}
|
|
7234
|
-
function B$
|
|
7235
|
-
return M
|
|
7234
|
+
function B$2(e, t2) {
|
|
7235
|
+
return M(e, x("default", t2));
|
|
7236
7236
|
}
|
|
7237
|
-
B$
|
|
7237
|
+
B$2.loading = (e, t2) => M(e, x("default", { isLoading: true, autoClose: false, closeOnClick: false, closeButton: false, draggable: false, ...t2 })), B$2.promise = function(e, t2, n2) {
|
|
7238
7238
|
let o, { pending: s, error: a, success: r2 } = t2;
|
|
7239
|
-
s && (o = d(s) ? B$
|
|
7239
|
+
s && (o = d(s) ? B$2.loading(s, n2) : B$2.loading(s.render, { ...n2, ...s }));
|
|
7240
7240
|
const i = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, l2 = (e2, t3, s2) => {
|
|
7241
|
-
if (null == t3) return void B$
|
|
7241
|
+
if (null == t3) return void B$2.dismiss(o);
|
|
7242
7242
|
const a2 = { type: e2, ...i, ...n2, data: s2 }, r3 = d(t3) ? { render: t3 } : t3;
|
|
7243
|
-
return o ? B$
|
|
7243
|
+
return o ? B$2.update(o, { ...a2, ...r3 }) : B$2(r3.render, { ...a2, ...r3 }), s2;
|
|
7244
7244
|
}, c2 = u$1(e) ? e() : e;
|
|
7245
7245
|
return c2.then((e2) => l2("success", r2, e2)).catch((e2) => l2("error", a, e2)), c2;
|
|
7246
|
-
}, B$
|
|
7246
|
+
}, B$2.success = A("success"), B$2.info = A("info"), B$2.error = A("error"), B$2.warning = A("warning"), B$2.warn = B$2.warning, B$2.dark = (e, t2) => M(e, x("default", { theme: "dark", ...t2 })), B$2.dismiss = function(e) {
|
|
7247
7247
|
!function(e2) {
|
|
7248
7248
|
var t2;
|
|
7249
7249
|
if (b()) {
|
|
@@ -7258,11 +7258,11 @@ B$1.loading = (e, t2) => M$1(e, x("default", { isLoading: true, autoClose: false
|
|
|
7258
7258
|
}
|
|
7259
7259
|
} else h = h.filter((t3) => null != e2 && t3.options.toastId !== e2);
|
|
7260
7260
|
}(e);
|
|
7261
|
-
}, B$
|
|
7261
|
+
}, B$2.clearWaitingQueue = function(e) {
|
|
7262
7262
|
void 0 === e && (e = {}), v.forEach((t2) => {
|
|
7263
7263
|
!t2.props.limit || e.containerId && t2.id !== e.containerId || t2.clearQueue();
|
|
7264
7264
|
});
|
|
7265
|
-
}, B$
|
|
7265
|
+
}, B$2.isActive = I, B$2.update = function(e, t2) {
|
|
7266
7266
|
void 0 === t2 && (t2 = {});
|
|
7267
7267
|
const n2 = ((e2, t3) => {
|
|
7268
7268
|
var n3;
|
|
@@ -7273,28 +7273,28 @@ B$1.loading = (e, t2) => M$1(e, x("default", { isLoading: true, autoClose: false
|
|
|
7273
7273
|
const { props: o, content: s } = n2, a = { delay: 100, ...o, ...t2, toastId: t2.toastId || e, updateId: k$2() };
|
|
7274
7274
|
a.toastId !== e && (a.staleId = e);
|
|
7275
7275
|
const r2 = a.render || s;
|
|
7276
|
-
delete a.render, M
|
|
7276
|
+
delete a.render, M(r2, a);
|
|
7277
7277
|
}
|
|
7278
|
-
}, B$
|
|
7279
|
-
B$
|
|
7280
|
-
}, B$
|
|
7278
|
+
}, B$2.done = (e) => {
|
|
7279
|
+
B$2.update(e, { progress: 1 });
|
|
7280
|
+
}, B$2.onChange = function(e) {
|
|
7281
7281
|
return T$1.add(e), () => {
|
|
7282
7282
|
T$1.delete(e);
|
|
7283
7283
|
};
|
|
7284
|
-
}, B$
|
|
7284
|
+
}, B$2.play = (e) => C(true, e), B$2.pause = (e) => C(false, e);
|
|
7285
7285
|
const O = "undefined" != typeof window ? reactExports.useLayoutEffect : reactExports.useEffect, D$1 = (t2) => {
|
|
7286
7286
|
let { theme: n2, type: o, isLoading: s, ...a } = t2;
|
|
7287
|
-
return React$
|
|
7287
|
+
return React$1.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: "colored" === n2 ? "currentColor" : `var(--toastify-icon-color-${o})`, ...a });
|
|
7288
7288
|
}, z$1 = { info: function(t2) {
|
|
7289
|
-
return React$
|
|
7289
|
+
return React$1.createElement(D$1, { ...t2 }, React$1.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
|
|
7290
7290
|
}, warning: function(t2) {
|
|
7291
|
-
return React$
|
|
7291
|
+
return React$1.createElement(D$1, { ...t2 }, React$1.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
|
|
7292
7292
|
}, success: function(t2) {
|
|
7293
|
-
return React$
|
|
7293
|
+
return React$1.createElement(D$1, { ...t2 }, React$1.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
|
|
7294
7294
|
}, error: function(t2) {
|
|
7295
|
-
return React$
|
|
7295
|
+
return React$1.createElement(D$1, { ...t2 }, React$1.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
|
|
7296
7296
|
}, spinner: function() {
|
|
7297
|
-
return React$
|
|
7297
|
+
return React$1.createElement("div", { className: "Toastify__spinner" });
|
|
7298
7298
|
} }, R = (n2) => {
|
|
7299
7299
|
const { isRunning: o, preventExitTransition: s, toastRef: r2, eventHandlers: i, playToast: c2 } = N$1(n2), { closeButton: d2, children: p2, autoClose: m2, onClick: f2, type: g2, hideProgressBar: y2, closeToast: v2, transition: h2, position: T2, className: E2, style: b2, bodyClassName: I2, bodyStyle: _2, progressClassName: C2, progressStyle: L2, updateId: w2, role: k2, progress: P2, rtl: M2, toastId: x2, deleteToast: A2, isIn: B2, isLoading: O2, closeOnClick: D2, theme: R2 } = n2, S2 = clsx("Toastify__toast", `Toastify__toast-theme--${R2}`, `Toastify__toast--${g2}`, { "Toastify__toast--rtl": M2 }, { "Toastify__toast--close-on-click": D2 }), H2 = u$1(E2) ? E2({ rtl: M2, position: T2, type: g2, defaultClassName: S2 }) : clsx(S2, E2), F2 = function(e) {
|
|
7300
7300
|
let { theme: n3, type: o2, isLoading: s2, icon: r3 } = e, i2 = null;
|
|
@@ -7304,10 +7304,10 @@ const O = "undefined" != typeof window ? reactExports.useLayoutEffect : reactExp
|
|
|
7304
7304
|
let q2 = null;
|
|
7305
7305
|
return false === d2 || (q2 = u$1(d2) ? d2(Y2) : reactExports.isValidElement(d2) ? reactExports.cloneElement(d2, Y2) : function(t2) {
|
|
7306
7306
|
let { closeToast: n3, theme: o2, ariaLabel: s2 = "close" } = t2;
|
|
7307
|
-
return React$
|
|
7307
|
+
return React$1.createElement("button", { className: `Toastify__close-button Toastify__close-button--${o2}`, type: "button", onClick: (e) => {
|
|
7308
7308
|
e.stopPropagation(), n3(e);
|
|
7309
|
-
}, "aria-label": s2 }, React$
|
|
7310
|
-
}(Y2)), React$
|
|
7309
|
+
}, "aria-label": s2 }, React$1.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, React$1.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
|
|
7310
|
+
}(Y2)), React$1.createElement(h2, { isIn: B2, done: A2, position: T2, preventExitTransition: s, nodeRef: r2, playToast: c2 }, React$1.createElement("div", { id: x2, onClick: f2, "data-in": B2, className: H2, ...i, style: b2, ref: r2 }, React$1.createElement("div", { ...B2 && { role: k2 }, className: u$1(I2) ? I2({ type: g2 }) : clsx("Toastify__toast-body", I2), style: _2 }, null != F2 && React$1.createElement("div", { className: clsx("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !O2 }) }, F2), React$1.createElement("div", null, p2)), q2, React$1.createElement($$1, { ...w2 && !X2 ? { key: `pb-${w2}` } : {}, rtl: M2, theme: R2, delay: m2, isRunning: o, isIn: B2, closeToast: v2, hide: y2, type: g2, style: L2, className: C2, controlledProgress: X2, progress: P2 || 0 })));
|
|
7311
7311
|
}, S = function(e, t2) {
|
|
7312
7312
|
return void 0 === t2 && (t2 = false), { enter: `Toastify--animate Toastify__${e}-enter`, exit: `Toastify--animate Toastify__${e}-exit`, appendPosition: t2 };
|
|
7313
7313
|
}, H$1 = g(S("bounce", true));
|
|
@@ -7315,15 +7315,15 @@ g(S("slide", true));
|
|
|
7315
7315
|
g(S("zoom"));
|
|
7316
7316
|
g(S("flip"));
|
|
7317
7317
|
const q = { position: "top-right", transition: H$1, autoClose: 5e3, closeButton: true, pauseOnHover: true, pauseOnFocusLoss: true, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light" };
|
|
7318
|
-
function Q
|
|
7318
|
+
function Q(t2) {
|
|
7319
7319
|
let o = { ...q, ...t2 };
|
|
7320
|
-
const s = t2.stacked, [a, r2] = reactExports.useState(true), c2 = reactExports.useRef(null), { getToastToRender: d2, isToastActive: m2, count: f2 } = L(o), { className: g2, style: y2, rtl: v2, containerId: h2 } = o;
|
|
7320
|
+
const s = t2.stacked, [a, r2] = reactExports.useState(true), c2 = reactExports.useRef(null), { getToastToRender: d2, isToastActive: m2, count: f2 } = L$1(o), { className: g2, style: y2, rtl: v2, containerId: h2 } = o;
|
|
7321
7321
|
function T2(e) {
|
|
7322
7322
|
const t3 = clsx("Toastify__toast-container", `Toastify__toast-container--${e}`, { "Toastify__toast-container--rtl": v2 });
|
|
7323
7323
|
return u$1(g2) ? g2({ position: e, rtl: v2, defaultClassName: t3 }) : clsx(t3, p$1(g2));
|
|
7324
7324
|
}
|
|
7325
7325
|
function E2() {
|
|
7326
|
-
s && (r2(true), B$
|
|
7326
|
+
s && (r2(true), B$2.play());
|
|
7327
7327
|
}
|
|
7328
7328
|
return O(() => {
|
|
7329
7329
|
if (s) {
|
|
@@ -7337,13 +7337,13 @@ function Q$1(t2) {
|
|
|
7337
7337
|
o2.style.setProperty("--y", `${s2 ? l2 : -1 * l2}px`), o2.style.setProperty("--g", `${n2}`), o2.style.setProperty("--s", "" + (1 - (a ? i : 0))), r3 += o2.offsetHeight, i += 0.025;
|
|
7338
7338
|
});
|
|
7339
7339
|
}
|
|
7340
|
-
}, [a, f2, s]), React$
|
|
7341
|
-
s && (r2(false), B$
|
|
7340
|
+
}, [a, f2, s]), React$1.createElement("div", { ref: c2, className: "Toastify", id: h2, onMouseEnter: () => {
|
|
7341
|
+
s && (r2(false), B$2.pause());
|
|
7342
7342
|
}, onMouseLeave: E2 }, d2((t3, n2) => {
|
|
7343
7343
|
const o2 = n2.length ? { ...y2 } : { ...y2, pointerEvents: "none" };
|
|
7344
|
-
return React$
|
|
7344
|
+
return React$1.createElement("div", { className: T2(t3), style: o2, key: `container-${t3}` }, n2.map((t4) => {
|
|
7345
7345
|
let { content: n3, props: o3 } = t4;
|
|
7346
|
-
return React$
|
|
7346
|
+
return React$1.createElement(R, { ...o3, stacked: s, collapseAll: E2, isIn: m2(o3.toastId, o3.containerId), style: o3.style, key: `toast-${o3.key}` }, n3);
|
|
7347
7347
|
}));
|
|
7348
7348
|
}));
|
|
7349
7349
|
}
|
|
@@ -7929,12 +7929,12 @@ const handleResult = (ctx, result) => {
|
|
|
7929
7929
|
function processCreateParams(params2) {
|
|
7930
7930
|
if (!params2)
|
|
7931
7931
|
return {};
|
|
7932
|
-
const { errorMap: errorMap2, invalid_type_error, required_error, description } = params2;
|
|
7932
|
+
const { errorMap: errorMap2, invalid_type_error, required_error, description: description2 } = params2;
|
|
7933
7933
|
if (errorMap2 && (invalid_type_error || required_error)) {
|
|
7934
7934
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
7935
7935
|
}
|
|
7936
7936
|
if (errorMap2)
|
|
7937
|
-
return { errorMap: errorMap2, description };
|
|
7937
|
+
return { errorMap: errorMap2, description: description2 };
|
|
7938
7938
|
const customMap = (iss, ctx) => {
|
|
7939
7939
|
var _a, _b;
|
|
7940
7940
|
const { message } = params2;
|
|
@@ -7948,7 +7948,7 @@ function processCreateParams(params2) {
|
|
|
7948
7948
|
return { message: ctx.defaultError };
|
|
7949
7949
|
return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
|
|
7950
7950
|
};
|
|
7951
|
-
return { errorMap: customMap, description };
|
|
7951
|
+
return { errorMap: customMap, description: description2 };
|
|
7952
7952
|
}
|
|
7953
7953
|
class ZodType {
|
|
7954
7954
|
get description() {
|
|
@@ -8215,11 +8215,11 @@ class ZodType {
|
|
|
8215
8215
|
typeName: ZodFirstPartyTypeKind.ZodCatch
|
|
8216
8216
|
});
|
|
8217
8217
|
}
|
|
8218
|
-
describe(
|
|
8218
|
+
describe(description2) {
|
|
8219
8219
|
const This = this.constructor;
|
|
8220
8220
|
return new This({
|
|
8221
8221
|
...this._def,
|
|
8222
|
-
description
|
|
8222
|
+
description: description2
|
|
8223
8223
|
});
|
|
8224
8224
|
}
|
|
8225
8225
|
pipe(target) {
|
|
@@ -10091,33 +10091,33 @@ ZodUnion.create = (types, params2) => {
|
|
|
10091
10091
|
...processCreateParams(params2)
|
|
10092
10092
|
});
|
|
10093
10093
|
};
|
|
10094
|
-
const getDiscriminator = (
|
|
10095
|
-
if (
|
|
10096
|
-
return getDiscriminator(
|
|
10097
|
-
} else if (
|
|
10098
|
-
return getDiscriminator(
|
|
10099
|
-
} else if (
|
|
10100
|
-
return [
|
|
10101
|
-
} else if (
|
|
10102
|
-
return
|
|
10103
|
-
} else if (
|
|
10104
|
-
return util.objectValues(
|
|
10105
|
-
} else if (
|
|
10106
|
-
return getDiscriminator(
|
|
10107
|
-
} else if (
|
|
10094
|
+
const getDiscriminator = (type2) => {
|
|
10095
|
+
if (type2 instanceof ZodLazy) {
|
|
10096
|
+
return getDiscriminator(type2.schema);
|
|
10097
|
+
} else if (type2 instanceof ZodEffects) {
|
|
10098
|
+
return getDiscriminator(type2.innerType());
|
|
10099
|
+
} else if (type2 instanceof ZodLiteral) {
|
|
10100
|
+
return [type2.value];
|
|
10101
|
+
} else if (type2 instanceof ZodEnum) {
|
|
10102
|
+
return type2.options;
|
|
10103
|
+
} else if (type2 instanceof ZodNativeEnum) {
|
|
10104
|
+
return util.objectValues(type2.enum);
|
|
10105
|
+
} else if (type2 instanceof ZodDefault) {
|
|
10106
|
+
return getDiscriminator(type2._def.innerType);
|
|
10107
|
+
} else if (type2 instanceof ZodUndefined) {
|
|
10108
10108
|
return [void 0];
|
|
10109
|
-
} else if (
|
|
10109
|
+
} else if (type2 instanceof ZodNull) {
|
|
10110
10110
|
return [null];
|
|
10111
|
-
} else if (
|
|
10112
|
-
return [void 0, ...getDiscriminator(
|
|
10113
|
-
} else if (
|
|
10114
|
-
return [null, ...getDiscriminator(
|
|
10115
|
-
} else if (
|
|
10116
|
-
return getDiscriminator(
|
|
10117
|
-
} else if (
|
|
10118
|
-
return getDiscriminator(
|
|
10119
|
-
} else if (
|
|
10120
|
-
return getDiscriminator(
|
|
10111
|
+
} else if (type2 instanceof ZodOptional) {
|
|
10112
|
+
return [void 0, ...getDiscriminator(type2.unwrap())];
|
|
10113
|
+
} else if (type2 instanceof ZodNullable) {
|
|
10114
|
+
return [null, ...getDiscriminator(type2.unwrap())];
|
|
10115
|
+
} else if (type2 instanceof ZodBranded) {
|
|
10116
|
+
return getDiscriminator(type2.unwrap());
|
|
10117
|
+
} else if (type2 instanceof ZodReadonly) {
|
|
10118
|
+
return getDiscriminator(type2.unwrap());
|
|
10119
|
+
} else if (type2 instanceof ZodCatch) {
|
|
10120
|
+
return getDiscriminator(type2._def.innerType);
|
|
10121
10121
|
} else {
|
|
10122
10122
|
return [];
|
|
10123
10123
|
}
|
|
@@ -10177,8 +10177,8 @@ class ZodDiscriminatedUnion extends ZodType {
|
|
|
10177
10177
|
*/
|
|
10178
10178
|
static create(discriminator, options, params2) {
|
|
10179
10179
|
const optionsMap = /* @__PURE__ */ new Map();
|
|
10180
|
-
for (const
|
|
10181
|
-
const discriminatorValues = getDiscriminator(
|
|
10180
|
+
for (const type2 of options) {
|
|
10181
|
+
const discriminatorValues = getDiscriminator(type2.shape[discriminator]);
|
|
10182
10182
|
if (!discriminatorValues.length) {
|
|
10183
10183
|
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
|
10184
10184
|
}
|
|
@@ -10186,7 +10186,7 @@ class ZodDiscriminatedUnion extends ZodType {
|
|
|
10186
10186
|
if (optionsMap.has(value)) {
|
|
10187
10187
|
throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
|
|
10188
10188
|
}
|
|
10189
|
-
optionsMap.set(value,
|
|
10189
|
+
optionsMap.set(value, type2);
|
|
10190
10190
|
}
|
|
10191
10191
|
}
|
|
10192
10192
|
return new ZodDiscriminatedUnion({
|
|
@@ -11014,9 +11014,9 @@ class ZodOptional extends ZodType {
|
|
|
11014
11014
|
return this._def.innerType;
|
|
11015
11015
|
}
|
|
11016
11016
|
}
|
|
11017
|
-
ZodOptional.create = (
|
|
11017
|
+
ZodOptional.create = (type2, params2) => {
|
|
11018
11018
|
return new ZodOptional({
|
|
11019
|
-
innerType:
|
|
11019
|
+
innerType: type2,
|
|
11020
11020
|
typeName: ZodFirstPartyTypeKind.ZodOptional,
|
|
11021
11021
|
...processCreateParams(params2)
|
|
11022
11022
|
});
|
|
@@ -11033,9 +11033,9 @@ class ZodNullable extends ZodType {
|
|
|
11033
11033
|
return this._def.innerType;
|
|
11034
11034
|
}
|
|
11035
11035
|
}
|
|
11036
|
-
ZodNullable.create = (
|
|
11036
|
+
ZodNullable.create = (type2, params2) => {
|
|
11037
11037
|
return new ZodNullable({
|
|
11038
|
-
innerType:
|
|
11038
|
+
innerType: type2,
|
|
11039
11039
|
typeName: ZodFirstPartyTypeKind.ZodNullable,
|
|
11040
11040
|
...processCreateParams(params2)
|
|
11041
11041
|
});
|
|
@@ -11057,9 +11057,9 @@ class ZodDefault extends ZodType {
|
|
|
11057
11057
|
return this._def.innerType;
|
|
11058
11058
|
}
|
|
11059
11059
|
}
|
|
11060
|
-
ZodDefault.create = (
|
|
11060
|
+
ZodDefault.create = (type2, params2) => {
|
|
11061
11061
|
return new ZodDefault({
|
|
11062
|
-
innerType:
|
|
11062
|
+
innerType: type2,
|
|
11063
11063
|
typeName: ZodFirstPartyTypeKind.ZodDefault,
|
|
11064
11064
|
defaultValue: typeof params2.default === "function" ? params2.default : () => params2.default,
|
|
11065
11065
|
...processCreateParams(params2)
|
|
@@ -11110,9 +11110,9 @@ class ZodCatch extends ZodType {
|
|
|
11110
11110
|
return this._def.innerType;
|
|
11111
11111
|
}
|
|
11112
11112
|
}
|
|
11113
|
-
ZodCatch.create = (
|
|
11113
|
+
ZodCatch.create = (type2, params2) => {
|
|
11114
11114
|
return new ZodCatch({
|
|
11115
|
-
innerType:
|
|
11115
|
+
innerType: type2,
|
|
11116
11116
|
typeName: ZodFirstPartyTypeKind.ZodCatch,
|
|
11117
11117
|
catchValue: typeof params2.catch === "function" ? params2.catch : () => params2.catch,
|
|
11118
11118
|
...processCreateParams(params2)
|
|
@@ -11224,9 +11224,9 @@ class ZodReadonly extends ZodType {
|
|
|
11224
11224
|
return this._def.innerType;
|
|
11225
11225
|
}
|
|
11226
11226
|
}
|
|
11227
|
-
ZodReadonly.create = (
|
|
11227
|
+
ZodReadonly.create = (type2, params2) => {
|
|
11228
11228
|
return new ZodReadonly({
|
|
11229
|
-
innerType:
|
|
11229
|
+
innerType: type2,
|
|
11230
11230
|
typeName: ZodFirstPartyTypeKind.ZodReadonly,
|
|
11231
11231
|
...processCreateParams(params2)
|
|
11232
11232
|
});
|
|
@@ -12151,7 +12151,7 @@ z.union([
|
|
|
12151
12151
|
CreateMessageRequestSchema,
|
|
12152
12152
|
ListRootsRequestSchema
|
|
12153
12153
|
]);
|
|
12154
|
-
z.union([
|
|
12154
|
+
const ServerNotificationSchema = z.union([
|
|
12155
12155
|
CancelledNotificationSchema,
|
|
12156
12156
|
ProgressNotificationSchema,
|
|
12157
12157
|
LoggingMessageNotificationSchema,
|
|
@@ -12282,7 +12282,7 @@ class Protocol {
|
|
|
12282
12282
|
Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
|
|
12283
12283
|
}
|
|
12284
12284
|
_onrequest(request) {
|
|
12285
|
-
var _a, _b;
|
|
12285
|
+
var _a, _b, _c;
|
|
12286
12286
|
const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== void 0 ? _a : this.fallbackRequestHandler;
|
|
12287
12287
|
if (handler === void 0) {
|
|
12288
12288
|
(_b = this._transport) === null || _b === void 0 ? void 0 : _b.send({
|
|
@@ -12297,7 +12297,11 @@ class Protocol {
|
|
|
12297
12297
|
}
|
|
12298
12298
|
const abortController = new AbortController();
|
|
12299
12299
|
this._requestHandlerAbortControllers.set(request.id, abortController);
|
|
12300
|
-
|
|
12300
|
+
const extra = {
|
|
12301
|
+
signal: abortController.signal,
|
|
12302
|
+
sessionId: (_c = this._transport) === null || _c === void 0 ? void 0 : _c.sessionId
|
|
12303
|
+
};
|
|
12304
|
+
Promise.resolve().then(() => handler(request, extra)).then((result) => {
|
|
12301
12305
|
var _a2;
|
|
12302
12306
|
if (abortController.signal.aborted) {
|
|
12303
12307
|
return;
|
|
@@ -12579,7 +12583,7 @@ class Client extends Protocol {
|
|
|
12579
12583
|
return this._instructions;
|
|
12580
12584
|
}
|
|
12581
12585
|
assertCapabilityForMethod(method) {
|
|
12582
|
-
var _a, _b, _c, _d,
|
|
12586
|
+
var _a, _b, _c, _d, _e2;
|
|
12583
12587
|
switch (method) {
|
|
12584
12588
|
case "logging/setLevel":
|
|
12585
12589
|
if (!((_a = this._serverCapabilities) === null || _a === void 0 ? void 0 : _a.logging)) {
|
|
@@ -12611,7 +12615,7 @@ class Client extends Protocol {
|
|
|
12611
12615
|
}
|
|
12612
12616
|
break;
|
|
12613
12617
|
case "completion/complete":
|
|
12614
|
-
if (!((
|
|
12618
|
+
if (!((_e2 = this._serverCapabilities) === null || _e2 === void 0 ? void 0 : _e2.prompts)) {
|
|
12615
12619
|
throw new Error(`Server does not support prompts (required for ${method})`);
|
|
12616
12620
|
}
|
|
12617
12621
|
break;
|
|
@@ -12781,9 +12785,9 @@ class ErrorEvent extends Event {
|
|
|
12781
12785
|
* @param type - The type of the event (should be "error")
|
|
12782
12786
|
* @param errorEventInitDict - Optional properties to include in the error event
|
|
12783
12787
|
*/
|
|
12784
|
-
constructor(
|
|
12788
|
+
constructor(type2, errorEventInitDict) {
|
|
12785
12789
|
var _a, _b;
|
|
12786
|
-
super(
|
|
12790
|
+
super(type2), this.code = (_a = errorEventInitDict == null ? void 0 : errorEventInitDict.code) != null ? _a : void 0, this.message = (_b = errorEventInitDict == null ? void 0 : errorEventInitDict.message) != null ? _b : void 0;
|
|
12787
12791
|
}
|
|
12788
12792
|
/**
|
|
12789
12793
|
* Node.js "hides" the `message` and `code` properties of the `ErrorEvent` instance,
|
|
@@ -12950,13 +12954,13 @@ class EventSource extends EventTarget {
|
|
|
12950
12954
|
set onopen(value) {
|
|
12951
12955
|
__privateSet(this, _onOpen, value);
|
|
12952
12956
|
}
|
|
12953
|
-
addEventListener(
|
|
12957
|
+
addEventListener(type2, listener, options) {
|
|
12954
12958
|
const listen = listener;
|
|
12955
|
-
super.addEventListener(
|
|
12959
|
+
super.addEventListener(type2, listen, options);
|
|
12956
12960
|
}
|
|
12957
|
-
removeEventListener(
|
|
12961
|
+
removeEventListener(type2, listener, options) {
|
|
12958
12962
|
const listen = listener;
|
|
12959
|
-
super.removeEventListener(
|
|
12963
|
+
super.removeEventListener(type2, listen, options);
|
|
12960
12964
|
}
|
|
12961
12965
|
/**
|
|
12962
12966
|
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
@@ -13498,7 +13502,7 @@ const StdErrNotificationSchema = NotificationSchema.extend({
|
|
|
13498
13502
|
});
|
|
13499
13503
|
ClientNotificationSchema.or(
|
|
13500
13504
|
StdErrNotificationSchema
|
|
13501
|
-
);
|
|
13505
|
+
).or(ServerNotificationSchema);
|
|
13502
13506
|
class InspectorOAuthClientProvider {
|
|
13503
13507
|
get redirectUrl() {
|
|
13504
13508
|
return window.location.origin + "/oauth/callback";
|
|
@@ -13551,7 +13555,95 @@ class InspectorOAuthClientProvider {
|
|
|
13551
13555
|
}
|
|
13552
13556
|
}
|
|
13553
13557
|
const authProvider = new InspectorOAuthClientProvider();
|
|
13554
|
-
const
|
|
13558
|
+
const name = "@modelcontextprotocol/inspector-client";
|
|
13559
|
+
const version$1 = "0.7.0";
|
|
13560
|
+
const description = "Client-side application for the Model Context Protocol inspector";
|
|
13561
|
+
const license = "MIT";
|
|
13562
|
+
const author = "Anthropic, PBC (https://anthropic.com)";
|
|
13563
|
+
const homepage = "https://modelcontextprotocol.io";
|
|
13564
|
+
const bugs = "https://github.com/modelcontextprotocol/inspector/issues";
|
|
13565
|
+
const type = "module";
|
|
13566
|
+
const bin = {
|
|
13567
|
+
"mcp-inspector-client": "./bin/cli.js"
|
|
13568
|
+
};
|
|
13569
|
+
const files = [
|
|
13570
|
+
"bin",
|
|
13571
|
+
"dist"
|
|
13572
|
+
];
|
|
13573
|
+
const scripts = {
|
|
13574
|
+
dev: "vite",
|
|
13575
|
+
build: "tsc -b && vite build",
|
|
13576
|
+
lint: "eslint .",
|
|
13577
|
+
preview: "vite preview",
|
|
13578
|
+
test: "jest --config jest.config.cjs",
|
|
13579
|
+
"test:watch": "jest --config jest.config.cjs --watch"
|
|
13580
|
+
};
|
|
13581
|
+
const dependencies = {
|
|
13582
|
+
"@modelcontextprotocol/sdk": "^1.6.1",
|
|
13583
|
+
"@radix-ui/react-dialog": "^1.1.3",
|
|
13584
|
+
"@radix-ui/react-checkbox": "^1.1.4",
|
|
13585
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
13586
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
13587
|
+
"@radix-ui/react-popover": "^1.1.3",
|
|
13588
|
+
"@radix-ui/react-select": "^2.1.2",
|
|
13589
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
13590
|
+
"@radix-ui/react-tabs": "^1.1.1",
|
|
13591
|
+
"@types/prismjs": "^1.26.5",
|
|
13592
|
+
"class-variance-authority": "^0.7.0",
|
|
13593
|
+
clsx: "^2.1.1",
|
|
13594
|
+
cmdk: "^1.0.4",
|
|
13595
|
+
"lucide-react": "^0.447.0",
|
|
13596
|
+
"pkce-challenge": "^4.1.0",
|
|
13597
|
+
prismjs: "^1.29.0",
|
|
13598
|
+
react: "^18.3.1",
|
|
13599
|
+
"react-dom": "^18.3.1",
|
|
13600
|
+
"react-simple-code-editor": "^0.14.1",
|
|
13601
|
+
"react-toastify": "^10.0.6",
|
|
13602
|
+
"serve-handler": "^6.1.6",
|
|
13603
|
+
"tailwind-merge": "^2.5.3",
|
|
13604
|
+
"tailwindcss-animate": "^1.0.7",
|
|
13605
|
+
zod: "^3.23.8"
|
|
13606
|
+
};
|
|
13607
|
+
const devDependencies = {
|
|
13608
|
+
"@eslint/js": "^9.11.1",
|
|
13609
|
+
"@types/jest": "^29.5.14",
|
|
13610
|
+
"@types/node": "^22.7.5",
|
|
13611
|
+
"@types/react": "^18.3.10",
|
|
13612
|
+
"@types/react-dom": "^18.3.0",
|
|
13613
|
+
"@types/serve-handler": "^6.1.4",
|
|
13614
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
13615
|
+
autoprefixer: "^10.4.20",
|
|
13616
|
+
co: "^4.6.0",
|
|
13617
|
+
eslint: "^9.11.1",
|
|
13618
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
13619
|
+
"eslint-plugin-react-refresh": "^0.4.12",
|
|
13620
|
+
globals: "^15.9.0",
|
|
13621
|
+
jest: "^29.7.0",
|
|
13622
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
13623
|
+
postcss: "^8.4.47",
|
|
13624
|
+
tailwindcss: "^3.4.13",
|
|
13625
|
+
"ts-jest": "^29.2.6",
|
|
13626
|
+
typescript: "^5.5.3",
|
|
13627
|
+
"typescript-eslint": "^8.7.0",
|
|
13628
|
+
vite: "^5.4.8"
|
|
13629
|
+
};
|
|
13630
|
+
const packageJson = {
|
|
13631
|
+
name,
|
|
13632
|
+
version: version$1,
|
|
13633
|
+
description,
|
|
13634
|
+
license,
|
|
13635
|
+
author,
|
|
13636
|
+
homepage,
|
|
13637
|
+
bugs,
|
|
13638
|
+
type,
|
|
13639
|
+
bin,
|
|
13640
|
+
files,
|
|
13641
|
+
scripts,
|
|
13642
|
+
dependencies,
|
|
13643
|
+
devDependencies
|
|
13644
|
+
};
|
|
13645
|
+
const params$1 = new URLSearchParams(window.location.search);
|
|
13646
|
+
const DEFAULT_REQUEST_TIMEOUT_MSEC = parseInt(params$1.get("timeout") ?? "") || 1e4;
|
|
13555
13647
|
function useConnection({
|
|
13556
13648
|
transportType,
|
|
13557
13649
|
command,
|
|
@@ -13559,6 +13651,7 @@ function useConnection({
|
|
|
13559
13651
|
sseUrl,
|
|
13560
13652
|
env,
|
|
13561
13653
|
proxyServerUrl,
|
|
13654
|
+
bearerToken,
|
|
13562
13655
|
requestTimeout = DEFAULT_REQUEST_TIMEOUT_MSEC,
|
|
13563
13656
|
onNotification,
|
|
13564
13657
|
onStdErrNotification,
|
|
@@ -13605,7 +13698,7 @@ function useConnection({
|
|
|
13605
13698
|
} catch (e) {
|
|
13606
13699
|
if (!(options == null ? void 0 : options.suppressToast)) {
|
|
13607
13700
|
const errorString = e.message ?? String(e);
|
|
13608
|
-
B$
|
|
13701
|
+
B$2.error(errorString);
|
|
13609
13702
|
}
|
|
13610
13703
|
throw e;
|
|
13611
13704
|
}
|
|
@@ -13635,14 +13728,14 @@ function useConnection({
|
|
|
13635
13728
|
setCompletionsSupported(false);
|
|
13636
13729
|
return [];
|
|
13637
13730
|
}
|
|
13638
|
-
B$
|
|
13731
|
+
B$2.error(e instanceof Error ? e.message : String(e));
|
|
13639
13732
|
throw e;
|
|
13640
13733
|
}
|
|
13641
13734
|
};
|
|
13642
13735
|
const sendNotification = async (notification) => {
|
|
13643
13736
|
if (!mcpClient) {
|
|
13644
13737
|
const error = new Error("MCP client not connected");
|
|
13645
|
-
B$
|
|
13738
|
+
B$2.error(error.message);
|
|
13646
13739
|
throw error;
|
|
13647
13740
|
}
|
|
13648
13741
|
try {
|
|
@@ -13652,7 +13745,7 @@ function useConnection({
|
|
|
13652
13745
|
if (e instanceof McpError) {
|
|
13653
13746
|
pushHistory(notification, { error: e.message });
|
|
13654
13747
|
}
|
|
13655
|
-
B$
|
|
13748
|
+
B$2.error(e instanceof Error ? e.message : String(e));
|
|
13656
13749
|
throw e;
|
|
13657
13750
|
}
|
|
13658
13751
|
};
|
|
@@ -13664,12 +13757,13 @@ function useConnection({
|
|
|
13664
13757
|
}
|
|
13665
13758
|
return false;
|
|
13666
13759
|
};
|
|
13667
|
-
const connect = async (
|
|
13760
|
+
const connect = async (_e2, retryCount = 0) => {
|
|
13761
|
+
var _a;
|
|
13668
13762
|
try {
|
|
13669
13763
|
const client = new Client(
|
|
13670
13764
|
{
|
|
13671
13765
|
name: "mcp-inspector",
|
|
13672
|
-
version:
|
|
13766
|
+
version: packageJson.version
|
|
13673
13767
|
},
|
|
13674
13768
|
{
|
|
13675
13769
|
capabilities: {
|
|
@@ -13690,9 +13784,9 @@ function useConnection({
|
|
|
13690
13784
|
backendUrl.searchParams.append("url", sseUrl);
|
|
13691
13785
|
}
|
|
13692
13786
|
const headers = {};
|
|
13693
|
-
const
|
|
13694
|
-
if (
|
|
13695
|
-
headers["Authorization"] = `Bearer ${
|
|
13787
|
+
const token = bearerToken || ((_a = await authProvider.tokens()) == null ? void 0 : _a.access_token);
|
|
13788
|
+
if (token) {
|
|
13789
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
13696
13790
|
}
|
|
13697
13791
|
const clientTransport = new SSEClientTransport(backendUrl, {
|
|
13698
13792
|
eventSourceInit: {
|
|
@@ -13707,6 +13801,14 @@ function useConnection({
|
|
|
13707
13801
|
ProgressNotificationSchema,
|
|
13708
13802
|
onNotification
|
|
13709
13803
|
);
|
|
13804
|
+
client.setNotificationHandler(
|
|
13805
|
+
ResourceUpdatedNotificationSchema,
|
|
13806
|
+
onNotification
|
|
13807
|
+
);
|
|
13808
|
+
client.setNotificationHandler(
|
|
13809
|
+
LoggingMessageNotificationSchema,
|
|
13810
|
+
onNotification
|
|
13811
|
+
);
|
|
13710
13812
|
}
|
|
13711
13813
|
if (onStdErrNotification) {
|
|
13712
13814
|
client.setNotificationHandler(
|
|
@@ -13999,8 +14101,8 @@ function getElementRef$1(element) {
|
|
|
13999
14101
|
}
|
|
14000
14102
|
return element.props.ref || element.ref;
|
|
14001
14103
|
}
|
|
14002
|
-
function createCollection(
|
|
14003
|
-
const PROVIDER_NAME =
|
|
14104
|
+
function createCollection(name2) {
|
|
14105
|
+
const PROVIDER_NAME = name2 + "CollectionProvider";
|
|
14004
14106
|
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
14005
14107
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
14006
14108
|
PROVIDER_NAME,
|
|
@@ -14008,13 +14110,13 @@ function createCollection(name) {
|
|
|
14008
14110
|
);
|
|
14009
14111
|
const CollectionProvider = (props) => {
|
|
14010
14112
|
const { scope, children } = props;
|
|
14011
|
-
const ref = React$
|
|
14012
|
-
const itemMap = React$
|
|
14113
|
+
const ref = React$1.useRef(null);
|
|
14114
|
+
const itemMap = React$1.useRef(/* @__PURE__ */ new Map()).current;
|
|
14013
14115
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
14014
14116
|
};
|
|
14015
14117
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
14016
|
-
const COLLECTION_SLOT_NAME =
|
|
14017
|
-
const CollectionSlot = React$
|
|
14118
|
+
const COLLECTION_SLOT_NAME = name2 + "CollectionSlot";
|
|
14119
|
+
const CollectionSlot = React$1.forwardRef(
|
|
14018
14120
|
(props, forwardedRef) => {
|
|
14019
14121
|
const { scope, children } = props;
|
|
14020
14122
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
@@ -14023,15 +14125,15 @@ function createCollection(name) {
|
|
|
14023
14125
|
}
|
|
14024
14126
|
);
|
|
14025
14127
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
14026
|
-
const ITEM_SLOT_NAME =
|
|
14128
|
+
const ITEM_SLOT_NAME = name2 + "CollectionItemSlot";
|
|
14027
14129
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
14028
|
-
const CollectionItemSlot = React$
|
|
14130
|
+
const CollectionItemSlot = React$1.forwardRef(
|
|
14029
14131
|
(props, forwardedRef) => {
|
|
14030
14132
|
const { scope, children, ...itemData } = props;
|
|
14031
|
-
const ref = React$
|
|
14133
|
+
const ref = React$1.useRef(null);
|
|
14032
14134
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
14033
14135
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
14034
|
-
React$
|
|
14136
|
+
React$1.useEffect(() => {
|
|
14035
14137
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
14036
14138
|
return () => void context.itemMap.delete(ref);
|
|
14037
14139
|
});
|
|
@@ -14040,8 +14142,8 @@ function createCollection(name) {
|
|
|
14040
14142
|
);
|
|
14041
14143
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
14042
14144
|
function useCollection2(scope) {
|
|
14043
|
-
const context = useCollectionContext(
|
|
14044
|
-
const getItems = React$
|
|
14145
|
+
const context = useCollectionContext(name2 + "CollectionConsumer", scope);
|
|
14146
|
+
const getItems = React$1.useCallback(() => {
|
|
14045
14147
|
const collectionNode = context.collectionRef.current;
|
|
14046
14148
|
if (!collectionNode) return [];
|
|
14047
14149
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -14061,7 +14163,7 @@ function createCollection(name) {
|
|
|
14061
14163
|
}
|
|
14062
14164
|
var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? reactExports.useLayoutEffect : () => {
|
|
14063
14165
|
};
|
|
14064
|
-
var useReactId = React$
|
|
14166
|
+
var useReactId = React$2["useId".toString()] || (() => void 0);
|
|
14065
14167
|
var count$1 = 0;
|
|
14066
14168
|
function useId(deterministicId) {
|
|
14067
14169
|
const [id2, setId] = reactExports.useState(useReactId());
|
|
@@ -17758,16 +17860,12 @@ const Button = reactExports.forwardRef(
|
|
|
17758
17860
|
);
|
|
17759
17861
|
Button.displayName = "Button";
|
|
17760
17862
|
const PingTab = ({ onPingClick }) => {
|
|
17761
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "ping", className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col-span-2 flex justify-center items-center", children: /* @__PURE__ */ jsxRuntimeExports.
|
|
17863
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "ping", className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col-span-2 flex justify-center items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17762
17864
|
Button,
|
|
17763
17865
|
{
|
|
17764
17866
|
onClick: onPingClick,
|
|
17765
|
-
className: "
|
|
17766
|
-
children:
|
|
17767
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-3xl mr-2", children: "🚀" }),
|
|
17768
|
-
"MEGA PING",
|
|
17769
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-3xl ml-2", children: "💥" })
|
|
17770
|
-
]
|
|
17867
|
+
className: "font-bold py-6 px-12 rounded-full",
|
|
17868
|
+
children: "Ping Server"
|
|
17771
17869
|
}
|
|
17772
17870
|
) }) });
|
|
17773
17871
|
};
|
|
@@ -17814,19 +17912,19 @@ const AlertDescription = reactExports.forwardRef(({ className: className2, ...pr
|
|
|
17814
17912
|
));
|
|
17815
17913
|
AlertDescription.displayName = "AlertDescription";
|
|
17816
17914
|
var U = 1, Y$1 = 0.9, H = 0.8, J = 0.17, p = 0.1, u = 0.999, $ = 0.9999;
|
|
17817
|
-
var k$1 = 0.99, m = /[\\\/_+.#"@\[\(\{&]/, B = /[\\\/_+.#"@\[\(\{&]/g, K$1 = /[\s-]/, X = /[\s-]/g;
|
|
17818
|
-
function G
|
|
17915
|
+
var k$1 = 0.99, m = /[\\\/_+.#"@\[\(\{&]/, B$1 = /[\\\/_+.#"@\[\(\{&]/g, K$1 = /[\s-]/, X = /[\s-]/g;
|
|
17916
|
+
function G(_2, C2, h2, P2, A2, f2, O2) {
|
|
17819
17917
|
if (f2 === C2.length) return A2 === _2.length ? U : k$1;
|
|
17820
17918
|
var T2 = `${A2},${f2}`;
|
|
17821
17919
|
if (O2[T2] !== void 0) return O2[T2];
|
|
17822
|
-
for (var L2 = P2.charAt(f2), c2 = h2.indexOf(L2, A2), S2 = 0, E2, N2, R2, M2; c2 >= 0; ) E2 = G
|
|
17920
|
+
for (var L2 = P2.charAt(f2), c2 = h2.indexOf(L2, A2), S2 = 0, E2, N2, R2, M2; c2 >= 0; ) E2 = G(_2, C2, h2, P2, c2 + 1, f2 + 1, O2), E2 > S2 && (c2 === A2 ? E2 *= U : m.test(_2.charAt(c2 - 1)) ? (E2 *= H, R2 = _2.slice(A2, c2 - 1).match(B$1), R2 && A2 > 0 && (E2 *= Math.pow(u, R2.length))) : K$1.test(_2.charAt(c2 - 1)) ? (E2 *= Y$1, M2 = _2.slice(A2, c2 - 1).match(X), M2 && A2 > 0 && (E2 *= Math.pow(u, M2.length))) : (E2 *= J, A2 > 0 && (E2 *= Math.pow(u, c2 - A2))), _2.charAt(c2) !== C2.charAt(f2) && (E2 *= $)), (E2 < p && h2.charAt(c2 - 1) === P2.charAt(f2 + 1) || P2.charAt(f2 + 1) === P2.charAt(f2) && h2.charAt(c2 - 1) !== P2.charAt(f2)) && (N2 = G(_2, C2, h2, P2, c2 + 1, f2 + 2, O2), N2 * p > E2 && (E2 = N2 * p)), E2 > S2 && (S2 = E2), c2 = h2.indexOf(L2, c2 + 1);
|
|
17823
17921
|
return O2[T2] = S2, S2;
|
|
17824
17922
|
}
|
|
17825
17923
|
function D(_2) {
|
|
17826
17924
|
return _2.toLowerCase().replace(X, " ");
|
|
17827
17925
|
}
|
|
17828
17926
|
function W(_2, C2, h2) {
|
|
17829
|
-
return _2 = h2 && h2.length > 0 ? `${_2 + " " + h2.join(" ")}` : _2, G
|
|
17927
|
+
return _2 = h2 && h2.length > 0 ? `${_2 + " " + h2.join(" ")}` : _2, G(_2, C2, D(_2), D(C2), 0, 0, {});
|
|
17830
17928
|
}
|
|
17831
17929
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
17832
17930
|
const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
|
|
@@ -18031,10 +18129,10 @@ function dispatchUpdate() {
|
|
|
18031
18129
|
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
18032
18130
|
document.dispatchEvent(event);
|
|
18033
18131
|
}
|
|
18034
|
-
function handleAndDispatchCustomEvent(
|
|
18132
|
+
function handleAndDispatchCustomEvent(name2, handler, detail, { discrete }) {
|
|
18035
18133
|
const target = detail.originalEvent.target;
|
|
18036
|
-
const event = new CustomEvent(
|
|
18037
|
-
if (handler) target.addEventListener(
|
|
18134
|
+
const event = new CustomEvent(name2, { bubbles: false, cancelable: true, detail });
|
|
18135
|
+
if (handler) target.addEventListener(name2, handler, { once: true });
|
|
18038
18136
|
if (discrete) {
|
|
18039
18137
|
dispatchDiscreteCustomEvent(target, event);
|
|
18040
18138
|
} else {
|
|
@@ -18868,8 +18966,8 @@ function RemoveScrollSideCar(props) {
|
|
|
18868
18966
|
}
|
|
18869
18967
|
}
|
|
18870
18968
|
}, []);
|
|
18871
|
-
var shouldCancel = reactExports.useCallback(function(
|
|
18872
|
-
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
18969
|
+
var shouldCancel = reactExports.useCallback(function(name2, delta, target, should) {
|
|
18970
|
+
var event = { name: name2, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
18873
18971
|
shouldPreventQueue.current.push(event);
|
|
18874
18972
|
setTimeout(function() {
|
|
18875
18973
|
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
@@ -19352,204 +19450,157 @@ var Content$1 = DialogContent$1;
|
|
|
19352
19450
|
var Title = DialogTitle$1;
|
|
19353
19451
|
var Description = DialogDescription$1;
|
|
19354
19452
|
var Close = DialogClose;
|
|
19355
|
-
var
|
|
19356
|
-
|
|
19357
|
-
|
|
19358
|
-
|
|
19359
|
-
|
|
19360
|
-
|
|
19361
|
-
|
|
19362
|
-
|
|
19363
|
-
|
|
19364
|
-
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
function is(x2, y2) {
|
|
19368
|
-
return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
|
|
19369
|
-
}
|
|
19370
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React$1.useState, useEffect = React$1.useEffect, useLayoutEffect = React$1.useLayoutEffect, useDebugValue = React$1.useDebugValue;
|
|
19371
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
19372
|
-
var value = getSnapshot(), _useState = useState({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
19373
|
-
useLayoutEffect(
|
|
19374
|
-
function() {
|
|
19375
|
-
inst.value = value;
|
|
19376
|
-
inst.getSnapshot = getSnapshot;
|
|
19377
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
19378
|
-
},
|
|
19379
|
-
[subscribe, value, getSnapshot]
|
|
19380
|
-
);
|
|
19381
|
-
useEffect(
|
|
19382
|
-
function() {
|
|
19383
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
19384
|
-
return subscribe(function() {
|
|
19385
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
19386
|
-
});
|
|
19387
|
-
},
|
|
19388
|
-
[subscribe]
|
|
19389
|
-
);
|
|
19390
|
-
useDebugValue(value);
|
|
19391
|
-
return value;
|
|
19392
|
-
}
|
|
19393
|
-
function checkIfSnapshotChanged(inst) {
|
|
19394
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
19395
|
-
inst = inst.value;
|
|
19396
|
-
try {
|
|
19397
|
-
var nextValue = latestGetSnapshot();
|
|
19398
|
-
return !objectIs(inst, nextValue);
|
|
19399
|
-
} catch (error) {
|
|
19400
|
-
return true;
|
|
19401
|
-
}
|
|
19402
|
-
}
|
|
19403
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
19404
|
-
return getSnapshot();
|
|
19405
|
-
}
|
|
19406
|
-
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
19407
|
-
useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim;
|
|
19408
|
-
{
|
|
19409
|
-
shim$1.exports = useSyncExternalStoreShim_production;
|
|
19410
|
-
}
|
|
19411
|
-
var shimExports = shim$1.exports;
|
|
19412
|
-
var N = '[cmdk-group=""]', Q = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', Z = '[cmdk-item=""]', le = `${Z}:not([aria-disabled="true"])`, Y = "cmdk-item-select", I = "data-value", he = (r2, o, t2) => W(r2, o, t2), ue = reactExports.createContext(void 0), K = () => reactExports.useContext(ue), de = reactExports.createContext(void 0), ee = () => reactExports.useContext(de), fe = reactExports.createContext(void 0);
|
|
19413
|
-
var me = reactExports.forwardRef((r2, o) => {
|
|
19414
|
-
let t2 = k(() => {
|
|
19415
|
-
var e, s;
|
|
19416
|
-
return { search: "", value: (s = (e = r2.value) != null ? e : r2.defaultValue) != null ? s : "", filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
19417
|
-
}), u2 = k(() => /* @__PURE__ */ new Set()), c2 = k(() => /* @__PURE__ */ new Map()), d2 = k(() => /* @__PURE__ */ new Map()), f2 = k(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: v2, children: b2, value: l2, onValueChange: y2, filter: E2, shouldFilter: C2, loop: H2, disablePointerSelection: ge2 = false, vimBindings: $2 = true, ...O2 } = r2, te2 = useId(), B2 = useId(), F2 = useId(), x2 = reactExports.useRef(null), R2 = Te();
|
|
19418
|
-
M(() => {
|
|
19419
|
-
if (l2 !== void 0) {
|
|
19420
|
-
let e = l2.trim();
|
|
19421
|
-
t2.current.value = e, h2.emit();
|
|
19422
|
-
}
|
|
19423
|
-
}, [l2]), M(() => {
|
|
19424
|
-
R2(6, re2);
|
|
19453
|
+
var N = '[cmdk-group=""]', Y = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', le = '[cmdk-item=""]', ce = `${le}:not([aria-disabled="true"])`, Z = "cmdk-item-select", T = "data-value", Re = (r2, o, n2) => W(r2, o, n2), ue = reactExports.createContext(void 0), K = () => reactExports.useContext(ue), de = reactExports.createContext(void 0), ee = () => reactExports.useContext(de), fe = reactExports.createContext(void 0), me = reactExports.forwardRef((r2, o) => {
|
|
19454
|
+
let n2 = L(() => {
|
|
19455
|
+
var e, a;
|
|
19456
|
+
return { search: "", value: (a = (e = r2.value) != null ? e : r2.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
19457
|
+
}), u2 = L(() => /* @__PURE__ */ new Set()), c2 = L(() => /* @__PURE__ */ new Map()), d2 = L(() => /* @__PURE__ */ new Map()), f2 = L(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: b2, children: m2, value: R2, onValueChange: x2, filter: C2, shouldFilter: S2, loop: A2, disablePointerSelection: ge2 = false, vimBindings: j = true, ...O2 } = r2, $2 = useId(), q2 = useId(), _2 = useId(), I2 = reactExports.useRef(null), v2 = ke();
|
|
19458
|
+
k(() => {
|
|
19459
|
+
if (R2 !== void 0) {
|
|
19460
|
+
let e = R2.trim();
|
|
19461
|
+
n2.current.value = e, E2.emit();
|
|
19462
|
+
}
|
|
19463
|
+
}, [R2]), k(() => {
|
|
19464
|
+
v2(6, ne2);
|
|
19425
19465
|
}, []);
|
|
19426
|
-
let
|
|
19427
|
-
var
|
|
19428
|
-
if (!Object.is(
|
|
19429
|
-
if (
|
|
19430
|
-
else if (e === "value"
|
|
19431
|
-
|
|
19432
|
-
|
|
19433
|
-
|
|
19466
|
+
let E2 = reactExports.useMemo(() => ({ subscribe: (e) => (f2.current.add(e), () => f2.current.delete(e)), snapshot: () => n2.current, setState: (e, a, s) => {
|
|
19467
|
+
var i, l2, g2, y2;
|
|
19468
|
+
if (!Object.is(n2.current[e], a)) {
|
|
19469
|
+
if (n2.current[e] = a, e === "search") J2(), z2(), v2(1, W2);
|
|
19470
|
+
else if (e === "value") {
|
|
19471
|
+
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
19472
|
+
let h2 = document.getElementById(_2);
|
|
19473
|
+
h2 ? h2.focus() : (i = document.getElementById($2)) == null || i.focus();
|
|
19474
|
+
}
|
|
19475
|
+
if (v2(7, () => {
|
|
19476
|
+
var h2;
|
|
19477
|
+
n2.current.selectedItemId = (h2 = M2()) == null ? void 0 : h2.id, E2.emit();
|
|
19478
|
+
}), s || v2(5, ne2), ((l2 = p2.current) == null ? void 0 : l2.value) !== void 0) {
|
|
19479
|
+
let h2 = a != null ? a : "";
|
|
19480
|
+
(y2 = (g2 = p2.current).onValueChange) == null || y2.call(g2, h2);
|
|
19481
|
+
return;
|
|
19482
|
+
}
|
|
19434
19483
|
}
|
|
19435
|
-
|
|
19484
|
+
E2.emit();
|
|
19436
19485
|
}
|
|
19437
19486
|
}, emit: () => {
|
|
19438
19487
|
f2.current.forEach((e) => e());
|
|
19439
|
-
} }), []),
|
|
19440
|
-
var
|
|
19441
|
-
|
|
19442
|
-
|
|
19488
|
+
} }), []), U2 = reactExports.useMemo(() => ({ value: (e, a, s) => {
|
|
19489
|
+
var i;
|
|
19490
|
+
a !== ((i = d2.current.get(e)) == null ? void 0 : i.value) && (d2.current.set(e, { value: a, keywords: s }), n2.current.filtered.items.set(e, te2(a, s)), v2(2, () => {
|
|
19491
|
+
z2(), E2.emit();
|
|
19443
19492
|
}));
|
|
19444
|
-
}, item: (e,
|
|
19445
|
-
|
|
19493
|
+
}, item: (e, a) => (u2.current.add(e), a && (c2.current.has(a) ? c2.current.get(a).add(e) : c2.current.set(a, /* @__PURE__ */ new Set([e]))), v2(3, () => {
|
|
19494
|
+
J2(), z2(), n2.current.value || W2(), E2.emit();
|
|
19446
19495
|
}), () => {
|
|
19447
|
-
d2.current.delete(e), u2.current.delete(e),
|
|
19448
|
-
let
|
|
19449
|
-
|
|
19450
|
-
|
|
19496
|
+
d2.current.delete(e), u2.current.delete(e), n2.current.filtered.items.delete(e);
|
|
19497
|
+
let s = M2();
|
|
19498
|
+
v2(4, () => {
|
|
19499
|
+
J2(), (s == null ? void 0 : s.getAttribute("id")) === e && W2(), E2.emit();
|
|
19451
19500
|
});
|
|
19452
19501
|
}), group: (e) => (c2.current.has(e) || c2.current.set(e, /* @__PURE__ */ new Set()), () => {
|
|
19453
19502
|
d2.current.delete(e), c2.current.delete(e);
|
|
19454
|
-
}), filter: () => p2.current.shouldFilter, label:
|
|
19455
|
-
function
|
|
19456
|
-
var
|
|
19457
|
-
let
|
|
19458
|
-
return e ?
|
|
19459
|
-
}
|
|
19460
|
-
function
|
|
19461
|
-
if (!
|
|
19462
|
-
let e =
|
|
19463
|
-
|
|
19464
|
-
let
|
|
19465
|
-
|
|
19466
|
-
let
|
|
19467
|
-
g2 = Math.max(
|
|
19468
|
-
}),
|
|
19503
|
+
}), filter: () => p2.current.shouldFilter, label: b2 || r2["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _2, labelId: q2, listInnerRef: I2 }), []);
|
|
19504
|
+
function te2(e, a) {
|
|
19505
|
+
var i, l2;
|
|
19506
|
+
let s = (l2 = (i = p2.current) == null ? void 0 : i.filter) != null ? l2 : Re;
|
|
19507
|
+
return e ? s(e, n2.current.search, a) : 0;
|
|
19508
|
+
}
|
|
19509
|
+
function z2() {
|
|
19510
|
+
if (!n2.current.search || p2.current.shouldFilter === false) return;
|
|
19511
|
+
let e = n2.current.filtered.items, a = [];
|
|
19512
|
+
n2.current.filtered.groups.forEach((i) => {
|
|
19513
|
+
let l2 = c2.current.get(i), g2 = 0;
|
|
19514
|
+
l2.forEach((y2) => {
|
|
19515
|
+
let h2 = e.get(y2);
|
|
19516
|
+
g2 = Math.max(h2, g2);
|
|
19517
|
+
}), a.push([i, g2]);
|
|
19469
19518
|
});
|
|
19470
|
-
let
|
|
19471
|
-
|
|
19472
|
-
var
|
|
19473
|
-
let g2 =
|
|
19474
|
-
return ((
|
|
19475
|
-
}).forEach((
|
|
19476
|
-
let
|
|
19477
|
-
|
|
19478
|
-
}),
|
|
19519
|
+
let s = I2.current;
|
|
19520
|
+
V2().sort((i, l2) => {
|
|
19521
|
+
var h2, F2;
|
|
19522
|
+
let g2 = i.getAttribute("id"), y2 = l2.getAttribute("id");
|
|
19523
|
+
return ((h2 = e.get(y2)) != null ? h2 : 0) - ((F2 = e.get(g2)) != null ? F2 : 0);
|
|
19524
|
+
}).forEach((i) => {
|
|
19525
|
+
let l2 = i.closest(Y);
|
|
19526
|
+
l2 ? l2.appendChild(i.parentElement === l2 ? i : i.closest(`${Y} > *`)) : s.appendChild(i.parentElement === s ? i : i.closest(`${Y} > *`));
|
|
19527
|
+
}), a.sort((i, l2) => l2[1] - i[1]).forEach((i) => {
|
|
19479
19528
|
var g2;
|
|
19480
|
-
let
|
|
19481
|
-
|
|
19529
|
+
let l2 = (g2 = I2.current) == null ? void 0 : g2.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);
|
|
19530
|
+
l2 == null || l2.parentElement.appendChild(l2);
|
|
19482
19531
|
});
|
|
19483
19532
|
}
|
|
19484
|
-
function z2() {
|
|
19485
|
-
let e = _2().find((i) => i.getAttribute("aria-disabled") !== "true"), s = e == null ? void 0 : e.getAttribute(I);
|
|
19486
|
-
h2.setState("value", s || void 0);
|
|
19487
|
-
}
|
|
19488
19533
|
function W2() {
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19534
|
+
let e = V2().find((s) => s.getAttribute("aria-disabled") !== "true"), a = e == null ? void 0 : e.getAttribute(T);
|
|
19535
|
+
E2.setState("value", a || void 0);
|
|
19536
|
+
}
|
|
19537
|
+
function J2() {
|
|
19538
|
+
var a, s, i, l2;
|
|
19539
|
+
if (!n2.current.search || p2.current.shouldFilter === false) {
|
|
19540
|
+
n2.current.filtered.count = u2.current.size;
|
|
19492
19541
|
return;
|
|
19493
19542
|
}
|
|
19494
|
-
|
|
19543
|
+
n2.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
19495
19544
|
let e = 0;
|
|
19496
19545
|
for (let g2 of u2.current) {
|
|
19497
|
-
let
|
|
19498
|
-
|
|
19546
|
+
let y2 = (s = (a = d2.current.get(g2)) == null ? void 0 : a.value) != null ? s : "", h2 = (l2 = (i = d2.current.get(g2)) == null ? void 0 : i.keywords) != null ? l2 : [], F2 = te2(y2, h2);
|
|
19547
|
+
n2.current.filtered.items.set(g2, F2), F2 > 0 && e++;
|
|
19499
19548
|
}
|
|
19500
|
-
for (let [g2,
|
|
19501
|
-
|
|
19549
|
+
for (let [g2, y2] of c2.current) for (let h2 of y2) if (n2.current.filtered.items.get(h2) > 0) {
|
|
19550
|
+
n2.current.filtered.groups.add(g2);
|
|
19502
19551
|
break;
|
|
19503
19552
|
}
|
|
19504
|
-
|
|
19553
|
+
n2.current.filtered.count = e;
|
|
19505
19554
|
}
|
|
19506
|
-
function
|
|
19507
|
-
var s, i
|
|
19508
|
-
let e =
|
|
19509
|
-
e && (((
|
|
19555
|
+
function ne2() {
|
|
19556
|
+
var a, s, i;
|
|
19557
|
+
let e = M2();
|
|
19558
|
+
e && (((a = e.parentElement) == null ? void 0 : a.firstChild) === e && ((i = (s = e.closest(N)) == null ? void 0 : s.querySelector(be)) == null || i.scrollIntoView({ block: "nearest" })), e.scrollIntoView({ block: "nearest" }));
|
|
19510
19559
|
}
|
|
19511
|
-
function
|
|
19560
|
+
function M2() {
|
|
19512
19561
|
var e;
|
|
19513
|
-
return (e =
|
|
19562
|
+
return (e = I2.current) == null ? void 0 : e.querySelector(`${le}[aria-selected="true"]`);
|
|
19514
19563
|
}
|
|
19515
|
-
function
|
|
19564
|
+
function V2() {
|
|
19516
19565
|
var e;
|
|
19517
|
-
return Array.from(((e =
|
|
19518
|
-
}
|
|
19519
|
-
function J2(e) {
|
|
19520
|
-
let i = _2()[e];
|
|
19521
|
-
i && h2.setState("value", i.getAttribute(I));
|
|
19566
|
+
return Array.from(((e = I2.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
|
|
19522
19567
|
}
|
|
19523
19568
|
function X2(e) {
|
|
19569
|
+
let s = V2()[e];
|
|
19570
|
+
s && E2.setState("value", s.getAttribute(T));
|
|
19571
|
+
}
|
|
19572
|
+
function Q2(e) {
|
|
19524
19573
|
var g2;
|
|
19525
|
-
let
|
|
19526
|
-
(g2 = p2.current) != null && g2.loop && (
|
|
19574
|
+
let a = M2(), s = V2(), i = s.findIndex((y2) => y2 === a), l2 = s[i + e];
|
|
19575
|
+
(g2 = p2.current) != null && g2.loop && (l2 = i + e < 0 ? s[s.length - 1] : i + e === s.length ? s[0] : s[i + e]), l2 && E2.setState("value", l2.getAttribute(T));
|
|
19527
19576
|
}
|
|
19528
|
-
function
|
|
19529
|
-
let
|
|
19530
|
-
for (;
|
|
19531
|
-
|
|
19577
|
+
function re2(e) {
|
|
19578
|
+
let a = M2(), s = a == null ? void 0 : a.closest(N), i;
|
|
19579
|
+
for (; s && !i; ) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
|
|
19580
|
+
i ? E2.setState("value", i.getAttribute(T)) : Q2(e);
|
|
19532
19581
|
}
|
|
19533
|
-
let
|
|
19534
|
-
e.preventDefault(), e.metaKey ?
|
|
19582
|
+
let oe2 = () => X2(V2().length - 1), ie2 = (e) => {
|
|
19583
|
+
e.preventDefault(), e.metaKey ? oe2() : e.altKey ? re2(1) : Q2(1);
|
|
19535
19584
|
}, se2 = (e) => {
|
|
19536
|
-
e.preventDefault(), e.metaKey ?
|
|
19585
|
+
e.preventDefault(), e.metaKey ? X2(0) : e.altKey ? re2(-1) : Q2(-1);
|
|
19537
19586
|
};
|
|
19538
19587
|
return reactExports.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O2, "cmdk-root": "", onKeyDown: (e) => {
|
|
19539
19588
|
var s;
|
|
19540
|
-
|
|
19589
|
+
(s = O2.onKeyDown) == null || s.call(O2, e);
|
|
19590
|
+
let a = e.nativeEvent.isComposing || e.keyCode === 229;
|
|
19591
|
+
if (!(e.defaultPrevented || a)) switch (e.key) {
|
|
19541
19592
|
case "n":
|
|
19542
19593
|
case "j": {
|
|
19543
|
-
|
|
19594
|
+
j && e.ctrlKey && ie2(e);
|
|
19544
19595
|
break;
|
|
19545
19596
|
}
|
|
19546
19597
|
case "ArrowDown": {
|
|
19547
|
-
|
|
19598
|
+
ie2(e);
|
|
19548
19599
|
break;
|
|
19549
19600
|
}
|
|
19550
19601
|
case "p":
|
|
19551
19602
|
case "k": {
|
|
19552
|
-
|
|
19603
|
+
j && e.ctrlKey && se2(e);
|
|
19553
19604
|
break;
|
|
19554
19605
|
}
|
|
19555
19606
|
case "ArrowUp": {
|
|
@@ -19557,152 +19608,140 @@ var me = reactExports.forwardRef((r2, o) => {
|
|
|
19557
19608
|
break;
|
|
19558
19609
|
}
|
|
19559
19610
|
case "Home": {
|
|
19560
|
-
e.preventDefault(),
|
|
19611
|
+
e.preventDefault(), X2(0);
|
|
19561
19612
|
break;
|
|
19562
19613
|
}
|
|
19563
19614
|
case "End": {
|
|
19564
|
-
e.preventDefault(),
|
|
19615
|
+
e.preventDefault(), oe2();
|
|
19565
19616
|
break;
|
|
19566
19617
|
}
|
|
19567
|
-
case "Enter":
|
|
19568
|
-
|
|
19569
|
-
|
|
19570
|
-
|
|
19571
|
-
|
|
19572
|
-
|
|
19573
|
-
i.dispatchEvent(a);
|
|
19574
|
-
}
|
|
19618
|
+
case "Enter": {
|
|
19619
|
+
e.preventDefault();
|
|
19620
|
+
let i = M2();
|
|
19621
|
+
if (i) {
|
|
19622
|
+
let l2 = new Event(Z);
|
|
19623
|
+
i.dispatchEvent(l2);
|
|
19575
19624
|
}
|
|
19625
|
+
}
|
|
19576
19626
|
}
|
|
19577
|
-
} }, reactExports.createElement("label", { "cmdk-label": "", htmlFor:
|
|
19578
|
-
}),
|
|
19579
|
-
var
|
|
19580
|
-
let
|
|
19581
|
-
|
|
19582
|
-
if (!p2) return d2.item(
|
|
19627
|
+
} }, reactExports.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b2), B(r2, (e) => reactExports.createElement(de.Provider, { value: E2 }, reactExports.createElement(ue.Provider, { value: U2 }, e))));
|
|
19628
|
+
}), he = reactExports.forwardRef((r2, o) => {
|
|
19629
|
+
var _2, I2;
|
|
19630
|
+
let n2 = useId(), u2 = reactExports.useRef(null), c2 = reactExports.useContext(fe), d2 = K(), f2 = pe(r2), p2 = (I2 = (_2 = f2.current) == null ? void 0 : _2.forceMount) != null ? I2 : c2 == null ? void 0 : c2.forceMount;
|
|
19631
|
+
k(() => {
|
|
19632
|
+
if (!p2) return d2.item(n2, c2 == null ? void 0 : c2.id);
|
|
19583
19633
|
}, [p2]);
|
|
19584
|
-
let
|
|
19634
|
+
let b2 = ve(n2, u2, [r2.value, r2.children, u2], r2.keywords), m2 = ee(), R2 = P((v2) => v2.value && v2.value === b2.current), x2 = P((v2) => p2 || d2.filter() === false ? true : v2.search ? v2.filtered.items.get(n2) > 0 : true);
|
|
19585
19635
|
reactExports.useEffect(() => {
|
|
19586
|
-
let
|
|
19587
|
-
if (!(!
|
|
19588
|
-
}, [
|
|
19589
|
-
function E2() {
|
|
19590
|
-
var R2, h2;
|
|
19591
|
-
C2(), (h2 = (R2 = f2.current).onSelect) == null || h2.call(R2, v2.current);
|
|
19592
|
-
}
|
|
19636
|
+
let v2 = u2.current;
|
|
19637
|
+
if (!(!v2 || r2.disabled)) return v2.addEventListener(Z, C2), () => v2.removeEventListener(Z, C2);
|
|
19638
|
+
}, [x2, r2.onSelect, r2.disabled]);
|
|
19593
19639
|
function C2() {
|
|
19594
|
-
|
|
19640
|
+
var v2, E2;
|
|
19641
|
+
S2(), (E2 = (v2 = f2.current).onSelect) == null || E2.call(v2, b2.current);
|
|
19595
19642
|
}
|
|
19596
|
-
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
let {
|
|
19601
|
-
|
|
19602
|
-
let E2 = reactExports.useMemo(() => ({ id: f2, forceMount: c2 }), [c2]);
|
|
19603
|
-
return reactExports.createElement(Primitive.div, { ref: G([p2, o]), ...d2, "cmdk-group": "", role: "presentation", hidden: y2 ? void 0 : true }, t2 && reactExports.createElement("div", { ref: v2, "cmdk-group-heading": "", "aria-hidden": true, id: b2 }, t2), j(r2, (C2) => reactExports.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t2 ? b2 : void 0 }, reactExports.createElement(fe.Provider, { value: E2 }, C2))));
|
|
19643
|
+
function S2() {
|
|
19644
|
+
m2.setState("value", b2.current, true);
|
|
19645
|
+
}
|
|
19646
|
+
if (!x2) return null;
|
|
19647
|
+
let { disabled: A2, value: ge2, onSelect: j, forceMount: O2, keywords: $2, ...q2 } = r2;
|
|
19648
|
+
return reactExports.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q2, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A2, "aria-selected": !!R2, "data-disabled": !!A2, "data-selected": !!R2, onPointerMove: A2 || d2.getDisablePointerSelection() ? void 0 : S2, onClick: A2 ? void 0 : C2 }, r2.children);
|
|
19604
19649
|
}), Ee = reactExports.forwardRef((r2, o) => {
|
|
19605
|
-
let {
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
|
|
19609
|
-
|
|
19610
|
-
|
|
19611
|
-
|
|
19612
|
-
|
|
19650
|
+
let { heading: n2, children: u2, forceMount: c2, ...d2 } = r2, f2 = useId(), p2 = reactExports.useRef(null), b2 = reactExports.useRef(null), m2 = useId(), R2 = K(), x2 = P((S2) => c2 || R2.filter() === false ? true : S2.search ? S2.filtered.groups.has(f2) : true);
|
|
19651
|
+
k(() => R2.group(f2), []), ve(f2, p2, [r2.value, r2.heading, b2]);
|
|
19652
|
+
let C2 = reactExports.useMemo(() => ({ id: f2, forceMount: c2 }), [c2]);
|
|
19653
|
+
return reactExports.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d2, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && reactExports.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S2) => reactExports.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, reactExports.createElement(fe.Provider, { value: C2 }, S2))));
|
|
19654
|
+
}), ye = reactExports.forwardRef((r2, o) => {
|
|
19655
|
+
let { alwaysRender: n2, ...u2 } = r2, c2 = reactExports.useRef(null), d2 = P((f2) => !f2.search);
|
|
19656
|
+
return !n2 && !d2 ? null : reactExports.createElement(Primitive.div, { ref: composeRefs(c2, o), ...u2, "cmdk-separator": "", role: "separator" });
|
|
19657
|
+
}), Se = reactExports.forwardRef((r2, o) => {
|
|
19658
|
+
let { onValueChange: n2, ...u2 } = r2, c2 = r2.value != null, d2 = ee(), f2 = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b2 = K();
|
|
19613
19659
|
return reactExports.useEffect(() => {
|
|
19614
19660
|
r2.value != null && d2.setState("search", r2.value);
|
|
19615
|
-
}, [r2.value]), reactExports.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls":
|
|
19616
|
-
c2 || d2.setState("search",
|
|
19661
|
+
}, [r2.value]), reactExports.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b2.listId, "aria-labelledby": b2.labelId, "aria-activedescendant": p2, id: b2.inputId, type: "text", value: c2 ? r2.value : f2, onChange: (m2) => {
|
|
19662
|
+
c2 || d2.setState("search", m2.target.value), n2 == null || n2(m2.target.value);
|
|
19617
19663
|
} });
|
|
19618
|
-
}),
|
|
19619
|
-
let { children:
|
|
19664
|
+
}), Ce = reactExports.forwardRef((r2, o) => {
|
|
19665
|
+
let { children: n2, label: u2 = "Suggestions", ...c2 } = r2, d2 = reactExports.useRef(null), f2 = reactExports.useRef(null), p2 = P((m2) => m2.selectedItemId), b2 = K();
|
|
19620
19666
|
return reactExports.useEffect(() => {
|
|
19621
19667
|
if (f2.current && d2.current) {
|
|
19622
|
-
let
|
|
19623
|
-
|
|
19624
|
-
let
|
|
19625
|
-
|
|
19668
|
+
let m2 = f2.current, R2 = d2.current, x2, C2 = new ResizeObserver(() => {
|
|
19669
|
+
x2 = requestAnimationFrame(() => {
|
|
19670
|
+
let S2 = m2.offsetHeight;
|
|
19671
|
+
R2.style.setProperty("--cmdk-list-height", S2.toFixed(1) + "px");
|
|
19626
19672
|
});
|
|
19627
19673
|
});
|
|
19628
|
-
return
|
|
19629
|
-
cancelAnimationFrame(
|
|
19674
|
+
return C2.observe(m2), () => {
|
|
19675
|
+
cancelAnimationFrame(x2), C2.unobserve(m2);
|
|
19630
19676
|
};
|
|
19631
19677
|
}
|
|
19632
|
-
}, []), reactExports.createElement(Primitive.div, { ref:
|
|
19633
|
-
}),
|
|
19634
|
-
let { open:
|
|
19635
|
-
return reactExports.createElement(Root$3, { open:
|
|
19636
|
-
}),
|
|
19637
|
-
let { progress:
|
|
19638
|
-
return reactExports.createElement(Primitive.div, { ref: o, ...d2, "cmdk-loading": "", role: "progressbar", "aria-valuenow":
|
|
19639
|
-
}),
|
|
19640
|
-
function
|
|
19641
|
-
let
|
|
19642
|
-
for (;
|
|
19643
|
-
if (
|
|
19644
|
-
|
|
19645
|
-
}
|
|
19646
|
-
}
|
|
19647
|
-
function
|
|
19648
|
-
let
|
|
19649
|
-
for (;
|
|
19650
|
-
if (
|
|
19651
|
-
|
|
19678
|
+
}, []), reactExports.createElement(Primitive.div, { ref: composeRefs(d2, o), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => reactExports.createElement("div", { ref: composeRefs(f2, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
19679
|
+
}), xe = reactExports.forwardRef((r2, o) => {
|
|
19680
|
+
let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d2, container: f2, ...p2 } = r2;
|
|
19681
|
+
return reactExports.createElement(Root$3, { open: n2, onOpenChange: u2 }, reactExports.createElement(Portal$2, { container: f2 }, reactExports.createElement(Overlay, { "cmdk-overlay": "", className: c2 }), reactExports.createElement(Content$1, { "aria-label": r2.label, "cmdk-dialog": "", className: d2 }, reactExports.createElement(me, { ref: o, ...p2 }))));
|
|
19682
|
+
}), Ie = reactExports.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? reactExports.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null), Pe = reactExports.forwardRef((r2, o) => {
|
|
19683
|
+
let { progress: n2, children: u2, label: c2 = "Loading...", ...d2 } = r2;
|
|
19684
|
+
return reactExports.createElement(Primitive.div, { ref: o, ...d2, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n2, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c2 }, B(r2, (f2) => reactExports.createElement("div", { "aria-hidden": true }, f2)));
|
|
19685
|
+
}), _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
|
|
19686
|
+
function we(r2, o) {
|
|
19687
|
+
let n2 = r2.nextElementSibling;
|
|
19688
|
+
for (; n2; ) {
|
|
19689
|
+
if (n2.matches(o)) return n2;
|
|
19690
|
+
n2 = n2.nextElementSibling;
|
|
19691
|
+
}
|
|
19692
|
+
}
|
|
19693
|
+
function De(r2, o) {
|
|
19694
|
+
let n2 = r2.previousElementSibling;
|
|
19695
|
+
for (; n2; ) {
|
|
19696
|
+
if (n2.matches(o)) return n2;
|
|
19697
|
+
n2 = n2.previousElementSibling;
|
|
19652
19698
|
}
|
|
19653
19699
|
}
|
|
19654
19700
|
function pe(r2) {
|
|
19655
19701
|
let o = reactExports.useRef(r2);
|
|
19656
|
-
return
|
|
19702
|
+
return k(() => {
|
|
19657
19703
|
o.current = r2;
|
|
19658
19704
|
}), o;
|
|
19659
19705
|
}
|
|
19660
|
-
var
|
|
19661
|
-
function
|
|
19706
|
+
var k = typeof window == "undefined" ? reactExports.useEffect : reactExports.useLayoutEffect;
|
|
19707
|
+
function L(r2) {
|
|
19662
19708
|
let o = reactExports.useRef();
|
|
19663
19709
|
return o.current === void 0 && (o.current = r2()), o;
|
|
19664
19710
|
}
|
|
19665
|
-
function
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
typeof t2 == "function" ? t2(o) : t2 != null && (t2.current = o);
|
|
19669
|
-
});
|
|
19670
|
-
};
|
|
19671
|
-
}
|
|
19672
|
-
function T(r2) {
|
|
19673
|
-
let o = ee(), t2 = () => r2(o.snapshot());
|
|
19674
|
-
return shimExports.useSyncExternalStore(o.subscribe, t2, t2);
|
|
19711
|
+
function P(r2) {
|
|
19712
|
+
let o = ee(), n2 = () => r2(o.snapshot());
|
|
19713
|
+
return reactExports.useSyncExternalStore(o.subscribe, n2, n2);
|
|
19675
19714
|
}
|
|
19676
|
-
function ve(r2, o,
|
|
19715
|
+
function ve(r2, o, n2, u2 = []) {
|
|
19677
19716
|
let c2 = reactExports.useRef(), d2 = K();
|
|
19678
|
-
return
|
|
19679
|
-
var
|
|
19717
|
+
return k(() => {
|
|
19718
|
+
var b2;
|
|
19680
19719
|
let f2 = (() => {
|
|
19681
|
-
var
|
|
19682
|
-
for (let
|
|
19683
|
-
if (typeof
|
|
19684
|
-
if (typeof
|
|
19720
|
+
var m2;
|
|
19721
|
+
for (let R2 of n2) {
|
|
19722
|
+
if (typeof R2 == "string") return R2.trim();
|
|
19723
|
+
if (typeof R2 == "object" && "current" in R2) return R2.current ? (m2 = R2.current.textContent) == null ? void 0 : m2.trim() : c2.current;
|
|
19685
19724
|
}
|
|
19686
|
-
})(), p2 = u2.map((
|
|
19687
|
-
d2.value(r2, f2, p2), (
|
|
19725
|
+
})(), p2 = u2.map((m2) => m2.trim());
|
|
19726
|
+
d2.value(r2, f2, p2), (b2 = o.current) == null || b2.setAttribute(T, f2), c2.current = f2;
|
|
19688
19727
|
}), c2;
|
|
19689
19728
|
}
|
|
19690
|
-
var
|
|
19691
|
-
let [r2, o] = reactExports.useState(),
|
|
19692
|
-
return
|
|
19693
|
-
|
|
19729
|
+
var ke = () => {
|
|
19730
|
+
let [r2, o] = reactExports.useState(), n2 = L(() => /* @__PURE__ */ new Map());
|
|
19731
|
+
return k(() => {
|
|
19732
|
+
n2.current.forEach((u2) => u2()), n2.current = /* @__PURE__ */ new Map();
|
|
19694
19733
|
}, [r2]), (u2, c2) => {
|
|
19695
|
-
|
|
19734
|
+
n2.current.set(u2, c2), o({});
|
|
19696
19735
|
};
|
|
19697
19736
|
};
|
|
19698
|
-
function
|
|
19737
|
+
function Me(r2) {
|
|
19699
19738
|
let o = r2.type;
|
|
19700
19739
|
return typeof o == "function" ? o(r2.props) : "render" in o ? o.render(r2.props) : r2;
|
|
19701
19740
|
}
|
|
19702
|
-
function
|
|
19703
|
-
return r2 && reactExports.isValidElement(o) ? reactExports.cloneElement(
|
|
19741
|
+
function B({ asChild: r2, children: o }, n2) {
|
|
19742
|
+
return r2 && reactExports.isValidElement(o) ? reactExports.cloneElement(Me(o), { ref: o.ref }, n2(o.props.children)) : n2(o);
|
|
19704
19743
|
}
|
|
19705
|
-
var
|
|
19744
|
+
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
19706
19745
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
19707
19746
|
if (source == null) return {};
|
|
19708
19747
|
var target = {};
|
|
@@ -19880,7 +19919,7 @@ const DialogDescription = reactExports.forwardRef(({ className: className2, ...p
|
|
|
19880
19919
|
));
|
|
19881
19920
|
DialogDescription.displayName = Description.displayName;
|
|
19882
19921
|
const Command = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19883
|
-
|
|
19922
|
+
_e,
|
|
19884
19923
|
{
|
|
19885
19924
|
ref,
|
|
19886
19925
|
className: cn(
|
|
@@ -19890,11 +19929,11 @@ const Command = reactExports.forwardRef(({ className: className2, ...props }, re
|
|
|
19890
19929
|
...props
|
|
19891
19930
|
}
|
|
19892
19931
|
));
|
|
19893
|
-
Command.displayName =
|
|
19932
|
+
Command.displayName = _e.displayName;
|
|
19894
19933
|
const CommandInput = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
19895
19934
|
/* @__PURE__ */ jsxRuntimeExports.jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
19896
19935
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19897
|
-
|
|
19936
|
+
_e.Input,
|
|
19898
19937
|
{
|
|
19899
19938
|
ref,
|
|
19900
19939
|
className: cn(
|
|
@@ -19905,27 +19944,27 @@ const CommandInput = reactExports.forwardRef(({ className: className2, ...props
|
|
|
19905
19944
|
}
|
|
19906
19945
|
)
|
|
19907
19946
|
] }));
|
|
19908
|
-
CommandInput.displayName =
|
|
19947
|
+
CommandInput.displayName = _e.Input.displayName;
|
|
19909
19948
|
const CommandList = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19910
|
-
|
|
19949
|
+
_e.List,
|
|
19911
19950
|
{
|
|
19912
19951
|
ref,
|
|
19913
19952
|
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className2),
|
|
19914
19953
|
...props
|
|
19915
19954
|
}
|
|
19916
19955
|
));
|
|
19917
|
-
CommandList.displayName =
|
|
19956
|
+
CommandList.displayName = _e.List.displayName;
|
|
19918
19957
|
const CommandEmpty = reactExports.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19919
|
-
|
|
19958
|
+
_e.Empty,
|
|
19920
19959
|
{
|
|
19921
19960
|
ref,
|
|
19922
19961
|
className: "py-6 text-center text-sm",
|
|
19923
19962
|
...props
|
|
19924
19963
|
}
|
|
19925
19964
|
));
|
|
19926
|
-
CommandEmpty.displayName =
|
|
19965
|
+
CommandEmpty.displayName = _e.Empty.displayName;
|
|
19927
19966
|
const CommandGroup = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19928
|
-
|
|
19967
|
+
_e.Group,
|
|
19929
19968
|
{
|
|
19930
19969
|
ref,
|
|
19931
19970
|
className: cn(
|
|
@@ -19935,18 +19974,18 @@ const CommandGroup = reactExports.forwardRef(({ className: className2, ...props
|
|
|
19935
19974
|
...props
|
|
19936
19975
|
}
|
|
19937
19976
|
));
|
|
19938
|
-
CommandGroup.displayName =
|
|
19977
|
+
CommandGroup.displayName = _e.Group.displayName;
|
|
19939
19978
|
const CommandSeparator = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19940
|
-
|
|
19979
|
+
_e.Separator,
|
|
19941
19980
|
{
|
|
19942
19981
|
ref,
|
|
19943
19982
|
className: cn("-mx-1 h-px bg-border", className2),
|
|
19944
19983
|
...props
|
|
19945
19984
|
}
|
|
19946
19985
|
));
|
|
19947
|
-
CommandSeparator.displayName =
|
|
19986
|
+
CommandSeparator.displayName = _e.Separator.displayName;
|
|
19948
19987
|
const CommandItem = reactExports.forwardRef(({ className: className2, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19949
|
-
|
|
19988
|
+
_e.Item,
|
|
19950
19989
|
{
|
|
19951
19990
|
ref,
|
|
19952
19991
|
className: cn(
|
|
@@ -19956,7 +19995,7 @@ const CommandItem = reactExports.forwardRef(({ className: className2, ...props }
|
|
|
19956
19995
|
...props
|
|
19957
19996
|
}
|
|
19958
19997
|
));
|
|
19959
|
-
CommandItem.displayName =
|
|
19998
|
+
CommandItem.displayName = _e.Item.displayName;
|
|
19960
19999
|
const sides = ["top", "right", "bottom", "left"];
|
|
19961
20000
|
const min = Math.min;
|
|
19962
20001
|
const max = Math.max;
|
|
@@ -20164,7 +20203,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
20164
20203
|
let resetCount = 0;
|
|
20165
20204
|
for (let i = 0; i < validMiddleware.length; i++) {
|
|
20166
20205
|
const {
|
|
20167
|
-
name,
|
|
20206
|
+
name: name2,
|
|
20168
20207
|
fn
|
|
20169
20208
|
} = validMiddleware[i];
|
|
20170
20209
|
const {
|
|
@@ -20190,8 +20229,8 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
20190
20229
|
y2 = nextY != null ? nextY : y2;
|
|
20191
20230
|
middlewareData = {
|
|
20192
20231
|
...middlewareData,
|
|
20193
|
-
[
|
|
20194
|
-
...middlewareData[
|
|
20232
|
+
[name2]: {
|
|
20233
|
+
...middlewareData[name2],
|
|
20195
20234
|
...data
|
|
20196
20235
|
}
|
|
20197
20236
|
};
|
|
@@ -21881,7 +21920,7 @@ var CONTENT_NAME$2 = "PopperContent";
|
|
|
21881
21920
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$2);
|
|
21882
21921
|
var PopperContent = reactExports.forwardRef(
|
|
21883
21922
|
(props, forwardedRef) => {
|
|
21884
|
-
var _a, _b, _c, _d,
|
|
21923
|
+
var _a, _b, _c, _d, _e2, _f;
|
|
21885
21924
|
const {
|
|
21886
21925
|
__scopePopper,
|
|
21887
21926
|
side = "bottom",
|
|
@@ -21980,7 +22019,7 @@ var PopperContent = reactExports.forwardRef(
|
|
|
21980
22019
|
zIndex: contentZIndex,
|
|
21981
22020
|
["--radix-popper-transform-origin"]: [
|
|
21982
22021
|
(_d = middlewareData.transformOrigin) == null ? void 0 : _d.x,
|
|
21983
|
-
(
|
|
22022
|
+
(_e2 = middlewareData.transformOrigin) == null ? void 0 : _e2.y
|
|
21984
22023
|
].join(" "),
|
|
21985
22024
|
// hide the content if using the hide middleware and should be hidden
|
|
21986
22025
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
@@ -22424,15 +22463,15 @@ function Combobox({
|
|
|
22424
22463
|
emptyMessage = "No results found.",
|
|
22425
22464
|
id: id2
|
|
22426
22465
|
}) {
|
|
22427
|
-
const [open, setOpen] = React$
|
|
22428
|
-
const handleSelect = React$
|
|
22466
|
+
const [open, setOpen] = React$1.useState(false);
|
|
22467
|
+
const handleSelect = React$1.useCallback(
|
|
22429
22468
|
(option) => {
|
|
22430
22469
|
onChange(option);
|
|
22431
22470
|
setOpen(false);
|
|
22432
22471
|
},
|
|
22433
22472
|
[onChange]
|
|
22434
22473
|
);
|
|
22435
|
-
const handleInputChange = React$
|
|
22474
|
+
const handleInputChange = React$1.useCallback(
|
|
22436
22475
|
(value2) => {
|
|
22437
22476
|
onInputChange(value2);
|
|
22438
22477
|
},
|
|
@@ -22767,6 +22806,10 @@ const ResourcesTab = ({
|
|
|
22767
22806
|
readResource,
|
|
22768
22807
|
selectedResource,
|
|
22769
22808
|
setSelectedResource,
|
|
22809
|
+
resourceSubscriptionsSupported,
|
|
22810
|
+
resourceSubscriptions,
|
|
22811
|
+
subscribeToResource,
|
|
22812
|
+
unsubscribeFromResource,
|
|
22770
22813
|
handleCompletion,
|
|
22771
22814
|
completionsSupported,
|
|
22772
22815
|
resourceContent,
|
|
@@ -22863,18 +22906,38 @@ const ResourcesTab = ({
|
|
|
22863
22906
|
children: selectedResource ? selectedResource.name : selectedTemplate ? selectedTemplate.name : "Select a resource or template"
|
|
22864
22907
|
}
|
|
22865
22908
|
),
|
|
22866
|
-
selectedResource && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
22871
|
-
|
|
22872
|
-
|
|
22873
|
-
|
|
22874
|
-
|
|
22875
|
-
|
|
22876
|
-
|
|
22877
|
-
|
|
22909
|
+
selectedResource && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex row-auto gap-1 justify-end w-2/5", children: [
|
|
22910
|
+
resourceSubscriptionsSupported && !resourceSubscriptions.has(selectedResource.uri) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22911
|
+
Button,
|
|
22912
|
+
{
|
|
22913
|
+
variant: "outline",
|
|
22914
|
+
size: "sm",
|
|
22915
|
+
onClick: () => subscribeToResource(selectedResource.uri),
|
|
22916
|
+
children: "Subscribe"
|
|
22917
|
+
}
|
|
22918
|
+
),
|
|
22919
|
+
resourceSubscriptionsSupported && resourceSubscriptions.has(selectedResource.uri) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22920
|
+
Button,
|
|
22921
|
+
{
|
|
22922
|
+
variant: "outline",
|
|
22923
|
+
size: "sm",
|
|
22924
|
+
onClick: () => unsubscribeFromResource(selectedResource.uri),
|
|
22925
|
+
children: "Unsubscribe"
|
|
22926
|
+
}
|
|
22927
|
+
),
|
|
22928
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
22929
|
+
Button,
|
|
22930
|
+
{
|
|
22931
|
+
variant: "outline",
|
|
22932
|
+
size: "sm",
|
|
22933
|
+
onClick: () => readResource(selectedResource.uri),
|
|
22934
|
+
children: [
|
|
22935
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "w-4 h-4 mr-2" }),
|
|
22936
|
+
"Refresh"
|
|
22937
|
+
]
|
|
22938
|
+
}
|
|
22939
|
+
)
|
|
22940
|
+
] })
|
|
22878
22941
|
] }),
|
|
22879
22942
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4", children: error ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Alert, { variant: "destructive", children: [
|
|
22880
22943
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { className: "h-4 w-4" }),
|
|
@@ -22912,11 +22975,11 @@ const ResourcesTab = ({
|
|
|
22912
22975
|
] });
|
|
22913
22976
|
};
|
|
22914
22977
|
const Input = reactExports.forwardRef(
|
|
22915
|
-
({ className: className2, type, ...props }, ref) => {
|
|
22978
|
+
({ className: className2, type: type2, ...props }, ref) => {
|
|
22916
22979
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22917
22980
|
"input",
|
|
22918
22981
|
{
|
|
22919
|
-
type,
|
|
22982
|
+
type: type2,
|
|
22920
22983
|
className: cn(
|
|
22921
22984
|
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
22922
22985
|
className2
|
|
@@ -23000,7 +23063,7 @@ const SamplingTab = ({ pendingRequests, onApprove, onReject }) => {
|
|
|
23000
23063
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 space-y-4", children: [
|
|
23001
23064
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-semibold", children: "Recent Requests" }),
|
|
23002
23065
|
pendingRequests.map((request) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 border rounded-lg space-y-4", children: [
|
|
23003
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 p-2 rounded", children: JSON.stringify(request.request, null, 2) }),
|
|
23066
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-2 rounded", children: JSON.stringify(request.request, null, 2) }),
|
|
23004
23067
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex space-x-2", children: [
|
|
23005
23068
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => handleApprove(request.id), children: "Approve" }),
|
|
23006
23069
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => onReject(request.id), children: "Reject" })
|
|
@@ -23072,7 +23135,7 @@ var Select$1 = (props) => {
|
|
|
23072
23135
|
defaultValue,
|
|
23073
23136
|
onValueChange,
|
|
23074
23137
|
dir,
|
|
23075
|
-
name,
|
|
23138
|
+
name: name2,
|
|
23076
23139
|
autoComplete,
|
|
23077
23140
|
disabled,
|
|
23078
23141
|
required,
|
|
@@ -23140,7 +23203,7 @@ var Select$1 = (props) => {
|
|
|
23140
23203
|
"aria-hidden": true,
|
|
23141
23204
|
required,
|
|
23142
23205
|
tabIndex: -1,
|
|
23143
|
-
name,
|
|
23206
|
+
name: name2,
|
|
23144
23207
|
autoComplete,
|
|
23145
23208
|
value,
|
|
23146
23209
|
onChange: (event) => setValue(event.target.value),
|
|
@@ -24323,7 +24386,7 @@ const useTheme = () => {
|
|
|
24323
24386
|
}, [])
|
|
24324
24387
|
];
|
|
24325
24388
|
};
|
|
24326
|
-
const version = "0.
|
|
24389
|
+
const version = "0.7.0";
|
|
24327
24390
|
const Sidebar = ({
|
|
24328
24391
|
connectionStatus,
|
|
24329
24392
|
transportType,
|
|
@@ -24336,11 +24399,17 @@ const Sidebar = ({
|
|
|
24336
24399
|
setSseUrl,
|
|
24337
24400
|
env,
|
|
24338
24401
|
setEnv,
|
|
24402
|
+
bearerToken,
|
|
24403
|
+
setBearerToken,
|
|
24339
24404
|
onConnect,
|
|
24340
|
-
stdErrNotifications
|
|
24405
|
+
stdErrNotifications,
|
|
24406
|
+
logLevel,
|
|
24407
|
+
sendLogLevelRequest,
|
|
24408
|
+
loggingSupported
|
|
24341
24409
|
}) => {
|
|
24342
24410
|
const [theme, setTheme] = useTheme();
|
|
24343
24411
|
const [showEnvVars, setShowEnvVars] = reactExports.useState(false);
|
|
24412
|
+
const [showBearerToken, setShowBearerToken] = reactExports.useState(false);
|
|
24344
24413
|
const [shownEnvVars, setShownEnvVars] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
24345
24414
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-80 bg-card border-r border-border flex flex-col h-full", children: [
|
|
24346
24415
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between p-4 border-b border-gray-200", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h1", { className: "ml-2 text-lg font-semibold", children: [
|
|
@@ -24390,17 +24459,46 @@ const Sidebar = ({
|
|
|
24390
24459
|
}
|
|
24391
24460
|
)
|
|
24392
24461
|
] })
|
|
24393
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24394
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
24395
|
-
|
|
24396
|
-
|
|
24397
|
-
|
|
24398
|
-
|
|
24399
|
-
|
|
24400
|
-
|
|
24401
|
-
|
|
24402
|
-
|
|
24403
|
-
|
|
24462
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
24463
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24464
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium", children: "URL" }),
|
|
24465
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24466
|
+
Input,
|
|
24467
|
+
{
|
|
24468
|
+
placeholder: "URL",
|
|
24469
|
+
value: sseUrl,
|
|
24470
|
+
onChange: (e) => setSseUrl(e.target.value),
|
|
24471
|
+
className: "font-mono"
|
|
24472
|
+
}
|
|
24473
|
+
)
|
|
24474
|
+
] }),
|
|
24475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24476
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24477
|
+
Button,
|
|
24478
|
+
{
|
|
24479
|
+
variant: "outline",
|
|
24480
|
+
onClick: () => setShowBearerToken(!showBearerToken),
|
|
24481
|
+
className: "flex items-center w-full",
|
|
24482
|
+
children: [
|
|
24483
|
+
showBearerToken ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4 mr-2" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "w-4 h-4 mr-2" }),
|
|
24484
|
+
"Authentication"
|
|
24485
|
+
]
|
|
24486
|
+
}
|
|
24487
|
+
),
|
|
24488
|
+
showBearerToken && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24489
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium", children: "Bearer Token" }),
|
|
24490
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24491
|
+
Input,
|
|
24492
|
+
{
|
|
24493
|
+
placeholder: "Bearer Token",
|
|
24494
|
+
value: bearerToken,
|
|
24495
|
+
onChange: (e) => setBearerToken(e.target.value),
|
|
24496
|
+
className: "font-mono",
|
|
24497
|
+
type: "password"
|
|
24498
|
+
}
|
|
24499
|
+
)
|
|
24500
|
+
] })
|
|
24501
|
+
] })
|
|
24404
24502
|
] }),
|
|
24405
24503
|
transportType === "stdio" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24406
24504
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -24425,9 +24523,17 @@ const Sidebar = ({
|
|
|
24425
24523
|
value: key,
|
|
24426
24524
|
onChange: (e) => {
|
|
24427
24525
|
const newKey = e.target.value;
|
|
24428
|
-
const newEnv =
|
|
24429
|
-
|
|
24430
|
-
|
|
24526
|
+
const newEnv = Object.entries(env).reduce(
|
|
24527
|
+
(acc, [k2, v2]) => {
|
|
24528
|
+
if (k2 === key) {
|
|
24529
|
+
acc[newKey] = value;
|
|
24530
|
+
} else {
|
|
24531
|
+
acc[k2] = v2;
|
|
24532
|
+
}
|
|
24533
|
+
return acc;
|
|
24534
|
+
},
|
|
24535
|
+
{}
|
|
24536
|
+
);
|
|
24431
24537
|
setEnv(newEnv);
|
|
24432
24538
|
setShownEnvVars((prev) => {
|
|
24433
24539
|
const next = new Set(prev);
|
|
@@ -24525,6 +24631,20 @@ const Sidebar = ({
|
|
|
24525
24631
|
),
|
|
24526
24632
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-600", children: connectionStatus === "connected" ? "Connected" : connectionStatus === "error" ? "Connection Error" : "Disconnected" })
|
|
24527
24633
|
] }),
|
|
24634
|
+
loggingSupported && connectionStatus === "connected" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
24635
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium", children: "Logging Level" }),
|
|
24636
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
24637
|
+
Select,
|
|
24638
|
+
{
|
|
24639
|
+
value: logLevel,
|
|
24640
|
+
onValueChange: (value) => sendLogLevelRequest(value),
|
|
24641
|
+
children: [
|
|
24642
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Select logging level" }) }),
|
|
24643
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: Object.values(LoggingLevelSchema.enum).map((level) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: level, children: level })) })
|
|
24644
|
+
]
|
|
24645
|
+
}
|
|
24646
|
+
)
|
|
24647
|
+
] }),
|
|
24528
24648
|
stdErrNotifications.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 border-t border-gray-200 pt-4", children: [
|
|
24529
24649
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-sm font-medium", children: "Error output from MCP server" }),
|
|
24530
24650
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 max-h-80 overflow-y-auto", children: stdErrNotifications.map((notification, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -24600,7 +24720,7 @@ var Checkbox$1 = reactExports.forwardRef(
|
|
|
24600
24720
|
(props, forwardedRef) => {
|
|
24601
24721
|
const {
|
|
24602
24722
|
__scopeCheckbox,
|
|
24603
|
-
name,
|
|
24723
|
+
name: name2,
|
|
24604
24724
|
checked: checkedProp,
|
|
24605
24725
|
defaultChecked,
|
|
24606
24726
|
required,
|
|
@@ -24659,7 +24779,7 @@ var Checkbox$1 = reactExports.forwardRef(
|
|
|
24659
24779
|
{
|
|
24660
24780
|
control: button,
|
|
24661
24781
|
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
24662
|
-
name,
|
|
24782
|
+
name: name2,
|
|
24663
24783
|
value,
|
|
24664
24784
|
checked,
|
|
24665
24785
|
required,
|
|
@@ -24825,13 +24945,13 @@ var cssText = (
|
|
|
24825
24945
|
"\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(className, ":empty {\n -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /**\n * IE doesn't support '-webkit-text-fill-color'\n * So we use 'color: transparent' to make the text transparent on IE\n * Unlike other browsers, it doesn't affect caret color in IE\n */\n .").concat(className, " {\n color: transparent !important;\n }\n\n .").concat(className, "::selection {\n background-color: #accef7 !important;\n color: transparent !important;\n }\n}\n")
|
|
24826
24946
|
);
|
|
24827
24947
|
var Editor = React.forwardRef(function Editor2(props, ref) {
|
|
24828
|
-
var autoFocus = props.autoFocus, disabled = props.disabled, form = props.form, highlight = props.highlight, _a = props.ignoreTabKey, ignoreTabKey = _a === void 0 ? false : _a, _b = props.insertSpaces, insertSpaces = _b === void 0 ? true : _b, maxLength = props.maxLength, minLength = props.minLength,
|
|
24948
|
+
var autoFocus = props.autoFocus, disabled = props.disabled, form = props.form, highlight = props.highlight, _a = props.ignoreTabKey, ignoreTabKey = _a === void 0 ? false : _a, _b = props.insertSpaces, insertSpaces = _b === void 0 ? true : _b, maxLength = props.maxLength, minLength = props.minLength, name2 = props.name, onBlur = props.onBlur, onClick = props.onClick, onFocus = props.onFocus, onKeyDown = props.onKeyDown, onKeyUp = props.onKeyUp, onValueChange = props.onValueChange, _c = props.padding, padding = _c === void 0 ? 0 : _c, placeholder = props.placeholder, preClassName = props.preClassName, readOnly = props.readOnly, required = props.required, style = props.style, _d = props.tabSize, tabSize = _d === void 0 ? 2 : _d, textareaClassName = props.textareaClassName, textareaId = props.textareaId, value = props.value, rest = __rest(props, ["autoFocus", "disabled", "form", "highlight", "ignoreTabKey", "insertSpaces", "maxLength", "minLength", "name", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onValueChange", "padding", "placeholder", "preClassName", "readOnly", "required", "style", "tabSize", "textareaClassName", "textareaId", "value"]);
|
|
24829
24949
|
var historyRef = React.useRef({
|
|
24830
24950
|
stack: [],
|
|
24831
24951
|
offset: -1
|
|
24832
24952
|
});
|
|
24833
24953
|
var inputRef = React.useRef(null);
|
|
24834
|
-
var
|
|
24954
|
+
var _e2 = React.useState(true), capture = _e2[0], setCapture = _e2[1];
|
|
24835
24955
|
var contentStyle = {
|
|
24836
24956
|
paddingTop: typeof padding === "object" ? padding.top : padding,
|
|
24837
24957
|
paddingRight: typeof padding === "object" ? padding.right : padding,
|
|
@@ -25098,7 +25218,7 @@ var Editor = React.forwardRef(function Editor2(props, ref) {
|
|
|
25098
25218
|
React.createElement("pre", __assign({ className: preClassName, "aria-hidden": "true", style: __assign(__assign(__assign({}, styles.editor), styles.highlight), contentStyle) }, typeof highlighted === "string" ? { dangerouslySetInnerHTML: { __html: highlighted + "<br />" } } : { children: highlighted })),
|
|
25099
25219
|
React.createElement("textarea", { ref: function(c2) {
|
|
25100
25220
|
return inputRef.current = c2;
|
|
25101
|
-
}, style: __assign(__assign(__assign({}, styles.editor), styles.textarea), contentStyle), className: className + (textareaClassName ? " ".concat(textareaClassName) : ""), id: textareaId, value, onChange: handleChange, onKeyDown: handleKeyDown, onClick, onKeyUp, onFocus, onBlur, disabled, form, maxLength, minLength, name, placeholder, readOnly, required, autoFocus, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", spellCheck: false, "data-gramm": false }),
|
|
25221
|
+
}, style: __assign(__assign(__assign({}, styles.editor), styles.textarea), contentStyle), className: className + (textareaClassName ? " ".concat(textareaClassName) : ""), id: textareaId, value, onChange: handleChange, onKeyDown: handleKeyDown, onClick, onKeyUp, onFocus, onBlur, disabled, form, maxLength, minLength, name: name2, placeholder, readOnly, required, autoFocus, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", spellCheck: false, "data-gramm": false }),
|
|
25102
25222
|
React.createElement("style", { dangerouslySetInnerHTML: { __html: cssText } })
|
|
25103
25223
|
);
|
|
25104
25224
|
});
|
|
@@ -25352,7 +25472,7 @@ var prism = { exports: {} };
|
|
|
25352
25472
|
if (typeof document === "undefined") {
|
|
25353
25473
|
return null;
|
|
25354
25474
|
}
|
|
25355
|
-
if (
|
|
25475
|
+
if (document.currentScript && document.currentScript.tagName === "SCRIPT" && 1 < 2) {
|
|
25356
25476
|
return (
|
|
25357
25477
|
/** @type {any} */
|
|
25358
25478
|
document.currentScript
|
|
@@ -25363,10 +25483,10 @@ var prism = { exports: {} };
|
|
|
25363
25483
|
} catch (err) {
|
|
25364
25484
|
var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1];
|
|
25365
25485
|
if (src) {
|
|
25366
|
-
var
|
|
25367
|
-
for (var i in
|
|
25368
|
-
if (
|
|
25369
|
-
return
|
|
25486
|
+
var scripts2 = document.getElementsByTagName("script");
|
|
25487
|
+
for (var i in scripts2) {
|
|
25488
|
+
if (scripts2[i].src == src) {
|
|
25489
|
+
return scripts2[i];
|
|
25370
25490
|
}
|
|
25371
25491
|
}
|
|
25372
25492
|
}
|
|
@@ -25561,12 +25681,12 @@ var prism = { exports: {} };
|
|
|
25561
25681
|
return ret;
|
|
25562
25682
|
},
|
|
25563
25683
|
// Traverse a language definition with Depth First Search
|
|
25564
|
-
DFS: function DFS(o, callback,
|
|
25684
|
+
DFS: function DFS(o, callback, type2, visited) {
|
|
25565
25685
|
visited = visited || {};
|
|
25566
25686
|
var objId = _2.util.objId;
|
|
25567
25687
|
for (var i in o) {
|
|
25568
25688
|
if (o.hasOwnProperty(i)) {
|
|
25569
|
-
callback.call(o, i, o[i],
|
|
25689
|
+
callback.call(o, i, o[i], type2 || i);
|
|
25570
25690
|
var property = o[i];
|
|
25571
25691
|
var propertyType = _2.util.type(property);
|
|
25572
25692
|
if (propertyType === "Object" && !visited[objId(property)]) {
|
|
@@ -25794,10 +25914,10 @@ var prism = { exports: {} };
|
|
|
25794
25914
|
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
25795
25915
|
* @public
|
|
25796
25916
|
*/
|
|
25797
|
-
add: function(
|
|
25917
|
+
add: function(name2, callback) {
|
|
25798
25918
|
var hooks = _2.hooks.all;
|
|
25799
|
-
hooks[
|
|
25800
|
-
hooks[
|
|
25919
|
+
hooks[name2] = hooks[name2] || [];
|
|
25920
|
+
hooks[name2].push(callback);
|
|
25801
25921
|
},
|
|
25802
25922
|
/**
|
|
25803
25923
|
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
@@ -25808,8 +25928,8 @@ var prism = { exports: {} };
|
|
|
25808
25928
|
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
25809
25929
|
* @public
|
|
25810
25930
|
*/
|
|
25811
|
-
run: function(
|
|
25812
|
-
var callbacks = _2.hooks.all[
|
|
25931
|
+
run: function(name2, env) {
|
|
25932
|
+
var callbacks = _2.hooks.all[name2];
|
|
25813
25933
|
if (!callbacks || !callbacks.length) {
|
|
25814
25934
|
return;
|
|
25815
25935
|
}
|
|
@@ -25821,8 +25941,8 @@ var prism = { exports: {} };
|
|
|
25821
25941
|
Token
|
|
25822
25942
|
};
|
|
25823
25943
|
_self2.Prism = _2;
|
|
25824
|
-
function Token(
|
|
25825
|
-
this.type =
|
|
25944
|
+
function Token(type2, content, alias, matchedStr) {
|
|
25945
|
+
this.type = type2;
|
|
25826
25946
|
this.content = content;
|
|
25827
25947
|
this.alias = alias;
|
|
25828
25948
|
this.length = (matchedStr || "").length | 0;
|
|
@@ -25856,8 +25976,8 @@ var prism = { exports: {} };
|
|
|
25856
25976
|
}
|
|
25857
25977
|
_2.hooks.run("wrap", env);
|
|
25858
25978
|
var attributes = "";
|
|
25859
|
-
for (var
|
|
25860
|
-
attributes += " " +
|
|
25979
|
+
for (var name2 in env.attributes) {
|
|
25980
|
+
attributes += " " + name2 + '="' + (env.attributes[name2] || "").replace(/"/g, """) + '"';
|
|
25861
25981
|
}
|
|
25862
25982
|
return "<" + env.tag + ' class="' + env.classes.join(" ") + '"' + attributes + ">" + env.content + "</" + env.tag + ">";
|
|
25863
25983
|
};
|
|
@@ -25878,11 +25998,11 @@ var prism = { exports: {} };
|
|
|
25878
25998
|
}
|
|
25879
25999
|
var patterns = grammar[token];
|
|
25880
26000
|
patterns = Array.isArray(patterns) ? patterns : [patterns];
|
|
25881
|
-
for (var
|
|
25882
|
-
if (rematch && rematch.cause == token + "," +
|
|
26001
|
+
for (var j = 0; j < patterns.length; ++j) {
|
|
26002
|
+
if (rematch && rematch.cause == token + "," + j) {
|
|
25883
26003
|
return;
|
|
25884
26004
|
}
|
|
25885
|
-
var patternObj = patterns[
|
|
26005
|
+
var patternObj = patterns[j];
|
|
25886
26006
|
var inside = patternObj.inside;
|
|
25887
26007
|
var lookbehind = !!patternObj.lookbehind;
|
|
25888
26008
|
var greedy = !!patternObj.greedy;
|
|
@@ -25957,7 +26077,7 @@ var prism = { exports: {} };
|
|
|
25957
26077
|
}
|
|
25958
26078
|
if (removeCount > 1) {
|
|
25959
26079
|
var nestedRematch = {
|
|
25960
|
-
cause: token + "," +
|
|
26080
|
+
cause: token + "," + j,
|
|
25961
26081
|
reach
|
|
25962
26082
|
};
|
|
25963
26083
|
matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);
|
|
@@ -26631,7 +26751,18 @@ Prism.languages.json = {
|
|
|
26631
26751
|
}
|
|
26632
26752
|
};
|
|
26633
26753
|
Prism.languages.webmanifest = Prism.languages.json;
|
|
26634
|
-
const JsonEditor = ({
|
|
26754
|
+
const JsonEditor = ({
|
|
26755
|
+
value,
|
|
26756
|
+
onChange,
|
|
26757
|
+
error: externalError
|
|
26758
|
+
}) => {
|
|
26759
|
+
const [editorContent, setEditorContent] = reactExports.useState(value);
|
|
26760
|
+
const [internalError, setInternalError] = reactExports.useState(
|
|
26761
|
+
void 0
|
|
26762
|
+
);
|
|
26763
|
+
reactExports.useEffect(() => {
|
|
26764
|
+
setEditorContent(value);
|
|
26765
|
+
}, [value]);
|
|
26635
26766
|
const formatJson = (json) => {
|
|
26636
26767
|
try {
|
|
26637
26768
|
return JSON.stringify(JSON.parse(json), null, 2);
|
|
@@ -26639,25 +26770,33 @@ const JsonEditor = ({ value, onChange, error }) => {
|
|
|
26639
26770
|
return json;
|
|
26640
26771
|
}
|
|
26641
26772
|
};
|
|
26773
|
+
const handleEditorChange = (newContent) => {
|
|
26774
|
+
setEditorContent(newContent);
|
|
26775
|
+
setInternalError(void 0);
|
|
26776
|
+
onChange(newContent);
|
|
26777
|
+
};
|
|
26778
|
+
const handleFormatJson = () => {
|
|
26779
|
+
try {
|
|
26780
|
+
const formatted = formatJson(editorContent);
|
|
26781
|
+
setEditorContent(formatted);
|
|
26782
|
+
onChange(formatted);
|
|
26783
|
+
setInternalError(void 0);
|
|
26784
|
+
} catch (err) {
|
|
26785
|
+
setInternalError(err instanceof Error ? err.message : "Invalid JSON");
|
|
26786
|
+
}
|
|
26787
|
+
};
|
|
26788
|
+
const displayError = internalError || externalError;
|
|
26642
26789
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative space-y-2", children: [
|
|
26643
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26644
|
-
Button,
|
|
26645
|
-
{
|
|
26646
|
-
variant: "outline",
|
|
26647
|
-
size: "sm",
|
|
26648
|
-
onClick: () => onChange(formatJson(value)),
|
|
26649
|
-
children: "Format JSON"
|
|
26650
|
-
}
|
|
26651
|
-
) }),
|
|
26790
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: handleFormatJson, children: "Format JSON" }) }),
|
|
26652
26791
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26653
26792
|
"div",
|
|
26654
26793
|
{
|
|
26655
|
-
className: `border rounded-md ${
|
|
26794
|
+
className: `border rounded-md ${displayError ? "border-red-500" : "border-gray-200 dark:border-gray-800"}`,
|
|
26656
26795
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26657
26796
|
_default,
|
|
26658
26797
|
{
|
|
26659
|
-
value,
|
|
26660
|
-
onValueChange:
|
|
26798
|
+
value: editorContent,
|
|
26799
|
+
onValueChange: handleEditorChange,
|
|
26661
26800
|
highlight: (code) => Prism$1.highlight(code, Prism$1.languages.json, "json"),
|
|
26662
26801
|
padding: 10,
|
|
26663
26802
|
style: {
|
|
@@ -26671,12 +26810,111 @@ const JsonEditor = ({ value, onChange, error }) => {
|
|
|
26671
26810
|
)
|
|
26672
26811
|
}
|
|
26673
26812
|
),
|
|
26674
|
-
|
|
26813
|
+
displayError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-red-500 mt-1", children: displayError })
|
|
26675
26814
|
] });
|
|
26676
26815
|
};
|
|
26677
|
-
|
|
26816
|
+
function updateValueAtPath(obj, path, value) {
|
|
26817
|
+
if (path.length === 0) return value;
|
|
26818
|
+
if (obj === null || obj === void 0) {
|
|
26819
|
+
obj = !isNaN(Number(path[0])) ? [] : {};
|
|
26820
|
+
}
|
|
26821
|
+
if (Array.isArray(obj)) {
|
|
26822
|
+
return updateArray(obj, path, value);
|
|
26823
|
+
} else if (typeof obj === "object" && obj !== null) {
|
|
26824
|
+
return updateObject(obj, path, value);
|
|
26825
|
+
} else {
|
|
26826
|
+
console.error(
|
|
26827
|
+
`Cannot update path ${path.join(".")} in non-object/array value:`,
|
|
26828
|
+
obj
|
|
26829
|
+
);
|
|
26830
|
+
return obj;
|
|
26831
|
+
}
|
|
26832
|
+
}
|
|
26833
|
+
function updateArray(array, path, value) {
|
|
26834
|
+
const [index2, ...restPath] = path;
|
|
26835
|
+
const arrayIndex = Number(index2);
|
|
26836
|
+
if (isNaN(arrayIndex)) {
|
|
26837
|
+
console.error(`Invalid array index: ${index2}`);
|
|
26838
|
+
return array;
|
|
26839
|
+
}
|
|
26840
|
+
if (arrayIndex < 0) {
|
|
26841
|
+
console.error(`Array index out of bounds: ${arrayIndex} < 0`);
|
|
26842
|
+
return array;
|
|
26843
|
+
}
|
|
26844
|
+
let newArray = [];
|
|
26845
|
+
for (let i = 0; i < array.length; i++) {
|
|
26846
|
+
newArray[i] = i in array ? array[i] : null;
|
|
26847
|
+
}
|
|
26848
|
+
if (arrayIndex >= newArray.length) {
|
|
26849
|
+
const extendedArray = new Array(arrayIndex).fill(null);
|
|
26850
|
+
for (let i = 0; i < newArray.length; i++) {
|
|
26851
|
+
extendedArray[i] = newArray[i];
|
|
26852
|
+
}
|
|
26853
|
+
newArray = extendedArray;
|
|
26854
|
+
}
|
|
26855
|
+
if (restPath.length === 0) {
|
|
26856
|
+
newArray[arrayIndex] = value;
|
|
26857
|
+
} else {
|
|
26858
|
+
newArray[arrayIndex] = updateValueAtPath(
|
|
26859
|
+
newArray[arrayIndex],
|
|
26860
|
+
restPath,
|
|
26861
|
+
value
|
|
26862
|
+
);
|
|
26863
|
+
}
|
|
26864
|
+
return newArray;
|
|
26865
|
+
}
|
|
26866
|
+
function updateObject(obj, path, value) {
|
|
26867
|
+
const [key, ...restPath] = path;
|
|
26868
|
+
if (typeof key !== "string") {
|
|
26869
|
+
console.error(`Invalid object key: ${key}`);
|
|
26870
|
+
return obj;
|
|
26871
|
+
}
|
|
26872
|
+
const newObj = { ...obj };
|
|
26873
|
+
if (restPath.length === 0) {
|
|
26874
|
+
newObj[key] = value;
|
|
26875
|
+
} else {
|
|
26876
|
+
if (!(key in newObj)) {
|
|
26877
|
+
newObj[key] = {};
|
|
26878
|
+
}
|
|
26879
|
+
newObj[key] = updateValueAtPath(newObj[key], restPath, value);
|
|
26880
|
+
}
|
|
26881
|
+
return newObj;
|
|
26882
|
+
}
|
|
26883
|
+
function generateDefaultValue(schema) {
|
|
26884
|
+
if ("default" in schema) {
|
|
26885
|
+
return schema.default;
|
|
26886
|
+
}
|
|
26887
|
+
if (!schema.required) {
|
|
26888
|
+
if (schema.type === "array") return [];
|
|
26889
|
+
if (schema.type === "object") return {};
|
|
26890
|
+
return null;
|
|
26891
|
+
}
|
|
26892
|
+
switch (schema.type) {
|
|
26893
|
+
case "string":
|
|
26894
|
+
return "";
|
|
26895
|
+
case "number":
|
|
26896
|
+
case "integer":
|
|
26897
|
+
return 0;
|
|
26898
|
+
case "boolean":
|
|
26899
|
+
return false;
|
|
26900
|
+
case "array":
|
|
26901
|
+
return [];
|
|
26902
|
+
case "object": {
|
|
26903
|
+
if (!schema.properties) return {};
|
|
26904
|
+
const obj = {};
|
|
26905
|
+
Object.entries(schema.properties).filter(([, prop]) => prop.required).forEach(([key, prop]) => {
|
|
26906
|
+
const value = generateDefaultValue(prop);
|
|
26907
|
+
obj[key] = value;
|
|
26908
|
+
});
|
|
26909
|
+
return obj;
|
|
26910
|
+
}
|
|
26911
|
+
default:
|
|
26912
|
+
return null;
|
|
26913
|
+
}
|
|
26914
|
+
}
|
|
26915
|
+
function formatFieldLabel(key) {
|
|
26678
26916
|
return key.replace(/([A-Z])/g, " $1").replace(/_/g, " ").replace(/^\w/, (c2) => c2.toUpperCase());
|
|
26679
|
-
}
|
|
26917
|
+
}
|
|
26680
26918
|
const DynamicJsonForm = ({
|
|
26681
26919
|
schema,
|
|
26682
26920
|
value,
|
|
@@ -26685,28 +26923,47 @@ const DynamicJsonForm = ({
|
|
|
26685
26923
|
}) => {
|
|
26686
26924
|
const [isJsonMode, setIsJsonMode] = reactExports.useState(false);
|
|
26687
26925
|
const [jsonError, setJsonError] = reactExports.useState();
|
|
26688
|
-
const
|
|
26689
|
-
|
|
26690
|
-
|
|
26691
|
-
|
|
26692
|
-
|
|
26693
|
-
|
|
26694
|
-
|
|
26695
|
-
|
|
26696
|
-
|
|
26697
|
-
|
|
26698
|
-
|
|
26699
|
-
|
|
26700
|
-
|
|
26701
|
-
|
|
26702
|
-
|
|
26703
|
-
obj[key] = generateDefaultValue(prop);
|
|
26704
|
-
});
|
|
26926
|
+
const [rawJsonValue, setRawJsonValue] = reactExports.useState(
|
|
26927
|
+
JSON.stringify(value ?? generateDefaultValue(schema), null, 2)
|
|
26928
|
+
);
|
|
26929
|
+
const timeoutRef = reactExports.useRef();
|
|
26930
|
+
const debouncedUpdateParent = reactExports.useCallback(
|
|
26931
|
+
(jsonString) => {
|
|
26932
|
+
if (timeoutRef.current) {
|
|
26933
|
+
clearTimeout(timeoutRef.current);
|
|
26934
|
+
}
|
|
26935
|
+
timeoutRef.current = setTimeout(() => {
|
|
26936
|
+
try {
|
|
26937
|
+
const parsed = JSON.parse(jsonString);
|
|
26938
|
+
onChange(parsed);
|
|
26939
|
+
setJsonError(void 0);
|
|
26940
|
+
} catch {
|
|
26705
26941
|
}
|
|
26706
|
-
|
|
26942
|
+
}, 300);
|
|
26943
|
+
},
|
|
26944
|
+
[onChange, setJsonError]
|
|
26945
|
+
);
|
|
26946
|
+
reactExports.useEffect(() => {
|
|
26947
|
+
if (!isJsonMode) {
|
|
26948
|
+
setRawJsonValue(
|
|
26949
|
+
JSON.stringify(value ?? generateDefaultValue(schema), null, 2)
|
|
26950
|
+
);
|
|
26951
|
+
}
|
|
26952
|
+
}, [value, schema, isJsonMode]);
|
|
26953
|
+
const handleSwitchToFormMode = () => {
|
|
26954
|
+
if (isJsonMode) {
|
|
26955
|
+
try {
|
|
26956
|
+
const parsed = JSON.parse(rawJsonValue);
|
|
26957
|
+
onChange(parsed);
|
|
26958
|
+
setIsJsonMode(false);
|
|
26959
|
+
} catch (err) {
|
|
26960
|
+
setJsonError(err instanceof Error ? err.message : "Invalid JSON");
|
|
26707
26961
|
}
|
|
26708
|
-
|
|
26709
|
-
|
|
26962
|
+
} else {
|
|
26963
|
+
setRawJsonValue(
|
|
26964
|
+
JSON.stringify(value ?? generateDefaultValue(schema), null, 2)
|
|
26965
|
+
);
|
|
26966
|
+
setIsJsonMode(true);
|
|
26710
26967
|
}
|
|
26711
26968
|
};
|
|
26712
26969
|
const renderFormFields = (propSchema, currentValue, path = [], depth = 0) => {
|
|
@@ -26735,18 +26992,64 @@ const DynamicJsonForm = ({
|
|
|
26735
26992
|
}
|
|
26736
26993
|
switch (propSchema.type) {
|
|
26737
26994
|
case "string":
|
|
26995
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26996
|
+
Input,
|
|
26997
|
+
{
|
|
26998
|
+
type: "text",
|
|
26999
|
+
value: currentValue ?? "",
|
|
27000
|
+
onChange: (e) => {
|
|
27001
|
+
const val = e.target.value;
|
|
27002
|
+
if (!val && !propSchema.required) {
|
|
27003
|
+
handleFieldChange(path, void 0);
|
|
27004
|
+
} else {
|
|
27005
|
+
handleFieldChange(path, val);
|
|
27006
|
+
}
|
|
27007
|
+
},
|
|
27008
|
+
placeholder: propSchema.description,
|
|
27009
|
+
required: propSchema.required
|
|
27010
|
+
}
|
|
27011
|
+
);
|
|
26738
27012
|
case "number":
|
|
27013
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27014
|
+
Input,
|
|
27015
|
+
{
|
|
27016
|
+
type: "number",
|
|
27017
|
+
value: (currentValue == null ? void 0 : currentValue.toString()) ?? "",
|
|
27018
|
+
onChange: (e) => {
|
|
27019
|
+
const val = e.target.value;
|
|
27020
|
+
if (!val && !propSchema.required) {
|
|
27021
|
+
handleFieldChange(path, void 0);
|
|
27022
|
+
} else {
|
|
27023
|
+
const num = Number(val);
|
|
27024
|
+
if (!isNaN(num)) {
|
|
27025
|
+
handleFieldChange(path, num);
|
|
27026
|
+
}
|
|
27027
|
+
}
|
|
27028
|
+
},
|
|
27029
|
+
placeholder: propSchema.description,
|
|
27030
|
+
required: propSchema.required
|
|
27031
|
+
}
|
|
27032
|
+
);
|
|
26739
27033
|
case "integer":
|
|
26740
27034
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26741
27035
|
Input,
|
|
26742
27036
|
{
|
|
26743
|
-
type:
|
|
26744
|
-
|
|
26745
|
-
|
|
26746
|
-
|
|
26747
|
-
|
|
26748
|
-
|
|
26749
|
-
|
|
27037
|
+
type: "number",
|
|
27038
|
+
step: "1",
|
|
27039
|
+
value: (currentValue == null ? void 0 : currentValue.toString()) ?? "",
|
|
27040
|
+
onChange: (e) => {
|
|
27041
|
+
const val = e.target.value;
|
|
27042
|
+
if (!val && !propSchema.required) {
|
|
27043
|
+
handleFieldChange(path, void 0);
|
|
27044
|
+
} else {
|
|
27045
|
+
const num = Number(val);
|
|
27046
|
+
if (!isNaN(num) && Number.isInteger(num)) {
|
|
27047
|
+
handleFieldChange(path, num);
|
|
27048
|
+
}
|
|
27049
|
+
}
|
|
27050
|
+
},
|
|
27051
|
+
placeholder: propSchema.description,
|
|
27052
|
+
required: propSchema.required
|
|
26750
27053
|
}
|
|
26751
27054
|
);
|
|
26752
27055
|
case "boolean":
|
|
@@ -26756,20 +27059,37 @@ const DynamicJsonForm = ({
|
|
|
26756
27059
|
type: "checkbox",
|
|
26757
27060
|
checked: currentValue ?? false,
|
|
26758
27061
|
onChange: (e) => handleFieldChange(path, e.target.checked),
|
|
26759
|
-
className: "w-4 h-4"
|
|
27062
|
+
className: "w-4 h-4",
|
|
27063
|
+
required: propSchema.required
|
|
26760
27064
|
}
|
|
26761
27065
|
);
|
|
26762
|
-
case "object":
|
|
26763
|
-
|
|
26764
|
-
|
|
26765
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26766
|
-
|
|
26767
|
-
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
|
|
27066
|
+
case "object": {
|
|
27067
|
+
const objectValue = currentValue || {};
|
|
27068
|
+
if (propSchema.properties) {
|
|
27069
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4 border rounded-md p-4", children: Object.entries(propSchema.properties).map(([key, prop]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
27070
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { children: formatFieldLabel(key) }),
|
|
27071
|
+
renderFormFields(
|
|
27072
|
+
prop,
|
|
27073
|
+
objectValue[key],
|
|
27074
|
+
[...path, key],
|
|
27075
|
+
depth + 1
|
|
27076
|
+
)
|
|
27077
|
+
] }, key)) });
|
|
27078
|
+
} else if (Object.keys(objectValue).length > 0) {
|
|
27079
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4 border rounded-md p-4", children: Object.entries(objectValue).map(([key, value2]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
27080
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { children: formatFieldLabel(key) }),
|
|
27081
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27082
|
+
Input,
|
|
27083
|
+
{
|
|
27084
|
+
type: "text",
|
|
27085
|
+
value: String(value2),
|
|
27086
|
+
onChange: (e) => handleFieldChange([...path, key], e.target.value)
|
|
27087
|
+
}
|
|
27088
|
+
)
|
|
27089
|
+
] }, key)) });
|
|
27090
|
+
}
|
|
27091
|
+
return null;
|
|
27092
|
+
}
|
|
26773
27093
|
case "array": {
|
|
26774
27094
|
const arrayValue = Array.isArray(currentValue) ? currentValue : [];
|
|
26775
27095
|
if (!propSchema.items) return null;
|
|
@@ -26807,9 +27127,12 @@ const DynamicJsonForm = ({
|
|
|
26807
27127
|
variant: "outline",
|
|
26808
27128
|
size: "sm",
|
|
26809
27129
|
onClick: () => {
|
|
27130
|
+
const defaultValue = generateDefaultValue(
|
|
27131
|
+
propSchema.items
|
|
27132
|
+
);
|
|
26810
27133
|
handleFieldChange(path, [
|
|
26811
27134
|
...arrayValue,
|
|
26812
|
-
|
|
27135
|
+
defaultValue ?? null
|
|
26813
27136
|
]);
|
|
26814
27137
|
},
|
|
26815
27138
|
title: ((_b = propSchema.items) == null ? void 0 : _b.description) ? `Add new ${propSchema.items.description}` : "Add new item",
|
|
@@ -26828,109 +27151,57 @@ const DynamicJsonForm = ({
|
|
|
26828
27151
|
onChange(fieldValue);
|
|
26829
27152
|
return;
|
|
26830
27153
|
}
|
|
26831
|
-
const updateArray = (array, path2, value2) => {
|
|
26832
|
-
const [index2, ...restPath] = path2;
|
|
26833
|
-
const arrayIndex = Number(index2);
|
|
26834
|
-
if (isNaN(arrayIndex)) {
|
|
26835
|
-
console.error(`Invalid array index: ${index2}`);
|
|
26836
|
-
return array;
|
|
26837
|
-
}
|
|
26838
|
-
if (arrayIndex < 0) {
|
|
26839
|
-
console.error(`Array index out of bounds: ${arrayIndex} < 0`);
|
|
26840
|
-
return array;
|
|
26841
|
-
}
|
|
26842
|
-
const newArray = [...array];
|
|
26843
|
-
if (restPath.length === 0) {
|
|
26844
|
-
newArray[arrayIndex] = value2;
|
|
26845
|
-
} else {
|
|
26846
|
-
if (arrayIndex >= array.length) {
|
|
26847
|
-
console.warn(`Extending array to index ${arrayIndex}`);
|
|
26848
|
-
newArray.length = arrayIndex + 1;
|
|
26849
|
-
newArray.fill(null, array.length, arrayIndex);
|
|
26850
|
-
}
|
|
26851
|
-
newArray[arrayIndex] = updateValue(
|
|
26852
|
-
newArray[arrayIndex],
|
|
26853
|
-
restPath,
|
|
26854
|
-
value2
|
|
26855
|
-
);
|
|
26856
|
-
}
|
|
26857
|
-
return newArray;
|
|
26858
|
-
};
|
|
26859
|
-
const updateObject = (obj, path2, value2) => {
|
|
26860
|
-
const [key, ...restPath] = path2;
|
|
26861
|
-
if (typeof key !== "string") {
|
|
26862
|
-
console.error(`Invalid object key: ${key}`);
|
|
26863
|
-
return obj;
|
|
26864
|
-
}
|
|
26865
|
-
const newObj = { ...obj };
|
|
26866
|
-
if (restPath.length === 0) {
|
|
26867
|
-
newObj[key] = value2;
|
|
26868
|
-
} else {
|
|
26869
|
-
if (!(key in newObj)) {
|
|
26870
|
-
console.warn(`Creating new key in object: ${key}`);
|
|
26871
|
-
newObj[key] = {};
|
|
26872
|
-
}
|
|
26873
|
-
newObj[key] = updateValue(newObj[key], restPath, value2);
|
|
26874
|
-
}
|
|
26875
|
-
return newObj;
|
|
26876
|
-
};
|
|
26877
|
-
const updateValue = (current, path2, value2) => {
|
|
26878
|
-
if (path2.length === 0) return value2;
|
|
26879
|
-
try {
|
|
26880
|
-
if (!current) {
|
|
26881
|
-
current = !isNaN(Number(path2[0])) ? [] : {};
|
|
26882
|
-
}
|
|
26883
|
-
if (Array.isArray(current)) {
|
|
26884
|
-
return updateArray(current, path2, value2);
|
|
26885
|
-
} else if (typeof current === "object" && current !== null) {
|
|
26886
|
-
return updateObject(current, path2, value2);
|
|
26887
|
-
} else {
|
|
26888
|
-
console.error(
|
|
26889
|
-
`Cannot update path ${path2.join(".")} in non-object/array value:`,
|
|
26890
|
-
current
|
|
26891
|
-
);
|
|
26892
|
-
return current;
|
|
26893
|
-
}
|
|
26894
|
-
} catch (error) {
|
|
26895
|
-
console.error(`Error updating value at path ${path2.join(".")}:`, error);
|
|
26896
|
-
return current;
|
|
26897
|
-
}
|
|
26898
|
-
};
|
|
26899
27154
|
try {
|
|
26900
|
-
const newValue =
|
|
27155
|
+
const newValue = updateValueAtPath(value, path, fieldValue);
|
|
26901
27156
|
onChange(newValue);
|
|
26902
27157
|
} catch (error) {
|
|
26903
27158
|
console.error("Failed to update form value:", error);
|
|
26904
27159
|
onChange(value);
|
|
26905
27160
|
}
|
|
26906
27161
|
};
|
|
27162
|
+
const shouldUseJsonMode = schema.type === "object" && (!schema.properties || Object.keys(schema.properties).length === 0);
|
|
27163
|
+
reactExports.useEffect(() => {
|
|
27164
|
+
if (shouldUseJsonMode && !isJsonMode) {
|
|
27165
|
+
setIsJsonMode(true);
|
|
27166
|
+
}
|
|
27167
|
+
}, [shouldUseJsonMode, isJsonMode]);
|
|
26907
27168
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
26908
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26909
|
-
Button,
|
|
26910
|
-
{
|
|
26911
|
-
variant: "outline",
|
|
26912
|
-
size: "sm",
|
|
26913
|
-
onClick: () => setIsJsonMode(!isJsonMode),
|
|
26914
|
-
children: isJsonMode ? "Switch to Form" : "Switch to JSON"
|
|
26915
|
-
}
|
|
26916
|
-
) }),
|
|
27169
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: handleSwitchToFormMode, children: isJsonMode ? "Switch to Form" : "Switch to JSON" }) }),
|
|
26917
27170
|
isJsonMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26918
27171
|
JsonEditor,
|
|
26919
27172
|
{
|
|
26920
|
-
value:
|
|
27173
|
+
value: rawJsonValue,
|
|
26921
27174
|
onChange: (newValue) => {
|
|
26922
|
-
|
|
26923
|
-
|
|
26924
|
-
setJsonError(void 0);
|
|
26925
|
-
} catch (err) {
|
|
26926
|
-
setJsonError(err instanceof Error ? err.message : "Invalid JSON");
|
|
26927
|
-
}
|
|
27175
|
+
setRawJsonValue(newValue);
|
|
27176
|
+
debouncedUpdateParent(newValue);
|
|
26928
27177
|
},
|
|
26929
27178
|
error: jsonError
|
|
26930
27179
|
}
|
|
26931
|
-
) :
|
|
27180
|
+
) : (
|
|
27181
|
+
// If schema type is object but value is not an object or is empty, and we have actual JSON data,
|
|
27182
|
+
// render a simple representation of the JSON data
|
|
27183
|
+
schema.type === "object" && (typeof value !== "object" || value === null || Object.keys(value).length === 0) && rawJsonValue && rawJsonValue !== "{}" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4 border rounded-md p-4", children: [
|
|
27184
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500", children: "Form view not available for this JSON structure. Using simplified view:" }),
|
|
27185
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto", children: rawJsonValue }),
|
|
27186
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500", children: "Use JSON mode for full editing capabilities." })
|
|
27187
|
+
] }) : renderFormFields(schema, value)
|
|
27188
|
+
)
|
|
26932
27189
|
] });
|
|
26933
27190
|
};
|
|
27191
|
+
function escapeUnicode(obj) {
|
|
27192
|
+
return JSON.stringify(
|
|
27193
|
+
obj,
|
|
27194
|
+
(_key, value) => {
|
|
27195
|
+
if (typeof value === "string") {
|
|
27196
|
+
return value.replace(/[^\0-\x7F]/g, (char) => {
|
|
27197
|
+
return "\\u" + ("0000" + char.charCodeAt(0).toString(16)).slice(-4);
|
|
27198
|
+
});
|
|
27199
|
+
}
|
|
27200
|
+
return value;
|
|
27201
|
+
},
|
|
27202
|
+
2
|
|
27203
|
+
);
|
|
27204
|
+
}
|
|
26934
27205
|
const ToolsTab = ({
|
|
26935
27206
|
tools,
|
|
26936
27207
|
listTools,
|
|
@@ -26953,13 +27224,13 @@ const ToolsTab = ({
|
|
|
26953
27224
|
if (!parsedResult.success) {
|
|
26954
27225
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
26955
27226
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "font-semibold mb-2", children: "Invalid Tool Result:" }),
|
|
26956
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto max-h-64", children:
|
|
27227
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto max-h-64", children: escapeUnicode(toolResult) }),
|
|
26957
27228
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "font-semibold mb-2", children: "Errors:" }),
|
|
26958
27229
|
parsedResult.error.errors.map((error2, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26959
27230
|
"pre",
|
|
26960
27231
|
{
|
|
26961
27232
|
className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto max-h-64",
|
|
26962
|
-
children:
|
|
27233
|
+
children: escapeUnicode(error2)
|
|
26963
27234
|
},
|
|
26964
27235
|
idx
|
|
26965
27236
|
))
|
|
@@ -26992,14 +27263,14 @@ const ToolsTab = ({
|
|
|
26992
27263
|
className: "w-full",
|
|
26993
27264
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Your browser does not support audio playback" })
|
|
26994
27265
|
}
|
|
26995
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 whitespace-pre-wrap break-words p-4 rounded text-sm overflow-auto max-h-64", children:
|
|
27266
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 whitespace-pre-wrap break-words p-4 rounded text-sm overflow-auto max-h-64", children: escapeUnicode(item.resource) }))
|
|
26996
27267
|
] }, index2);
|
|
26997
27268
|
})
|
|
26998
27269
|
] });
|
|
26999
27270
|
} else if ("toolResult" in toolResult) {
|
|
27000
27271
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
27001
27272
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "font-semibold mb-2", children: "Tool Result (Legacy):" }),
|
|
27002
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto max-h-64", children:
|
|
27273
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto max-h-64", children: escapeUnicode(toolResult.toolResult) })
|
|
27003
27274
|
] });
|
|
27004
27275
|
}
|
|
27005
27276
|
};
|
|
@@ -27086,7 +27357,7 @@ const ToolsTab = ({
|
|
|
27086
27357
|
description: prop.description,
|
|
27087
27358
|
items: prop.items
|
|
27088
27359
|
},
|
|
27089
|
-
value: params2[key] ??
|
|
27360
|
+
value: params2[key] ?? generateDefaultValue(prop),
|
|
27090
27361
|
onChange: (newValue) => {
|
|
27091
27362
|
setParams({
|
|
27092
27363
|
...params2,
|
|
@@ -27101,6 +27372,7 @@ const ToolsTab = ({
|
|
|
27101
27372
|
id: key,
|
|
27102
27373
|
name: key,
|
|
27103
27374
|
placeholder: prop.description,
|
|
27375
|
+
value: params2[key] ?? "",
|
|
27104
27376
|
onChange: (e) => setParams({
|
|
27105
27377
|
...params2,
|
|
27106
27378
|
[key]: prop.type === "number" ? Number(e.target.value) : e.target.value
|
|
@@ -27122,11 +27394,12 @@ const ToolsTab = ({
|
|
|
27122
27394
|
};
|
|
27123
27395
|
const params = new URLSearchParams(window.location.search);
|
|
27124
27396
|
const PROXY_PORT = params.get("proxyPort") ?? "3000";
|
|
27125
|
-
const PROXY_SERVER_URL = `http
|
|
27397
|
+
const PROXY_SERVER_URL = `http://${window.location.hostname}:${PROXY_PORT}`;
|
|
27126
27398
|
const App = () => {
|
|
27399
|
+
var _a;
|
|
27127
27400
|
if (window.location.pathname === "/oauth/callback") {
|
|
27128
|
-
const OAuthCallback = React$
|
|
27129
|
-
() => __vitePreload(() => import("./OAuthCallback-
|
|
27401
|
+
const OAuthCallback = React$1.lazy(
|
|
27402
|
+
() => __vitePreload(() => import("./OAuthCallback-C5xCfXlk.js"), true ? [] : void 0)
|
|
27130
27403
|
);
|
|
27131
27404
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, {}) });
|
|
27132
27405
|
}
|
|
@@ -27154,10 +27427,14 @@ const App = () => {
|
|
|
27154
27427
|
const [transportType, setTransportType] = reactExports.useState(() => {
|
|
27155
27428
|
return localStorage.getItem("lastTransportType") || "stdio";
|
|
27156
27429
|
});
|
|
27430
|
+
const [logLevel, setLogLevel] = reactExports.useState("debug");
|
|
27157
27431
|
const [notifications, setNotifications] = reactExports.useState([]);
|
|
27158
27432
|
const [stdErrNotifications, setStdErrNotifications] = reactExports.useState([]);
|
|
27159
27433
|
const [roots, setRoots] = reactExports.useState([]);
|
|
27160
27434
|
const [env, setEnv] = reactExports.useState({});
|
|
27435
|
+
const [bearerToken, setBearerToken] = reactExports.useState(() => {
|
|
27436
|
+
return localStorage.getItem("lastBearerToken") || "";
|
|
27437
|
+
});
|
|
27161
27438
|
const [pendingSampleRequests, setPendingSampleRequests] = reactExports.useState([]);
|
|
27162
27439
|
const nextRequestId = reactExports.useRef(0);
|
|
27163
27440
|
const rootsRef = reactExports.useRef([]);
|
|
@@ -27178,6 +27455,7 @@ const App = () => {
|
|
|
27178
27455
|
const [selectedResource, setSelectedResource] = reactExports.useState(
|
|
27179
27456
|
null
|
|
27180
27457
|
);
|
|
27458
|
+
const [resourceSubscriptions, setResourceSubscriptions] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
27181
27459
|
const [selectedPrompt, setSelectedPrompt] = reactExports.useState(null);
|
|
27182
27460
|
const [selectedTool, setSelectedTool] = reactExports.useState(null);
|
|
27183
27461
|
const [nextResourceCursor, setNextResourceCursor] = reactExports.useState();
|
|
@@ -27202,6 +27480,7 @@ const App = () => {
|
|
|
27202
27480
|
args,
|
|
27203
27481
|
sseUrl,
|
|
27204
27482
|
env,
|
|
27483
|
+
bearerToken,
|
|
27205
27484
|
proxyServerUrl: PROXY_SERVER_URL,
|
|
27206
27485
|
onNotification: (notification) => {
|
|
27207
27486
|
setNotifications((prev) => [...prev, notification]);
|
|
@@ -27232,6 +27511,9 @@ const App = () => {
|
|
|
27232
27511
|
reactExports.useEffect(() => {
|
|
27233
27512
|
localStorage.setItem("lastTransportType", transportType);
|
|
27234
27513
|
}, [transportType]);
|
|
27514
|
+
reactExports.useEffect(() => {
|
|
27515
|
+
localStorage.setItem("lastBearerToken", bearerToken);
|
|
27516
|
+
}, [bearerToken]);
|
|
27235
27517
|
reactExports.useEffect(() => {
|
|
27236
27518
|
const serverUrl = params.get("serverUrl");
|
|
27237
27519
|
if (serverUrl) {
|
|
@@ -27240,7 +27522,7 @@ const App = () => {
|
|
|
27240
27522
|
const newUrl = new URL(window.location.href);
|
|
27241
27523
|
newUrl.searchParams.delete("serverUrl");
|
|
27242
27524
|
window.history.replaceState({}, "", newUrl.toString());
|
|
27243
|
-
B$
|
|
27525
|
+
B$2.success("Successfully authenticated with OAuth");
|
|
27244
27526
|
connectMcpServer();
|
|
27245
27527
|
}
|
|
27246
27528
|
}, []);
|
|
@@ -27323,6 +27605,36 @@ const App = () => {
|
|
|
27323
27605
|
);
|
|
27324
27606
|
setResourceContent(JSON.stringify(response, null, 2));
|
|
27325
27607
|
};
|
|
27608
|
+
const subscribeToResource = async (uri) => {
|
|
27609
|
+
if (!resourceSubscriptions.has(uri)) {
|
|
27610
|
+
await makeRequest(
|
|
27611
|
+
{
|
|
27612
|
+
method: "resources/subscribe",
|
|
27613
|
+
params: { uri }
|
|
27614
|
+
},
|
|
27615
|
+
z.object({}),
|
|
27616
|
+
"resources"
|
|
27617
|
+
);
|
|
27618
|
+
const clone = new Set(resourceSubscriptions);
|
|
27619
|
+
clone.add(uri);
|
|
27620
|
+
setResourceSubscriptions(clone);
|
|
27621
|
+
}
|
|
27622
|
+
};
|
|
27623
|
+
const unsubscribeFromResource = async (uri) => {
|
|
27624
|
+
if (resourceSubscriptions.has(uri)) {
|
|
27625
|
+
await makeRequest(
|
|
27626
|
+
{
|
|
27627
|
+
method: "resources/unsubscribe",
|
|
27628
|
+
params: { uri }
|
|
27629
|
+
},
|
|
27630
|
+
z.object({}),
|
|
27631
|
+
"resources"
|
|
27632
|
+
);
|
|
27633
|
+
const clone = new Set(resourceSubscriptions);
|
|
27634
|
+
clone.delete(uri);
|
|
27635
|
+
setResourceSubscriptions(clone);
|
|
27636
|
+
}
|
|
27637
|
+
};
|
|
27326
27638
|
const listPrompts = async () => {
|
|
27327
27639
|
const response = await makeRequest(
|
|
27328
27640
|
{
|
|
@@ -27335,11 +27647,11 @@ const App = () => {
|
|
|
27335
27647
|
setPrompts(response.prompts);
|
|
27336
27648
|
setNextPromptCursor(response.nextCursor);
|
|
27337
27649
|
};
|
|
27338
|
-
const getPrompt = async (
|
|
27650
|
+
const getPrompt = async (name2, args2 = {}) => {
|
|
27339
27651
|
const response = await makeRequest(
|
|
27340
27652
|
{
|
|
27341
27653
|
method: "prompts/get",
|
|
27342
|
-
params: { name, arguments: args2 }
|
|
27654
|
+
params: { name: name2, arguments: args2 }
|
|
27343
27655
|
},
|
|
27344
27656
|
GetPromptResultSchema,
|
|
27345
27657
|
"prompts"
|
|
@@ -27358,12 +27670,12 @@ const App = () => {
|
|
|
27358
27670
|
setTools(response.tools);
|
|
27359
27671
|
setNextToolCursor(response.nextCursor);
|
|
27360
27672
|
};
|
|
27361
|
-
const callTool = async (
|
|
27673
|
+
const callTool = async (name2, params2) => {
|
|
27362
27674
|
const response = await makeRequest(
|
|
27363
27675
|
{
|
|
27364
27676
|
method: "tools/call",
|
|
27365
27677
|
params: {
|
|
27366
|
-
name,
|
|
27678
|
+
name: name2,
|
|
27367
27679
|
arguments: params2,
|
|
27368
27680
|
_meta: {
|
|
27369
27681
|
progressToken: progressTokenRef.current++
|
|
@@ -27378,6 +27690,16 @@ const App = () => {
|
|
|
27378
27690
|
const handleRootsChange = async () => {
|
|
27379
27691
|
await sendNotification({ method: "notifications/roots/list_changed" });
|
|
27380
27692
|
};
|
|
27693
|
+
const sendLogLevelRequest = async (level) => {
|
|
27694
|
+
await makeRequest(
|
|
27695
|
+
{
|
|
27696
|
+
method: "logging/setLevel",
|
|
27697
|
+
params: { level }
|
|
27698
|
+
},
|
|
27699
|
+
z.object({})
|
|
27700
|
+
);
|
|
27701
|
+
setLogLevel(level);
|
|
27702
|
+
};
|
|
27381
27703
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-screen bg-background", children: [
|
|
27382
27704
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
27383
27705
|
Sidebar,
|
|
@@ -27393,8 +27715,13 @@ const App = () => {
|
|
|
27393
27715
|
setSseUrl,
|
|
27394
27716
|
env,
|
|
27395
27717
|
setEnv,
|
|
27718
|
+
bearerToken,
|
|
27719
|
+
setBearerToken,
|
|
27396
27720
|
onConnect: connectMcpServer,
|
|
27397
|
-
stdErrNotifications
|
|
27721
|
+
stdErrNotifications,
|
|
27722
|
+
logLevel,
|
|
27723
|
+
sendLogLevelRequest,
|
|
27724
|
+
loggingSupported: !!(serverCapabilities == null ? void 0 : serverCapabilities.logging) || false
|
|
27398
27725
|
}
|
|
27399
27726
|
),
|
|
27400
27727
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
@@ -27486,6 +27813,16 @@ const App = () => {
|
|
|
27486
27813
|
clearError("resources");
|
|
27487
27814
|
setSelectedResource(resource);
|
|
27488
27815
|
},
|
|
27816
|
+
resourceSubscriptionsSupported: ((_a = serverCapabilities == null ? void 0 : serverCapabilities.resources) == null ? void 0 : _a.subscribe) || false,
|
|
27817
|
+
resourceSubscriptions,
|
|
27818
|
+
subscribeToResource: (uri) => {
|
|
27819
|
+
clearError("resources");
|
|
27820
|
+
subscribeToResource(uri);
|
|
27821
|
+
},
|
|
27822
|
+
unsubscribeFromResource: (uri) => {
|
|
27823
|
+
clearError("resources");
|
|
27824
|
+
unsubscribeFromResource(uri);
|
|
27825
|
+
},
|
|
27489
27826
|
handleCompletion,
|
|
27490
27827
|
completionsSupported,
|
|
27491
27828
|
resourceContent,
|
|
@@ -27506,9 +27843,9 @@ const App = () => {
|
|
|
27506
27843
|
setPrompts([]);
|
|
27507
27844
|
setNextPromptCursor(void 0);
|
|
27508
27845
|
},
|
|
27509
|
-
getPrompt: (
|
|
27846
|
+
getPrompt: (name2, args2) => {
|
|
27510
27847
|
clearError("prompts");
|
|
27511
|
-
getPrompt(
|
|
27848
|
+
getPrompt(name2, args2);
|
|
27512
27849
|
},
|
|
27513
27850
|
selectedPrompt,
|
|
27514
27851
|
setSelectedPrompt: (prompt) => {
|
|
@@ -27534,9 +27871,9 @@ const App = () => {
|
|
|
27534
27871
|
setTools([]);
|
|
27535
27872
|
setNextToolCursor(void 0);
|
|
27536
27873
|
},
|
|
27537
|
-
callTool: (
|
|
27874
|
+
callTool: (name2, params2) => {
|
|
27538
27875
|
clearError("tools");
|
|
27539
|
-
callTool(
|
|
27876
|
+
callTool(name2, params2);
|
|
27540
27877
|
},
|
|
27541
27878
|
selectedTool,
|
|
27542
27879
|
setSelectedTool: (tool) => {
|
|
@@ -27615,7 +27952,7 @@ const App = () => {
|
|
|
27615
27952
|
createRoot(document.getElementById("root")).render(
|
|
27616
27953
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.StrictMode, { children: [
|
|
27617
27954
|
/* @__PURE__ */ jsxRuntimeExports.jsx(App, {}),
|
|
27618
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Q
|
|
27955
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Q, {})
|
|
27619
27956
|
] })
|
|
27620
27957
|
);
|
|
27621
27958
|
export {
|