@bitux/review-layer-react 0.1.6 → 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 h,
|
|
20
|
-
|
|
21
|
-
for (h in
|
|
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 =
|
|
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
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
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
|
|
296
|
+
case m:
|
|
297
|
+
return xe("Suspense");
|
|
298
298
|
case h:
|
|
299
|
-
return
|
|
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,85 +713,164 @@ function dr(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
|
|
720
|
+
function Ee(r) {
|
|
711
721
|
if (r.selector) {
|
|
712
|
-
const t =
|
|
722
|
+
const t = pr(r.selector);
|
|
713
723
|
if (t != null)
|
|
714
724
|
return { x: t.left, y: t.top };
|
|
715
725
|
}
|
|
716
|
-
return
|
|
726
|
+
return gr(r);
|
|
717
727
|
}
|
|
718
|
-
|
|
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 = {
|
|
719
739
|
PENDING: "pending",
|
|
720
740
|
DEV_FIXED: "dev_fixed",
|
|
721
741
|
VALIDATED: "validated"
|
|
722
|
-
};
|
|
723
|
-
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) {
|
|
724
760
|
return {
|
|
725
761
|
"Content-Type": "application/json",
|
|
726
762
|
"x-review-key": r
|
|
727
763
|
};
|
|
728
764
|
}
|
|
729
|
-
async function
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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
|
+
}
|
|
735
780
|
return (await i.json()).data ?? [];
|
|
736
781
|
}
|
|
737
|
-
async function
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
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
|
+
}
|
|
743
794
|
if (!i.ok) {
|
|
744
|
-
const
|
|
745
|
-
|
|
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);
|
|
746
802
|
}
|
|
747
803
|
return (await i.json()).data;
|
|
748
804
|
}
|
|
749
|
-
async function
|
|
750
|
-
const
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
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 ?? [];
|
|
756
821
|
}
|
|
757
|
-
async function
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
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;
|
|
766
833
|
}
|
|
767
|
-
|
|
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;
|
|
768
845
|
}
|
|
769
|
-
async function
|
|
770
|
-
const
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
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
|
+
}
|
|
774
857
|
if (!i.ok) {
|
|
775
|
-
const
|
|
776
|
-
|
|
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);
|
|
777
866
|
}
|
|
778
867
|
}
|
|
779
|
-
const
|
|
868
|
+
const io = {
|
|
780
869
|
position: "fixed",
|
|
781
870
|
inset: 0,
|
|
782
871
|
zIndex: 999997,
|
|
783
872
|
backgroundColor: "transparent"
|
|
784
|
-
},
|
|
873
|
+
}, ao = {
|
|
785
874
|
position: "fixed",
|
|
786
875
|
minWidth: 320,
|
|
787
876
|
maxWidth: 400,
|
|
@@ -791,7 +880,7 @@ const ro = {
|
|
|
791
880
|
borderRadius: "var(--ui-radius_8, 8px)",
|
|
792
881
|
boxShadow: "0 8px 24px var(--ui-color-black-alpha-20, rgba(0,0,0,0.15))",
|
|
793
882
|
zIndex: 999998
|
|
794
|
-
},
|
|
883
|
+
}, so = {
|
|
795
884
|
width: "100%",
|
|
796
885
|
minHeight: 80,
|
|
797
886
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
|
|
@@ -802,14 +891,14 @@ const ro = {
|
|
|
802
891
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
803
892
|
resize: "vertical",
|
|
804
893
|
boxSizing: "border-box"
|
|
805
|
-
},
|
|
894
|
+
}, lo = {
|
|
806
895
|
width: "100%",
|
|
807
896
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
|
|
808
897
|
marginBottom: "var(--ui-positive-Value_300, 12px)",
|
|
809
898
|
border: "1px solid var(--ui-color-border-default, #d9d9d9)",
|
|
810
899
|
borderRadius: "var(--ui-radius_6, 6px)",
|
|
811
900
|
fontSize: "var(--ui-font-size-sm, 14px)"
|
|
812
|
-
},
|
|
901
|
+
}, sr = {
|
|
813
902
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_400, 16px)",
|
|
814
903
|
backgroundColor: "var(--ui-color-bg-fill-danger-default, #ff4d4f)",
|
|
815
904
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
@@ -819,132 +908,151 @@ const ro = {
|
|
|
819
908
|
cursor: "pointer",
|
|
820
909
|
fontWeight: "var(--ui-font-weight-medium, 500)"
|
|
821
910
|
};
|
|
822
|
-
function
|
|
911
|
+
function uo({
|
|
823
912
|
apiUrl: r,
|
|
824
913
|
apiKey: t,
|
|
825
914
|
reviewers: o,
|
|
826
|
-
position:
|
|
827
|
-
payload:
|
|
915
|
+
position: n,
|
|
916
|
+
payload: i,
|
|
828
917
|
onClose: s,
|
|
829
|
-
onSuccess:
|
|
918
|
+
onSuccess: u
|
|
830
919
|
}) {
|
|
831
|
-
var
|
|
832
|
-
const [
|
|
833
|
-
((
|
|
834
|
-
), [
|
|
835
|
-
|
|
836
|
-
o.length > 0 && !
|
|
837
|
-
}, [o,
|
|
838
|
-
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(
|
|
839
928
|
async (c) => {
|
|
840
|
-
if (c.preventDefault(), !(!
|
|
841
|
-
|
|
929
|
+
if (c.preventDefault(), !(!v.trim() || !m)) {
|
|
930
|
+
j(!0), D(null);
|
|
842
931
|
try {
|
|
843
|
-
await
|
|
844
|
-
...
|
|
845
|
-
message:
|
|
846
|
-
reviewerId:
|
|
847
|
-
}),
|
|
848
|
-
} catch (
|
|
849
|
-
|
|
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");
|
|
850
939
|
} finally {
|
|
851
|
-
|
|
940
|
+
j(!1);
|
|
852
941
|
}
|
|
853
942
|
}
|
|
854
943
|
},
|
|
855
|
-
[r, t,
|
|
856
|
-
);
|
|
857
|
-
return
|
|
858
|
-
const c = (
|
|
859
|
-
|
|
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());
|
|
860
949
|
};
|
|
861
950
|
return document.addEventListener("keydown", c, !0), () => document.removeEventListener("keydown", c, !0);
|
|
862
|
-
}, [s]),
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
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
|
-
|
|
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
|
+
);
|
|
945
1053
|
}
|
|
946
|
-
const
|
|
947
|
-
function
|
|
1054
|
+
const co = Ce(uo), fo = "var(--ui-color-red-500, #ef4444)";
|
|
1055
|
+
function vo(r) {
|
|
948
1056
|
return {
|
|
949
1057
|
position: "fixed",
|
|
950
1058
|
outline: `2px solid ${r}`,
|
|
@@ -954,41 +1062,41 @@ function lo(r) {
|
|
|
954
1062
|
boxSizing: "border-box"
|
|
955
1063
|
};
|
|
956
1064
|
}
|
|
957
|
-
const
|
|
1065
|
+
const po = Ce(function({
|
|
958
1066
|
selector: t,
|
|
959
1067
|
active: o,
|
|
960
|
-
fallbackComment:
|
|
961
|
-
outlineColor:
|
|
1068
|
+
fallbackComment: n,
|
|
1069
|
+
outlineColor: i = fo
|
|
962
1070
|
}) {
|
|
963
|
-
const [s,
|
|
1071
|
+
const [s, u] = N(null), v = I(() => {
|
|
964
1072
|
if (!o) {
|
|
965
|
-
|
|
1073
|
+
u(null);
|
|
966
1074
|
return;
|
|
967
1075
|
}
|
|
968
|
-
const
|
|
969
|
-
if (
|
|
970
|
-
|
|
1076
|
+
const f = t != null && t.trim() ? pr(t) : null;
|
|
1077
|
+
if (f) {
|
|
1078
|
+
u(f);
|
|
971
1079
|
return;
|
|
972
1080
|
}
|
|
973
|
-
if (
|
|
974
|
-
|
|
1081
|
+
if (n) {
|
|
1082
|
+
u(Kr(n));
|
|
975
1083
|
return;
|
|
976
1084
|
}
|
|
977
|
-
|
|
978
|
-
}, [t, o,
|
|
979
|
-
return
|
|
980
|
-
|
|
981
|
-
}, [
|
|
1085
|
+
u(null);
|
|
1086
|
+
}, [t, o, n]);
|
|
1087
|
+
return O(() => {
|
|
1088
|
+
v();
|
|
1089
|
+
}, [v]), O(() => {
|
|
982
1090
|
if (o)
|
|
983
|
-
return window.addEventListener("scroll",
|
|
984
|
-
window.removeEventListener("scroll",
|
|
1091
|
+
return window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
|
|
1092
|
+
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
|
|
985
1093
|
};
|
|
986
|
-
}, [o,
|
|
1094
|
+
}, [o, v]), !o || s == null ? null : /* @__PURE__ */ d.jsx(
|
|
987
1095
|
"div",
|
|
988
1096
|
{
|
|
989
1097
|
"aria-hidden": !0,
|
|
990
1098
|
style: {
|
|
991
|
-
...
|
|
1099
|
+
...vo(i),
|
|
992
1100
|
left: s.left,
|
|
993
1101
|
top: s.top,
|
|
994
1102
|
width: s.width,
|
|
@@ -996,40 +1104,40 @@ const so = Re(function({
|
|
|
996
1104
|
}
|
|
997
1105
|
}
|
|
998
1106
|
);
|
|
999
|
-
}),
|
|
1107
|
+
}), Re = 32, lr = 150, ze = 250, Y = {
|
|
1000
1108
|
cardBg: "var(--ui-color-bg-surface-default, #ffffff)",
|
|
1001
1109
|
cardFooterBg: "var(--ui-color-bg-surface-secondary-default, #f8fafc)",
|
|
1002
1110
|
textDark: "var(--ui-color-text-primary, #333333)",
|
|
1003
1111
|
textMuted: "var(--ui-color-text-secondary, #888888)",
|
|
1004
1112
|
border: "var(--ui-color-border-default, #cccccc)",
|
|
1005
1113
|
shadow: "var(--ui-shadow-card, 0 4px 16px rgba(0, 0, 0, 0.12))"
|
|
1006
|
-
},
|
|
1007
|
-
[
|
|
1008
|
-
[
|
|
1009
|
-
[
|
|
1010
|
-
},
|
|
1011
|
-
[
|
|
1012
|
-
[
|
|
1013
|
-
[
|
|
1014
|
-
},
|
|
1015
|
-
[
|
|
1016
|
-
[
|
|
1017
|
-
[
|
|
1018
|
-
},
|
|
1019
|
-
[
|
|
1020
|
-
[
|
|
1021
|
-
[
|
|
1022
|
-
},
|
|
1023
|
-
[
|
|
1024
|
-
[
|
|
1025
|
-
[
|
|
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)"
|
|
1026
1134
|
};
|
|
1027
|
-
function
|
|
1135
|
+
function bo(r) {
|
|
1028
1136
|
const t = r.trim().split(/\s+/);
|
|
1029
1137
|
return t.length >= 2 ? (t[0][0] + t[t.length - 1][0]).toUpperCase() : r.slice(0, 2).toUpperCase() || "?";
|
|
1030
1138
|
}
|
|
1031
|
-
const
|
|
1032
|
-
/* @__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(
|
|
1033
1141
|
"path",
|
|
1034
1142
|
{
|
|
1035
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",
|
|
@@ -1040,7 +1148,7 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1040
1148
|
fill: "none"
|
|
1041
1149
|
}
|
|
1042
1150
|
),
|
|
1043
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ d.jsx(
|
|
1044
1152
|
"path",
|
|
1045
1153
|
{
|
|
1046
1154
|
d: "M8 10h.01M12 10h.01M16 10h.01",
|
|
@@ -1049,12 +1157,12 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1049
1157
|
strokeLinecap: "round"
|
|
1050
1158
|
}
|
|
1051
1159
|
)
|
|
1052
|
-
] }),
|
|
1160
|
+
] }), mo = (r) => ({
|
|
1053
1161
|
position: "fixed",
|
|
1054
|
-
width:
|
|
1055
|
-
height:
|
|
1162
|
+
width: Re,
|
|
1163
|
+
height: Re,
|
|
1056
1164
|
borderRadius: "50%",
|
|
1057
|
-
backgroundColor:
|
|
1165
|
+
backgroundColor: ie[r] ?? ie[T.PENDING],
|
|
1058
1166
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
1059
1167
|
display: "flex",
|
|
1060
1168
|
alignItems: "center",
|
|
@@ -1064,31 +1172,31 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1064
1172
|
boxShadow: "0 2px 8px var(--ui-color-black-alpha-20, rgba(0,0,0,0.2))",
|
|
1065
1173
|
zIndex: 999998,
|
|
1066
1174
|
border: "2px solid var(--ui-color-white, #fff)"
|
|
1067
|
-
}),
|
|
1175
|
+
}), wo = {
|
|
1068
1176
|
position: "fixed",
|
|
1069
|
-
width:
|
|
1070
|
-
minWidth:
|
|
1071
|
-
maxWidth:
|
|
1177
|
+
width: ze,
|
|
1178
|
+
minWidth: ze,
|
|
1179
|
+
maxWidth: ze,
|
|
1072
1180
|
boxSizing: "border-box",
|
|
1073
|
-
backgroundColor:
|
|
1181
|
+
backgroundColor: Y.cardBg,
|
|
1074
1182
|
borderRadius: "var(--ui-radius_12, 12px)",
|
|
1075
|
-
boxShadow:
|
|
1183
|
+
boxShadow: Y.shadow,
|
|
1076
1184
|
fontSize: "var(--ui-font-size-sm, 14px)",
|
|
1077
1185
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1078
1186
|
zIndex: 999999,
|
|
1079
1187
|
pointerEvents: "auto"
|
|
1080
|
-
},
|
|
1188
|
+
}, _o = {
|
|
1081
1189
|
display: "flex",
|
|
1082
1190
|
alignItems: "center",
|
|
1083
1191
|
justifyContent: "space-between",
|
|
1084
1192
|
gap: "var(--ui-positive-Value_250, 10px)",
|
|
1085
|
-
borderBottom: `1px solid ${
|
|
1193
|
+
borderBottom: `1px solid ${Y.border}`,
|
|
1086
1194
|
padding: "var(--ui-positive-Value_300, 12px)"
|
|
1087
|
-
},
|
|
1195
|
+
}, Eo = (r) => ({
|
|
1088
1196
|
width: 40,
|
|
1089
1197
|
height: 40,
|
|
1090
1198
|
borderRadius: "50%",
|
|
1091
|
-
backgroundColor:
|
|
1199
|
+
backgroundColor: ie[r] ?? ie[T.PENDING],
|
|
1092
1200
|
color: "var(--ui-color-text-on-color, #fff)",
|
|
1093
1201
|
border: "2px solid var(--ui-color-white, #fff)",
|
|
1094
1202
|
display: "flex",
|
|
@@ -1098,18 +1206,18 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1098
1206
|
fontWeight: "var(--ui-font-weight-bold, 700)",
|
|
1099
1207
|
flexShrink: 0,
|
|
1100
1208
|
overflow: "hidden"
|
|
1101
|
-
}),
|
|
1209
|
+
}), Ro = Ce(function({
|
|
1102
1210
|
reviewer: t,
|
|
1103
1211
|
status: o
|
|
1104
1212
|
}) {
|
|
1105
|
-
const
|
|
1106
|
-
if (
|
|
1107
|
-
const
|
|
1108
|
-
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(
|
|
1109
1217
|
"img",
|
|
1110
1218
|
{
|
|
1111
|
-
src:
|
|
1112
|
-
alt:
|
|
1219
|
+
src: n,
|
|
1220
|
+
alt: i,
|
|
1113
1221
|
style: {
|
|
1114
1222
|
width: "100%",
|
|
1115
1223
|
height: "100%",
|
|
@@ -1119,8 +1227,8 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1119
1227
|
}
|
|
1120
1228
|
) });
|
|
1121
1229
|
}
|
|
1122
|
-
return /* @__PURE__ */
|
|
1123
|
-
}),
|
|
1230
|
+
return /* @__PURE__ */ d.jsx("div", { style: s, children: bo(i) });
|
|
1231
|
+
}), So = {
|
|
1124
1232
|
flexShrink: 0,
|
|
1125
1233
|
width: "var(--ui-positive-Value_600, 24px)",
|
|
1126
1234
|
height: "var(--ui-positive-Value_600, 24px)",
|
|
@@ -1128,15 +1236,15 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1128
1236
|
border: "none",
|
|
1129
1237
|
borderRadius: "var(--ui-radius_6, 6px)",
|
|
1130
1238
|
backgroundColor: "transparent",
|
|
1131
|
-
color:
|
|
1239
|
+
color: Y.textDark,
|
|
1132
1240
|
cursor: "pointer",
|
|
1133
1241
|
fontSize: "var(--ui-positive-Value_450, 18px)",
|
|
1134
1242
|
lineHeight: 1,
|
|
1135
1243
|
display: "flex",
|
|
1136
1244
|
alignItems: "center",
|
|
1137
1245
|
justifyContent: "center"
|
|
1138
|
-
},
|
|
1139
|
-
const t =
|
|
1246
|
+
}, Co = (r) => {
|
|
1247
|
+
const t = Se[r] ?? Se[T.PENDING];
|
|
1140
1248
|
return {
|
|
1141
1249
|
display: "inline-flex",
|
|
1142
1250
|
alignItems: "center",
|
|
@@ -1147,42 +1255,42 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1147
1255
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1148
1256
|
textTransform: "uppercase",
|
|
1149
1257
|
letterSpacing: "0.02em",
|
|
1150
|
-
backgroundColor:
|
|
1258
|
+
backgroundColor: ur[r] ?? ur[T.PENDING],
|
|
1151
1259
|
color: t,
|
|
1152
1260
|
border: `1px solid ${t}`
|
|
1153
1261
|
};
|
|
1154
|
-
},
|
|
1262
|
+
}, ko = {
|
|
1155
1263
|
display: "block",
|
|
1156
1264
|
fontSize: "var(--ui-font-size-2xs, 10px)",
|
|
1157
1265
|
fontWeight: "var(--ui-font-weight-semibold, 600)",
|
|
1158
1266
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1159
|
-
color:
|
|
1267
|
+
color: Y.textMuted,
|
|
1160
1268
|
textTransform: "uppercase",
|
|
1161
1269
|
letterSpacing: "0.04em"
|
|
1162
|
-
},
|
|
1270
|
+
}, Po = {
|
|
1163
1271
|
width: "100%",
|
|
1164
1272
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_300, 12px)",
|
|
1165
1273
|
paddingRight: "var(--ui-positive-Value_800, 32px)",
|
|
1166
1274
|
fontSize: "var(--ui-font-size-xs, 13px)",
|
|
1167
1275
|
fontFamily: "var(--ui-font-family-ui, 'Inter', sans-serif)",
|
|
1168
1276
|
borderRadius: "var(--ui-radius_8, 8px)",
|
|
1169
|
-
border: `1px solid ${
|
|
1170
|
-
backgroundColor:
|
|
1171
|
-
color:
|
|
1277
|
+
border: `1px solid ${Y.border}`,
|
|
1278
|
+
backgroundColor: Y.cardBg,
|
|
1279
|
+
color: Y.textDark,
|
|
1172
1280
|
cursor: "pointer",
|
|
1173
1281
|
appearance: "none",
|
|
1174
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")`,
|
|
1175
1283
|
backgroundRepeat: "no-repeat",
|
|
1176
1284
|
backgroundPosition: "right var(--ui-positive-Value_250, 10px) center"
|
|
1177
|
-
},
|
|
1285
|
+
}, To = {
|
|
1178
1286
|
display: "flex",
|
|
1179
1287
|
alignItems: "center",
|
|
1180
1288
|
justifyContent: "flex-end",
|
|
1181
1289
|
gap: "var(--ui-positive-Value_200, 8px)",
|
|
1182
1290
|
padding: "var(--ui-positive-Value_300, 12px)",
|
|
1183
|
-
borderTop: `1px solid ${
|
|
1184
|
-
backgroundColor:
|
|
1185
|
-
},
|
|
1291
|
+
borderTop: `1px solid ${Y.border}`,
|
|
1292
|
+
backgroundColor: Y.cardFooterBg
|
|
1293
|
+
}, hr = {
|
|
1186
1294
|
minWidth: 100,
|
|
1187
1295
|
padding: "var(--ui-positive-Value_200, 8px) var(--ui-positive-Value_350, 14px)",
|
|
1188
1296
|
fontSize: "var(--ui-font-size-xs, 13px)",
|
|
@@ -1191,223 +1299,229 @@ const po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
|
|
|
1191
1299
|
borderRadius: "var(--ui-radius_8, 8px)",
|
|
1192
1300
|
cursor: "pointer",
|
|
1193
1301
|
border: "none"
|
|
1194
|
-
},
|
|
1195
|
-
...
|
|
1302
|
+
}, jo = {
|
|
1303
|
+
...hr,
|
|
1196
1304
|
backgroundColor: "transparent",
|
|
1197
|
-
color:
|
|
1198
|
-
},
|
|
1305
|
+
color: Y.textDark
|
|
1306
|
+
}, _e = "review-layer-resolve-btn", Vo = [
|
|
1199
1307
|
"pending",
|
|
1200
1308
|
"dev_fixed",
|
|
1201
1309
|
"validated"
|
|
1202
|
-
],
|
|
1203
|
-
...
|
|
1310
|
+
], Io = {
|
|
1311
|
+
...hr,
|
|
1204
1312
|
backgroundColor: "var(--ui-color-bg-fill-success-default, #22c55e)",
|
|
1205
1313
|
color: "var(--ui-color-text-on-color, #fff)"
|
|
1206
1314
|
};
|
|
1207
|
-
function
|
|
1315
|
+
function Oo({
|
|
1208
1316
|
comment: r,
|
|
1209
1317
|
offset: t = { dx: 0, dy: 0 },
|
|
1210
1318
|
apiUrl: o,
|
|
1211
|
-
apiKey:
|
|
1212
|
-
onStatusChange:
|
|
1319
|
+
apiKey: n,
|
|
1320
|
+
onStatusChange: i,
|
|
1213
1321
|
reviewMode: s = !1
|
|
1214
1322
|
}) {
|
|
1215
|
-
var
|
|
1216
|
-
const [
|
|
1217
|
-
|
|
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));
|
|
1218
1326
|
}, [r]);
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
}, [
|
|
1327
|
+
O(() => {
|
|
1328
|
+
x();
|
|
1329
|
+
}, [x]), O(() => {
|
|
1222
1330
|
if (!(typeof window > "u"))
|
|
1223
|
-
return window.addEventListener("scroll",
|
|
1224
|
-
window.removeEventListener("scroll",
|
|
1331
|
+
return window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
|
|
1332
|
+
window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
|
|
1225
1333
|
};
|
|
1226
|
-
}, [
|
|
1227
|
-
|
|
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(() => {
|
|
1228
1342
|
z.current !== null && (clearTimeout(z.current), z.current = null);
|
|
1229
|
-
}, []),
|
|
1230
|
-
s || (
|
|
1231
|
-
}, [s,
|
|
1232
|
-
|
|
1233
|
-
z.current = null,
|
|
1234
|
-
},
|
|
1235
|
-
}, [
|
|
1236
|
-
|
|
1237
|
-
}, [
|
|
1238
|
-
|
|
1239
|
-
z.current = null,
|
|
1240
|
-
},
|
|
1241
|
-
}, [
|
|
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(() => {
|
|
1242
1356
|
if (s) {
|
|
1243
|
-
|
|
1357
|
+
f && (m(!1), v(!1));
|
|
1244
1358
|
return;
|
|
1245
1359
|
}
|
|
1246
|
-
|
|
1247
|
-
}, [s,
|
|
1248
|
-
|
|
1249
|
-
if (!
|
|
1250
|
-
const _ = (
|
|
1251
|
-
var
|
|
1252
|
-
const
|
|
1253
|
-
(
|
|
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));
|
|
1254
1368
|
};
|
|
1255
1369
|
return document.addEventListener("mousedown", _, !0), () => document.removeEventListener("mousedown", _, !0);
|
|
1256
|
-
}, [
|
|
1257
|
-
s && (
|
|
1370
|
+
}, [f]), O(() => () => A(), [A]), O(() => {
|
|
1371
|
+
s && (m(!1), v(!1));
|
|
1258
1372
|
}, [s]);
|
|
1259
|
-
const
|
|
1260
|
-
|
|
1261
|
-
}, []),
|
|
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(
|
|
1262
1376
|
async (_) => {
|
|
1263
1377
|
if (_ !== r.status) {
|
|
1264
|
-
|
|
1378
|
+
M(null), k(!0);
|
|
1265
1379
|
try {
|
|
1266
|
-
await
|
|
1267
|
-
} catch (
|
|
1268
|
-
|
|
1380
|
+
await to(o, n, r.id, _), i();
|
|
1381
|
+
} catch (J) {
|
|
1382
|
+
M(J instanceof Error ? J.message : "Error al actualizar");
|
|
1269
1383
|
} finally {
|
|
1270
1384
|
k(!1);
|
|
1271
1385
|
}
|
|
1272
1386
|
}
|
|
1273
1387
|
},
|
|
1274
|
-
[o,
|
|
1275
|
-
),
|
|
1276
|
-
|
|
1388
|
+
[o, n, r.id, r.status, i]
|
|
1389
|
+
), oe = I(async () => {
|
|
1390
|
+
M(null), k(!0);
|
|
1277
1391
|
try {
|
|
1278
|
-
await
|
|
1392
|
+
await no(o, n, r.id), i(), H();
|
|
1279
1393
|
} catch (_) {
|
|
1280
|
-
|
|
1394
|
+
M(_ instanceof Error ? _.message : "Error al eliminar");
|
|
1281
1395
|
} finally {
|
|
1282
1396
|
k(!1);
|
|
1283
1397
|
}
|
|
1284
|
-
}, [o,
|
|
1285
|
-
() => ({ ...
|
|
1286
|
-
[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]
|
|
1287
1401
|
);
|
|
1288
|
-
return /* @__PURE__ */
|
|
1289
|
-
/* @__PURE__ */
|
|
1290
|
-
|
|
1402
|
+
return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1403
|
+
/* @__PURE__ */ d.jsx(
|
|
1404
|
+
po,
|
|
1291
1405
|
{
|
|
1292
1406
|
selector: r.selector,
|
|
1293
|
-
active:
|
|
1407
|
+
active: V,
|
|
1294
1408
|
fallbackComment: r,
|
|
1295
|
-
outlineColor:
|
|
1409
|
+
outlineColor: Se[r.status] ?? Se[T.PENDING]
|
|
1296
1410
|
}
|
|
1297
1411
|
),
|
|
1298
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ d.jsx(
|
|
1299
1413
|
"div",
|
|
1300
1414
|
{
|
|
1301
|
-
ref:
|
|
1415
|
+
ref: g,
|
|
1302
1416
|
role: "button",
|
|
1303
1417
|
tabIndex: 0,
|
|
1304
1418
|
"aria-label": `Comentario: ${r.message.slice(0, 30)}...`,
|
|
1305
|
-
"aria-expanded":
|
|
1306
|
-
style:
|
|
1307
|
-
onMouseEnter:
|
|
1308
|
-
onMouseLeave:
|
|
1309
|
-
onClick:
|
|
1310
|
-
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)" })
|
|
1311
1425
|
}
|
|
1312
1426
|
),
|
|
1313
|
-
|
|
1427
|
+
u && /* @__PURE__ */ d.jsxs(
|
|
1314
1428
|
"div",
|
|
1315
1429
|
{
|
|
1316
|
-
ref:
|
|
1430
|
+
ref: c,
|
|
1317
1431
|
role: "dialog",
|
|
1318
1432
|
"aria-label": "Detalle del comentario",
|
|
1319
1433
|
style: {
|
|
1320
|
-
...
|
|
1321
|
-
left:
|
|
1322
|
-
top:
|
|
1434
|
+
...wo,
|
|
1435
|
+
left: R + Re / 2 + 6,
|
|
1436
|
+
top: P
|
|
1323
1437
|
},
|
|
1324
|
-
onMouseEnter:
|
|
1325
|
-
onMouseLeave:
|
|
1438
|
+
onMouseEnter: se,
|
|
1439
|
+
onMouseLeave: le,
|
|
1326
1440
|
children: [
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
/* @__PURE__ */
|
|
1329
|
-
/* @__PURE__ */
|
|
1330
|
-
/* @__PURE__ */
|
|
1331
|
-
/* @__PURE__ */
|
|
1332
|
-
/* @__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" })
|
|
1333
1447
|
] })
|
|
1334
1448
|
] }),
|
|
1335
|
-
/* @__PURE__ */
|
|
1449
|
+
/* @__PURE__ */ d.jsx(
|
|
1336
1450
|
"button",
|
|
1337
1451
|
{
|
|
1338
1452
|
type: "button",
|
|
1339
|
-
"aria-label": r.status ===
|
|
1340
|
-
style:
|
|
1341
|
-
disabled:
|
|
1453
|
+
"aria-label": r.status === T.VALIDATED ? "Eliminar comentario" : "Cerrar",
|
|
1454
|
+
style: So,
|
|
1455
|
+
disabled: j,
|
|
1342
1456
|
onClick: (_) => {
|
|
1343
|
-
_.stopPropagation(), r.status ===
|
|
1457
|
+
_.stopPropagation(), r.status === T.VALIDATED ? oe() : H();
|
|
1344
1458
|
},
|
|
1345
1459
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1346
1460
|
children: "✕"
|
|
1347
1461
|
}
|
|
1348
1462
|
)
|
|
1349
1463
|
] }),
|
|
1350
|
-
/* @__PURE__ */
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
r.status ===
|
|
1353
|
-
|
|
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
|
|
1354
1468
|
] }),
|
|
1355
|
-
/* @__PURE__ */
|
|
1356
|
-
/* @__PURE__ */
|
|
1357
|
-
/* @__PURE__ */
|
|
1358
|
-
/* @__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(
|
|
1359
1473
|
"select",
|
|
1360
1474
|
{
|
|
1361
1475
|
id: `comment-status-${r.id}`,
|
|
1362
|
-
style:
|
|
1476
|
+
style: Po,
|
|
1363
1477
|
value: r.status,
|
|
1364
|
-
disabled:
|
|
1365
|
-
onChange: (_) =>
|
|
1478
|
+
disabled: j,
|
|
1479
|
+
onChange: (_) => Z(_.target.value),
|
|
1366
1480
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1367
1481
|
"aria-label": "Cambiar estado del comentario",
|
|
1368
|
-
children:
|
|
1482
|
+
children: Vo.map((_) => /* @__PURE__ */ d.jsx("option", { value: _, children: go[_] }, _))
|
|
1369
1483
|
}
|
|
1370
1484
|
),
|
|
1371
|
-
|
|
1485
|
+
D && /* @__PURE__ */ d.jsx("div", { style: { marginTop: 8, fontSize: 11, color: "var(--ui-color-text-danger-default, rgb(240, 69, 69))" }, children: D })
|
|
1372
1486
|
] })
|
|
1373
1487
|
] }),
|
|
1374
|
-
/* @__PURE__ */
|
|
1375
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ d.jsxs("div", { style: To, children: [
|
|
1489
|
+
/* @__PURE__ */ d.jsx(
|
|
1376
1490
|
"button",
|
|
1377
1491
|
{
|
|
1378
1492
|
type: "button",
|
|
1379
|
-
style:
|
|
1493
|
+
style: jo,
|
|
1380
1494
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1381
1495
|
onClick: (_) => {
|
|
1382
|
-
_.stopPropagation(),
|
|
1496
|
+
_.stopPropagation(), H();
|
|
1383
1497
|
},
|
|
1384
1498
|
children: "Cerrar"
|
|
1385
1499
|
}
|
|
1386
1500
|
),
|
|
1387
|
-
r.status !==
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
.${
|
|
1501
|
+
r.status !== T.VALIDATED && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1502
|
+
/* @__PURE__ */ d.jsx("style", { children: `
|
|
1503
|
+
.${_e}:hover:not(:disabled) {
|
|
1390
1504
|
background-color: var(--ui-color-bg-fill-success-hover, #16a34a) !important;
|
|
1391
1505
|
}
|
|
1392
|
-
.${
|
|
1506
|
+
.${_e}:active:not(:disabled) {
|
|
1393
1507
|
background-color: var(--ui-color-bg-fill-success-pressed, #15803d) !important;
|
|
1394
1508
|
}
|
|
1395
|
-
.${
|
|
1509
|
+
.${_e}:disabled {
|
|
1396
1510
|
background-color: var(--ui-color-bg-fill-success-default, #22c55e) !important;
|
|
1397
1511
|
opacity: 0.7;
|
|
1398
1512
|
cursor: not-allowed;
|
|
1399
1513
|
}
|
|
1400
1514
|
` }),
|
|
1401
|
-
/* @__PURE__ */
|
|
1515
|
+
/* @__PURE__ */ d.jsx(
|
|
1402
1516
|
"button",
|
|
1403
1517
|
{
|
|
1404
1518
|
type: "button",
|
|
1405
|
-
className:
|
|
1406
|
-
style:
|
|
1407
|
-
disabled:
|
|
1519
|
+
className: _e,
|
|
1520
|
+
style: Io,
|
|
1521
|
+
disabled: j,
|
|
1408
1522
|
onMouseDown: (_) => _.stopPropagation(),
|
|
1409
1523
|
onClick: (_) => {
|
|
1410
|
-
_.stopPropagation(),
|
|
1524
|
+
_.stopPropagation(), Z("validated");
|
|
1411
1525
|
},
|
|
1412
1526
|
children: "Validar"
|
|
1413
1527
|
}
|
|
@@ -1419,130 +1533,133 @@ function jo({
|
|
|
1419
1533
|
)
|
|
1420
1534
|
] });
|
|
1421
1535
|
}
|
|
1422
|
-
const
|
|
1423
|
-
function
|
|
1536
|
+
const Do = Ce(Oo), Lo = 25, zo = 36;
|
|
1537
|
+
function Ao(r) {
|
|
1424
1538
|
const t = /* @__PURE__ */ new Map();
|
|
1425
1539
|
for (let o = 0; o < r.length; o++) {
|
|
1426
|
-
const
|
|
1427
|
-
let
|
|
1428
|
-
for (let
|
|
1429
|
-
const { x: h, y } =
|
|
1430
|
-
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++;
|
|
1431
1545
|
}
|
|
1432
|
-
t.set(
|
|
1546
|
+
t.set(n.id, { dx: f * zo, dy: 0 });
|
|
1433
1547
|
}
|
|
1434
1548
|
return t;
|
|
1435
1549
|
}
|
|
1436
|
-
function
|
|
1550
|
+
function Fo() {
|
|
1437
1551
|
return typeof window > "u" ? "" : `${window.innerWidth}x${window.innerHeight}`;
|
|
1438
1552
|
}
|
|
1439
|
-
function
|
|
1553
|
+
function No({
|
|
1440
1554
|
apiUrl: r,
|
|
1441
1555
|
apiKey: t,
|
|
1442
1556
|
reviewMode: o,
|
|
1443
|
-
setReviewMode:
|
|
1444
|
-
reviewers:
|
|
1557
|
+
setReviewMode: n,
|
|
1558
|
+
reviewers: i,
|
|
1445
1559
|
comments: s,
|
|
1446
|
-
loadComments:
|
|
1447
|
-
commentsLoadFailed:
|
|
1560
|
+
loadComments: u,
|
|
1561
|
+
commentsLoadFailed: v = !1
|
|
1448
1562
|
}) {
|
|
1449
|
-
const [
|
|
1450
|
-
|
|
1451
|
-
}, [
|
|
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(() => {
|
|
1452
1566
|
h.current && (h.current.style.outline = "", h.current.style.outlineOffset = "", h.current = null);
|
|
1453
1567
|
}, []);
|
|
1454
|
-
|
|
1455
|
-
o || (k(),
|
|
1456
|
-
}, [o, k,
|
|
1568
|
+
O(() => {
|
|
1569
|
+
o || (k(), D());
|
|
1570
|
+
}, [o, k, D]), O(() => {
|
|
1457
1571
|
if (typeof document > "u") return;
|
|
1458
|
-
const
|
|
1459
|
-
return
|
|
1460
|
-
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;
|
|
1461
1575
|
};
|
|
1462
|
-
}, [o,
|
|
1463
|
-
const
|
|
1464
|
-
var
|
|
1465
|
-
if (!
|
|
1466
|
-
const R = (
|
|
1467
|
-
return R === "BODY" || R === "HTML" ? !0 :
|
|
1468
|
-
}, []), z =
|
|
1469
|
-
(
|
|
1470
|
-
if (!o ||
|
|
1471
|
-
const R =
|
|
1472
|
-
!R ||
|
|
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");
|
|
1473
1587
|
},
|
|
1474
|
-
[o,
|
|
1475
|
-
),
|
|
1476
|
-
(
|
|
1477
|
-
var
|
|
1478
|
-
if (
|
|
1479
|
-
const R =
|
|
1480
|
-
|
|
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();
|
|
1481
1595
|
},
|
|
1482
|
-
[
|
|
1483
|
-
),
|
|
1484
|
-
(
|
|
1485
|
-
if (!o ||
|
|
1486
|
-
const R =
|
|
1487
|
-
if (!R ||
|
|
1488
|
-
|
|
1489
|
-
const
|
|
1490
|
-
h.current =
|
|
1491
|
-
const
|
|
1492
|
-
|
|
1493
|
-
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 },
|
|
1494
1608
|
payload: {
|
|
1495
|
-
selector:
|
|
1496
|
-
x: Math.round(
|
|
1497
|
-
y: Math.round(
|
|
1498
|
-
relativeX:
|
|
1499
|
-
relativeY:
|
|
1500
|
-
width: Math.round(
|
|
1501
|
-
height: Math.round(
|
|
1502
|
-
url: typeof window < "u"
|
|
1503
|
-
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(),
|
|
1504
1618
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
1505
1619
|
pageTitle: typeof document < "u" ? document.title : ""
|
|
1506
1620
|
}
|
|
1507
1621
|
});
|
|
1508
1622
|
},
|
|
1509
|
-
[o,
|
|
1623
|
+
[o, w, k, M]
|
|
1510
1624
|
);
|
|
1511
|
-
|
|
1625
|
+
O(() => {
|
|
1512
1626
|
if (o)
|
|
1513
|
-
return document.addEventListener("mouseover", z, !0), document.addEventListener("mouseout",
|
|
1514
|
-
document.removeEventListener("mouseover", z, !0), document.removeEventListener("mouseout",
|
|
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);
|
|
1515
1629
|
};
|
|
1516
|
-
}, [o, z,
|
|
1517
|
-
const [
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
(O) => O ? { ...O, position: { x: R.left + R.width / 2, y: R.bottom } } : null
|
|
1525
|
-
);
|
|
1526
|
-
}
|
|
1527
|
-
};
|
|
1528
|
-
return window.addEventListener("resize", m), window.addEventListener("scroll", m, !0), () => {
|
|
1529
|
-
window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
|
|
1530
|
-
};
|
|
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
|
+
}
|
|
1531
1638
|
}, []);
|
|
1532
|
-
|
|
1533
|
-
(
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
}, [
|
|
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 = {
|
|
1538
1655
|
position: "fixed",
|
|
1539
1656
|
inset: 0,
|
|
1540
1657
|
zIndex: 999999,
|
|
1541
1658
|
pointerEvents: "none",
|
|
1542
1659
|
cursor: o ? "crosshair" : void 0
|
|
1543
|
-
},
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
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(
|
|
1546
1663
|
"div",
|
|
1547
1664
|
{
|
|
1548
1665
|
"data-review-layer-root": !0,
|
|
@@ -1563,12 +1680,12 @@ function Lo({
|
|
|
1563
1680
|
pointerEvents: "auto"
|
|
1564
1681
|
},
|
|
1565
1682
|
children: [
|
|
1566
|
-
/* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */
|
|
1683
|
+
/* @__PURE__ */ d.jsx("span", { children: "Modo revisión (Shift+R para salir)" }),
|
|
1684
|
+
/* @__PURE__ */ d.jsx(
|
|
1568
1685
|
"button",
|
|
1569
1686
|
{
|
|
1570
1687
|
type: "button",
|
|
1571
|
-
onClick: () =>
|
|
1688
|
+
onClick: () => n(!1),
|
|
1572
1689
|
"aria-label": "Salir del modo revisión",
|
|
1573
1690
|
style: {
|
|
1574
1691
|
padding: 0,
|
|
@@ -1592,7 +1709,7 @@ function Lo({
|
|
|
1592
1709
|
]
|
|
1593
1710
|
}
|
|
1594
1711
|
),
|
|
1595
|
-
|
|
1712
|
+
v && /* @__PURE__ */ d.jsxs(
|
|
1596
1713
|
"div",
|
|
1597
1714
|
{
|
|
1598
1715
|
style: {
|
|
@@ -1614,12 +1731,12 @@ function Lo({
|
|
|
1614
1731
|
pointerEvents: "auto"
|
|
1615
1732
|
},
|
|
1616
1733
|
children: [
|
|
1617
|
-
/* @__PURE__ */
|
|
1618
|
-
/* @__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(
|
|
1619
1736
|
"button",
|
|
1620
1737
|
{
|
|
1621
1738
|
type: "button",
|
|
1622
|
-
onClick: () =>
|
|
1739
|
+
onClick: () => u(),
|
|
1623
1740
|
style: {
|
|
1624
1741
|
padding: "var(--ui-positive-Value_100, 4px) var(--ui-positive-Value_250, 10px)",
|
|
1625
1742
|
fontSize: "var(--ui-font-size-xs, 12px)",
|
|
@@ -1636,33 +1753,33 @@ function Lo({
|
|
|
1636
1753
|
]
|
|
1637
1754
|
}
|
|
1638
1755
|
),
|
|
1639
|
-
s.map((
|
|
1640
|
-
|
|
1756
|
+
s.map((y) => /* @__PURE__ */ d.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ d.jsx(
|
|
1757
|
+
Do,
|
|
1641
1758
|
{
|
|
1642
|
-
comment:
|
|
1643
|
-
offset:
|
|
1759
|
+
comment: y,
|
|
1760
|
+
offset: ae.get(y.id),
|
|
1644
1761
|
apiUrl: r,
|
|
1645
1762
|
apiKey: t,
|
|
1646
|
-
onStatusChange:
|
|
1763
|
+
onStatusChange: u,
|
|
1647
1764
|
reviewMode: o
|
|
1648
1765
|
}
|
|
1649
|
-
) },
|
|
1650
|
-
|
|
1651
|
-
|
|
1766
|
+
) }, y.id)),
|
|
1767
|
+
w && /* @__PURE__ */ d.jsx("div", { "data-review-layer-modal": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ d.jsx(
|
|
1768
|
+
co,
|
|
1652
1769
|
{
|
|
1653
1770
|
apiUrl: r,
|
|
1654
1771
|
apiKey: t,
|
|
1655
|
-
reviewers:
|
|
1656
|
-
position:
|
|
1657
|
-
payload:
|
|
1658
|
-
onClose:
|
|
1659
|
-
onSuccess:
|
|
1772
|
+
reviewers: i,
|
|
1773
|
+
position: w.position,
|
|
1774
|
+
payload: w.payload,
|
|
1775
|
+
onClose: se,
|
|
1776
|
+
onSuccess: u
|
|
1660
1777
|
}
|
|
1661
1778
|
) })
|
|
1662
|
-
] }),
|
|
1663
|
-
return
|
|
1779
|
+
] }), re = typeof document < "u" ? document.body : null;
|
|
1780
|
+
return re ? fr(ee, re) : null;
|
|
1664
1781
|
}
|
|
1665
|
-
const
|
|
1782
|
+
const $o = `/**
|
|
1666
1783
|
* Tokens de diseño UI para review-layer-react.
|
|
1667
1784
|
* Las variables se inyectan en :root al montar ReviewProvider.
|
|
1668
1785
|
* Puedes sobrescribirlas en tu app para adaptar el tema.
|
|
@@ -1988,20 +2105,20 @@ const zo = `/**
|
|
|
1988
2105
|
--ui-shadow-modal: 0 var(--ui-shadow-04-y) var(--ui-shadow-04-blur) var(--ui-shadow-04-Color);
|
|
1989
2106
|
}
|
|
1990
2107
|
`;
|
|
1991
|
-
function
|
|
1992
|
-
const
|
|
1993
|
-
r && o((
|
|
2108
|
+
function Mo(r, t, o) {
|
|
2109
|
+
const n = I(() => {
|
|
2110
|
+
r && o((i) => !i);
|
|
1994
2111
|
}, [r, o]);
|
|
1995
|
-
|
|
2112
|
+
O(() => {
|
|
1996
2113
|
if (!r) return;
|
|
1997
|
-
const
|
|
1998
|
-
(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());
|
|
1999
2116
|
};
|
|
2000
|
-
return window.addEventListener("keydown",
|
|
2001
|
-
}, [r,
|
|
2117
|
+
return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
|
|
2118
|
+
}, [r, n]);
|
|
2002
2119
|
}
|
|
2003
|
-
const
|
|
2004
|
-
function
|
|
2120
|
+
const Wo = "review_layer:v1:";
|
|
2121
|
+
function Bo(r, t) {
|
|
2005
2122
|
if (r == null) return t;
|
|
2006
2123
|
try {
|
|
2007
2124
|
return JSON.parse(r) ?? t;
|
|
@@ -2009,155 +2126,175 @@ function No(r, t) {
|
|
|
2009
2126
|
return t;
|
|
2010
2127
|
}
|
|
2011
2128
|
}
|
|
2012
|
-
function
|
|
2013
|
-
const
|
|
2014
|
-
return
|
|
2129
|
+
function ke(r, t, o, n) {
|
|
2130
|
+
const i = `${Wo}${Uo(r)}:${o}`;
|
|
2131
|
+
return n != null ? `${i}:${n}` : i;
|
|
2015
2132
|
}
|
|
2016
|
-
function
|
|
2133
|
+
function Uo(r) {
|
|
2017
2134
|
return r.replace(/\/+$/, "") || "/";
|
|
2018
2135
|
}
|
|
2019
|
-
function
|
|
2136
|
+
function br(r) {
|
|
2020
2137
|
if (typeof localStorage > "u") return null;
|
|
2021
2138
|
const t = localStorage.getItem(r);
|
|
2022
|
-
return
|
|
2139
|
+
return Bo(t, null);
|
|
2023
2140
|
}
|
|
2024
|
-
function
|
|
2141
|
+
function xr(r, t) {
|
|
2025
2142
|
if (!(typeof localStorage > "u"))
|
|
2026
2143
|
try {
|
|
2027
2144
|
localStorage.setItem(r, JSON.stringify({ data: t, at: Date.now() }));
|
|
2028
2145
|
} catch {
|
|
2029
2146
|
}
|
|
2030
2147
|
}
|
|
2031
|
-
function
|
|
2032
|
-
const
|
|
2033
|
-
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;
|
|
2034
2151
|
}
|
|
2035
|
-
function
|
|
2036
|
-
|
|
2152
|
+
function Yo(r, t, o, n) {
|
|
2153
|
+
xr(ke(r, t, "comments", o), n);
|
|
2037
2154
|
}
|
|
2038
|
-
function
|
|
2039
|
-
const o =
|
|
2155
|
+
function cr(r, t) {
|
|
2156
|
+
const o = br(ke(r, t, "reviewers"));
|
|
2040
2157
|
return (o == null ? void 0 : o.data) ?? null;
|
|
2041
2158
|
}
|
|
2042
|
-
function
|
|
2043
|
-
|
|
2159
|
+
function Ho(r, t, o) {
|
|
2160
|
+
xr(ke(r, t, "reviewers"), o);
|
|
2044
2161
|
}
|
|
2045
|
-
const
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
const gr = Mr(null);
|
|
2050
|
-
let ze = null;
|
|
2051
|
-
function Go() {
|
|
2052
|
-
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);
|
|
2053
2166
|
if (!r)
|
|
2054
2167
|
throw new Error("useReview must be used within ReviewProvider");
|
|
2055
2168
|
return r;
|
|
2056
2169
|
}
|
|
2057
|
-
|
|
2170
|
+
const B = "[review-layer]";
|
|
2171
|
+
function Zo({
|
|
2058
2172
|
children: r,
|
|
2059
2173
|
enabled: t = !0,
|
|
2060
2174
|
apiUrl: o,
|
|
2061
|
-
apiKey:
|
|
2175
|
+
apiKey: n
|
|
2062
2176
|
}) {
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2065
|
-
const k =
|
|
2066
|
-
async (
|
|
2067
|
-
if (!
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
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));
|
|
2077
2199
|
}
|
|
2200
|
+
}
|
|
2078
2201
|
},
|
|
2079
|
-
[t,
|
|
2080
|
-
),
|
|
2081
|
-
async (
|
|
2082
|
-
if (!t || !
|
|
2083
|
-
|
|
2084
|
-
|
|
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 });
|
|
2085
2215
|
try {
|
|
2086
|
-
|
|
2087
|
-
const
|
|
2088
|
-
|
|
2089
|
-
} catch (
|
|
2090
|
-
if (
|
|
2091
|
-
if (!(
|
|
2092
|
-
|
|
2093
|
-
const
|
|
2094
|
-
|
|
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.");
|
|
2095
2225
|
}
|
|
2096
2226
|
}
|
|
2097
2227
|
},
|
|
2098
|
-
[t,
|
|
2228
|
+
[t, i, n]
|
|
2099
2229
|
);
|
|
2100
|
-
|
|
2101
|
-
if (!t || !
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
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(() => {
|
|
2105
2242
|
if (typeof document > "u") return;
|
|
2106
|
-
const
|
|
2107
|
-
if (!document.getElementById(
|
|
2108
|
-
const
|
|
2109
|
-
|
|
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);
|
|
2110
2247
|
}
|
|
2111
|
-
}, []),
|
|
2112
|
-
if (!t || !
|
|
2113
|
-
const
|
|
2114
|
-
if (
|
|
2115
|
-
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(), () => {
|
|
2116
2253
|
setTimeout(() => {
|
|
2117
|
-
|
|
2254
|
+
Fe = null;
|
|
2118
2255
|
}, 0);
|
|
2119
2256
|
};
|
|
2120
|
-
}, [t,
|
|
2257
|
+
}, [t, i, n, k, D]), O(() => {
|
|
2121
2258
|
if (!t) return;
|
|
2122
|
-
const
|
|
2123
|
-
return window.addEventListener("popstate",
|
|
2124
|
-
}, [t,
|
|
2125
|
-
const
|
|
2259
|
+
const g = () => D();
|
|
2260
|
+
return window.addEventListener("popstate", g), () => window.removeEventListener("popstate", g);
|
|
2261
|
+
}, [t, D]);
|
|
2262
|
+
const M = We(
|
|
2126
2263
|
() => ({
|
|
2127
|
-
apiUrl:
|
|
2128
|
-
apiKey:
|
|
2264
|
+
apiUrl: i,
|
|
2265
|
+
apiKey: n,
|
|
2129
2266
|
reviewMode: s,
|
|
2130
|
-
setReviewMode:
|
|
2131
|
-
reviewers:
|
|
2132
|
-
comments:
|
|
2133
|
-
loadComments:
|
|
2134
|
-
commentsLoadFailed:
|
|
2267
|
+
setReviewMode: u,
|
|
2268
|
+
reviewers: v,
|
|
2269
|
+
comments: m,
|
|
2270
|
+
loadComments: D,
|
|
2271
|
+
commentsLoadFailed: w
|
|
2135
2272
|
}),
|
|
2136
|
-
[
|
|
2137
|
-
), z = t && typeof document < "u" ?
|
|
2138
|
-
/* @__PURE__ */
|
|
2139
|
-
|
|
2273
|
+
[i, n, s, u, v, m, D, w]
|
|
2274
|
+
), z = t && typeof document < "u" ? fr(
|
|
2275
|
+
/* @__PURE__ */ d.jsx(
|
|
2276
|
+
No,
|
|
2140
2277
|
{
|
|
2141
|
-
apiUrl:
|
|
2142
|
-
apiKey:
|
|
2278
|
+
apiUrl: i,
|
|
2279
|
+
apiKey: n,
|
|
2143
2280
|
reviewMode: s,
|
|
2144
|
-
setReviewMode:
|
|
2145
|
-
reviewers:
|
|
2146
|
-
comments:
|
|
2147
|
-
loadComments:
|
|
2148
|
-
commentsLoadFailed:
|
|
2281
|
+
setReviewMode: u,
|
|
2282
|
+
reviewers: v,
|
|
2283
|
+
comments: m,
|
|
2284
|
+
loadComments: D,
|
|
2285
|
+
commentsLoadFailed: w
|
|
2149
2286
|
}
|
|
2150
2287
|
),
|
|
2151
2288
|
document.body
|
|
2152
2289
|
) : null;
|
|
2153
|
-
return /* @__PURE__ */
|
|
2290
|
+
return /* @__PURE__ */ d.jsxs(yr.Provider, { value: M, children: [
|
|
2154
2291
|
r,
|
|
2155
2292
|
z
|
|
2156
2293
|
] });
|
|
2157
2294
|
}
|
|
2158
2295
|
export {
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2296
|
+
Go as DEFAULT_API_URL,
|
|
2297
|
+
Zo as ReviewProvider,
|
|
2298
|
+
Jo as useReview
|
|
2162
2299
|
};
|
|
2163
2300
|
//# sourceMappingURL=review-layer-react.js.map
|