@bitux/review-layer-react 0.1.8 → 0.1.9

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.
@@ -15,14 +15,14 @@ function Xr() {
15
15
  if (ir) return ge;
16
16
  ir = 1;
17
17
  var r = fr, n = Symbol.for("react.element"), t = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function u(d, f, g) {
18
+ function d(u, f, g) {
19
19
  var y, S = {}, m = null, A = null;
20
20
  g !== void 0 && (m = "" + g), f.key !== void 0 && (m = "" + f.key), f.ref !== void 0 && (A = f.ref);
21
21
  for (y in f) o.call(f, y) && !i.hasOwnProperty(y) && (S[y] = f[y]);
22
- if (d && d.defaultProps) for (y in f = d.defaultProps, f) S[y] === void 0 && (S[y] = f[y]);
23
- return { $$typeof: n, type: d, key: m, ref: A, props: S, _owner: s.current };
22
+ if (u && u.defaultProps) for (y in f = u.defaultProps, f) S[y] === void 0 && (S[y] = f[y]);
23
+ return { $$typeof: n, type: u, key: m, ref: A, props: S, _owner: s.current };
24
24
  }
25
- return ge.Fragment = t, ge.jsx = u, ge.jsxs = u, ge;
25
+ return ge.Fragment = t, ge.jsx = d, ge.jsxs = d, ge;
26
26
  }
27
27
  var he = {};
28
28
  /**
@@ -37,7 +37,7 @@ var he = {};
37
37
  var ar;
38
38
  function qr() {
39
39
  return ar || (ar = 1, process.env.NODE_ENV !== "production" && function() {
40
- var r = fr, n = Symbol.for("react.element"), t = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), z = Symbol.iterator, M = "@@iterator";
40
+ var r = fr, n = Symbol.for("react.element"), t = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), u = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), z = Symbol.iterator, M = "@@iterator";
41
41
  function P(e) {
42
42
  if (e === null || typeof e != "object")
43
43
  return null;
@@ -65,7 +65,7 @@ function qr() {
65
65
  var Y = !1, E = !1, R = !1, V = !1, q = !1, H;
66
66
  H = Symbol.for("react.module.reference");
67
67
  function Q(e) {
68
- return !!(typeof e == "string" || typeof e == "function" || e === o || e === i || q || e === s || e === g || e === y || V || e === A || Y || E || R || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === S || e.$$typeof === u || e.$$typeof === d || e.$$typeof === f || // This needs to include all possible module reference object
68
+ return !!(typeof e == "string" || typeof e == "function" || e === o || e === i || q || e === s || e === g || e === y || V || e === A || Y || E || R || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === S || e.$$typeof === d || e.$$typeof === u || 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.
@@ -104,10 +104,10 @@ function qr() {
104
104
  }
105
105
  if (typeof e == "object")
106
106
  switch (e.$$typeof) {
107
- case d:
107
+ case u:
108
108
  var a = e;
109
109
  return h(a) + ".Consumer";
110
- case u:
110
+ case d:
111
111
  var l = e;
112
112
  return h(l._context) + ".Provider";
113
113
  case f:
@@ -638,22 +638,18 @@ function Jr(r) {
638
638
  break;
639
639
  }
640
640
  if (t.className && typeof t.className == "string") {
641
- const s = t.className.trim().split(/\s+/).filter(Boolean);
642
- if (s.length > 0) {
643
- const i = s.filter((u) => /^[a-zA-Z][\w-]*$/.test(u)).slice(0, 2).map((u) => `.${u}`).join("");
644
- i && (o += i);
641
+ const i = t.className.trim().split(/\s+/).filter(Boolean);
642
+ if (i.length > 0) {
643
+ const d = i.filter((u) => /^[a-zA-Z][\w-]*$/.test(u)).slice(0, 2).map((u) => `.${u}`).join("");
644
+ d && (o += d);
645
645
  }
646
646
  }
647
- if (n.length > 0) {
648
- const s = t.parentElement;
649
- if (s) {
650
- const i = Array.from(s.children).filter(
651
- (u) => u.nodeName === t.nodeName
652
- );
653
- if (i.length > 1) {
654
- const u = i.indexOf(t) + 1;
655
- o += `:nth-child(${u})`;
656
- }
647
+ const s = t.parentElement;
648
+ if (s) {
649
+ const i = Array.from(s.children);
650
+ if (i.length > 1) {
651
+ const d = i.indexOf(t) + 1;
652
+ o += `:nth-child(${d})`;
657
653
  }
658
654
  }
659
655
  n.unshift(o), t = t.parentElement;
@@ -663,10 +659,10 @@ function Jr(r) {
663
659
  const Zr = "[data-review-layer-root]", Qr = 16;
664
660
  function We(r, n, t = Qr) {
665
661
  if (typeof window > "u") return { x: r, y: n };
666
- const o = t, s = t, i = window.innerWidth - t, u = window.innerHeight - t;
662
+ const o = t, s = t, i = window.innerWidth - t, d = window.innerHeight - t;
667
663
  return {
668
664
  x: Math.max(o, Math.min(i, r)),
669
- y: Math.max(s, Math.min(u, n))
665
+ y: Math.max(s, Math.min(d, n))
670
666
  };
671
667
  }
672
668
  function pr(r) {
@@ -760,19 +756,19 @@ const j = {
760
756
  }, sr = "[review-layer API]";
761
757
  function Z(r, n, t) {
762
758
  if ("status" in t) {
763
- const { status: d, statusText: f, body: g = "" } = t;
759
+ const { status: u, statusText: f, body: g = "" } = t;
764
760
  let y;
765
- d === 401 ? y = "No autorizado (401). Revisa que apiKey sea correcta y esté aceptada por la API." : d === 403 ? y = "Acceso denegado (403). Revisa apiKey o permisos del proyecto." : d === 404 ? y = "Recurso no encontrado (404). Revisa apiUrl y que la ruta exista en el backend." : d >= 500 ? y = "Error del servidor (5xx). El backend puede estar caído o sobrecargado." : y = `Respuesta HTTP ${d} ${f}. Revisa la API.`, console.error(sr, r, {
761
+ u === 401 ? y = "No autorizado (401). Revisa que apiKey sea correcta y esté aceptada por la API." : u === 403 ? y = "Acceso denegado (403). Revisa apiKey o permisos del proyecto." : u === 404 ? y = "Recurso no encontrado (404). Revisa apiUrl y que la ruta exista en el backend." : u >= 500 ? y = "Error del servidor (5xx). El backend puede estar caído o sobrecargado." : y = `Respuesta HTTP ${u} ${f}. Revisa la API.`, console.error(sr, r, {
766
762
  motivo: y,
767
763
  url: n,
768
- status: d,
764
+ status: u,
769
765
  statusText: f,
770
766
  body: g.slice(0, 300)
771
767
  });
772
768
  return;
773
769
  }
774
- const o = t.networkError, s = o instanceof Error ? o.message : String(o), u = o instanceof TypeError || /failed to fetch|networkerror|load failed|network request failed/i.test(s) ? "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: ${s}`;
775
- console.error(sr, r, { motivo: u, url: n, error: o });
770
+ const o = t.networkError, s = o instanceof Error ? o.message : String(o), d = o instanceof TypeError || /failed to fetch|networkerror|load failed|network request failed/i.test(s) ? "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: ${s}`;
771
+ console.error(sr, r, { motivo: d, url: n, error: o });
776
772
  }
777
773
  function be(r) {
778
774
  return {
@@ -788,12 +784,12 @@ async function ot(r, n, t) {
788
784
  headers: be(n),
789
785
  signal: t == null ? void 0 : t.signal
790
786
  });
791
- } catch (u) {
792
- throw Z("fetchReviewers (red/CORS)", o, { networkError: u }), u;
787
+ } catch (d) {
788
+ throw Z("fetchReviewers (red/CORS)", o, { networkError: d }), d;
793
789
  }
794
790
  if (!s.ok) {
795
- const u = await s.text();
796
- throw Z("fetchReviewers", o, { status: s.status, statusText: s.statusText, body: u }), new Error("Failed to fetch reviewers");
791
+ const d = await s.text();
792
+ throw Z("fetchReviewers", o, { status: s.status, statusText: s.statusText, body: d }), new Error("Failed to fetch reviewers");
797
793
  }
798
794
  return (await s.json()).data ?? [];
799
795
  }
@@ -806,36 +802,36 @@ async function nt(r, n, t) {
806
802
  headers: be(n),
807
803
  body: JSON.stringify(t)
808
804
  });
809
- } catch (u) {
810
- throw Z("createComment (red/CORS)", o, { networkError: u }), u;
805
+ } catch (d) {
806
+ throw Z("createComment (red/CORS)", o, { networkError: d }), d;
811
807
  }
812
808
  if (!s.ok) {
813
- const u = await s.text();
814
- let d = "Failed to create comment";
809
+ const d = await s.text();
810
+ let u = "Failed to create comment";
815
811
  try {
816
- d = JSON.parse(u).message ?? d;
812
+ u = JSON.parse(d).message ?? u;
817
813
  } catch {
818
814
  }
819
- throw Z("createComment", o, { status: s.status, statusText: s.statusText, body: u }), new Error(d);
815
+ throw Z("createComment", o, { status: s.status, statusText: s.statusText, body: d }), new Error(u);
820
816
  }
821
817
  return (await s.json()).data;
822
818
  }
823
819
  async function it(r, n, t, o) {
824
820
  const s = new URLSearchParams({ url: t }), i = `${r}/comments?${s}`;
825
- let u;
821
+ let d;
826
822
  try {
827
- u = await fetch(i, {
823
+ d = await fetch(i, {
828
824
  headers: be(n),
829
825
  signal: o == null ? void 0 : o.signal
830
826
  });
831
827
  } catch (f) {
832
828
  throw Z("fetchComments (red/CORS)", i, { networkError: f }), f;
833
829
  }
834
- if (!u.ok) {
835
- const f = await u.text();
836
- throw Z("fetchComments", i, { status: u.status, statusText: u.statusText, body: f }), new Error("Failed to fetch comments");
830
+ if (!d.ok) {
831
+ const f = await d.text();
832
+ throw Z("fetchComments", i, { status: d.status, statusText: d.statusText, body: f }), new Error("Failed to fetch comments");
837
833
  }
838
- return (await u.json()).data ?? [];
834
+ return (await d.json()).data ?? [];
839
835
  }
840
836
  async function at(r, n, t, o) {
841
837
  const s = `${r}/comments/${t}/status`;
@@ -846,15 +842,15 @@ async function at(r, n, t, o) {
846
842
  headers: be(n),
847
843
  body: JSON.stringify({ status: o })
848
844
  });
849
- } catch (d) {
850
- throw Z("updateCommentStatus (red/CORS)", s, { networkError: d }), d;
845
+ } catch (u) {
846
+ throw Z("updateCommentStatus (red/CORS)", s, { networkError: u }), u;
851
847
  }
852
848
  if (!i.ok) {
853
- const d = await i.text();
854
- Z("updateCommentStatus", s, { status: i.status, statusText: i.statusText, body: d });
849
+ const u = await i.text();
850
+ Z("updateCommentStatus", s, { status: i.status, statusText: i.statusText, body: u });
855
851
  let f = "Failed to update comment status";
856
852
  try {
857
- f = JSON.parse(d).message ?? f;
853
+ f = JSON.parse(u).message ?? f;
858
854
  } catch {
859
855
  }
860
856
  throw new Error(f);
@@ -875,12 +871,12 @@ async function st(r, n, t) {
875
871
  if (!s.ok) {
876
872
  const i = await s.text();
877
873
  Z("deleteComment", o, { status: s.status, statusText: s.statusText, body: i });
878
- let u = "Failed to delete comment";
874
+ let d = "Failed to delete comment";
879
875
  try {
880
- u = JSON.parse(i).message ?? u;
876
+ d = JSON.parse(i).message ?? d;
881
877
  } catch {
882
878
  }
883
- throw new Error(u);
879
+ throw new Error(d);
884
880
  }
885
881
  }
886
882
  const lt = {
@@ -933,10 +929,10 @@ function ft({
933
929
  position: o,
934
930
  payload: s,
935
931
  onClose: i,
936
- onSuccess: u
932
+ onSuccess: d
937
933
  }) {
938
934
  var $;
939
- const [d, f] = W(""), [g, y] = W(
935
+ const [u, f] = W(""), [g, y] = W(
940
936
  (($ = t[0]) == null ? void 0 : $.id) ?? 0
941
937
  ), [S, m] = W(!1), [A, z] = W(null);
942
938
  L(() => {
@@ -944,14 +940,14 @@ function ft({
944
940
  }, [t, g]);
945
941
  const M = D(
946
942
  async (v) => {
947
- if (v.preventDefault(), !(!d.trim() || !g)) {
943
+ if (v.preventDefault(), !(!u.trim() || !g)) {
948
944
  m(!0), z(null);
949
945
  try {
950
946
  await nt(r, n, {
951
947
  ...s,
952
- message: d.trim(),
948
+ message: u.trim(),
953
949
  reviewerId: g
954
- }), u(), i();
950
+ }), d(), i();
955
951
  } catch (k) {
956
952
  z(k instanceof Error ? k.message : "Failed to send comment");
957
953
  } finally {
@@ -959,7 +955,7 @@ function ft({
959
955
  }
960
956
  }
961
957
  },
962
- [r, n, s, d, g, u, i]
958
+ [r, n, s, u, g, d, i]
963
959
  ), P = ne(null);
964
960
  return L(() => {
965
961
  const v = (k) => {
@@ -1006,7 +1002,7 @@ function ft({
1006
1002
  "textarea",
1007
1003
  {
1008
1004
  placeholder: "Escribe tu comentario...",
1009
- value: d,
1005
+ value: u,
1010
1006
  onChange: (v) => f(v.target.value),
1011
1007
  style: ct,
1012
1008
  required: !0,
@@ -1086,30 +1082,30 @@ const ht = ke(function({
1086
1082
  fallbackComment: o,
1087
1083
  outlineColor: s = pt
1088
1084
  }) {
1089
- const [i, u] = W(null), d = D(() => {
1085
+ const [i, d] = W(null), u = D(() => {
1090
1086
  if (!t) {
1091
- u(null);
1087
+ d(null);
1092
1088
  return;
1093
1089
  }
1094
1090
  const f = n != null && n.trim() ? gr(n) : null;
1095
1091
  if (f) {
1096
- u(f);
1092
+ d(f);
1097
1093
  return;
1098
1094
  }
1099
1095
  if (o) {
1100
- u(et(o));
1096
+ d(et(o));
1101
1097
  return;
1102
1098
  }
1103
- u(null);
1099
+ d(null);
1104
1100
  }, [n, t, o]);
1105
1101
  return L(() => {
1106
- d();
1107
- }, [d]), L(() => {
1102
+ u();
1103
+ }, [u]), L(() => {
1108
1104
  if (t)
1109
- return window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
1110
- window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
1105
+ return window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
1106
+ window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1111
1107
  };
1112
- }, [t, d]), !t || i == null ? null : /* @__PURE__ */ c.jsx(
1108
+ }, [t, u]), !t || i == null ? null : /* @__PURE__ */ c.jsx(
1113
1109
  "div",
1114
1110
  {
1115
1111
  "aria-hidden": !0,
@@ -1230,8 +1226,8 @@ const mt = () => /* @__PURE__ */ c.jsx("svg", { width: "12", height: "12", viewB
1230
1226
  }) {
1231
1227
  const o = n == null ? void 0 : n.image_url, s = (n == null ? void 0 : n.name) ?? "Revisor", i = St(t);
1232
1228
  if (o && o.trim()) {
1233
- const u = ce[t] ?? ce[j.PENDING];
1234
- return /* @__PURE__ */ c.jsx("div", { style: { ...i, border: `2px solid ${u}` }, children: /* @__PURE__ */ c.jsx(
1229
+ const d = ce[t] ?? ce[j.PENDING];
1230
+ return /* @__PURE__ */ c.jsx("div", { style: { ...i, border: `2px solid ${d}` }, children: /* @__PURE__ */ c.jsx(
1235
1231
  "img",
1236
1232
  {
1237
1233
  src: o,
@@ -1339,7 +1335,7 @@ function Lt({
1339
1335
  reviewMode: i = !1
1340
1336
  }) {
1341
1337
  var fe, ve;
1342
- const [u, d] = W(!1), [f, g] = W(!1), [y, S] = W(() => Re(r)), [m, A] = W(!1), [z, M] = W(null), P = ne(null), $ = ne(null), v = ne(null), k = D(() => {
1338
+ const [d, u] = W(!1), [f, g] = W(!1), [y, S] = W(() => Re(r)), [m, A] = W(!1), [z, M] = W(null), P = ne(null), $ = ne(null), v = ne(null), k = D(() => {
1343
1339
  S(Re(r));
1344
1340
  }, [r]);
1345
1341
  L(() => {
@@ -1359,37 +1355,37 @@ function Lt({
1359
1355
  const Y = D(() => {
1360
1356
  P.current !== null && (clearTimeout(P.current), P.current = null);
1361
1357
  }, []), E = D(() => {
1362
- i || (Y(), d(!0));
1358
+ i || (Y(), u(!0));
1363
1359
  }, [i, Y]), R = D(() => {
1364
1360
  f || (P.current = setTimeout(() => {
1365
- P.current = null, d(!1);
1361
+ P.current = null, u(!1);
1366
1362
  }, ur));
1367
1363
  }, [f]), V = D(() => {
1368
- Y(), d(!0);
1364
+ Y(), u(!0);
1369
1365
  }, [Y]), q = D(() => {
1370
1366
  f || (P.current = setTimeout(() => {
1371
- P.current = null, d(!1);
1367
+ P.current = null, u(!1);
1372
1368
  }, ur));
1373
1369
  }, [f]), H = D(() => {
1374
1370
  if (i) {
1375
- f && (g(!1), d(!1));
1371
+ f && (g(!1), u(!1));
1376
1372
  return;
1377
1373
  }
1378
- f ? (g(!1), d(!1)) : (g(!0), d(!0));
1374
+ f ? (g(!1), u(!1)) : (g(!0), u(!0));
1379
1375
  }, [i, f]);
1380
1376
  L(() => {
1381
1377
  if (!f) return;
1382
1378
  const w = (ee) => {
1383
1379
  var K, xe;
1384
1380
  const te = ee.target;
1385
- (K = $.current) != null && K.contains(te) || (xe = v.current) != null && xe.contains(te) || (g(!1), d(!1));
1381
+ (K = $.current) != null && K.contains(te) || (xe = v.current) != null && xe.contains(te) || (g(!1), u(!1));
1386
1382
  };
1387
1383
  return document.addEventListener("mousedown", w, !0), () => document.removeEventListener("mousedown", w, !0);
1388
1384
  }, [f]), L(() => () => Y(), [Y]), L(() => {
1389
- i && (g(!1), d(!1));
1385
+ i && (g(!1), u(!1));
1390
1386
  }, [i]);
1391
- const Q = y.x + n.dx, ie = y.y + n.dy, { x: h, y: b } = We(Q, ie, Se / 2), O = u && !f, I = D(() => {
1392
- g(!1), d(!1);
1387
+ const Q = y.x + n.dx, ie = y.y + n.dy, { x: h, y: b } = We(Q, ie, Se / 2), O = d && !f, I = D(() => {
1388
+ g(!1), u(!1);
1393
1389
  }, []), re = D(
1394
1390
  async (w) => {
1395
1391
  if (w !== r.status) {
@@ -1434,7 +1430,7 @@ function Lt({
1434
1430
  role: "button",
1435
1431
  tabIndex: 0,
1436
1432
  "aria-label": `Comentario: ${r.message.slice(0, 30)}...`,
1437
- "aria-expanded": u,
1433
+ "aria-expanded": d,
1438
1434
  style: se,
1439
1435
  onMouseEnter: E,
1440
1436
  onMouseLeave: R,
@@ -1442,7 +1438,7 @@ function Lt({
1442
1438
  children: /* @__PURE__ */ c.jsx(wt, { color: "var(--ui-color-white, #fff)" })
1443
1439
  }
1444
1440
  ),
1445
- u && /* @__PURE__ */ c.jsxs(
1441
+ d && /* @__PURE__ */ c.jsxs(
1446
1442
  "div",
1447
1443
  {
1448
1444
  ref: v,
@@ -1555,11 +1551,11 @@ const At = ke(Lt), zt = 25, Ft = 36;
1555
1551
  function Nt(r) {
1556
1552
  const n = /* @__PURE__ */ new Map();
1557
1553
  for (let t = 0; t < r.length; t++) {
1558
- const o = r[t], { x: s, y: i } = Re(o), { x: u, y: d } = We(s, i);
1554
+ const o = r[t], { x: s, y: i } = Re(o), { x: d, y: u } = We(s, i);
1559
1555
  let f = 0;
1560
1556
  for (let g = 0; g < t; g++) {
1561
1557
  const { x: y, y: S } = Re(r[g]), { x: m, y: A } = We(y, S);
1562
- Math.hypot(u - m, d - A) < zt && f++;
1558
+ Math.hypot(d - m, u - A) < zt && f++;
1563
1559
  }
1564
1560
  n.set(o.id, { dx: f * Ft, dy: 0 });
1565
1561
  }
@@ -1575,8 +1571,8 @@ function Mt({
1575
1571
  reviewMode: o,
1576
1572
  setReviewMode: s,
1577
1573
  reviewers: i,
1578
- comments: u,
1579
- loadComments: d,
1574
+ comments: d,
1575
+ loadComments: u,
1580
1576
  commentsLoadFailed: f = !1
1581
1577
  }) {
1582
1578
  const [g, y] = W(null), S = ne(null), [m, A] = W(null), z = D(() => {
@@ -1666,8 +1662,8 @@ function Mt({
1666
1662
  return () => O.forEach((I) => I());
1667
1663
  }, [m, R]);
1668
1664
  const V = Be(
1669
- () => Nt(u),
1670
- [u, Y]
1665
+ () => Nt(d),
1666
+ [d, Y]
1671
1667
  ), q = D(() => {
1672
1668
  M(), A(null);
1673
1669
  }, [M]), H = {
@@ -1755,7 +1751,7 @@ function Mt({
1755
1751
  "button",
1756
1752
  {
1757
1753
  type: "button",
1758
- onClick: () => d(),
1754
+ onClick: () => u(),
1759
1755
  style: {
1760
1756
  padding: "var(--ui-positive-Value_100, 4px) var(--ui-positive-Value_250, 10px)",
1761
1757
  fontSize: "var(--ui-font-size-xs, 12px)",
@@ -1772,14 +1768,14 @@ function Mt({
1772
1768
  ]
1773
1769
  }
1774
1770
  ),
1775
- u.map((h) => /* @__PURE__ */ c.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ c.jsx(
1771
+ d.map((h) => /* @__PURE__ */ c.jsx("div", { "data-review-layer-pin": !0, style: { pointerEvents: "auto" }, children: /* @__PURE__ */ c.jsx(
1776
1772
  At,
1777
1773
  {
1778
1774
  comment: h,
1779
1775
  offset: V.get(h.id),
1780
1776
  apiUrl: r,
1781
1777
  apiKey: n,
1782
- onStatusChange: d,
1778
+ onStatusChange: u,
1783
1779
  reviewMode: o
1784
1780
  }
1785
1781
  ) }, h.id)),
@@ -1792,7 +1788,7 @@ function Mt({
1792
1788
  position: m.position,
1793
1789
  payload: m.payload,
1794
1790
  onClose: q,
1795
- onSuccess: d
1791
+ onSuccess: u
1796
1792
  }
1797
1793
  ) })
1798
1794
  ] }), ie = typeof document < "u" ? document.body : null;
@@ -2202,11 +2198,11 @@ function ro({
2202
2198
  apiKey: o,
2203
2199
  getPageUrl: s
2204
2200
  }) {
2205
- const i = (t == null ? void 0 : t.trim()) || Zt, [u, d] = W(!1), [f, g] = W([]), [y, S] = W([]), [m, A] = W(!1), z = ne(!1), M = ne(null), P = D(
2201
+ const i = (t == null ? void 0 : t.trim()) || Zt, [d, u] = W(!1), [f, g] = W([]), [y, S] = W([]), [m, A] = W(!1), z = ne(!1), M = ne(null), P = D(
2206
2202
  () => (s == null ? void 0 : s()) ?? br(),
2207
2203
  [s]
2208
2204
  );
2209
- Bt(n, u, d);
2205
+ Bt(n, d, u);
2210
2206
  const $ = D(
2211
2207
  async (E) => {
2212
2208
  if (!n || !i || !o) {
@@ -2312,14 +2308,14 @@ function ro({
2312
2308
  () => ({
2313
2309
  apiUrl: i,
2314
2310
  apiKey: o,
2315
- reviewMode: u,
2316
- setReviewMode: d,
2311
+ reviewMode: d,
2312
+ setReviewMode: u,
2317
2313
  reviewers: f,
2318
2314
  comments: y,
2319
2315
  loadComments: v,
2320
2316
  commentsLoadFailed: m
2321
2317
  }),
2322
- [i, o, u, d, f, y, v, m]
2318
+ [i, o, d, u, f, y, v, m]
2323
2319
  ), Y = n && typeof document < "u" ? vr(
2324
2320
  /* @__PURE__ */ c.jsx(
2325
2321
  Mt,
@@ -2327,8 +2323,8 @@ function ro({
2327
2323
  apiUrl: i,
2328
2324
  apiKey: o,
2329
2325
  getPageUrl: P,
2330
- reviewMode: u,
2331
- setReviewMode: d,
2326
+ reviewMode: d,
2327
+ setReviewMode: u,
2332
2328
  reviewers: f,
2333
2329
  comments: y,
2334
2330
  loadComments: v,