@bitux/review-layer-react 0.1.5 → 0.1.7
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
3
|
-
var
|
|
1
|
+
import dr, { memo as Ce, useState as N, useEffect as O, useCallback as I, useRef as pe, useMemo as We, createContext as Yr, useContext as Hr } from "react";
|
|
2
|
+
import { createPortal as fr } from "react-dom";
|
|
3
|
+
var Ne = { exports: {} }, fe = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,21 +10,21 @@ var Ae = { exports: {} }, le = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var r =
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
if (
|
|
23
|
-
return { $$typeof: t, type:
|
|
13
|
+
var nr;
|
|
14
|
+
function Gr() {
|
|
15
|
+
if (nr) return fe;
|
|
16
|
+
nr = 1;
|
|
17
|
+
var r = dr, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function u(v, f, m) {
|
|
19
|
+
var h, w = {}, j = null, k = null;
|
|
20
|
+
m !== void 0 && (j = "" + m), f.key !== void 0 && (j = "" + f.key), f.ref !== void 0 && (k = f.ref);
|
|
21
|
+
for (h in f) n.call(f, h) && !s.hasOwnProperty(h) && (w[h] = f[h]);
|
|
22
|
+
if (v && v.defaultProps) for (h in f = v.defaultProps, f) w[h] === void 0 && (w[h] = f[h]);
|
|
23
|
+
return { $$typeof: t, type: v, key: j, ref: k, props: w, _owner: i.current };
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return fe.Fragment = o, fe.jsx = u, fe.jsxs = u, fe;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var ve = {};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-jsx-runtime.development.js
|
|
@@ -34,91 +34,91 @@ var se = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
var r =
|
|
41
|
-
function
|
|
37
|
+
var ir;
|
|
38
|
+
function Xr() {
|
|
39
|
+
return ir || (ir = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
+
var r = dr, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), v = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), D = Symbol.iterator, M = "@@iterator";
|
|
41
|
+
function z(e) {
|
|
42
42
|
if (e === null || typeof e != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var
|
|
45
|
-
return typeof
|
|
44
|
+
var a = D && e[D] || e[M];
|
|
45
|
+
return typeof a == "function" ? a : null;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
47
|
+
var g = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
+
function c(e) {
|
|
49
49
|
{
|
|
50
|
-
for (var
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), p = 1; p < a; p++)
|
|
51
|
+
l[p - 1] = arguments[p];
|
|
52
|
+
x("error", e, l);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function x(e, a, l) {
|
|
56
56
|
{
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
return String(
|
|
57
|
+
var p = g.ReactDebugCurrentFrame, S = p.getStackAddendum();
|
|
58
|
+
S !== "" && (a += "%s", l = l.concat([S]));
|
|
59
|
+
var C = l.map(function(E) {
|
|
60
|
+
return String(E);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
C.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, C);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
65
|
+
var A = !1, $ = !1, ae = !1, se = !1, le = !1, ee;
|
|
66
|
+
ee = Symbol.for("react.module.reference");
|
|
67
|
+
function re(e) {
|
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === n || e === s || le || e === i || e === m || e === h || se || e === k || A || $ || ae || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === w || e.$$typeof === u || e.$$typeof === v || e.$$typeof === f || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
|
-
e.$$typeof ===
|
|
72
|
+
e.$$typeof === ee || e.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
var
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
var
|
|
79
|
-
return
|
|
74
|
+
function y(e, a, l) {
|
|
75
|
+
var p = e.displayName;
|
|
76
|
+
if (p)
|
|
77
|
+
return p;
|
|
78
|
+
var S = a.displayName || a.name || "";
|
|
79
|
+
return S !== "" ? l + "(" + S + ")" : l;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function R(e) {
|
|
82
82
|
return e.displayName || "Context";
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function P(e) {
|
|
85
85
|
if (e == null)
|
|
86
86
|
return null;
|
|
87
|
-
if (typeof e.tag == "number" &&
|
|
87
|
+
if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
88
|
return e.displayName || e.name || null;
|
|
89
89
|
if (typeof e == "string")
|
|
90
90
|
return e;
|
|
91
91
|
switch (e) {
|
|
92
|
-
case
|
|
92
|
+
case n:
|
|
93
93
|
return "Fragment";
|
|
94
94
|
case o:
|
|
95
95
|
return "Portal";
|
|
96
96
|
case s:
|
|
97
97
|
return "Profiler";
|
|
98
|
-
case
|
|
98
|
+
case i:
|
|
99
99
|
return "StrictMode";
|
|
100
|
-
case
|
|
100
|
+
case m:
|
|
101
101
|
return "Suspense";
|
|
102
|
-
case
|
|
102
|
+
case h:
|
|
103
103
|
return "SuspenseList";
|
|
104
104
|
}
|
|
105
105
|
if (typeof e == "object")
|
|
106
106
|
switch (e.$$typeof) {
|
|
107
|
-
case
|
|
108
|
-
var
|
|
109
|
-
return
|
|
110
|
-
case
|
|
111
|
-
var
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
return
|
|
115
|
-
case
|
|
116
|
-
var
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
var
|
|
107
|
+
case v:
|
|
108
|
+
var a = e;
|
|
109
|
+
return R(a) + ".Consumer";
|
|
110
|
+
case u:
|
|
111
|
+
var l = e;
|
|
112
|
+
return R(l._context) + ".Provider";
|
|
113
|
+
case f:
|
|
114
|
+
return y(e, e.render, "ForwardRef");
|
|
115
|
+
case w:
|
|
116
|
+
var p = e.displayName || null;
|
|
117
|
+
return p !== null ? p : P(e.type) || "Memo";
|
|
118
|
+
case j: {
|
|
119
|
+
var S = e, C = S._payload, E = S._init;
|
|
120
120
|
try {
|
|
121
|
-
return
|
|
121
|
+
return P(E(C));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,18 +126,18 @@ function Yr() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
129
|
+
var V = Object.assign, H = 0, Z, oe, he, ue, ce, _, J;
|
|
130
|
+
function Q() {
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
function
|
|
132
|
+
Q.__reactDisabledLog = !0;
|
|
133
|
+
function q() {
|
|
134
134
|
{
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if (H === 0) {
|
|
136
|
+
Z = console.log, oe = console.info, he = console.warn, ue = console.error, ce = console.group, _ = console.groupCollapsed, J = console.groupEnd;
|
|
137
137
|
var e = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
140
|
-
value:
|
|
140
|
+
value: Q,
|
|
141
141
|
writable: !0
|
|
142
142
|
};
|
|
143
143
|
Object.defineProperties(console, {
|
|
@@ -150,279 +150,279 @@ function Yr() {
|
|
|
150
150
|
groupEnd: e
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
H++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function be() {
|
|
157
157
|
{
|
|
158
|
-
if (
|
|
158
|
+
if (H--, H === 0) {
|
|
159
159
|
var e = {
|
|
160
160
|
configurable: !0,
|
|
161
161
|
enumerable: !0,
|
|
162
162
|
writable: !0
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
|
-
log:
|
|
166
|
-
value:
|
|
165
|
+
log: V({}, e, {
|
|
166
|
+
value: Z
|
|
167
167
|
}),
|
|
168
|
-
info:
|
|
169
|
-
value:
|
|
168
|
+
info: V({}, e, {
|
|
169
|
+
value: oe
|
|
170
170
|
}),
|
|
171
|
-
warn:
|
|
172
|
-
value:
|
|
171
|
+
warn: V({}, e, {
|
|
172
|
+
value: he
|
|
173
173
|
}),
|
|
174
|
-
error:
|
|
175
|
-
value:
|
|
174
|
+
error: V({}, e, {
|
|
175
|
+
value: ue
|
|
176
176
|
}),
|
|
177
|
-
group:
|
|
178
|
-
value:
|
|
177
|
+
group: V({}, e, {
|
|
178
|
+
value: ce
|
|
179
179
|
}),
|
|
180
|
-
groupCollapsed:
|
|
180
|
+
groupCollapsed: V({}, e, {
|
|
181
181
|
value: _
|
|
182
182
|
}),
|
|
183
|
-
groupEnd:
|
|
184
|
-
value:
|
|
183
|
+
groupEnd: V({}, e, {
|
|
184
|
+
value: J
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
H < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
191
|
+
var Pe = g.ReactCurrentDispatcher, Te;
|
|
192
|
+
function xe(e, a, l) {
|
|
193
193
|
{
|
|
194
|
-
if (
|
|
194
|
+
if (Te === void 0)
|
|
195
195
|
try {
|
|
196
196
|
throw Error();
|
|
197
|
-
} catch (
|
|
198
|
-
var
|
|
199
|
-
|
|
197
|
+
} catch (S) {
|
|
198
|
+
var p = S.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
Te = p && p[1] || "";
|
|
200
200
|
}
|
|
201
201
|
return `
|
|
202
|
-
` +
|
|
202
|
+
` + Te + e;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var
|
|
205
|
+
var je = !1, ye;
|
|
206
206
|
{
|
|
207
|
-
var
|
|
208
|
-
|
|
207
|
+
var mr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
ye = new mr();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
if (!e ||
|
|
210
|
+
function Be(e, a) {
|
|
211
|
+
if (!e || je)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
214
|
-
var
|
|
215
|
-
if (
|
|
216
|
-
return
|
|
214
|
+
var l = ye.get(e);
|
|
215
|
+
if (l !== void 0)
|
|
216
|
+
return l;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
var
|
|
218
|
+
var p;
|
|
219
|
+
je = !0;
|
|
220
|
+
var S = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
|
-
var
|
|
223
|
-
|
|
222
|
+
var C;
|
|
223
|
+
C = Pe.current, Pe.current = null, q();
|
|
224
224
|
try {
|
|
225
|
-
if (
|
|
226
|
-
var
|
|
225
|
+
if (a) {
|
|
226
|
+
var E = function() {
|
|
227
227
|
throw Error();
|
|
228
228
|
};
|
|
229
|
-
if (Object.defineProperty(
|
|
229
|
+
if (Object.defineProperty(E.prototype, "props", {
|
|
230
230
|
set: function() {
|
|
231
231
|
throw Error();
|
|
232
232
|
}
|
|
233
233
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
234
|
try {
|
|
235
|
-
Reflect.construct(
|
|
236
|
-
} catch (
|
|
237
|
-
|
|
235
|
+
Reflect.construct(E, []);
|
|
236
|
+
} catch (U) {
|
|
237
|
+
p = U;
|
|
238
238
|
}
|
|
239
|
-
Reflect.construct(e, [],
|
|
239
|
+
Reflect.construct(e, [], E);
|
|
240
240
|
} else {
|
|
241
241
|
try {
|
|
242
|
-
|
|
243
|
-
} catch (
|
|
244
|
-
|
|
242
|
+
E.call();
|
|
243
|
+
} catch (U) {
|
|
244
|
+
p = U;
|
|
245
245
|
}
|
|
246
|
-
e.call(
|
|
246
|
+
e.call(E.prototype);
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
250
250
|
throw Error();
|
|
251
|
-
} catch (
|
|
252
|
-
|
|
251
|
+
} catch (U) {
|
|
252
|
+
p = U;
|
|
253
253
|
}
|
|
254
254
|
e();
|
|
255
255
|
}
|
|
256
|
-
} catch (
|
|
257
|
-
if (
|
|
258
|
-
for (var b =
|
|
259
|
-
`),
|
|
260
|
-
`),
|
|
261
|
-
|
|
262
|
-
for (;
|
|
263
|
-
if (b[
|
|
264
|
-
if (
|
|
256
|
+
} catch (U) {
|
|
257
|
+
if (U && p && typeof U.stack == "string") {
|
|
258
|
+
for (var b = U.stack.split(`
|
|
259
|
+
`), W = p.stack.split(`
|
|
260
|
+
`), L = b.length - 1, F = W.length - 1; L >= 1 && F >= 0 && b[L] !== W[F]; )
|
|
261
|
+
F--;
|
|
262
|
+
for (; L >= 1 && F >= 0; L--, F--)
|
|
263
|
+
if (b[L] !== W[F]) {
|
|
264
|
+
if (L !== 1 || F !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (
|
|
267
|
-
var
|
|
268
|
-
` + b[
|
|
269
|
-
return e.displayName &&
|
|
266
|
+
if (L--, F--, F < 0 || b[L] !== W[F]) {
|
|
267
|
+
var G = `
|
|
268
|
+
` + b[L].replace(" at new ", " at ");
|
|
269
|
+
return e.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", e.displayName)), typeof e == "function" && ye.set(e, G), G;
|
|
270
270
|
}
|
|
271
|
-
while (
|
|
271
|
+
while (L >= 1 && F >= 0);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
|
|
276
|
+
je = !1, Pe.current = C, be(), Error.prepareStackTrace = S;
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
return typeof e == "function" &&
|
|
278
|
+
var ne = e ? e.displayName || e.name : "", K = ne ? xe(ne) : "";
|
|
279
|
+
return typeof e == "function" && ye.set(e, K), K;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return
|
|
281
|
+
function wr(e, a, l) {
|
|
282
|
+
return Be(e, !1);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
var
|
|
286
|
-
return !!(
|
|
284
|
+
function _r(e) {
|
|
285
|
+
var a = e.prototype;
|
|
286
|
+
return !!(a && a.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function me(e, a, l) {
|
|
289
289
|
if (e == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof e == "function")
|
|
292
|
-
return
|
|
292
|
+
return Be(e, _r(e));
|
|
293
293
|
if (typeof e == "string")
|
|
294
|
-
return
|
|
294
|
+
return xe(e);
|
|
295
295
|
switch (e) {
|
|
296
|
-
case
|
|
297
|
-
return
|
|
298
|
-
case
|
|
299
|
-
return
|
|
296
|
+
case m:
|
|
297
|
+
return xe("Suspense");
|
|
298
|
+
case h:
|
|
299
|
+
return xe("SuspenseList");
|
|
300
300
|
}
|
|
301
301
|
if (typeof e == "object")
|
|
302
302
|
switch (e.$$typeof) {
|
|
303
|
-
case
|
|
304
|
-
return
|
|
305
|
-
case
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
var
|
|
303
|
+
case f:
|
|
304
|
+
return wr(e.render);
|
|
305
|
+
case w:
|
|
306
|
+
return me(e.type, a, l);
|
|
307
|
+
case j: {
|
|
308
|
+
var p = e, S = p._payload, C = p._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return me(C(S), a, l);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var
|
|
318
|
-
function
|
|
317
|
+
var de = Object.prototype.hasOwnProperty, Ue = {}, Ye = g.ReactDebugCurrentFrame;
|
|
318
|
+
function we(e) {
|
|
319
319
|
if (e) {
|
|
320
|
-
var
|
|
321
|
-
|
|
320
|
+
var a = e._owner, l = me(e.type, e._source, a ? a.type : null);
|
|
321
|
+
Ye.setExtraStackFrame(l);
|
|
322
322
|
} else
|
|
323
|
-
|
|
323
|
+
Ye.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Er(e, a, l, p, S) {
|
|
326
326
|
{
|
|
327
|
-
var
|
|
328
|
-
for (var
|
|
329
|
-
if (
|
|
327
|
+
var C = Function.call.bind(de);
|
|
328
|
+
for (var E in e)
|
|
329
|
+
if (C(e, E)) {
|
|
330
330
|
var b = void 0;
|
|
331
331
|
try {
|
|
332
|
-
if (typeof e[
|
|
333
|
-
var
|
|
334
|
-
throw
|
|
332
|
+
if (typeof e[E] != "function") {
|
|
333
|
+
var W = Error((p || "React class") + ": " + l + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
+
throw W.name = "Invariant Violation", W;
|
|
335
335
|
}
|
|
336
|
-
b = e[
|
|
337
|
-
} catch (
|
|
338
|
-
b =
|
|
336
|
+
b = e[E](a, E, p, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
+
} catch (L) {
|
|
338
|
+
b = L;
|
|
339
339
|
}
|
|
340
|
-
b && !(b instanceof Error) && (
|
|
340
|
+
b && !(b instanceof Error) && (we(S), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", l, E, typeof b), we(null)), b instanceof Error && !(b.message in Ue) && (Ue[b.message] = !0, we(S), c("Failed %s type: %s", l, b.message), we(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
var
|
|
345
|
-
function
|
|
346
|
-
return
|
|
344
|
+
var Rr = Array.isArray;
|
|
345
|
+
function Ve(e) {
|
|
346
|
+
return Rr(e);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Sr(e) {
|
|
349
349
|
{
|
|
350
|
-
var
|
|
351
|
-
return
|
|
350
|
+
var a = typeof Symbol == "function" && Symbol.toStringTag, l = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
|
+
return l;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function Cr(e) {
|
|
355
355
|
try {
|
|
356
|
-
return
|
|
356
|
+
return He(e), !1;
|
|
357
357
|
} catch {
|
|
358
358
|
return !0;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function He(e) {
|
|
362
362
|
return "" + e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
return
|
|
364
|
+
function Ge(e) {
|
|
365
|
+
if (Cr(e))
|
|
366
|
+
return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Sr(e)), He(e);
|
|
367
367
|
}
|
|
368
|
-
var
|
|
368
|
+
var Xe = g.ReactCurrentOwner, kr = {
|
|
369
369
|
key: !0,
|
|
370
370
|
ref: !0,
|
|
371
371
|
__self: !0,
|
|
372
372
|
__source: !0
|
|
373
|
-
},
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
376
|
-
var
|
|
377
|
-
if (
|
|
373
|
+
}, qe, Je;
|
|
374
|
+
function Pr(e) {
|
|
375
|
+
if (de.call(e, "ref")) {
|
|
376
|
+
var a = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
|
+
if (a && a.isReactWarning)
|
|
378
378
|
return !1;
|
|
379
379
|
}
|
|
380
380
|
return e.ref !== void 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
384
|
-
var
|
|
385
|
-
if (
|
|
382
|
+
function Tr(e) {
|
|
383
|
+
if (de.call(e, "key")) {
|
|
384
|
+
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
|
+
if (a && a.isReactWarning)
|
|
386
386
|
return !1;
|
|
387
387
|
}
|
|
388
388
|
return e.key !== void 0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
typeof e.ref == "string" &&
|
|
390
|
+
function jr(e, a) {
|
|
391
|
+
typeof e.ref == "string" && Xe.current;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Vr(e, a) {
|
|
394
394
|
{
|
|
395
|
-
var
|
|
396
|
-
|
|
395
|
+
var l = function() {
|
|
396
|
+
qe || (qe = !0, c("%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://reactjs.org/link/special-props)", a));
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
get:
|
|
398
|
+
l.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
|
+
get: l,
|
|
400
400
|
configurable: !0
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function Ir(e, a) {
|
|
405
405
|
{
|
|
406
|
-
var
|
|
407
|
-
|
|
406
|
+
var l = function() {
|
|
407
|
+
Je || (Je = !0, c("%s: `ref` 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://reactjs.org/link/special-props)", a));
|
|
408
408
|
};
|
|
409
|
-
|
|
410
|
-
get:
|
|
409
|
+
l.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
|
+
get: l,
|
|
411
411
|
configurable: !0
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
415
|
+
var Or = function(e, a, l, p, S, C, E) {
|
|
416
416
|
var b = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
418
|
$$typeof: t,
|
|
419
419
|
// Built-in properties that belong on the element
|
|
420
420
|
type: e,
|
|
421
|
-
key:
|
|
422
|
-
ref:
|
|
423
|
-
props:
|
|
421
|
+
key: a,
|
|
422
|
+
ref: l,
|
|
423
|
+
props: E,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
|
-
_owner:
|
|
425
|
+
_owner: C
|
|
426
426
|
};
|
|
427
427
|
return b._store = {}, Object.defineProperty(b._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
@@ -433,49 +433,49 @@ function Yr() {
|
|
|
433
433
|
configurable: !1,
|
|
434
434
|
enumerable: !1,
|
|
435
435
|
writable: !1,
|
|
436
|
-
value:
|
|
436
|
+
value: p
|
|
437
437
|
}), Object.defineProperty(b, "_source", {
|
|
438
438
|
configurable: !1,
|
|
439
439
|
enumerable: !1,
|
|
440
440
|
writable: !1,
|
|
441
|
-
value:
|
|
441
|
+
value: S
|
|
442
442
|
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
|
443
443
|
};
|
|
444
|
-
function
|
|
444
|
+
function Dr(e, a, l, p, S) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
for (
|
|
449
|
-
|
|
446
|
+
var C, E = {}, b = null, W = null;
|
|
447
|
+
l !== void 0 && (Ge(l), b = "" + l), Tr(a) && (Ge(a.key), b = "" + a.key), Pr(a) && (W = a.ref, jr(a, S));
|
|
448
|
+
for (C in a)
|
|
449
|
+
de.call(a, C) && !kr.hasOwnProperty(C) && (E[C] = a[C]);
|
|
450
450
|
if (e && e.defaultProps) {
|
|
451
|
-
var
|
|
452
|
-
for (
|
|
453
|
-
|
|
451
|
+
var L = e.defaultProps;
|
|
452
|
+
for (C in L)
|
|
453
|
+
E[C] === void 0 && (E[C] = L[C]);
|
|
454
454
|
}
|
|
455
|
-
if (b ||
|
|
456
|
-
var
|
|
457
|
-
b &&
|
|
455
|
+
if (b || W) {
|
|
456
|
+
var F = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
+
b && Vr(E, F), W && Ir(E, F);
|
|
458
458
|
}
|
|
459
|
-
return
|
|
459
|
+
return Or(e, b, W, S, p, Xe.current, E);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var
|
|
463
|
-
function
|
|
462
|
+
var Ie = g.ReactCurrentOwner, Ze = g.ReactDebugCurrentFrame;
|
|
463
|
+
function te(e) {
|
|
464
464
|
if (e) {
|
|
465
|
-
var
|
|
466
|
-
|
|
465
|
+
var a = e._owner, l = me(e.type, e._source, a ? a.type : null);
|
|
466
|
+
Ze.setExtraStackFrame(l);
|
|
467
467
|
} else
|
|
468
|
-
|
|
468
|
+
Ze.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
|
-
var
|
|
471
|
-
|
|
470
|
+
var Oe;
|
|
471
|
+
Oe = !1;
|
|
472
472
|
function De(e) {
|
|
473
473
|
return typeof e == "object" && e !== null && e.$$typeof === t;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Qe() {
|
|
476
476
|
{
|
|
477
|
-
if (
|
|
478
|
-
var e =
|
|
477
|
+
if (Ie.current) {
|
|
478
|
+
var e = P(Ie.current.type);
|
|
479
479
|
if (e)
|
|
480
480
|
return `
|
|
481
481
|
|
|
@@ -484,202 +484,212 @@ Check the render method of \`` + e + "`.";
|
|
|
484
484
|
return "";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function Lr(e) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
490
|
+
var Ke = {};
|
|
491
|
+
function zr(e) {
|
|
492
492
|
{
|
|
493
|
-
var
|
|
494
|
-
if (!
|
|
495
|
-
var
|
|
496
|
-
|
|
493
|
+
var a = Qe();
|
|
494
|
+
if (!a) {
|
|
495
|
+
var l = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
|
+
l && (a = `
|
|
497
497
|
|
|
498
|
-
Check the top-level render call using <` +
|
|
498
|
+
Check the top-level render call using <` + l + ">.");
|
|
499
499
|
}
|
|
500
|
-
return
|
|
500
|
+
return a;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function er(e, a) {
|
|
504
504
|
{
|
|
505
505
|
if (!e._store || e._store.validated || e.key != null)
|
|
506
506
|
return;
|
|
507
507
|
e._store.validated = !0;
|
|
508
|
-
var
|
|
509
|
-
if (
|
|
508
|
+
var l = zr(a);
|
|
509
|
+
if (Ke[l])
|
|
510
510
|
return;
|
|
511
|
-
|
|
512
|
-
var
|
|
513
|
-
e && e._owner && e._owner !==
|
|
511
|
+
Ke[l] = !0;
|
|
512
|
+
var p = "";
|
|
513
|
+
e && e._owner && e._owner !== Ie.current && (p = " It was passed a child from " + P(e._owner.type) + "."), te(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, p), te(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function rr(e, a) {
|
|
517
517
|
{
|
|
518
518
|
if (typeof e != "object")
|
|
519
519
|
return;
|
|
520
|
-
if (
|
|
521
|
-
for (var
|
|
522
|
-
var
|
|
523
|
-
De(
|
|
520
|
+
if (Ve(e))
|
|
521
|
+
for (var l = 0; l < e.length; l++) {
|
|
522
|
+
var p = e[l];
|
|
523
|
+
De(p) && er(p, a);
|
|
524
524
|
}
|
|
525
525
|
else if (De(e))
|
|
526
526
|
e._store && (e._store.validated = !0);
|
|
527
527
|
else if (e) {
|
|
528
|
-
var
|
|
529
|
-
if (typeof
|
|
530
|
-
for (var
|
|
531
|
-
De(
|
|
528
|
+
var S = z(e);
|
|
529
|
+
if (typeof S == "function" && S !== e.entries)
|
|
530
|
+
for (var C = S.call(e), E; !(E = C.next()).done; )
|
|
531
|
+
De(E.value) && er(E.value, a);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Ar(e) {
|
|
536
536
|
{
|
|
537
|
-
var
|
|
538
|
-
if (
|
|
537
|
+
var a = e.type;
|
|
538
|
+
if (a == null || typeof a == "string")
|
|
539
539
|
return;
|
|
540
|
-
var
|
|
541
|
-
if (typeof
|
|
542
|
-
|
|
543
|
-
else if (typeof
|
|
540
|
+
var l;
|
|
541
|
+
if (typeof a == "function")
|
|
542
|
+
l = a.propTypes;
|
|
543
|
+
else if (typeof a == "object" && (a.$$typeof === f || // Note: Memo only checks outer props here.
|
|
544
544
|
// Inner props are checked in the reconciler.
|
|
545
|
-
|
|
546
|
-
|
|
545
|
+
a.$$typeof === w))
|
|
546
|
+
l = a.propTypes;
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
|
-
if (
|
|
550
|
-
var
|
|
551
|
-
|
|
552
|
-
} else if (
|
|
553
|
-
|
|
554
|
-
var
|
|
555
|
-
|
|
549
|
+
if (l) {
|
|
550
|
+
var p = P(a);
|
|
551
|
+
Er(l, e.props, "prop", p, e);
|
|
552
|
+
} else if (a.PropTypes !== void 0 && !Oe) {
|
|
553
|
+
Oe = !0;
|
|
554
|
+
var S = P(a);
|
|
555
|
+
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", S || "Unknown");
|
|
556
556
|
}
|
|
557
|
-
typeof
|
|
557
|
+
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function Fr(e) {
|
|
561
561
|
{
|
|
562
|
-
for (var
|
|
563
|
-
var
|
|
564
|
-
if (
|
|
565
|
-
|
|
562
|
+
for (var a = Object.keys(e.props), l = 0; l < a.length; l++) {
|
|
563
|
+
var p = a[l];
|
|
564
|
+
if (p !== "children" && p !== "key") {
|
|
565
|
+
te(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), te(null);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
e.ref !== null && (
|
|
569
|
+
e.ref !== null && (te(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), te(null));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
var
|
|
573
|
-
function
|
|
572
|
+
var or = {};
|
|
573
|
+
function tr(e, a, l, p, S, C) {
|
|
574
574
|
{
|
|
575
|
-
var
|
|
576
|
-
if (!
|
|
575
|
+
var E = re(e);
|
|
576
|
+
if (!E) {
|
|
577
577
|
var b = "";
|
|
578
578
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
-
var
|
|
580
|
-
|
|
581
|
-
var
|
|
582
|
-
e === null ?
|
|
579
|
+
var W = Lr();
|
|
580
|
+
W ? b += W : b += Qe();
|
|
581
|
+
var L;
|
|
582
|
+
e === null ? L = "null" : Ve(e) ? L = "array" : e !== void 0 && e.$$typeof === t ? (L = "<" + (P(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : L = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, b);
|
|
583
583
|
}
|
|
584
|
-
var
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
if (
|
|
588
|
-
var
|
|
589
|
-
if (
|
|
590
|
-
if (
|
|
591
|
-
if (
|
|
592
|
-
for (var
|
|
593
|
-
|
|
594
|
-
Object.freeze && Object.freeze(
|
|
584
|
+
var F = Dr(e, a, l, S, C);
|
|
585
|
+
if (F == null)
|
|
586
|
+
return F;
|
|
587
|
+
if (E) {
|
|
588
|
+
var G = a.children;
|
|
589
|
+
if (G !== void 0)
|
|
590
|
+
if (p)
|
|
591
|
+
if (Ve(G)) {
|
|
592
|
+
for (var ne = 0; ne < G.length; ne++)
|
|
593
|
+
rr(G[ne], e);
|
|
594
|
+
Object.freeze && Object.freeze(G);
|
|
595
595
|
} else
|
|
596
|
-
|
|
596
|
+
c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
|
|
598
|
+
rr(G, e);
|
|
599
599
|
}
|
|
600
|
-
if (
|
|
601
|
-
var
|
|
602
|
-
return
|
|
603
|
-
}),
|
|
604
|
-
if (!
|
|
605
|
-
var
|
|
606
|
-
|
|
600
|
+
if (de.call(a, "key")) {
|
|
601
|
+
var K = P(e), U = Object.keys(a).filter(function(Ur) {
|
|
602
|
+
return Ur !== "key";
|
|
603
|
+
}), Le = U.length > 0 ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
+
if (!or[K + Le]) {
|
|
605
|
+
var Br = U.length > 0 ? "{" + U.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
+
c(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`,
|
|
611
|
+
<%s key={someKey} {...props} />`, Le, K, Br, K), or[K + Le] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return e ===
|
|
614
|
+
return e === n ? Fr(F) : Ar(F), F;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
617
|
+
function Nr(e, a, l) {
|
|
618
|
+
return tr(e, a, l, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
620
|
+
function $r(e, a, l) {
|
|
621
|
+
return tr(e, a, l, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
}()),
|
|
623
|
+
var Mr = $r, Wr = Nr;
|
|
624
|
+
ve.Fragment = n, ve.jsx = Mr, ve.jsxs = Wr;
|
|
625
|
+
}()), ve;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var
|
|
629
|
-
function
|
|
627
|
+
process.env.NODE_ENV === "production" ? Ne.exports = Gr() : Ne.exports = Xr();
|
|
628
|
+
var d = Ne.exports;
|
|
629
|
+
function qr(r) {
|
|
630
630
|
if (r.id && /^[a-zA-Z][\w-]*$/.test(r.id))
|
|
631
631
|
return `#${r.id}`;
|
|
632
632
|
const t = [];
|
|
633
633
|
let o = r;
|
|
634
634
|
for (; o && o.nodeType === Node.ELEMENT_NODE; ) {
|
|
635
|
-
let
|
|
635
|
+
let n = o.nodeName.toLowerCase();
|
|
636
636
|
if (o.id && /^[a-zA-Z][\w-]*$/.test(o.id)) {
|
|
637
637
|
t.unshift(`#${o.id}`);
|
|
638
638
|
break;
|
|
639
639
|
}
|
|
640
640
|
if (o.className && typeof o.className == "string") {
|
|
641
|
-
const
|
|
642
|
-
if (
|
|
643
|
-
const s =
|
|
644
|
-
s && (
|
|
641
|
+
const i = o.className.trim().split(/\s+/).filter(Boolean);
|
|
642
|
+
if (i.length > 0) {
|
|
643
|
+
const s = i.filter((u) => /^[a-zA-Z][\w-]*$/.test(u)).slice(0, 2).map((u) => `.${u}`).join("");
|
|
644
|
+
s && (n += s);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
if (t.length > 0) {
|
|
648
|
-
const
|
|
649
|
-
if (
|
|
650
|
-
const s = Array.from(
|
|
651
|
-
(
|
|
648
|
+
const i = o.parentElement;
|
|
649
|
+
if (i) {
|
|
650
|
+
const s = Array.from(i.children).filter(
|
|
651
|
+
(u) => u.nodeName === o.nodeName
|
|
652
652
|
);
|
|
653
653
|
if (s.length > 1) {
|
|
654
|
-
const
|
|
655
|
-
|
|
654
|
+
const u = s.indexOf(o) + 1;
|
|
655
|
+
n += `:nth-child(${u})`;
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
|
-
t.unshift(
|
|
659
|
+
t.unshift(n), o = o.parentElement;
|
|
660
660
|
}
|
|
661
661
|
return t.join(" > ");
|
|
662
662
|
}
|
|
663
|
-
const
|
|
664
|
-
function
|
|
663
|
+
const Jr = "[data-review-layer-root]", Zr = 16;
|
|
664
|
+
function $e(r, t, o = Zr) {
|
|
665
665
|
if (typeof window > "u") return { x: r, y: t };
|
|
666
|
-
const
|
|
666
|
+
const n = o, i = o, s = window.innerWidth - o, u = window.innerHeight - o;
|
|
667
667
|
return {
|
|
668
|
-
x: Math.max(
|
|
669
|
-
y: Math.max(
|
|
668
|
+
x: Math.max(n, Math.min(s, r)),
|
|
669
|
+
y: Math.max(i, Math.min(u, t))
|
|
670
670
|
};
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function vr(r) {
|
|
673
|
+
if (typeof document > "u" || !r) return [];
|
|
674
|
+
const t = [];
|
|
675
|
+
let o = r.parentElement;
|
|
676
|
+
for (; o && o !== document.body; ) {
|
|
677
|
+
const n = getComputedStyle(o), i = n.overflowX, s = n.overflowY;
|
|
678
|
+
(i === "scroll" || i === "auto" || i === "overlay" || s === "scroll" || s === "auto" || s === "overlay") && (o.scrollHeight > o.clientHeight || o.scrollWidth > o.clientWidth) && t.push(o), o = o.parentElement;
|
|
679
|
+
}
|
|
680
|
+
return t;
|
|
681
|
+
}
|
|
682
|
+
function pr(r) {
|
|
673
683
|
var t;
|
|
674
684
|
if (typeof document > "u" || !(r != null && r.trim())) return null;
|
|
675
685
|
try {
|
|
676
686
|
const o = document.querySelector(r);
|
|
677
|
-
return !o || (t = o.closest) != null && t.call(o,
|
|
687
|
+
return !o || (t = o.closest) != null && t.call(o, Jr) ? null : o.getBoundingClientRect();
|
|
678
688
|
} catch {
|
|
679
689
|
return null;
|
|
680
690
|
}
|
|
681
691
|
}
|
|
682
|
-
function
|
|
692
|
+
function Qr(r) {
|
|
683
693
|
if (typeof window > "u")
|
|
684
694
|
return { relativeX: 0, relativeY: 0 };
|
|
685
695
|
const t = window.innerWidth, o = window.innerHeight;
|
|
@@ -688,7 +698,7 @@ function Xr(r) {
|
|
|
688
698
|
relativeY: o > 0 ? r.top / o : 0
|
|
689
699
|
};
|
|
690
700
|
}
|
|
691
|
-
function
|
|
701
|
+
function gr(r) {
|
|
692
702
|
if (typeof window > "u")
|
|
693
703
|
return {
|
|
694
704
|
x: r.x ?? 0,
|
|
@@ -703,88 +713,164 @@ function Ne(r) {
|
|
|
703
713
|
y: r.y ?? 0
|
|
704
714
|
};
|
|
705
715
|
}
|
|
706
|
-
function
|
|
707
|
-
const { x: t, y: o } =
|
|
708
|
-
return new DOMRect(t, o,
|
|
716
|
+
function Kr(r) {
|
|
717
|
+
const { x: t, y: o } = gr(r), n = r.width ?? 100, i = r.height ?? 40;
|
|
718
|
+
return new DOMRect(t, o, n, i);
|
|
709
719
|
}
|
|
710
|
-
function
|
|
711
|
-
const t = (r.relativeX ?? r.relative_x) != null && (r.relativeY ?? r.relative_y) != null, o = r.x != null && r.y != null;
|
|
712
|
-
if (t || o)
|
|
713
|
-
return Ne(r);
|
|
720
|
+
function Ee(r) {
|
|
714
721
|
if (r.selector) {
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
717
|
-
return { x:
|
|
722
|
+
const t = pr(r.selector);
|
|
723
|
+
if (t != null)
|
|
724
|
+
return { x: t.left, y: t.top };
|
|
718
725
|
}
|
|
719
|
-
return
|
|
726
|
+
return gr(r);
|
|
720
727
|
}
|
|
721
|
-
|
|
728
|
+
function Me() {
|
|
729
|
+
if (typeof window > "u") return "/";
|
|
730
|
+
try {
|
|
731
|
+
const r = new URLSearchParams(window.location.search).get("path");
|
|
732
|
+
if (r != null && r.trim() !== "")
|
|
733
|
+
return r.startsWith("/") ? r : `/${r}`;
|
|
734
|
+
} catch {
|
|
735
|
+
}
|
|
736
|
+
return window.location.pathname || "/";
|
|
737
|
+
}
|
|
738
|
+
const T = {
|
|
722
739
|
PENDING: "pending",
|
|
723
740
|
DEV_FIXED: "dev_fixed",
|
|
724
741
|
VALIDATED: "validated"
|
|
725
|
-
};
|
|
726
|
-
function
|
|
742
|
+
}, ar = "[review-layer API]";
|
|
743
|
+
function X(r, t, o) {
|
|
744
|
+
if ("status" in o) {
|
|
745
|
+
const { status: v, statusText: f, body: m = "" } = o;
|
|
746
|
+
let h;
|
|
747
|
+
v === 401 ? h = "No autorizado (401). Revisa que apiKey sea correcta y esté aceptada por la API." : v === 403 ? h = "Acceso denegado (403). Revisa apiKey o permisos del proyecto." : v === 404 ? h = "Recurso no encontrado (404). Revisa apiUrl y que la ruta exista en el backend." : v >= 500 ? h = "Error del servidor (5xx). El backend puede estar caído o sobrecargado." : h = `Respuesta HTTP ${v} ${f}. Revisa la API.`, console.error(ar, r, {
|
|
748
|
+
motivo: h,
|
|
749
|
+
url: t,
|
|
750
|
+
status: v,
|
|
751
|
+
statusText: f,
|
|
752
|
+
body: m.slice(0, 300)
|
|
753
|
+
});
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const n = o.networkError, i = n instanceof Error ? n.message : String(n), u = n instanceof TypeError || /failed to fetch|networkerror|load failed|network request failed/i.test(i) ? "Posible CORS o error de red (servidor inalcanzable, bloqueo CORS o certificado). Revisa que apiUrl sea accesible desde este origen y que el backend permita CORS." : `Error inesperado: ${i}`;
|
|
757
|
+
console.error(ar, r, { motivo: u, url: t, error: n });
|
|
758
|
+
}
|
|
759
|
+
function ge(r) {
|
|
727
760
|
return {
|
|
728
761
|
"Content-Type": "application/json",
|
|
729
762
|
"x-review-key": r
|
|
730
763
|
};
|
|
731
764
|
}
|
|
732
|
-
async function
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
765
|
+
async function eo(r, t, o) {
|
|
766
|
+
const n = `${r}/reviewers`;
|
|
767
|
+
let i;
|
|
768
|
+
try {
|
|
769
|
+
i = await fetch(n, {
|
|
770
|
+
headers: ge(t),
|
|
771
|
+
signal: o == null ? void 0 : o.signal
|
|
772
|
+
});
|
|
773
|
+
} catch (u) {
|
|
774
|
+
throw X("fetchReviewers (red/CORS)", n, { networkError: u }), u;
|
|
775
|
+
}
|
|
776
|
+
if (!i.ok) {
|
|
777
|
+
const u = await i.text();
|
|
778
|
+
throw X("fetchReviewers", n, { status: i.status, statusText: i.statusText, body: u }), new Error("Failed to fetch reviewers");
|
|
779
|
+
}
|
|
738
780
|
return (await i.json()).data ?? [];
|
|
739
781
|
}
|
|
740
|
-
async function
|
|
741
|
-
const
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
782
|
+
async function ro(r, t, o) {
|
|
783
|
+
const n = `${r}/comments`;
|
|
784
|
+
let i;
|
|
785
|
+
try {
|
|
786
|
+
i = await fetch(n, {
|
|
787
|
+
method: "POST",
|
|
788
|
+
headers: ge(t),
|
|
789
|
+
body: JSON.stringify(o)
|
|
790
|
+
});
|
|
791
|
+
} catch (u) {
|
|
792
|
+
throw X("createComment (red/CORS)", n, { networkError: u }), u;
|
|
793
|
+
}
|
|
746
794
|
if (!i.ok) {
|
|
747
|
-
const
|
|
748
|
-
|
|
795
|
+
const u = await i.text();
|
|
796
|
+
let v = "Failed to create comment";
|
|
797
|
+
try {
|
|
798
|
+
v = JSON.parse(u).message ?? v;
|
|
799
|
+
} catch {
|
|
800
|
+
}
|
|
801
|
+
throw X("createComment", n, { status: i.status, statusText: i.statusText, body: u }), new Error(v);
|
|
749
802
|
}
|
|
750
803
|
return (await i.json()).data;
|
|
751
804
|
}
|
|
752
|
-
async function
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
805
|
+
async function oo(r, t, o, n) {
|
|
806
|
+
const i = new URLSearchParams({ url: o }), s = `${r}/comments?${i}`;
|
|
807
|
+
let u;
|
|
808
|
+
try {
|
|
809
|
+
u = await fetch(s, {
|
|
810
|
+
headers: ge(t),
|
|
811
|
+
signal: n == null ? void 0 : n.signal
|
|
812
|
+
});
|
|
813
|
+
} catch (f) {
|
|
814
|
+
throw X("fetchComments (red/CORS)", s, { networkError: f }), f;
|
|
815
|
+
}
|
|
816
|
+
if (!u.ok) {
|
|
817
|
+
const f = await u.text();
|
|
818
|
+
throw X("fetchComments", s, { status: u.status, statusText: u.statusText, body: f }), new Error("Failed to fetch comments");
|
|
819
|
+
}
|
|
820
|
+
return (await u.json()).data ?? [];
|
|
759
821
|
}
|
|
760
|
-
async function
|
|
761
|
-
const
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
822
|
+
async function to(r, t, o, n) {
|
|
823
|
+
const i = `${r}/comments/${o}/status`;
|
|
824
|
+
let s;
|
|
825
|
+
try {
|
|
826
|
+
s = await fetch(i, {
|
|
827
|
+
method: "PATCH",
|
|
828
|
+
headers: ge(t),
|
|
829
|
+
body: JSON.stringify({ status: n })
|
|
830
|
+
});
|
|
831
|
+
} catch (v) {
|
|
832
|
+
throw X("updateCommentStatus (red/CORS)", i, { networkError: v }), v;
|
|
769
833
|
}
|
|
770
|
-
|
|
834
|
+
if (!s.ok) {
|
|
835
|
+
const v = await s.text();
|
|
836
|
+
X("updateCommentStatus", i, { status: s.status, statusText: s.statusText, body: v });
|
|
837
|
+
let f = "Failed to update comment status";
|
|
838
|
+
try {
|
|
839
|
+
f = JSON.parse(v).message ?? f;
|
|
840
|
+
} catch {
|
|
841
|
+
}
|
|
842
|
+
throw new Error(f);
|
|
843
|
+
}
|
|
844
|
+
return (await s.json()).data;
|
|
771
845
|
}
|
|
772
|
-
async function
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
846
|
+
async function no(r, t, o) {
|
|
847
|
+
const n = `${r}/comments/${o}`;
|
|
848
|
+
let i;
|
|
849
|
+
try {
|
|
850
|
+
i = await fetch(n, {
|
|
851
|
+
method: "DELETE",
|
|
852
|
+
headers: ge(t)
|
|
853
|
+
});
|
|
854
|
+
} catch (s) {
|
|
855
|
+
throw X("deleteComment (red/CORS)", n, { networkError: s }), s;
|
|
856
|
+
}
|
|
777
857
|
if (!i.ok) {
|
|
778
|
-
const
|
|
779
|
-
|
|
858
|
+
const s = await i.text();
|
|
859
|
+
X("deleteComment", n, { status: i.status, statusText: i.statusText, body: s });
|
|
860
|
+
let u = "Failed to delete comment";
|
|
861
|
+
try {
|
|
862
|
+
u = JSON.parse(s).message ?? u;
|
|
863
|
+
} catch {
|
|
864
|
+
}
|
|
865
|
+
throw new Error(u);
|
|
780
866
|
}
|
|
781
867
|
}
|
|
782
|
-
const
|
|
868
|
+
const io = {
|
|
783
869
|
position: "fixed",
|
|
784
870
|
inset: 0,
|
|
785
871
|
zIndex: 999997,
|
|
786
872
|
backgroundColor: "transparent"
|
|
787
|
-
},
|
|
873
|
+
}, ao = {
|
|
788
874
|
position: "fixed",
|
|
789
875
|
minWidth: 320,
|
|
790
876
|
maxWidth: 400,
|
|
@@ -794,7 +880,7 @@ const ro = {
|
|
|
794
880
|
borderRadius: "var(--ui-radius_8, 8px)",
|
|
795
881
|
boxShadow: "0 8px 24px var(--ui-color-black-alpha-20, rgba(0,0,0,0.15))",
|
|
796
882
|
zIndex: 999998
|
|
797
|
-
},
|
|
883
|
+
}, so = {
|
|
798
884
|
width: "100%",
|
|
799
885
|
minHeight: 80,
|
|
800
886
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
|
|
@@ -805,14 +891,14 @@ const ro = {
|
|
|
805
891
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
806
892
|
resize: "vertical",
|
|
807
893
|
boxSizing: "border-box"
|
|
808
|
-
},
|
|
894
|
+
}, lo = {
|
|
809
895
|
width: "100%",
|
|
810
896
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
|
|
811
897
|
marginBottom: "var(--ui-positive-Value_300, 12px)",
|
|
812
898
|
border: "1px solid var(--ui-color-border-default, #d9d9d9)",
|
|
813
899
|
borderRadius: "var(--ui-radius_6, 6px)",
|
|
814
900
|
fontSize: "var(--ui-font-size-sm, 14px)"
|
|
815
|
-
},
|
|
901
|
+
}, sr = {
|
|
816
902
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_400, 16px)",
|
|
817
903
|
backgroundColor: "var(--ui-color-bg-fill-danger-default, #ff4d4f)",
|
|
818
904
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
@@ -822,132 +908,151 @@ const ro = {
|
|
|
822
908
|
cursor: "pointer",
|
|
823
909
|
fontWeight: "var(--ui-font-weight-medium, 500)"
|
|
824
910
|
};
|
|
825
|
-
function
|
|
911
|
+
function uo({
|
|
826
912
|
apiUrl: r,
|
|
827
913
|
apiKey: t,
|
|
828
914
|
reviewers: o,
|
|
829
|
-
position:
|
|
830
|
-
payload:
|
|
915
|
+
position: n,
|
|
916
|
+
payload: i,
|
|
831
917
|
onClose: s,
|
|
832
|
-
onSuccess:
|
|
918
|
+
onSuccess: u
|
|
833
919
|
}) {
|
|
834
|
-
var
|
|
835
|
-
const [
|
|
836
|
-
((
|
|
837
|
-
), [
|
|
838
|
-
|
|
839
|
-
o.length > 0 && !
|
|
840
|
-
}, [o,
|
|
841
|
-
const
|
|
920
|
+
var g;
|
|
921
|
+
const [v, f] = N(""), [m, h] = N(
|
|
922
|
+
((g = o[0]) == null ? void 0 : g.id) ?? 0
|
|
923
|
+
), [w, j] = N(!1), [k, D] = N(null);
|
|
924
|
+
O(() => {
|
|
925
|
+
o.length > 0 && !m && h(o[0].id);
|
|
926
|
+
}, [o, m]);
|
|
927
|
+
const M = I(
|
|
842
928
|
async (c) => {
|
|
843
|
-
if (c.preventDefault(), !(!
|
|
844
|
-
|
|
929
|
+
if (c.preventDefault(), !(!v.trim() || !m)) {
|
|
930
|
+
j(!0), D(null);
|
|
845
931
|
try {
|
|
846
|
-
await
|
|
847
|
-
...
|
|
848
|
-
message:
|
|
849
|
-
reviewerId:
|
|
850
|
-
}),
|
|
851
|
-
} catch (
|
|
852
|
-
|
|
932
|
+
await ro(r, t, {
|
|
933
|
+
...i,
|
|
934
|
+
message: v.trim(),
|
|
935
|
+
reviewerId: m
|
|
936
|
+
}), u(), s();
|
|
937
|
+
} catch (x) {
|
|
938
|
+
D(x instanceof Error ? x.message : "Failed to send comment");
|
|
853
939
|
} finally {
|
|
854
|
-
|
|
940
|
+
j(!1);
|
|
855
941
|
}
|
|
856
942
|
}
|
|
857
943
|
},
|
|
858
|
-
[r, t,
|
|
859
|
-
);
|
|
860
|
-
return
|
|
861
|
-
const c = (
|
|
862
|
-
|
|
944
|
+
[r, t, i, v, m, u, s]
|
|
945
|
+
), z = pe(null);
|
|
946
|
+
return O(() => {
|
|
947
|
+
const c = (x) => {
|
|
948
|
+
x.key === "Escape" && (x.preventDefault(), s());
|
|
863
949
|
};
|
|
864
950
|
return document.addEventListener("keydown", c, !0), () => document.removeEventListener("keydown", c, !0);
|
|
865
|
-
}, [s]),
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
)
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
951
|
+
}, [s]), O(() => {
|
|
952
|
+
const c = (x) => {
|
|
953
|
+
const A = x.target;
|
|
954
|
+
z.current && !z.current.contains(A) && (x.preventDefault(), x.stopPropagation(), s());
|
|
955
|
+
};
|
|
956
|
+
return document.addEventListener("mousedown", c, !0), () => document.removeEventListener("mousedown", c, !0);
|
|
957
|
+
}, [s]), O(() => {
|
|
958
|
+
var c;
|
|
959
|
+
(c = z.current) == null || c.focus();
|
|
960
|
+
}, []), /* @__PURE__ */ d.jsxs(
|
|
961
|
+
"div",
|
|
962
|
+
{
|
|
963
|
+
ref: z,
|
|
964
|
+
role: "dialog",
|
|
965
|
+
"aria-modal": "true",
|
|
966
|
+
tabIndex: -1,
|
|
967
|
+
style: { position: "fixed", inset: 0, zIndex: 999997, outline: "none" },
|
|
968
|
+
children: [
|
|
969
|
+
/* @__PURE__ */ d.jsx(
|
|
970
|
+
"div",
|
|
971
|
+
{
|
|
972
|
+
role: "presentation",
|
|
973
|
+
style: io,
|
|
974
|
+
onClick: s
|
|
975
|
+
}
|
|
976
|
+
),
|
|
977
|
+
/* @__PURE__ */ d.jsx(
|
|
978
|
+
"div",
|
|
979
|
+
{
|
|
980
|
+
style: {
|
|
981
|
+
...ao,
|
|
982
|
+
left: Math.min(n.x, typeof window < "u" ? window.innerWidth - 420 : n.x),
|
|
983
|
+
top: n.y + 12
|
|
984
|
+
},
|
|
985
|
+
onClick: (c) => c.stopPropagation(),
|
|
986
|
+
children: /* @__PURE__ */ d.jsxs("form", { onSubmit: M, children: [
|
|
987
|
+
/* @__PURE__ */ d.jsx(
|
|
988
|
+
"textarea",
|
|
989
|
+
{
|
|
990
|
+
placeholder: "Escribe tu comentario...",
|
|
991
|
+
value: v,
|
|
992
|
+
onChange: (c) => f(c.target.value),
|
|
993
|
+
style: so,
|
|
994
|
+
required: !0,
|
|
995
|
+
autoFocus: !0
|
|
996
|
+
}
|
|
997
|
+
),
|
|
998
|
+
/* @__PURE__ */ d.jsxs(
|
|
999
|
+
"select",
|
|
1000
|
+
{
|
|
1001
|
+
value: m,
|
|
1002
|
+
onChange: (c) => h(Number(c.target.value)),
|
|
1003
|
+
style: lo,
|
|
1004
|
+
required: !0,
|
|
1005
|
+
disabled: o.length === 0,
|
|
1006
|
+
children: [
|
|
1007
|
+
/* @__PURE__ */ d.jsx("option", { value: "", children: o.length === 0 ? "No hay revisores (ejecuta php artisan db:seed en la API)" : "Selecciona revisor" }),
|
|
1008
|
+
o.map((c) => /* @__PURE__ */ d.jsx("option", { value: c.id, children: c.name }, c.id))
|
|
1009
|
+
]
|
|
1010
|
+
}
|
|
1011
|
+
),
|
|
1012
|
+
k && /* @__PURE__ */ d.jsx(
|
|
1013
|
+
"div",
|
|
1014
|
+
{
|
|
1015
|
+
style: {
|
|
1016
|
+
color: "var(--ui-color-text-danger-default, #ff4d4f)",
|
|
1017
|
+
fontSize: "var(--ui-font-size-xs, 12px)",
|
|
1018
|
+
marginBottom: "var(--ui-positive-Value_200, 8px)"
|
|
1019
|
+
},
|
|
1020
|
+
children: k
|
|
1021
|
+
}
|
|
1022
|
+
),
|
|
1023
|
+
/* @__PURE__ */ d.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: "var(--ui-positive-Value_200, 8px)" }, children: [
|
|
1024
|
+
/* @__PURE__ */ d.jsx(
|
|
1025
|
+
"button",
|
|
1026
|
+
{
|
|
1027
|
+
type: "button",
|
|
1028
|
+
onClick: s,
|
|
1029
|
+
style: {
|
|
1030
|
+
...sr,
|
|
1031
|
+
backgroundColor: "var(--ui-color-bg-fill-secondary-default, #f0f0f0)",
|
|
1032
|
+
color: "var(--ui-color-text-primary, #333)"
|
|
1033
|
+
},
|
|
1034
|
+
children: "Cancelar"
|
|
1035
|
+
}
|
|
1036
|
+
),
|
|
1037
|
+
/* @__PURE__ */ d.jsx(
|
|
1038
|
+
"button",
|
|
1039
|
+
{
|
|
1040
|
+
type: "submit",
|
|
1041
|
+
style: sr,
|
|
1042
|
+
disabled: w || o.length === 0,
|
|
1043
|
+
children: w ? "Enviando..." : "Enviar comentario"
|
|
1044
|
+
}
|
|
1045
|
+
)
|
|
1046
|
+
] })
|
|
1047
|
+
] })
|
|
1048
|
+
}
|
|
1049
|
+
)
|
|
1050
|
+
]
|
|
1051
|
+
}
|
|
1052
|
+
);
|
|
948
1053
|
}
|
|
949
|
-
const
|
|
950
|
-
function
|
|
1054
|
+
const co = Ce(uo), fo = "var(--ui-color-red-500, #ef4444)";
|
|
1055
|
+
function vo(r) {
|
|
951
1056
|
return {
|
|
952
1057
|
position: "fixed",
|
|
953
1058
|
outline: `2px solid ${r}`,
|
|
@@ -957,41 +1062,41 @@ function lo(r) {
|
|
|
957
1062
|
boxSizing: "border-box"
|
|
958
1063
|
};
|
|
959
1064
|
}
|
|
960
|
-
const
|
|
1065
|
+
const po = Ce(function({
|
|
961
1066
|
selector: t,
|
|
962
1067
|
active: o,
|
|
963
|
-
fallbackComment:
|
|
964
|
-
outlineColor:
|
|
1068
|
+
fallbackComment: n,
|
|
1069
|
+
outlineColor: i = fo
|
|
965
1070
|
}) {
|
|
966
|
-
const [s,
|
|
1071
|
+
const [s, u] = N(null), v = I(() => {
|
|
967
1072
|
if (!o) {
|
|
968
|
-
|
|
1073
|
+
u(null);
|
|
969
1074
|
return;
|
|
970
1075
|
}
|
|
971
|
-
const
|
|
972
|
-
if (
|
|
973
|
-
|
|
1076
|
+
const f = t != null && t.trim() ? pr(t) : null;
|
|
1077
|
+
if (f) {
|
|
1078
|
+
u(f);
|
|
974
1079
|
return;
|
|
975
1080
|
}
|
|
976
|
-
if (
|
|
977
|
-
|
|
1081
|
+
if (n) {
|
|
1082
|
+
u(Kr(n));
|
|
978
1083
|
return;
|
|
979
1084
|
}
|
|
980
|
-
|
|
981
|
-
}, [t, o,
|
|
982
|
-
return
|
|
983
|
-
|
|
984
|
-
}, [
|
|
1085
|
+
u(null);
|
|
1086
|
+
}, [t, o, n]);
|
|
1087
|
+
return O(() => {
|
|
1088
|
+
v();
|
|
1089
|
+
}, [v]), O(() => {
|
|
985
1090
|
if (o)
|
|
986
|
-
return window.addEventListener("scroll",
|
|
987
|
-
window.removeEventListener("scroll",
|
|
1091
|
+
return window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
|
|
1092
|
+
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
|
|
988
1093
|
};
|
|
989
|
-
}, [o,
|
|
1094
|
+
}, [o, v]), !o || s == null ? null : /* @__PURE__ */ d.jsx(
|
|
990
1095
|
"div",
|
|
991
1096
|
{
|
|
992
1097
|
"aria-hidden": !0,
|
|
993
1098
|
style: {
|
|
994
|
-
...
|
|
1099
|
+
...vo(i),
|
|
995
1100
|
left: s.left,
|
|
996
1101
|
top: s.top,
|
|
997
1102
|
width: s.width,
|
|
@@ -999,40 +1104,40 @@ const so = Re(function({
|
|
|
999
1104
|
}
|
|
1000
1105
|
}
|
|
1001
1106
|
);
|
|
1002
|
-
}),
|
|
1107
|
+
}), Re = 32, lr = 150, ze = 250, Y = {
|
|
1003
1108
|
cardBg: "var(--ui-color-bg-surface-default, #ffffff)",
|
|
1004
1109
|
cardFooterBg: "var(--ui-color-bg-surface-secondary-default, #f8fafc)",
|
|
1005
1110
|
textDark: "var(--ui-color-text-primary, #333333)",
|
|
1006
1111
|
textMuted: "var(--ui-color-text-secondary, #888888)",
|
|
1007
1112
|
border: "var(--ui-color-border-default, #cccccc)",
|
|
1008
1113
|
shadow: "var(--ui-shadow-card, 0 4px 16px rgba(0, 0, 0, 0.12))"
|
|
1009
|
-
},
|
|
1010
|
-
[
|
|
1011
|
-
[
|
|
1012
|
-
[
|
|
1013
|
-
},
|
|
1014
|
-
[
|
|
1015
|
-
[
|
|
1016
|
-
[
|
|
1017
|
-
},
|
|
1018
|
-
[
|
|
1019
|
-
[
|
|
1020
|
-
[
|
|
1021
|
-
},
|
|
1022
|
-
[
|
|
1023
|
-
[
|
|
1024
|
-
[
|
|
1025
|
-
},
|
|
1026
|
-
[
|
|
1027
|
-
[
|
|
1028
|
-
[
|
|
1114
|
+
}, go = {
|
|
1115
|
+
[T.PENDING]: "Pendiente",
|
|
1116
|
+
[T.DEV_FIXED]: "Corregido",
|
|
1117
|
+
[T.VALIDATED]: "Validado"
|
|
1118
|
+
}, ho = {
|
|
1119
|
+
[T.PENDING]: "PENDIENTE",
|
|
1120
|
+
[T.DEV_FIXED]: "CORREGIDO",
|
|
1121
|
+
[T.VALIDATED]: "VALIDADO"
|
|
1122
|
+
}, ie = {
|
|
1123
|
+
[T.PENDING]: "var(--ui-color-red-500, rgb(240, 69, 69))",
|
|
1124
|
+
[T.DEV_FIXED]: "var(--ui-color-yellow-500, rgb(235, 179, 8))",
|
|
1125
|
+
[T.VALIDATED]: "var(--ui-color-green-500, rgb(33, 196, 94))"
|
|
1126
|
+
}, ur = {
|
|
1127
|
+
[T.PENDING]: "var(--ui-color-bg-surface-danger-default, #fef2f2)",
|
|
1128
|
+
[T.DEV_FIXED]: "var(--ui-color-bg-surface-warning-default, #fffbeb)",
|
|
1129
|
+
[T.VALIDATED]: "var(--ui-color-bg-surface-success-default, #f0fdf4)"
|
|
1130
|
+
}, Se = {
|
|
1131
|
+
[T.PENDING]: "var(--ui-color-red-500, #ef4444)",
|
|
1132
|
+
[T.DEV_FIXED]: "var(--ui-color-orange-500, #f59e0b)",
|
|
1133
|
+
[T.VALIDATED]: "var(--ui-color-green-500, #22c55e)"
|
|
1029
1134
|
};
|
|
1030
|
-
function
|
|
1135
|
+
function bo(r) {
|
|
1031
1136
|
const t = r.trim().split(/\s+/);
|
|
1032
1137
|
return t.length >= 2 ? (t[0][0] + t[t.length - 1][0]).toUpperCase() : r.slice(0, 2).toUpperCase() || "?";
|
|
1033
1138
|
}
|
|
1034
|
-
const
|
|
1035
|
-
/* @__PURE__ */
|
|
1139
|
+
const xo = () => /* @__PURE__ */ d.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: { marginRight: 4, flexShrink: 0 }, children: /* @__PURE__ */ d.jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), yo = ({ color: r }) => /* @__PURE__ */ d.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", style: { flexShrink: 0 }, children: [
|
|
1140
|
+
/* @__PURE__ */ d.jsx(
|
|
1036
1141
|
"path",
|
|
1037
1142
|
{
|
|
1038
1143
|
d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z",
|
|
@@ -1043,7 +1148,7 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1043
1148
|
fill: "none"
|
|
1044
1149
|
}
|
|
1045
1150
|
),
|
|
1046
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ d.jsx(
|
|
1047
1152
|
"path",
|
|
1048
1153
|
{
|
|
1049
1154
|
d: "M8 10h.01M12 10h.01M16 10h.01",
|
|
@@ -1052,12 +1157,12 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1052
1157
|
strokeLinecap: "round"
|
|
1053
1158
|
}
|
|
1054
1159
|
)
|
|
1055
|
-
] }),
|
|
1160
|
+
] }), mo = (r) => ({
|
|
1056
1161
|
position: "fixed",
|
|
1057
|
-
width:
|
|
1058
|
-
height:
|
|
1162
|
+
width: Re,
|
|
1163
|
+
height: Re,
|
|
1059
1164
|
borderRadius: "50%",
|
|
1060
|
-
backgroundColor:
|
|
1165
|
+
backgroundColor: ie[r] ?? ie[T.PENDING],
|
|
1061
1166
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
1062
1167
|
display: "flex",
|
|
1063
1168
|
alignItems: "center",
|
|
@@ -1067,31 +1172,31 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1067
1172
|
boxShadow: "0 2px 8px var(--ui-color-black-alpha-20, rgba(0,0,0,0.2))",
|
|
1068
1173
|
zIndex: 999998,
|
|
1069
1174
|
border: "2px solid var(--ui-color-white, #fff)"
|
|
1070
|
-
}),
|
|
1175
|
+
}), wo = {
|
|
1071
1176
|
position: "fixed",
|
|
1072
|
-
width:
|
|
1073
|
-
minWidth:
|
|
1074
|
-
maxWidth:
|
|
1177
|
+
width: ze,
|
|
1178
|
+
minWidth: ze,
|
|
1179
|
+
maxWidth: ze,
|
|
1075
1180
|
boxSizing: "border-box",
|
|
1076
|
-
backgroundColor:
|
|
1181
|
+
backgroundColor: Y.cardBg,
|
|
1077
1182
|
borderRadius: "var(--ui-radius_12, 12px)",
|
|
1078
|
-
boxShadow:
|
|
1183
|
+
boxShadow: Y.shadow,
|
|
1079
1184
|
fontSize: "var(--ui-font-size-sm, 14px)",
|
|
1080
1185
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1081
1186
|
zIndex: 999999,
|
|
1082
1187
|
pointerEvents: "auto"
|
|
1083
|
-
},
|
|
1188
|
+
}, _o = {
|
|
1084
1189
|
display: "flex",
|
|
1085
1190
|
alignItems: "center",
|
|
1086
1191
|
justifyContent: "space-between",
|
|
1087
1192
|
gap: "var(--ui-positive-Value_250, 10px)",
|
|
1088
|
-
borderBottom: `1px solid ${
|
|
1193
|
+
borderBottom: `1px solid ${Y.border}`,
|
|
1089
1194
|
padding: "var(--ui-positive-Value_300, 12px)"
|
|
1090
|
-
},
|
|
1195
|
+
}, Eo = (r) => ({
|
|
1091
1196
|
width: 40,
|
|
1092
1197
|
height: 40,
|
|
1093
1198
|
borderRadius: "50%",
|
|
1094
|
-
backgroundColor:
|
|
1199
|
+
backgroundColor: ie[r] ?? ie[T.PENDING],
|
|
1095
1200
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
1096
1201
|
border: "2px solid var(--ui-color-white, #fff)",
|
|
1097
1202
|
display: "flex",
|
|
@@ -1101,18 +1206,18 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1101
1206
|
fontWeight: "var(--ui-font-weight-bold, 700)",
|
|
1102
1207
|
flexShrink: 0,
|
|
1103
1208
|
overflow: "hidden"
|
|
1104
|
-
}),
|
|
1209
|
+
}), Ro = Ce(function({
|
|
1105
1210
|
reviewer: t,
|
|
1106
1211
|
status: o
|
|
1107
1212
|
}) {
|
|
1108
|
-
const
|
|
1109
|
-
if (
|
|
1110
|
-
const
|
|
1111
|
-
return /* @__PURE__ */
|
|
1213
|
+
const n = t == null ? void 0 : t.image_url, i = (t == null ? void 0 : t.name) ?? "Revisor", s = Eo(o);
|
|
1214
|
+
if (n && n.trim()) {
|
|
1215
|
+
const u = ie[o] ?? ie[T.PENDING];
|
|
1216
|
+
return /* @__PURE__ */ d.jsx("div", { style: { ...s, border: `2px solid ${u}` }, children: /* @__PURE__ */ d.jsx(
|
|
1112
1217
|
"img",
|
|
1113
1218
|
{
|
|
1114
|
-
src:
|
|
1115
|
-
alt:
|
|
1219
|
+
src: n,
|
|
1220
|
+
alt: i,
|
|
1116
1221
|
style: {
|
|
1117
1222
|
width: "100%",
|
|
1118
1223
|
height: "100%",
|
|
@@ -1122,8 +1227,8 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1122
1227
|
}
|
|
1123
1228
|
) });
|
|
1124
1229
|
}
|
|
1125
|
-
return /* @__PURE__ */
|
|
1126
|
-
}),
|
|
1230
|
+
return /* @__PURE__ */ d.jsx("div", { style: s, children: bo(i) });
|
|
1231
|
+
}), So = {
|
|
1127
1232
|
flexShrink: 0,
|
|
1128
1233
|
width: "var(--ui-positive-Value_600, 24px)",
|
|
1129
1234
|
height: "var(--ui-positive-Value_600, 24px)",
|
|
@@ -1131,15 +1236,15 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1131
1236
|
border: "none",
|
|
1132
1237
|
borderRadius: "var(--ui-radius_6, 6px)",
|
|
1133
1238
|
backgroundColor: "transparent",
|
|
1134
|
-
color:
|
|
1239
|
+
color: Y.textDark,
|
|
1135
1240
|
cursor: "pointer",
|
|
1136
1241
|
fontSize: "var(--ui-positive-Value_450, 18px)",
|
|
1137
1242
|
lineHeight: 1,
|
|
1138
1243
|
display: "flex",
|
|
1139
1244
|
alignItems: "center",
|
|
1140
1245
|
justifyContent: "center"
|
|
1141
|
-
},
|
|
1142
|
-
const t =
|
|
1246
|
+
}, Co = (r) => {
|
|
1247
|
+
const t = Se[r] ?? Se[T.PENDING];
|
|
1143
1248
|
return {
|
|
1144
1249
|
display: "inline-flex",
|
|
1145
1250
|
alignItems: "center",
|
|
@@ -1150,42 +1255,42 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1150
1255
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1151
1256
|
textTransform: "uppercase",
|
|
1152
1257
|
letterSpacing: "0.02em",
|
|
1153
|
-
backgroundColor:
|
|
1258
|
+
backgroundColor: ur[r] ?? ur[T.PENDING],
|
|
1154
1259
|
color: t,
|
|
1155
1260
|
border: `1px solid ${t}`
|
|
1156
1261
|
};
|
|
1157
|
-
},
|
|
1262
|
+
}, ko = {
|
|
1158
1263
|
display: "block",
|
|
1159
1264
|
fontSize: "var(--ui-font-size-2xs, 10px)",
|
|
1160
1265
|
fontWeight: "var(--ui-font-weight-semibold, 600)",
|
|
1161
1266
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1162
|
-
color:
|
|
1267
|
+
color: Y.textMuted,
|
|
1163
1268
|
textTransform: "uppercase",
|
|
1164
1269
|
letterSpacing: "0.04em"
|
|
1165
|
-
},
|
|
1270
|
+
}, Po = {
|
|
1166
1271
|
width: "100%",
|
|
1167
1272
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
|
|
1168
1273
|
paddingRight: "var(--ui-positive-Value_800, 32px)",
|
|
1169
1274
|
fontSize: "var(--ui-font-size-xs, 13px)",
|
|
1170
1275
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1171
1276
|
borderRadius: "var(--ui-radius_8, 8px)",
|
|
1172
|
-
border: `1px solid ${
|
|
1173
|
-
backgroundColor:
|
|
1174
|
-
color:
|
|
1277
|
+
border: `1px solid ${Y.border}`,
|
|
1278
|
+
backgroundColor: Y.cardBg,
|
|
1279
|
+
color: Y.textDark,
|
|
1175
1280
|
cursor: "pointer",
|
|
1176
1281
|
appearance: "none",
|
|
1177
1282
|
backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L2 4h8z'/%3E%3C/svg%3E")`,
|
|
1178
1283
|
backgroundRepeat: "no-repeat",
|
|
1179
1284
|
backgroundPosition: "right var(--ui-positive-Value_250, 10px) center"
|
|
1180
|
-
},
|
|
1285
|
+
}, To = {
|
|
1181
1286
|
display: "flex",
|
|
1182
1287
|
alignItems: "center",
|
|
1183
1288
|
justifyContent: "flex-end",
|
|
1184
1289
|
gap: "var(--ui-positive-Value_200, 8px)",
|
|
1185
1290
|
padding: "var(--ui-positive-Value_300, 12px)",
|
|
1186
|
-
borderTop: `1px solid ${
|
|
1187
|
-
backgroundColor:
|
|
1188
|
-
},
|
|
1291
|
+
borderTop: `1px solid ${Y.border}`,
|
|
1292
|
+
backgroundColor: Y.cardFooterBg
|
|
1293
|
+
}, hr = {
|
|
1189
1294
|
minWidth: 100,
|
|
1190
1295
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_350, 14px)",
|
|
1191
1296
|
fontSize: "var(--ui-font-size-xs, 13px)",
|
|
@@ -1194,223 +1299,229 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1194
1299
|
borderRadius: "var(--ui-radius_8, 8px)",
|
|
1195
1300
|
cursor: "pointer",
|
|
1196
1301
|
border: "none"
|
|
1197
|
-
},
|
|
1198
|
-
...
|
|
1302
|
+
}, jo = {
|
|
1303
|
+
...hr,
|
|
1199
1304
|
backgroundColor: "transparent",
|
|
1200
|
-
color:
|
|
1201
|
-
},
|
|
1305
|
+
color: Y.textDark
|
|
1306
|
+
}, _e = "review-layer-resolve-btn", Vo = [
|
|
1202
1307
|
"pending",
|
|
1203
1308
|
"dev_fixed",
|
|
1204
1309
|
"validated"
|
|
1205
|
-
],
|
|
1206
|
-
...
|
|
1310
|
+
], Io = {
|
|
1311
|
+
...hr,
|
|
1207
1312
|
backgroundColor: "var(--ui-color-bg-fill-success-default, #22c55e)",
|
|
1208
1313
|
color: "var(--ui-color-text-on-color, #fff)"
|
|
1209
1314
|
};
|
|
1210
|
-
function
|
|
1315
|
+
function Oo({
|
|
1211
1316
|
comment: r,
|
|
1212
1317
|
offset: t = { dx: 0, dy: 0 },
|
|
1213
1318
|
apiUrl: o,
|
|
1214
|
-
apiKey:
|
|
1215
|
-
onStatusChange:
|
|
1319
|
+
apiKey: n,
|
|
1320
|
+
onStatusChange: i,
|
|
1216
1321
|
reviewMode: s = !1
|
|
1217
1322
|
}) {
|
|
1218
|
-
var
|
|
1219
|
-
const [
|
|
1220
|
-
|
|
1323
|
+
var ue, ce;
|
|
1324
|
+
const [u, v] = N(!1), [f, m] = N(!1), [h, w] = N(() => Ee(r)), [j, k] = N(!1), [D, M] = N(null), z = pe(null), g = pe(null), c = pe(null), x = I(() => {
|
|
1325
|
+
w(Ee(r));
|
|
1221
1326
|
}, [r]);
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
}, [
|
|
1327
|
+
O(() => {
|
|
1328
|
+
x();
|
|
1329
|
+
}, [x]), O(() => {
|
|
1225
1330
|
if (!(typeof window > "u"))
|
|
1226
|
-
return window.addEventListener("scroll",
|
|
1227
|
-
window.removeEventListener("scroll",
|
|
1331
|
+
return window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
|
|
1332
|
+
window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
|
|
1228
1333
|
};
|
|
1229
|
-
}, [
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
}, [
|
|
1239
|
-
|
|
1240
|
-
}, [
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
},
|
|
1244
|
-
}, [
|
|
1334
|
+
}, [x]), O(() => {
|
|
1335
|
+
if (!r.selector || typeof document > "u") return;
|
|
1336
|
+
const _ = document.querySelector(r.selector);
|
|
1337
|
+
if (!_) return;
|
|
1338
|
+
const Q = vr(_).map((q) => (q.addEventListener("scroll", x, !0), () => q.removeEventListener("scroll", x, !0)));
|
|
1339
|
+
return () => Q.forEach((q) => q());
|
|
1340
|
+
}, [r.selector, x]);
|
|
1341
|
+
const A = I(() => {
|
|
1342
|
+
z.current !== null && (clearTimeout(z.current), z.current = null);
|
|
1343
|
+
}, []), $ = I(() => {
|
|
1344
|
+
s || (A(), v(!0));
|
|
1345
|
+
}, [s, A]), ae = I(() => {
|
|
1346
|
+
f || (z.current = setTimeout(() => {
|
|
1347
|
+
z.current = null, v(!1);
|
|
1348
|
+
}, lr));
|
|
1349
|
+
}, [f]), se = I(() => {
|
|
1350
|
+
A(), v(!0);
|
|
1351
|
+
}, [A]), le = I(() => {
|
|
1352
|
+
f || (z.current = setTimeout(() => {
|
|
1353
|
+
z.current = null, v(!1);
|
|
1354
|
+
}, lr));
|
|
1355
|
+
}, [f]), ee = I(() => {
|
|
1245
1356
|
if (s) {
|
|
1246
|
-
|
|
1357
|
+
f && (m(!1), v(!1));
|
|
1247
1358
|
return;
|
|
1248
1359
|
}
|
|
1249
|
-
|
|
1250
|
-
}, [s,
|
|
1251
|
-
|
|
1252
|
-
if (!
|
|
1253
|
-
const _ = (
|
|
1254
|
-
var
|
|
1255
|
-
const
|
|
1256
|
-
(
|
|
1360
|
+
f ? (m(!1), v(!1)) : (m(!0), v(!0));
|
|
1361
|
+
}, [s, f]);
|
|
1362
|
+
O(() => {
|
|
1363
|
+
if (!f) return;
|
|
1364
|
+
const _ = (J) => {
|
|
1365
|
+
var q, be;
|
|
1366
|
+
const Q = J.target;
|
|
1367
|
+
(q = g.current) != null && q.contains(Q) || (be = c.current) != null && be.contains(Q) || (m(!1), v(!1));
|
|
1257
1368
|
};
|
|
1258
1369
|
return document.addEventListener("mousedown", _, !0), () => document.removeEventListener("mousedown", _, !0);
|
|
1259
|
-
}, [
|
|
1260
|
-
s && (
|
|
1370
|
+
}, [f]), O(() => () => A(), [A]), O(() => {
|
|
1371
|
+
s && (m(!1), v(!1));
|
|
1261
1372
|
}, [s]);
|
|
1262
|
-
const
|
|
1263
|
-
|
|
1264
|
-
}, []),
|
|
1373
|
+
const re = h.x + t.dx, y = h.y + t.dy, { x: R, y: P } = $e(re, y, Re / 2), V = u && !f, H = I(() => {
|
|
1374
|
+
m(!1), v(!1);
|
|
1375
|
+
}, []), Z = I(
|
|
1265
1376
|
async (_) => {
|
|
1266
1377
|
if (_ !== r.status) {
|
|
1267
|
-
|
|
1378
|
+
M(null), k(!0);
|
|
1268
1379
|
try {
|
|
1269
|
-
await
|
|
1270
|
-
} catch (
|
|
1271
|
-
|
|
1380
|
+
await to(o, n, r.id, _), i();
|
|
1381
|
+
} catch (J) {
|
|
1382
|
+
M(J instanceof Error ? J.message : "Error al actualizar");
|
|
1272
1383
|
} finally {
|
|
1273
|
-
|
|
1384
|
+
k(!1);
|
|
1274
1385
|
}
|
|
1275
1386
|
}
|
|
1276
1387
|
},
|
|
1277
|
-
[o,
|
|
1278
|
-
),
|
|
1279
|
-
|
|
1388
|
+
[o, n, r.id, r.status, i]
|
|
1389
|
+
), oe = I(async () => {
|
|
1390
|
+
M(null), k(!0);
|
|
1280
1391
|
try {
|
|
1281
|
-
await
|
|
1392
|
+
await no(o, n, r.id), i(), H();
|
|
1282
1393
|
} catch (_) {
|
|
1283
|
-
|
|
1394
|
+
M(_ instanceof Error ? _.message : "Error al eliminar");
|
|
1284
1395
|
} finally {
|
|
1285
|
-
|
|
1396
|
+
k(!1);
|
|
1286
1397
|
}
|
|
1287
|
-
}, [o,
|
|
1288
|
-
() => ({ ...
|
|
1289
|
-
[r.status,
|
|
1398
|
+
}, [o, n, r.id, i, H]), he = We(
|
|
1399
|
+
() => ({ ...mo(r.status), left: R, top: P, transform: "translate(-50%, -50%)" }),
|
|
1400
|
+
[r.status, R, P]
|
|
1290
1401
|
);
|
|
1291
|
-
return /* @__PURE__ */
|
|
1292
|
-
/* @__PURE__ */
|
|
1293
|
-
|
|
1402
|
+
return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1403
|
+
/* @__PURE__ */ d.jsx(
|
|
1404
|
+
po,
|
|
1294
1405
|
{
|
|
1295
1406
|
selector: r.selector,
|
|
1296
|
-
active:
|
|
1407
|
+
active: V,
|
|
1297
1408
|
fallbackComment: r,
|
|
1298
|
-
outlineColor:
|
|
1409
|
+
outlineColor: Se[r.status] ?? Se[T.PENDING]
|
|
1299
1410
|
}
|
|
1300
1411
|
),
|
|
1301
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ d.jsx(
|
|
1302
1413
|
"div",
|
|
1303
1414
|
{
|
|
1304
|
-
ref:
|
|
1415
|
+
ref: g,
|
|
1305
1416
|
role: "button",
|
|
1306
1417
|
tabIndex: 0,
|
|
1307
1418
|
"aria-label": `Comentario: ${r.message.slice(0, 30)}...`,
|
|
1308
|
-
"aria-expanded":
|
|
1309
|
-
style:
|
|
1310
|
-
onMouseEnter:
|
|
1311
|
-
onMouseLeave:
|
|
1312
|
-
onClick:
|
|
1313
|
-
children: /* @__PURE__ */
|
|
1419
|
+
"aria-expanded": u,
|
|
1420
|
+
style: he,
|
|
1421
|
+
onMouseEnter: $,
|
|
1422
|
+
onMouseLeave: ae,
|
|
1423
|
+
onClick: ee,
|
|
1424
|
+
children: /* @__PURE__ */ d.jsx(yo, { color: "var(--ui-color-white, #fff)" })
|
|
1314
1425
|
}
|
|
1315
1426
|
),
|
|
1316
|
-
|
|
1427
|
+
u && /* @__PURE__ */ d.jsxs(
|
|
1317
1428
|
"div",
|
|
1318
1429
|
{
|
|
1319
|
-
ref:
|
|
1430
|
+
ref: c,
|
|
1320
1431
|
role: "dialog",
|
|
1321
1432
|
"aria-label": "Detalle del comentario",
|
|
1322
1433
|
style: {
|
|
1323
|
-
...
|
|
1324
|
-
left:
|
|
1325
|
-
top:
|
|
1434
|
+
...wo,
|
|
1435
|
+
left: R + Re / 2 + 6,
|
|
1436
|
+
top: P
|
|
1326
1437
|
},
|
|
1327
|
-
onMouseEnter:
|
|
1328
|
-
onMouseLeave:
|
|
1438
|
+
onMouseEnter: se,
|
|
1439
|
+
onMouseLeave: le,
|
|
1329
1440
|
children: [
|
|
1330
|
-
/* @__PURE__ */
|
|
1331
|
-
/* @__PURE__ */
|
|
1332
|
-
/* @__PURE__ */
|
|
1333
|
-
/* @__PURE__ */
|
|
1334
|
-
/* @__PURE__ */
|
|
1335
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ d.jsxs("div", { style: _o, children: [
|
|
1442
|
+
/* @__PURE__ */ d.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, flex: 1, minWidth: 0 }, children: [
|
|
1443
|
+
/* @__PURE__ */ d.jsx(Ro, { reviewer: r.reviewer, status: r.status }),
|
|
1444
|
+
/* @__PURE__ */ d.jsxs("div", { children: [
|
|
1445
|
+
/* @__PURE__ */ d.jsx("div", { style: { fontWeight: 700, fontSize: 14, color: Y.textDark }, children: ((ue = r.reviewer) == null ? void 0 : ue.name) ?? "Revisor" }),
|
|
1446
|
+
/* @__PURE__ */ d.jsx("div", { style: { fontSize: 12, color: Y.textMuted }, children: ((ce = r.reviewer) == null ? void 0 : ce.job_title) ?? "Revisor" })
|
|
1336
1447
|
] })
|
|
1337
1448
|
] }),
|
|
1338
|
-
/* @__PURE__ */
|
|
1449
|
+
/* @__PURE__ */ d.jsx(
|
|
1339
1450
|
"button",
|
|
1340
1451
|
{
|
|
1341
1452
|
type: "button",
|
|
1342
|
-
"aria-label": r.status ===
|
|
1343
|
-
style:
|
|
1344
|
-
disabled:
|
|
1453
|
+
"aria-label": r.status === T.VALIDATED ? "Eliminar comentario" : "Cerrar",
|
|
1454
|
+
style: So,
|
|
1455
|
+
disabled: j,
|
|
1345
1456
|
onClick: (_) => {
|
|
1346
|
-
_.stopPropagation(), r.status ===
|
|
1457
|
+
_.stopPropagation(), r.status === T.VALIDATED ? oe() : H();
|
|
1347
1458
|
},
|
|
1348
1459
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1349
1460
|
children: "✕"
|
|
1350
1461
|
}
|
|
1351
1462
|
)
|
|
1352
1463
|
] }),
|
|
1353
|
-
/* @__PURE__ */
|
|
1354
|
-
/* @__PURE__ */
|
|
1355
|
-
r.status ===
|
|
1356
|
-
|
|
1464
|
+
/* @__PURE__ */ d.jsxs("div", { style: { padding: 12, display: "flex", alignItems: "flex-start", flexDirection: "column", gap: 4 }, children: [
|
|
1465
|
+
/* @__PURE__ */ d.jsxs("div", { style: Co(r.status), children: [
|
|
1466
|
+
r.status === T.VALIDATED && /* @__PURE__ */ d.jsx(xo, {}),
|
|
1467
|
+
ho[r.status] ?? r.status
|
|
1357
1468
|
] }),
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */
|
|
1361
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ d.jsx("div", { style: { color: Y.textDark, lineHeight: 1.5, marginBottom: 12, marginTop: 12 }, children: r.message }),
|
|
1470
|
+
/* @__PURE__ */ d.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" }, children: [
|
|
1471
|
+
/* @__PURE__ */ d.jsx("label", { style: ko, htmlFor: `comment-status-${r.id}`, children: "Cambiar estado" }),
|
|
1472
|
+
/* @__PURE__ */ d.jsx(
|
|
1362
1473
|
"select",
|
|
1363
1474
|
{
|
|
1364
1475
|
id: `comment-status-${r.id}`,
|
|
1365
|
-
style:
|
|
1476
|
+
style: Po,
|
|
1366
1477
|
value: r.status,
|
|
1367
|
-
disabled:
|
|
1368
|
-
onChange: (_) =>
|
|
1478
|
+
disabled: j,
|
|
1479
|
+
onChange: (_) => Z(_.target.value),
|
|
1369
1480
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1370
1481
|
"aria-label": "Cambiar estado del comentario",
|
|
1371
|
-
children:
|
|
1482
|
+
children: Vo.map((_) => /* @__PURE__ */ d.jsx("option", { value: _, children: go[_] }, _))
|
|
1372
1483
|
}
|
|
1373
1484
|
),
|
|
1374
|
-
|
|
1485
|
+
D && /* @__PURE__ */ d.jsx("div", { style: { marginTop: 8, fontSize: 11, color: "var(--ui-color-text-danger-default, rgb(240, 69, 69))" }, children: D })
|
|
1375
1486
|
] })
|
|
1376
1487
|
] }),
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ d.jsxs("div", { style: To, children: [
|
|
1489
|
+
/* @__PURE__ */ d.jsx(
|
|
1379
1490
|
"button",
|
|
1380
1491
|
{
|
|
1381
1492
|
type: "button",
|
|
1382
|
-
style:
|
|
1493
|
+
style: jo,
|
|
1383
1494
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1384
1495
|
onClick: (_) => {
|
|
1385
|
-
_.stopPropagation(),
|
|
1496
|
+
_.stopPropagation(), H();
|
|
1386
1497
|
},
|
|
1387
1498
|
children: "Cerrar"
|
|
1388
1499
|
}
|
|
1389
1500
|
),
|
|
1390
|
-
r.status !==
|
|
1391
|
-
/* @__PURE__ */
|
|
1392
|
-
.${
|
|
1501
|
+
r.status !== T.VALIDATED && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1502
|
+
/* @__PURE__ */ d.jsx("style", { children: `
|
|
1503
|
+
.${_e}:hover:not(:disabled) {
|
|
1393
1504
|
background-color: var(--ui-color-bg-fill-success-hover, #16a34a) !important;
|
|
1394
1505
|
}
|
|
1395
|
-
.${
|
|
1506
|
+
.${_e}:active:not(:disabled) {
|
|
1396
1507
|
background-color: var(--ui-color-bg-fill-success-pressed, #15803d) !important;
|
|
1397
1508
|
}
|
|
1398
|
-
.${
|
|
1509
|
+
.${_e}:disabled {
|
|
1399
1510
|
background-color: var(--ui-color-bg-fill-success-default, #22c55e) !important;
|
|
1400
1511
|
opacity: 0.7;
|
|
1401
1512
|
cursor: not-allowed;
|
|
1402
1513
|
}
|
|
1403
1514
|
` }),
|
|
1404
|
-
/* @__PURE__ */
|
|
1515
|
+
/* @__PURE__ */ d.jsx(
|
|
1405
1516
|
"button",
|
|
1406
1517
|
{
|
|
1407
1518
|
type: "button",
|
|
1408
|
-
className:
|
|
1409
|
-
style:
|
|
1410
|
-
disabled:
|
|
1519
|
+
className: _e,
|
|
1520
|
+
style: Io,
|
|
1521
|
+
disabled: j,
|
|
1411
1522
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1412
1523
|
onClick: (_) => {
|
|
1413
|
-
_.stopPropagation(),
|
|
1524
|
+
_.stopPropagation(), Z("validated");
|
|
1414
1525
|
},
|
|
1415
1526
|
children: "Validar"
|
|
1416
1527
|
}
|
|
@@ -1422,123 +1533,133 @@ function jo({
|
|
|
1422
1533
|
)
|
|
1423
1534
|
] });
|
|
1424
1535
|
}
|
|
1425
|
-
const
|
|
1426
|
-
function
|
|
1536
|
+
const Do = Ce(Oo), Lo = 25, zo = 36;
|
|
1537
|
+
function Ao(r) {
|
|
1427
1538
|
const t = /* @__PURE__ */ new Map();
|
|
1428
1539
|
for (let o = 0; o < r.length; o++) {
|
|
1429
|
-
const
|
|
1430
|
-
let
|
|
1431
|
-
for (let
|
|
1432
|
-
const { x, y } =
|
|
1433
|
-
Math.hypot(
|
|
1540
|
+
const n = r[o], { x: i, y: s } = Ee(n), { x: u, y: v } = $e(i, s);
|
|
1541
|
+
let f = 0;
|
|
1542
|
+
for (let m = 0; m < o; m++) {
|
|
1543
|
+
const { x: h, y: w } = Ee(r[m]), { x: j, y: k } = $e(h, w);
|
|
1544
|
+
Math.hypot(u - j, v - k) < Lo && f++;
|
|
1434
1545
|
}
|
|
1435
|
-
t.set(
|
|
1546
|
+
t.set(n.id, { dx: f * zo, dy: 0 });
|
|
1436
1547
|
}
|
|
1437
1548
|
return t;
|
|
1438
1549
|
}
|
|
1439
|
-
function
|
|
1550
|
+
function Fo() {
|
|
1440
1551
|
return typeof window > "u" ? "" : `${window.innerWidth}x${window.innerHeight}`;
|
|
1441
1552
|
}
|
|
1442
|
-
function
|
|
1553
|
+
function No({
|
|
1443
1554
|
apiUrl: r,
|
|
1444
1555
|
apiKey: t,
|
|
1445
1556
|
reviewMode: o,
|
|
1446
|
-
setReviewMode:
|
|
1447
|
-
reviewers:
|
|
1557
|
+
setReviewMode: n,
|
|
1558
|
+
reviewers: i,
|
|
1448
1559
|
comments: s,
|
|
1449
|
-
loadComments:
|
|
1450
|
-
commentsLoadFailed:
|
|
1560
|
+
loadComments: u,
|
|
1561
|
+
commentsLoadFailed: v = !1
|
|
1451
1562
|
}) {
|
|
1452
|
-
const [
|
|
1453
|
-
|
|
1454
|
-
}, [
|
|
1455
|
-
|
|
1563
|
+
const [f, m] = N(null), h = pe(null), [w, j] = N(null), k = I(() => {
|
|
1564
|
+
f && (f.style.outline = "", f.style.outlineOffset = "", m(null));
|
|
1565
|
+
}, [f]), D = I(() => {
|
|
1566
|
+
h.current && (h.current.style.outline = "", h.current.style.outlineOffset = "", h.current = null);
|
|
1456
1567
|
}, []);
|
|
1457
|
-
|
|
1458
|
-
o || (
|
|
1459
|
-
}, [o,
|
|
1568
|
+
O(() => {
|
|
1569
|
+
o || (k(), D());
|
|
1570
|
+
}, [o, k, D]), O(() => {
|
|
1460
1571
|
if (typeof document > "u") return;
|
|
1461
|
-
const
|
|
1462
|
-
return
|
|
1463
|
-
document.body.style.cursor =
|
|
1572
|
+
const y = document.body.style.cursor;
|
|
1573
|
+
return w ? document.body.style.cursor = "default" : o && (document.body.style.cursor = "crosshair"), () => {
|
|
1574
|
+
document.body.style.cursor = y;
|
|
1464
1575
|
};
|
|
1465
|
-
}, [o,
|
|
1466
|
-
const
|
|
1467
|
-
var
|
|
1468
|
-
if (!
|
|
1469
|
-
const
|
|
1470
|
-
return
|
|
1471
|
-
}, []),
|
|
1472
|
-
(
|
|
1473
|
-
if (!o ||
|
|
1474
|
-
const
|
|
1475
|
-
!
|
|
1576
|
+
}, [o, w]);
|
|
1577
|
+
const M = I((y) => {
|
|
1578
|
+
var P;
|
|
1579
|
+
if (!y || typeof document > "u" || y === document.body || y === document.documentElement) return !0;
|
|
1580
|
+
const R = (P = y.tagName) == null ? void 0 : P.toUpperCase();
|
|
1581
|
+
return R === "BODY" || R === "HTML" ? !0 : y.parentElement !== document.body ? !1 : y.id === "root" || y.getAttribute("data-review-layer-host") != null || document.body.children.length === 1;
|
|
1582
|
+
}, []), z = I(
|
|
1583
|
+
(y) => {
|
|
1584
|
+
if (!o || w) return;
|
|
1585
|
+
const R = y.target.nodeType === Node.ELEMENT_NODE ? y.target : y.target.parentElement;
|
|
1586
|
+
!R || M(R) || (k(), m(R), R.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", R.style.outlineOffset = "2px");
|
|
1476
1587
|
},
|
|
1477
|
-
[o,
|
|
1478
|
-
),
|
|
1479
|
-
(
|
|
1480
|
-
var
|
|
1481
|
-
if (
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1588
|
+
[o, w, k, M]
|
|
1589
|
+
), g = I(
|
|
1590
|
+
(y) => {
|
|
1591
|
+
var P;
|
|
1592
|
+
if (w) return;
|
|
1593
|
+
const R = y.relatedTarget;
|
|
1594
|
+
f && (!R || !f.contains(R)) && !(R && ((P = f.contains) != null && P.call(f, R))) && k();
|
|
1484
1595
|
},
|
|
1485
|
-
[
|
|
1486
|
-
),
|
|
1487
|
-
(
|
|
1488
|
-
if (!o ||
|
|
1489
|
-
const
|
|
1490
|
-
if (!
|
|
1491
|
-
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1496
|
-
position: { x:
|
|
1596
|
+
[f, w, k]
|
|
1597
|
+
), c = I(
|
|
1598
|
+
(y) => {
|
|
1599
|
+
if (!o || w) return;
|
|
1600
|
+
const R = y.target;
|
|
1601
|
+
if (!R || M(R) || R.closest("[data-review-layer-root]")) return;
|
|
1602
|
+
y.preventDefault(), y.stopPropagation(), k();
|
|
1603
|
+
const P = R;
|
|
1604
|
+
h.current = P, P.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", P.style.outlineOffset = "2px";
|
|
1605
|
+
const V = P.getBoundingClientRect(), H = qr(R), { relativeX: Z, relativeY: oe } = Qr(V);
|
|
1606
|
+
j({
|
|
1607
|
+
position: { x: V.left + V.width / 2, y: V.bottom },
|
|
1497
1608
|
payload: {
|
|
1498
|
-
selector:
|
|
1499
|
-
x: Math.round(
|
|
1500
|
-
y: Math.round(
|
|
1501
|
-
relativeX:
|
|
1502
|
-
relativeY:
|
|
1503
|
-
width: Math.round(
|
|
1504
|
-
height: Math.round(
|
|
1505
|
-
url: typeof window < "u"
|
|
1506
|
-
viewport:
|
|
1609
|
+
selector: H,
|
|
1610
|
+
x: Math.round(V.left),
|
|
1611
|
+
y: Math.round(V.top),
|
|
1612
|
+
relativeX: Z,
|
|
1613
|
+
relativeY: oe,
|
|
1614
|
+
width: Math.round(V.width),
|
|
1615
|
+
height: Math.round(V.height),
|
|
1616
|
+
url: typeof window < "u" ? Me() : "/",
|
|
1617
|
+
viewport: Fo(),
|
|
1507
1618
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
1508
1619
|
pageTitle: typeof document < "u" ? document.title : ""
|
|
1509
1620
|
}
|
|
1510
1621
|
});
|
|
1511
1622
|
},
|
|
1512
|
-
[o,
|
|
1623
|
+
[o, w, k, M]
|
|
1513
1624
|
);
|
|
1514
|
-
|
|
1625
|
+
O(() => {
|
|
1515
1626
|
if (o)
|
|
1516
|
-
return document.addEventListener("mouseover",
|
|
1517
|
-
document.removeEventListener("mouseover",
|
|
1627
|
+
return document.addEventListener("mouseover", z, !0), document.addEventListener("mouseout", g, !0), document.addEventListener("click", c, !0), () => {
|
|
1628
|
+
document.removeEventListener("mouseover", z, !0), document.removeEventListener("mouseout", g, !0), document.removeEventListener("click", c, !0);
|
|
1518
1629
|
};
|
|
1519
|
-
}, [o,
|
|
1520
|
-
const [
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
}
|
|
1630
|
+
}, [o, z, g, c]);
|
|
1631
|
+
const [x, A] = N(0), $ = I(() => {
|
|
1632
|
+
if (A((y) => y + 1), h.current) {
|
|
1633
|
+
const y = h.current.getBoundingClientRect();
|
|
1634
|
+
j(
|
|
1635
|
+
(R) => R ? { ...R, position: { x: y.left + y.width / 2, y: y.bottom } } : null
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1527
1638
|
}, []);
|
|
1528
|
-
|
|
1529
|
-
(
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
}, [
|
|
1639
|
+
O(() => {
|
|
1640
|
+
if (!(typeof window > "u"))
|
|
1641
|
+
return window.addEventListener("resize", $), window.addEventListener("scroll", $, !0), () => {
|
|
1642
|
+
window.removeEventListener("resize", $), window.removeEventListener("scroll", $, !0);
|
|
1643
|
+
};
|
|
1644
|
+
}, [$]), O(() => {
|
|
1645
|
+
if (!w || !h.current) return;
|
|
1646
|
+
const y = h.current, P = vr(y).map((V) => (V.addEventListener("scroll", $, !0), () => V.removeEventListener("scroll", $, !0)));
|
|
1647
|
+
return () => P.forEach((V) => V());
|
|
1648
|
+
}, [w, $]);
|
|
1649
|
+
const ae = We(
|
|
1650
|
+
() => Ao(s),
|
|
1651
|
+
[s, x]
|
|
1652
|
+
), se = I(() => {
|
|
1653
|
+
D(), j(null);
|
|
1654
|
+
}, [D]), le = {
|
|
1534
1655
|
position: "fixed",
|
|
1535
1656
|
inset: 0,
|
|
1536
1657
|
zIndex: 999999,
|
|
1537
1658
|
pointerEvents: "none",
|
|
1538
1659
|
cursor: o ? "crosshair" : void 0
|
|
1539
|
-
},
|
|
1540
|
-
/* @__PURE__ */
|
|
1541
|
-
o && /* @__PURE__ */
|
|
1660
|
+
}, ee = /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1661
|
+
/* @__PURE__ */ d.jsx("div", { style: le, "aria-hidden": !0, "data-review-layer-root": !0 }),
|
|
1662
|
+
o && /* @__PURE__ */ d.jsxs(
|
|
1542
1663
|
"div",
|
|
1543
1664
|
{
|
|
1544
1665
|
"data-review-layer-root": !0,
|
|
@@ -1559,12 +1680,12 @@ function Lo({
|
|
|
1559
1680
|
pointerEvents: "auto"
|
|
1560
1681
|
},
|
|
1561
1682
|
children: [
|
|
1562
|
-
/* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */
|
|
1683
|
+
/* @__PURE__ */ d.jsx("span", { children: "Modo revisión (Shift+R para salir)" }),
|
|
1684
|
+
/* @__PURE__ */ d.jsx(
|
|
1564
1685
|
"button",
|
|
1565
1686
|
{
|
|
1566
1687
|
type: "button",
|
|
1567
|
-
onClick: () =>
|
|
1688
|
+
onClick: () => n(!1),
|
|
1568
1689
|
"aria-label": "Salir del modo revisión",
|
|
1569
1690
|
style: {
|
|
1570
1691
|
padding: 0,
|
|
@@ -1588,7 +1709,7 @@ function Lo({
|
|
|
1588
1709
|
]
|
|
1589
1710
|
}
|
|
1590
1711
|
),
|
|
1591
|
-
|
|
1712
|
+
v && /* @__PURE__ */ d.jsxs(
|
|
1592
1713
|
"div",
|
|
1593
1714
|
{
|
|
1594
1715
|
style: {
|
|
@@ -1610,12 +1731,12 @@ function Lo({
|
|
|
1610
1731
|
pointerEvents: "auto"
|
|
1611
1732
|
},
|
|
1612
1733
|
children: [
|
|
1613
|
-
/* @__PURE__ */
|
|
1614
|
-
/* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ d.jsx("span", { children: "No se pudo conectar. Mostrando últimos datos guardados. Reintentar no garantiza respuesta hasta que el servicio esté activo." }),
|
|
1735
|
+
/* @__PURE__ */ d.jsx(
|
|
1615
1736
|
"button",
|
|
1616
1737
|
{
|
|
1617
1738
|
type: "button",
|
|
1618
|
-
onClick: () =>
|
|
1739
|
+
onClick: () => u(),
|
|
1619
1740
|
style: {
|
|
1620
1741
|
padding: "var(--ui-positive-Value_100, 4px) var(--ui-positive-Value_250, 10px)",
|
|
1621
1742
|
fontSize: "var(--ui-font-size-xs, 12px)",
|
|
@@ -1632,33 +1753,33 @@ function Lo({
|
|
|
1632
1753
|
]
|
|
1633
1754
|
}
|
|
1634
1755
|
),
|
|
1635
|
-
s.map((
|
|
1636
|
-
|
|
1756
|
+
s.map((y) => /* @__PURE__ */ d.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ d.jsx(
|
|
1757
|
+
Do,
|
|
1637
1758
|
{
|
|
1638
|
-
comment:
|
|
1639
|
-
offset:
|
|
1759
|
+
comment: y,
|
|
1760
|
+
offset: ae.get(y.id),
|
|
1640
1761
|
apiUrl: r,
|
|
1641
1762
|
apiKey: t,
|
|
1642
|
-
onStatusChange:
|
|
1763
|
+
onStatusChange: u,
|
|
1643
1764
|
reviewMode: o
|
|
1644
1765
|
}
|
|
1645
|
-
) },
|
|
1646
|
-
|
|
1647
|
-
|
|
1766
|
+
) }, y.id)),
|
|
1767
|
+
w && /* @__PURE__ */ d.jsx("div", { "data-review-layer-modal": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ d.jsx(
|
|
1768
|
+
co,
|
|
1648
1769
|
{
|
|
1649
1770
|
apiUrl: r,
|
|
1650
1771
|
apiKey: t,
|
|
1651
|
-
reviewers:
|
|
1652
|
-
position:
|
|
1653
|
-
payload:
|
|
1654
|
-
onClose:
|
|
1655
|
-
onSuccess:
|
|
1772
|
+
reviewers: i,
|
|
1773
|
+
position: w.position,
|
|
1774
|
+
payload: w.payload,
|
|
1775
|
+
onClose: se,
|
|
1776
|
+
onSuccess: u
|
|
1656
1777
|
}
|
|
1657
1778
|
) })
|
|
1658
|
-
] }),
|
|
1659
|
-
return
|
|
1779
|
+
] }), re = typeof document < "u" ? document.body : null;
|
|
1780
|
+
return re ? fr(ee, re) : null;
|
|
1660
1781
|
}
|
|
1661
|
-
const
|
|
1782
|
+
const $o = `/**
|
|
1662
1783
|
* Tokens de diseño UI para review-layer-react.
|
|
1663
1784
|
* Las variables se inyectan en :root al montar ReviewProvider.
|
|
1664
1785
|
* Puedes sobrescribirlas en tu app para adaptar el tema.
|
|
@@ -1984,20 +2105,20 @@ const zo = `/**
|
|
|
1984
2105
|
--ui-shadow-modal: 0 var(--ui-shadow-04-y) var(--ui-shadow-04-blur) var(--ui-shadow-04-Color);
|
|
1985
2106
|
}
|
|
1986
2107
|
`;
|
|
1987
|
-
function
|
|
1988
|
-
const
|
|
1989
|
-
r && o((
|
|
2108
|
+
function Mo(r, t, o) {
|
|
2109
|
+
const n = I(() => {
|
|
2110
|
+
r && o((i) => !i);
|
|
1990
2111
|
}, [r, o]);
|
|
1991
|
-
|
|
2112
|
+
O(() => {
|
|
1992
2113
|
if (!r) return;
|
|
1993
|
-
const
|
|
1994
|
-
(s.key === "r" || s.key === "R" || s.code === "KeyR") && s.shiftKey && !s.ctrlKey && !s.metaKey && (s.preventDefault(),
|
|
2114
|
+
const i = (s) => {
|
|
2115
|
+
(s.key === "r" || s.key === "R" || s.code === "KeyR") && s.shiftKey && !s.ctrlKey && !s.metaKey && (s.preventDefault(), n());
|
|
1995
2116
|
};
|
|
1996
|
-
return window.addEventListener("keydown",
|
|
1997
|
-
}, [r,
|
|
2117
|
+
return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
|
|
2118
|
+
}, [r, n]);
|
|
1998
2119
|
}
|
|
1999
|
-
const
|
|
2000
|
-
function
|
|
2120
|
+
const Wo = "review_layer:v1:";
|
|
2121
|
+
function Bo(r, t) {
|
|
2001
2122
|
if (r == null) return t;
|
|
2002
2123
|
try {
|
|
2003
2124
|
return JSON.parse(r) ?? t;
|
|
@@ -2005,155 +2126,175 @@ function No(r, t) {
|
|
|
2005
2126
|
return t;
|
|
2006
2127
|
}
|
|
2007
2128
|
}
|
|
2008
|
-
function
|
|
2009
|
-
const
|
|
2010
|
-
return
|
|
2129
|
+
function ke(r, t, o, n) {
|
|
2130
|
+
const i = `${Wo}${Uo(r)}:${o}`;
|
|
2131
|
+
return n != null ? `${i}:${n}` : i;
|
|
2011
2132
|
}
|
|
2012
|
-
function
|
|
2133
|
+
function Uo(r) {
|
|
2013
2134
|
return r.replace(/\/+$/, "") || "/";
|
|
2014
2135
|
}
|
|
2015
|
-
function
|
|
2136
|
+
function br(r) {
|
|
2016
2137
|
if (typeof localStorage > "u") return null;
|
|
2017
2138
|
const t = localStorage.getItem(r);
|
|
2018
|
-
return
|
|
2139
|
+
return Bo(t, null);
|
|
2019
2140
|
}
|
|
2020
|
-
function
|
|
2141
|
+
function xr(r, t) {
|
|
2021
2142
|
if (!(typeof localStorage > "u"))
|
|
2022
2143
|
try {
|
|
2023
2144
|
localStorage.setItem(r, JSON.stringify({ data: t, at: Date.now() }));
|
|
2024
2145
|
} catch {
|
|
2025
2146
|
}
|
|
2026
2147
|
}
|
|
2027
|
-
function
|
|
2028
|
-
const
|
|
2029
|
-
return (
|
|
2148
|
+
function Ae(r, t, o) {
|
|
2149
|
+
const n = br(ke(r, t, "comments", o));
|
|
2150
|
+
return (n == null ? void 0 : n.data) ?? null;
|
|
2030
2151
|
}
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2152
|
+
function Yo(r, t, o, n) {
|
|
2153
|
+
xr(ke(r, t, "comments", o), n);
|
|
2033
2154
|
}
|
|
2034
|
-
function
|
|
2035
|
-
const o =
|
|
2155
|
+
function cr(r, t) {
|
|
2156
|
+
const o = br(ke(r, t, "reviewers"));
|
|
2036
2157
|
return (o == null ? void 0 : o.data) ?? null;
|
|
2037
2158
|
}
|
|
2038
|
-
function
|
|
2039
|
-
|
|
2159
|
+
function Ho(r, t, o) {
|
|
2160
|
+
xr(ke(r, t, "reviewers"), o);
|
|
2040
2161
|
}
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
const gr = Mr(null);
|
|
2046
|
-
let ze = null;
|
|
2047
|
-
function Go() {
|
|
2048
|
-
const r = Wr(gr);
|
|
2162
|
+
const Go = "https://review-layer-api.onrender.com/api", yr = Yr(null);
|
|
2163
|
+
let Fe = null;
|
|
2164
|
+
function Jo() {
|
|
2165
|
+
const r = Hr(yr);
|
|
2049
2166
|
if (!r)
|
|
2050
2167
|
throw new Error("useReview must be used within ReviewProvider");
|
|
2051
2168
|
return r;
|
|
2052
2169
|
}
|
|
2053
|
-
|
|
2170
|
+
const B = "[review-layer]";
|
|
2171
|
+
function Zo({
|
|
2054
2172
|
children: r,
|
|
2055
2173
|
enabled: t = !0,
|
|
2056
2174
|
apiUrl: o,
|
|
2057
|
-
apiKey:
|
|
2175
|
+
apiKey: n
|
|
2058
2176
|
}) {
|
|
2059
|
-
const
|
|
2060
|
-
|
|
2061
|
-
const
|
|
2062
|
-
async (
|
|
2063
|
-
if (!
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2177
|
+
const i = (o == null ? void 0 : o.trim()) || Go, [s, u] = N(!1), [v, f] = N([]), [m, h] = N([]), [w, j] = N(!1);
|
|
2178
|
+
Mo(t, s, u);
|
|
2179
|
+
const k = I(
|
|
2180
|
+
async (g) => {
|
|
2181
|
+
if (!t || !i || !n) {
|
|
2182
|
+
console.warn(B, "loadReviewers omitido: faltan enabled, apiUrl o apiKey", {
|
|
2183
|
+
enabled: t,
|
|
2184
|
+
apiUrl: i,
|
|
2185
|
+
hasApiKey: !!n
|
|
2186
|
+
});
|
|
2187
|
+
return;
|
|
2188
|
+
}
|
|
2189
|
+
console.log(B, "Cargando revisores...", { apiUrl: i });
|
|
2190
|
+
try {
|
|
2191
|
+
const c = await eo(i, n, { signal: g });
|
|
2192
|
+
g != null && g.aborted || (f(c), Ho(i, n, c), console.log(B, "Revisores cargados:", c.length));
|
|
2193
|
+
} catch (c) {
|
|
2194
|
+
if (c instanceof Error && c.name === "AbortError") return;
|
|
2195
|
+
if (!(g != null && g.aborted)) {
|
|
2196
|
+
console.error(B, "Error al cargar revisores:", c);
|
|
2197
|
+
const x = cr(i, n);
|
|
2198
|
+
x != null && (f(x), console.log(B, "Usando revisores en caché:", x.length));
|
|
2073
2199
|
}
|
|
2200
|
+
}
|
|
2074
2201
|
},
|
|
2075
|
-
[t,
|
|
2076
|
-
),
|
|
2077
|
-
async (
|
|
2078
|
-
if (!t || !
|
|
2079
|
-
|
|
2080
|
-
|
|
2202
|
+
[t, i, n]
|
|
2203
|
+
), D = I(
|
|
2204
|
+
async (g) => {
|
|
2205
|
+
if (!t || !i || !n) {
|
|
2206
|
+
console.warn(B, "loadComments omitido: faltan enabled, apiUrl o apiKey", {
|
|
2207
|
+
enabled: t,
|
|
2208
|
+
apiUrl: i,
|
|
2209
|
+
hasApiKey: !!n
|
|
2210
|
+
});
|
|
2211
|
+
return;
|
|
2212
|
+
}
|
|
2213
|
+
const c = Me(), x = Ae(i, n, c);
|
|
2214
|
+
x != null && h(x), console.log(B, "Cargando comentarios...", { apiUrl: i, url: c });
|
|
2081
2215
|
try {
|
|
2082
|
-
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2085
|
-
} catch (
|
|
2086
|
-
if (
|
|
2087
|
-
if (!(
|
|
2088
|
-
|
|
2089
|
-
const
|
|
2090
|
-
|
|
2216
|
+
j(!1);
|
|
2217
|
+
const A = await oo(i, n, c, { signal: g });
|
|
2218
|
+
g != null && g.aborted || (h(A), Yo(i, n, c, A), console.log(B, "Comentarios cargados:", A.length));
|
|
2219
|
+
} catch (A) {
|
|
2220
|
+
if (A instanceof Error && A.name === "AbortError") return;
|
|
2221
|
+
if (!(g != null && g.aborted)) {
|
|
2222
|
+
j(!0), console.error(B, "Error al cargar comentarios:", A);
|
|
2223
|
+
const $ = Ae(i, n, c);
|
|
2224
|
+
$ != null ? (h($), console.log(B, "Usando comentarios en caché:", $.length)) : console.warn(B, "Sin caché de comentarios; la lista quedará vacía hasta que la API responda.");
|
|
2091
2225
|
}
|
|
2092
2226
|
}
|
|
2093
2227
|
},
|
|
2094
|
-
[t,
|
|
2228
|
+
[t, i, n]
|
|
2095
2229
|
);
|
|
2096
|
-
|
|
2097
|
-
if (!t || !
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2230
|
+
O(() => {
|
|
2231
|
+
if (!t || !i || !n) {
|
|
2232
|
+
console.warn(B, "Provider activo pero sin carga: enabled, apiUrl y apiKey son requeridos.", {
|
|
2233
|
+
enabled: t,
|
|
2234
|
+
apiUrl: i,
|
|
2235
|
+
hasApiKey: !!n
|
|
2236
|
+
});
|
|
2237
|
+
return;
|
|
2238
|
+
}
|
|
2239
|
+
const g = Me(), c = cr(i, n), x = Ae(i, n, g);
|
|
2240
|
+
c != null && (f(c), console.log(B, "Revisores desde caché (inicial):", c.length)), x != null && (h(x), console.log(B, "Comentarios desde caché (inicial):", x.length, { url: g }));
|
|
2241
|
+
}, [t, i, n]), O(() => {
|
|
2101
2242
|
if (typeof document > "u") return;
|
|
2102
|
-
const
|
|
2103
|
-
if (!document.getElementById(
|
|
2104
|
-
const
|
|
2105
|
-
|
|
2243
|
+
const g = "review-layer-ui-variables";
|
|
2244
|
+
if (!document.getElementById(g)) {
|
|
2245
|
+
const c = document.createElement("style");
|
|
2246
|
+
c.id = g, c.textContent = $o, document.head.appendChild(c);
|
|
2106
2247
|
}
|
|
2107
|
-
}, []),
|
|
2108
|
-
if (!t || !
|
|
2109
|
-
const
|
|
2110
|
-
if (
|
|
2111
|
-
return
|
|
2248
|
+
}, []), O(() => {
|
|
2249
|
+
if (!t || !i || !n) return;
|
|
2250
|
+
const g = `${i}:${n}`;
|
|
2251
|
+
if (Fe !== g)
|
|
2252
|
+
return Fe = g, console.log(B, "Inicio de carga (revisores + comentarios)", { apiUrl: i, apiKey: n ? "***" : "(vacío)" }), k(), D(), () => {
|
|
2112
2253
|
setTimeout(() => {
|
|
2113
|
-
|
|
2254
|
+
Fe = null;
|
|
2114
2255
|
}, 0);
|
|
2115
2256
|
};
|
|
2116
|
-
}, [t,
|
|
2257
|
+
}, [t, i, n, k, D]), O(() => {
|
|
2117
2258
|
if (!t) return;
|
|
2118
|
-
const
|
|
2119
|
-
return window.addEventListener("popstate",
|
|
2120
|
-
}, [t,
|
|
2121
|
-
const
|
|
2259
|
+
const g = () => D();
|
|
2260
|
+
return window.addEventListener("popstate", g), () => window.removeEventListener("popstate", g);
|
|
2261
|
+
}, [t, D]);
|
|
2262
|
+
const M = We(
|
|
2122
2263
|
() => ({
|
|
2123
|
-
apiUrl:
|
|
2124
|
-
apiKey:
|
|
2264
|
+
apiUrl: i,
|
|
2265
|
+
apiKey: n,
|
|
2125
2266
|
reviewMode: s,
|
|
2126
|
-
setReviewMode:
|
|
2127
|
-
reviewers:
|
|
2128
|
-
comments:
|
|
2129
|
-
loadComments:
|
|
2130
|
-
commentsLoadFailed:
|
|
2267
|
+
setReviewMode: u,
|
|
2268
|
+
reviewers: v,
|
|
2269
|
+
comments: m,
|
|
2270
|
+
loadComments: D,
|
|
2271
|
+
commentsLoadFailed: w
|
|
2131
2272
|
}),
|
|
2132
|
-
[
|
|
2133
|
-
),
|
|
2134
|
-
/* @__PURE__ */
|
|
2135
|
-
|
|
2273
|
+
[i, n, s, u, v, m, D, w]
|
|
2274
|
+
), z = t && typeof document < "u" ? fr(
|
|
2275
|
+
/* @__PURE__ */ d.jsx(
|
|
2276
|
+
No,
|
|
2136
2277
|
{
|
|
2137
|
-
apiUrl:
|
|
2138
|
-
apiKey:
|
|
2278
|
+
apiUrl: i,
|
|
2279
|
+
apiKey: n,
|
|
2139
2280
|
reviewMode: s,
|
|
2140
|
-
setReviewMode:
|
|
2141
|
-
reviewers:
|
|
2142
|
-
comments:
|
|
2143
|
-
loadComments:
|
|
2144
|
-
commentsLoadFailed:
|
|
2281
|
+
setReviewMode: u,
|
|
2282
|
+
reviewers: v,
|
|
2283
|
+
comments: m,
|
|
2284
|
+
loadComments: D,
|
|
2285
|
+
commentsLoadFailed: w
|
|
2145
2286
|
}
|
|
2146
2287
|
),
|
|
2147
2288
|
document.body
|
|
2148
2289
|
) : null;
|
|
2149
|
-
return /* @__PURE__ */
|
|
2290
|
+
return /* @__PURE__ */ d.jsxs(yr.Provider, { value: M, children: [
|
|
2150
2291
|
r,
|
|
2151
|
-
|
|
2292
|
+
z
|
|
2152
2293
|
] });
|
|
2153
2294
|
}
|
|
2154
2295
|
export {
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2296
|
+
Go as DEFAULT_API_URL,
|
|
2297
|
+
Zo as ReviewProvider,
|
|
2298
|
+
Jo as useReview
|
|
2158
2299
|
};
|
|
2159
2300
|
//# sourceMappingURL=review-layer-react.js.map
|