@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 lr, { memo as Re, useState as F, useEffect as A, useCallback as j, useRef as me, useMemo as Ne, createContext as Mr, useContext as Wr } from "react";
2
- import { createPortal as sr } from "react-dom";
3
- var Ae = { exports: {} }, le = {};
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 rr;
14
- function Br() {
15
- if (rr) return le;
16
- rr = 1;
17
- var r = lr, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function p(g, d, w) {
19
- var h, y = {}, P = null, k = null;
20
- w !== void 0 && (P = "" + w), d.key !== void 0 && (P = "" + d.key), d.ref !== void 0 && (k = d.ref);
21
- for (h in d) i.call(d, h) && !s.hasOwnProperty(h) && (y[h] = d[h]);
22
- if (g && g.defaultProps) for (h in d = g.defaultProps, d) y[h] === void 0 && (y[h] = d[h]);
23
- return { $$typeof: t, type: g, key: P, ref: k, props: y, _owner: a.current };
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 le.Fragment = o, le.jsx = p, le.jsxs = p, le;
25
+ return fe.Fragment = o, fe.jsx = u, fe.jsxs = u, fe;
26
26
  }
27
- var se = {};
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 or;
38
- function Yr() {
39
- return or || (or = 1, process.env.NODE_ENV !== "production" && function() {
40
- var r = lr, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), g = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), V = Symbol.iterator, $ = "@@iterator";
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 n = V && e[V] || e[$];
45
- return typeof n == "function" ? n : null;
44
+ var a = D && e[D] || e[M];
45
+ return typeof a == "function" ? a : null;
46
46
  }
47
- var c = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
- function f(e) {
47
+ var g = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
+ function c(e) {
49
49
  {
50
- for (var n = arguments.length, u = new Array(n > 1 ? n - 1 : 0), v = 1; v < n; v++)
51
- u[v - 1] = arguments[v];
52
- I("error", e, u);
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 I(e, n, u) {
55
+ function x(e, a, l) {
56
56
  {
57
- var v = c.ReactDebugCurrentFrame, E = v.getStackAddendum();
58
- E !== "" && (n += "%s", u = u.concat([E]));
59
- var S = u.map(function(x) {
60
- return String(x);
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
- S.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, S);
62
+ C.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, C);
63
63
  }
64
64
  }
65
- var N = !1, H = !1, re = !1, oe = !1, te = !1, X;
66
- X = Symbol.for("react.module.reference");
67
- function m(e) {
68
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === s || te || e === a || e === w || e === h || oe || e === k || N || H || re || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === y || e.$$typeof === p || e.$$typeof === g || e.$$typeof === d || // This needs to include all possible module reference object
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 === X || e.getModuleId !== void 0));
72
+ e.$$typeof === ee || e.getModuleId !== void 0));
73
73
  }
74
- function R(e, n, u) {
75
- var v = e.displayName;
76
- if (v)
77
- return v;
78
- var E = n.displayName || n.name || "";
79
- return E !== "" ? u + "(" + E + ")" : u;
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 O(e) {
81
+ function R(e) {
82
82
  return e.displayName || "Context";
83
83
  }
84
- function T(e) {
84
+ function P(e) {
85
85
  if (e == null)
86
86
  return null;
87
- if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
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 i:
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 a:
98
+ case i:
99
99
  return "StrictMode";
100
- case w:
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 g:
108
- var n = e;
109
- return O(n) + ".Consumer";
110
- case p:
111
- var u = e;
112
- return O(u._context) + ".Provider";
113
- case d:
114
- return R(e, e.render, "ForwardRef");
115
- case y:
116
- var v = e.displayName || null;
117
- return v !== null ? v : T(e.type) || "Memo";
118
- case P: {
119
- var E = e, S = E._payload, x = E._init;
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 T(x(S));
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 G = Object.assign, Y = 0, J, de, fe, ne, ie, _, q;
130
- function ae() {
129
+ var V = Object.assign, H = 0, Z, oe, he, ue, ce, _, J;
130
+ function Q() {
131
131
  }
132
- ae.__reactDisabledLog = !0;
133
- function ve() {
132
+ Q.__reactDisabledLog = !0;
133
+ function q() {
134
134
  {
135
- if (Y === 0) {
136
- J = console.log, de = console.info, fe = console.warn, ne = console.error, ie = console.group, _ = console.groupCollapsed, q = console.groupEnd;
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: ae,
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
- Y++;
153
+ H++;
154
154
  }
155
155
  }
156
- function pe() {
156
+ function be() {
157
157
  {
158
- if (Y--, Y === 0) {
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: G({}, e, {
166
- value: J
165
+ log: V({}, e, {
166
+ value: Z
167
167
  }),
168
- info: G({}, e, {
169
- value: de
168
+ info: V({}, e, {
169
+ value: oe
170
170
  }),
171
- warn: G({}, e, {
172
- value: fe
171
+ warn: V({}, e, {
172
+ value: he
173
173
  }),
174
- error: G({}, e, {
175
- value: ne
174
+ error: V({}, e, {
175
+ value: ue
176
176
  }),
177
- group: G({}, e, {
178
- value: ie
177
+ group: V({}, e, {
178
+ value: ce
179
179
  }),
180
- groupCollapsed: G({}, e, {
180
+ groupCollapsed: V({}, e, {
181
181
  value: _
182
182
  }),
183
- groupEnd: G({}, e, {
184
- value: q
183
+ groupEnd: V({}, e, {
184
+ value: J
185
185
  })
186
186
  });
187
187
  }
188
- Y < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ H < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
189
  }
190
190
  }
191
- var ke = c.ReactCurrentDispatcher, Ce;
192
- function ge(e, n, u) {
191
+ var Pe = g.ReactCurrentDispatcher, Te;
192
+ function xe(e, a, l) {
193
193
  {
194
- if (Ce === void 0)
194
+ if (Te === void 0)
195
195
  try {
196
196
  throw Error();
197
- } catch (E) {
198
- var v = E.stack.trim().match(/\n( *(at )?)/);
199
- Ce = v && v[1] || "";
197
+ } catch (S) {
198
+ var p = S.stack.trim().match(/\n( *(at )?)/);
199
+ Te = p && p[1] || "";
200
200
  }
201
201
  return `
202
- ` + Ce + e;
202
+ ` + Te + e;
203
203
  }
204
204
  }
205
- var Pe = !1, be;
205
+ var je = !1, ye;
206
206
  {
207
- var br = typeof WeakMap == "function" ? WeakMap : Map;
208
- be = new br();
207
+ var mr = typeof WeakMap == "function" ? WeakMap : Map;
208
+ ye = new mr();
209
209
  }
210
- function $e(e, n) {
211
- if (!e || Pe)
210
+ function Be(e, a) {
211
+ if (!e || je)
212
212
  return "";
213
213
  {
214
- var u = be.get(e);
215
- if (u !== void 0)
216
- return u;
214
+ var l = ye.get(e);
215
+ if (l !== void 0)
216
+ return l;
217
217
  }
218
- var v;
219
- Pe = !0;
220
- var E = Error.prepareStackTrace;
218
+ var p;
219
+ je = !0;
220
+ var S = Error.prepareStackTrace;
221
221
  Error.prepareStackTrace = void 0;
222
- var S;
223
- S = ke.current, ke.current = null, ve();
222
+ var C;
223
+ C = Pe.current, Pe.current = null, q();
224
224
  try {
225
- if (n) {
226
- var x = function() {
225
+ if (a) {
226
+ var E = function() {
227
227
  throw Error();
228
228
  };
229
- if (Object.defineProperty(x.prototype, "props", {
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(x, []);
236
- } catch (W) {
237
- v = W;
235
+ Reflect.construct(E, []);
236
+ } catch (U) {
237
+ p = U;
238
238
  }
239
- Reflect.construct(e, [], x);
239
+ Reflect.construct(e, [], E);
240
240
  } else {
241
241
  try {
242
- x.call();
243
- } catch (W) {
244
- v = W;
242
+ E.call();
243
+ } catch (U) {
244
+ p = U;
245
245
  }
246
- e.call(x.prototype);
246
+ e.call(E.prototype);
247
247
  }
248
248
  } else {
249
249
  try {
250
250
  throw Error();
251
- } catch (W) {
252
- v = W;
251
+ } catch (U) {
252
+ p = U;
253
253
  }
254
254
  e();
255
255
  }
256
- } catch (W) {
257
- if (W && v && typeof W.stack == "string") {
258
- for (var b = W.stack.split(`
259
- `), M = v.stack.split(`
260
- `), D = b.length - 1, L = M.length - 1; D >= 1 && L >= 0 && b[D] !== M[L]; )
261
- L--;
262
- for (; D >= 1 && L >= 0; D--, L--)
263
- if (b[D] !== M[L]) {
264
- if (D !== 1 || L !== 1)
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 (D--, L--, L < 0 || b[D] !== M[L]) {
267
- var U = `
268
- ` + b[D].replace(" at new ", " at ");
269
- return e.displayName && U.includes("<anonymous>") && (U = U.replace("<anonymous>", e.displayName)), typeof e == "function" && be.set(e, U), U;
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 (D >= 1 && L >= 0);
271
+ while (L >= 1 && F >= 0);
272
272
  break;
273
273
  }
274
274
  }
275
275
  } finally {
276
- Pe = !1, ke.current = S, pe(), Error.prepareStackTrace = E;
276
+ je = !1, Pe.current = C, be(), Error.prepareStackTrace = S;
277
277
  }
278
- var K = e ? e.displayName || e.name : "", Z = K ? ge(K) : "";
279
- return typeof e == "function" && be.set(e, Z), Z;
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 hr(e, n, u) {
282
- return $e(e, !1);
281
+ function wr(e, a, l) {
282
+ return Be(e, !1);
283
283
  }
284
- function xr(e) {
285
- var n = e.prototype;
286
- return !!(n && n.isReactComponent);
284
+ function _r(e) {
285
+ var a = e.prototype;
286
+ return !!(a && a.isReactComponent);
287
287
  }
288
- function he(e, n, u) {
288
+ function me(e, a, l) {
289
289
  if (e == null)
290
290
  return "";
291
291
  if (typeof e == "function")
292
- return $e(e, xr(e));
292
+ return Be(e, _r(e));
293
293
  if (typeof e == "string")
294
- return ge(e);
294
+ return xe(e);
295
295
  switch (e) {
296
- case w:
297
- return ge("Suspense");
296
+ case m:
297
+ return xe("Suspense");
298
298
  case h:
299
- return ge("SuspenseList");
299
+ return xe("SuspenseList");
300
300
  }
301
301
  if (typeof e == "object")
302
302
  switch (e.$$typeof) {
303
- case d:
304
- return hr(e.render);
305
- case y:
306
- return he(e.type, n, u);
307
- case P: {
308
- var v = e, E = v._payload, S = v._init;
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 he(S(E), n, u);
310
+ return me(C(S), a, l);
311
311
  } catch {
312
312
  }
313
313
  }
314
314
  }
315
315
  return "";
316
316
  }
317
- var ue = Object.prototype.hasOwnProperty, Me = {}, We = c.ReactDebugCurrentFrame;
318
- function xe(e) {
317
+ var de = Object.prototype.hasOwnProperty, Ue = {}, Ye = g.ReactDebugCurrentFrame;
318
+ function we(e) {
319
319
  if (e) {
320
- var n = e._owner, u = he(e.type, e._source, n ? n.type : null);
321
- We.setExtraStackFrame(u);
320
+ var a = e._owner, l = me(e.type, e._source, a ? a.type : null);
321
+ Ye.setExtraStackFrame(l);
322
322
  } else
323
- We.setExtraStackFrame(null);
323
+ Ye.setExtraStackFrame(null);
324
324
  }
325
- function yr(e, n, u, v, E) {
325
+ function Er(e, a, l, p, S) {
326
326
  {
327
- var S = Function.call.bind(ue);
328
- for (var x in e)
329
- if (S(e, x)) {
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[x] != "function") {
333
- var M = Error((v || "React class") + ": " + u + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
- throw M.name = "Invariant Violation", M;
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[x](n, x, v, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
- } catch (D) {
338
- b = D;
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) && (xe(E), f("%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).", v || "React class", u, x, typeof b), xe(null)), b instanceof Error && !(b.message in Me) && (Me[b.message] = !0, xe(E), f("Failed %s type: %s", u, b.message), xe(null));
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 mr = Array.isArray;
345
- function je(e) {
346
- return mr(e);
344
+ var Rr = Array.isArray;
345
+ function Ve(e) {
346
+ return Rr(e);
347
347
  }
348
- function wr(e) {
348
+ function Sr(e) {
349
349
  {
350
- var n = typeof Symbol == "function" && Symbol.toStringTag, u = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
351
- return u;
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 _r(e) {
354
+ function Cr(e) {
355
355
  try {
356
- return Be(e), !1;
356
+ return He(e), !1;
357
357
  } catch {
358
358
  return !0;
359
359
  }
360
360
  }
361
- function Be(e) {
361
+ function He(e) {
362
362
  return "" + e;
363
363
  }
364
- function Ye(e) {
365
- if (_r(e))
366
- return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wr(e)), Be(e);
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 Ue = c.ReactCurrentOwner, Er = {
368
+ var Xe = g.ReactCurrentOwner, kr = {
369
369
  key: !0,
370
370
  ref: !0,
371
371
  __self: !0,
372
372
  __source: !0
373
- }, Ge, He;
374
- function Rr(e) {
375
- if (ue.call(e, "ref")) {
376
- var n = Object.getOwnPropertyDescriptor(e, "ref").get;
377
- if (n && n.isReactWarning)
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 Sr(e) {
383
- if (ue.call(e, "key")) {
384
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
385
- if (n && n.isReactWarning)
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 kr(e, n) {
391
- typeof e.ref == "string" && Ue.current;
390
+ function jr(e, a) {
391
+ typeof e.ref == "string" && Xe.current;
392
392
  }
393
- function Cr(e, n) {
393
+ function Vr(e, a) {
394
394
  {
395
- var u = function() {
396
- Ge || (Ge = !0, f("%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)", n));
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
- u.isReactWarning = !0, Object.defineProperty(e, "key", {
399
- get: u,
398
+ l.isReactWarning = !0, Object.defineProperty(e, "key", {
399
+ get: l,
400
400
  configurable: !0
401
401
  });
402
402
  }
403
403
  }
404
- function Pr(e, n) {
404
+ function Ir(e, a) {
405
405
  {
406
- var u = function() {
407
- He || (He = !0, f("%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)", n));
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
- u.isReactWarning = !0, Object.defineProperty(e, "ref", {
410
- get: u,
409
+ l.isReactWarning = !0, Object.defineProperty(e, "ref", {
410
+ get: l,
411
411
  configurable: !0
412
412
  });
413
413
  }
414
414
  }
415
- var jr = function(e, n, u, v, E, S, x) {
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: n,
422
- ref: u,
423
- props: x,
421
+ key: a,
422
+ ref: l,
423
+ props: E,
424
424
  // Record the component responsible for creating this element.
425
- _owner: S
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: v
436
+ value: p
437
437
  }), Object.defineProperty(b, "_source", {
438
438
  configurable: !1,
439
439
  enumerable: !1,
440
440
  writable: !1,
441
- value: E
441
+ value: S
442
442
  }), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
443
443
  };
444
- function Vr(e, n, u, v, E) {
444
+ function Dr(e, a, l, p, S) {
445
445
  {
446
- var S, x = {}, b = null, M = null;
447
- u !== void 0 && (Ye(u), b = "" + u), Sr(n) && (Ye(n.key), b = "" + n.key), Rr(n) && (M = n.ref, kr(n, E));
448
- for (S in n)
449
- ue.call(n, S) && !Er.hasOwnProperty(S) && (x[S] = n[S]);
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 D = e.defaultProps;
452
- for (S in D)
453
- x[S] === void 0 && (x[S] = D[S]);
451
+ var L = e.defaultProps;
452
+ for (C in L)
453
+ E[C] === void 0 && (E[C] = L[C]);
454
454
  }
455
- if (b || M) {
456
- var L = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
- b && Cr(x, L), M && Pr(x, L);
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 jr(e, b, M, E, v, Ue.current, x);
459
+ return Or(e, b, W, S, p, Xe.current, E);
460
460
  }
461
461
  }
462
- var Ve = c.ReactCurrentOwner, Xe = c.ReactDebugCurrentFrame;
463
- function Q(e) {
462
+ var Ie = g.ReactCurrentOwner, Ze = g.ReactDebugCurrentFrame;
463
+ function te(e) {
464
464
  if (e) {
465
- var n = e._owner, u = he(e.type, e._source, n ? n.type : null);
466
- Xe.setExtraStackFrame(u);
465
+ var a = e._owner, l = me(e.type, e._source, a ? a.type : null);
466
+ Ze.setExtraStackFrame(l);
467
467
  } else
468
- Xe.setExtraStackFrame(null);
468
+ Ze.setExtraStackFrame(null);
469
469
  }
470
- var Te;
471
- Te = !1;
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 Je() {
475
+ function Qe() {
476
476
  {
477
- if (Ve.current) {
478
- var e = T(Ve.current.type);
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 Tr(e) {
487
+ function Lr(e) {
488
488
  return "";
489
489
  }
490
- var qe = {};
491
- function Dr(e) {
490
+ var Ke = {};
491
+ function zr(e) {
492
492
  {
493
- var n = Je();
494
- if (!n) {
495
- var u = typeof e == "string" ? e : e.displayName || e.name;
496
- u && (n = `
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 <` + u + ">.");
498
+ Check the top-level render call using <` + l + ">.");
499
499
  }
500
- return n;
500
+ return a;
501
501
  }
502
502
  }
503
- function Ze(e, n) {
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 u = Dr(n);
509
- if (qe[u])
508
+ var l = zr(a);
509
+ if (Ke[l])
510
510
  return;
511
- qe[u] = !0;
512
- var v = "";
513
- e && e._owner && e._owner !== Ve.current && (v = " It was passed a child from " + T(e._owner.type) + "."), Q(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, v), Q(null);
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 Qe(e, n) {
516
+ function rr(e, a) {
517
517
  {
518
518
  if (typeof e != "object")
519
519
  return;
520
- if (je(e))
521
- for (var u = 0; u < e.length; u++) {
522
- var v = e[u];
523
- De(v) && Ze(v, n);
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 E = z(e);
529
- if (typeof E == "function" && E !== e.entries)
530
- for (var S = E.call(e), x; !(x = S.next()).done; )
531
- De(x.value) && Ze(x.value, n);
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 Ir(e) {
535
+ function Ar(e) {
536
536
  {
537
- var n = e.type;
538
- if (n == null || typeof n == "string")
537
+ var a = e.type;
538
+ if (a == null || typeof a == "string")
539
539
  return;
540
- var u;
541
- if (typeof n == "function")
542
- u = n.propTypes;
543
- else if (typeof n == "object" && (n.$$typeof === d || // Note: Memo only checks outer props here.
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
- n.$$typeof === y))
546
- u = n.propTypes;
545
+ a.$$typeof === w))
546
+ l = a.propTypes;
547
547
  else
548
548
  return;
549
- if (u) {
550
- var v = T(n);
551
- yr(u, e.props, "prop", v, e);
552
- } else if (n.PropTypes !== void 0 && !Te) {
553
- Te = !0;
554
- var E = T(n);
555
- f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
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 n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
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 Or(e) {
560
+ function Fr(e) {
561
561
  {
562
- for (var n = Object.keys(e.props), u = 0; u < n.length; u++) {
563
- var v = n[u];
564
- if (v !== "children" && v !== "key") {
565
- Q(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), Q(null);
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 && (Q(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
569
+ e.ref !== null && (te(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), te(null));
570
570
  }
571
571
  }
572
- var Ke = {};
573
- function er(e, n, u, v, E, S) {
572
+ var or = {};
573
+ function tr(e, a, l, p, S, C) {
574
574
  {
575
- var x = m(e);
576
- if (!x) {
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 M = Tr();
580
- M ? b += M : b += Je();
581
- var D;
582
- e === null ? D = "null" : je(e) ? D = "array" : e !== void 0 && e.$$typeof === t ? (D = "<" + (T(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, b);
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 L = Vr(e, n, u, E, S);
585
- if (L == null)
586
- return L;
587
- if (x) {
588
- var U = n.children;
589
- if (U !== void 0)
590
- if (v)
591
- if (je(U)) {
592
- for (var K = 0; K < U.length; K++)
593
- Qe(U[K], e);
594
- Object.freeze && Object.freeze(U);
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
- f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
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
- Qe(U, e);
598
+ rr(G, e);
599
599
  }
600
- if (ue.call(n, "key")) {
601
- var Z = T(e), W = Object.keys(n).filter(function($r) {
602
- return $r !== "key";
603
- }), Ie = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
604
- if (!Ke[Z + Ie]) {
605
- var Nr = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
606
- f(`A props object containing a "key" prop is being spread into JSX:
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} />`, Ie, Z, Nr, Z), Ke[Z + Ie] = !0;
611
+ <%s key={someKey} {...props} />`, Le, K, Br, K), or[K + Le] = !0;
612
612
  }
613
613
  }
614
- return e === i ? Or(L) : Ir(L), L;
614
+ return e === n ? Fr(F) : Ar(F), F;
615
615
  }
616
616
  }
617
- function Lr(e, n, u) {
618
- return er(e, n, u, !0);
617
+ function Nr(e, a, l) {
618
+ return tr(e, a, l, !0);
619
619
  }
620
- function zr(e, n, u) {
621
- return er(e, n, u, !1);
620
+ function $r(e, a, l) {
621
+ return tr(e, a, l, !1);
622
622
  }
623
- var Ar = zr, Fr = Lr;
624
- se.Fragment = i, se.jsx = Ar, se.jsxs = Fr;
625
- }()), se;
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" ? Ae.exports = Br() : Ae.exports = Yr();
628
- var l = Ae.exports;
629
- function Ur(r) {
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 i = o.nodeName.toLowerCase();
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 a = o.className.trim().split(/\s+/).filter(Boolean);
642
- if (a.length > 0) {
643
- const s = a.filter((p) => /^[a-zA-Z][\w-]*$/.test(p)).slice(0, 2).map((p) => `.${p}`).join("");
644
- s && (i += 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 a = o.parentElement;
649
- if (a) {
650
- const s = Array.from(a.children).filter(
651
- (p) => p.nodeName === o.nodeName
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 p = s.indexOf(o) + 1;
655
- i += `:nth-child(${p})`;
654
+ const u = s.indexOf(o) + 1;
655
+ n += `:nth-child(${u})`;
656
656
  }
657
657
  }
658
658
  }
659
- t.unshift(i), o = o.parentElement;
659
+ t.unshift(n), o = o.parentElement;
660
660
  }
661
661
  return t.join(" > ");
662
662
  }
663
- const Gr = "[data-review-layer-root]", Hr = 16;
664
- function Fe(r, t, o = Hr) {
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 i = o, a = o, s = window.innerWidth - o, p = window.innerHeight - o;
666
+ const n = o, i = o, s = window.innerWidth - o, u = window.innerHeight - o;
667
667
  return {
668
- x: Math.max(i, Math.min(s, r)),
669
- y: Math.max(a, Math.min(p, t))
668
+ x: Math.max(n, Math.min(s, r)),
669
+ y: Math.max(i, Math.min(u, t))
670
670
  };
671
671
  }
672
- function cr(r) {
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, Gr) ? null : o.getBoundingClientRect();
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 Xr(r) {
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 dr(r) {
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 Jr(r) {
707
- const { x: t, y: o } = dr(r), i = r.width ?? 100, a = r.height ?? 40;
708
- return new DOMRect(t, o, i, a);
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 we(r) {
720
+ function Ee(r) {
711
721
  if (r.selector) {
712
- const t = cr(r.selector);
722
+ const t = pr(r.selector);
713
723
  if (t != null)
714
724
  return { x: t.left, y: t.top };
715
725
  }
716
- return dr(r);
726
+ return gr(r);
717
727
  }
718
- const C = {
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 ce(r) {
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 qr(r, t, o) {
730
- const i = await fetch(`${r}/reviewers`, {
731
- headers: ce(t),
732
- signal: o == null ? void 0 : o.signal
733
- });
734
- if (!i.ok) throw new Error("Failed to fetch reviewers");
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 Zr(r, t, o) {
738
- const i = await fetch(`${r}/comments`, {
739
- method: "POST",
740
- headers: ce(t),
741
- body: JSON.stringify(o)
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 s = await i.json().catch(() => ({}));
745
- throw new Error(s.message || "Failed to create comment");
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 Qr(r, t, o, i) {
750
- const a = new URLSearchParams({ url: o }), s = await fetch(`${r}/comments?${a}`, {
751
- headers: ce(t),
752
- signal: i == null ? void 0 : i.signal
753
- });
754
- if (!s.ok) throw new Error("Failed to fetch comments");
755
- return (await s.json()).data ?? [];
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 Kr(r, t, o, i) {
758
- const a = await fetch(`${r}/comments/${o}/status`, {
759
- method: "PATCH",
760
- headers: ce(t),
761
- body: JSON.stringify({ status: i })
762
- });
763
- if (!a.ok) {
764
- const p = await a.json().catch(() => ({}));
765
- throw new Error(p.message || "Failed to update comment status");
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
- return (await a.json()).data;
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 eo(r, t, o) {
770
- const i = await fetch(`${r}/comments/${o}`, {
771
- method: "DELETE",
772
- headers: ce(t)
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 a = await i.json().catch(() => ({}));
776
- throw new Error(a.message || "Failed to delete comment");
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 ro = {
868
+ const io = {
780
869
  position: "fixed",
781
870
  inset: 0,
782
871
  zIndex: 999997,
783
872
  backgroundColor: "transparent"
784
- }, oo = {
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
- }, to = {
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
- }, no = {
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
- }, tr = {
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 io({
911
+ function uo({
823
912
  apiUrl: r,
824
913
  apiKey: t,
825
914
  reviewers: o,
826
- position: i,
827
- payload: a,
915
+ position: n,
916
+ payload: i,
828
917
  onClose: s,
829
- onSuccess: p
918
+ onSuccess: u
830
919
  }) {
831
- var z;
832
- const [g, d] = F(""), [w, h] = F(
833
- ((z = o[0]) == null ? void 0 : z.id) ?? 0
834
- ), [y, P] = F(!1), [k, V] = F(null);
835
- A(() => {
836
- o.length > 0 && !w && h(o[0].id);
837
- }, [o, w]);
838
- const $ = j(
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(), !(!g.trim() || !w)) {
841
- P(!0), V(null);
929
+ if (c.preventDefault(), !(!v.trim() || !m)) {
930
+ j(!0), D(null);
842
931
  try {
843
- await Zr(r, t, {
844
- ...a,
845
- message: g.trim(),
846
- reviewerId: w
847
- }), p(), s();
848
- } catch (f) {
849
- V(f instanceof Error ? f.message : "Failed to send comment");
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
- P(!1);
940
+ j(!1);
852
941
  }
853
942
  }
854
943
  },
855
- [r, t, a, g, w, p, s]
856
- );
857
- return A(() => {
858
- const c = (f) => {
859
- f.key === "Escape" && (f.preventDefault(), s());
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]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
863
- /* @__PURE__ */ l.jsx(
864
- "div",
865
- {
866
- role: "presentation",
867
- style: ro,
868
- onClick: s
869
- }
870
- ),
871
- /* @__PURE__ */ l.jsx(
872
- "div",
873
- {
874
- style: {
875
- ...oo,
876
- left: Math.min(i.x, typeof window < "u" ? window.innerWidth - 420 : i.x),
877
- top: i.y + 12
878
- },
879
- onClick: (c) => c.stopPropagation(),
880
- children: /* @__PURE__ */ l.jsxs("form", { onSubmit: $, children: [
881
- /* @__PURE__ */ l.jsx(
882
- "textarea",
883
- {
884
- placeholder: "Escribe tu comentario...",
885
- value: g,
886
- onChange: (c) => d(c.target.value),
887
- style: to,
888
- required: !0,
889
- autoFocus: !0
890
- }
891
- ),
892
- /* @__PURE__ */ l.jsxs(
893
- "select",
894
- {
895
- value: w,
896
- onChange: (c) => h(Number(c.target.value)),
897
- style: no,
898
- required: !0,
899
- disabled: o.length === 0,
900
- children: [
901
- /* @__PURE__ */ l.jsx("option", { value: "", children: o.length === 0 ? "No hay revisores (ejecuta php artisan db:seed en la API)" : "Selecciona revisor" }),
902
- o.map((c) => /* @__PURE__ */ l.jsx("option", { value: c.id, children: c.name }, c.id))
903
- ]
904
- }
905
- ),
906
- k && /* @__PURE__ */ l.jsx(
907
- "div",
908
- {
909
- style: {
910
- color: "var(--ui-color-text-danger-default, #ff4d4f)",
911
- fontSize: "var(--ui-font-size-xs, 12px)",
912
- marginBottom: "var(--ui-positive-Value_200, 8px)"
913
- },
914
- children: k
915
- }
916
- ),
917
- /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: "var(--ui-positive-Value_200, 8px)" }, children: [
918
- /* @__PURE__ */ l.jsx(
919
- "button",
920
- {
921
- type: "button",
922
- onClick: s,
923
- style: {
924
- ...tr,
925
- backgroundColor: "var(--ui-color-bg-fill-secondary-default, #f0f0f0)",
926
- color: "var(--ui-color-text-primary, #333)"
927
- },
928
- children: "Cancelar"
929
- }
930
- ),
931
- /* @__PURE__ */ l.jsx(
932
- "button",
933
- {
934
- type: "submit",
935
- style: tr,
936
- disabled: y || o.length === 0,
937
- children: y ? "Enviando..." : "Enviar comentario"
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 ao = Re(io), uo = "var(--ui-color-red-500, #ef4444)";
947
- function lo(r) {
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 so = Re(function({
1065
+ const po = Ce(function({
958
1066
  selector: t,
959
1067
  active: o,
960
- fallbackComment: i,
961
- outlineColor: a = uo
1068
+ fallbackComment: n,
1069
+ outlineColor: i = fo
962
1070
  }) {
963
- const [s, p] = F(null), g = j(() => {
1071
+ const [s, u] = N(null), v = I(() => {
964
1072
  if (!o) {
965
- p(null);
1073
+ u(null);
966
1074
  return;
967
1075
  }
968
- const d = t != null && t.trim() ? cr(t) : null;
969
- if (d) {
970
- p(d);
1076
+ const f = t != null && t.trim() ? pr(t) : null;
1077
+ if (f) {
1078
+ u(f);
971
1079
  return;
972
1080
  }
973
- if (i) {
974
- p(Jr(i));
1081
+ if (n) {
1082
+ u(Kr(n));
975
1083
  return;
976
1084
  }
977
- p(null);
978
- }, [t, o, i]);
979
- return A(() => {
980
- g();
981
- }, [g]), A(() => {
1085
+ u(null);
1086
+ }, [t, o, n]);
1087
+ return O(() => {
1088
+ v();
1089
+ }, [v]), O(() => {
982
1090
  if (o)
983
- return window.addEventListener("scroll", g, !0), window.addEventListener("resize", g), () => {
984
- window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g);
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, g]), !o || s == null ? null : /* @__PURE__ */ l.jsx(
1094
+ }, [o, v]), !o || s == null ? null : /* @__PURE__ */ d.jsx(
987
1095
  "div",
988
1096
  {
989
1097
  "aria-hidden": !0,
990
1098
  style: {
991
- ...lo(a),
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
- }), _e = 32, nr = 150, Oe = 250, B = {
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
- }, co = {
1007
- [C.PENDING]: "Pendiente",
1008
- [C.DEV_FIXED]: "Corregido",
1009
- [C.VALIDATED]: "Validado"
1010
- }, fo = {
1011
- [C.PENDING]: "PENDIENTE",
1012
- [C.DEV_FIXED]: "CORREGIDO",
1013
- [C.VALIDATED]: "VALIDADO"
1014
- }, ee = {
1015
- [C.PENDING]: "var(--ui-color-red-500, rgb(240, 69, 69))",
1016
- [C.DEV_FIXED]: "var(--ui-color-yellow-500, rgb(235, 179, 8))",
1017
- [C.VALIDATED]: "var(--ui-color-green-500, rgb(33, 196, 94))"
1018
- }, ir = {
1019
- [C.PENDING]: "var(--ui-color-bg-surface-danger-default, #fef2f2)",
1020
- [C.DEV_FIXED]: "var(--ui-color-bg-surface-warning-default, #fffbeb)",
1021
- [C.VALIDATED]: "var(--ui-color-bg-surface-success-default, #f0fdf4)"
1022
- }, Ee = {
1023
- [C.PENDING]: "var(--ui-color-red-500, #ef4444)",
1024
- [C.DEV_FIXED]: "var(--ui-color-orange-500, #f59e0b)",
1025
- [C.VALIDATED]: "var(--ui-color-green-500, #22c55e)"
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 vo(r) {
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 po = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", style: { marginRight: 4, flexShrink: 0 }, children: /* @__PURE__ */ l.jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), go = ({ color: r }) => /* @__PURE__ */ l.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", style: { flexShrink: 0 }, children: [
1032
- /* @__PURE__ */ l.jsx(
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__ */ l.jsx(
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
- ] }), bo = (r) => ({
1160
+ ] }), mo = (r) => ({
1053
1161
  position: "fixed",
1054
- width: _e,
1055
- height: _e,
1162
+ width: Re,
1163
+ height: Re,
1056
1164
  borderRadius: "50%",
1057
- backgroundColor: ee[r] ?? ee[C.PENDING],
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
- }), ho = {
1175
+ }), wo = {
1068
1176
  position: "fixed",
1069
- width: Oe,
1070
- minWidth: Oe,
1071
- maxWidth: Oe,
1177
+ width: ze,
1178
+ minWidth: ze,
1179
+ maxWidth: ze,
1072
1180
  boxSizing: "border-box",
1073
- backgroundColor: B.cardBg,
1181
+ backgroundColor: Y.cardBg,
1074
1182
  borderRadius: "var(--ui-radius_12, 12px)",
1075
- boxShadow: B.shadow,
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
- }, xo = {
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 ${B.border}`,
1193
+ borderBottom: `1px solid ${Y.border}`,
1086
1194
  padding: "var(--ui-positive-Value_300, 12px)"
1087
- }, yo = (r) => ({
1195
+ }, Eo = (r) => ({
1088
1196
  width: 40,
1089
1197
  height: 40,
1090
1198
  borderRadius: "50%",
1091
- backgroundColor: ee[r] ?? ee[C.PENDING],
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
- }), mo = Re(function({
1209
+ }), Ro = Ce(function({
1102
1210
  reviewer: t,
1103
1211
  status: o
1104
1212
  }) {
1105
- const i = t == null ? void 0 : t.image_url, a = (t == null ? void 0 : t.name) ?? "Revisor", s = yo(o);
1106
- if (i && i.trim()) {
1107
- const p = ee[o] ?? ee[C.PENDING];
1108
- return /* @__PURE__ */ l.jsx("div", { style: { ...s, border: `2px solid ${p}` }, children: /* @__PURE__ */ l.jsx(
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: i,
1112
- alt: a,
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__ */ l.jsx("div", { style: s, children: vo(a) });
1123
- }), wo = {
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: B.textDark,
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
- }, _o = (r) => {
1139
- const t = Ee[r] ?? Ee[C.PENDING];
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: ir[r] ?? ir[C.PENDING],
1258
+ backgroundColor: ur[r] ?? ur[T.PENDING],
1151
1259
  color: t,
1152
1260
  border: `1px solid ${t}`
1153
1261
  };
1154
- }, Eo = {
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: B.textMuted,
1267
+ color: Y.textMuted,
1160
1268
  textTransform: "uppercase",
1161
1269
  letterSpacing: "0.04em"
1162
- }, Ro = {
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 ${B.border}`,
1170
- backgroundColor: B.cardBg,
1171
- color: B.textDark,
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
- }, So = {
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 ${B.border}`,
1184
- backgroundColor: B.cardFooterBg
1185
- }, fr = {
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
- }, ko = {
1195
- ...fr,
1302
+ }, jo = {
1303
+ ...hr,
1196
1304
  backgroundColor: "transparent",
1197
- color: B.textDark
1198
- }, ye = "review-layer-resolve-btn", Co = [
1305
+ color: Y.textDark
1306
+ }, _e = "review-layer-resolve-btn", Vo = [
1199
1307
  "pending",
1200
1308
  "dev_fixed",
1201
1309
  "validated"
1202
- ], Po = {
1203
- ...fr,
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 jo({
1315
+ function Oo({
1208
1316
  comment: r,
1209
1317
  offset: t = { dx: 0, dy: 0 },
1210
1318
  apiUrl: o,
1211
- apiKey: i,
1212
- onStatusChange: a,
1319
+ apiKey: n,
1320
+ onStatusChange: i,
1213
1321
  reviewMode: s = !1
1214
1322
  }) {
1215
- var ne, ie;
1216
- const [p, g] = F(!1), [d, w] = F(!1), [h, y] = F(() => we(r)), [P, k] = F(!1), [V, $] = F(null), z = me(null), c = me(null), f = me(null), I = j(() => {
1217
- y(we(r));
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
- A(() => {
1220
- I();
1221
- }, [I]), A(() => {
1327
+ O(() => {
1328
+ x();
1329
+ }, [x]), O(() => {
1222
1330
  if (!(typeof window > "u"))
1223
- return window.addEventListener("scroll", I, !0), window.addEventListener("resize", I), () => {
1224
- window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I);
1331
+ return window.addEventListener("scroll", x, !0), window.addEventListener("resize", x), () => {
1332
+ window.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x);
1225
1333
  };
1226
- }, [I]);
1227
- const N = j(() => {
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
- }, []), H = j(() => {
1230
- s || (N(), g(!0));
1231
- }, [s, N]), re = j(() => {
1232
- d || (z.current = setTimeout(() => {
1233
- z.current = null, g(!1);
1234
- }, nr));
1235
- }, [d]), oe = j(() => {
1236
- N(), g(!0);
1237
- }, [N]), te = j(() => {
1238
- d || (z.current = setTimeout(() => {
1239
- z.current = null, g(!1);
1240
- }, nr));
1241
- }, [d]), X = j(() => {
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
- d && (w(!1), g(!1));
1357
+ f && (m(!1), v(!1));
1244
1358
  return;
1245
1359
  }
1246
- d ? (w(!1), g(!1)) : (w(!0), g(!0));
1247
- }, [s, d]);
1248
- A(() => {
1249
- if (!d) return;
1250
- const _ = (q) => {
1251
- var ve, pe;
1252
- const ae = q.target;
1253
- (ve = c.current) != null && ve.contains(ae) || (pe = f.current) != null && pe.contains(ae) || (w(!1), g(!1));
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
- }, [d]), A(() => () => N(), [N]), A(() => {
1257
- s && (w(!1), g(!1));
1370
+ }, [f]), O(() => () => A(), [A]), O(() => {
1371
+ s && (m(!1), v(!1));
1258
1372
  }, [s]);
1259
- const m = h.x + t.dx, R = h.y + t.dy, { x: O, y: T } = Fe(m, R, _e / 2), G = p && !d, Y = j(() => {
1260
- w(!1), g(!1);
1261
- }, []), J = j(
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
- $(null), k(!0);
1378
+ M(null), k(!0);
1265
1379
  try {
1266
- await Kr(o, i, r.id, _), a();
1267
- } catch (q) {
1268
- $(q instanceof Error ? q.message : "Error al actualizar");
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, i, r.id, r.status, a]
1275
- ), de = j(async () => {
1276
- $(null), k(!0);
1388
+ [o, n, r.id, r.status, i]
1389
+ ), oe = I(async () => {
1390
+ M(null), k(!0);
1277
1391
  try {
1278
- await eo(o, i, r.id), a(), Y();
1392
+ await no(o, n, r.id), i(), H();
1279
1393
  } catch (_) {
1280
- $(_ instanceof Error ? _.message : "Error al eliminar");
1394
+ M(_ instanceof Error ? _.message : "Error al eliminar");
1281
1395
  } finally {
1282
1396
  k(!1);
1283
1397
  }
1284
- }, [o, i, r.id, a, Y]), fe = Ne(
1285
- () => ({ ...bo(r.status), left: O, top: T, transform: "translate(-50%, -50%)" }),
1286
- [r.status, O, T]
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__ */ l.jsxs(l.Fragment, { children: [
1289
- /* @__PURE__ */ l.jsx(
1290
- so,
1402
+ return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
1403
+ /* @__PURE__ */ d.jsx(
1404
+ po,
1291
1405
  {
1292
1406
  selector: r.selector,
1293
- active: G,
1407
+ active: V,
1294
1408
  fallbackComment: r,
1295
- outlineColor: Ee[r.status] ?? Ee[C.PENDING]
1409
+ outlineColor: Se[r.status] ?? Se[T.PENDING]
1296
1410
  }
1297
1411
  ),
1298
- /* @__PURE__ */ l.jsx(
1412
+ /* @__PURE__ */ d.jsx(
1299
1413
  "div",
1300
1414
  {
1301
- ref: c,
1415
+ ref: g,
1302
1416
  role: "button",
1303
1417
  tabIndex: 0,
1304
1418
  "aria-label": `Comentario: ${r.message.slice(0, 30)}...`,
1305
- "aria-expanded": p,
1306
- style: fe,
1307
- onMouseEnter: H,
1308
- onMouseLeave: re,
1309
- onClick: X,
1310
- children: /* @__PURE__ */ l.jsx(go, { color: "var(--ui-color-white, #fff)" })
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
- p && /* @__PURE__ */ l.jsxs(
1427
+ u && /* @__PURE__ */ d.jsxs(
1314
1428
  "div",
1315
1429
  {
1316
- ref: f,
1430
+ ref: c,
1317
1431
  role: "dialog",
1318
1432
  "aria-label": "Detalle del comentario",
1319
1433
  style: {
1320
- ...ho,
1321
- left: O + _e / 2 + 6,
1322
- top: T
1434
+ ...wo,
1435
+ left: R + Re / 2 + 6,
1436
+ top: P
1323
1437
  },
1324
- onMouseEnter: oe,
1325
- onMouseLeave: te,
1438
+ onMouseEnter: se,
1439
+ onMouseLeave: le,
1326
1440
  children: [
1327
- /* @__PURE__ */ l.jsxs("div", { style: xo, children: [
1328
- /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, flex: 1, minWidth: 0 }, children: [
1329
- /* @__PURE__ */ l.jsx(mo, { reviewer: r.reviewer, status: r.status }),
1330
- /* @__PURE__ */ l.jsxs("div", { children: [
1331
- /* @__PURE__ */ l.jsx("div", { style: { fontWeight: 700, fontSize: 14, color: B.textDark }, children: ((ne = r.reviewer) == null ? void 0 : ne.name) ?? "Revisor" }),
1332
- /* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: B.textMuted }, children: ((ie = r.reviewer) == null ? void 0 : ie.job_title) ?? "Revisor" })
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__ */ l.jsx(
1449
+ /* @__PURE__ */ d.jsx(
1336
1450
  "button",
1337
1451
  {
1338
1452
  type: "button",
1339
- "aria-label": r.status === C.VALIDATED ? "Eliminar comentario" : "Cerrar",
1340
- style: wo,
1341
- disabled: P,
1453
+ "aria-label": r.status === T.VALIDATED ? "Eliminar comentario" : "Cerrar",
1454
+ style: So,
1455
+ disabled: j,
1342
1456
  onClick: (_) => {
1343
- _.stopPropagation(), r.status === C.VALIDATED ? de() : Y();
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__ */ l.jsxs("div", { style: { padding: 12, display: "flex", alignItems: "flex-start", flexDirection: "column", gap: 4 }, children: [
1351
- /* @__PURE__ */ l.jsxs("div", { style: _o(r.status), children: [
1352
- r.status === C.VALIDATED && /* @__PURE__ */ l.jsx(po, {}),
1353
- fo[r.status] ?? r.status
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__ */ l.jsx("div", { style: { color: B.textDark, lineHeight: 1.5, marginBottom: 12, marginTop: 12 }, children: r.message }),
1356
- /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" }, children: [
1357
- /* @__PURE__ */ l.jsx("label", { style: Eo, htmlFor: `comment-status-${r.id}`, children: "Cambiar estado" }),
1358
- /* @__PURE__ */ l.jsx(
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: Ro,
1476
+ style: Po,
1363
1477
  value: r.status,
1364
- disabled: P,
1365
- onChange: (_) => J(_.target.value),
1478
+ disabled: j,
1479
+ onChange: (_) => Z(_.target.value),
1366
1480
  onMouseDown: (_) => _.stopPropagation(),
1367
1481
  "aria-label": "Cambiar estado del comentario",
1368
- children: Co.map((_) => /* @__PURE__ */ l.jsx("option", { value: _, children: co[_] }, _))
1482
+ children: Vo.map((_) => /* @__PURE__ */ d.jsx("option", { value: _, children: go[_] }, _))
1369
1483
  }
1370
1484
  ),
1371
- V && /* @__PURE__ */ l.jsx("div", { style: { marginTop: 8, fontSize: 11, color: "var(--ui-color-text-danger-default, rgb(240, 69, 69))" }, children: V })
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__ */ l.jsxs("div", { style: So, children: [
1375
- /* @__PURE__ */ l.jsx(
1488
+ /* @__PURE__ */ d.jsxs("div", { style: To, children: [
1489
+ /* @__PURE__ */ d.jsx(
1376
1490
  "button",
1377
1491
  {
1378
1492
  type: "button",
1379
- style: ko,
1493
+ style: jo,
1380
1494
  onMouseDown: (_) => _.stopPropagation(),
1381
1495
  onClick: (_) => {
1382
- _.stopPropagation(), Y();
1496
+ _.stopPropagation(), H();
1383
1497
  },
1384
1498
  children: "Cerrar"
1385
1499
  }
1386
1500
  ),
1387
- r.status !== C.VALIDATED && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1388
- /* @__PURE__ */ l.jsx("style", { children: `
1389
- .${ye}:hover:not(:disabled) {
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
- .${ye}:active:not(:disabled) {
1506
+ .${_e}:active:not(:disabled) {
1393
1507
  background-color: var(--ui-color-bg-fill-success-pressed, #15803d) !important;
1394
1508
  }
1395
- .${ye}:disabled {
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__ */ l.jsx(
1515
+ /* @__PURE__ */ d.jsx(
1402
1516
  "button",
1403
1517
  {
1404
1518
  type: "button",
1405
- className: ye,
1406
- style: Po,
1407
- disabled: P,
1519
+ className: _e,
1520
+ style: Io,
1521
+ disabled: j,
1408
1522
  onMouseDown: (_) => _.stopPropagation(),
1409
1523
  onClick: (_) => {
1410
- _.stopPropagation(), J("validated");
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 Vo = Re(jo), To = 25, Do = 36;
1423
- function Io(r) {
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 i = r[o], { x: a, y: s } = we(i), { x: p, y: g } = Fe(a, s);
1427
- let d = 0;
1428
- for (let w = 0; w < o; w++) {
1429
- const { x: h, y } = we(r[w]), { x: P, y: k } = Fe(h, y);
1430
- Math.hypot(p - P, g - k) < To && d++;
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(i.id, { dx: d * Do, dy: 0 });
1546
+ t.set(n.id, { dx: f * zo, dy: 0 });
1433
1547
  }
1434
1548
  return t;
1435
1549
  }
1436
- function Oo() {
1550
+ function Fo() {
1437
1551
  return typeof window > "u" ? "" : `${window.innerWidth}x${window.innerHeight}`;
1438
1552
  }
1439
- function Lo({
1553
+ function No({
1440
1554
  apiUrl: r,
1441
1555
  apiKey: t,
1442
1556
  reviewMode: o,
1443
- setReviewMode: i,
1444
- reviewers: a,
1557
+ setReviewMode: n,
1558
+ reviewers: i,
1445
1559
  comments: s,
1446
- loadComments: p,
1447
- commentsLoadFailed: g = !1
1560
+ loadComments: u,
1561
+ commentsLoadFailed: v = !1
1448
1562
  }) {
1449
- const [d, w] = F(null), h = me(null), [y, P] = F(null), k = j(() => {
1450
- d && (d.style.outline = "", d.style.outlineOffset = "", w(null));
1451
- }, [d]), V = j(() => {
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
- A(() => {
1455
- o || (k(), V());
1456
- }, [o, k, V]), A(() => {
1568
+ O(() => {
1569
+ o || (k(), D());
1570
+ }, [o, k, D]), O(() => {
1457
1571
  if (typeof document > "u") return;
1458
- const m = document.body.style.cursor;
1459
- return y ? document.body.style.cursor = "default" : o && (document.body.style.cursor = "crosshair"), () => {
1460
- document.body.style.cursor = m;
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, y]);
1463
- const $ = j((m) => {
1464
- var O;
1465
- if (!m || typeof document > "u" || m === document.body || m === document.documentElement) return !0;
1466
- const R = (O = m.tagName) == null ? void 0 : O.toUpperCase();
1467
- return R === "BODY" || R === "HTML" ? !0 : m.parentElement !== document.body ? !1 : m.id === "root" || m.getAttribute("data-review-layer-host") != null || document.body.children.length === 1;
1468
- }, []), z = j(
1469
- (m) => {
1470
- if (!o || y) return;
1471
- const R = m.target.nodeType === Node.ELEMENT_NODE ? m.target : m.target.parentElement;
1472
- !R || $(R) || (k(), w(R), R.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", R.style.outlineOffset = "2px");
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, y, k, $]
1475
- ), c = j(
1476
- (m) => {
1477
- var O;
1478
- if (y) return;
1479
- const R = m.relatedTarget;
1480
- d && (!R || !d.contains(R)) && !(R && ((O = d.contains) != null && O.call(d, R))) && k();
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
- [d, y, k]
1483
- ), f = j(
1484
- (m) => {
1485
- if (!o || y) return;
1486
- const R = m.target;
1487
- if (!R || $(R) || R.closest("[data-review-layer-root]")) return;
1488
- m.preventDefault(), m.stopPropagation(), k();
1489
- const O = R;
1490
- h.current = O, O.style.outline = "2px solid var(--ui-color-bg-fill-danger-default, #ff4d4f)", O.style.outlineOffset = "2px";
1491
- const T = O.getBoundingClientRect(), G = Ur(R), { relativeX: Y, relativeY: J } = Xr(T);
1492
- P({
1493
- position: { x: T.left + T.width / 2, y: T.bottom },
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: G,
1496
- x: Math.round(T.left),
1497
- y: Math.round(T.top),
1498
- relativeX: Y,
1499
- relativeY: J,
1500
- width: Math.round(T.width),
1501
- height: Math.round(T.height),
1502
- url: typeof window < "u" && window.location.pathname || "/",
1503
- viewport: Oo(),
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, y, k, $]
1623
+ [o, w, k, M]
1510
1624
  );
1511
- A(() => {
1625
+ O(() => {
1512
1626
  if (o)
1513
- return document.addEventListener("mouseover", z, !0), document.addEventListener("mouseout", c, !0), document.addEventListener("click", f, !0), () => {
1514
- document.removeEventListener("mouseover", z, !0), document.removeEventListener("mouseout", c, !0), document.removeEventListener("click", f, !0);
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, c, f]);
1517
- const [I, N] = F(0);
1518
- A(() => {
1519
- if (typeof window > "u") return;
1520
- const m = () => {
1521
- if (N((R) => R + 1), h.current) {
1522
- const R = h.current.getBoundingClientRect();
1523
- P(
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
- const H = Ne(
1533
- () => Io(s),
1534
- [s, I]
1535
- ), re = j(() => {
1536
- V(), P(null);
1537
- }, [V]), oe = {
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
- }, te = /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1544
- /* @__PURE__ */ l.jsx("div", { style: oe, "aria-hidden": !0, "data-review-layer-root": !0 }),
1545
- o && /* @__PURE__ */ l.jsxs(
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__ */ l.jsx("span", { children: "Modo revisión (Shift+R para salir)" }),
1567
- /* @__PURE__ */ l.jsx(
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: () => i(!1),
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
- g && /* @__PURE__ */ l.jsxs(
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__ */ l.jsx("span", { children: "No se pudo conectar. Mostrando últimos datos guardados. Reintentar no garantiza respuesta hasta que el servicio esté activo." }),
1618
- /* @__PURE__ */ l.jsx(
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: () => p(),
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((m) => /* @__PURE__ */ l.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ l.jsx(
1640
- Vo,
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: m,
1643
- offset: H.get(m.id),
1759
+ comment: y,
1760
+ offset: ae.get(y.id),
1644
1761
  apiUrl: r,
1645
1762
  apiKey: t,
1646
- onStatusChange: p,
1763
+ onStatusChange: u,
1647
1764
  reviewMode: o
1648
1765
  }
1649
- ) }, m.id)),
1650
- y && /* @__PURE__ */ l.jsx("div", { "data-review-layer-modal": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ l.jsx(
1651
- ao,
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: a,
1656
- position: y.position,
1657
- payload: y.payload,
1658
- onClose: re,
1659
- onSuccess: p
1772
+ reviewers: i,
1773
+ position: w.position,
1774
+ payload: w.payload,
1775
+ onClose: se,
1776
+ onSuccess: u
1660
1777
  }
1661
1778
  ) })
1662
- ] }), X = typeof document < "u" ? document.body : null;
1663
- return X ? sr(te, X) : null;
1779
+ ] }), re = typeof document < "u" ? document.body : null;
1780
+ return re ? fr(ee, re) : null;
1664
1781
  }
1665
- const zo = `/**
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 Ao(r, t, o) {
1992
- const i = j(() => {
1993
- r && o((a) => !a);
2108
+ function Mo(r, t, o) {
2109
+ const n = I(() => {
2110
+ r && o((i) => !i);
1994
2111
  }, [r, o]);
1995
- A(() => {
2112
+ O(() => {
1996
2113
  if (!r) return;
1997
- const a = (s) => {
1998
- (s.key === "r" || s.key === "R" || s.code === "KeyR") && s.shiftKey && !s.ctrlKey && !s.metaKey && (s.preventDefault(), i());
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", a), () => window.removeEventListener("keydown", a);
2001
- }, [r, i]);
2117
+ return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
2118
+ }, [r, n]);
2002
2119
  }
2003
- const Fo = "review_layer:v1:";
2004
- function No(r, t) {
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 Se(r, t, o, i) {
2013
- const a = `${Fo}${$o(r)}:${o}`;
2014
- return i != null ? `${a}:${i}` : a;
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 $o(r) {
2133
+ function Uo(r) {
2017
2134
  return r.replace(/\/+$/, "") || "/";
2018
2135
  }
2019
- function vr(r) {
2136
+ function br(r) {
2020
2137
  if (typeof localStorage > "u") return null;
2021
2138
  const t = localStorage.getItem(r);
2022
- return No(t, null);
2139
+ return Bo(t, null);
2023
2140
  }
2024
- function pr(r, t) {
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 Le(r, t, o) {
2032
- const i = vr(Se(r, t, "comments", o));
2033
- return (i == null ? void 0 : i.data) ?? null;
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 Mo(r, t, o, i) {
2036
- pr(Se(r, t, "comments", o), i);
2152
+ function Yo(r, t, o, n) {
2153
+ xr(ke(r, t, "comments", o), n);
2037
2154
  }
2038
- function ar(r, t) {
2039
- const o = vr(Se(r, t, "reviewers"));
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 Wo(r, t, o) {
2043
- pr(Se(r, t, "reviewers"), o);
2159
+ function Ho(r, t, o) {
2160
+ xr(ke(r, t, "reviewers"), o);
2044
2161
  }
2045
- const Bo = "https://review-layer-api.onrender.com/api";
2046
- function ur() {
2047
- return typeof window > "u" ? "/" : window.location.pathname || "/";
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
- function Ho({
2170
+ const B = "[review-layer]";
2171
+ function Zo({
2058
2172
  children: r,
2059
2173
  enabled: t = !0,
2060
2174
  apiUrl: o,
2061
- apiKey: i
2175
+ apiKey: n
2062
2176
  }) {
2063
- const a = (o == null ? void 0 : o.trim()) || Bo, [s, p] = F(!1), [g, d] = F([]), [w, h] = F([]), [y, P] = F(!1);
2064
- Ao(t, s, p);
2065
- const k = j(
2066
- async (c) => {
2067
- if (!(!t || !a || !i))
2068
- try {
2069
- const f = await qr(a, i, { signal: c });
2070
- c != null && c.aborted || (d(f), Wo(a, i, f));
2071
- } catch (f) {
2072
- if (f instanceof Error && f.name === "AbortError") return;
2073
- if (!(c != null && c.aborted)) {
2074
- const I = ar(a, i);
2075
- I != null && d(I);
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, a, i]
2080
- ), V = j(
2081
- async (c) => {
2082
- if (!t || !a || !i) return;
2083
- const f = ur(), I = Le(a, i, f);
2084
- I != null && h(I);
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
- P(!1);
2087
- const N = await Qr(a, i, f, { signal: c });
2088
- c != null && c.aborted || (h(N), Mo(a, i, f, N));
2089
- } catch (N) {
2090
- if (N instanceof Error && N.name === "AbortError") return;
2091
- if (!(c != null && c.aborted)) {
2092
- P(!0);
2093
- const H = Le(a, i, f);
2094
- H != null && h(H);
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, a, i]
2228
+ [t, i, n]
2099
2229
  );
2100
- A(() => {
2101
- if (!t || !a || !i) return;
2102
- const c = ur(), f = ar(a, i), I = Le(a, i, c);
2103
- f != null && d(f), I != null && h(I);
2104
- }, [t, a, i]), A(() => {
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 c = "review-layer-ui-variables";
2107
- if (!document.getElementById(c)) {
2108
- const f = document.createElement("style");
2109
- f.id = c, f.textContent = zo, document.head.appendChild(f);
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
- }, []), A(() => {
2112
- if (!t || !a || !i) return;
2113
- const c = `${a}:${i}`;
2114
- if (ze !== c)
2115
- return ze = c, k(), V(), () => {
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
- ze = null;
2254
+ Fe = null;
2118
2255
  }, 0);
2119
2256
  };
2120
- }, [t, a, i, k, V]), A(() => {
2257
+ }, [t, i, n, k, D]), O(() => {
2121
2258
  if (!t) return;
2122
- const c = () => V();
2123
- return window.addEventListener("popstate", c), () => window.removeEventListener("popstate", c);
2124
- }, [t, V]);
2125
- const $ = Ne(
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: a,
2128
- apiKey: i,
2264
+ apiUrl: i,
2265
+ apiKey: n,
2129
2266
  reviewMode: s,
2130
- setReviewMode: p,
2131
- reviewers: g,
2132
- comments: w,
2133
- loadComments: V,
2134
- commentsLoadFailed: y
2267
+ setReviewMode: u,
2268
+ reviewers: v,
2269
+ comments: m,
2270
+ loadComments: D,
2271
+ commentsLoadFailed: w
2135
2272
  }),
2136
- [a, i, s, p, g, w, V, y]
2137
- ), z = t && typeof document < "u" ? sr(
2138
- /* @__PURE__ */ l.jsx(
2139
- Lo,
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: a,
2142
- apiKey: i,
2278
+ apiUrl: i,
2279
+ apiKey: n,
2143
2280
  reviewMode: s,
2144
- setReviewMode: p,
2145
- reviewers: g,
2146
- comments: w,
2147
- loadComments: V,
2148
- commentsLoadFailed: y
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__ */ l.jsxs(gr.Provider, { value: $, children: [
2290
+ return /* @__PURE__ */ d.jsxs(yr.Provider, { value: M, children: [
2154
2291
  r,
2155
2292
  z
2156
2293
  ] });
2157
2294
  }
2158
2295
  export {
2159
- Bo as DEFAULT_API_URL,
2160
- Ho as ReviewProvider,
2161
- Go as useReview
2296
+ Go as DEFAULT_API_URL,
2297
+ Zo as ReviewProvider,
2298
+ Jo as useReview
2162
2299
  };
2163
2300
  //# sourceMappingURL=review-layer-react.js.map