@bitux/review-layer-react 0.1.0 → 0.1.1

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 Qe, { useState as L, useEffect as N, useCallback as I, useRef as ge, useMemo as Ot, createContext as It, useContext as Lt } from "react";
1
+ import Qe, { useState as A, useEffect as $, useCallback as L, useRef as ge, useMemo as Ot, createContext as It, useContext as Lt } from "react";
2
2
  import { createPortal as Ke } from "react-dom";
3
- var Te = { exports: {} }, ue = {};
3
+ var Pe = { exports: {} }, ue = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.min.js
@@ -10,19 +10,19 @@ var Te = { exports: {} }, ue = {};
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 Ge;
13
+ var Xe;
14
14
  function At() {
15
- if (Ge) return ue;
16
- Ge = 1;
17
- var t = Qe, o = Symbol.for("react.element"), r = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function v(d, E, b) {
19
- var g, j = {}, R = null, _ = null;
20
- b !== void 0 && (R = "" + b), E.key !== void 0 && (R = "" + E.key), E.ref !== void 0 && (_ = E.ref);
21
- for (g in E) i.call(E, g) && !c.hasOwnProperty(g) && (j[g] = E[g]);
22
- if (d && d.defaultProps) for (g in E = d.defaultProps, E) j[g] === void 0 && (j[g] = E[g]);
23
- return { $$typeof: o, type: d, key: R, ref: _, props: j, _owner: s.current };
15
+ if (Xe) return ue;
16
+ Xe = 1;
17
+ var t = Qe, o = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function g(p, m, R) {
19
+ var h, C = {}, w = null, O = null;
20
+ R !== void 0 && (w = "" + R), m.key !== void 0 && (w = "" + m.key), m.ref !== void 0 && (O = m.ref);
21
+ for (h in m) i.call(m, h) && !d.hasOwnProperty(h) && (C[h] = m[h]);
22
+ if (p && p.defaultProps) for (h in m = p.defaultProps, m) C[h] === void 0 && (C[h] = m[h]);
23
+ return { $$typeof: o, type: p, key: w, ref: O, props: C, _owner: a.current };
24
24
  }
25
- return ue.Fragment = r, ue.jsx = v, ue.jsxs = v, ue;
25
+ return ue.Fragment = n, ue.jsx = g, ue.jsxs = g, ue;
26
26
  }
27
27
  var ce = {};
28
28
  /**
@@ -34,49 +34,49 @@ var ce = {};
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 Je;
37
+ var Ge;
38
38
  function Ft() {
39
- return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
40
- var t = Qe, o = Symbol.for("react.element"), r = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), d = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), j = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), A = Symbol.iterator, O = "@@iterator";
41
- function y(e) {
39
+ return Ge || (Ge = 1, process.env.NODE_ENV !== "production" && function() {
40
+ var t = Qe, o = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), p = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), _ = Symbol.iterator, I = "@@iterator";
41
+ function z(e) {
42
42
  if (e === null || typeof e != "object")
43
43
  return null;
44
- var n = A && e[A] || e[O];
45
- return typeof n == "function" ? n : null;
44
+ var r = _ && e[_] || e[I];
45
+ return typeof r == "function" ? r : null;
46
46
  }
47
- var f = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
- function p(e) {
47
+ var u = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
+ function f(e) {
49
49
  {
50
- for (var n = arguments.length, a = new Array(n > 1 ? n - 1 : 0), u = 1; u < n; u++)
51
- a[u - 1] = arguments[u];
52
- F("error", e, a);
50
+ for (var r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
51
+ s[c - 1] = arguments[c];
52
+ k("error", e, s);
53
53
  }
54
54
  }
55
- function F(e, n, a) {
55
+ function k(e, r, s) {
56
56
  {
57
- var u = f.ReactDebugCurrentFrame, w = u.getStackAddendum();
58
- w !== "" && (n += "%s", a = a.concat([w]));
59
- var S = a.map(function(m) {
60
- return String(m);
57
+ var c = u.ReactDebugCurrentFrame, E = c.getStackAddendum();
58
+ E !== "" && (r += "%s", s = s.concat([E]));
59
+ var b = s.map(function(y) {
60
+ return String(y);
61
61
  });
62
- S.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, S);
62
+ b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
63
63
  }
64
64
  }
65
- var X = !1, te = !1, Q = !1, C = !1, P = !1, M;
65
+ var U = !1, X = !1, K = !1, S = !1, j = !1, M;
66
66
  M = Symbol.for("react.module.reference");
67
67
  function W(e) {
68
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === c || P || e === s || e === b || e === g || C || e === _ || X || te || Q || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === j || e.$$typeof === v || e.$$typeof === d || e.$$typeof === E || // This needs to include all possible module reference object
68
+ return !!(typeof e == "string" || typeof e == "function" || e === i || e === d || j || e === a || e === R || e === h || S || e === O || U || X || K || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === C || e.$$typeof === g || e.$$typeof === p || e.$$typeof === m || // 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
72
  e.$$typeof === M || e.getModuleId !== void 0));
73
73
  }
74
- function re(e, n, a) {
75
- var u = e.displayName;
76
- if (u)
77
- return u;
78
- var w = n.displayName || n.name || "";
79
- return w !== "" ? a + "(" + w + ")" : a;
74
+ function re(e, r, s) {
75
+ var c = e.displayName;
76
+ if (c)
77
+ return c;
78
+ var E = r.displayName || r.name || "";
79
+ return E !== "" ? s + "(" + E + ")" : s;
80
80
  }
81
81
  function G(e) {
82
82
  return e.displayName || "Context";
@@ -84,41 +84,41 @@ function Ft() {
84
84
  function V(e) {
85
85
  if (e == null)
86
86
  return null;
87
- if (typeof e.tag == "number" && p("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" && f("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
92
  case i:
93
93
  return "Fragment";
94
- case r:
94
+ case n:
95
95
  return "Portal";
96
- case c:
96
+ case d:
97
97
  return "Profiler";
98
- case s:
98
+ case a:
99
99
  return "StrictMode";
100
- case b:
100
+ case R:
101
101
  return "Suspense";
102
- case g:
102
+ case h:
103
103
  return "SuspenseList";
104
104
  }
105
105
  if (typeof e == "object")
106
106
  switch (e.$$typeof) {
107
- case d:
108
- var n = e;
109
- return G(n) + ".Consumer";
110
- case v:
111
- var a = e;
112
- return G(a._context) + ".Provider";
113
- case E:
107
+ case p:
108
+ var r = e;
109
+ return G(r) + ".Consumer";
110
+ case g:
111
+ var s = e;
112
+ return G(s._context) + ".Provider";
113
+ case m:
114
114
  return re(e, e.render, "ForwardRef");
115
- case j:
116
- var u = e.displayName || null;
117
- return u !== null ? u : V(e.type) || "Memo";
118
- case R: {
119
- var w = e, S = w._payload, m = w._init;
115
+ case C:
116
+ var c = e.displayName || null;
117
+ return c !== null ? c : V(e.type) || "Memo";
118
+ case w: {
119
+ var E = e, b = E._payload, y = E._init;
120
120
  try {
121
- return V(m(S));
121
+ return V(y(b));
122
122
  } catch {
123
123
  return null;
124
124
  }
@@ -185,18 +185,18 @@ function Ft() {
185
185
  })
186
186
  });
187
187
  }
188
- J < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ J < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
189
  }
190
190
  }
191
- var xe = f.ReactCurrentDispatcher, Ee;
192
- function fe(e, n, a) {
191
+ var xe = u.ReactCurrentDispatcher, Ee;
192
+ function fe(e, r, s) {
193
193
  {
194
194
  if (Ee === void 0)
195
195
  try {
196
196
  throw Error();
197
- } catch (w) {
198
- var u = w.stack.trim().match(/\n( *(at )?)/);
199
- Ee = u && u[1] || "";
197
+ } catch (E) {
198
+ var c = E.stack.trim().match(/\n( *(at )?)/);
199
+ Ee = c && c[1] || "";
200
200
  }
201
201
  return `
202
202
  ` + Ee + e;
@@ -207,85 +207,85 @@ function Ft() {
207
207
  var st = typeof WeakMap == "function" ? WeakMap : Map;
208
208
  pe = new st();
209
209
  }
210
- function Oe(e, n) {
210
+ function Oe(e, r) {
211
211
  if (!e || we)
212
212
  return "";
213
213
  {
214
- var a = pe.get(e);
215
- if (a !== void 0)
216
- return a;
214
+ var s = pe.get(e);
215
+ if (s !== void 0)
216
+ return s;
217
217
  }
218
- var u;
218
+ var c;
219
219
  we = !0;
220
- var w = Error.prepareStackTrace;
220
+ var E = Error.prepareStackTrace;
221
221
  Error.prepareStackTrace = void 0;
222
- var S;
223
- S = xe.current, xe.current = null, it();
222
+ var b;
223
+ b = xe.current, xe.current = null, it();
224
224
  try {
225
- if (n) {
226
- var m = function() {
225
+ if (r) {
226
+ var y = function() {
227
227
  throw Error();
228
228
  };
229
- if (Object.defineProperty(m.prototype, "props", {
229
+ if (Object.defineProperty(y.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(m, []);
236
- } catch (z) {
237
- u = z;
235
+ Reflect.construct(y, []);
236
+ } catch (N) {
237
+ c = N;
238
238
  }
239
- Reflect.construct(e, [], m);
239
+ Reflect.construct(e, [], y);
240
240
  } else {
241
241
  try {
242
- m.call();
243
- } catch (z) {
244
- u = z;
242
+ y.call();
243
+ } catch (N) {
244
+ c = N;
245
245
  }
246
- e.call(m.prototype);
246
+ e.call(y.prototype);
247
247
  }
248
248
  } else {
249
249
  try {
250
250
  throw Error();
251
- } catch (z) {
252
- u = z;
251
+ } catch (N) {
252
+ c = N;
253
253
  }
254
254
  e();
255
255
  }
256
- } catch (z) {
257
- if (z && u && typeof z.stack == "string") {
258
- for (var h = z.stack.split(`
259
- `), $ = u.stack.split(`
260
- `), T = h.length - 1, k = $.length - 1; T >= 1 && k >= 0 && h[T] !== $[k]; )
261
- k--;
262
- for (; T >= 1 && k >= 0; T--, k--)
263
- if (h[T] !== $[k]) {
264
- if (T !== 1 || k !== 1)
256
+ } catch (N) {
257
+ if (N && c && typeof N.stack == "string") {
258
+ for (var v = N.stack.split(`
259
+ `), F = c.stack.split(`
260
+ `), T = v.length - 1, P = F.length - 1; T >= 1 && P >= 0 && v[T] !== F[P]; )
261
+ P--;
262
+ for (; T >= 1 && P >= 0; T--, P--)
263
+ if (v[T] !== F[P]) {
264
+ if (T !== 1 || P !== 1)
265
265
  do
266
- if (T--, k--, k < 0 || h[T] !== $[k]) {
266
+ if (T--, P--, P < 0 || v[T] !== F[P]) {
267
267
  var Y = `
268
- ` + h[T].replace(" at new ", " at ");
268
+ ` + v[T].replace(" at new ", " at ");
269
269
  return e.displayName && Y.includes("<anonymous>") && (Y = Y.replace("<anonymous>", e.displayName)), typeof e == "function" && pe.set(e, Y), Y;
270
270
  }
271
- while (T >= 1 && k >= 0);
271
+ while (T >= 1 && P >= 0);
272
272
  break;
273
273
  }
274
274
  }
275
275
  } finally {
276
- we = !1, xe.current = S, at(), Error.prepareStackTrace = w;
276
+ we = !1, xe.current = b, at(), Error.prepareStackTrace = E;
277
277
  }
278
- var ee = e ? e.displayName || e.name : "", U = ee ? fe(ee) : "";
279
- return typeof e == "function" && pe.set(e, U), U;
278
+ var te = e ? e.displayName || e.name : "", Z = te ? fe(te) : "";
279
+ return typeof e == "function" && pe.set(e, Z), Z;
280
280
  }
281
- function lt(e, n, a) {
281
+ function lt(e, r, s) {
282
282
  return Oe(e, !1);
283
283
  }
284
284
  function ut(e) {
285
- var n = e.prototype;
286
- return !!(n && n.isReactComponent);
285
+ var r = e.prototype;
286
+ return !!(r && r.isReactComponent);
287
287
  }
288
- function he(e, n, a) {
288
+ function he(e, r, s) {
289
289
  if (e == null)
290
290
  return "";
291
291
  if (typeof e == "function")
@@ -293,51 +293,51 @@ function Ft() {
293
293
  if (typeof e == "string")
294
294
  return fe(e);
295
295
  switch (e) {
296
- case b:
296
+ case R:
297
297
  return fe("Suspense");
298
- case g:
298
+ case h:
299
299
  return fe("SuspenseList");
300
300
  }
301
301
  if (typeof e == "object")
302
302
  switch (e.$$typeof) {
303
- case E:
303
+ case m:
304
304
  return lt(e.render);
305
- case j:
306
- return he(e.type, n, a);
307
- case R: {
308
- var u = e, w = u._payload, S = u._init;
305
+ case C:
306
+ return he(e.type, r, s);
307
+ case w: {
308
+ var c = e, E = c._payload, b = c._init;
309
309
  try {
310
- return he(S(w), n, a);
310
+ return he(b(E), r, s);
311
311
  } catch {
312
312
  }
313
313
  }
314
314
  }
315
315
  return "";
316
316
  }
317
- var le = Object.prototype.hasOwnProperty, Ie = {}, Le = f.ReactDebugCurrentFrame;
317
+ var le = Object.prototype.hasOwnProperty, Ie = {}, Le = u.ReactDebugCurrentFrame;
318
318
  function ve(e) {
319
319
  if (e) {
320
- var n = e._owner, a = he(e.type, e._source, n ? n.type : null);
321
- Le.setExtraStackFrame(a);
320
+ var r = e._owner, s = he(e.type, e._source, r ? r.type : null);
321
+ Le.setExtraStackFrame(s);
322
322
  } else
323
323
  Le.setExtraStackFrame(null);
324
324
  }
325
- function ct(e, n, a, u, w) {
325
+ function ct(e, r, s, c, E) {
326
326
  {
327
- var S = Function.call.bind(le);
328
- for (var m in e)
329
- if (S(e, m)) {
330
- var h = void 0;
327
+ var b = Function.call.bind(le);
328
+ for (var y in e)
329
+ if (b(e, y)) {
330
+ var v = void 0;
331
331
  try {
332
- if (typeof e[m] != "function") {
333
- var $ = Error((u || "React class") + ": " + a + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
- throw $.name = "Invariant Violation", $;
332
+ if (typeof e[y] != "function") {
333
+ var F = Error((c || "React class") + ": " + s + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
+ throw F.name = "Invariant Violation", F;
335
335
  }
336
- h = e[m](n, m, u, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
+ v = e[y](r, y, c, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
337
  } catch (T) {
338
- h = T;
338
+ v = T;
339
339
  }
340
- h && !(h instanceof Error) && (ve(w), p("%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).", u || "React class", a, m, typeof h), ve(null)), h instanceof Error && !(h.message in Ie) && (Ie[h.message] = !0, ve(w), p("Failed %s type: %s", a, h.message), ve(null));
340
+ v && !(v instanceof Error) && (ve(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).", c || "React class", s, y, typeof v), ve(null)), v instanceof Error && !(v.message in Ie) && (Ie[v.message] = !0, ve(E), f("Failed %s type: %s", s, v.message), ve(null));
341
341
  }
342
342
  }
343
343
  }
@@ -347,8 +347,8 @@ function Ft() {
347
347
  }
348
348
  function ft(e) {
349
349
  {
350
- var n = typeof Symbol == "function" && Symbol.toStringTag, a = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
351
- return a;
350
+ var r = typeof Symbol == "function" && Symbol.toStringTag, s = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
351
+ return s;
352
352
  }
353
353
  }
354
354
  function pt(e) {
@@ -363,9 +363,9 @@ function Ft() {
363
363
  }
364
364
  function Fe(e) {
365
365
  if (pt(e))
366
- return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ft(e)), Ae(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.", ft(e)), Ae(e);
367
367
  }
368
- var $e = f.ReactCurrentOwner, ht = {
368
+ var $e = u.ReactCurrentOwner, ht = {
369
369
  key: !0,
370
370
  ref: !0,
371
371
  __self: !0,
@@ -373,97 +373,97 @@ function Ft() {
373
373
  }, Ne, ze;
374
374
  function vt(e) {
375
375
  if (le.call(e, "ref")) {
376
- var n = Object.getOwnPropertyDescriptor(e, "ref").get;
377
- if (n && n.isReactWarning)
376
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
377
+ if (r && r.isReactWarning)
378
378
  return !1;
379
379
  }
380
380
  return e.ref !== void 0;
381
381
  }
382
382
  function gt(e) {
383
383
  if (le.call(e, "key")) {
384
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
385
- if (n && n.isReactWarning)
384
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
385
+ if (r && r.isReactWarning)
386
386
  return !1;
387
387
  }
388
388
  return e.key !== void 0;
389
389
  }
390
- function yt(e, n) {
390
+ function yt(e, r) {
391
391
  typeof e.ref == "string" && $e.current;
392
392
  }
393
- function mt(e, n) {
393
+ function mt(e, r) {
394
394
  {
395
- var a = function() {
396
- Ne || (Ne = !0, p("%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 s = function() {
396
+ Ne || (Ne = !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)", r));
397
397
  };
398
- a.isReactWarning = !0, Object.defineProperty(e, "key", {
399
- get: a,
398
+ s.isReactWarning = !0, Object.defineProperty(e, "key", {
399
+ get: s,
400
400
  configurable: !0
401
401
  });
402
402
  }
403
403
  }
404
- function xt(e, n) {
404
+ function xt(e, r) {
405
405
  {
406
- var a = function() {
407
- ze || (ze = !0, p("%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 s = function() {
407
+ ze || (ze = !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)", r));
408
408
  };
409
- a.isReactWarning = !0, Object.defineProperty(e, "ref", {
410
- get: a,
409
+ s.isReactWarning = !0, Object.defineProperty(e, "ref", {
410
+ get: s,
411
411
  configurable: !0
412
412
  });
413
413
  }
414
414
  }
415
- var Et = function(e, n, a, u, w, S, m) {
416
- var h = {
415
+ var Et = function(e, r, s, c, E, b, y) {
416
+ var v = {
417
417
  // This tag allows us to uniquely identify this as a React Element
418
418
  $$typeof: o,
419
419
  // Built-in properties that belong on the element
420
420
  type: e,
421
- key: n,
422
- ref: a,
423
- props: m,
421
+ key: r,
422
+ ref: s,
423
+ props: y,
424
424
  // Record the component responsible for creating this element.
425
- _owner: S
425
+ _owner: b
426
426
  };
427
- return h._store = {}, Object.defineProperty(h._store, "validated", {
427
+ return v._store = {}, Object.defineProperty(v._store, "validated", {
428
428
  configurable: !1,
429
429
  enumerable: !1,
430
430
  writable: !0,
431
431
  value: !1
432
- }), Object.defineProperty(h, "_self", {
432
+ }), Object.defineProperty(v, "_self", {
433
433
  configurable: !1,
434
434
  enumerable: !1,
435
435
  writable: !1,
436
- value: u
437
- }), Object.defineProperty(h, "_source", {
436
+ value: c
437
+ }), Object.defineProperty(v, "_source", {
438
438
  configurable: !1,
439
439
  enumerable: !1,
440
440
  writable: !1,
441
- value: w
442
- }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
441
+ value: E
442
+ }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
443
443
  };
444
- function wt(e, n, a, u, w) {
444
+ function wt(e, r, s, c, E) {
445
445
  {
446
- var S, m = {}, h = null, $ = null;
447
- a !== void 0 && (Fe(a), h = "" + a), gt(n) && (Fe(n.key), h = "" + n.key), vt(n) && ($ = n.ref, yt(n, w));
448
- for (S in n)
449
- le.call(n, S) && !ht.hasOwnProperty(S) && (m[S] = n[S]);
446
+ var b, y = {}, v = null, F = null;
447
+ s !== void 0 && (Fe(s), v = "" + s), gt(r) && (Fe(r.key), v = "" + r.key), vt(r) && (F = r.ref, yt(r, E));
448
+ for (b in r)
449
+ le.call(r, b) && !ht.hasOwnProperty(b) && (y[b] = r[b]);
450
450
  if (e && e.defaultProps) {
451
451
  var T = e.defaultProps;
452
- for (S in T)
453
- m[S] === void 0 && (m[S] = T[S]);
452
+ for (b in T)
453
+ y[b] === void 0 && (y[b] = T[b]);
454
454
  }
455
- if (h || $) {
456
- var k = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
- h && mt(m, k), $ && xt(m, k);
455
+ if (v || F) {
456
+ var P = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
+ v && mt(y, P), F && xt(y, P);
458
458
  }
459
- return Et(e, h, $, w, u, $e.current, m);
459
+ return Et(e, v, F, E, c, $e.current, y);
460
460
  }
461
461
  }
462
- var Re = f.ReactCurrentOwner, Me = f.ReactDebugCurrentFrame;
463
- function K(e) {
462
+ var Re = u.ReactCurrentOwner, Me = u.ReactDebugCurrentFrame;
463
+ function ee(e) {
464
464
  if (e) {
465
- var n = e._owner, a = he(e.type, e._source, n ? n.type : null);
466
- Me.setExtraStackFrame(a);
465
+ var r = e._owner, s = he(e.type, e._source, r ? r.type : null);
466
+ Me.setExtraStackFrame(s);
467
467
  } else
468
468
  Me.setExtraStackFrame(null);
469
469
  }
@@ -490,173 +490,173 @@ Check the render method of \`` + e + "`.";
490
490
  var Ve = {};
491
491
  function Rt(e) {
492
492
  {
493
- var n = We();
494
- if (!n) {
495
- var a = typeof e == "string" ? e : e.displayName || e.name;
496
- a && (n = `
493
+ var r = We();
494
+ if (!r) {
495
+ var s = typeof e == "string" ? e : e.displayName || e.name;
496
+ s && (r = `
497
497
 
498
- Check the top-level render call using <` + a + ">.");
498
+ Check the top-level render call using <` + s + ">.");
499
499
  }
500
- return n;
500
+ return r;
501
501
  }
502
502
  }
503
- function Be(e, n) {
503
+ function Be(e, r) {
504
504
  {
505
505
  if (!e._store || e._store.validated || e.key != null)
506
506
  return;
507
507
  e._store.validated = !0;
508
- var a = Rt(n);
509
- if (Ve[a])
508
+ var s = Rt(r);
509
+ if (Ve[s])
510
510
  return;
511
- Ve[a] = !0;
512
- var u = "";
513
- e && e._owner && e._owner !== Re.current && (u = " It was passed a child from " + V(e._owner.type) + "."), K(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, u), K(null);
511
+ Ve[s] = !0;
512
+ var c = "";
513
+ e && e._owner && e._owner !== Re.current && (c = " It was passed a child from " + V(e._owner.type) + "."), ee(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.', s, c), ee(null);
514
514
  }
515
515
  }
516
- function Ye(e, n) {
516
+ function Ye(e, r) {
517
517
  {
518
518
  if (typeof e != "object")
519
519
  return;
520
520
  if (be(e))
521
- for (var a = 0; a < e.length; a++) {
522
- var u = e[a];
523
- Ce(u) && Be(u, n);
521
+ for (var s = 0; s < e.length; s++) {
522
+ var c = e[s];
523
+ Ce(c) && Be(c, r);
524
524
  }
525
525
  else if (Ce(e))
526
526
  e._store && (e._store.validated = !0);
527
527
  else if (e) {
528
- var w = y(e);
529
- if (typeof w == "function" && w !== e.entries)
530
- for (var S = w.call(e), m; !(m = S.next()).done; )
531
- Ce(m.value) && Be(m.value, n);
528
+ var E = z(e);
529
+ if (typeof E == "function" && E !== e.entries)
530
+ for (var b = E.call(e), y; !(y = b.next()).done; )
531
+ Ce(y.value) && Be(y.value, r);
532
532
  }
533
533
  }
534
534
  }
535
535
  function St(e) {
536
536
  {
537
- var n = e.type;
538
- if (n == null || typeof n == "string")
537
+ var r = e.type;
538
+ if (r == null || typeof r == "string")
539
539
  return;
540
- var a;
541
- if (typeof n == "function")
542
- a = n.propTypes;
543
- else if (typeof n == "object" && (n.$$typeof === E || // Note: Memo only checks outer props here.
540
+ var s;
541
+ if (typeof r == "function")
542
+ s = r.propTypes;
543
+ else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
544
544
  // Inner props are checked in the reconciler.
545
- n.$$typeof === j))
546
- a = n.propTypes;
545
+ r.$$typeof === C))
546
+ s = r.propTypes;
547
547
  else
548
548
  return;
549
- if (a) {
550
- var u = V(n);
551
- ct(a, e.props, "prop", u, e);
552
- } else if (n.PropTypes !== void 0 && !Se) {
549
+ if (s) {
550
+ var c = V(r);
551
+ ct(s, e.props, "prop", c, e);
552
+ } else if (r.PropTypes !== void 0 && !Se) {
553
553
  Se = !0;
554
- var w = V(n);
555
- p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", w || "Unknown");
554
+ var E = V(r);
555
+ f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
556
556
  }
557
- typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
558
558
  }
559
559
  }
560
560
  function Ct(e) {
561
561
  {
562
- for (var n = Object.keys(e.props), a = 0; a < n.length; a++) {
563
- var u = n[a];
564
- if (u !== "children" && u !== "key") {
565
- K(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), K(null);
562
+ for (var r = Object.keys(e.props), s = 0; s < r.length; s++) {
563
+ var c = r[s];
564
+ if (c !== "children" && c !== "key") {
565
+ ee(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), ee(null);
566
566
  break;
567
567
  }
568
568
  }
569
- e.ref !== null && (K(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
569
+ e.ref !== null && (ee(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), ee(null));
570
570
  }
571
571
  }
572
- var He = {};
573
- function Xe(e, n, a, u, w, S) {
572
+ var Ue = {};
573
+ function He(e, r, s, c, E, b) {
574
574
  {
575
- var m = W(e);
576
- if (!m) {
577
- var h = "";
578
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " 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 $ = bt();
580
- $ ? h += $ : h += We();
575
+ var y = W(e);
576
+ if (!y) {
577
+ var v = "";
578
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " 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 F = bt();
580
+ F ? v += F : v += We();
581
581
  var T;
582
- e === null ? T = "null" : be(e) ? T = "array" : e !== void 0 && e.$$typeof === o ? (T = "<" + (V(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : T = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, h);
582
+ e === null ? T = "null" : be(e) ? T = "array" : e !== void 0 && e.$$typeof === o ? (T = "<" + (V(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : T = 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", T, v);
583
583
  }
584
- var k = wt(e, n, a, w, S);
585
- if (k == null)
586
- return k;
587
- if (m) {
588
- var Y = n.children;
584
+ var P = wt(e, r, s, E, b);
585
+ if (P == null)
586
+ return P;
587
+ if (y) {
588
+ var Y = r.children;
589
589
  if (Y !== void 0)
590
- if (u)
590
+ if (c)
591
591
  if (be(Y)) {
592
- for (var ee = 0; ee < Y.length; ee++)
593
- Ye(Y[ee], e);
592
+ for (var te = 0; te < Y.length; te++)
593
+ Ye(Y[te], e);
594
594
  Object.freeze && Object.freeze(Y);
595
595
  } else
596
- p("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
+ 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.");
597
597
  else
598
598
  Ye(Y, e);
599
599
  }
600
- if (le.call(n, "key")) {
601
- var U = V(e), z = Object.keys(n).filter(function(Dt) {
600
+ if (le.call(r, "key")) {
601
+ var Z = V(e), N = Object.keys(r).filter(function(Dt) {
602
602
  return Dt !== "key";
603
- }), je = z.length > 0 ? "{key: someKey, " + z.join(": ..., ") + ": ...}" : "{key: someKey}";
604
- if (!He[U + je]) {
605
- var kt = z.length > 0 ? "{" + z.join(": ..., ") + ": ...}" : "{}";
606
- p(`A props object containing a "key" prop is being spread into JSX:
603
+ }), _e = N.length > 0 ? "{key: someKey, " + N.join(": ..., ") + ": ...}" : "{key: someKey}";
604
+ if (!Ue[Z + _e]) {
605
+ var kt = N.length > 0 ? "{" + N.join(": ..., ") + ": ...}" : "{}";
606
+ f(`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} />`, je, U, kt, U), He[U + je] = !0;
611
+ <%s key={someKey} {...props} />`, _e, Z, kt, Z), Ue[Z + _e] = !0;
612
612
  }
613
613
  }
614
- return e === i ? Ct(k) : St(k), k;
614
+ return e === i ? Ct(P) : St(P), P;
615
615
  }
616
616
  }
617
- function jt(e, n, a) {
618
- return Xe(e, n, a, !0);
617
+ function _t(e, r, s) {
618
+ return He(e, r, s, !0);
619
619
  }
620
- function _t(e, n, a) {
621
- return Xe(e, n, a, !1);
620
+ function jt(e, r, s) {
621
+ return He(e, r, s, !1);
622
622
  }
623
- var Pt = _t, Tt = jt;
624
- ce.Fragment = i, ce.jsx = Pt, ce.jsxs = Tt;
623
+ var Tt = jt, Pt = _t;
624
+ ce.Fragment = i, ce.jsx = Tt, ce.jsxs = Pt;
625
625
  }()), ce;
626
626
  }
627
- process.env.NODE_ENV === "production" ? Te.exports = At() : Te.exports = Ft();
628
- var l = Te.exports;
627
+ process.env.NODE_ENV === "production" ? Pe.exports = At() : Pe.exports = Ft();
628
+ var l = Pe.exports;
629
629
  function $t(t) {
630
630
  if (t.id && /^[a-zA-Z][\w-]*$/.test(t.id))
631
631
  return `#${t.id}`;
632
632
  const o = [];
633
- let r = t;
634
- for (; r && r.nodeType === Node.ELEMENT_NODE; ) {
635
- let i = r.nodeName.toLowerCase();
636
- if (r.id && /^[a-zA-Z][\w-]*$/.test(r.id)) {
637
- o.unshift(`#${r.id}`);
633
+ let n = t;
634
+ for (; n && n.nodeType === Node.ELEMENT_NODE; ) {
635
+ let i = n.nodeName.toLowerCase();
636
+ if (n.id && /^[a-zA-Z][\w-]*$/.test(n.id)) {
637
+ o.unshift(`#${n.id}`);
638
638
  break;
639
639
  }
640
- if (r.className && typeof r.className == "string") {
641
- const s = r.className.trim().split(/\s+/).filter(Boolean);
642
- if (s.length > 0) {
643
- const c = s.filter((v) => /^[a-zA-Z][\w-]*$/.test(v)).slice(0, 2).map((v) => `.${v}`).join("");
644
- c && (i += c);
640
+ if (n.className && typeof n.className == "string") {
641
+ const a = n.className.trim().split(/\s+/).filter(Boolean);
642
+ if (a.length > 0) {
643
+ const d = a.filter((g) => /^[a-zA-Z][\w-]*$/.test(g)).slice(0, 2).map((g) => `.${g}`).join("");
644
+ d && (i += d);
645
645
  }
646
646
  }
647
647
  if (o.length > 0) {
648
- const s = r.parentElement;
649
- if (s) {
650
- const c = Array.from(s.children).filter(
651
- (v) => v.nodeName === r.nodeName
648
+ const a = n.parentElement;
649
+ if (a) {
650
+ const d = Array.from(a.children).filter(
651
+ (g) => g.nodeName === n.nodeName
652
652
  );
653
- if (c.length > 1) {
654
- const v = c.indexOf(r) + 1;
655
- i += `:nth-child(${v})`;
653
+ if (d.length > 1) {
654
+ const g = d.indexOf(n) + 1;
655
+ i += `:nth-child(${g})`;
656
656
  }
657
657
  }
658
658
  }
659
- o.unshift(i), r = r.parentElement;
659
+ o.unshift(i), n = n.parentElement;
660
660
  }
661
661
  return o.join(" > ");
662
662
  }
@@ -672,10 +672,10 @@ function et(t) {
672
672
  function Nt(t) {
673
673
  if (typeof window > "u")
674
674
  return { relativeX: 0, relativeY: 0 };
675
- const o = window.innerWidth, r = window.innerHeight;
675
+ const o = window.innerWidth, n = window.innerHeight;
676
676
  return {
677
677
  relativeX: o > 0 ? t.left / o : 0,
678
- relativeY: r > 0 ? t.top / r : 0
678
+ relativeY: n > 0 ? t.top / n : 0
679
679
  };
680
680
  }
681
681
  function zt(t) {
@@ -684,10 +684,10 @@ function zt(t) {
684
684
  x: t.x ?? 0,
685
685
  y: t.y ?? 0
686
686
  };
687
- const o = t.relativeX ?? null, r = t.relativeY ?? null;
688
- return o != null && r != null ? {
687
+ const o = t.relativeX ?? null, n = t.relativeY ?? null;
688
+ return o != null && n != null ? {
689
689
  x: o * window.innerWidth,
690
- y: r * window.innerHeight
690
+ y: n * window.innerHeight
691
691
  } : {
692
692
  x: t.x ?? 0,
693
693
  y: t.y ?? 0
@@ -712,62 +712,62 @@ function de(t) {
712
712
  "x-review-key": t
713
713
  };
714
714
  }
715
- async function Mt(t, o, r) {
715
+ async function Mt(t, o, n) {
716
716
  const i = await fetch(`${t}/reviewers`, {
717
717
  headers: de(o),
718
- signal: r == null ? void 0 : r.signal
718
+ signal: n == null ? void 0 : n.signal
719
719
  });
720
720
  if (!i.ok) throw new Error("Failed to fetch reviewers");
721
721
  return (await i.json()).data ?? [];
722
722
  }
723
- async function Wt(t, o, r) {
723
+ async function Wt(t, o, n) {
724
724
  const i = await fetch(`${t}/comments`, {
725
725
  method: "POST",
726
726
  headers: de(o),
727
- body: JSON.stringify(r)
727
+ body: JSON.stringify(n)
728
728
  });
729
729
  if (!i.ok) {
730
- const c = await i.json().catch(() => ({}));
731
- throw new Error(c.message || "Failed to create comment");
730
+ const d = await i.json().catch(() => ({}));
731
+ throw new Error(d.message || "Failed to create comment");
732
732
  }
733
733
  return (await i.json()).data;
734
734
  }
735
- async function Vt(t, o, r, i) {
736
- const s = new URLSearchParams({ url: r }), c = await fetch(`${t}/comments?${s}`, {
735
+ async function Vt(t, o, n, i) {
736
+ const a = new URLSearchParams({ url: n }), d = await fetch(`${t}/comments?${a}`, {
737
737
  headers: de(o),
738
738
  signal: i == null ? void 0 : i.signal
739
739
  });
740
- if (!c.ok) throw new Error("Failed to fetch comments");
741
- return (await c.json()).data ?? [];
740
+ if (!d.ok) throw new Error("Failed to fetch comments");
741
+ return (await d.json()).data ?? [];
742
742
  }
743
- async function Bt(t, o, r, i) {
744
- const s = await fetch(`${t}/comments/${r}/status`, {
743
+ async function Bt(t, o, n, i) {
744
+ const a = await fetch(`${t}/comments/${n}/status`, {
745
745
  method: "PATCH",
746
746
  headers: de(o),
747
747
  body: JSON.stringify({ status: i })
748
748
  });
749
- if (!s.ok) {
750
- const v = await s.json().catch(() => ({}));
751
- throw new Error(v.message || "Failed to update comment status");
749
+ if (!a.ok) {
750
+ const g = await a.json().catch(() => ({}));
751
+ throw new Error(g.message || "Failed to update comment status");
752
752
  }
753
- return (await s.json()).data;
753
+ return (await a.json()).data;
754
754
  }
755
- async function Yt(t, o, r) {
756
- const i = await fetch(`${t}/comments/${r}`, {
755
+ async function Yt(t, o, n) {
756
+ const i = await fetch(`${t}/comments/${n}`, {
757
757
  method: "DELETE",
758
758
  headers: de(o)
759
759
  });
760
760
  if (!i.ok) {
761
- const s = await i.json().catch(() => ({}));
762
- throw new Error(s.message || "Failed to delete comment");
761
+ const a = await i.json().catch(() => ({}));
762
+ throw new Error(a.message || "Failed to delete comment");
763
763
  }
764
764
  }
765
- const Ht = {
765
+ const Ut = {
766
766
  position: "fixed",
767
767
  inset: 0,
768
768
  zIndex: 999997,
769
769
  backgroundColor: "transparent"
770
- }, Xt = {
770
+ }, Ht = {
771
771
  position: "fixed",
772
772
  minWidth: 320,
773
773
  maxWidth: 400,
@@ -777,7 +777,7 @@ const Ht = {
777
777
  borderRadius: 8,
778
778
  boxShadow: "0 8px 24px rgba(0,0,0,0.15)",
779
779
  zIndex: 999998
780
- }, Gt = {
780
+ }, Xt = {
781
781
  width: "100%",
782
782
  minHeight: 80,
783
783
  padding: "8px 12px",
@@ -787,14 +787,14 @@ const Ht = {
787
787
  fontSize: 14,
788
788
  resize: "vertical",
789
789
  boxSizing: "border-box"
790
- }, Jt = {
790
+ }, Gt = {
791
791
  width: "100%",
792
792
  padding: "8px 12px",
793
793
  marginBottom: 12,
794
794
  border: "1px solid #d9d9d9",
795
795
  borderRadius: 6,
796
796
  fontSize: 14
797
- }, qt = {
797
+ }, Jt = {
798
798
  padding: "8px 16px",
799
799
  backgroundColor: "#ff4d4f",
800
800
  color: "#fff",
@@ -804,35 +804,35 @@ const Ht = {
804
804
  cursor: "pointer",
805
805
  fontWeight: 500
806
806
  };
807
- function Ut({
807
+ function qt({
808
808
  apiUrl: t,
809
809
  apiKey: o,
810
- reviewers: r,
810
+ reviewers: n,
811
811
  position: i,
812
- payload: s,
813
- onClose: c,
814
- onSuccess: v
812
+ payload: a,
813
+ onClose: d,
814
+ onSuccess: g
815
815
  }) {
816
- var y;
817
- const [d, E] = L(""), [b, g] = L(
818
- ((y = r[0]) == null ? void 0 : y.id) ?? 0
819
- ), [j, R] = L(!1), [_, A] = L(null);
820
- N(() => {
821
- r.length > 0 && !b && g(r[0].id);
822
- }, [r, b]);
823
- const O = async (f) => {
824
- if (f.preventDefault(), !(!d.trim() || !b)) {
825
- R(!0), A(null);
816
+ var z;
817
+ const [p, m] = A(""), [R, h] = A(
818
+ ((z = n[0]) == null ? void 0 : z.id) ?? 0
819
+ ), [C, w] = A(!1), [O, _] = A(null);
820
+ $(() => {
821
+ n.length > 0 && !R && h(n[0].id);
822
+ }, [n, R]);
823
+ const I = async (u) => {
824
+ if (u.preventDefault(), !(!p.trim() || !R)) {
825
+ w(!0), _(null);
826
826
  try {
827
827
  await Wt(t, o, {
828
- ...s,
829
- message: d.trim(),
830
- reviewerId: b
831
- }), v(), c();
832
- } catch (p) {
833
- A(p instanceof Error ? p.message : "Failed to send comment");
828
+ ...a,
829
+ message: p.trim(),
830
+ reviewerId: R
831
+ }), g(), d();
832
+ } catch (f) {
833
+ _(f instanceof Error ? f.message : "Failed to send comment");
834
834
  } finally {
835
- R(!1);
835
+ w(!1);
836
836
  }
837
837
  }
838
838
  };
@@ -841,28 +841,28 @@ function Ut({
841
841
  "div",
842
842
  {
843
843
  role: "presentation",
844
- style: Ht,
845
- onClick: c,
846
- onKeyDown: (f) => f.key === "Escape" && c()
844
+ style: Ut,
845
+ onClick: d,
846
+ onKeyDown: (u) => u.key === "Escape" && d()
847
847
  }
848
848
  ),
849
849
  /* @__PURE__ */ l.jsx(
850
850
  "div",
851
851
  {
852
852
  style: {
853
- ...Xt,
853
+ ...Ht,
854
854
  left: Math.min(i.x, typeof window < "u" ? window.innerWidth - 420 : i.x),
855
855
  top: i.y + 12
856
856
  },
857
- onClick: (f) => f.stopPropagation(),
858
- children: /* @__PURE__ */ l.jsxs("form", { onSubmit: O, children: [
857
+ onClick: (u) => u.stopPropagation(),
858
+ children: /* @__PURE__ */ l.jsxs("form", { onSubmit: I, children: [
859
859
  /* @__PURE__ */ l.jsx(
860
860
  "textarea",
861
861
  {
862
862
  placeholder: "Escribe tu comentario...",
863
- value: d,
864
- onChange: (f) => E(f.target.value),
865
- style: Gt,
863
+ value: p,
864
+ onChange: (u) => m(u.target.value),
865
+ style: Xt,
866
866
  required: !0,
867
867
  autoFocus: !0
868
868
  }
@@ -870,18 +870,18 @@ function Ut({
870
870
  /* @__PURE__ */ l.jsxs(
871
871
  "select",
872
872
  {
873
- value: b,
874
- onChange: (f) => g(Number(f.target.value)),
875
- style: Jt,
873
+ value: R,
874
+ onChange: (u) => h(Number(u.target.value)),
875
+ style: Gt,
876
876
  required: !0,
877
- disabled: r.length === 0,
877
+ disabled: n.length === 0,
878
878
  children: [
879
- /* @__PURE__ */ l.jsx("option", { value: "", children: r.length === 0 ? "No hay revisores (ejecuta php artisan db:seed en la API)" : "Selecciona revisor" }),
880
- r.map((f) => /* @__PURE__ */ l.jsx("option", { value: f.id, children: f.name }, f.id))
879
+ /* @__PURE__ */ l.jsx("option", { value: "", children: n.length === 0 ? "No hay revisores (ejecuta php artisan db:seed en la API)" : "Selecciona revisor" }),
880
+ n.map((u) => /* @__PURE__ */ l.jsx("option", { value: u.id, children: u.name }, u.id))
881
881
  ]
882
882
  }
883
883
  ),
884
- _ && /* @__PURE__ */ l.jsx(
884
+ O && /* @__PURE__ */ l.jsx(
885
885
  "div",
886
886
  {
887
887
  style: {
@@ -889,16 +889,16 @@ function Ut({
889
889
  fontSize: 12,
890
890
  marginBottom: 8
891
891
  },
892
- children: _
892
+ children: O
893
893
  }
894
894
  ),
895
895
  /* @__PURE__ */ l.jsx(
896
896
  "button",
897
897
  {
898
898
  type: "submit",
899
- style: qt,
900
- disabled: j || r.length === 0,
901
- children: j ? "Enviando..." : "Enviar comentario"
899
+ style: Jt,
900
+ disabled: C || n.length === 0,
901
+ children: C ? "Enviando..." : "Enviar comentario"
902
902
  }
903
903
  )
904
904
  ] })
@@ -915,36 +915,36 @@ const Zt = {
915
915
  boxSizing: "border-box"
916
916
  };
917
917
  function Qt({ selector: t, active: o }) {
918
- const [r, i] = L(null), s = I(() => {
918
+ const [n, i] = A(null), a = L(() => {
919
919
  if (!o || !(t != null && t.trim())) {
920
920
  i(null);
921
921
  return;
922
922
  }
923
- const c = et(t);
924
- i(c);
923
+ const d = et(t);
924
+ i(d);
925
925
  }, [t, o]);
926
- return N(() => {
927
- s();
928
- }, [s]), N(() => {
926
+ return $(() => {
927
+ a();
928
+ }, [a]), $(() => {
929
929
  if (!(!o || !(t != null && t.trim())))
930
- return window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), () => {
931
- window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s);
930
+ return window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
931
+ window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
932
932
  };
933
- }, [o, t, s]), !o || r == null ? null : /* @__PURE__ */ l.jsx(
933
+ }, [o, t, a]), !o || n == null ? null : /* @__PURE__ */ l.jsx(
934
934
  "div",
935
935
  {
936
936
  "aria-hidden": !0,
937
937
  style: {
938
938
  ...Zt,
939
- left: r.left,
940
- top: r.top,
941
- width: r.width,
942
- height: r.height
939
+ left: n.left,
940
+ top: n.top,
941
+ width: n.width,
942
+ height: n.height
943
943
  }
944
944
  }
945
945
  );
946
946
  }
947
- const ke = 32, qe = 5e6, B = {
947
+ const ke = 32, Je = 5e6, B = {
948
948
  cardBg: "#ffffff",
949
949
  textDark: "#333333",
950
950
  textMuted: "#888888",
@@ -958,7 +958,7 @@ const ke = 32, qe = 5e6, B = {
958
958
  [D.PENDING]: "PENDIENTE",
959
959
  [D.DEV_FIXED]: "CORREGIDO DESARROLLO",
960
960
  [D.VALIDATED]: "VALIDADO"
961
- }, Z = {
961
+ }, Q = {
962
962
  [D.PENDING]: "rgb(240, 69, 69)",
963
963
  [D.DEV_FIXED]: "rgb(235, 179, 8)",
964
964
  [D.VALIDATED]: "rgb(33, 196, 94)"
@@ -993,7 +993,7 @@ const rr = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
993
993
  width: ke,
994
994
  height: ke,
995
995
  borderRadius: "50%",
996
- backgroundColor: Z[t] ?? Z[D.PENDING],
996
+ backgroundColor: Q[t] ?? Q[D.PENDING],
997
997
  color: "#fff",
998
998
  display: "flex",
999
999
  alignItems: "center",
@@ -1024,7 +1024,7 @@ const rr = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
1024
1024
  width: 40,
1025
1025
  height: 40,
1026
1026
  borderRadius: "50%",
1027
- backgroundColor: Z[t] ?? Z[D.PENDING],
1027
+ backgroundColor: Q[t] ?? Q[D.PENDING],
1028
1028
  color: "#fff",
1029
1029
  border: "2px solid #fff",
1030
1030
  display: "flex",
@@ -1061,7 +1061,7 @@ const rr = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
1061
1061
  fontFamily: "'Inter', sans-serif",
1062
1062
  textTransform: "uppercase",
1063
1063
  letterSpacing: "0.02em",
1064
- backgroundColor: Z[t] ?? Z[D.PENDING],
1064
+ backgroundColor: Q[t] ?? Q[D.PENDING],
1065
1065
  color: o ? B.textDark : "#fff"
1066
1066
  };
1067
1067
  }, cr = {
@@ -1112,75 +1112,75 @@ const rr = () => /* @__PURE__ */ l.jsx("svg", { width: "12", height: "12", viewB
1112
1112
  color: B.textDark
1113
1113
  }, hr = {
1114
1114
  ...tt,
1115
- backgroundColor: Z[D.VALIDATED],
1115
+ backgroundColor: Q[D.VALIDATED],
1116
1116
  color: "#fff"
1117
1117
  };
1118
1118
  function vr({
1119
1119
  comment: t,
1120
1120
  offset: o = { dx: 0, dy: 0 },
1121
- apiUrl: r,
1121
+ apiUrl: n,
1122
1122
  apiKey: i,
1123
- onStatusChange: s
1123
+ onStatusChange: a
1124
1124
  }) {
1125
1125
  var ne, oe;
1126
- const [c, v] = L(!1), [d, E] = L(!1), [b, g] = L(() => ye(t)), [j, R] = L(!1), [_, A] = L(null), O = ge(null), y = ge(null), f = ge(null), p = I(() => {
1127
- g(ye(t));
1126
+ const [d, g] = A(!1), [p, m] = A(!1), [R, h] = A(() => ye(t)), [C, w] = A(!1), [O, _] = A(null), I = ge(null), z = ge(null), u = ge(null), f = L(() => {
1127
+ h(ye(t));
1128
1128
  }, [t]);
1129
- N(() => {
1130
- p();
1131
- }, [p]), N(() => {
1129
+ $(() => {
1130
+ f();
1131
+ }, [f]), $(() => {
1132
1132
  if (!(typeof window > "u"))
1133
- return window.addEventListener("scroll", p, !0), window.addEventListener("resize", p), () => {
1134
- window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
1133
+ return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
1134
+ window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
1135
1135
  };
1136
+ }, [f]);
1137
+ const k = L(() => {
1138
+ I.current !== null && (clearTimeout(I.current), I.current = null);
1139
+ }, []), U = L(() => {
1140
+ k(), g(!0);
1141
+ }, [k]), X = L(() => {
1142
+ p || (I.current = setTimeout(() => {
1143
+ I.current = null, g(!1);
1144
+ }, Je));
1145
+ }, [p]), K = L(() => {
1146
+ k(), g(!0);
1147
+ }, [k]), S = L(() => {
1148
+ p || (I.current = setTimeout(() => {
1149
+ I.current = null, g(!1);
1150
+ }, Je));
1151
+ }, [p]), j = L(() => {
1152
+ p ? (m(!1), g(!1)) : (m(!0), g(!0));
1136
1153
  }, [p]);
1137
- const F = I(() => {
1138
- O.current !== null && (clearTimeout(O.current), O.current = null);
1139
- }, []), X = I(() => {
1140
- F(), v(!0);
1141
- }, [F]), te = I(() => {
1142
- d || (O.current = setTimeout(() => {
1143
- O.current = null, v(!1);
1144
- }, qe));
1145
- }, [d]), Q = I(() => {
1146
- F(), v(!0);
1147
- }, [F]), C = I(() => {
1148
- d || (O.current = setTimeout(() => {
1149
- O.current = null, v(!1);
1150
- }, qe));
1151
- }, [d]), P = I(() => {
1152
- d ? (E(!1), v(!1)) : (E(!0), v(!0));
1153
- }, [d]);
1154
- N(() => {
1155
- if (!d) return;
1154
+ $(() => {
1155
+ if (!p) return;
1156
1156
  const x = (q) => {
1157
1157
  var ae, se;
1158
1158
  const ie = q.target;
1159
- (ae = y.current) != null && ae.contains(ie) || (se = f.current) != null && se.contains(ie) || (E(!1), v(!1));
1159
+ (ae = z.current) != null && ae.contains(ie) || (se = u.current) != null && se.contains(ie) || (m(!1), g(!1));
1160
1160
  };
1161
1161
  return document.addEventListener("mousedown", x, !0), () => document.removeEventListener("mousedown", x, !0);
1162
- }, [d]), N(() => () => F(), [F]);
1163
- const M = b.x + o.dx, W = b.y + o.dy, re = c, G = I(() => {
1164
- E(!1), v(!1);
1162
+ }, [p]), $(() => () => k(), [k]);
1163
+ const M = R.x + o.dx, W = R.y + o.dy, re = d, G = L(() => {
1164
+ m(!1), g(!1);
1165
1165
  }, []), V = async (x) => {
1166
1166
  if (x !== t.status) {
1167
- A(null), R(!0);
1167
+ _(null), w(!0);
1168
1168
  try {
1169
- await Bt(r, i, t.id, x), s();
1169
+ await Bt(n, i, t.id, x), a();
1170
1170
  } catch (q) {
1171
- A(q instanceof Error ? q.message : "Error al actualizar");
1171
+ _(q instanceof Error ? q.message : "Error al actualizar");
1172
1172
  } finally {
1173
- R(!1);
1173
+ w(!1);
1174
1174
  }
1175
1175
  }
1176
1176
  }, H = async () => {
1177
- A(null), R(!0);
1177
+ _(null), w(!0);
1178
1178
  try {
1179
- await Yt(r, i, t.id), s(), G();
1179
+ await Yt(n, i, t.id), a(), G();
1180
1180
  } catch (x) {
1181
- A(x instanceof Error ? x.message : "Error al eliminar");
1181
+ _(x instanceof Error ? x.message : "Error al eliminar");
1182
1182
  } finally {
1183
- R(!1);
1183
+ w(!1);
1184
1184
  }
1185
1185
  }, J = [
1186
1186
  "pending",
@@ -1192,27 +1192,27 @@ function vr({
1192
1192
  /* @__PURE__ */ l.jsx(
1193
1193
  "div",
1194
1194
  {
1195
- ref: y,
1195
+ ref: z,
1196
1196
  role: "button",
1197
1197
  tabIndex: 0,
1198
1198
  "aria-label": `Comentario: ${t.message.slice(0, 30)}...`,
1199
- "aria-expanded": c,
1199
+ "aria-expanded": d,
1200
1200
  style: {
1201
1201
  ...or(t.status),
1202
1202
  left: M,
1203
1203
  top: W,
1204
1204
  transform: "translate(-50%, -50%)"
1205
1205
  },
1206
- onMouseEnter: X,
1207
- onMouseLeave: te,
1208
- onClick: P,
1206
+ onMouseEnter: U,
1207
+ onMouseLeave: X,
1208
+ onClick: j,
1209
1209
  children: /* @__PURE__ */ l.jsx(nr, { color: "#fff" })
1210
1210
  }
1211
1211
  ),
1212
- c && /* @__PURE__ */ l.jsxs(
1212
+ d && /* @__PURE__ */ l.jsxs(
1213
1213
  "div",
1214
1214
  {
1215
- ref: f,
1215
+ ref: u,
1216
1216
  role: "dialog",
1217
1217
  "aria-label": "Detalle del comentario",
1218
1218
  style: {
@@ -1220,8 +1220,8 @@ function vr({
1220
1220
  left: M + ke / 2 + 6,
1221
1221
  top: W
1222
1222
  },
1223
- onMouseEnter: Q,
1224
- onMouseLeave: C,
1223
+ onMouseEnter: K,
1224
+ onMouseLeave: S,
1225
1225
  children: [
1226
1226
  /* @__PURE__ */ l.jsxs("div", { style: ar, children: [
1227
1227
  /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, flex: 1, minWidth: 0 }, children: [
@@ -1237,7 +1237,7 @@ function vr({
1237
1237
  type: "button",
1238
1238
  "aria-label": t.status === D.VALIDATED ? "Eliminar comentario" : "Cerrar",
1239
1239
  style: lr,
1240
- disabled: j,
1240
+ disabled: C,
1241
1241
  onClick: (x) => {
1242
1242
  x.stopPropagation(), t.status === D.VALIDATED ? H() : G();
1243
1243
  },
@@ -1258,14 +1258,14 @@ function vr({
1258
1258
  id: `comment-status-${t.id}`,
1259
1259
  style: dr,
1260
1260
  value: t.status,
1261
- disabled: j,
1261
+ disabled: C,
1262
1262
  onChange: (x) => V(x.target.value),
1263
1263
  onMouseDown: (x) => x.stopPropagation(),
1264
1264
  "aria-label": "Cambiar estado del comentario",
1265
1265
  children: J.map((x) => /* @__PURE__ */ l.jsx("option", { value: x, children: Kt[x] }, x))
1266
1266
  }
1267
1267
  ),
1268
- _ && /* @__PURE__ */ l.jsx("div", { style: { marginTop: 8, fontSize: 11, color: "rgb(240, 69, 69)" }, children: _ }),
1268
+ O && /* @__PURE__ */ l.jsx("div", { style: { marginTop: 8, fontSize: 11, color: "rgb(240, 69, 69)" }, children: O }),
1269
1269
  /* @__PURE__ */ l.jsxs("div", { style: fr, children: [
1270
1270
  /* @__PURE__ */ l.jsx(
1271
1271
  "button",
@@ -1284,7 +1284,7 @@ function vr({
1284
1284
  {
1285
1285
  type: "button",
1286
1286
  style: hr,
1287
- disabled: j,
1287
+ disabled: C,
1288
1288
  onMouseDown: (x) => x.stopPropagation(),
1289
1289
  onClick: (x) => {
1290
1290
  x.stopPropagation(), V("validated");
@@ -1301,14 +1301,14 @@ function vr({
1301
1301
  const gr = 25, yr = 36;
1302
1302
  function mr(t) {
1303
1303
  const o = /* @__PURE__ */ new Map();
1304
- for (let r = 0; r < t.length; r++) {
1305
- const i = t[r], { x: s, y: c } = ye(i);
1306
- let v = 0;
1307
- for (let d = 0; d < r; d++) {
1308
- const E = t[d], { x: b, y: g } = ye(E);
1309
- Math.hypot(s - b, c - g) < gr && v++;
1304
+ for (let n = 0; n < t.length; n++) {
1305
+ const i = t[n], { x: a, y: d } = ye(i);
1306
+ let g = 0;
1307
+ for (let p = 0; p < n; p++) {
1308
+ const m = t[p], { x: R, y: h } = ye(m);
1309
+ Math.hypot(a - R, d - h) < gr && g++;
1310
1310
  }
1311
- o.set(i.id, { dx: v * yr, dy: 0 });
1311
+ o.set(i.id, { dx: g * yr, dy: 0 });
1312
1312
  }
1313
1313
  return o;
1314
1314
  }
@@ -1318,52 +1318,52 @@ function xr() {
1318
1318
  function Er({
1319
1319
  apiUrl: t,
1320
1320
  apiKey: o,
1321
- reviewMode: r,
1321
+ reviewMode: n,
1322
1322
  reviewers: i,
1323
- comments: s,
1324
- loadComments: c,
1325
- commentsLoadFailed: v = !1
1323
+ comments: a,
1324
+ loadComments: d,
1325
+ commentsLoadFailed: g = !1
1326
1326
  }) {
1327
- const [d, E] = L(null), b = ge(null), [g, j] = L(null), R = I(() => {
1328
- d && (d.style.outline = "", d.style.outlineOffset = "", E(null));
1329
- }, [d]), _ = I(() => {
1330
- b.current && (b.current.style.outline = "", b.current.style.outlineOffset = "", b.current = null);
1327
+ const [p, m] = A(null), R = ge(null), [h, C] = A(null), w = L(() => {
1328
+ p && (p.style.outline = "", p.style.outlineOffset = "", m(null));
1329
+ }, [p]), O = L(() => {
1330
+ R.current && (R.current.style.outline = "", R.current.style.outlineOffset = "", R.current = null);
1331
1331
  }, []);
1332
- N(() => {
1333
- r || (R(), _());
1334
- }, [r, R, _]), N(() => {
1332
+ $(() => {
1333
+ n || (w(), O());
1334
+ }, [n, w, O]), $(() => {
1335
1335
  if (typeof document > "u") return;
1336
- const C = document.body.style.cursor;
1337
- return g ? document.body.style.cursor = "default" : r && (document.body.style.cursor = "crosshair"), () => {
1338
- document.body.style.cursor = C;
1336
+ const S = document.body.style.cursor;
1337
+ return h ? document.body.style.cursor = "default" : n && (document.body.style.cursor = "crosshair"), () => {
1338
+ document.body.style.cursor = S;
1339
1339
  };
1340
- }, [r, g]);
1341
- const A = I(
1342
- (C) => {
1343
- if (!r || g) return;
1344
- const P = C.target.nodeType === Node.ELEMENT_NODE ? C.target : C.target.parentElement;
1345
- P && (R(), E(P), P.style.outline = "2px solid #ff4d4f", P.style.outlineOffset = "2px");
1340
+ }, [n, h]);
1341
+ const _ = L(
1342
+ (S) => {
1343
+ if (!n || h) return;
1344
+ const j = S.target.nodeType === Node.ELEMENT_NODE ? S.target : S.target.parentElement;
1345
+ j && (w(), m(j), j.style.outline = "2px solid #ff4d4f", j.style.outlineOffset = "2px");
1346
1346
  },
1347
- [r, g, R]
1348
- ), O = I(
1349
- (C) => {
1347
+ [n, h, w]
1348
+ ), I = L(
1349
+ (S) => {
1350
1350
  var M;
1351
- if (g) return;
1352
- const P = C.relatedTarget;
1353
- d && (!P || !d.contains(P)) && !(P && ((M = d.contains) != null && M.call(d, P))) && R();
1351
+ if (h) return;
1352
+ const j = S.relatedTarget;
1353
+ p && (!j || !p.contains(j)) && !(j && ((M = p.contains) != null && M.call(p, j))) && w();
1354
1354
  },
1355
- [d, g, R]
1356
- ), y = I(
1357
- (C) => {
1358
- if (!r || g) return;
1359
- C.preventDefault(), C.stopPropagation();
1360
- const P = C.target;
1361
- if (!P || P.closest("[data-review-layer-pin]") || P.closest("[data-review-layer-modal]")) return;
1362
- R();
1363
- const M = P;
1364
- b.current = M, M.style.outline = "2px solid #ff4d4f", M.style.outlineOffset = "2px";
1365
- const W = M.getBoundingClientRect(), re = $t(P), { relativeX: G, relativeY: V } = Nt(W);
1366
- j({
1355
+ [p, h, w]
1356
+ ), z = L(
1357
+ (S) => {
1358
+ if (!n || h) return;
1359
+ S.preventDefault(), S.stopPropagation();
1360
+ const j = S.target;
1361
+ if (!j || j.closest("[data-review-layer-pin]") || j.closest("[data-review-layer-modal]")) return;
1362
+ w();
1363
+ const M = j;
1364
+ R.current = M, M.style.outline = "2px solid #ff4d4f", M.style.outlineOffset = "2px";
1365
+ const W = M.getBoundingClientRect(), re = $t(j), { relativeX: G, relativeY: V } = Nt(W);
1366
+ C({
1367
1367
  position: { x: W.left + W.width / 2, y: W.bottom },
1368
1368
  payload: {
1369
1369
  selector: re,
@@ -1380,33 +1380,33 @@ function Er({
1380
1380
  }
1381
1381
  });
1382
1382
  },
1383
- [r, g, R]
1383
+ [n, h, w]
1384
1384
  );
1385
- N(() => {
1386
- if (r)
1387
- return document.addEventListener("mouseover", A, !0), document.addEventListener("mouseout", O, !0), document.addEventListener("click", y, !0), () => {
1388
- document.removeEventListener("mouseover", A, !0), document.removeEventListener("mouseout", O, !0), document.removeEventListener("click", y, !0);
1385
+ $(() => {
1386
+ if (n)
1387
+ return document.addEventListener("mouseover", _, !0), document.addEventListener("mouseout", I, !0), document.addEventListener("click", z, !0), () => {
1388
+ document.removeEventListener("mouseover", _, !0), document.removeEventListener("mouseout", I, !0), document.removeEventListener("click", z, !0);
1389
1389
  };
1390
- }, [r, A, O, y]);
1391
- const [f, p] = L(0);
1392
- N(() => {
1390
+ }, [n, _, I, z]);
1391
+ const [u, f] = A(0);
1392
+ $(() => {
1393
1393
  if (typeof window > "u") return;
1394
- const C = () => p((P) => P + 1);
1395
- return window.addEventListener("resize", C), window.addEventListener("scroll", C, !0), () => {
1396
- window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
1394
+ const S = () => f((j) => j + 1);
1395
+ return window.addEventListener("resize", S), window.addEventListener("scroll", S, !0), () => {
1396
+ window.removeEventListener("resize", S), window.removeEventListener("scroll", S, !0);
1397
1397
  };
1398
1398
  }, []);
1399
- const F = Ot(
1400
- () => mr(s),
1401
- [s, f]
1402
- ), X = {
1399
+ const k = Ot(
1400
+ () => mr(a),
1401
+ [a, u]
1402
+ ), U = {
1403
1403
  position: "fixed",
1404
1404
  inset: 0,
1405
1405
  zIndex: 999999,
1406
1406
  pointerEvents: "none",
1407
- cursor: r ? "crosshair" : void 0
1408
- }, te = /* @__PURE__ */ l.jsxs("div", { style: X, "aria-hidden": !0, children: [
1409
- r && /* @__PURE__ */ l.jsx(
1407
+ cursor: n ? "crosshair" : void 0
1408
+ }, X = /* @__PURE__ */ l.jsxs("div", { style: U, "aria-hidden": !0, children: [
1409
+ n && /* @__PURE__ */ l.jsx(
1410
1410
  "div",
1411
1411
  {
1412
1412
  style: {
@@ -1425,7 +1425,7 @@ function Er({
1425
1425
  children: "Modo revisión (Shift+R para salir)"
1426
1426
  }
1427
1427
  ),
1428
- v && /* @__PURE__ */ l.jsxs(
1428
+ g && /* @__PURE__ */ l.jsxs(
1429
1429
  "div",
1430
1430
  {
1431
1431
  style: {
@@ -1452,7 +1452,7 @@ function Er({
1452
1452
  "button",
1453
1453
  {
1454
1454
  type: "button",
1455
- onClick: () => c(),
1455
+ onClick: () => d(),
1456
1456
  style: {
1457
1457
  padding: "4px 10px",
1458
1458
  fontSize: 12,
@@ -1469,43 +1469,43 @@ function Er({
1469
1469
  ]
1470
1470
  }
1471
1471
  ),
1472
- s.map((C) => /* @__PURE__ */ l.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ l.jsx(
1472
+ a.map((S) => /* @__PURE__ */ l.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ l.jsx(
1473
1473
  vr,
1474
1474
  {
1475
- comment: C,
1476
- offset: F.get(C.id),
1475
+ comment: S,
1476
+ offset: k.get(S.id),
1477
1477
  apiUrl: t,
1478
1478
  apiKey: o,
1479
- onStatusChange: c
1479
+ onStatusChange: d
1480
1480
  }
1481
- ) }, C.id)),
1482
- g && /* @__PURE__ */ l.jsx("div", { "data-review-layer-modal": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ l.jsx(
1483
- Ut,
1481
+ ) }, S.id)),
1482
+ h && /* @__PURE__ */ l.jsx("div", { "data-review-layer-modal": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ l.jsx(
1483
+ qt,
1484
1484
  {
1485
1485
  apiUrl: t,
1486
1486
  apiKey: o,
1487
1487
  reviewers: i,
1488
- position: g.position,
1489
- payload: g.payload,
1488
+ position: h.position,
1489
+ payload: h.payload,
1490
1490
  onClose: () => {
1491
- _(), j(null);
1491
+ O(), C(null);
1492
1492
  },
1493
- onSuccess: c
1493
+ onSuccess: d
1494
1494
  }
1495
1495
  ) })
1496
- ] }), Q = typeof document < "u" ? document.body : null;
1497
- return Q ? Ke(te, Q) : null;
1496
+ ] }), K = typeof document < "u" ? document.body : null;
1497
+ return K ? Ke(X, K) : null;
1498
1498
  }
1499
- function wr(t, o, r) {
1500
- const i = I(() => {
1501
- t && r((s) => !s);
1502
- }, [t, r]);
1503
- N(() => {
1499
+ function wr(t, o, n) {
1500
+ const i = L(() => {
1501
+ t && n((a) => !a);
1502
+ }, [t, n]);
1503
+ $(() => {
1504
1504
  if (!t) return;
1505
- const s = (c) => {
1506
- (c.key === "r" || c.key === "R" || c.code === "KeyR") && c.shiftKey && (c.preventDefault(), i());
1505
+ const a = (d) => {
1506
+ (d.key === "r" || d.key === "R" || d.code === "KeyR") && d.shiftKey && (d.preventDefault(), i());
1507
1507
  };
1508
- return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
1508
+ return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
1509
1509
  }, [t, i]);
1510
1510
  }
1511
1511
  const br = "review_layer:v1:";
@@ -1517,9 +1517,9 @@ function Rr(t, o) {
1517
1517
  return o;
1518
1518
  }
1519
1519
  }
1520
- function me(t, o, r, i) {
1521
- const s = `${br}${Sr(t)}:${r}`;
1522
- return i != null ? `${s}:${i}` : s;
1520
+ function me(t, o, n, i) {
1521
+ const a = `${br}${Sr(t)}:${n}`;
1522
+ return i != null ? `${a}:${i}` : a;
1523
1523
  }
1524
1524
  function Sr(t) {
1525
1525
  return t.replace(/\/+$/, "") || "/";
@@ -1536,123 +1536,125 @@ function nt(t, o) {
1536
1536
  } catch {
1537
1537
  }
1538
1538
  }
1539
- function _e(t, o, r) {
1540
- const i = rt(me(t, o, "comments", r));
1539
+ function je(t, o, n) {
1540
+ const i = rt(me(t, o, "comments", n));
1541
1541
  return (i == null ? void 0 : i.data) ?? null;
1542
1542
  }
1543
- function Cr(t, o, r, i) {
1544
- nt(me(t, o, "comments", r), i);
1543
+ function Cr(t, o, n, i) {
1544
+ nt(me(t, o, "comments", n), i);
1545
1545
  }
1546
- function Ue(t, o) {
1547
- const r = rt(me(t, o, "reviewers"));
1548
- return (r == null ? void 0 : r.data) ?? null;
1546
+ function qe(t, o) {
1547
+ const n = rt(me(t, o, "reviewers"));
1548
+ return (n == null ? void 0 : n.data) ?? null;
1549
1549
  }
1550
- function jr(t, o, r) {
1551
- nt(me(t, o, "reviewers"), r);
1550
+ function _r(t, o, n) {
1551
+ nt(me(t, o, "reviewers"), n);
1552
1552
  }
1553
+ const jr = "https://review-layer-api.onrender.com/api";
1553
1554
  function Ze() {
1554
1555
  return typeof window > "u" ? "/" : window.location.pathname || "/";
1555
1556
  }
1556
1557
  const ot = It(null);
1557
- let Pe = null;
1558
- function Tr() {
1558
+ let Te = null;
1559
+ function kr() {
1559
1560
  const t = Lt(ot);
1560
1561
  if (!t)
1561
1562
  throw new Error("useReview must be used within ReviewProvider");
1562
1563
  return t;
1563
1564
  }
1564
- function kr({
1565
+ function Dr({
1565
1566
  children: t,
1566
1567
  enabled: o = !0,
1567
- apiUrl: r,
1568
+ apiUrl: n,
1568
1569
  apiKey: i
1569
1570
  }) {
1570
- const [s, c] = L(!1), [v, d] = L([]), [E, b] = L([]), [g, j] = L(!1);
1571
- wr(o, s, c);
1572
- const R = I(
1573
- async (y) => {
1574
- if (!(!o || !r || !i))
1571
+ const a = (n == null ? void 0 : n.trim()) || jr, [d, g] = A(!1), [p, m] = A([]), [R, h] = A([]), [C, w] = A(!1);
1572
+ wr(o, d, g);
1573
+ const O = L(
1574
+ async (u) => {
1575
+ if (!(!o || !a || !i))
1575
1576
  try {
1576
- const f = await Mt(r, i, { signal: y });
1577
- y != null && y.aborted || (d(f), jr(r, i, f));
1577
+ const f = await Mt(a, i, { signal: u });
1578
+ u != null && u.aborted || (m(f), _r(a, i, f));
1578
1579
  } catch (f) {
1579
1580
  if (f instanceof Error && f.name === "AbortError") return;
1580
- if (!(y != null && y.aborted)) {
1581
- const p = Ue(r, i);
1582
- p != null && d(p);
1581
+ if (!(u != null && u.aborted)) {
1582
+ const k = qe(a, i);
1583
+ k != null && m(k);
1583
1584
  }
1584
1585
  }
1585
1586
  },
1586
- [o, r, i]
1587
- ), _ = I(
1588
- async (y) => {
1589
- if (!o || !r || !i) return;
1590
- const f = Ze(), p = _e(r, i, f);
1591
- p != null && b(p);
1587
+ [o, a, i]
1588
+ ), _ = L(
1589
+ async (u) => {
1590
+ if (!o || !a || !i) return;
1591
+ const f = Ze(), k = je(a, i, f);
1592
+ k != null && h(k);
1592
1593
  try {
1593
- j(!1);
1594
- const F = await Vt(r, i, f, { signal: y });
1595
- y != null && y.aborted || (b(F), Cr(r, i, f, F));
1596
- } catch (F) {
1597
- if (F instanceof Error && F.name === "AbortError") return;
1598
- if (!(y != null && y.aborted)) {
1599
- j(!0);
1600
- const X = _e(r, i, f);
1601
- X != null && b(X);
1594
+ w(!1);
1595
+ const U = await Vt(a, i, f, { signal: u });
1596
+ u != null && u.aborted || (h(U), Cr(a, i, f, U));
1597
+ } catch (U) {
1598
+ if (U instanceof Error && U.name === "AbortError") return;
1599
+ if (!(u != null && u.aborted)) {
1600
+ w(!0);
1601
+ const X = je(a, i, f);
1602
+ X != null && h(X);
1602
1603
  }
1603
1604
  }
1604
1605
  },
1605
- [o, r, i]
1606
+ [o, a, i]
1606
1607
  );
1607
- N(() => {
1608
- if (!o || !r || !i) return;
1609
- const y = Ze(), f = Ue(r, i), p = _e(r, i, y);
1610
- f != null && d(f), p != null && b(p);
1611
- }, [o, r, i]), N(() => {
1612
- if (!o || !r || !i) return;
1613
- const y = `${r}:${i}`;
1614
- if (Pe !== y)
1615
- return Pe = y, R(), _(), () => {
1608
+ $(() => {
1609
+ if (!o || !a || !i) return;
1610
+ const u = Ze(), f = qe(a, i), k = je(a, i, u);
1611
+ f != null && m(f), k != null && h(k);
1612
+ }, [o, a, i]), $(() => {
1613
+ if (!o || !a || !i) return;
1614
+ const u = `${a}:${i}`;
1615
+ if (Te !== u)
1616
+ return Te = u, O(), _(), () => {
1616
1617
  setTimeout(() => {
1617
- Pe = null;
1618
+ Te = null;
1618
1619
  }, 0);
1619
1620
  };
1620
- }, [o, r, i, R, _]), N(() => {
1621
+ }, [o, a, i, O, _]), $(() => {
1621
1622
  if (!o) return;
1622
- const y = () => _();
1623
- return window.addEventListener("popstate", y), () => window.removeEventListener("popstate", y);
1623
+ const u = () => _();
1624
+ return window.addEventListener("popstate", u), () => window.removeEventListener("popstate", u);
1624
1625
  }, [o, _]);
1625
- const A = {
1626
- apiUrl: r,
1626
+ const I = {
1627
+ apiUrl: a,
1627
1628
  apiKey: i,
1628
- reviewMode: s,
1629
- setReviewMode: c,
1630
- reviewers: v,
1631
- comments: E,
1629
+ reviewMode: d,
1630
+ setReviewMode: g,
1631
+ reviewers: p,
1632
+ comments: R,
1632
1633
  loadComments: _,
1633
- commentsLoadFailed: g
1634
- }, O = o && typeof document < "u" ? Ke(
1634
+ commentsLoadFailed: C
1635
+ }, z = o && typeof document < "u" ? Ke(
1635
1636
  /* @__PURE__ */ l.jsx(
1636
1637
  Er,
1637
1638
  {
1638
- apiUrl: r,
1639
+ apiUrl: a,
1639
1640
  apiKey: i,
1640
- reviewMode: s,
1641
- reviewers: v,
1642
- comments: E,
1641
+ reviewMode: d,
1642
+ reviewers: p,
1643
+ comments: R,
1643
1644
  loadComments: _,
1644
- commentsLoadFailed: g
1645
+ commentsLoadFailed: C
1645
1646
  }
1646
1647
  ),
1647
1648
  document.body
1648
1649
  ) : null;
1649
- return /* @__PURE__ */ l.jsxs(ot.Provider, { value: A, children: [
1650
+ return /* @__PURE__ */ l.jsxs(ot.Provider, { value: I, children: [
1650
1651
  t,
1651
- O
1652
+ z
1652
1653
  ] });
1653
1654
  }
1654
1655
  export {
1655
- kr as ReviewProvider,
1656
- Tr as useReview
1656
+ jr as DEFAULT_API_URL,
1657
+ Dr as ReviewProvider,
1658
+ kr as useReview
1657
1659
  };
1658
1660
  //# sourceMappingURL=review-layer-react.js.map