@motiadev/plugin-states 0.8.2-beta.140-073201 → 0.8.2-beta.140-930160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -74
- package/dist/index.js +332 -1792
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import me, { useState as S, useCallback as V, useEffect as U, useMemo as $, useRef as he } from "react";
|
|
2
|
+
import { useThemeStore as xe, Button as D, Sidebar as pe, Input as ge, Table as ve, TableHeader as be, TableRow as Z, TableHead as I, Checkbox as Q, TableBody as je, cn as ke, TableCell as P } from "@motiadev/ui";
|
|
3
|
+
import { Check as Se, AlertCircle as K, Loader2 as Ee, Save as ye, X as ae, Search as Te, Trash as _e, RefreshCw as Ne } from "lucide-react";
|
|
4
|
+
import { create as Re } from "zustand";
|
|
5
|
+
import we from "react18-json-view";
|
|
6
|
+
import Ce, { useMonaco as Oe } from "@monaco-editor/react";
|
|
7
|
+
var A = { exports: {} }, C = {};
|
|
5
8
|
/**
|
|
6
9
|
* @license React
|
|
7
10
|
* react-jsx-runtime.production.js
|
|
@@ -11,29 +14,29 @@ var he = { exports: {} }, se = {};
|
|
|
11
14
|
* This source code is licensed under the MIT license found in the
|
|
12
15
|
* LICENSE file in the root directory of this source tree.
|
|
13
16
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
for (var
|
|
24
|
-
|
|
25
|
-
} else
|
|
26
|
-
return
|
|
27
|
-
$$typeof:
|
|
28
|
-
type:
|
|
29
|
-
key:
|
|
30
|
-
ref:
|
|
31
|
-
props:
|
|
17
|
+
var ee;
|
|
18
|
+
function Ie() {
|
|
19
|
+
if (ee) return C;
|
|
20
|
+
ee = 1;
|
|
21
|
+
var a = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
|
|
22
|
+
function d(h, n, l) {
|
|
23
|
+
var x = null;
|
|
24
|
+
if (l !== void 0 && (x = "" + l), n.key !== void 0 && (x = "" + n.key), "key" in n) {
|
|
25
|
+
l = {};
|
|
26
|
+
for (var c in n)
|
|
27
|
+
c !== "key" && (l[c] = n[c]);
|
|
28
|
+
} else l = n;
|
|
29
|
+
return n = l.ref, {
|
|
30
|
+
$$typeof: a,
|
|
31
|
+
type: h,
|
|
32
|
+
key: x,
|
|
33
|
+
ref: n !== void 0 ? n : null,
|
|
34
|
+
props: l
|
|
32
35
|
};
|
|
33
36
|
}
|
|
34
|
-
return
|
|
37
|
+
return C.Fragment = i, C.jsx = d, C.jsxs = d, C;
|
|
35
38
|
}
|
|
36
|
-
var
|
|
39
|
+
var O = {};
|
|
37
40
|
/**
|
|
38
41
|
* @license React
|
|
39
42
|
* react-jsx-runtime.development.js
|
|
@@ -43,1846 +46,383 @@ var oe = {};
|
|
|
43
46
|
* This source code is licensed under the MIT license found in the
|
|
44
47
|
* LICENSE file in the root directory of this source tree.
|
|
45
48
|
*/
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return
|
|
49
|
-
function e
|
|
50
|
-
if (
|
|
51
|
-
if (typeof
|
|
52
|
-
return
|
|
53
|
-
if (typeof
|
|
54
|
-
switch (
|
|
55
|
-
case
|
|
49
|
+
var re;
|
|
50
|
+
function Pe() {
|
|
51
|
+
return re || (re = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
+
function a(e) {
|
|
53
|
+
if (e == null) return null;
|
|
54
|
+
if (typeof e == "function")
|
|
55
|
+
return e.$$typeof === de ? null : e.displayName || e.name || null;
|
|
56
|
+
if (typeof e == "string") return e;
|
|
57
|
+
switch (e) {
|
|
58
|
+
case y:
|
|
56
59
|
return "Fragment";
|
|
57
|
-
case
|
|
60
|
+
case T:
|
|
58
61
|
return "Profiler";
|
|
59
|
-
case
|
|
62
|
+
case t:
|
|
60
63
|
return "StrictMode";
|
|
61
|
-
case
|
|
64
|
+
case oe:
|
|
62
65
|
return "Suspense";
|
|
63
|
-
case
|
|
66
|
+
case le:
|
|
64
67
|
return "SuspenseList";
|
|
65
|
-
case
|
|
68
|
+
case ie:
|
|
66
69
|
return "Activity";
|
|
67
70
|
}
|
|
68
|
-
if (typeof
|
|
69
|
-
switch (typeof
|
|
71
|
+
if (typeof e == "object")
|
|
72
|
+
switch (typeof e.tag == "number" && console.error(
|
|
70
73
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
71
|
-
),
|
|
72
|
-
case
|
|
74
|
+
), e.$$typeof) {
|
|
75
|
+
case w:
|
|
73
76
|
return "Portal";
|
|
74
|
-
case
|
|
75
|
-
return (
|
|
76
|
-
case
|
|
77
|
-
return (
|
|
78
|
-
case
|
|
79
|
-
var
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
return
|
|
83
|
-
case
|
|
84
|
-
|
|
77
|
+
case v:
|
|
78
|
+
return (e.displayName || "Context") + ".Provider";
|
|
79
|
+
case _:
|
|
80
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
81
|
+
case ne:
|
|
82
|
+
var s = e.render;
|
|
83
|
+
return e = e.displayName, e || (e = s.displayName || s.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
84
|
+
case ce:
|
|
85
|
+
return s = e.displayName || null, s !== null ? s : a(e.type) || "Memo";
|
|
86
|
+
case W:
|
|
87
|
+
s = e._payload, e = e._init;
|
|
85
88
|
try {
|
|
86
|
-
return e(
|
|
89
|
+
return a(e(s));
|
|
87
90
|
} catch {
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
return null;
|
|
91
94
|
}
|
|
92
|
-
function
|
|
93
|
-
return "" +
|
|
95
|
+
function i(e) {
|
|
96
|
+
return "" + e;
|
|
94
97
|
}
|
|
95
|
-
function
|
|
98
|
+
function d(e) {
|
|
96
99
|
try {
|
|
97
|
-
|
|
98
|
-
var
|
|
100
|
+
i(e);
|
|
101
|
+
var s = !1;
|
|
99
102
|
} catch {
|
|
100
|
-
|
|
103
|
+
s = !0;
|
|
101
104
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return
|
|
106
|
-
|
|
105
|
+
if (s) {
|
|
106
|
+
s = console;
|
|
107
|
+
var o = s.error, f = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
108
|
+
return o.call(
|
|
109
|
+
s,
|
|
107
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
-
|
|
109
|
-
),
|
|
111
|
+
f
|
|
112
|
+
), i(e);
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
114
|
-
if (typeof
|
|
115
|
+
function h(e) {
|
|
116
|
+
if (e === y) return "<>";
|
|
117
|
+
if (typeof e == "object" && e !== null && e.$$typeof === W)
|
|
115
118
|
return "<...>";
|
|
116
119
|
try {
|
|
117
|
-
var
|
|
118
|
-
return
|
|
120
|
+
var s = a(e);
|
|
121
|
+
return s ? "<" + s + ">" : "<...>";
|
|
119
122
|
} catch {
|
|
120
123
|
return "<...>";
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
|
-
function
|
|
124
|
-
var
|
|
125
|
-
return
|
|
126
|
+
function n() {
|
|
127
|
+
var e = J.A;
|
|
128
|
+
return e === null ? null : e.getOwner();
|
|
126
129
|
}
|
|
127
|
-
function
|
|
130
|
+
function l() {
|
|
128
131
|
return Error("react-stack-top-frame");
|
|
129
132
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
132
|
-
var
|
|
133
|
-
if (
|
|
133
|
+
function x(e) {
|
|
134
|
+
if (q.call(e, "key")) {
|
|
135
|
+
var s = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
136
|
+
if (s && s.isReactWarning) return !1;
|
|
134
137
|
}
|
|
135
|
-
return
|
|
138
|
+
return e.key !== void 0;
|
|
136
139
|
}
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
|
|
140
|
+
function c(e, s) {
|
|
141
|
+
function o() {
|
|
142
|
+
G || (G = !0, console.error(
|
|
140
143
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
141
|
-
|
|
144
|
+
s
|
|
142
145
|
));
|
|
143
146
|
}
|
|
144
|
-
|
|
145
|
-
get:
|
|
147
|
+
o.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
148
|
+
get: o,
|
|
146
149
|
configurable: !0
|
|
147
150
|
});
|
|
148
151
|
}
|
|
149
|
-
function
|
|
150
|
-
var
|
|
151
|
-
return
|
|
152
|
+
function p() {
|
|
153
|
+
var e = a(this.type);
|
|
154
|
+
return z[e] || (z[e] = !0, console.error(
|
|
152
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
153
|
-
)),
|
|
154
|
-
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
157
|
-
$$typeof:
|
|
158
|
-
type:
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
156
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
157
|
+
}
|
|
158
|
+
function g(e, s, o, f, k, b, Y, F) {
|
|
159
|
+
return o = b.ref, e = {
|
|
160
|
+
$$typeof: N,
|
|
161
|
+
type: e,
|
|
162
|
+
key: s,
|
|
163
|
+
props: b,
|
|
161
164
|
_owner: k
|
|
162
|
-
}, (
|
|
165
|
+
}, (o !== void 0 ? o : null) !== null ? Object.defineProperty(e, "ref", {
|
|
163
166
|
enumerable: !1,
|
|
164
|
-
get:
|
|
165
|
-
}) : Object.defineProperty(
|
|
167
|
+
get: p
|
|
168
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
166
169
|
configurable: !1,
|
|
167
170
|
enumerable: !1,
|
|
168
171
|
writable: !0,
|
|
169
172
|
value: 0
|
|
170
|
-
}), Object.defineProperty(
|
|
173
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
171
174
|
configurable: !1,
|
|
172
175
|
enumerable: !1,
|
|
173
176
|
writable: !0,
|
|
174
177
|
value: null
|
|
175
|
-
}), Object.defineProperty(
|
|
178
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
176
179
|
configurable: !1,
|
|
177
180
|
enumerable: !1,
|
|
178
181
|
writable: !0,
|
|
179
|
-
value:
|
|
180
|
-
}), Object.defineProperty(
|
|
182
|
+
value: Y
|
|
183
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
181
184
|
configurable: !1,
|
|
182
185
|
enumerable: !1,
|
|
183
186
|
writable: !0,
|
|
184
|
-
value:
|
|
185
|
-
}), Object.freeze && (Object.freeze(
|
|
186
|
-
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
value: F
|
|
188
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
189
|
+
}
|
|
190
|
+
function u(e, s, o, f, k, b, Y, F) {
|
|
191
|
+
var m = s.children;
|
|
192
|
+
if (m !== void 0)
|
|
193
|
+
if (f)
|
|
194
|
+
if (ue(m)) {
|
|
195
|
+
for (f = 0; f < m.length; f++)
|
|
196
|
+
E(m[f]);
|
|
197
|
+
Object.freeze && Object.freeze(m);
|
|
195
198
|
} else
|
|
196
199
|
console.error(
|
|
197
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
198
201
|
);
|
|
199
|
-
else
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
202
|
+
else E(m);
|
|
203
|
+
if (q.call(s, "key")) {
|
|
204
|
+
m = a(e);
|
|
205
|
+
var R = Object.keys(s).filter(function(fe) {
|
|
206
|
+
return fe !== "key";
|
|
204
207
|
});
|
|
205
|
-
|
|
208
|
+
f = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", B[m + f] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
210
|
let props = %s;
|
|
208
211
|
<%s {...props} />
|
|
209
212
|
React keys must be passed directly to JSX without using spread:
|
|
210
213
|
let props = %s;
|
|
211
214
|
<%s key={someKey} {...props} />`,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
),
|
|
215
|
+
f,
|
|
216
|
+
m,
|
|
217
|
+
R,
|
|
218
|
+
m
|
|
219
|
+
), B[m + f] = !0);
|
|
217
220
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
225
|
-
typeof
|
|
226
|
-
),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
221
|
+
if (m = null, o !== void 0 && (d(o), m = "" + o), x(s) && (d(s.key), m = "" + s.key), "key" in s) {
|
|
222
|
+
o = {};
|
|
223
|
+
for (var M in s)
|
|
224
|
+
M !== "key" && (o[M] = s[M]);
|
|
225
|
+
} else o = s;
|
|
226
|
+
return m && c(
|
|
227
|
+
o,
|
|
228
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
229
|
+
), g(
|
|
230
|
+
e,
|
|
231
|
+
m,
|
|
232
|
+
b,
|
|
230
233
|
k,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
n(),
|
|
235
|
+
o,
|
|
236
|
+
Y,
|
|
237
|
+
F
|
|
235
238
|
);
|
|
236
239
|
}
|
|
237
|
-
function
|
|
238
|
-
typeof
|
|
240
|
+
function E(e) {
|
|
241
|
+
typeof e == "object" && e !== null && e.$$typeof === N && e._store && (e._store.validated = 1);
|
|
239
242
|
}
|
|
240
|
-
var
|
|
243
|
+
var j = me, N = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), t = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), v = Symbol.for("react.context"), ne = Symbol.for("react.forward_ref"), oe = Symbol.for("react.suspense"), le = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), ie = Symbol.for("react.activity"), de = Symbol.for("react.client.reference"), J = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = Object.prototype.hasOwnProperty, ue = Array.isArray, L = console.createTask ? console.createTask : function() {
|
|
241
244
|
return null;
|
|
242
245
|
};
|
|
243
|
-
|
|
244
|
-
react_stack_bottom_frame: function(
|
|
245
|
-
return
|
|
246
|
+
j = {
|
|
247
|
+
react_stack_bottom_frame: function(e) {
|
|
248
|
+
return e();
|
|
246
249
|
}
|
|
247
250
|
};
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
|
|
253
|
-
var
|
|
254
|
-
return
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
251
|
+
var G, z = {}, H = j.react_stack_bottom_frame.bind(
|
|
252
|
+
j,
|
|
253
|
+
l
|
|
254
|
+
)(), X = L(h(l)), B = {};
|
|
255
|
+
O.Fragment = y, O.jsx = function(e, s, o, f, k) {
|
|
256
|
+
var b = 1e4 > J.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return u(
|
|
258
|
+
e,
|
|
259
|
+
s,
|
|
260
|
+
o,
|
|
258
261
|
!1,
|
|
259
|
-
|
|
262
|
+
f,
|
|
260
263
|
k,
|
|
261
|
-
|
|
262
|
-
|
|
264
|
+
b ? Error("react-stack-top-frame") : H,
|
|
265
|
+
b ? L(h(e)) : X
|
|
263
266
|
);
|
|
264
|
-
},
|
|
265
|
-
var
|
|
266
|
-
return
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
}, O.jsxs = function(e, s, o, f, k) {
|
|
268
|
+
var b = 1e4 > J.recentlyCreatedOwnerStacks++;
|
|
269
|
+
return u(
|
|
270
|
+
e,
|
|
271
|
+
s,
|
|
272
|
+
o,
|
|
270
273
|
!0,
|
|
271
|
-
|
|
274
|
+
f,
|
|
272
275
|
k,
|
|
273
|
-
|
|
274
|
-
|
|
276
|
+
b ? Error("react-stack-top-frame") : H,
|
|
277
|
+
b ? L(h(e)) : X
|
|
275
278
|
);
|
|
276
279
|
};
|
|
277
|
-
}()),
|
|
278
|
-
}
|
|
279
|
-
var
|
|
280
|
-
function
|
|
281
|
-
return
|
|
282
|
-
}
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
293
|
-
), tt = (e) => {
|
|
294
|
-
const t = sr(e);
|
|
295
|
-
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
296
|
-
}, Rt = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), or = (e) => {
|
|
297
|
-
for (const t in e)
|
|
298
|
-
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
299
|
-
return !0;
|
|
300
|
-
};
|
|
301
|
-
/**
|
|
302
|
-
* @license lucide-react v0.545.0 - ISC
|
|
303
|
-
*
|
|
304
|
-
* This source code is licensed under the ISC license.
|
|
305
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
-
*/
|
|
307
|
-
var ir = {
|
|
308
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
309
|
-
width: 24,
|
|
310
|
-
height: 24,
|
|
311
|
-
viewBox: "0 0 24 24",
|
|
312
|
-
fill: "none",
|
|
313
|
-
stroke: "currentColor",
|
|
314
|
-
strokeWidth: 2,
|
|
315
|
-
strokeLinecap: "round",
|
|
316
|
-
strokeLinejoin: "round"
|
|
317
|
-
};
|
|
318
|
-
/**
|
|
319
|
-
* @license lucide-react v0.545.0 - ISC
|
|
320
|
-
*
|
|
321
|
-
* This source code is licensed under the ISC license.
|
|
322
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
-
*/
|
|
324
|
-
const cr = _t(
|
|
325
|
-
({
|
|
326
|
-
color: e = "currentColor",
|
|
327
|
-
size: t = 24,
|
|
328
|
-
strokeWidth: r = 2,
|
|
329
|
-
absoluteStrokeWidth: n,
|
|
330
|
-
className: s = "",
|
|
331
|
-
children: o,
|
|
332
|
-
iconNode: c,
|
|
333
|
-
...l
|
|
334
|
-
}, g) => Te(
|
|
335
|
-
"svg",
|
|
336
|
-
{
|
|
337
|
-
ref: g,
|
|
338
|
-
...ir,
|
|
339
|
-
width: t,
|
|
340
|
-
height: t,
|
|
341
|
-
stroke: e,
|
|
342
|
-
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
343
|
-
className: Rt("lucide", s),
|
|
344
|
-
...!o && !or(l) && { "aria-hidden": "true" },
|
|
345
|
-
...l
|
|
346
|
-
},
|
|
347
|
-
[
|
|
348
|
-
...c.map(([u, d]) => Te(u, d)),
|
|
349
|
-
...Array.isArray(o) ? o : [o]
|
|
350
|
-
]
|
|
351
|
-
)
|
|
352
|
-
);
|
|
353
|
-
/**
|
|
354
|
-
* @license lucide-react v0.545.0 - ISC
|
|
355
|
-
*
|
|
356
|
-
* This source code is licensed under the ISC license.
|
|
357
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
-
*/
|
|
359
|
-
const X = (e, t) => {
|
|
360
|
-
const r = _t(
|
|
361
|
-
({ className: n, ...s }, o) => Te(cr, {
|
|
362
|
-
ref: o,
|
|
363
|
-
iconNode: t,
|
|
364
|
-
className: Rt(
|
|
365
|
-
`lucide-${ar(tt(e))}`,
|
|
366
|
-
`lucide-${e}`,
|
|
367
|
-
n
|
|
368
|
-
),
|
|
369
|
-
...s
|
|
370
|
-
})
|
|
371
|
-
);
|
|
372
|
-
return r.displayName = tt(e), r;
|
|
373
|
-
};
|
|
374
|
-
/**
|
|
375
|
-
* @license lucide-react v0.545.0 - ISC
|
|
376
|
-
*
|
|
377
|
-
* This source code is licensed under the ISC license.
|
|
378
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
-
*/
|
|
380
|
-
const lr = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], ur = X("check", lr);
|
|
381
|
-
/**
|
|
382
|
-
* @license lucide-react v0.545.0 - ISC
|
|
383
|
-
*
|
|
384
|
-
* This source code is licensed under the ISC license.
|
|
385
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
386
|
-
*/
|
|
387
|
-
const dr = [
|
|
388
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
389
|
-
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
390
|
-
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
391
|
-
], rt = X("circle-alert", dr);
|
|
392
|
-
/**
|
|
393
|
-
* @license lucide-react v0.545.0 - ISC
|
|
394
|
-
*
|
|
395
|
-
* This source code is licensed under the ISC license.
|
|
396
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
397
|
-
*/
|
|
398
|
-
const fr = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], pr = X("loader-circle", fr);
|
|
399
|
-
/**
|
|
400
|
-
* @license lucide-react v0.545.0 - ISC
|
|
401
|
-
*
|
|
402
|
-
* This source code is licensed under the ISC license.
|
|
403
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
404
|
-
*/
|
|
405
|
-
const gr = [
|
|
406
|
-
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
407
|
-
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
408
|
-
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
409
|
-
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
410
|
-
], hr = X("refresh-cw", gr);
|
|
411
|
-
/**
|
|
412
|
-
* @license lucide-react v0.545.0 - ISC
|
|
413
|
-
*
|
|
414
|
-
* This source code is licensed under the ISC license.
|
|
415
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
416
|
-
*/
|
|
417
|
-
const vr = [
|
|
418
|
-
[
|
|
419
|
-
"path",
|
|
420
|
-
{
|
|
421
|
-
d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
|
|
422
|
-
key: "1c8476"
|
|
423
|
-
}
|
|
424
|
-
],
|
|
425
|
-
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
426
|
-
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
427
|
-
], mr = X("save", vr);
|
|
428
|
-
/**
|
|
429
|
-
* @license lucide-react v0.545.0 - ISC
|
|
430
|
-
*
|
|
431
|
-
* This source code is licensed under the ISC license.
|
|
432
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
433
|
-
*/
|
|
434
|
-
const yr = [
|
|
435
|
-
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
436
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
437
|
-
], jr = X("search", yr);
|
|
438
|
-
/**
|
|
439
|
-
* @license lucide-react v0.545.0 - ISC
|
|
440
|
-
*
|
|
441
|
-
* This source code is licensed under the ISC license.
|
|
442
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
443
|
-
*/
|
|
444
|
-
const br = [
|
|
445
|
-
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
446
|
-
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
447
|
-
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
448
|
-
], wr = X("trash", br);
|
|
449
|
-
/**
|
|
450
|
-
* @license lucide-react v0.545.0 - ISC
|
|
451
|
-
*
|
|
452
|
-
* This source code is licensed under the ISC license.
|
|
453
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
454
|
-
*/
|
|
455
|
-
const xr = [
|
|
456
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
457
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
458
|
-
], Mt = X("x", xr), Cr = () => {
|
|
459
|
-
const [e, t] = P([]), r = K(() => {
|
|
460
|
-
fetch("/__motia/state").then(async (s) => {
|
|
461
|
-
if (s.ok)
|
|
462
|
-
return s.json();
|
|
463
|
-
throw await s.json();
|
|
464
|
-
}).then(t).catch((s) => console.error(s));
|
|
465
|
-
}, []), n = (s) => {
|
|
280
|
+
}()), O;
|
|
281
|
+
}
|
|
282
|
+
var te;
|
|
283
|
+
function Ae() {
|
|
284
|
+
return te || (te = 1, process.env.NODE_ENV === "production" ? A.exports = Ie() : A.exports = Pe()), A.exports;
|
|
285
|
+
}
|
|
286
|
+
var r = Ae();
|
|
287
|
+
const $e = () => {
|
|
288
|
+
const [a, i] = S([]), d = V(() => {
|
|
289
|
+
fetch("/__motia/state").then(async (n) => {
|
|
290
|
+
if (n.ok)
|
|
291
|
+
return n.json();
|
|
292
|
+
throw await n.json();
|
|
293
|
+
}).then(i).catch((n) => console.error(n));
|
|
294
|
+
}, []), h = (n) => {
|
|
466
295
|
fetch("/__motia/state/delete", {
|
|
467
296
|
method: "POST",
|
|
468
297
|
headers: { "Content-Type": "application/json" },
|
|
469
|
-
body: JSON.stringify({ ids:
|
|
470
|
-
}).then(() =>
|
|
298
|
+
body: JSON.stringify({ ids: n })
|
|
299
|
+
}).then(() => d());
|
|
471
300
|
};
|
|
472
|
-
return
|
|
473
|
-
|
|
474
|
-
}, [
|
|
475
|
-
},
|
|
476
|
-
let t;
|
|
477
|
-
const r = /* @__PURE__ */ new Set(), n = (u, d) => {
|
|
478
|
-
const v = typeof u == "function" ? u(t) : u;
|
|
479
|
-
if (!Object.is(v, t)) {
|
|
480
|
-
const S = t;
|
|
481
|
-
t = d ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), r.forEach((T) => T(t, S));
|
|
482
|
-
}
|
|
483
|
-
}, s = () => t, l = { setState: n, getState: s, getInitialState: () => g, subscribe: (u) => (r.add(u), () => r.delete(u)) }, g = t = e(n, s, l);
|
|
484
|
-
return l;
|
|
485
|
-
}, Sr = (e) => e ? nt(e) : nt, Or = (e) => e;
|
|
486
|
-
function Er(e, t = Or) {
|
|
487
|
-
const r = W.useSyncExternalStore(
|
|
488
|
-
e.subscribe,
|
|
489
|
-
W.useCallback(() => t(e.getState()), [e, t]),
|
|
490
|
-
W.useCallback(() => t(e.getInitialState()), [e, t])
|
|
491
|
-
);
|
|
492
|
-
return W.useDebugValue(r), r;
|
|
493
|
-
}
|
|
494
|
-
const kr = (e) => {
|
|
495
|
-
const t = Sr(e), r = (n) => Er(t, n);
|
|
496
|
-
return Object.assign(r, t), r;
|
|
497
|
-
}, Ar = (e) => kr, at = Ar()((e) => ({
|
|
301
|
+
return U(() => {
|
|
302
|
+
d();
|
|
303
|
+
}, [d]), { items: a, deleteItems: h, refetch: d };
|
|
304
|
+
}, se = Re()((a) => ({
|
|
498
305
|
selectedStateId: void 0,
|
|
499
|
-
selectStateId: (
|
|
500
|
-
}))
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
function l(d) {
|
|
509
|
-
try {
|
|
510
|
-
u(n.next(d));
|
|
511
|
-
} catch (v) {
|
|
512
|
-
c(v);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
function g(d) {
|
|
516
|
-
try {
|
|
517
|
-
u(n.throw(d));
|
|
518
|
-
} catch (v) {
|
|
519
|
-
c(v);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
function u(d) {
|
|
523
|
-
d.done ? o(d.value) : s(d.value).then(l, g);
|
|
524
|
-
}
|
|
525
|
-
u((n = n.apply(e, [])).next());
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
var Tr = function() {
|
|
529
|
-
var e = document.getSelection();
|
|
530
|
-
if (!e.rangeCount)
|
|
531
|
-
return function() {
|
|
532
|
-
};
|
|
533
|
-
for (var t = document.activeElement, r = [], n = 0; n < e.rangeCount; n++)
|
|
534
|
-
r.push(e.getRangeAt(n));
|
|
535
|
-
switch (t.tagName.toUpperCase()) {
|
|
536
|
-
// .toUpperCase handles XHTML
|
|
537
|
-
case "INPUT":
|
|
538
|
-
case "TEXTAREA":
|
|
539
|
-
t.blur();
|
|
540
|
-
break;
|
|
541
|
-
default:
|
|
542
|
-
t = null;
|
|
543
|
-
break;
|
|
544
|
-
}
|
|
545
|
-
return e.removeAllRanges(), function() {
|
|
546
|
-
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(s) {
|
|
547
|
-
e.addRange(s);
|
|
548
|
-
}), t && t.focus();
|
|
549
|
-
};
|
|
550
|
-
}, _r = Tr, st = {
|
|
551
|
-
"text/plain": "Text",
|
|
552
|
-
"text/html": "Url",
|
|
553
|
-
default: "Text"
|
|
554
|
-
}, Rr = "Copy to clipboard: #{key}, Enter";
|
|
555
|
-
function Mr(e) {
|
|
556
|
-
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
557
|
-
return e.replace(/#{\s*key\s*}/g, t);
|
|
558
|
-
}
|
|
559
|
-
function Ir(e, t) {
|
|
560
|
-
var r, n, s, o, c, l, g = !1;
|
|
561
|
-
t || (t = {}), r = t.debug || !1;
|
|
562
|
-
try {
|
|
563
|
-
s = _r(), o = document.createRange(), c = document.getSelection(), l = document.createElement("span"), l.textContent = e, l.ariaHidden = "true", l.style.all = "unset", l.style.position = "fixed", l.style.top = 0, l.style.clip = "rect(0, 0, 0, 0)", l.style.whiteSpace = "pre", l.style.webkitUserSelect = "text", l.style.MozUserSelect = "text", l.style.msUserSelect = "text", l.style.userSelect = "text", l.addEventListener("copy", function(d) {
|
|
564
|
-
if (d.stopPropagation(), t.format)
|
|
565
|
-
if (d.preventDefault(), typeof d.clipboardData > "u") {
|
|
566
|
-
r && console.warn("unable to use e.clipboardData"), r && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
567
|
-
var v = st[t.format] || st.default;
|
|
568
|
-
window.clipboardData.setData(v, e);
|
|
569
|
-
} else
|
|
570
|
-
d.clipboardData.clearData(), d.clipboardData.setData(t.format, e);
|
|
571
|
-
t.onCopy && (d.preventDefault(), t.onCopy(d.clipboardData));
|
|
572
|
-
}), document.body.appendChild(l), o.selectNodeContents(l), c.addRange(o);
|
|
573
|
-
var u = document.execCommand("copy");
|
|
574
|
-
if (!u)
|
|
575
|
-
throw new Error("copy command was unsuccessful");
|
|
576
|
-
g = !0;
|
|
577
|
-
} catch (d) {
|
|
578
|
-
r && console.error("unable to copy using execCommand: ", d), r && console.warn("trying IE specific stuff");
|
|
579
|
-
try {
|
|
580
|
-
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), g = !0;
|
|
581
|
-
} catch (v) {
|
|
582
|
-
r && console.error("unable to copy using clipboardData: ", v), r && console.error("falling back to prompt"), n = Mr("message" in t ? t.message : Rr), window.prompt(n, e);
|
|
583
|
-
}
|
|
584
|
-
} finally {
|
|
585
|
-
c && (typeof c.removeRange == "function" ? c.removeRange(o) : c.removeAllRanges()), l && document.body.removeChild(l), s();
|
|
586
|
-
}
|
|
587
|
-
return g;
|
|
588
|
-
}
|
|
589
|
-
var Pr = Ir;
|
|
590
|
-
function Q(e) {
|
|
591
|
-
return Object.prototype.toString.call(e) === "[object Object]";
|
|
592
|
-
}
|
|
593
|
-
function ce(e) {
|
|
594
|
-
return Array.isArray(e) ? e.length : Q(e) ? Object.keys(e).length : 0;
|
|
595
|
-
}
|
|
596
|
-
function $r(e, t) {
|
|
597
|
-
if (typeof e == "string")
|
|
598
|
-
return e;
|
|
599
|
-
try {
|
|
600
|
-
return JSON.stringify(e, (r, n) => {
|
|
601
|
-
switch (typeof n) {
|
|
602
|
-
case "bigint":
|
|
603
|
-
return String(n) + "n";
|
|
604
|
-
case "number":
|
|
605
|
-
case "boolean":
|
|
606
|
-
case "object":
|
|
607
|
-
case "string":
|
|
608
|
-
return n;
|
|
609
|
-
default:
|
|
610
|
-
return String(n);
|
|
611
|
-
}
|
|
612
|
-
}, t);
|
|
613
|
-
} catch (r) {
|
|
614
|
-
return `${r.name}: ${r.message}` || "JSON.stringify failed";
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
function Dr(e) {
|
|
618
|
-
return Nr(this, void 0, void 0, function* () {
|
|
619
|
-
try {
|
|
620
|
-
yield navigator.clipboard.writeText(e);
|
|
621
|
-
} catch {
|
|
622
|
-
Pr(e);
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
function ot(e, t, r, n, s, o) {
|
|
627
|
-
if (o && o.collapsed !== void 0)
|
|
628
|
-
return !!o.collapsed;
|
|
629
|
-
if (typeof n == "boolean")
|
|
630
|
-
return n;
|
|
631
|
-
if (typeof n == "number" && t > n)
|
|
632
|
-
return !0;
|
|
633
|
-
const c = ce(e);
|
|
634
|
-
if (typeof n == "function") {
|
|
635
|
-
const l = Ue(n, [{ node: e, depth: t, indexOrName: r, size: c }]);
|
|
636
|
-
if (typeof l == "boolean")
|
|
637
|
-
return l;
|
|
638
|
-
}
|
|
639
|
-
return !!(Array.isArray(e) && c > s || Q(e) && c > s);
|
|
640
|
-
}
|
|
641
|
-
function it(e, t, r, n, s, o) {
|
|
642
|
-
if (o && o.collapsed !== void 0)
|
|
643
|
-
return !!o.collapsed;
|
|
644
|
-
if (typeof n == "boolean")
|
|
645
|
-
return n;
|
|
646
|
-
if (typeof n == "number" && t > n)
|
|
647
|
-
return !0;
|
|
648
|
-
const c = Math.ceil(e.length / 100);
|
|
649
|
-
if (typeof n == "function") {
|
|
650
|
-
const l = Ue(n, [{ node: e, depth: t, indexOrName: r, size: c }]);
|
|
651
|
-
if (typeof l == "boolean")
|
|
652
|
-
return l;
|
|
653
|
-
}
|
|
654
|
-
return !!(Array.isArray(e) && c > s || Q(e) && c > s);
|
|
655
|
-
}
|
|
656
|
-
function ae(e, t, r) {
|
|
657
|
-
return typeof e == "boolean" ? e : !!(typeof e == "number" && t > e || e === "collapsed" && r || e === "expanded" && !r);
|
|
658
|
-
}
|
|
659
|
-
function Ue(e, t) {
|
|
660
|
-
try {
|
|
661
|
-
return e(...t);
|
|
662
|
-
} catch (r) {
|
|
663
|
-
reportError(r);
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
function It(e) {
|
|
667
|
-
if (e === !0 || Q(e) && e.add === !0)
|
|
668
|
-
return !0;
|
|
669
|
-
}
|
|
670
|
-
function ct(e) {
|
|
671
|
-
if (e === !0 || Q(e) && e.edit === !0)
|
|
672
|
-
return !0;
|
|
673
|
-
}
|
|
674
|
-
function ze(e) {
|
|
675
|
-
if (e === !0 || Q(e) && e.delete === !0)
|
|
676
|
-
return !0;
|
|
677
|
-
}
|
|
678
|
-
function Lr(e) {
|
|
679
|
-
return typeof e == "function";
|
|
680
|
-
}
|
|
681
|
-
function Pt(e) {
|
|
682
|
-
return !e || e.add === void 0 || !!e.add;
|
|
683
|
-
}
|
|
684
|
-
function lt(e) {
|
|
685
|
-
return !e || e.edit === void 0 || !!e.edit;
|
|
686
|
-
}
|
|
687
|
-
function Ze(e) {
|
|
688
|
-
return !e || e.delete === void 0 || !!e.delete;
|
|
689
|
-
}
|
|
690
|
-
function we(e) {
|
|
691
|
-
return !e || e.enableClipboard === void 0 || !!e.enableClipboard;
|
|
692
|
-
}
|
|
693
|
-
function Vr(e) {
|
|
694
|
-
return !e || e.matchesURL === void 0 || !!e.matchesURL;
|
|
695
|
-
}
|
|
696
|
-
function Hr(e, t) {
|
|
697
|
-
return e === "string" ? t.trim().replace(/^\"([\s\S]+?)\"$/, "$1") : t;
|
|
698
|
-
}
|
|
699
|
-
var ut;
|
|
700
|
-
function _e() {
|
|
701
|
-
return _e = Object.assign ? Object.assign.bind() : function(e) {
|
|
702
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
703
|
-
var r = arguments[t];
|
|
704
|
-
for (var n in r)
|
|
705
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
706
|
-
}
|
|
707
|
-
return e;
|
|
708
|
-
}, _e.apply(this, arguments);
|
|
709
|
-
}
|
|
710
|
-
var Je = function(t) {
|
|
711
|
-
return /* @__PURE__ */ D.createElement("svg", _e({
|
|
712
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
713
|
-
width: 16,
|
|
714
|
-
height: 16,
|
|
715
|
-
fill: "none",
|
|
716
|
-
viewBox: "0 0 16 16"
|
|
717
|
-
}, t), ut || (ut = /* @__PURE__ */ D.createElement("path", {
|
|
718
|
-
fill: "currentColor",
|
|
719
|
-
d: "M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"
|
|
720
|
-
})));
|
|
721
|
-
}, dt;
|
|
722
|
-
function Re() {
|
|
723
|
-
return Re = Object.assign ? Object.assign.bind() : function(e) {
|
|
724
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
725
|
-
var r = arguments[t];
|
|
726
|
-
for (var n in r)
|
|
727
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
728
|
-
}
|
|
729
|
-
return e;
|
|
730
|
-
}, Re.apply(this, arguments);
|
|
731
|
-
}
|
|
732
|
-
var Fr = function(t) {
|
|
733
|
-
return /* @__PURE__ */ D.createElement("svg", Re({
|
|
734
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
735
|
-
width: 24,
|
|
736
|
-
height: 24,
|
|
737
|
-
fill: "none",
|
|
738
|
-
viewBox: "0 0 24 24"
|
|
739
|
-
}, t), dt || (dt = /* @__PURE__ */ D.createElement("path", {
|
|
740
|
-
fill: "currentColor",
|
|
741
|
-
d: "M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"
|
|
742
|
-
})));
|
|
743
|
-
}, ft, pt;
|
|
744
|
-
function Me() {
|
|
745
|
-
return Me = Object.assign ? Object.assign.bind() : function(e) {
|
|
746
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
747
|
-
var r = arguments[t];
|
|
748
|
-
for (var n in r)
|
|
749
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
750
|
-
}
|
|
751
|
-
return e;
|
|
752
|
-
}, Me.apply(this, arguments);
|
|
753
|
-
}
|
|
754
|
-
var Ur = function(t) {
|
|
755
|
-
return /* @__PURE__ */ D.createElement("svg", Me({
|
|
756
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
757
|
-
width: 24,
|
|
758
|
-
height: 24,
|
|
759
|
-
fill: "none",
|
|
760
|
-
viewBox: "0 0 24 24"
|
|
761
|
-
}, t), ft || (ft = /* @__PURE__ */ D.createElement("path", {
|
|
762
|
-
fill: "currentColor",
|
|
763
|
-
d: "M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"
|
|
764
|
-
})), pt || (pt = /* @__PURE__ */ D.createElement("path", {
|
|
765
|
-
fill: "#14C786",
|
|
766
|
-
d: "M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"
|
|
767
|
-
})));
|
|
768
|
-
};
|
|
769
|
-
function xe({ node: e, nodeMeta: t }) {
|
|
770
|
-
const { customizeCopy: r, CopyComponent: n, CopiedComponent: s } = te(ee), [o, c] = P(!1), l = (g) => {
|
|
771
|
-
g.stopPropagation();
|
|
772
|
-
const u = r(e, t);
|
|
773
|
-
typeof u == "string" && u && Dr(u), c(!0), setTimeout(() => c(!1), 3e3);
|
|
774
|
-
};
|
|
775
|
-
return o ? typeof s == "function" ? a.jsx(s, { className: "json-view--copy", style: { display: "inline-block" } }) : a.jsx(Ur, { className: "json-view--copy", style: { display: "inline-block" } }) : typeof n == "function" ? a.jsx(n, { onClick: l, className: "json-view--copy" }) : a.jsx(Fr, { onClick: l, className: "json-view--copy" });
|
|
776
|
-
}
|
|
777
|
-
function Ie({ indexOrName: e, value: t, depth: r, deleteHandle: n, editHandle: s, parent: o, parentPath: c }) {
|
|
778
|
-
const { displayArrayIndex: l } = te(ee), g = Array.isArray(o);
|
|
779
|
-
return a.jsxs("div", Object.assign({ className: "json-view--pair" }, { children: [!g || g && l ? a.jsxs(a.Fragment, { children: [a.jsx("span", Object.assign({ className: typeof e == "number" ? "json-view--index" : "json-view--property" }, { children: e })), ":", " "] }) : a.jsx(a.Fragment, {}), a.jsx(Dt, { node: t, depth: r + 1, deleteHandle: (u, d) => n(u, d), editHandle: (u, d, v, S) => s(u, d, v, S), parent: o, indexOrName: e, parentPath: c })] }));
|
|
780
|
-
}
|
|
781
|
-
var gt, ht;
|
|
782
|
-
function Pe() {
|
|
783
|
-
return Pe = Object.assign ? Object.assign.bind() : function(e) {
|
|
784
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
785
|
-
var r = arguments[t];
|
|
786
|
-
for (var n in r)
|
|
787
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
788
|
-
}
|
|
789
|
-
return e;
|
|
790
|
-
}, Pe.apply(this, arguments);
|
|
791
|
-
}
|
|
792
|
-
var Ye = function(t) {
|
|
793
|
-
return /* @__PURE__ */ D.createElement("svg", Pe({
|
|
794
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
795
|
-
width: 24,
|
|
796
|
-
height: 24,
|
|
797
|
-
fill: "none",
|
|
798
|
-
viewBox: "0 0 24 24"
|
|
799
|
-
}, t), gt || (gt = /* @__PURE__ */ D.createElement("path", {
|
|
800
|
-
fill: "currentColor",
|
|
801
|
-
d: "M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"
|
|
802
|
-
})), ht || (ht = /* @__PURE__ */ D.createElement("path", {
|
|
803
|
-
fill: "#DA0000",
|
|
804
|
-
d: "M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"
|
|
805
|
-
})));
|
|
806
|
-
}, vt, mt;
|
|
807
|
-
function $e() {
|
|
808
|
-
return $e = Object.assign ? Object.assign.bind() : function(e) {
|
|
809
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
810
|
-
var r = arguments[t];
|
|
811
|
-
for (var n in r)
|
|
812
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
813
|
-
}
|
|
814
|
-
return e;
|
|
815
|
-
}, $e.apply(this, arguments);
|
|
816
|
-
}
|
|
817
|
-
var $t = function(t) {
|
|
818
|
-
return /* @__PURE__ */ D.createElement("svg", $e({
|
|
819
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
820
|
-
width: 24,
|
|
821
|
-
height: 24,
|
|
822
|
-
fill: "none",
|
|
823
|
-
viewBox: "0 0 24 24"
|
|
824
|
-
}, t), vt || (vt = /* @__PURE__ */ D.createElement("path", {
|
|
825
|
-
fill: "currentColor",
|
|
826
|
-
d: "M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"
|
|
827
|
-
})), mt || (mt = /* @__PURE__ */ D.createElement("path", {
|
|
828
|
-
fill: "#14C786",
|
|
829
|
-
d: "M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"
|
|
830
|
-
})));
|
|
831
|
-
}, yt, jt;
|
|
832
|
-
function De() {
|
|
833
|
-
return De = Object.assign ? Object.assign.bind() : function(e) {
|
|
834
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
835
|
-
var r = arguments[t];
|
|
836
|
-
for (var n in r)
|
|
837
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
838
|
-
}
|
|
839
|
-
return e;
|
|
840
|
-
}, De.apply(this, arguments);
|
|
841
|
-
}
|
|
842
|
-
var qe = function(t) {
|
|
843
|
-
return /* @__PURE__ */ D.createElement("svg", De({
|
|
844
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
845
|
-
width: 24,
|
|
846
|
-
height: 24,
|
|
847
|
-
fill: "none",
|
|
848
|
-
viewBox: "0 0 24 24"
|
|
849
|
-
}, t), yt || (yt = /* @__PURE__ */ D.createElement("path", {
|
|
850
|
-
fill: "currentColor",
|
|
851
|
-
d: "M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"
|
|
852
|
-
})), jt || (jt = /* @__PURE__ */ D.createElement("path", {
|
|
853
|
-
fill: "#14C786",
|
|
854
|
-
d: "m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"
|
|
855
|
-
})));
|
|
856
|
-
}, bt, wt;
|
|
857
|
-
function Le() {
|
|
858
|
-
return Le = Object.assign ? Object.assign.bind() : function(e) {
|
|
859
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
860
|
-
var r = arguments[t];
|
|
861
|
-
for (var n in r)
|
|
862
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
863
|
-
}
|
|
864
|
-
return e;
|
|
865
|
-
}, Le.apply(this, arguments);
|
|
866
|
-
}
|
|
867
|
-
var Be = function(t) {
|
|
868
|
-
return /* @__PURE__ */ D.createElement("svg", Le({
|
|
869
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
870
|
-
width: 24,
|
|
871
|
-
height: 24,
|
|
872
|
-
fill: "none",
|
|
873
|
-
viewBox: "0 0 24 24"
|
|
874
|
-
}, t), bt || (bt = /* @__PURE__ */ D.createElement("path", {
|
|
875
|
-
fill: "#DA0000",
|
|
876
|
-
d: "M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"
|
|
877
|
-
})), wt || (wt = /* @__PURE__ */ D.createElement("path", {
|
|
878
|
-
fill: "currentColor",
|
|
879
|
-
d: "M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"
|
|
880
|
-
})));
|
|
881
|
-
};
|
|
882
|
-
function zr({ originNode: e, node: t, depth: r, index: n, deleteHandle: s, customOptions: o, startIndex: c, parent: l, parentPath: g }) {
|
|
883
|
-
const { enableClipboard: u, src: d, onEdit: v, onChange: S, forceUpdate: T, displaySize: O, CustomOperation: A } = te(ee), f = [...g, String(n)], [N, E] = P(!0), M = K((w, y, H) => {
|
|
884
|
-
e[w] = y, v && v({
|
|
885
|
-
newValue: y,
|
|
886
|
-
oldValue: H,
|
|
887
|
-
depth: r,
|
|
888
|
-
src: d,
|
|
889
|
-
indexOrName: w,
|
|
890
|
-
parentType: "array",
|
|
891
|
-
parentPath: g
|
|
892
|
-
}), S && S({ type: "edit", depth: r, src: d, indexOrName: w, parentType: "array", parentPath: g }), T();
|
|
893
|
-
}, [t, v, S, T]), b = (w) => {
|
|
894
|
-
e.splice(w, 1), s && s(w, g), T();
|
|
895
|
-
}, m = a.jsxs(a.Fragment, { children: [!N && a.jsxs("span", Object.assign({ onClick: () => E(!0), className: "jv-size-chevron" }, { children: [ae(O, r, N) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [ce(t), " Items"] })), a.jsx(Je, { className: "jv-chevron" })] })), !N && u && we(o) && a.jsx(xe, { node: t, nodeMeta: { depth: r, indexOrName: n, parent: l, parentPath: g, currentPath: f } }), typeof A == "function" ? a.jsx(A, { node: t }) : null] });
|
|
896
|
-
return a.jsxs("div", { children: [a.jsx("span", { children: "[" }), m, N ? a.jsxs("button", Object.assign({ onClick: () => E(!1), className: "jv-button" }, { children: [c, " ... ", c + t.length - 1] })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: t.map((w, y) => a.jsx(Ie, { indexOrName: y + c, value: w, depth: r, parent: t, deleteHandle: b, editHandle: M, parentPath: g }, String(n) + String(y))) })), a.jsx("span", { children: "]" })] });
|
|
897
|
-
}
|
|
898
|
-
function Zr({ node: e, depth: t, deleteHandle: r, indexOrName: n, customOptions: s, parent: o, parentPath: c }) {
|
|
899
|
-
const l = typeof n < "u" ? [...c, String(n)] : c, g = [];
|
|
900
|
-
for (let j = 0; j < e.length; j += 100)
|
|
901
|
-
g.push(e.slice(j, j + 100));
|
|
902
|
-
const { collapsed: u, enableClipboard: d, collapseObjectsAfterLength: v, editable: S, onDelete: T, src: O, onAdd: A, CustomOperation: f, onChange: N, forceUpdate: E, displaySize: M } = te(ee), [b, m] = P(it(e, t, n, u, v, s));
|
|
903
|
-
Y(() => {
|
|
904
|
-
m(it(e, t, n, u, v, s));
|
|
905
|
-
}, [u, v]);
|
|
906
|
-
const [w, y] = P(!1), H = () => {
|
|
907
|
-
y(!1), r && r(n, c), T && T({ value: e, depth: t, src: O, indexOrName: n, parentType: "array", parentPath: c }), N && N({
|
|
908
|
-
type: "delete",
|
|
909
|
-
depth: t,
|
|
910
|
-
src: O,
|
|
911
|
-
indexOrName: n,
|
|
912
|
-
parentType: "array",
|
|
913
|
-
parentPath: c
|
|
914
|
-
});
|
|
915
|
-
}, [_, C] = P(!1), $ = () => {
|
|
916
|
-
const j = e;
|
|
917
|
-
j.push(null), A && A({ indexOrName: j.length - 1, depth: t, src: O, parentType: "array", parentPath: c }), N && N({ type: "add", indexOrName: j.length - 1, depth: t, src: O, parentType: "array", parentPath: c }), E();
|
|
918
|
-
}, L = w || _, U = () => {
|
|
919
|
-
y(!1), C(!1);
|
|
920
|
-
}, F = a.jsxs(a.Fragment, { children: [!b && !L && a.jsxs("span", Object.assign({ onClick: () => m(!0), className: "jv-size-chevron" }, { children: [ae(M, t, b) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [e.length, " Items"] })), a.jsx(Je, { className: "jv-chevron" })] })), L && a.jsx(qe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: _ ? $ : H }), L && a.jsx(Be, { className: "json-view--edit", style: { display: "inline-block" }, onClick: U }), !b && !L && d && we(s) && a.jsx(xe, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: o, parentPath: c, currentPath: l } }), !b && !L && It(S) && Pt(s) && a.jsx($t, { className: "json-view--edit", onClick: () => {
|
|
921
|
-
$();
|
|
922
|
-
} }), !b && !L && ze(S) && Ze(s) && r && a.jsx(Ye, { className: "json-view--edit", onClick: () => y(!0) }), typeof f == "function" ? a.jsx(f, { node: e }) : null] });
|
|
923
|
-
return a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), F, b ? a.jsx("button", Object.assign({ onClick: () => m(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: g.map((j, R) => a.jsx(zr, { originNode: e, node: j, depth: t, index: R, startIndex: R * 100, deleteHandle: r, customOptions: s, parentPath: c }, String(n) + String(R))) })), a.jsx("span", { children: "]" }), b && ae(M, t, b) && a.jsxs("span", Object.assign({ onClick: () => m(!1), className: "jv-size" }, { children: [e.length, " Items"] }))] });
|
|
924
|
-
}
|
|
925
|
-
function Jr({ node: e, depth: t, indexOrName: r, deleteHandle: n, customOptions: s, parent: o, parentPath: c }) {
|
|
926
|
-
const { collapsed: l, onCollapse: g, enableClipboard: u, ignoreLargeArray: d, collapseObjectsAfterLength: v, editable: S, onDelete: T, src: O, onAdd: A, onEdit: f, onChange: N, forceUpdate: E, displaySize: M, CustomOperation: b } = te(ee), m = typeof r < "u" ? [...c, String(r)] : c;
|
|
927
|
-
if (!d && Array.isArray(e) && e.length > 100)
|
|
928
|
-
return a.jsx(Zr, { node: e, depth: t, indexOrName: r, deleteHandle: n, customOptions: s, parentPath: m });
|
|
929
|
-
const w = Q(e), [y, H] = P(ot(e, t, r, l, v, s)), _ = (h) => {
|
|
930
|
-
g?.({ isCollapsing: !h, node: e, depth: t, indexOrName: r }), H(h);
|
|
931
|
-
};
|
|
932
|
-
Y(() => {
|
|
933
|
-
_(ot(e, t, r, l, v, s));
|
|
934
|
-
}, [l, v]);
|
|
935
|
-
const C = K((h, k, q) => {
|
|
936
|
-
Array.isArray(e) ? e[+h] = k : e && (e[h] = k), f && f({
|
|
937
|
-
newValue: k,
|
|
938
|
-
oldValue: q,
|
|
939
|
-
depth: t,
|
|
940
|
-
src: O,
|
|
941
|
-
indexOrName: h,
|
|
942
|
-
parentType: w ? "object" : "array",
|
|
943
|
-
parentPath: m
|
|
944
|
-
}), N && N({ type: "edit", depth: t, src: O, indexOrName: h, parentType: w ? "object" : "array", parentPath: m }), E();
|
|
945
|
-
}, [e, f, N, E]), $ = (h) => {
|
|
946
|
-
Array.isArray(e) ? e.splice(+h, 1) : e && delete e[h], E();
|
|
947
|
-
}, [L, U] = P(!1), F = () => {
|
|
948
|
-
U(!1), n && n(r, m), T && T({ value: e, depth: t, src: O, indexOrName: r, parentType: w ? "object" : "array", parentPath: m }), N && N({
|
|
949
|
-
type: "delete",
|
|
950
|
-
depth: t,
|
|
951
|
-
src: O,
|
|
952
|
-
indexOrName: r,
|
|
953
|
-
parentType: w ? "object" : "array",
|
|
954
|
-
parentPath: m
|
|
955
|
-
});
|
|
956
|
-
}, [j, R] = P(!1), I = V(null), z = () => {
|
|
957
|
-
var h;
|
|
958
|
-
if (w) {
|
|
959
|
-
const k = (h = I.current) === null || h === void 0 ? void 0 : h.value;
|
|
960
|
-
k && (e[k] = null, I.current && (I.current.value = ""), R(!1), A && A({ indexOrName: k, depth: t, src: O, parentType: "object", parentPath: m }), N && N({ type: "add", indexOrName: k, depth: t, src: O, parentType: "object", parentPath: m }));
|
|
961
|
-
} else if (Array.isArray(e)) {
|
|
962
|
-
const k = e;
|
|
963
|
-
k.push(null), A && A({ indexOrName: k.length - 1, depth: t, src: O, parentType: "array", parentPath: m }), N && N({ type: "add", indexOrName: k.length - 1, depth: t, src: O, parentType: "array", parentPath: m });
|
|
964
|
-
}
|
|
965
|
-
E();
|
|
966
|
-
}, Z = (h) => {
|
|
967
|
-
h.key === "Enter" ? (h.preventDefault(), z()) : h.key === "Escape" && p();
|
|
968
|
-
}, i = L || j, p = () => {
|
|
969
|
-
U(!1), R(!1);
|
|
970
|
-
}, x = a.jsxs(a.Fragment, { children: [!y && !i && a.jsxs("span", Object.assign({ onClick: () => _(!0), className: "jv-size-chevron" }, { children: [ae(M, t, y) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [ce(e), " Items"] })), a.jsx(Je, { className: "jv-chevron" })] })), j && w && a.jsx("input", { className: "json-view--input", placeholder: "property", ref: I, onKeyDown: Z }), i && a.jsx(qe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: j ? z : F }), i && a.jsx(Be, { className: "json-view--edit", style: { display: "inline-block" }, onClick: p }), !y && !i && u && we(s) && a.jsx(xe, { node: e, nodeMeta: { depth: t, indexOrName: r, parent: o, parentPath: c, currentPath: m } }), !y && !i && It(S) && Pt(s) && a.jsx($t, { className: "json-view--edit", onClick: () => {
|
|
971
|
-
w ? (R(!0), setTimeout(() => {
|
|
972
|
-
var h;
|
|
973
|
-
return (h = I.current) === null || h === void 0 ? void 0 : h.focus();
|
|
974
|
-
})) : z();
|
|
975
|
-
} }), !y && !i && ze(S) && Ze(s) && n && a.jsx(Ye, { className: "json-view--edit", onClick: () => U(!0) }), typeof b == "function" ? a.jsx(b, { node: e }) : null] });
|
|
976
|
-
return Array.isArray(e) ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), x, y ? a.jsx("button", Object.assign({ onClick: () => _(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: e.map((h, k) => a.jsx(Ie, { indexOrName: k, value: h, depth: t, parent: e, deleteHandle: $, editHandle: C, parentPath: m }, String(r) + String(k))) })), a.jsx("span", { children: "]" }), y && ae(M, t, y) && a.jsxs("span", Object.assign({ onClick: () => _(!1), className: "jv-size" }, { children: [ce(e), " Items"] }))] }) : w ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "{" }), x, y ? a.jsx("button", Object.assign({ onClick: () => _(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: Object.entries(e).map(([h, k]) => a.jsx(Ie, { indexOrName: h, value: k, depth: t, parent: e, deleteHandle: $, editHandle: C, parentPath: m }, String(r) + String(h))) })), a.jsx("span", { children: "}" }), y && ae(M, t, y) && a.jsxs("span", Object.assign({ onClick: () => _(!1), className: "jv-size" }, { children: [ce(e), " Items"] }))] }) : a.jsx("span", { children: String(e) });
|
|
977
|
-
}
|
|
978
|
-
const Yr = W.forwardRef(({ str: e, className: t, ctrlClick: r }, n) => {
|
|
979
|
-
let { collapseStringMode: s, collapseStringsAfterLength: o, customizeCollapseStringUI: c } = te(ee);
|
|
980
|
-
const [l, g] = P(!0), u = V(null);
|
|
981
|
-
o = o > 0 ? o : 0;
|
|
982
|
-
const d = e.replace(/\s+/g, " "), v = typeof c == "function" ? c(d, l) : typeof c == "string" ? c : "...", S = (T) => {
|
|
983
|
-
var O;
|
|
984
|
-
if ((T.ctrlKey || T.metaKey) && r)
|
|
985
|
-
r(T);
|
|
986
|
-
else {
|
|
987
|
-
const A = window.getSelection();
|
|
988
|
-
if (A && A.anchorOffset !== A.focusOffset && ((O = A.anchorNode) === null || O === void 0 ? void 0 : O.parentElement) === u.current)
|
|
989
|
-
return;
|
|
990
|
-
g(!l);
|
|
991
|
-
}
|
|
992
|
-
};
|
|
993
|
-
if (e.length <= o)
|
|
994
|
-
return a.jsxs("span", Object.assign({ ref: u, className: t, onClick: r }, { children: ['"', e, '"'] }));
|
|
995
|
-
if (s === "address")
|
|
996
|
-
return e.length <= 10 ? a.jsxs("span", Object.assign({ ref: u, className: t, onClick: r }, { children: ['"', e, '"'] })) : a.jsxs("span", Object.assign({ ref: u, onClick: S, className: t + " cursor-pointer" }, { children: ['"', l ? [d.slice(0, 6), v, d.slice(-4)] : e, '"'] }));
|
|
997
|
-
if (s === "directly")
|
|
998
|
-
return a.jsxs("span", Object.assign({ ref: u, onClick: S, className: t + " cursor-pointer" }, { children: ['"', l ? [d.slice(0, o), v] : e, '"'] }));
|
|
999
|
-
if (s === "word") {
|
|
1000
|
-
let T = o, O = o + 1, A = d, f = 1;
|
|
1001
|
-
for (; ; ) {
|
|
1002
|
-
if (/\W/.test(e[T])) {
|
|
1003
|
-
A = e.slice(0, T);
|
|
1004
|
-
break;
|
|
1005
|
-
}
|
|
1006
|
-
if (/\W/.test(e[O])) {
|
|
1007
|
-
A = e.slice(0, O);
|
|
1008
|
-
break;
|
|
1009
|
-
}
|
|
1010
|
-
if (f === 6) {
|
|
1011
|
-
A = e.slice(0, o);
|
|
1012
|
-
break;
|
|
1013
|
-
}
|
|
1014
|
-
f++, T--, O++;
|
|
1015
|
-
}
|
|
1016
|
-
return a.jsxs("span", Object.assign({ ref: u, onClick: S, className: t + " cursor-pointer" }, { children: ['"', l ? [A, v] : e, '"'] }));
|
|
1017
|
-
}
|
|
1018
|
-
return a.jsxs("span", Object.assign({ ref: u, className: t }, { children: ['"', e, '"'] }));
|
|
1019
|
-
});
|
|
1020
|
-
var xt;
|
|
1021
|
-
function Ve() {
|
|
1022
|
-
return Ve = Object.assign ? Object.assign.bind() : function(e) {
|
|
1023
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1024
|
-
var r = arguments[t];
|
|
1025
|
-
for (var n in r)
|
|
1026
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
1027
|
-
}
|
|
1028
|
-
return e;
|
|
1029
|
-
}, Ve.apply(this, arguments);
|
|
1030
|
-
}
|
|
1031
|
-
var qr = function(t) {
|
|
1032
|
-
return /* @__PURE__ */ D.createElement("svg", Ve({
|
|
1033
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1034
|
-
width: 24,
|
|
1035
|
-
height: 24,
|
|
1036
|
-
fill: "none",
|
|
1037
|
-
viewBox: "0 0 24 24"
|
|
1038
|
-
}, t), xt || (xt = /* @__PURE__ */ D.createElement("path", {
|
|
1039
|
-
fill: "currentColor",
|
|
1040
|
-
d: "M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"
|
|
1041
|
-
})));
|
|
1042
|
-
}, Ct, St;
|
|
1043
|
-
function He() {
|
|
1044
|
-
return He = Object.assign ? Object.assign.bind() : function(e) {
|
|
1045
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1046
|
-
var r = arguments[t];
|
|
1047
|
-
for (var n in r)
|
|
1048
|
-
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
1049
|
-
}
|
|
1050
|
-
return e;
|
|
1051
|
-
}, He.apply(this, arguments);
|
|
1052
|
-
}
|
|
1053
|
-
var Br = function(t) {
|
|
1054
|
-
return /* @__PURE__ */ D.createElement("svg", He({
|
|
1055
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1056
|
-
width: 24,
|
|
1057
|
-
height: 24,
|
|
1058
|
-
fill: "none",
|
|
1059
|
-
viewBox: "0 0 24 24"
|
|
1060
|
-
}, t), Ct || (Ct = /* @__PURE__ */ D.createElement("path", {
|
|
1061
|
-
fill: "currentColor",
|
|
1062
|
-
d: "M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"
|
|
1063
|
-
})), St || (St = /* @__PURE__ */ D.createElement("path", {
|
|
1064
|
-
fill: "currentColor",
|
|
1065
|
-
d: "M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"
|
|
1066
|
-
})));
|
|
1067
|
-
};
|
|
1068
|
-
function Dt({ node: e, depth: t, deleteHandle: r, indexOrName: n, parent: s, editHandle: o, parentPath: c }) {
|
|
1069
|
-
const { collapseStringsAfterLength: l, enableClipboard: g, editable: u, src: d, onDelete: v, onChange: S, customizeNode: T, matchesURL: O, urlRegExp: A, EditComponent: f, DoneComponent: N, CancelComponent: E, CustomOperation: M } = te(ee);
|
|
1070
|
-
let b;
|
|
1071
|
-
if (typeof T == "function" && (b = Ue(T, [{ node: e, depth: t, indexOrName: n }])), b) {
|
|
1072
|
-
if (qt(b))
|
|
1073
|
-
return b;
|
|
1074
|
-
if (Lr(b)) {
|
|
1075
|
-
const m = b;
|
|
1076
|
-
return a.jsx(m, { node: e, depth: t, indexOrName: n });
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
if (Array.isArray(e) || Q(e))
|
|
1080
|
-
return a.jsx(Jr, { parent: s, node: e, depth: t, indexOrName: n, deleteHandle: r, parentPath: c, customOptions: typeof b == "object" ? b : void 0 });
|
|
1081
|
-
{
|
|
1082
|
-
const m = typeof e, w = typeof n < "u" ? [...c, String(n)] : c, [y, H] = P(!1), [_, C] = P(!1), $ = V(null), L = () => {
|
|
1083
|
-
H(!0), setTimeout(() => {
|
|
1084
|
-
var h, k;
|
|
1085
|
-
(h = window.getSelection()) === null || h === void 0 || h.selectAllChildren($.current), (k = $.current) === null || k === void 0 || k.focus();
|
|
1086
|
-
});
|
|
1087
|
-
}, U = K(() => {
|
|
1088
|
-
let h = $.current.innerText;
|
|
1089
|
-
try {
|
|
1090
|
-
const k = JSON.parse(h);
|
|
1091
|
-
o && o(n, k, e, c);
|
|
1092
|
-
} catch {
|
|
1093
|
-
const q = Hr(m, h);
|
|
1094
|
-
o && o(n, q, e, c);
|
|
1095
|
-
}
|
|
1096
|
-
H(!1);
|
|
1097
|
-
}, [o, n, e, c, m]), F = () => {
|
|
1098
|
-
H(!1), C(!1);
|
|
1099
|
-
}, j = () => {
|
|
1100
|
-
C(!1), r && r(n, c), v && v({
|
|
1101
|
-
value: e,
|
|
1102
|
-
depth: t,
|
|
1103
|
-
src: d,
|
|
1104
|
-
indexOrName: n,
|
|
1105
|
-
parentType: Array.isArray(s) ? "array" : "object",
|
|
1106
|
-
parentPath: c
|
|
1107
|
-
}), S && S({
|
|
1108
|
-
depth: t,
|
|
1109
|
-
src: d,
|
|
1110
|
-
indexOrName: n,
|
|
1111
|
-
parentType: Array.isArray(s) ? "array" : "object",
|
|
1112
|
-
type: "delete",
|
|
1113
|
-
parentPath: c
|
|
1114
|
-
});
|
|
1115
|
-
}, R = K((h) => {
|
|
1116
|
-
h.key === "Enter" ? (h.preventDefault(), U()) : h.key === "Escape" && F();
|
|
1117
|
-
}, [U]), I = y || _, z = !I && ct(u) && lt(b) && o ? (h) => {
|
|
1118
|
-
(h.ctrlKey || h.metaKey) && L();
|
|
1119
|
-
} : void 0, Z = a.jsxs(a.Fragment, { children: [I && (typeof N == "function" ? a.jsx(N, { className: "json-view--edit", style: { display: "inline-block" }, onClick: _ ? j : U }) : a.jsx(qe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: _ ? j : U })), I && (typeof E == "function" ? a.jsx(E, { className: "json-view--edit", style: { display: "inline-block" }, onClick: F }) : a.jsx(Be, { className: "json-view--edit", style: { display: "inline-block" }, onClick: F })), !I && g && we(b) && a.jsx(xe, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: s, parentPath: c, currentPath: w } }), !I && O && m === "string" && A.test(e) && Vr(b) && a.jsx("a", Object.assign({ href: e, target: "_blank", className: "json-view--link" }, { children: a.jsx(Br, {}) })), !I && ct(u) && lt(b) && o && (typeof f == "function" ? a.jsx(f, { className: "json-view--edit", onClick: L }) : a.jsx(qr, { className: "json-view--edit", onClick: L })), !I && ze(u) && Ze(b) && r && a.jsx(Ye, { className: "json-view--edit", onClick: () => C(!0) }), typeof M == "function" ? a.jsx(M, { node: e }) : null] });
|
|
1120
|
-
let i = "json-view--string";
|
|
1121
|
-
switch (m) {
|
|
1122
|
-
case "number":
|
|
1123
|
-
case "bigint":
|
|
1124
|
-
i = "json-view--number";
|
|
1125
|
-
break;
|
|
1126
|
-
case "boolean":
|
|
1127
|
-
i = "json-view--boolean";
|
|
1128
|
-
break;
|
|
1129
|
-
case "object":
|
|
1130
|
-
i = "json-view--null";
|
|
1131
|
-
break;
|
|
1132
|
-
}
|
|
1133
|
-
typeof b?.className == "string" && (i += " " + b.className), _ && (i += " json-view--deleting");
|
|
1134
|
-
let p = String(e);
|
|
1135
|
-
m === "bigint" && (p += "n");
|
|
1136
|
-
const x = ue(() => a.jsx("span", { contentEditable: !0, className: i, dangerouslySetInnerHTML: { __html: m === "string" ? `"${p}"` : p }, ref: $, onKeyDown: R }), [p, m, R]);
|
|
1137
|
-
return m === "string" ? a.jsxs(a.Fragment, { children: [y ? x : e.length > l ? a.jsx(Yr, { str: e, ref: $, className: i, ctrlClick: z }) : a.jsxs("span", Object.assign({ className: i, onClick: z }, { children: ['"', p, '"'] })), Z] }) : a.jsxs(a.Fragment, { children: [y ? x : a.jsx("span", Object.assign({ className: i, onClick: z }, { children: p })), Z] });
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
const Lt = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, ee = Yt({
|
|
1141
|
-
src: void 0,
|
|
1142
|
-
collapseStringsAfterLength: 99,
|
|
1143
|
-
collapseStringMode: "directly",
|
|
1144
|
-
customizeCollapseStringUI: void 0,
|
|
1145
|
-
collapseObjectsAfterLength: 20,
|
|
1146
|
-
collapsed: !1,
|
|
1147
|
-
onCollapse: void 0,
|
|
1148
|
-
enableClipboard: !0,
|
|
1149
|
-
editable: !1,
|
|
1150
|
-
onEdit: void 0,
|
|
1151
|
-
onDelete: void 0,
|
|
1152
|
-
onAdd: void 0,
|
|
1153
|
-
onChange: void 0,
|
|
1154
|
-
forceUpdate: () => {
|
|
1155
|
-
},
|
|
1156
|
-
customizeNode: void 0,
|
|
1157
|
-
customizeCopy: () => {
|
|
1158
|
-
},
|
|
1159
|
-
displaySize: void 0,
|
|
1160
|
-
displayArrayIndex: !0,
|
|
1161
|
-
matchesURL: !1,
|
|
1162
|
-
urlRegExp: Lt,
|
|
1163
|
-
ignoreLargeArray: !1,
|
|
1164
|
-
CopyComponent: void 0,
|
|
1165
|
-
CopiedComponent: void 0,
|
|
1166
|
-
EditComponent: void 0,
|
|
1167
|
-
CancelComponent: void 0,
|
|
1168
|
-
DoneComponent: void 0,
|
|
1169
|
-
CustomOperation: void 0
|
|
1170
|
-
});
|
|
1171
|
-
function Wr({ src: e, collapseStringsAfterLength: t = 99, collapseStringMode: r = "directly", customizeCollapseStringUI: n, collapseObjectsAfterLength: s = 99, collapsed: o, onCollapse: c, enableClipboard: l = !0, editable: g = !1, onEdit: u, onDelete: d, onAdd: v, onChange: S, dark: T = !1, theme: O = "default", customizeNode: A, customizeCopy: f = (F) => $r(F), displaySize: N, displayArrayIndex: E = !0, style: M, className: b, matchesURL: m = !1, urlRegExp: w = Lt, ignoreLargeArray: y = !1, CopyComponent: H, CopiedComponent: _, EditComponent: C, CancelComponent: $, DoneComponent: L, CustomOperation: U }) {
|
|
1172
|
-
const [F, j] = P(0), R = K(() => j((Z) => ++Z), []), [I, z] = P(e);
|
|
1173
|
-
return Y(() => z(e), [e]), a.jsx(ee.Provider, Object.assign({ value: {
|
|
1174
|
-
src: I,
|
|
1175
|
-
collapseStringsAfterLength: t,
|
|
1176
|
-
collapseStringMode: r,
|
|
1177
|
-
customizeCollapseStringUI: n,
|
|
1178
|
-
collapseObjectsAfterLength: s,
|
|
1179
|
-
collapsed: o,
|
|
1180
|
-
onCollapse: c,
|
|
1181
|
-
enableClipboard: l,
|
|
1182
|
-
editable: g,
|
|
1183
|
-
onEdit: u,
|
|
1184
|
-
onDelete: d,
|
|
1185
|
-
onAdd: v,
|
|
1186
|
-
onChange: S,
|
|
1187
|
-
forceUpdate: R,
|
|
1188
|
-
customizeNode: A,
|
|
1189
|
-
customizeCopy: f,
|
|
1190
|
-
displaySize: N,
|
|
1191
|
-
displayArrayIndex: E,
|
|
1192
|
-
matchesURL: m,
|
|
1193
|
-
urlRegExp: w,
|
|
1194
|
-
ignoreLargeArray: y,
|
|
1195
|
-
CopyComponent: H,
|
|
1196
|
-
CopiedComponent: _,
|
|
1197
|
-
EditComponent: C,
|
|
1198
|
-
CancelComponent: $,
|
|
1199
|
-
DoneComponent: L,
|
|
1200
|
-
CustomOperation: U
|
|
1201
|
-
} }, { children: a.jsx("code", Object.assign({ className: "json-view" + (T ? " dark" : "") + (O && O !== "default" ? " json-view_" + O : "") + (b ? " " + b : ""), style: M }, { children: a.jsx(Dt, { node: I, depth: 1, editHandle: (Z, i, p, x) => {
|
|
1202
|
-
z(i), u && u({
|
|
1203
|
-
newValue: i,
|
|
1204
|
-
oldValue: p,
|
|
1205
|
-
depth: 1,
|
|
1206
|
-
src: I,
|
|
1207
|
-
indexOrName: Z,
|
|
1208
|
-
parentType: null,
|
|
1209
|
-
parentPath: x
|
|
1210
|
-
}), S && S({ type: "edit", depth: 1, src: I, indexOrName: Z, parentType: null, parentPath: x });
|
|
1211
|
-
}, deleteHandle: (Z, i) => {
|
|
1212
|
-
z(void 0), d && d({
|
|
1213
|
-
value: I,
|
|
1214
|
-
depth: 1,
|
|
1215
|
-
src: I,
|
|
1216
|
-
indexOrName: Z,
|
|
1217
|
-
parentType: null,
|
|
1218
|
-
parentPath: i
|
|
1219
|
-
}), S && S({
|
|
1220
|
-
depth: 1,
|
|
1221
|
-
src: I,
|
|
1222
|
-
indexOrName: Z,
|
|
1223
|
-
parentType: null,
|
|
1224
|
-
type: "delete",
|
|
1225
|
-
parentPath: i
|
|
1226
|
-
});
|
|
1227
|
-
}, parentPath: [] }) })) }));
|
|
1228
|
-
}
|
|
1229
|
-
const Kr = ({ state: e }) => /* @__PURE__ */ a.jsx(Wr, { src: e.value, theme: "default" });
|
|
1230
|
-
function Gr(e, t, r) {
|
|
1231
|
-
return t in e ? Object.defineProperty(e, t, {
|
|
1232
|
-
value: r,
|
|
1233
|
-
enumerable: !0,
|
|
1234
|
-
configurable: !0,
|
|
1235
|
-
writable: !0
|
|
1236
|
-
}) : e[t] = r, e;
|
|
1237
|
-
}
|
|
1238
|
-
function Ot(e, t) {
|
|
1239
|
-
var r = Object.keys(e);
|
|
1240
|
-
if (Object.getOwnPropertySymbols) {
|
|
1241
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
1242
|
-
t && (n = n.filter(function(s) {
|
|
1243
|
-
return Object.getOwnPropertyDescriptor(e, s).enumerable;
|
|
1244
|
-
})), r.push.apply(r, n);
|
|
1245
|
-
}
|
|
1246
|
-
return r;
|
|
1247
|
-
}
|
|
1248
|
-
function Et(e) {
|
|
1249
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1250
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
1251
|
-
t % 2 ? Ot(Object(r), !0).forEach(function(n) {
|
|
1252
|
-
Gr(e, n, r[n]);
|
|
1253
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ot(Object(r)).forEach(function(n) {
|
|
1254
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1255
|
-
});
|
|
1256
|
-
}
|
|
1257
|
-
return e;
|
|
1258
|
-
}
|
|
1259
|
-
function Xr(e, t) {
|
|
1260
|
-
if (e == null) return {};
|
|
1261
|
-
var r = {}, n = Object.keys(e), s, o;
|
|
1262
|
-
for (o = 0; o < n.length; o++)
|
|
1263
|
-
s = n[o], !(t.indexOf(s) >= 0) && (r[s] = e[s]);
|
|
1264
|
-
return r;
|
|
1265
|
-
}
|
|
1266
|
-
function Qr(e, t) {
|
|
1267
|
-
if (e == null) return {};
|
|
1268
|
-
var r = Xr(e, t), n, s;
|
|
1269
|
-
if (Object.getOwnPropertySymbols) {
|
|
1270
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
1271
|
-
for (s = 0; s < o.length; s++)
|
|
1272
|
-
n = o[s], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
|
|
1273
|
-
}
|
|
1274
|
-
return r;
|
|
1275
|
-
}
|
|
1276
|
-
function en(e, t) {
|
|
1277
|
-
return tn(e) || rn(e, t) || nn(e, t) || an();
|
|
1278
|
-
}
|
|
1279
|
-
function tn(e) {
|
|
1280
|
-
if (Array.isArray(e)) return e;
|
|
1281
|
-
}
|
|
1282
|
-
function rn(e, t) {
|
|
1283
|
-
if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) {
|
|
1284
|
-
var r = [], n = !0, s = !1, o = void 0;
|
|
1285
|
-
try {
|
|
1286
|
-
for (var c = e[Symbol.iterator](), l; !(n = (l = c.next()).done) && (r.push(l.value), !(t && r.length === t)); n = !0)
|
|
1287
|
-
;
|
|
1288
|
-
} catch (g) {
|
|
1289
|
-
s = !0, o = g;
|
|
1290
|
-
} finally {
|
|
1291
|
-
try {
|
|
1292
|
-
!n && c.return != null && c.return();
|
|
1293
|
-
} finally {
|
|
1294
|
-
if (s) throw o;
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
return r;
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
function nn(e, t) {
|
|
1301
|
-
if (e) {
|
|
1302
|
-
if (typeof e == "string") return kt(e, t);
|
|
1303
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1304
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1305
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return kt(e, t);
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
function kt(e, t) {
|
|
1309
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1310
|
-
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
|
|
1311
|
-
return n;
|
|
1312
|
-
}
|
|
1313
|
-
function an() {
|
|
1314
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1315
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1316
|
-
}
|
|
1317
|
-
function sn(e, t, r) {
|
|
1318
|
-
return t in e ? Object.defineProperty(e, t, {
|
|
1319
|
-
value: r,
|
|
1320
|
-
enumerable: !0,
|
|
1321
|
-
configurable: !0,
|
|
1322
|
-
writable: !0
|
|
1323
|
-
}) : e[t] = r, e;
|
|
1324
|
-
}
|
|
1325
|
-
function At(e, t) {
|
|
1326
|
-
var r = Object.keys(e);
|
|
1327
|
-
if (Object.getOwnPropertySymbols) {
|
|
1328
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
1329
|
-
t && (n = n.filter(function(s) {
|
|
1330
|
-
return Object.getOwnPropertyDescriptor(e, s).enumerable;
|
|
1331
|
-
})), r.push.apply(r, n);
|
|
1332
|
-
}
|
|
1333
|
-
return r;
|
|
1334
|
-
}
|
|
1335
|
-
function Nt(e) {
|
|
1336
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1337
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
1338
|
-
t % 2 ? At(Object(r), !0).forEach(function(n) {
|
|
1339
|
-
sn(e, n, r[n]);
|
|
1340
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : At(Object(r)).forEach(function(n) {
|
|
1341
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1342
|
-
});
|
|
1343
|
-
}
|
|
1344
|
-
return e;
|
|
1345
|
-
}
|
|
1346
|
-
function on() {
|
|
1347
|
-
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
1348
|
-
t[r] = arguments[r];
|
|
1349
|
-
return function(n) {
|
|
1350
|
-
return t.reduceRight(function(s, o) {
|
|
1351
|
-
return o(s);
|
|
1352
|
-
}, n);
|
|
1353
|
-
};
|
|
1354
|
-
}
|
|
1355
|
-
function ie(e) {
|
|
1356
|
-
return function t() {
|
|
1357
|
-
for (var r = this, n = arguments.length, s = new Array(n), o = 0; o < n; o++)
|
|
1358
|
-
s[o] = arguments[o];
|
|
1359
|
-
return s.length >= e.length ? e.apply(this, s) : function() {
|
|
1360
|
-
for (var c = arguments.length, l = new Array(c), g = 0; g < c; g++)
|
|
1361
|
-
l[g] = arguments[g];
|
|
1362
|
-
return t.apply(r, [].concat(s, l));
|
|
1363
|
-
};
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1366
|
-
function je(e) {
|
|
1367
|
-
return {}.toString.call(e).includes("Object");
|
|
1368
|
-
}
|
|
1369
|
-
function cn(e) {
|
|
1370
|
-
return !Object.keys(e).length;
|
|
1371
|
-
}
|
|
1372
|
-
function de(e) {
|
|
1373
|
-
return typeof e == "function";
|
|
1374
|
-
}
|
|
1375
|
-
function ln(e, t) {
|
|
1376
|
-
return Object.prototype.hasOwnProperty.call(e, t);
|
|
1377
|
-
}
|
|
1378
|
-
function un(e, t) {
|
|
1379
|
-
return je(t) || G("changeType"), Object.keys(t).some(function(r) {
|
|
1380
|
-
return !ln(e, r);
|
|
1381
|
-
}) && G("changeField"), t;
|
|
1382
|
-
}
|
|
1383
|
-
function dn(e) {
|
|
1384
|
-
de(e) || G("selectorType");
|
|
1385
|
-
}
|
|
1386
|
-
function fn(e) {
|
|
1387
|
-
de(e) || je(e) || G("handlerType"), je(e) && Object.values(e).some(function(t) {
|
|
1388
|
-
return !de(t);
|
|
1389
|
-
}) && G("handlersType");
|
|
1390
|
-
}
|
|
1391
|
-
function pn(e) {
|
|
1392
|
-
e || G("initialIsRequired"), je(e) || G("initialType"), cn(e) && G("initialContent");
|
|
1393
|
-
}
|
|
1394
|
-
function gn(e, t) {
|
|
1395
|
-
throw new Error(e[t] || e.default);
|
|
1396
|
-
}
|
|
1397
|
-
var hn = {
|
|
1398
|
-
initialIsRequired: "initial state is required",
|
|
1399
|
-
initialType: "initial state should be an object",
|
|
1400
|
-
initialContent: "initial state shouldn't be an empty object",
|
|
1401
|
-
handlerType: "handler should be an object or a function",
|
|
1402
|
-
handlersType: "all handlers should be a functions",
|
|
1403
|
-
selectorType: "selector should be a function",
|
|
1404
|
-
changeType: "provided value of changes should be an object",
|
|
1405
|
-
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
|
|
1406
|
-
default: "an unknown error accured in `state-local` package"
|
|
1407
|
-
}, G = ie(gn)(hn), ve = {
|
|
1408
|
-
changes: un,
|
|
1409
|
-
selector: dn,
|
|
1410
|
-
handler: fn,
|
|
1411
|
-
initial: pn
|
|
1412
|
-
};
|
|
1413
|
-
function vn(e) {
|
|
1414
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1415
|
-
ve.initial(e), ve.handler(t);
|
|
1416
|
-
var r = {
|
|
1417
|
-
current: e
|
|
1418
|
-
}, n = ie(jn)(r, t), s = ie(yn)(r), o = ie(ve.changes)(e), c = ie(mn)(r);
|
|
1419
|
-
function l() {
|
|
1420
|
-
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(d) {
|
|
1421
|
-
return d;
|
|
1422
|
-
};
|
|
1423
|
-
return ve.selector(u), u(r.current);
|
|
1424
|
-
}
|
|
1425
|
-
function g(u) {
|
|
1426
|
-
on(n, s, o, c)(u);
|
|
1427
|
-
}
|
|
1428
|
-
return [l, g];
|
|
1429
|
-
}
|
|
1430
|
-
function mn(e, t) {
|
|
1431
|
-
return de(t) ? t(e.current) : t;
|
|
1432
|
-
}
|
|
1433
|
-
function yn(e, t) {
|
|
1434
|
-
return e.current = Nt(Nt({}, e.current), t), t;
|
|
1435
|
-
}
|
|
1436
|
-
function jn(e, t, r) {
|
|
1437
|
-
return de(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
|
|
1438
|
-
var s;
|
|
1439
|
-
return (s = t[n]) === null || s === void 0 ? void 0 : s.call(t, e.current[n]);
|
|
1440
|
-
}), r;
|
|
1441
|
-
}
|
|
1442
|
-
var bn = {
|
|
1443
|
-
create: vn
|
|
1444
|
-
}, wn = {
|
|
1445
|
-
paths: {
|
|
1446
|
-
vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"
|
|
1447
|
-
}
|
|
1448
|
-
};
|
|
1449
|
-
function xn(e) {
|
|
1450
|
-
return function t() {
|
|
1451
|
-
for (var r = this, n = arguments.length, s = new Array(n), o = 0; o < n; o++)
|
|
1452
|
-
s[o] = arguments[o];
|
|
1453
|
-
return s.length >= e.length ? e.apply(this, s) : function() {
|
|
1454
|
-
for (var c = arguments.length, l = new Array(c), g = 0; g < c; g++)
|
|
1455
|
-
l[g] = arguments[g];
|
|
1456
|
-
return t.apply(r, [].concat(s, l));
|
|
1457
|
-
};
|
|
1458
|
-
};
|
|
1459
|
-
}
|
|
1460
|
-
function Cn(e) {
|
|
1461
|
-
return {}.toString.call(e).includes("Object");
|
|
1462
|
-
}
|
|
1463
|
-
function Sn(e) {
|
|
1464
|
-
return e || Tt("configIsRequired"), Cn(e) || Tt("configType"), e.urls ? (On(), {
|
|
1465
|
-
paths: {
|
|
1466
|
-
vs: e.urls.monacoBase
|
|
1467
|
-
}
|
|
1468
|
-
}) : e;
|
|
1469
|
-
}
|
|
1470
|
-
function On() {
|
|
1471
|
-
console.warn(Vt.deprecation);
|
|
1472
|
-
}
|
|
1473
|
-
function En(e, t) {
|
|
1474
|
-
throw new Error(e[t] || e.default);
|
|
1475
|
-
}
|
|
1476
|
-
var Vt = {
|
|
1477
|
-
configIsRequired: "the configuration object is required",
|
|
1478
|
-
configType: "the configuration object should be an object",
|
|
1479
|
-
default: "an unknown error accured in `@monaco-editor/loader` package",
|
|
1480
|
-
deprecation: `Deprecation warning!
|
|
1481
|
-
You are using deprecated way of configuration.
|
|
1482
|
-
|
|
1483
|
-
Instead of using
|
|
1484
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
1485
|
-
use
|
|
1486
|
-
monaco.config({ paths: { vs: '...' } })
|
|
1487
|
-
|
|
1488
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
1489
|
-
`
|
|
1490
|
-
}, Tt = xn(En)(Vt), kn = {
|
|
1491
|
-
config: Sn
|
|
1492
|
-
}, An = function() {
|
|
1493
|
-
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1494
|
-
r[n] = arguments[n];
|
|
1495
|
-
return function(s) {
|
|
1496
|
-
return r.reduceRight(function(o, c) {
|
|
1497
|
-
return c(o);
|
|
1498
|
-
}, s);
|
|
1499
|
-
};
|
|
1500
|
-
};
|
|
1501
|
-
function Ht(e, t) {
|
|
1502
|
-
return Object.keys(t).forEach(function(r) {
|
|
1503
|
-
t[r] instanceof Object && e[r] && Object.assign(t[r], Ht(e[r], t[r]));
|
|
1504
|
-
}), Et(Et({}, e), t);
|
|
1505
|
-
}
|
|
1506
|
-
var Nn = {
|
|
1507
|
-
type: "cancelation",
|
|
1508
|
-
msg: "operation is manually canceled"
|
|
1509
|
-
};
|
|
1510
|
-
function ke(e) {
|
|
1511
|
-
var t = !1, r = new Promise(function(n, s) {
|
|
1512
|
-
e.then(function(o) {
|
|
1513
|
-
return t ? s(Nn) : n(o);
|
|
1514
|
-
}), e.catch(s);
|
|
1515
|
-
});
|
|
1516
|
-
return r.cancel = function() {
|
|
1517
|
-
return t = !0;
|
|
1518
|
-
}, r;
|
|
1519
|
-
}
|
|
1520
|
-
var Tn = bn.create({
|
|
1521
|
-
config: wn,
|
|
1522
|
-
isInitialized: !1,
|
|
1523
|
-
resolve: null,
|
|
1524
|
-
reject: null,
|
|
1525
|
-
monaco: null
|
|
1526
|
-
}), Ft = en(Tn, 2), fe = Ft[0], Ce = Ft[1];
|
|
1527
|
-
function _n(e) {
|
|
1528
|
-
var t = kn.config(e), r = t.monaco, n = Qr(t, ["monaco"]);
|
|
1529
|
-
Ce(function(s) {
|
|
1530
|
-
return {
|
|
1531
|
-
config: Ht(s.config, n),
|
|
1532
|
-
monaco: r
|
|
1533
|
-
};
|
|
1534
|
-
});
|
|
1535
|
-
}
|
|
1536
|
-
function Rn() {
|
|
1537
|
-
var e = fe(function(t) {
|
|
1538
|
-
var r = t.monaco, n = t.isInitialized, s = t.resolve;
|
|
1539
|
-
return {
|
|
1540
|
-
monaco: r,
|
|
1541
|
-
isInitialized: n,
|
|
1542
|
-
resolve: s
|
|
1543
|
-
};
|
|
1544
|
-
});
|
|
1545
|
-
if (!e.isInitialized) {
|
|
1546
|
-
if (Ce({
|
|
1547
|
-
isInitialized: !0
|
|
1548
|
-
}), e.monaco)
|
|
1549
|
-
return e.resolve(e.monaco), ke(Ae);
|
|
1550
|
-
if (window.monaco && window.monaco.editor)
|
|
1551
|
-
return Ut(window.monaco), e.resolve(window.monaco), ke(Ae);
|
|
1552
|
-
An(Mn, Pn)($n);
|
|
1553
|
-
}
|
|
1554
|
-
return ke(Ae);
|
|
1555
|
-
}
|
|
1556
|
-
function Mn(e) {
|
|
1557
|
-
return document.body.appendChild(e);
|
|
1558
|
-
}
|
|
1559
|
-
function In(e) {
|
|
1560
|
-
var t = document.createElement("script");
|
|
1561
|
-
return e && (t.src = e), t;
|
|
1562
|
-
}
|
|
1563
|
-
function Pn(e) {
|
|
1564
|
-
var t = fe(function(n) {
|
|
1565
|
-
var s = n.config, o = n.reject;
|
|
1566
|
-
return {
|
|
1567
|
-
config: s,
|
|
1568
|
-
reject: o
|
|
1569
|
-
};
|
|
1570
|
-
}), r = In("".concat(t.config.paths.vs, "/loader.js"));
|
|
1571
|
-
return r.onload = function() {
|
|
1572
|
-
return e();
|
|
1573
|
-
}, r.onerror = t.reject, r;
|
|
1574
|
-
}
|
|
1575
|
-
function $n() {
|
|
1576
|
-
var e = fe(function(r) {
|
|
1577
|
-
var n = r.config, s = r.resolve, o = r.reject;
|
|
1578
|
-
return {
|
|
1579
|
-
config: n,
|
|
1580
|
-
resolve: s,
|
|
1581
|
-
reject: o
|
|
1582
|
-
};
|
|
1583
|
-
}), t = window.require;
|
|
1584
|
-
t.config(e.config), t(["vs/editor/editor.main"], function(r) {
|
|
1585
|
-
Ut(r), e.resolve(r);
|
|
1586
|
-
}, function(r) {
|
|
1587
|
-
e.reject(r);
|
|
1588
|
-
});
|
|
1589
|
-
}
|
|
1590
|
-
function Ut(e) {
|
|
1591
|
-
fe().monaco || Ce({
|
|
1592
|
-
monaco: e
|
|
1593
|
-
});
|
|
1594
|
-
}
|
|
1595
|
-
function Dn() {
|
|
1596
|
-
return fe(function(e) {
|
|
1597
|
-
var t = e.monaco;
|
|
1598
|
-
return t;
|
|
1599
|
-
});
|
|
1600
|
-
}
|
|
1601
|
-
var Ae = new Promise(function(e, t) {
|
|
1602
|
-
return Ce({
|
|
1603
|
-
resolve: e,
|
|
1604
|
-
reject: t
|
|
1605
|
-
});
|
|
1606
|
-
}), be = {
|
|
1607
|
-
config: _n,
|
|
1608
|
-
init: Rn,
|
|
1609
|
-
__getMonacoInstance: Dn
|
|
1610
|
-
}, Ln = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, Ne = Ln, Vn = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, Hn = Vn;
|
|
1611
|
-
function Fn({ children: e }) {
|
|
1612
|
-
return W.createElement("div", { style: Hn.container }, e);
|
|
1613
|
-
}
|
|
1614
|
-
var Un = Fn, zn = Un;
|
|
1615
|
-
function Zn({ width: e, height: t, isEditorReady: r, loading: n, _ref: s, className: o, wrapperProps: c }) {
|
|
1616
|
-
return W.createElement("section", { style: { ...Ne.wrapper, width: e, height: t }, ...c }, !r && W.createElement(zn, null, n), W.createElement("div", { ref: s, style: { ...Ne.fullWidth, ...!r && Ne.hide }, className: o }));
|
|
1617
|
-
}
|
|
1618
|
-
var Jn = Zn, zt = Fe(Jn);
|
|
1619
|
-
function Yn(e) {
|
|
1620
|
-
Y(e, []);
|
|
1621
|
-
}
|
|
1622
|
-
var We = Yn;
|
|
1623
|
-
function qn(e, t, r = !0) {
|
|
1624
|
-
let n = V(!0);
|
|
1625
|
-
Y(n.current || !r ? () => {
|
|
1626
|
-
n.current = !1;
|
|
1627
|
-
} : e, t);
|
|
1628
|
-
}
|
|
1629
|
-
var B = qn;
|
|
1630
|
-
function le() {
|
|
1631
|
-
}
|
|
1632
|
-
function ne(e, t, r, n) {
|
|
1633
|
-
return Bn(e, n) || Wn(e, t, r, n);
|
|
1634
|
-
}
|
|
1635
|
-
function Bn(e, t) {
|
|
1636
|
-
return e.editor.getModel(Zt(e, t));
|
|
1637
|
-
}
|
|
1638
|
-
function Wn(e, t, r, n) {
|
|
1639
|
-
return e.editor.createModel(t, r, n ? Zt(e, n) : void 0);
|
|
1640
|
-
}
|
|
1641
|
-
function Zt(e, t) {
|
|
1642
|
-
return e.Uri.parse(t);
|
|
1643
|
-
}
|
|
1644
|
-
function Kn({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: s, originalModelPath: o, modifiedModelPath: c, keepCurrentOriginalModel: l = !1, keepCurrentModifiedModel: g = !1, theme: u = "light", loading: d = "Loading...", options: v = {}, height: S = "100%", width: T = "100%", className: O, wrapperProps: A = {}, beforeMount: f = le, onMount: N = le }) {
|
|
1645
|
-
let [E, M] = P(!1), [b, m] = P(!0), w = V(null), y = V(null), H = V(null), _ = V(N), C = V(f), $ = V(!1);
|
|
1646
|
-
We(() => {
|
|
1647
|
-
let j = be.init();
|
|
1648
|
-
return j.then((R) => (y.current = R) && m(!1)).catch((R) => R?.type !== "cancelation" && console.error("Monaco initialization: error:", R)), () => w.current ? F() : j.cancel();
|
|
1649
|
-
}), B(() => {
|
|
1650
|
-
if (w.current && y.current) {
|
|
1651
|
-
let j = w.current.getOriginalEditor(), R = ne(y.current, e || "", n || r || "text", o || "");
|
|
1652
|
-
R !== j.getModel() && j.setModel(R);
|
|
1653
|
-
}
|
|
1654
|
-
}, [o], E), B(() => {
|
|
1655
|
-
if (w.current && y.current) {
|
|
1656
|
-
let j = w.current.getModifiedEditor(), R = ne(y.current, t || "", s || r || "text", c || "");
|
|
1657
|
-
R !== j.getModel() && j.setModel(R);
|
|
1658
|
-
}
|
|
1659
|
-
}, [c], E), B(() => {
|
|
1660
|
-
let j = w.current.getModifiedEditor();
|
|
1661
|
-
j.getOption(y.current.editor.EditorOption.readOnly) ? j.setValue(t || "") : t !== j.getValue() && (j.executeEdits("", [{ range: j.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), j.pushUndoStop());
|
|
1662
|
-
}, [t], E), B(() => {
|
|
1663
|
-
w.current?.getModel()?.original.setValue(e || "");
|
|
1664
|
-
}, [e], E), B(() => {
|
|
1665
|
-
let { original: j, modified: R } = w.current.getModel();
|
|
1666
|
-
y.current.editor.setModelLanguage(j, n || r || "text"), y.current.editor.setModelLanguage(R, s || r || "text");
|
|
1667
|
-
}, [r, n, s], E), B(() => {
|
|
1668
|
-
y.current?.editor.setTheme(u);
|
|
1669
|
-
}, [u], E), B(() => {
|
|
1670
|
-
w.current?.updateOptions(v);
|
|
1671
|
-
}, [v], E);
|
|
1672
|
-
let L = K(() => {
|
|
1673
|
-
if (!y.current) return;
|
|
1674
|
-
C.current(y.current);
|
|
1675
|
-
let j = ne(y.current, e || "", n || r || "text", o || ""), R = ne(y.current, t || "", s || r || "text", c || "");
|
|
1676
|
-
w.current?.setModel({ original: j, modified: R });
|
|
1677
|
-
}, [r, t, s, e, n, o, c]), U = K(() => {
|
|
1678
|
-
!$.current && H.current && (w.current = y.current.editor.createDiffEditor(H.current, { automaticLayout: !0, ...v }), L(), y.current?.editor.setTheme(u), M(!0), $.current = !0);
|
|
1679
|
-
}, [v, u, L]);
|
|
1680
|
-
Y(() => {
|
|
1681
|
-
E && _.current(w.current, y.current);
|
|
1682
|
-
}, [E]), Y(() => {
|
|
1683
|
-
!b && !E && U();
|
|
1684
|
-
}, [b, E, U]);
|
|
1685
|
-
function F() {
|
|
1686
|
-
let j = w.current?.getModel();
|
|
1687
|
-
l || j?.original?.dispose(), g || j?.modified?.dispose(), w.current?.dispose();
|
|
1688
|
-
}
|
|
1689
|
-
return W.createElement(zt, { width: T, height: S, isEditorReady: E, loading: d, _ref: H, className: O, wrapperProps: A });
|
|
1690
|
-
}
|
|
1691
|
-
var Gn = Kn;
|
|
1692
|
-
Fe(Gn);
|
|
1693
|
-
function Xn() {
|
|
1694
|
-
let [e, t] = P(be.__getMonacoInstance());
|
|
1695
|
-
return We(() => {
|
|
1696
|
-
let r;
|
|
1697
|
-
return e || (r = be.init(), r.then((n) => {
|
|
1698
|
-
t(n);
|
|
1699
|
-
})), () => r?.cancel();
|
|
1700
|
-
}), e;
|
|
1701
|
-
}
|
|
1702
|
-
var Qn = Xn;
|
|
1703
|
-
function ea(e) {
|
|
1704
|
-
let t = V();
|
|
1705
|
-
return Y(() => {
|
|
1706
|
-
t.current = e;
|
|
1707
|
-
}, [e]), t.current;
|
|
1708
|
-
}
|
|
1709
|
-
var ta = ea, me = /* @__PURE__ */ new Map();
|
|
1710
|
-
function ra({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: s, path: o, theme: c = "light", line: l, loading: g = "Loading...", options: u = {}, overrideServices: d = {}, saveViewState: v = !0, keepCurrentModel: S = !1, width: T = "100%", height: O = "100%", className: A, wrapperProps: f = {}, beforeMount: N = le, onMount: E = le, onChange: M, onValidate: b = le }) {
|
|
1711
|
-
let [m, w] = P(!1), [y, H] = P(!0), _ = V(null), C = V(null), $ = V(null), L = V(E), U = V(N), F = V(), j = V(n), R = ta(o), I = V(!1), z = V(!1);
|
|
1712
|
-
We(() => {
|
|
1713
|
-
let p = be.init();
|
|
1714
|
-
return p.then((x) => (_.current = x) && H(!1)).catch((x) => x?.type !== "cancelation" && console.error("Monaco initialization: error:", x)), () => C.current ? i() : p.cancel();
|
|
1715
|
-
}), B(() => {
|
|
1716
|
-
let p = ne(_.current, e || n || "", t || s || "", o || r || "");
|
|
1717
|
-
p !== C.current?.getModel() && (v && me.set(R, C.current?.saveViewState()), C.current?.setModel(p), v && C.current?.restoreViewState(me.get(o)));
|
|
1718
|
-
}, [o], m), B(() => {
|
|
1719
|
-
C.current?.updateOptions(u);
|
|
1720
|
-
}, [u], m), B(() => {
|
|
1721
|
-
!C.current || n === void 0 || (C.current.getOption(_.current.editor.EditorOption.readOnly) ? C.current.setValue(n) : n !== C.current.getValue() && (z.current = !0, C.current.executeEdits("", [{ range: C.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), C.current.pushUndoStop(), z.current = !1));
|
|
1722
|
-
}, [n], m), B(() => {
|
|
1723
|
-
let p = C.current?.getModel();
|
|
1724
|
-
p && s && _.current?.editor.setModelLanguage(p, s);
|
|
1725
|
-
}, [s], m), B(() => {
|
|
1726
|
-
l !== void 0 && C.current?.revealLine(l);
|
|
1727
|
-
}, [l], m), B(() => {
|
|
1728
|
-
_.current?.editor.setTheme(c);
|
|
1729
|
-
}, [c], m);
|
|
1730
|
-
let Z = K(() => {
|
|
1731
|
-
if (!(!$.current || !_.current) && !I.current) {
|
|
1732
|
-
U.current(_.current);
|
|
1733
|
-
let p = o || r, x = ne(_.current, n || e || "", t || s || "", p || "");
|
|
1734
|
-
C.current = _.current?.editor.create($.current, { model: x, automaticLayout: !0, ...u }, d), v && C.current.restoreViewState(me.get(p)), _.current.editor.setTheme(c), l !== void 0 && C.current.revealLine(l), w(!0), I.current = !0;
|
|
1735
|
-
}
|
|
1736
|
-
}, [e, t, r, n, s, o, u, d, v, c, l]);
|
|
1737
|
-
Y(() => {
|
|
1738
|
-
m && L.current(C.current, _.current);
|
|
1739
|
-
}, [m]), Y(() => {
|
|
1740
|
-
!y && !m && Z();
|
|
1741
|
-
}, [y, m, Z]), j.current = n, Y(() => {
|
|
1742
|
-
m && M && (F.current?.dispose(), F.current = C.current?.onDidChangeModelContent((p) => {
|
|
1743
|
-
z.current || M(C.current.getValue(), p);
|
|
1744
|
-
}));
|
|
1745
|
-
}, [m, M]), Y(() => {
|
|
1746
|
-
if (m) {
|
|
1747
|
-
let p = _.current.editor.onDidChangeMarkers((x) => {
|
|
1748
|
-
let h = C.current.getModel()?.uri;
|
|
1749
|
-
if (h && x.find((k) => k.path === h.path)) {
|
|
1750
|
-
let k = _.current.editor.getModelMarkers({ resource: h });
|
|
1751
|
-
b?.(k);
|
|
1752
|
-
}
|
|
1753
|
-
});
|
|
1754
|
-
return () => {
|
|
1755
|
-
p?.dispose();
|
|
1756
|
-
};
|
|
1757
|
-
}
|
|
1758
|
-
return () => {
|
|
1759
|
-
};
|
|
1760
|
-
}, [m, b]);
|
|
1761
|
-
function i() {
|
|
1762
|
-
F.current?.dispose(), S ? v && me.set(o, C.current.saveViewState()) : C.current.getModel()?.dispose(), C.current.dispose();
|
|
1763
|
-
}
|
|
1764
|
-
return W.createElement(zt, { width: T, height: O, isEditorReady: m, loading: g, _ref: $, className: A, wrapperProps: f });
|
|
1765
|
-
}
|
|
1766
|
-
var na = ra, aa = Fe(na), sa = aa;
|
|
1767
|
-
const oa = ({
|
|
1768
|
-
value: e,
|
|
1769
|
-
height: t = 300,
|
|
1770
|
-
schema: r,
|
|
1771
|
-
onChange: n,
|
|
1772
|
-
onValidate: s,
|
|
1773
|
-
language: o = "json",
|
|
1774
|
-
readOnly: c = !1
|
|
306
|
+
selectStateId: (i) => a({ selectedStateId: i })
|
|
307
|
+
})), De = ({ state: a }) => /* @__PURE__ */ r.jsx(we, { src: a.value, theme: "default" }), Je = ({
|
|
308
|
+
value: a,
|
|
309
|
+
height: i = 300,
|
|
310
|
+
schema: d,
|
|
311
|
+
onChange: h,
|
|
312
|
+
onValidate: n,
|
|
313
|
+
language: l = "json",
|
|
314
|
+
readOnly: x = !1
|
|
1775
315
|
}) => {
|
|
1776
|
-
const
|
|
1777
|
-
return
|
|
1778
|
-
|
|
1779
|
-
schemas:
|
|
316
|
+
const c = Oe(), p = xe((u) => u.theme), g = $(() => p === "dark" ? "vs-dark" : "light", [p]);
|
|
317
|
+
return U(() => {
|
|
318
|
+
c && (c.languages.typescript.javascriptDefaults.setCompilerOptions({ isolatedModules: !0 }), c.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
319
|
+
schemas: d ? [
|
|
1780
320
|
{
|
|
1781
321
|
uri: window.location.href,
|
|
1782
322
|
fileMatch: ["*"],
|
|
1783
|
-
schema:
|
|
323
|
+
schema: d
|
|
1784
324
|
}
|
|
1785
325
|
] : []
|
|
1786
326
|
}));
|
|
1787
|
-
}, [
|
|
1788
|
-
|
|
327
|
+
}, [c, d, l]), /* @__PURE__ */ r.jsx(
|
|
328
|
+
Ce,
|
|
1789
329
|
{
|
|
1790
330
|
"data-testid": "json-editor",
|
|
1791
|
-
height:
|
|
1792
|
-
language:
|
|
1793
|
-
value:
|
|
1794
|
-
theme:
|
|
1795
|
-
onChange: (
|
|
1796
|
-
|
|
331
|
+
height: i,
|
|
332
|
+
language: l,
|
|
333
|
+
value: a,
|
|
334
|
+
theme: g,
|
|
335
|
+
onChange: (u) => {
|
|
336
|
+
u || n?.(!1), h?.(u ?? "");
|
|
1797
337
|
},
|
|
1798
|
-
onValidate: (
|
|
338
|
+
onValidate: (u) => n?.(u.length === 0),
|
|
1799
339
|
options: {
|
|
1800
|
-
readOnly:
|
|
340
|
+
readOnly: x,
|
|
1801
341
|
scrollBeyondLastLine: !1,
|
|
1802
342
|
minimap: { enabled: !1 }
|
|
1803
343
|
}
|
|
1804
344
|
}
|
|
1805
345
|
);
|
|
1806
|
-
},
|
|
1807
|
-
const [
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
}, [
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1813
|
-
}, []),
|
|
1814
|
-
if (!(!
|
|
346
|
+
}, Le = ({ state: a }) => {
|
|
347
|
+
const [i, d] = S(!1), [h, n] = S(!0), [l, x] = S(JSON.stringify(a.value, null, 2)), [c, p] = S(!1), [g, u] = S("idle"), E = he(JSON.stringify(a.value, null, 2));
|
|
348
|
+
U(() => {
|
|
349
|
+
x(JSON.stringify(a.value, null, 2));
|
|
350
|
+
}, [a.value]);
|
|
351
|
+
const j = V((t) => {
|
|
352
|
+
p(t !== E.current), x(t), u("idle");
|
|
353
|
+
}, []), N = async () => {
|
|
354
|
+
if (!(!h || !c))
|
|
1815
355
|
try {
|
|
1816
|
-
|
|
1817
|
-
const
|
|
356
|
+
d(!0), u("idle");
|
|
357
|
+
const t = await fetch("/__motia/state", {
|
|
1818
358
|
method: "POST",
|
|
1819
359
|
headers: {
|
|
1820
360
|
"Content-Type": "application/json"
|
|
1821
361
|
},
|
|
1822
362
|
body: JSON.stringify({
|
|
1823
|
-
key:
|
|
1824
|
-
groupId:
|
|
1825
|
-
value: JSON.parse(
|
|
363
|
+
key: a.key,
|
|
364
|
+
groupId: a.groupId,
|
|
365
|
+
value: JSON.parse(l)
|
|
1826
366
|
})
|
|
1827
367
|
});
|
|
1828
|
-
if (!
|
|
1829
|
-
throw new Error(`HTTP error! status: ${
|
|
1830
|
-
|
|
1831
|
-
|
|
368
|
+
if (!t.ok)
|
|
369
|
+
throw new Error(`HTTP error! status: ${t.status}`);
|
|
370
|
+
E.current = l, u("success"), p(!1), setTimeout(() => {
|
|
371
|
+
u("idle");
|
|
1832
372
|
}, 3e3);
|
|
1833
|
-
} catch (
|
|
1834
|
-
console.error("Failed to save state:",
|
|
373
|
+
} catch (t) {
|
|
374
|
+
console.error("Failed to save state:", t), u("error");
|
|
1835
375
|
} finally {
|
|
1836
|
-
|
|
376
|
+
d(!1);
|
|
1837
377
|
}
|
|
1838
|
-
},
|
|
1839
|
-
|
|
1840
|
-
}, [
|
|
1841
|
-
/* @__PURE__ */
|
|
378
|
+
}, w = V(() => {
|
|
379
|
+
x(JSON.stringify(a.value, null, 2)), p(!1), u("idle");
|
|
380
|
+
}, [a.value]), y = $(() => g === "success" ? /* @__PURE__ */ r.jsx("div", { className: "bg-green-50 dark:bg-green-950/20 border border-green-200 dark:border-green-800 rounded-lg p-2", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 text-green-700 dark:text-green-400 text-sm", children: [
|
|
381
|
+
/* @__PURE__ */ r.jsx(Se, { className: "w-4 h-4" }),
|
|
1842
382
|
"State saved successfully!"
|
|
1843
|
-
] }) }) :
|
|
1844
|
-
/* @__PURE__ */
|
|
383
|
+
] }) }) : g === "error" ? /* @__PURE__ */ r.jsx("div", { className: "bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded-lg p-2", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 text-red-700 dark:text-red-400 text-sm", children: [
|
|
384
|
+
/* @__PURE__ */ r.jsx(K, { className: "w-4 h-4" }),
|
|
1845
385
|
"Failed to save state. Please try again."
|
|
1846
|
-
] }) }) : /* @__PURE__ */
|
|
1847
|
-
/* @__PURE__ */
|
|
386
|
+
] }) }) : /* @__PURE__ */ r.jsx("div", { className: "text-xs text-muted-foreground", children: c ? /* @__PURE__ */ r.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
387
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-2 h-2 bg-orange-500 rounded-full" }),
|
|
1848
388
|
"Unsaved changes"
|
|
1849
|
-
] }) : /* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
389
|
+
] }) : /* @__PURE__ */ r.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
390
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-2 h-2 bg-green-500 rounded-full" }),
|
|
1851
391
|
"Up to date"
|
|
1852
|
-
] }) }), [
|
|
1853
|
-
return /* @__PURE__ */
|
|
1854
|
-
/* @__PURE__ */
|
|
1855
|
-
/* @__PURE__ */
|
|
1856
|
-
/* @__PURE__ */
|
|
1857
|
-
|
|
392
|
+
] }) }), [g, c]);
|
|
393
|
+
return /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-2 h-full", children: [
|
|
394
|
+
/* @__PURE__ */ r.jsx("p", { className: "text-xs text-muted-foreground", children: "Modify the state value using the JSON editor below." }),
|
|
395
|
+
/* @__PURE__ */ r.jsx("div", { className: "space-y-3 pt-2 flex flex-col", children: /* @__PURE__ */ r.jsxs("div", { className: "relative flex-1", children: [
|
|
396
|
+
/* @__PURE__ */ r.jsx(
|
|
397
|
+
Je,
|
|
1858
398
|
{
|
|
1859
|
-
value:
|
|
1860
|
-
onChange:
|
|
1861
|
-
onValidate:
|
|
399
|
+
value: l,
|
|
400
|
+
onChange: j,
|
|
401
|
+
onValidate: n,
|
|
1862
402
|
height: "calc(100vh - 300px)"
|
|
1863
403
|
}
|
|
1864
404
|
),
|
|
1865
|
-
!
|
|
1866
|
-
/* @__PURE__ */
|
|
405
|
+
!h && /* @__PURE__ */ r.jsxs("div", { className: "absolute top-2 right-2 bg-destructive/90 text-destructive-foreground px-2 py-1 rounded text-xs flex items-center gap-1", children: [
|
|
406
|
+
/* @__PURE__ */ r.jsx(K, { className: "w-3 h-3" }),
|
|
1867
407
|
"Invalid JSON"
|
|
1868
408
|
] })
|
|
1869
409
|
] }) }),
|
|
1870
|
-
/* @__PURE__ */
|
|
1871
|
-
|
|
1872
|
-
/* @__PURE__ */
|
|
1873
|
-
|
|
1874
|
-
/* @__PURE__ */
|
|
1875
|
-
|
|
410
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between pt-2", children: [
|
|
411
|
+
y,
|
|
412
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
413
|
+
c && /* @__PURE__ */ r.jsx(D, { variant: "secondary", onClick: w, disabled: i, children: "Reset" }),
|
|
414
|
+
/* @__PURE__ */ r.jsx(
|
|
415
|
+
D,
|
|
1876
416
|
{
|
|
1877
|
-
onClick:
|
|
417
|
+
onClick: N,
|
|
1878
418
|
variant: "accent",
|
|
1879
|
-
disabled:
|
|
419
|
+
disabled: i || !h || !c,
|
|
1880
420
|
"data-testid": "state-save-button",
|
|
1881
|
-
children:
|
|
1882
|
-
/* @__PURE__ */
|
|
421
|
+
children: i ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
422
|
+
/* @__PURE__ */ r.jsx(Ee, { className: "w-3 h-3 animate-spin mr-1" }),
|
|
1883
423
|
"Saving..."
|
|
1884
|
-
] }) : /* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */
|
|
424
|
+
] }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
425
|
+
/* @__PURE__ */ r.jsx(ye, { className: "w-3 h-3 mr-1" }),
|
|
1886
426
|
"Save Changes"
|
|
1887
427
|
] })
|
|
1888
428
|
}
|
|
@@ -1890,107 +430,107 @@ const oa = ({
|
|
|
1890
430
|
] })
|
|
1891
431
|
] })
|
|
1892
432
|
] });
|
|
1893
|
-
},
|
|
1894
|
-
|
|
433
|
+
}, Ye = ({ state: a, onClose: i }) => /* @__PURE__ */ r.jsx(
|
|
434
|
+
pe,
|
|
1895
435
|
{
|
|
1896
|
-
onClose:
|
|
436
|
+
onClose: i,
|
|
1897
437
|
title: "State Details",
|
|
1898
438
|
initialWidth: 500,
|
|
1899
439
|
tabs: [
|
|
1900
440
|
{
|
|
1901
441
|
label: "Overview",
|
|
1902
|
-
content: /* @__PURE__ */
|
|
442
|
+
content: /* @__PURE__ */ r.jsx(De, { state: a })
|
|
1903
443
|
},
|
|
1904
444
|
{
|
|
1905
445
|
label: "Editor",
|
|
1906
|
-
content: /* @__PURE__ */
|
|
446
|
+
content: /* @__PURE__ */ r.jsx(Le, { state: a })
|
|
1907
447
|
}
|
|
1908
448
|
],
|
|
1909
|
-
actions: [{ icon: /* @__PURE__ */
|
|
449
|
+
actions: [{ icon: /* @__PURE__ */ r.jsx(ae, {}), onClick: i, label: "Close" }]
|
|
1910
450
|
}
|
|
1911
|
-
),
|
|
1912
|
-
const
|
|
1913
|
-
() =>
|
|
1914
|
-
[
|
|
1915
|
-
), [
|
|
1916
|
-
|
|
1917
|
-
},
|
|
1918
|
-
const
|
|
1919
|
-
|
|
1920
|
-
const
|
|
1921
|
-
return
|
|
451
|
+
), Ge = () => {
|
|
452
|
+
const a = se((t) => t.selectedStateId), i = se((t) => t.selectStateId), { items: d, deleteItems: h, refetch: n } = $e(), [l, x] = S(""), c = $(() => d.filter((t) => t.groupId.toLowerCase().includes(l.toLowerCase()) || t.key.toLowerCase().includes(l.toLowerCase())), [d, l]), p = $(
|
|
453
|
+
() => a ? c.find((t) => `${t.groupId}:${t.key}` === a) : null,
|
|
454
|
+
[c, a]
|
|
455
|
+
), [g, u] = S(/* @__PURE__ */ new Set()), E = (t) => i(`${t.groupId}:${t.key}`), j = () => i(void 0), N = () => {
|
|
456
|
+
h(Array.from(g)), u(/* @__PURE__ */ new Set());
|
|
457
|
+
}, w = (t) => {
|
|
458
|
+
const T = g.has(`${t.groupId}:${t.key}`);
|
|
459
|
+
u((_) => {
|
|
460
|
+
const v = new Set(_);
|
|
461
|
+
return T ? v.delete(`${t.groupId}:${t.key}`) : v.add(`${t.groupId}:${t.key}`), v;
|
|
1922
462
|
});
|
|
1923
|
-
},
|
|
1924
|
-
|
|
1925
|
-
const
|
|
1926
|
-
return
|
|
463
|
+
}, y = (t) => {
|
|
464
|
+
u((T) => {
|
|
465
|
+
const _ = new Set(T);
|
|
466
|
+
return t ? c.forEach((v) => _.add(`${v.groupId}:${v.key}`)) : c.forEach((v) => _.delete(`${v.groupId}:${v.key}`)), _;
|
|
1927
467
|
});
|
|
1928
468
|
};
|
|
1929
|
-
return /* @__PURE__ */
|
|
1930
|
-
|
|
1931
|
-
/* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
/* @__PURE__ */
|
|
1934
|
-
/* @__PURE__ */
|
|
1935
|
-
|
|
469
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
470
|
+
p && /* @__PURE__ */ r.jsx(Ye, { state: p, onClose: j }),
|
|
471
|
+
/* @__PURE__ */ r.jsxs("div", { className: "grid grid-rows-[auto_1fr] h-full", "data-testid": "states-container", children: [
|
|
472
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex p-2 border-b gap-2", "data-testid": "logs-search-container", children: [
|
|
473
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex-1 relative", children: [
|
|
474
|
+
/* @__PURE__ */ r.jsx(
|
|
475
|
+
ge,
|
|
1936
476
|
{
|
|
1937
477
|
variant: "shade",
|
|
1938
|
-
value:
|
|
1939
|
-
onChange: (
|
|
478
|
+
value: l,
|
|
479
|
+
onChange: (t) => x(t.target.value),
|
|
1940
480
|
className: "px-9 font-medium",
|
|
1941
481
|
placeholder: "Search by Group ID or Key"
|
|
1942
482
|
}
|
|
1943
483
|
),
|
|
1944
|
-
/* @__PURE__ */
|
|
1945
|
-
/* @__PURE__ */
|
|
1946
|
-
|
|
484
|
+
/* @__PURE__ */ r.jsx(Te, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50" }),
|
|
485
|
+
/* @__PURE__ */ r.jsx(
|
|
486
|
+
ae,
|
|
1947
487
|
{
|
|
1948
488
|
className: "cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground",
|
|
1949
|
-
onClick: () =>
|
|
489
|
+
onClick: () => x("")
|
|
1950
490
|
}
|
|
1951
491
|
)
|
|
1952
492
|
] }),
|
|
1953
|
-
/* @__PURE__ */
|
|
1954
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ r.jsxs(D, { variant: "default", className: "h-[34px]", disabled: g.size === 0, onClick: N, children: [
|
|
494
|
+
/* @__PURE__ */ r.jsx(_e, {}),
|
|
1955
495
|
" Delete"
|
|
1956
496
|
] }),
|
|
1957
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ r.jsx(D, { variant: "default", className: "h-[34px]", onClick: n, children: /* @__PURE__ */ r.jsx(Ne, { className: "w-4 h-4 text-muted-foreground" }) })
|
|
1958
498
|
] }),
|
|
1959
|
-
/* @__PURE__ */
|
|
1960
|
-
/* @__PURE__ */
|
|
1961
|
-
/* @__PURE__ */
|
|
1962
|
-
/* @__PURE__ */
|
|
1963
|
-
/* @__PURE__ */
|
|
1964
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ r.jsxs(ve, { children: [
|
|
500
|
+
/* @__PURE__ */ r.jsx(be, { className: "sticky top-0 bg-background/20 backdrop-blur-sm", children: /* @__PURE__ */ r.jsxs(Z, { children: [
|
|
501
|
+
/* @__PURE__ */ r.jsx(I, { children: /* @__PURE__ */ r.jsx(Q, { onClick: (t) => t.stopPropagation(), onCheckedChange: y }) }),
|
|
502
|
+
/* @__PURE__ */ r.jsx(I, { className: "rounded-0", children: "Group ID" }),
|
|
503
|
+
/* @__PURE__ */ r.jsx(I, { children: "Key" }),
|
|
504
|
+
/* @__PURE__ */ r.jsx(I, { children: "Type" })
|
|
1965
505
|
] }) }),
|
|
1966
|
-
/* @__PURE__ */
|
|
1967
|
-
|
|
506
|
+
/* @__PURE__ */ r.jsx(je, { children: c.map((t) => /* @__PURE__ */ r.jsxs(
|
|
507
|
+
Z,
|
|
1968
508
|
{
|
|
1969
|
-
"data-testid": `item-${
|
|
1970
|
-
onClick: () =>
|
|
1971
|
-
className:
|
|
509
|
+
"data-testid": `item-${t}`,
|
|
510
|
+
onClick: () => E(t),
|
|
511
|
+
className: ke(
|
|
1972
512
|
"font-mono font-semibold cursor-pointer border-0",
|
|
1973
|
-
|
|
513
|
+
p === t ? "bg-muted-foreground/10 hover:bg-muted-foreground/20" : "hover:bg-muted-foreground/10"
|
|
1974
514
|
),
|
|
1975
515
|
children: [
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
|
|
516
|
+
/* @__PURE__ */ r.jsx(P, { onClick: (T) => T.stopPropagation(), children: /* @__PURE__ */ r.jsx(
|
|
517
|
+
Q,
|
|
1978
518
|
{
|
|
1979
|
-
checked:
|
|
1980
|
-
onClick: () =>
|
|
519
|
+
checked: g.has(`${t.groupId}:${t.key}`),
|
|
520
|
+
onClick: () => w(t)
|
|
1981
521
|
}
|
|
1982
522
|
) }),
|
|
1983
|
-
/* @__PURE__ */
|
|
1984
|
-
/* @__PURE__ */
|
|
1985
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ r.jsx(P, { className: "hover:bg-transparent", children: t.groupId }),
|
|
524
|
+
/* @__PURE__ */ r.jsx(P, { className: "hover:bg-transparent", children: t.key }),
|
|
525
|
+
/* @__PURE__ */ r.jsx(P, { className: "hover:bg-transparent", children: t.type })
|
|
1986
526
|
]
|
|
1987
527
|
},
|
|
1988
|
-
`${
|
|
528
|
+
`${t.groupId}:${t.key}`
|
|
1989
529
|
)) })
|
|
1990
530
|
] })
|
|
1991
531
|
] })
|
|
1992
532
|
] });
|
|
1993
533
|
};
|
|
1994
534
|
export {
|
|
1995
|
-
|
|
535
|
+
Ge as StatesPage
|
|
1996
536
|
};
|