viewgate-wrapper 1.10.6 → 1.10.8

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,11 +1,11 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled,.vg-button-ghost:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(.4);transform:none!important;box-shadow:none!important;pointer-events:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:12px 16px;border-radius:12px;background:#fff;color:#1e293b;width:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .2s ease;border:1px solid #e2e8f0}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-animate-spin{animation:vg-spin .8s linear infinite}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import pt, { useRef as Oe, useState as k, useEffect as J, forwardRef as Ke, createElement as _e, createContext as mt, useContext as ft, useCallback as fe } from "react";
3
- import { createPortal as ht } from "react-dom";
4
- var he = { exports: {} }, le = {};
5
- var Ne;
6
- function gt() {
7
- if (Ne) return le;
8
- Ne = 1;
2
+ import ht, { useRef as Oe, useState as R, useEffect as Z, forwardRef as et, createElement as _e, createContext as gt, useContext as yt, useCallback as he } from "react";
3
+ import { createPortal as xt } from "react-dom";
4
+ var ge = { exports: {} }, de = {};
5
+ var Le;
6
+ function wt() {
7
+ if (Le) return de;
8
+ Le = 1;
9
9
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
10
10
  function r(n, a, s) {
11
11
  var i = null;
@@ -22,27 +22,27 @@ function gt() {
22
22
  props: s
23
23
  };
24
24
  }
25
- return le.Fragment = t, le.jsx = r, le.jsxs = r, le;
25
+ return de.Fragment = t, de.jsx = r, de.jsxs = r, de;
26
26
  }
27
- var de = {};
28
- var Le;
29
- function yt() {
30
- return Le || (Le = 1, process.env.NODE_ENV !== "production" && (function() {
27
+ var ue = {};
28
+ var Ne;
29
+ function vt() {
30
+ return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && (function() {
31
31
  function e(c) {
32
32
  if (c == null) return null;
33
33
  if (typeof c == "function")
34
- return c.$$typeof === se ? null : c.displayName || c.name || null;
34
+ return c.$$typeof === ae ? null : c.displayName || c.name || null;
35
35
  if (typeof c == "string") return c;
36
36
  switch (c) {
37
- case L:
37
+ case T:
38
38
  return "Fragment";
39
- case q:
39
+ case M:
40
40
  return "Profiler";
41
- case U:
41
+ case I:
42
42
  return "StrictMode";
43
- case ve:
43
+ case be:
44
44
  return "Suspense";
45
- case I:
45
+ case z:
46
46
  return "SuspenseList";
47
47
  case $e:
48
48
  return "Activity";
@@ -51,18 +51,18 @@ function yt() {
51
51
  switch (typeof c.tag == "number" && console.error(
52
52
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
53
53
  ), c.$$typeof) {
54
- case V:
54
+ case j:
55
55
  return "Portal";
56
- case T:
56
+ case A:
57
57
  return c.displayName || "Context";
58
- case O:
58
+ case P:
59
59
  return (c._context.displayName || "Context") + ".Consumer";
60
- case S:
60
+ case k:
61
61
  var f = c.render;
62
62
  return c = c.displayName, c || (c = f.displayName || f.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
63
- case M:
63
+ case D:
64
64
  return f = c.displayName || null, f !== null ? f : e(c.type) || "Memo";
65
- case ue:
65
+ case pe:
66
66
  f = c._payload, c = c._init;
67
67
  try {
68
68
  return e(c(f));
@@ -83,17 +83,17 @@ function yt() {
83
83
  }
84
84
  if (f) {
85
85
  f = console;
86
- var C = f.error, E = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
86
+ var C = f.error, S = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
87
87
  return C.call(
88
88
  f,
89
89
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
- E
90
+ S
91
91
  ), t(c);
92
92
  }
93
93
  }
94
94
  function n(c) {
95
- if (c === L) return "<>";
96
- if (typeof c == "object" && c !== null && c.$$typeof === ue)
95
+ if (c === T) return "<>";
96
+ if (typeof c == "object" && c !== null && c.$$typeof === pe)
97
97
  return "<...>";
98
98
  try {
99
99
  var f = e(c);
@@ -103,14 +103,14 @@ function yt() {
103
103
  }
104
104
  }
105
105
  function a() {
106
- var c = Z.A;
106
+ var c = K.A;
107
107
  return c === null ? null : c.getOwner();
108
108
  }
109
109
  function s() {
110
110
  return Error("react-stack-top-frame");
111
111
  }
112
112
  function i(c) {
113
- if (pe.call(c, "key")) {
113
+ if (me.call(c, "key")) {
114
114
  var f = Object.getOwnPropertyDescriptor(c, "key").get;
115
115
  if (f && f.isReactWarning) return !1;
116
116
  }
@@ -118,7 +118,7 @@ function yt() {
118
118
  }
119
119
  function l(c, f) {
120
120
  function C() {
121
- K || (K = !0, console.error(
121
+ Q || (Q = !0, console.error(
122
122
  "%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://react.dev/link/special-props)",
123
123
  f
124
124
  ));
@@ -130,18 +130,18 @@ function yt() {
130
130
  }
131
131
  function p() {
132
132
  var c = e(this.type);
133
- return B[c] || (B[c] = !0, console.error(
133
+ return X[c] || (X[c] = !0, console.error(
134
134
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
135
135
  )), c = this.props.ref, c !== void 0 ? c : null;
136
136
  }
137
- function u(c, f, C, E, z, D) {
137
+ function u(c, f, C, S, F, U) {
138
138
  var b = C.ref;
139
139
  return c = {
140
140
  $$typeof: v,
141
141
  type: c,
142
142
  key: f,
143
143
  props: C,
144
- _owner: E
144
+ _owner: S
145
145
  }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(c, "ref", {
146
146
  enumerable: !1,
147
147
  get: p
@@ -159,49 +159,49 @@ function yt() {
159
159
  configurable: !1,
160
160
  enumerable: !1,
161
161
  writable: !0,
162
- value: z
162
+ value: F
163
163
  }), Object.defineProperty(c, "_debugTask", {
164
164
  configurable: !1,
165
165
  enumerable: !1,
166
166
  writable: !0,
167
- value: D
167
+ value: U
168
168
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
169
169
  }
170
- function x(c, f, C, E, z, D) {
170
+ function x(c, f, C, S, F, U) {
171
171
  var b = f.children;
172
172
  if (b !== void 0)
173
- if (E)
174
- if (me(b)) {
175
- for (E = 0; E < b.length; E++)
176
- m(b[E]);
173
+ if (S)
174
+ if (fe(b)) {
175
+ for (S = 0; S < b.length; S++)
176
+ m(b[S]);
177
177
  Object.freeze && Object.freeze(b);
178
178
  } else
179
179
  console.error(
180
180
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
181
181
  );
182
182
  else m(b);
183
- if (pe.call(f, "key")) {
183
+ if (me.call(f, "key")) {
184
184
  b = e(c);
185
- var P = Object.keys(f).filter(function(ie) {
186
- return ie !== "key";
185
+ var G = Object.keys(f).filter(function(ce) {
186
+ return ce !== "key";
187
187
  });
188
- E = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", Q[b + E] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
188
+ S = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", ee[b + S] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
189
189
  `A props object containing a "key" prop is being spread into JSX:
190
190
  let props = %s;
191
191
  <%s {...props} />
192
192
  React keys must be passed directly to JSX without using spread:
193
193
  let props = %s;
194
194
  <%s key={someKey} {...props} />`,
195
- E,
195
+ S,
196
196
  b,
197
- P,
197
+ G,
198
198
  b
199
- ), Q[b + E] = !0);
199
+ ), ee[b + S] = !0);
200
200
  }
201
201
  if (b = null, C !== void 0 && (r(C), b = "" + C), i(f) && (r(f.key), b = "" + f.key), "key" in f) {
202
202
  C = {};
203
- for (var Y in f)
204
- Y !== "key" && (C[Y] = f[Y]);
203
+ for (var J in f)
204
+ J !== "key" && (C[J] = f[J]);
205
205
  } else C = f;
206
206
  return b && l(
207
207
  C,
@@ -211,59 +211,59 @@ React keys must be passed directly to JSX without using spread:
211
211
  b,
212
212
  C,
213
213
  a(),
214
- z,
215
- D
214
+ F,
215
+ U
216
216
  );
217
217
  }
218
218
  function m(c) {
219
- w(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === ue && (c._payload.status === "fulfilled" ? w(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
219
+ g(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === pe && (c._payload.status === "fulfilled" ? g(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
220
220
  }
221
- function w(c) {
221
+ function g(c) {
222
222
  return typeof c == "object" && c !== null && c.$$typeof === v;
223
223
  }
224
- var g = pt, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), V = /* @__PURE__ */ Symbol.for("react.portal"), L = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), O = /* @__PURE__ */ Symbol.for("react.consumer"), T = /* @__PURE__ */ Symbol.for("react.context"), S = /* @__PURE__ */ Symbol.for("react.forward_ref"), ve = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), M = /* @__PURE__ */ Symbol.for("react.memo"), ue = /* @__PURE__ */ Symbol.for("react.lazy"), $e = /* @__PURE__ */ Symbol.for("react.activity"), se = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, pe = Object.prototype.hasOwnProperty, me = Array.isArray, F = console.createTask ? console.createTask : function() {
224
+ var h = ht, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), j = /* @__PURE__ */ Symbol.for("react.portal"), T = /* @__PURE__ */ Symbol.for("react.fragment"), I = /* @__PURE__ */ Symbol.for("react.strict_mode"), M = /* @__PURE__ */ Symbol.for("react.profiler"), P = /* @__PURE__ */ Symbol.for("react.consumer"), A = /* @__PURE__ */ Symbol.for("react.context"), k = /* @__PURE__ */ Symbol.for("react.forward_ref"), be = /* @__PURE__ */ Symbol.for("react.suspense"), z = /* @__PURE__ */ Symbol.for("react.suspense_list"), D = /* @__PURE__ */ Symbol.for("react.memo"), pe = /* @__PURE__ */ Symbol.for("react.lazy"), $e = /* @__PURE__ */ Symbol.for("react.activity"), ae = /* @__PURE__ */ Symbol.for("react.client.reference"), K = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, me = Object.prototype.hasOwnProperty, fe = Array.isArray, W = console.createTask ? console.createTask : function() {
225
225
  return null;
226
226
  };
227
- g = {
227
+ h = {
228
228
  react_stack_bottom_frame: function(c) {
229
229
  return c();
230
230
  }
231
231
  };
232
- var K, B = {}, ae = g.react_stack_bottom_frame.bind(
233
- g,
232
+ var Q, X = {}, oe = h.react_stack_bottom_frame.bind(
233
+ h,
234
234
  s
235
- )(), oe = F(n(s)), Q = {};
236
- de.Fragment = L, de.jsx = function(c, f, C) {
237
- var E = 1e4 > Z.recentlyCreatedOwnerStacks++;
235
+ )(), ie = W(n(s)), ee = {};
236
+ ue.Fragment = T, ue.jsx = function(c, f, C) {
237
+ var S = 1e4 > K.recentlyCreatedOwnerStacks++;
238
238
  return x(
239
239
  c,
240
240
  f,
241
241
  C,
242
242
  !1,
243
- E ? Error("react-stack-top-frame") : ae,
244
- E ? F(n(c)) : oe
243
+ S ? Error("react-stack-top-frame") : oe,
244
+ S ? W(n(c)) : ie
245
245
  );
246
- }, de.jsxs = function(c, f, C) {
247
- var E = 1e4 > Z.recentlyCreatedOwnerStacks++;
246
+ }, ue.jsxs = function(c, f, C) {
247
+ var S = 1e4 > K.recentlyCreatedOwnerStacks++;
248
248
  return x(
249
249
  c,
250
250
  f,
251
251
  C,
252
252
  !0,
253
- E ? Error("react-stack-top-frame") : ae,
254
- E ? F(n(c)) : oe
253
+ S ? Error("react-stack-top-frame") : oe,
254
+ S ? W(n(c)) : ie
255
255
  );
256
256
  };
257
- })()), de;
257
+ })()), ue;
258
258
  }
259
259
  var Ie;
260
- function xt() {
261
- return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? he.exports = gt() : he.exports = yt()), he.exports;
260
+ function bt() {
261
+ return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? ge.exports = wt() : ge.exports = vt()), ge.exports;
262
262
  }
263
- var o = xt();
264
- const wt = ({ children: e }) => {
265
- const t = Oe(null), [r, n] = k(null);
266
- return J(() => {
263
+ var o = bt();
264
+ const Ct = ({ children: e }) => {
265
+ const t = Oe(null), [r, n] = R(null);
266
+ return Z(() => {
267
267
  if (t.current && !t.current.shadowRoot) {
268
268
  const a = t.current.attachShadow({ mode: "open" });
269
269
  document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach((l) => {
@@ -272,19 +272,19 @@ const wt = ({ children: e }) => {
272
272
  const i = document.createElement("link");
273
273
  i.rel = "stylesheet", i.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap", a.appendChild(i), n(a);
274
274
  }
275
- }, []), /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ShadowRootWrapper.tsx:38", ref: t, id: "viewgate-shadow-host", children: r && ht(e, r) });
275
+ }, []), /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ShadowRootWrapper.tsx:38", ref: t, id: "viewgate-shadow-host", children: r && xt(e, r) });
276
276
  };
277
- const Qe = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
278
- const vt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
279
- const bt = (e) => e.replace(
277
+ const tt = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
278
+ const Et = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
279
+ const St = (e) => e.replace(
280
280
  /^([A-Z])|[\s-_]+(\w)/g,
281
281
  (t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
282
282
  );
283
- const ze = (e) => {
284
- const t = bt(e);
283
+ const Me = (e) => {
284
+ const t = St(e);
285
285
  return t.charAt(0).toUpperCase() + t.slice(1);
286
286
  };
287
- var Ct = {
287
+ var kt = {
288
288
  xmlns: "http://www.w3.org/2000/svg",
289
289
  width: 24,
290
290
  height: 24,
@@ -295,13 +295,13 @@ var Ct = {
295
295
  strokeLinecap: "round",
296
296
  strokeLinejoin: "round"
297
297
  };
298
- const Et = (e) => {
298
+ const Rt = (e) => {
299
299
  for (const t in e)
300
300
  if (t.startsWith("aria-") || t === "role" || t === "title")
301
301
  return !0;
302
302
  return !1;
303
303
  };
304
- const St = Ke(
304
+ const jt = et(
305
305
  ({
306
306
  color: e = "currentColor",
307
307
  size: t = 24,
@@ -315,13 +315,13 @@ const St = Ke(
315
315
  "svg",
316
316
  {
317
317
  ref: p,
318
- ...Ct,
318
+ ...kt,
319
319
  width: t,
320
320
  height: t,
321
321
  stroke: e,
322
322
  strokeWidth: n ? Number(r) * 24 / Number(t) : r,
323
- className: Qe("lucide", a),
324
- ...!s && !Et(l) && { "aria-hidden": "true" },
323
+ className: tt("lucide", a),
324
+ ...!s && !Rt(l) && { "aria-hidden": "true" },
325
325
  ...l
326
326
  },
327
327
  [
@@ -331,39 +331,39 @@ const St = Ke(
331
331
  )
332
332
  );
333
333
  const N = (e, t) => {
334
- const r = Ke(
335
- ({ className: n, ...a }, s) => _e(St, {
334
+ const r = et(
335
+ ({ className: n, ...a }, s) => _e(jt, {
336
336
  ref: s,
337
337
  iconNode: t,
338
- className: Qe(
339
- `lucide-${vt(ze(e))}`,
338
+ className: tt(
339
+ `lucide-${Et(Me(e))}`,
340
340
  `lucide-${e}`,
341
341
  n
342
342
  ),
343
343
  ...a
344
344
  })
345
345
  );
346
- return r.displayName = ze(e), r;
346
+ return r.displayName = Me(e), r;
347
347
  };
348
- const kt = [
348
+ const Ot = [
349
349
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
350
350
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
351
351
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
352
- ], Rt = N("circle-alert", kt);
353
- const jt = [
352
+ ], _t = N("circle-alert", Ot);
353
+ const Vt = [
354
354
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
355
355
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
356
- ], ne = N("circle-check", jt);
357
- const Ot = [
356
+ ], se = N("circle-check", Vt);
357
+ const Tt = [
358
358
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
359
359
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
360
- ], Me = N("clock", Ot);
361
- const _t = [
360
+ ], ze = N("clock", Tt);
361
+ const Pt = [
362
362
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
363
363
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
364
364
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
365
- ], Fe = N("external-link", _t);
366
- const Vt = [
365
+ ], Fe = N("external-link", Pt);
366
+ const At = [
367
367
  [
368
368
  "path",
369
369
  {
@@ -372,9 +372,9 @@ const Vt = [
372
372
  }
373
373
  ],
374
374
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
375
- ], Tt = N("eye", Vt);
376
- const Pt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], At = N("loader-circle", Pt);
377
- const Gt = [
375
+ ], Gt = N("eye", At);
376
+ const $t = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Lt = N("loader-circle", $t);
377
+ const Nt = [
378
378
  [
379
379
  "path",
380
380
  {
@@ -382,8 +382,8 @@ const Gt = [
382
382
  key: "18887p"
383
383
  }
384
384
  ]
385
- ], Ce = N("message-square", Gt);
386
- const $t = [
385
+ ], Ce = N("message-square", Nt);
386
+ const It = [
387
387
  [
388
388
  "path",
389
389
  {
@@ -391,8 +391,8 @@ const $t = [
391
391
  key: "edeuup"
392
392
  }
393
393
  ]
394
- ], Nt = N("mouse-pointer-2", $t);
395
- const Lt = [
394
+ ], Mt = N("mouse-pointer-2", It);
395
+ const zt = [
396
396
  [
397
397
  "path",
398
398
  {
@@ -401,12 +401,12 @@ const Lt = [
401
401
  }
402
402
  ],
403
403
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
404
- ], It = N("pencil", Lt);
405
- const zt = [
404
+ ], Ft = N("pencil", zt);
405
+ const Dt = [
406
406
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
407
407
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
408
- ], Mt = N("rotate-ccw", zt);
409
- const Ft = [
408
+ ], Ht = N("rotate-ccw", Dt);
409
+ const Wt = [
410
410
  [
411
411
  "path",
412
412
  {
@@ -415,18 +415,18 @@ const Ft = [
415
415
  }
416
416
  ],
417
417
  ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
418
- ], Dt = N("send", Ft);
419
- const Ht = [
418
+ ], Ut = N("send", Wt);
419
+ const qt = [
420
420
  ["path", { d: "M10 11v6", key: "nco0om" }],
421
421
  ["path", { d: "M14 11v6", key: "outv1u" }],
422
422
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
423
423
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
424
424
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
425
- ], De = N("trash-2", Ht);
426
- const Wt = [
425
+ ], De = N("trash-2", qt);
426
+ const Bt = [
427
427
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
428
428
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
429
- ], Ee = N("x", Wt), Ut = {
429
+ ], Ee = N("x", Bt), Yt = {
430
430
  en: {
431
431
  enterMode: "Enter Feedback Mode",
432
432
  exitMode: "Exit Mode",
@@ -469,7 +469,9 @@ const Wt = [
469
469
  save: "Save",
470
470
  commentDetails: "Comment Details",
471
471
  annotations: "Comments",
472
- viewAll: "View All"
472
+ viewAll: "View All",
473
+ exitConfirmTitle: "Close ViewGate?",
474
+ exitConfirmMessage: "Are you sure you want to close ViewGate? You can reopen it at any time by adding ?viewgate=true to your URL."
473
475
  },
474
476
  es: {
475
477
  enterMode: "Activar Modo Comentarios",
@@ -513,34 +515,36 @@ const Wt = [
513
515
  save: "Guardar",
514
516
  commentDetails: "Detalles del Comentario",
515
517
  annotations: "Comentarios",
516
- viewAll: "Ver Todos"
518
+ viewAll: "Ver Todos",
519
+ exitConfirmTitle: "¿Cerrar ViewGate?",
520
+ exitConfirmMessage: "¿Estás seguro de que deseas cerrar ViewGate? Puedes volver a activarlo en cualquier momento agregando ?viewgate=true a la URL."
517
521
  }
518
- }, et = mt(void 0), qt = () => {
519
- const e = ft(et);
522
+ }, rt = gt(void 0), Xt = () => {
523
+ const e = yt(rt);
520
524
  if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
521
525
  return e;
522
- }, Ve = "viewgate_enabled", Bt = () => typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("viewgate") ? (sessionStorage.setItem(Ve, "true"), !0) : sessionStorage.getItem(Ve) === "true", an = ({
526
+ }, Ve = "viewgate_enabled", Jt = () => typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("viewgate") ? (sessionStorage.setItem(Ve, "true"), !0) : sessionStorage.getItem(Ve) === "true", on = ({
523
527
  children: e,
524
528
  language: t = "es",
525
529
  apiKey: r,
526
530
  baseUrl: n = "https://view-gate.vercel.app"
527
531
  }) => {
528
- const [a, s] = k(!1), [i, l] = k([]);
529
- J(() => {
530
- s(Bt());
532
+ const [a, s] = R(!1), [i, l] = R([]);
533
+ Z(() => {
534
+ s(Jt());
531
535
  }, []);
532
536
  const p = () => {
533
537
  if (sessionStorage.removeItem(Ve), s(!1), typeof window < "u") {
534
538
  const m = new URL(window.location.href);
535
539
  m.searchParams.delete("viewgate"), window.history.replaceState({}, "", m.toString());
536
540
  }
537
- }, u = (m, w) => {
538
- const g = Date.now();
539
- l((v) => [...v, { id: g, message: m, type: w }]), setTimeout(() => {
540
- l((v) => v.filter((V) => V.id !== g));
541
+ }, u = (m, g) => {
542
+ const h = Date.now();
543
+ l((v) => [...v, { id: h, message: m, type: g }]), setTimeout(() => {
544
+ l((v) => v.filter((j) => j.id !== h));
541
545
  }, 4e3);
542
- }, x = Ut[t];
543
- return /* @__PURE__ */ o.jsxs(et.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:244", value: {
546
+ }, x = Yt[t];
547
+ return /* @__PURE__ */ o.jsxs(rt.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:248", value: {
544
548
  addToast: u,
545
549
  language: t,
546
550
  t: x,
@@ -550,19 +554,19 @@ const Wt = [
550
554
  hasActiveToasts: i.length > 0
551
555
  }, children: [
552
556
  e,
553
- a && /* @__PURE__ */ o.jsx(wt, { "data-source-path": "/src/components/ViewGateProvider.tsx:255", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:256", className: "vg-container", children: [
554
- /* @__PURE__ */ o.jsx(rn, { "data-source-path": "/src/components/ViewGateProvider.tsx:257" }),
555
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:258", className: "vg-toasts", style: { zIndex: 2147483646 }, children: i.map((m) => /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:260", className: `vg-toast vg-animate-slide ${m.type}`, children: [
556
- m.type === "success" ? /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateProvider.tsx:262", size: 24, color: "#22c55e" }) : /* @__PURE__ */ o.jsx(Rt, { "data-source-path": "/src/components/ViewGateProvider.tsx:264", size: 24, color: "#ef4444" }),
557
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:266", children: [
558
- /* @__PURE__ */ o.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:267", style: { display: "block", fontSize: "13px", color: "#0f172a", textTransform: "uppercase", marginBottom: "2px" }, children: m.type === "success" ? x.successHeader : x.errorHeader }),
559
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:270", style: { fontSize: "14px", color: "#64748b" }, children: m.message })
557
+ a && /* @__PURE__ */ o.jsx(Ct, { "data-source-path": "/src/components/ViewGateProvider.tsx:259", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:260", className: "vg-container", children: [
558
+ /* @__PURE__ */ o.jsx(nn, { "data-source-path": "/src/components/ViewGateProvider.tsx:261" }),
559
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:262", className: "vg-toasts", style: { zIndex: 2147483646 }, children: i.map((m) => /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:264", className: `vg-toast vg-animate-slide ${m.type}`, children: [
560
+ m.type === "success" ? /* @__PURE__ */ o.jsx(se, { "data-source-path": "/src/components/ViewGateProvider.tsx:266", size: 24, color: "#22c55e" }) : /* @__PURE__ */ o.jsx(_t, { "data-source-path": "/src/components/ViewGateProvider.tsx:268", size: 24, color: "#ef4444" }),
561
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:270", children: [
562
+ /* @__PURE__ */ o.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:271", style: { display: "block", fontSize: "13px", color: "#0f172a", textTransform: "uppercase", marginBottom: "2px" }, children: m.type === "success" ? x.successHeader : x.errorHeader }),
563
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:274", style: { fontSize: "14px", color: "#000000" }, children: m.message })
560
564
  ] })
561
565
  ] }, m.id)) })
562
566
  ] }) })
563
567
  ] });
564
568
  };
565
- function Yt(e, t) {
569
+ function Zt(e, t) {
566
570
  if (e.match(/^[a-z]+:\/\//i))
567
571
  return e;
568
572
  if (e.match(/^\/\//))
@@ -572,7 +576,7 @@ function Yt(e, t) {
572
576
  const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), a = r.createElement("a");
573
577
  return r.head.appendChild(n), r.body.appendChild(a), t && (n.href = t), a.href = e, a.href;
574
578
  }
575
- const Xt = /* @__PURE__ */ (() => {
579
+ const Kt = /* @__PURE__ */ (() => {
576
580
  let e = 0;
577
581
  const t = () => (
578
582
  // eslint-disable-next-line no-bitwise
@@ -580,33 +584,33 @@ const Xt = /* @__PURE__ */ (() => {
580
584
  );
581
585
  return () => (e += 1, `u${t()}${e}`);
582
586
  })();
583
- function W(e) {
587
+ function Y(e) {
584
588
  const t = [];
585
589
  for (let r = 0, n = e.length; r < n; r++)
586
590
  t.push(e[r]);
587
591
  return t;
588
592
  }
589
- let te = null;
590
- function tt(e = {}) {
591
- return te || (e.includeStyleProperties ? (te = e.includeStyleProperties, te) : (te = W(window.getComputedStyle(document.documentElement)), te));
593
+ let re = null;
594
+ function nt(e = {}) {
595
+ return re || (e.includeStyleProperties ? (re = e.includeStyleProperties, re) : (re = Y(window.getComputedStyle(document.documentElement)), re));
592
596
  }
593
- function ge(e, t) {
597
+ function ye(e, t) {
594
598
  const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
595
599
  return n ? parseFloat(n.replace("px", "")) : 0;
596
600
  }
597
- function Jt(e) {
598
- const t = ge(e, "border-left-width"), r = ge(e, "border-right-width");
601
+ function Qt(e) {
602
+ const t = ye(e, "border-left-width"), r = ye(e, "border-right-width");
599
603
  return e.clientWidth + t + r;
600
604
  }
601
- function Zt(e) {
602
- const t = ge(e, "border-top-width"), r = ge(e, "border-bottom-width");
605
+ function er(e) {
606
+ const t = ye(e, "border-top-width"), r = ye(e, "border-bottom-width");
603
607
  return e.clientHeight + t + r;
604
608
  }
605
- function rt(e, t = {}) {
606
- const r = t.width || Jt(e), n = t.height || Zt(e);
609
+ function st(e, t = {}) {
610
+ const r = t.width || Qt(e), n = t.height || er(e);
607
611
  return { width: r, height: n };
608
612
  }
609
- function Kt() {
613
+ function tr() {
610
614
  let e, t;
611
615
  try {
612
616
  t = process;
@@ -615,11 +619,11 @@ function Kt() {
615
619
  const r = t && t.env ? t.env.devicePixelRatio : null;
616
620
  return r && (e = parseInt(r, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
617
621
  }
618
- const $ = 16384;
619
- function Qt(e) {
620
- (e.width > $ || e.height > $) && (e.width > $ && e.height > $ ? e.width > e.height ? (e.height *= $ / e.width, e.width = $) : (e.width *= $ / e.height, e.height = $) : e.width > $ ? (e.height *= $ / e.width, e.width = $) : (e.width *= $ / e.height, e.height = $));
622
+ const L = 16384;
623
+ function rr(e) {
624
+ (e.width > L || e.height > L) && (e.width > L && e.height > L ? e.width > e.height ? (e.height *= L / e.width, e.width = L) : (e.width *= L / e.height, e.height = L) : e.width > L ? (e.height *= L / e.width, e.width = L) : (e.width *= L / e.height, e.height = L));
621
625
  }
622
- function ye(e) {
626
+ function xe(e) {
623
627
  return new Promise((t, r) => {
624
628
  const n = new Image();
625
629
  n.onload = () => {
@@ -629,50 +633,50 @@ function ye(e) {
629
633
  }, n.onerror = r, n.crossOrigin = "anonymous", n.decoding = "async", n.src = e;
630
634
  });
631
635
  }
632
- async function er(e) {
636
+ async function nr(e) {
633
637
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
634
638
  }
635
- async function tr(e, t, r) {
639
+ async function sr(e, t, r) {
636
640
  const n = "http://www.w3.org/2000/svg", a = document.createElementNS(n, "svg"), s = document.createElementNS(n, "foreignObject");
637
- return a.setAttribute("width", `${t}`), a.setAttribute("height", `${r}`), a.setAttribute("viewBox", `0 0 ${t} ${r}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), a.appendChild(s), s.appendChild(e), er(a);
641
+ return a.setAttribute("width", `${t}`), a.setAttribute("height", `${r}`), a.setAttribute("viewBox", `0 0 ${t} ${r}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), a.appendChild(s), s.appendChild(e), nr(a);
638
642
  }
639
- const A = (e, t) => {
643
+ const $ = (e, t) => {
640
644
  if (e instanceof t)
641
645
  return !0;
642
646
  const r = Object.getPrototypeOf(e);
643
- return r === null ? !1 : r.constructor.name === t.name || A(r, t);
647
+ return r === null ? !1 : r.constructor.name === t.name || $(r, t);
644
648
  };
645
- function rr(e) {
649
+ function ar(e) {
646
650
  const t = e.getPropertyValue("content");
647
651
  return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
648
652
  }
649
- function nr(e, t) {
650
- return tt(t).map((r) => {
653
+ function or(e, t) {
654
+ return nt(t).map((r) => {
651
655
  const n = e.getPropertyValue(r), a = e.getPropertyPriority(r);
652
656
  return `${r}: ${n}${a ? " !important" : ""};`;
653
657
  }).join(" ");
654
658
  }
655
- function sr(e, t, r, n) {
656
- const a = `.${e}:${t}`, s = r.cssText ? rr(r) : nr(r, n);
659
+ function ir(e, t, r, n) {
660
+ const a = `.${e}:${t}`, s = r.cssText ? ar(r) : or(r, n);
657
661
  return document.createTextNode(`${a}{${s}}`);
658
662
  }
659
663
  function He(e, t, r, n) {
660
664
  const a = window.getComputedStyle(e, r), s = a.getPropertyValue("content");
661
665
  if (s === "" || s === "none")
662
666
  return;
663
- const i = Xt();
667
+ const i = Kt();
664
668
  try {
665
669
  t.className = `${t.className} ${i}`;
666
670
  } catch {
667
671
  return;
668
672
  }
669
673
  const l = document.createElement("style");
670
- l.appendChild(sr(i, r, a, n)), t.appendChild(l);
674
+ l.appendChild(ir(i, r, a, n)), t.appendChild(l);
671
675
  }
672
- function ar(e, t, r) {
676
+ function cr(e, t, r) {
673
677
  He(e, t, ":before", r), He(e, t, ":after", r);
674
678
  }
675
- const We = "application/font-woff", Ue = "image/jpeg", or = {
679
+ const We = "application/font-woff", Ue = "image/jpeg", lr = {
676
680
  woff: We,
677
681
  woff2: We,
678
682
  ttf: "application/font-truetype",
@@ -685,24 +689,24 @@ const We = "application/font-woff", Ue = "image/jpeg", or = {
685
689
  svg: "image/svg+xml",
686
690
  webp: "image/webp"
687
691
  };
688
- function ir(e) {
692
+ function dr(e) {
689
693
  const t = /\.([^./]*?)$/g.exec(e);
690
694
  return t ? t[1] : "";
691
695
  }
692
696
  function Ae(e) {
693
- const t = ir(e).toLowerCase();
694
- return or[t] || "";
697
+ const t = dr(e).toLowerCase();
698
+ return lr[t] || "";
695
699
  }
696
- function cr(e) {
700
+ function ur(e) {
697
701
  return e.split(/,/)[1];
698
702
  }
699
703
  function Te(e) {
700
704
  return e.search(/^(data:)/) !== -1;
701
705
  }
702
- function lr(e, t) {
706
+ function pr(e, t) {
703
707
  return `data:${t};base64,${e}`;
704
708
  }
705
- async function nt(e, t, r) {
709
+ async function at(e, t, r) {
706
710
  const n = await fetch(e, t);
707
711
  if (n.status === 404)
708
712
  throw new Error(`Resource "${n.url}" not found`);
@@ -719,19 +723,19 @@ async function nt(e, t, r) {
719
723
  });
720
724
  }
721
725
  const Se = {};
722
- function dr(e, t, r) {
726
+ function mr(e, t, r) {
723
727
  let n = e.replace(/\?.*/, "");
724
728
  return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
725
729
  }
726
730
  async function Ge(e, t, r) {
727
- const n = dr(e, t, r.includeQueryParams);
731
+ const n = mr(e, t, r.includeQueryParams);
728
732
  if (Se[n] != null)
729
733
  return Se[n];
730
734
  r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
731
735
  let a;
732
736
  try {
733
- const s = await nt(e, r.fetchRequestInit, ({ res: i, result: l }) => (t || (t = i.headers.get("Content-Type") || ""), cr(l)));
734
- a = lr(s, t);
737
+ const s = await at(e, r.fetchRequestInit, ({ res: i, result: l }) => (t || (t = i.headers.get("Content-Type") || ""), ur(l)));
738
+ a = pr(s, t);
735
739
  } catch (s) {
736
740
  a = r.imagePlaceholder || "";
737
741
  let i = `Failed to fetch resource: ${e}`;
@@ -739,65 +743,65 @@ async function Ge(e, t, r) {
739
743
  }
740
744
  return Se[n] = a, a;
741
745
  }
742
- async function ur(e) {
746
+ async function fr(e) {
743
747
  const t = e.toDataURL();
744
- return t === "data:," ? e.cloneNode(!1) : ye(t);
748
+ return t === "data:," ? e.cloneNode(!1) : xe(t);
745
749
  }
746
- async function pr(e, t) {
750
+ async function hr(e, t) {
747
751
  if (e.currentSrc) {
748
752
  const s = document.createElement("canvas"), i = s.getContext("2d");
749
753
  s.width = e.clientWidth, s.height = e.clientHeight, i?.drawImage(e, 0, 0, s.width, s.height);
750
754
  const l = s.toDataURL();
751
- return ye(l);
755
+ return xe(l);
752
756
  }
753
757
  const r = e.poster, n = Ae(r), a = await Ge(r, n, t);
754
- return ye(a);
758
+ return xe(a);
755
759
  }
756
- async function mr(e, t) {
760
+ async function gr(e, t) {
757
761
  var r;
758
762
  try {
759
763
  if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
760
- return await xe(e.contentDocument.body, t, !0);
764
+ return await we(e.contentDocument.body, t, !0);
761
765
  } catch {
762
766
  }
763
767
  return e.cloneNode(!1);
764
768
  }
765
- async function fr(e, t) {
766
- return A(e, HTMLCanvasElement) ? ur(e) : A(e, HTMLVideoElement) ? pr(e, t) : A(e, HTMLIFrameElement) ? mr(e, t) : e.cloneNode(st(e));
769
+ async function yr(e, t) {
770
+ return $(e, HTMLCanvasElement) ? fr(e) : $(e, HTMLVideoElement) ? hr(e, t) : $(e, HTMLIFrameElement) ? gr(e, t) : e.cloneNode(ot(e));
767
771
  }
768
- const hr = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", st = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
769
- async function gr(e, t, r) {
772
+ const xr = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", ot = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
773
+ async function wr(e, t, r) {
770
774
  var n, a;
771
- if (st(t))
775
+ if (ot(t))
772
776
  return t;
773
777
  let s = [];
774
- return hr(e) && e.assignedNodes ? s = W(e.assignedNodes()) : A(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = W(e.contentDocument.body.childNodes) : s = W(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || A(e, HTMLVideoElement) || await s.reduce((i, l) => i.then(() => xe(l, r)).then((p) => {
778
+ return xr(e) && e.assignedNodes ? s = Y(e.assignedNodes()) : $(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = Y(e.contentDocument.body.childNodes) : s = Y(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || $(e, HTMLVideoElement) || await s.reduce((i, l) => i.then(() => we(l, r)).then((p) => {
775
779
  p && t.appendChild(p);
776
780
  }), Promise.resolve()), t;
777
781
  }
778
- function yr(e, t, r) {
782
+ function vr(e, t, r) {
779
783
  const n = t.style;
780
784
  if (!n)
781
785
  return;
782
786
  const a = window.getComputedStyle(e);
783
- a.cssText ? (n.cssText = a.cssText, n.transformOrigin = a.transformOrigin) : tt(r).forEach((s) => {
787
+ a.cssText ? (n.cssText = a.cssText, n.transformOrigin = a.transformOrigin) : nt(r).forEach((s) => {
784
788
  let i = a.getPropertyValue(s);
785
- s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), A(e, HTMLIFrameElement) && s === "display" && i === "inline" && (i = "block"), s === "d" && t.getAttribute("d") && (i = `path(${t.getAttribute("d")})`), n.setProperty(s, i, a.getPropertyPriority(s));
789
+ s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), $(e, HTMLIFrameElement) && s === "display" && i === "inline" && (i = "block"), s === "d" && t.getAttribute("d") && (i = `path(${t.getAttribute("d")})`), n.setProperty(s, i, a.getPropertyPriority(s));
786
790
  });
787
791
  }
788
- function xr(e, t) {
789
- A(e, HTMLTextAreaElement) && (t.innerHTML = e.value), A(e, HTMLInputElement) && t.setAttribute("value", e.value);
792
+ function br(e, t) {
793
+ $(e, HTMLTextAreaElement) && (t.innerHTML = e.value), $(e, HTMLInputElement) && t.setAttribute("value", e.value);
790
794
  }
791
- function wr(e, t) {
792
- if (A(e, HTMLSelectElement)) {
795
+ function Cr(e, t) {
796
+ if ($(e, HTMLSelectElement)) {
793
797
  const n = Array.from(t.children).find((a) => e.value === a.getAttribute("value"));
794
798
  n && n.setAttribute("selected", "");
795
799
  }
796
800
  }
797
- function vr(e, t, r) {
798
- return A(t, Element) && (yr(e, t, r), ar(e, t, r), xr(e, t), wr(e, t)), t;
801
+ function Er(e, t, r) {
802
+ return $(t, Element) && (vr(e, t, r), cr(e, t, r), br(e, t), Cr(e, t)), t;
799
803
  }
800
- async function br(e, t) {
804
+ async function Sr(e, t) {
801
805
  const r = e.querySelectorAll ? e.querySelectorAll("use") : [];
802
806
  if (r.length === 0)
803
807
  return e;
@@ -806,7 +810,7 @@ async function br(e, t) {
806
810
  const l = r[s].getAttribute("xlink:href");
807
811
  if (l) {
808
812
  const p = e.querySelector(l), u = document.querySelector(l);
809
- !p && u && !n[l] && (n[l] = await xe(u, t, !0));
813
+ !p && u && !n[l] && (n[l] = await we(u, t, !0));
810
814
  }
811
815
  }
812
816
  const a = Object.values(n);
@@ -821,31 +825,31 @@ async function br(e, t) {
821
825
  }
822
826
  return e;
823
827
  }
824
- async function xe(e, t, r) {
825
- return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => fr(n, t)).then((n) => gr(e, n, t)).then((n) => vr(e, n, t)).then((n) => br(n, t));
828
+ async function we(e, t, r) {
829
+ return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => yr(n, t)).then((n) => wr(e, n, t)).then((n) => Er(e, n, t)).then((n) => Sr(n, t));
826
830
  }
827
- const at = /url\((['"]?)([^'"]+?)\1\)/g, Cr = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Er = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
828
- function Sr(e) {
831
+ const it = /url\((['"]?)([^'"]+?)\1\)/g, kr = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Rr = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
832
+ function jr(e) {
829
833
  const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
830
834
  return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
831
835
  }
832
- function kr(e) {
836
+ function Or(e) {
833
837
  const t = [];
834
- return e.replace(at, (r, n, a) => (t.push(a), r)), t.filter((r) => !Te(r));
838
+ return e.replace(it, (r, n, a) => (t.push(a), r)), t.filter((r) => !Te(r));
835
839
  }
836
- async function Rr(e, t, r, n, a) {
840
+ async function _r(e, t, r, n, a) {
837
841
  try {
838
- const s = r ? Yt(t, r) : t, i = Ae(t);
842
+ const s = r ? Zt(t, r) : t, i = Ae(t);
839
843
  let l;
840
- return a || (l = await Ge(s, i, n)), e.replace(Sr(t), `$1${l}$3`);
844
+ return a || (l = await Ge(s, i, n)), e.replace(jr(t), `$1${l}$3`);
841
845
  } catch {
842
846
  }
843
847
  return e;
844
848
  }
845
- function jr(e, { preferredFontFormat: t }) {
846
- return t ? e.replace(Er, (r) => {
849
+ function Vr(e, { preferredFontFormat: t }) {
850
+ return t ? e.replace(Rr, (r) => {
847
851
  for (; ; ) {
848
- const [n, , a] = Cr.exec(r) || [];
852
+ const [n, , a] = kr.exec(r) || [];
849
853
  if (!a)
850
854
  return "";
851
855
  if (a === t)
@@ -853,30 +857,30 @@ function jr(e, { preferredFontFormat: t }) {
853
857
  }
854
858
  }) : e;
855
859
  }
856
- function ot(e) {
857
- return e.search(at) !== -1;
860
+ function ct(e) {
861
+ return e.search(it) !== -1;
858
862
  }
859
- async function it(e, t, r) {
860
- if (!ot(e))
863
+ async function lt(e, t, r) {
864
+ if (!ct(e))
861
865
  return e;
862
- const n = jr(e, r);
863
- return kr(n).reduce((s, i) => s.then((l) => Rr(l, i, t, r)), Promise.resolve(n));
866
+ const n = Vr(e, r);
867
+ return Or(n).reduce((s, i) => s.then((l) => _r(l, i, t, r)), Promise.resolve(n));
864
868
  }
865
- async function re(e, t, r) {
869
+ async function ne(e, t, r) {
866
870
  var n;
867
871
  const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
868
872
  if (a) {
869
- const s = await it(a, null, r);
873
+ const s = await lt(a, null, r);
870
874
  return t.style.setProperty(e, s, t.style.getPropertyPriority(e)), !0;
871
875
  }
872
876
  return !1;
873
877
  }
874
- async function Or(e, t) {
875
- await re("background", e, t) || await re("background-image", e, t), await re("mask", e, t) || await re("-webkit-mask", e, t) || await re("mask-image", e, t) || await re("-webkit-mask-image", e, t);
878
+ async function Tr(e, t) {
879
+ await ne("background", e, t) || await ne("background-image", e, t), await ne("mask", e, t) || await ne("-webkit-mask", e, t) || await ne("mask-image", e, t) || await ne("-webkit-mask-image", e, t);
876
880
  }
877
- async function _r(e, t) {
878
- const r = A(e, HTMLImageElement);
879
- if (!(r && !Te(e.src)) && !(A(e, SVGImageElement) && !Te(e.href.baseVal)))
881
+ async function Pr(e, t) {
882
+ const r = $(e, HTMLImageElement);
883
+ if (!(r && !Te(e.src)) && !($(e, SVGImageElement) && !Te(e.href.baseVal)))
880
884
  return;
881
885
  const n = r ? e.src : e.href.baseVal, a = await Ge(n, Ae(n), t);
882
886
  await new Promise((s, i) => {
@@ -891,14 +895,14 @@ async function _r(e, t) {
891
895
  l.decode && (l.decode = s), l.loading === "lazy" && (l.loading = "eager"), r ? (e.srcset = "", e.src = a) : e.href.baseVal = a;
892
896
  });
893
897
  }
894
- async function Vr(e, t) {
895
- const n = W(e.childNodes).map((a) => ct(a, t));
898
+ async function Ar(e, t) {
899
+ const n = Y(e.childNodes).map((a) => dt(a, t));
896
900
  await Promise.all(n).then(() => e);
897
901
  }
898
- async function ct(e, t) {
899
- A(e, Element) && (await Or(e, t), await _r(e, t), await Vr(e, t));
902
+ async function dt(e, t) {
903
+ $(e, Element) && (await Tr(e, t), await Pr(e, t), await Ar(e, t));
900
904
  }
901
- function Tr(e, t) {
905
+ function Gr(e, t) {
902
906
  const { style: r } = e;
903
907
  t.backgroundColor && (r.backgroundColor = t.backgroundColor), t.width && (r.width = `${t.width}px`), t.height && (r.height = `${t.height}px`);
904
908
  const n = t.style;
@@ -918,7 +922,7 @@ async function Ye(e, t) {
918
922
  let r = e.cssText;
919
923
  const n = /url\(["']?([^"')]+)["']?\)/g, s = (r.match(/url\([^)]+\)/g) || []).map(async (i) => {
920
924
  let l = i.replace(n, "$1");
921
- return l.startsWith("https://") || (l = new URL(l, e.url).href), nt(l, t.fetchRequestInit, ({ result: p }) => (r = r.replace(i, `url(${p})`), [i, p]));
925
+ return l.startsWith("https://") || (l = new URL(l, e.url).href), at(l, t.fetchRequestInit, ({ result: p }) => (r = r.replace(i, `url(${p})`), [i, p]));
922
926
  });
923
927
  return Promise.all(s).then(() => r);
924
928
  }
@@ -948,21 +952,21 @@ function Xe(e) {
948
952
  }
949
953
  return t;
950
954
  }
951
- async function Pr(e, t) {
955
+ async function $r(e, t) {
952
956
  const r = [], n = [];
953
957
  return e.forEach((a) => {
954
958
  if ("cssRules" in a)
955
959
  try {
956
- W(a.cssRules || []).forEach((s, i) => {
960
+ Y(a.cssRules || []).forEach((s, i) => {
957
961
  if (s.type === CSSRule.IMPORT_RULE) {
958
962
  let l = i + 1;
959
963
  const p = s.href, u = Be(p).then((x) => Ye(x, t)).then((x) => Xe(x).forEach((m) => {
960
964
  try {
961
965
  a.insertRule(m, m.startsWith("@import") ? l += 1 : a.cssRules.length);
962
- } catch (w) {
966
+ } catch (g) {
963
967
  console.error("Error inserting rule from remote css", {
964
968
  rule: m,
965
- error: w
969
+ error: g
966
970
  });
967
971
  }
968
972
  })).catch((x) => {
@@ -982,7 +986,7 @@ async function Pr(e, t) {
982
986
  }), Promise.all(n).then(() => (e.forEach((a) => {
983
987
  if ("cssRules" in a)
984
988
  try {
985
- W(a.cssRules || []).forEach((s) => {
989
+ Y(a.cssRules || []).forEach((s) => {
986
990
  r.push(s);
987
991
  });
988
992
  } catch (s) {
@@ -990,66 +994,66 @@ async function Pr(e, t) {
990
994
  }
991
995
  }), r));
992
996
  }
993
- function Ar(e) {
994
- return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => ot(t.style.getPropertyValue("src")));
997
+ function Lr(e) {
998
+ return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => ct(t.style.getPropertyValue("src")));
995
999
  }
996
- async function Gr(e, t) {
1000
+ async function Nr(e, t) {
997
1001
  if (e.ownerDocument == null)
998
1002
  throw new Error("Provided element is not within a Document");
999
- const r = W(e.ownerDocument.styleSheets), n = await Pr(r, t);
1000
- return Ar(n);
1003
+ const r = Y(e.ownerDocument.styleSheets), n = await $r(r, t);
1004
+ return Lr(n);
1001
1005
  }
1002
- function lt(e) {
1006
+ function ut(e) {
1003
1007
  return e.trim().replace(/["']/g, "");
1004
1008
  }
1005
- function $r(e) {
1009
+ function Ir(e) {
1006
1010
  const t = /* @__PURE__ */ new Set();
1007
1011
  function r(n) {
1008
1012
  (n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((s) => {
1009
- t.add(lt(s));
1013
+ t.add(ut(s));
1010
1014
  }), Array.from(n.children).forEach((s) => {
1011
1015
  s instanceof HTMLElement && r(s);
1012
1016
  });
1013
1017
  }
1014
1018
  return r(e), t;
1015
1019
  }
1016
- async function Nr(e, t) {
1017
- const r = await Gr(e, t), n = $r(e);
1018
- return (await Promise.all(r.filter((s) => n.has(lt(s.style.fontFamily))).map((s) => {
1020
+ async function Mr(e, t) {
1021
+ const r = await Nr(e, t), n = Ir(e);
1022
+ return (await Promise.all(r.filter((s) => n.has(ut(s.style.fontFamily))).map((s) => {
1019
1023
  const i = s.parentStyleSheet ? s.parentStyleSheet.href : null;
1020
- return it(s.cssText, i, t);
1024
+ return lt(s.cssText, i, t);
1021
1025
  }))).join(`
1022
1026
  `);
1023
1027
  }
1024
- async function Lr(e, t) {
1025
- const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await Nr(e, t);
1028
+ async function zr(e, t) {
1029
+ const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await Mr(e, t);
1026
1030
  if (r) {
1027
1031
  const n = document.createElement("style"), a = document.createTextNode(r);
1028
1032
  n.appendChild(a), e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n);
1029
1033
  }
1030
1034
  }
1031
- async function Ir(e, t = {}) {
1032
- const { width: r, height: n } = rt(e, t), a = await xe(e, t, !0);
1033
- return await Lr(a, t), await ct(a, t), Tr(a, t), await tr(a, r, n);
1035
+ async function Fr(e, t = {}) {
1036
+ const { width: r, height: n } = st(e, t), a = await we(e, t, !0);
1037
+ return await zr(a, t), await dt(a, t), Gr(a, t), await sr(a, r, n);
1034
1038
  }
1035
- async function zr(e, t = {}) {
1036
- const { width: r, height: n } = rt(e, t), a = await Ir(e, t), s = await ye(a), i = document.createElement("canvas"), l = i.getContext("2d"), p = t.pixelRatio || Kt(), u = t.canvasWidth || r, x = t.canvasHeight || n;
1037
- return i.width = u * p, i.height = x * p, t.skipAutoScale || Qt(i), i.style.width = `${u}`, i.style.height = `${x}`, t.backgroundColor && (l.fillStyle = t.backgroundColor, l.fillRect(0, 0, i.width, i.height)), l.drawImage(s, 0, 0, i.width, i.height), i;
1039
+ async function Dr(e, t = {}) {
1040
+ const { width: r, height: n } = st(e, t), a = await Fr(e, t), s = await xe(a), i = document.createElement("canvas"), l = i.getContext("2d"), p = t.pixelRatio || tr(), u = t.canvasWidth || r, x = t.canvasHeight || n;
1041
+ return i.width = u * p, i.height = x * p, t.skipAutoScale || rr(i), i.style.width = `${u}`, i.style.height = `${x}`, t.backgroundColor && (l.fillStyle = t.backgroundColor, l.fillRect(0, 0, i.width, i.height)), l.drawImage(s, 0, 0, i.width, i.height), i;
1038
1042
  }
1039
- async function Mr(e, t = {}) {
1040
- return (await zr(e, t)).toDataURL("image/jpeg", t.quality || 1);
1043
+ async function Je(e, t = {}) {
1044
+ return (await Dr(e, t)).toDataURL("image/jpeg", t.quality || 1);
1041
1045
  }
1042
- const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 15, Wr = () => {
1046
+ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 15, qr = () => {
1043
1047
  const e = window.innerWidth;
1044
1048
  return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
1045
- }, Ur = (e) => {
1049
+ }, Br = (e) => {
1046
1050
  let t = 0;
1047
1051
  for (let r = 0; r < e.length; r++) {
1048
1052
  const n = e.charCodeAt(r);
1049
1053
  t = (t << 5) - t + n, t = t & t;
1050
1054
  }
1051
1055
  return Math.abs(t).toString(16);
1052
- }, qr = (e, t) => {
1056
+ }, Yr = (e, t) => {
1053
1057
  if (!e) return "";
1054
1058
  try {
1055
1059
  const r = new Date(e);
@@ -1064,10 +1068,10 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1064
1068
  } catch {
1065
1069
  return "";
1066
1070
  }
1067
- }, Br = (e) => {
1071
+ }, Xr = (e) => {
1068
1072
  const t = (e.innerText || "").slice(0, 30).trim(), r = {
1069
1073
  tag: e.tagName.toLowerCase(),
1070
- classHash: Ur(e.className),
1074
+ classHash: Br(e.className),
1071
1075
  textSnippet: t,
1072
1076
  parentTag: e.parentElement?.tagName.toLowerCase(),
1073
1077
  neighborCount: e.parentElement?.children.length || 0
@@ -1077,7 +1081,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1077
1081
  a && (r.role = a);
1078
1082
  const s = e.getAttribute("name");
1079
1083
  return s && (r.name = s), r;
1080
- }, Yr = /* @__PURE__ */ (() => {
1084
+ }, Jr = /* @__PURE__ */ (() => {
1081
1085
  let e = null, t = null;
1082
1086
  return (r) => {
1083
1087
  if (!r || typeof window > "u" || typeof document > "u") return r;
@@ -1098,7 +1102,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1098
1102
  }
1099
1103
  return r;
1100
1104
  };
1101
- })(), Xr = (e, t, r, n) => new Promise((a) => {
1105
+ })(), Ze = (e, t, r, n) => new Promise((a) => {
1102
1106
  const s = new Image();
1103
1107
  s.onload = () => {
1104
1108
  const i = document.createElement("canvas"), l = window.devicePixelRatio || 1, p = t.width + r * 2, u = t.height + r * 2;
@@ -1106,22 +1110,22 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1106
1110
  const x = i.getContext("2d");
1107
1111
  if (x) {
1108
1112
  x.scale(l, l);
1109
- const m = (t.left - r) * n, w = (t.top - r) * n, g = p * n, v = u * n;
1110
- x.drawImage(
1113
+ let m = (t.left - r) * n, g = (t.top - r) * n, h = p * n, v = u * n, j = 0, T = 0, I = p, M = u;
1114
+ m < 0 && (j = Math.abs(m) / n, h += m, I -= j, m = 0), m + h > s.width && (h = s.width - m, I = h / n), g < 0 && (T = Math.abs(g) / n, v += g, M -= T, g = 0), g + v > s.height && (v = s.height - g, M = v / n), x.fillStyle = "#f8fafc", x.fillRect(0, 0, p, u), h > 0 && v > 0 && x.drawImage(
1111
1115
  s,
1112
1116
  m,
1113
- w,
1114
1117
  g,
1118
+ h,
1115
1119
  v,
1116
- 0,
1117
- 0,
1118
- p,
1119
- u
1120
+ j,
1121
+ T,
1122
+ I,
1123
+ M
1120
1124
  );
1121
1125
  }
1122
1126
  a(i.toDataURL("image/png"));
1123
1127
  }, s.onerror = () => a(""), s.src = e;
1124
- }), Jr = (e) => {
1128
+ }), Zr = (e) => {
1125
1129
  const t = window.getComputedStyle(e), r = {};
1126
1130
  return [
1127
1131
  "display",
@@ -1136,9 +1140,9 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1136
1140
  "z-index"
1137
1141
  ].forEach((a) => {
1138
1142
  const s = t.getPropertyValue(a);
1139
- r[a] = Yr(s);
1143
+ r[a] = Jr(s);
1140
1144
  }), r;
1141
- }, Zr = (e) => {
1145
+ }, Kr = (e) => {
1142
1146
  const r = Object.keys(e).find((s) => s.startsWith("__reactFiber$") || s.startsWith("__reactInternalInstance$"));
1143
1147
  if (!r) return "";
1144
1148
  const n = [];
@@ -1152,7 +1156,13 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1152
1156
  a = a.return;
1153
1157
  }
1154
1158
  return n.join(" > ") || "Generic Component";
1155
- }, Je = (e) => {
1159
+ }, pt = (e) => {
1160
+ if (!e) return !1;
1161
+ const t = window.getComputedStyle(e), r = e.getBoundingClientRect(), n = e.getAttribute("role");
1162
+ if (n && ["listbox", "menu", "combobox", "tooltip", "option"].includes(n)) return !1;
1163
+ const s = 120;
1164
+ return r.width < s && r.height < s || t.position !== "fixed" && t.position !== "absolute" ? !1 : !!(e.closest('[role="dialog"]') || e.closest('[aria-modal="true"]') || e.classList.contains("modal") || e.classList.contains("modal-content"));
1165
+ }, Ke = (e) => {
1156
1166
  if (!e.isConnected) return !1;
1157
1167
  const t = window.getComputedStyle(e);
1158
1168
  if (t.display === "none" || t.visibility === "hidden" || t.opacity === "0" || e.offsetWidth === 0 || e.offsetHeight === 0) return !1;
@@ -1176,7 +1186,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1176
1186
  }
1177
1187
  }
1178
1188
  return null;
1179
- }, Ze = (e, t) => {
1189
+ }, Qe = (e, t) => {
1180
1190
  let r = document.elementFromPoint(e, t);
1181
1191
  for (; r && r.shadowRoot; ) {
1182
1192
  const n = r.shadowRoot.elementFromPoint(e, t);
@@ -1184,7 +1194,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1184
1194
  r = n;
1185
1195
  }
1186
1196
  return r;
1187
- }, Kr = (e) => {
1197
+ }, Qr = (e) => {
1188
1198
  if (!e.tag) return null;
1189
1199
  const t = document.getElementsByTagName(e.tag);
1190
1200
  let r = null, n = 0;
@@ -1194,20 +1204,20 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1194
1204
  s.innerText?.includes(e.text.slice(0, 20)) && (i += 4), e.fingerprint?.classHash && s.className.includes(e.fingerprint.classHash) && (i += 2), e.fingerprint?.ariaLabel && s.getAttribute("aria-label") === e.fingerprint.ariaLabel && (i += 3), e.fingerprint?.role && s.getAttribute("role") === e.fingerprint.role && (i += 2), e.parentContext && (s.parentElement?.innerText || "").includes(e.parentContext.slice(0, 30)) && (i += 2), e.fingerprint?.neighborCount === s.parentElement?.children.length && (i += 1), e.fingerprint?.parentTag === s.parentElement?.tagName.toLowerCase() && (i += 1), i > n && i >= 5 && (n = i, r = s);
1195
1205
  }
1196
1206
  return r;
1197
- }, Qr = (e) => {
1207
+ }, en = (e) => {
1198
1208
  let t = Pe(e.selector);
1199
1209
  if (t) return t;
1200
1210
  if (e.fallbackSelectors) {
1201
1211
  for (const r of e.fallbackSelectors)
1202
1212
  if (t = Pe(r), t) return t;
1203
1213
  }
1204
- return t = Kr(e), t || null;
1214
+ return t = Qr(e), t || null;
1205
1215
  }, je = (e) => ({
1206
1216
  tag: e.tagName.toLowerCase(),
1207
1217
  text: (e.innerText || e.getAttribute("placeholder") || "").slice(0, 50).trim(),
1208
1218
  role: e.getAttribute("role") || void 0,
1209
1219
  type: e.getAttribute("type") || void 0
1210
- }), en = (e) => {
1220
+ }), tn = (e) => {
1211
1221
  const t = e.parentElement;
1212
1222
  if (!t) return;
1213
1223
  const r = Array.from(t.children).filter((i) => i !== e).slice(0, 5).map((i) => je(i)), n = Array.from(t.children), a = n.indexOf(e);
@@ -1220,7 +1230,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1220
1230
  parent: je(t),
1221
1231
  siblings: r
1222
1232
  };
1223
- }, tn = (e) => {
1233
+ }, rn = (e) => {
1224
1234
  let t = "unknown:0", r = e;
1225
1235
  for (; r; ) {
1226
1236
  const m = r.getAttribute("data-source-path");
@@ -1230,45 +1240,45 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1230
1240
  }
1231
1241
  r = r.parentElement;
1232
1242
  }
1233
- const n = Zr(e), a = [], s = [], i = (m) => {
1234
- const w = [];
1235
- let g = m;
1236
- for (; g && g.nodeType === Node.ELEMENT_NODE; ) {
1237
- let v = g.nodeName.toLowerCase();
1243
+ const n = Kr(e), a = [], s = [], i = (m) => {
1244
+ const g = [];
1245
+ let h = m;
1246
+ for (; h && h.nodeType === Node.ELEMENT_NODE; ) {
1247
+ let v = h.nodeName.toLowerCase();
1238
1248
  s.unshift(v);
1239
- const V = g.id && !g.id.startsWith("__") ? g.id : null;
1240
- V && a.push(`#${V}`);
1241
- const L = g.getAttribute("data-testid") || g.getAttribute("data-qa");
1242
- L && a.push(`[data-testid="${L}"]`);
1243
- const U = g.getAttribute("aria-label"), q = g.getAttribute("role"), O = g.getAttribute("name");
1244
- if (L) {
1245
- v = `[${g.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${L}"]`, w.unshift(v);
1249
+ const j = h.id && !h.id.startsWith("__") ? h.id : null;
1250
+ j && a.push(`#${j}`);
1251
+ const T = h.getAttribute("data-testid") || h.getAttribute("data-qa");
1252
+ T && a.push(`[data-testid="${T}"]`);
1253
+ const I = h.getAttribute("aria-label"), M = h.getAttribute("role"), P = h.getAttribute("name");
1254
+ if (T) {
1255
+ v = `[${h.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${T}"]`, g.unshift(v);
1246
1256
  break;
1247
- } else if (V) {
1248
- v = "#" + V, w.unshift(v);
1257
+ } else if (j) {
1258
+ v = "#" + j, g.unshift(v);
1249
1259
  break;
1250
- } else if (U) {
1251
- v = `${g.localName}[aria-label="${U}"]`, w.unshift(v);
1260
+ } else if (I) {
1261
+ v = `${h.localName}[aria-label="${I}"]`, g.unshift(v);
1252
1262
  break;
1253
- } else if (q) {
1254
- v = `${g.localName}[role="${q}"]`, w.unshift(v);
1263
+ } else if (M) {
1264
+ v = `${h.localName}[role="${M}"]`, g.unshift(v);
1255
1265
  break;
1256
- } else if (O) {
1257
- v = `${g.localName}[name="${O}"]`, w.unshift(v);
1266
+ } else if (P) {
1267
+ v = `${h.localName}[name="${P}"]`, g.unshift(v);
1258
1268
  break;
1259
1269
  } else {
1260
- let T = g, S = 1;
1261
- for (; T.previousElementSibling; )
1262
- T = T.previousElementSibling, T.nodeName.toLowerCase() === g.nodeName.toLowerCase() && S++;
1263
- S > 1 && (v += `:nth-of-type(${S})`);
1270
+ let A = h, k = 1;
1271
+ for (; A.previousElementSibling; )
1272
+ A = A.previousElementSibling, A.nodeName.toLowerCase() === h.nodeName.toLowerCase() && k++;
1273
+ k > 1 && (v += `:nth-of-type(${k})`);
1264
1274
  }
1265
- w.unshift(v), g = g.parentElement;
1275
+ g.unshift(v), h = h.parentElement;
1266
1276
  }
1267
- return w.join(" > ");
1268
- }, l = !!(e.closest('[role="dialog"]') || e.closest('[aria-modal="true"]') || e.closest(".modal") || e.closest(".modal-content")), p = i(e), u = {};
1277
+ return g.join(" > ");
1278
+ }, l = pt(e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')), p = i(e), u = {};
1269
1279
  ["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((m) => {
1270
- const w = e.getAttribute(m);
1271
- w && (u[m] = w);
1280
+ const g = e.getAttribute(m);
1281
+ g && (u[m] = g);
1272
1282
  });
1273
1283
  const x = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${p.split(" > ").slice(-1)}`;
1274
1284
  return {
@@ -1286,164 +1296,183 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1286
1296
  fallbackSelectors: [...new Set(a)].slice(0, 5),
1287
1297
  domPath: s.slice(-10),
1288
1298
  viewportSize: { width: window.innerWidth, height: window.innerHeight },
1289
- uiContext: en(e),
1290
- fingerprint: Br(e),
1299
+ uiContext: tn(e),
1300
+ fingerprint: Xr(e),
1291
1301
  metadata: {
1292
1302
  hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`,
1293
- computedStyles: Jr(e),
1294
- viewportBreakpoint: Wr(),
1303
+ computedStyles: Zr(e),
1304
+ viewportBreakpoint: qr(),
1295
1305
  outerHtml: e.outerHTML.slice(0, 1500),
1296
1306
  scrollPosition: { x: window.scrollX, y: window.scrollY },
1297
1307
  isModal: l
1298
1308
  }
1299
1309
  };
1300
- }, rn = () => {
1301
- const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a, disableViewGate: s, hasActiveToasts: i } = qt(), [l, p] = k(!1), [u, x] = k(null), [m, w] = k(null), [g, v] = k(""), [V, L] = k(!1), [U, q] = k(!1), [O, T] = k(!1), [S, ve] = k([]), [I, M] = k(null), [ue, $e] = k(!1), [se, Z] = k(!1), [pe, me] = k({}), [F, K] = k(null), [B, ae] = k(!1), [oe, Q] = k(null), [c, f] = k(""), [C, E] = k({}), z = Oe(null), D = Oe(null), b = fe(() => {
1302
- D.current || (D.current = requestAnimationFrame(() => {
1303
- const d = {}, h = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal')).find((_) => Je(_)), H = !!h;
1304
- S.forEach((_) => {
1305
- if (!_.reference) return;
1306
- const j = Qr(_.reference), R = !!_.reference.metadata?.isModal;
1307
- if (j && Je(j)) {
1308
- let X = !1;
1309
- if (H ? X = h.contains(j) : X = !R, !X) return;
1310
- const G = j.getBoundingClientRect(), ce = G.left + G.width / 2, ee = G.top + G.height / 2;
1311
- if (ce >= 0 && ce <= window.innerWidth && ee >= 0 && ee <= window.innerHeight) {
1312
- const be = document.elementFromPoint(ce, ee);
1313
- if (be && !j.contains(be) && !z.current?.contains(be))
1310
+ }, nn = () => {
1311
+ const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a, disableViewGate: s, hasActiveToasts: i } = Xt(), [l, p] = R(!1), [u, x] = R(null), [m, g] = R(null), [h, v] = R(""), [j, T] = R(!1), [I, M] = R(!1), [P, A] = R(!1), [k, be] = R([]), [z, D] = R(null), [pe, $e] = R(!1), [ae, K] = R(!1), [me, fe] = R({}), [W, Q] = R(null), [X, oe] = R(!1), [ie, ee] = R(null), [c, f] = R(""), [C, S] = R({}), F = Oe(null), U = Oe(null), b = he(() => {
1312
+ U.current || (U.current = requestAnimationFrame(() => {
1313
+ const d = {}, y = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find((O) => pt(O) && Ke(O)), H = !!y;
1314
+ k.forEach((O) => {
1315
+ if (!O.reference) return;
1316
+ const _ = en(O.reference), E = !!O.reference.metadata?.isModal;
1317
+ if (_ && Ke(_)) {
1318
+ let te = !1;
1319
+ if (H ? te = y.contains(_) : te = !E, !te) return;
1320
+ const V = _.getBoundingClientRect(), le = V.left + V.width / 2, q = V.top + V.height / 2;
1321
+ if (le >= 0 && le <= window.innerWidth && q >= 0 && q <= window.innerHeight) {
1322
+ const B = document.elementFromPoint(le, q);
1323
+ if (B && !_.contains(B) && !F.current?.contains(B))
1314
1324
  return;
1315
1325
  }
1316
- d[_._id] = {
1317
- top: G.top + window.scrollY,
1318
- left: G.left + window.scrollX,
1319
- width: G.width,
1320
- isModal: R
1326
+ d[O._id] = {
1327
+ top: V.top + window.scrollY,
1328
+ left: V.left + window.scrollX,
1329
+ width: V.width,
1330
+ isModal: E
1321
1331
  };
1322
1332
  }
1323
- }), E(d), D.current = null;
1333
+ }), S(d), U.current = null;
1324
1334
  }));
1325
- }, [S]), P = fe(async () => {
1335
+ }, [k]), G = he(async () => {
1326
1336
  if (n) {
1327
- Z(!0);
1337
+ K(!0);
1328
1338
  try {
1329
1339
  const d = await fetch(`${a}/api/annotations`, {
1330
1340
  headers: { "x-api-key": n }
1331
1341
  });
1332
1342
  if (d.ok) {
1333
- const y = await d.json();
1334
- ve(y.data || []);
1343
+ const w = await d.json();
1344
+ be(w.data || []);
1335
1345
  }
1336
1346
  } catch (d) {
1337
1347
  console.error("Failed to fetch annotations", d);
1338
1348
  } finally {
1339
- Z(!1);
1349
+ K(!1);
1340
1350
  }
1341
1351
  }
1342
1352
  }, [n, a]);
1343
- J(() => {
1344
- O && S.length === 0 && !se && T(!1);
1345
- }, [O, S.length, se]), J(() => {
1346
- if (!l && S.length > 0) {
1353
+ Z(() => {
1354
+ P && k.length === 0 && !ae && A(!1);
1355
+ }, [P, k.length, ae]), Z(() => {
1356
+ if (!l && k.length > 0) {
1347
1357
  b();
1348
- const d = new MutationObserver(() => b()), y = new ResizeObserver(() => b()), h = () => b();
1358
+ const d = new MutationObserver(() => b()), w = new ResizeObserver(() => b()), y = () => b();
1349
1359
  return d.observe(document.documentElement, {
1350
1360
  childList: !0,
1351
1361
  subtree: !0,
1352
1362
  attributes: !0
1353
- }), y.observe(document.documentElement), window.addEventListener("scroll", h, !0), () => {
1354
- d.disconnect(), y.disconnect(), window.removeEventListener("scroll", h, !0), D.current && cancelAnimationFrame(D.current);
1363
+ }), w.observe(document.documentElement), window.addEventListener("scroll", y, !0), () => {
1364
+ d.disconnect(), w.disconnect(), window.removeEventListener("scroll", y, !0), U.current && cancelAnimationFrame(U.current);
1355
1365
  };
1356
1366
  }
1357
- }, [l, S.length, b]), J(() => {
1358
- P();
1359
- }, [P]), J(() => {
1360
- z.current = document.getElementById("viewgate-shadow-host");
1367
+ }, [l, k.length, b]), Z(() => {
1368
+ G();
1369
+ }, [G]), Z(() => {
1370
+ F.current = document.getElementById("viewgate-shadow-host");
1361
1371
  }, []);
1362
- const Y = fe((d) => {
1372
+ const J = he((d) => {
1363
1373
  if (!l || m) return;
1364
- const y = Ze(d.clientX, d.clientY);
1365
- if (!y || z.current?.contains(y) || y.closest(".vg-no-capture")) {
1374
+ const w = Qe(d.clientX, d.clientY);
1375
+ if (!w || F.current?.contains(w) || w.closest(".vg-no-capture")) {
1366
1376
  x(null);
1367
1377
  return;
1368
1378
  }
1369
- const h = y.getBoundingClientRect();
1379
+ const y = w.getBoundingClientRect();
1370
1380
  x({
1371
- tag: y.tagName.toLowerCase(),
1372
- source: y.getAttribute("data-source-path") || "unknown:0",
1373
- rect: h,
1374
- element: y,
1375
- previewText: (y.innerText || "").slice(0, 100) || (y.getAttribute("placeholder") || "").slice(0, 100) || y.tagName.toLowerCase(),
1381
+ tag: w.tagName.toLowerCase(),
1382
+ source: w.getAttribute("data-source-path") || "unknown:0",
1383
+ rect: y,
1384
+ element: w,
1385
+ previewText: (w.innerText || "").slice(0, 100) || (w.getAttribute("placeholder") || "").slice(0, 100) || w.tagName.toLowerCase(),
1376
1386
  semanticReference: {
1377
- ...tn(y),
1387
+ ...rn(w),
1378
1388
  normalizedOffset: {
1379
- x: (d.clientX - h.left) / h.width,
1380
- y: (d.clientY - h.top) / h.height
1389
+ x: (d.clientX - y.left) / y.width,
1390
+ y: (d.clientY - y.top) / y.height
1381
1391
  }
1382
1392
  }
1383
1393
  });
1384
- }, [l, m]), ie = fe(async (d) => {
1394
+ }, [l, m]), ce = he(async (d) => {
1385
1395
  if (!l || m) return;
1386
- const y = Ze(d.clientX, d.clientY);
1387
- if (!(!y || z.current?.contains(y) || y.closest(".vg-no-capture")) && u) {
1388
- d.preventDefault(), d.stopPropagation(), q(!0);
1396
+ const w = Qe(d.clientX, d.clientY);
1397
+ if (!(!w || F.current?.contains(w) || w.closest(".vg-no-capture")) && u) {
1398
+ d.preventDefault(), d.stopPropagation(), M(!0);
1389
1399
  try {
1390
- const h = u.element.getBoundingClientRect(), H = 24, _ = 2, j = await Mr(document.body, {
1400
+ const y = u.element.getBoundingClientRect(), H = 24, O = 2, _ = await Je(document.documentElement, {
1391
1401
  quality: 0.9,
1392
- pixelRatio: _,
1402
+ pixelRatio: O,
1403
+ cacheBust: !0,
1393
1404
  width: window.innerWidth,
1394
1405
  height: window.innerHeight,
1395
1406
  style: {
1396
1407
  transform: `scale(${1 / window.devicePixelRatio}) translate(-${window.scrollX}px, -${window.scrollY}px)`,
1397
1408
  transformOrigin: "top left"
1398
1409
  },
1399
- filter: (ce) => {
1400
- const ee = ce;
1401
- return !(z.current?.contains(ee) || ee.id === "viewgate-ui");
1410
+ filter: (q) => {
1411
+ const B = q;
1412
+ return !(F.current?.contains(B) || B.id === "viewgate-ui");
1413
+ }
1414
+ }), E = u.element.getBoundingClientRect(), te = E.top >= 0 && E.left >= 0 && E.bottom <= window.innerHeight && E.right <= window.innerWidth;
1415
+ let V = "";
1416
+ if (te && E.width > 0 && E.height > 0)
1417
+ V = await Ze(_, E, H, O);
1418
+ else
1419
+ try {
1420
+ V = await Je(u.element, {
1421
+ quality: 0.9,
1422
+ pixelRatio: O,
1423
+ cacheBust: !0,
1424
+ filter: (q) => {
1425
+ const B = q;
1426
+ return !F.current?.contains(B);
1427
+ }
1428
+ });
1429
+ } catch (q) {
1430
+ console.warn("Direct element capture failed, falling back to viewport crop:", q), V = await Ze(_, E, H, O);
1402
1431
  }
1403
- }), R = u.element.getBoundingClientRect(), X = await Xr(j, R, H, _), G = {
1432
+ const le = {
1404
1433
  ...u.semanticReference,
1405
1434
  metadata: {
1406
1435
  ...u.semanticReference.metadata,
1407
- screenshotUrl: j,
1408
- elementScreenshot: X
1436
+ screenshotUrl: _,
1437
+ elementScreenshot: V
1409
1438
  }
1410
1439
  };
1411
- w({
1440
+ g({
1412
1441
  ...u,
1413
- visualPreview: X,
1414
- semanticReference: G
1442
+ visualPreview: V,
1443
+ semanticReference: le
1415
1444
  });
1416
- } catch (h) {
1417
- console.error("Failed to capture preview:", h), w(u);
1445
+ } catch (y) {
1446
+ console.error("Failed to capture preview:", y), g(u);
1418
1447
  } finally {
1419
- q(!1), x(null);
1448
+ M(!1), x(null);
1420
1449
  }
1421
1450
  }
1422
1451
  }, [l, u, m]);
1423
- J(() => {
1424
- const d = (y) => {
1425
- if (y.key === "Escape") {
1426
- m ? w(null) : O ? T(!1) : l && p(!1);
1452
+ Z(() => {
1453
+ const d = (w) => {
1454
+ if (w.key === "Escape") {
1455
+ m ? g(null) : P ? A(!1) : l && p(!1);
1427
1456
  return;
1428
1457
  }
1429
1458
  const H = (() => {
1430
- let R = document.activeElement;
1431
- for (; R && R.shadowRoot && R.shadowRoot.activeElement; )
1432
- R = R.shadowRoot.activeElement;
1433
- return R;
1459
+ let E = document.activeElement;
1460
+ for (; E && E.shadowRoot && E.shadowRoot.activeElement; )
1461
+ E = E.shadowRoot.activeElement;
1462
+ return E;
1434
1463
  })();
1435
1464
  if (["input", "textarea"].includes((H?.tagName || "").toLowerCase()) || H?.isContentEditable) return;
1436
- const j = y.key.toLowerCase();
1437
- j === "c" && !m && !O && p((R) => !R), j === "v" && !m && (S.length > 0 || O) && (T((R) => !R), O || p(!1));
1465
+ const _ = w.key.toLowerCase();
1466
+ _ === "c" && !m && !P && p((E) => !E), _ === "v" && !m && (k.length > 0 || P) && (A((E) => !E), P || p(!1));
1438
1467
  };
1439
- return l && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", d), window.addEventListener("mousemove", Y, !0), window.addEventListener("click", ie, !0), () => {
1440
- document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove", Y, !0), window.removeEventListener("click", ie, !0);
1468
+ return l && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", d), window.addEventListener("mousemove", J, !0), window.addEventListener("click", ce, !0), () => {
1469
+ document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove", J, !0), window.removeEventListener("click", ce, !0);
1441
1470
  };
1442
- }, [l, m, O, S, Y, ie]);
1443
- const ut = async () => {
1444
- if (!m || !g.trim()) return;
1445
- L(!0);
1446
- const { semanticReference: d } = m, [y, h] = (d.source || "").split(":"), H = h || "0";
1471
+ }, [l, m, P, k, J, ce]);
1472
+ const ft = async () => {
1473
+ if (!m || !h.trim()) return;
1474
+ T(!0);
1475
+ const { semanticReference: d } = m, [w, y] = (d.source || "").split(":"), H = y || "0";
1447
1476
  try {
1448
1477
  if (!(await fetch(`${a}/api/annotations`, {
1449
1478
  method: "POST",
@@ -1452,10 +1481,10 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1452
1481
  "x-api-key": n
1453
1482
  },
1454
1483
  body: JSON.stringify({
1455
- filePath: y,
1484
+ filePath: w,
1456
1485
  line: parseInt(H),
1457
1486
  url: window.location.href,
1458
- message: g,
1487
+ message: h,
1459
1488
  componentName: d.componentPath || m.tag,
1460
1489
  reference: {
1461
1490
  ...d,
@@ -1468,19 +1497,24 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1468
1497
  }
1469
1498
  })
1470
1499
  })).ok) throw new Error("Backend failed");
1471
- e(r.success, "success"), w(null), v(""), p(!1), P();
1472
- } catch (_) {
1473
- console.error(_), e(r.error, "error");
1500
+ e(r.success, "success"), g(null), v(""), p(!1), G();
1501
+ } catch (O) {
1502
+ console.error(O), e(r.error, "error");
1474
1503
  } finally {
1475
- L(!1);
1504
+ T(!1);
1476
1505
  }
1477
1506
  };
1478
- return /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:806", className: "vg-container", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:807", className: "vg-no-capture", children: [
1507
+ return /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:895", className: "vg-container", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:896", className: "vg-no-capture", children: [
1479
1508
  !i && /* @__PURE__ */ o.jsx(
1480
1509
  "button",
1481
1510
  {
1482
1511
  onClick: (d) => {
1483
- d.stopPropagation(), s();
1512
+ d.stopPropagation(), D({
1513
+ title: r.exitConfirmTitle || "Close ViewGate?",
1514
+ message: r.exitConfirmMessage || "Are you sure you want to close ViewGate?",
1515
+ type: "danger",
1516
+ onConfirm: () => s()
1517
+ });
1484
1518
  },
1485
1519
  title: "Cerrar ViewGate",
1486
1520
  style: {
@@ -1508,10 +1542,10 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1508
1542
  onMouseLeave: (d) => {
1509
1543
  d.currentTarget.style.transform = "scale(1) rotate(0deg)", d.currentTarget.style.color = "#64748b", d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.9)";
1510
1544
  },
1511
- children: /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:846", size: 20, strokeWidth: 2.5 })
1545
+ children: /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:940", size: 20, strokeWidth: 2.5 })
1512
1546
  }
1513
1547
  ),
1514
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:851", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: ke }, id: "viewgate-ui", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:852", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
1548
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:945", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: ke }, id: "viewgate-ui", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:946", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
1515
1549
  /* @__PURE__ */ o.jsx(
1516
1550
  "button",
1517
1551
  {
@@ -1521,28 +1555,28 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1521
1555
  padding: "12px 24px",
1522
1556
  background: l ? "#ef4444" : void 0
1523
1557
  },
1524
- children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:861", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
1525
- l ? /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:862", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:862", size: 20, className: "vg-animate-pop" }),
1526
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:863", children: l ? r.exitMode : r.enterMode })
1558
+ children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:955", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
1559
+ l ? /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:956", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:956", size: 20, className: "vg-animate-pop" }),
1560
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:957", children: l ? r.exitMode : r.enterMode })
1527
1561
  ] })
1528
1562
  }
1529
1563
  ),
1530
- S.length > 0 && /* @__PURE__ */ o.jsxs(
1564
+ k.length > 0 && /* @__PURE__ */ o.jsxs(
1531
1565
  "button",
1532
1566
  {
1533
1567
  onClick: () => {
1534
- T(!O), p(!1), w(null);
1568
+ A(!P), p(!1), g(null);
1535
1569
  },
1536
1570
  className: "vg-button-ghost vg-animate-pop",
1537
1571
  style: { animationDelay: "0.1s" },
1538
1572
  children: [
1539
- /* @__PURE__ */ o.jsx(Tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:876", size: 20 }),
1540
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:877", children: r.viewComments })
1573
+ /* @__PURE__ */ o.jsx(Gt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:970", size: 20 }),
1574
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:971", children: r.viewComments })
1541
1575
  ]
1542
1576
  }
1543
1577
  )
1544
1578
  ] }) }),
1545
- U && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:885", style: {
1579
+ I && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:979", style: {
1546
1580
  position: "fixed",
1547
1581
  top: 0,
1548
1582
  left: 0,
@@ -1555,14 +1589,14 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1555
1589
  justifyContent: "center",
1556
1590
  zIndex: ke + 1,
1557
1591
  cursor: "wait"
1558
- }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:891", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
1559
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:892", className: "vg-spinner" }),
1560
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:893", style: { fontWeight: 600, fontSize: "14px", color: "#1e293b" }, children: "Capturando..." })
1592
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:985", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
1593
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:986", className: "vg-spinner" }),
1594
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:987", style: { fontWeight: 600, fontSize: "14px", color: "#000000" }, children: "Capturando..." })
1561
1595
  ] }) }),
1562
1596
  l && !m && /* @__PURE__ */ o.jsx(
1563
1597
  "div",
1564
1598
  {
1565
- "data-source-path": "/src/components/ViewGateOverlay.tsx:900",
1599
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:994",
1566
1600
  className: "vg-backdrop-blur",
1567
1601
  style: {
1568
1602
  opacity: 1,
@@ -1574,36 +1608,36 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1574
1608
  ${u.rect.left}px ${u.rect.bottom}px,
1575
1609
  ${u.rect.left}px ${u.rect.top}px
1576
1610
  )` : "none",
1577
- zIndex: Fr
1611
+ zIndex: Hr
1578
1612
  }
1579
1613
  }
1580
1614
  ),
1581
- l && u && !m && !U && /* @__PURE__ */ o.jsx(
1615
+ l && u && !m && !I && /* @__PURE__ */ o.jsx(
1582
1616
  "div",
1583
1617
  {
1584
- "data-source-path": "/src/components/ViewGateOverlay.tsx:919",
1618
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1013",
1585
1619
  className: "vg-selection-pulse",
1586
1620
  style: {
1587
1621
  top: u.rect.top - 4,
1588
1622
  left: u.rect.left - 4,
1589
1623
  width: u.rect.width + 8,
1590
1624
  height: u.rect.height + 8,
1591
- zIndex: Dr
1625
+ zIndex: Wr
1592
1626
  },
1593
1627
  children: /* @__PURE__ */ o.jsxs(
1594
1628
  "div",
1595
1629
  {
1596
- "data-source-path": "/src/components/ViewGateOverlay.tsx:929",
1630
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1023",
1597
1631
  className: "vg-selection-label",
1598
1632
  style: {
1599
1633
  ...u.rect.top < 60 ? u.rect.bottom > window.innerHeight - 60 ? { top: "8px", bottom: "auto" } : { top: "100%", marginTop: "8px", bottom: "auto" } : { top: "-40px", bottom: "auto" },
1600
1634
  ...u.rect.left + 200 > window.innerWidth ? { left: "auto", right: "0" } : { left: "0", right: "auto" }
1601
1635
  },
1602
1636
  children: [
1603
- /* @__PURE__ */ o.jsx(Nt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:945", size: 16 }),
1604
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:946", style: { display: "flex", flexDirection: "column" }, children: [
1605
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:947", style: { fontWeight: 700 }, children: r.selectToComment }),
1606
- /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:948", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
1637
+ /* @__PURE__ */ o.jsx(Mt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1039", size: 16 }),
1638
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1040", style: { display: "flex", flexDirection: "column" }, children: [
1639
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1041", style: { fontWeight: 700 }, children: r.selectToComment }),
1640
+ /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1042", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
1607
1641
  Math.round(u.rect.width),
1608
1642
  " × ",
1609
1643
  Math.round(u.rect.height)
@@ -1614,7 +1648,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1614
1648
  )
1615
1649
  }
1616
1650
  ),
1617
- m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:958", className: "vg-animate-fade", style: {
1651
+ m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1052", className: "vg-animate-fade", style: {
1618
1652
  position: "fixed",
1619
1653
  top: 0,
1620
1654
  left: 0,
@@ -1626,13 +1660,13 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1626
1660
  alignItems: "center",
1627
1661
  justifyContent: "center",
1628
1662
  zIndex: Re
1629
- }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:963", className: "vg-glassmorphism vg-animate-slide", style: {
1663
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1057", className: "vg-glassmorphism vg-animate-slide", style: {
1630
1664
  padding: "40px",
1631
1665
  width: "500px",
1632
1666
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
1633
1667
  }, children: [
1634
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:967", style: { textAlign: "center", marginBottom: "32px" }, children: [
1635
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:968", style: {
1668
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1061", style: { textAlign: "center", marginBottom: "32px" }, children: [
1669
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1062", style: {
1636
1670
  width: "48px",
1637
1671
  height: "48px",
1638
1672
  background: "var(--vg-primary-gradient)",
@@ -1643,11 +1677,11 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1643
1677
  margin: "0 auto 16px",
1644
1678
  color: "white",
1645
1679
  boxShadow: "0 8px 16px rgba(99, 102, 241, 0.3)"
1646
- }, children: /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:973", size: 24 }) }),
1647
- /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:975", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
1648
- /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:976", style: { margin: 0, color: "#64748b", fontSize: "15px" }, children: r.feedbackSubheader })
1680
+ }, children: /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1067", size: 24 }) }),
1681
+ /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1069", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
1682
+ /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1070", style: { margin: 0, color: "#000000", fontSize: "15px" }, children: r.feedbackSubheader })
1649
1683
  ] }),
1650
- m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:980", style: {
1684
+ m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1074", style: {
1651
1685
  marginBottom: "24px",
1652
1686
  borderRadius: "12px",
1653
1687
  overflow: "hidden",
@@ -1667,7 +1701,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1667
1701
  "textarea",
1668
1702
  {
1669
1703
  className: "vg-textarea",
1670
- value: g,
1704
+ value: h,
1671
1705
  onChange: (d) => v(d.target.value),
1672
1706
  rows: 4,
1673
1707
  placeholder: r.placeholder,
@@ -1675,13 +1709,13 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1675
1709
  style: { fontSize: "15px", padding: "16px", marginBottom: "24px" }
1676
1710
  }
1677
1711
  ),
1678
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1007", style: { display: "flex", gap: "12px" }, children: [
1712
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1101", style: { display: "flex", gap: "12px" }, children: [
1679
1713
  /* @__PURE__ */ o.jsx(
1680
1714
  "button",
1681
1715
  {
1682
- onClick: () => !V && w(null),
1716
+ onClick: () => !j && g(null),
1683
1717
  className: "vg-button-ghost",
1684
- disabled: V,
1718
+ disabled: j,
1685
1719
  style: { flex: 1, padding: "12px" },
1686
1720
  children: r.cancel
1687
1721
  }
@@ -1689,19 +1723,19 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1689
1723
  /* @__PURE__ */ o.jsx(
1690
1724
  "button",
1691
1725
  {
1692
- onClick: ut,
1726
+ onClick: ft,
1693
1727
  className: "vg-button-primary",
1694
- disabled: V || !g.trim(),
1728
+ disabled: j || !h.trim(),
1695
1729
  style: { flex: 2 },
1696
- children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1022", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1697
- V ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1023", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ o.jsx(Dt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1023", size: 18 }),
1698
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1024", children: V ? r.submitting : r.sendFeedback || "Send Comment" })
1730
+ children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1116", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1731
+ j ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1117", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ o.jsx(Ut, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1117", size: 18 }),
1732
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1118", children: j ? r.submitting : r.sendFeedback || "Send Comment" })
1699
1733
  ] })
1700
1734
  }
1701
1735
  )
1702
1736
  ] })
1703
1737
  ] }) }),
1704
- O && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1034", className: "vg-animate-fade", style: {
1738
+ P && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1128", className: "vg-animate-fade", style: {
1705
1739
  position: "fixed",
1706
1740
  top: 0,
1707
1741
  left: 0,
@@ -1713,84 +1747,84 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1713
1747
  alignItems: "center",
1714
1748
  justifyContent: "center",
1715
1749
  zIndex: Re
1716
- }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1039", className: "vg-glassmorphism vg-animate-slide", style: {
1750
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1133", className: "vg-glassmorphism vg-animate-slide", style: {
1717
1751
  padding: "32px",
1718
1752
  width: "650px",
1719
1753
  maxHeight: "85vh",
1720
1754
  display: "flex",
1721
1755
  flexDirection: "column"
1722
1756
  }, children: [
1723
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1043", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
1724
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1044", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
1725
- /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1045", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: F ? r.commentDetails : r.annotations }),
1726
- !F && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1049", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: S.length })
1757
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1137", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
1758
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1138", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
1759
+ /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1139", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: W ? r.commentDetails : r.annotations }),
1760
+ !W && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1143", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: k.length })
1727
1761
  ] }),
1728
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1054", style: { display: "flex", gap: "8px" }, children: [
1729
- F && /* @__PURE__ */ o.jsx(
1762
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1148", style: { display: "flex", gap: "8px" }, children: [
1763
+ W && /* @__PURE__ */ o.jsx(
1730
1764
  "button",
1731
1765
  {
1732
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1056",
1766
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1150",
1733
1767
  className: "vg-button-ghost",
1734
1768
  style: { padding: "6px 14px", fontSize: "12px" },
1735
- onClick: () => K(null),
1769
+ onClick: () => Q(null),
1736
1770
  children: r.viewAll || "View All"
1737
1771
  }
1738
1772
  ),
1739
1773
  /* @__PURE__ */ o.jsx(
1740
1774
  "button",
1741
1775
  {
1742
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1064",
1776
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1158",
1743
1777
  className: "vg-button-ghost",
1744
1778
  style: { padding: "8px", borderRadius: "50%" },
1745
1779
  onClick: () => {
1746
- T(!1), K(null);
1780
+ A(!1), Q(null);
1747
1781
  },
1748
- children: /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1069", size: 20 })
1782
+ children: /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1163", size: 20 })
1749
1783
  }
1750
1784
  )
1751
1785
  ] })
1752
1786
  ] }),
1753
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1074", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: se ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1076", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1077", className: "vg-spinner" }) }) : (F ? S.filter((d) => d._id === F) : S).map((d, y) => /* @__PURE__ */ o.jsxs(
1787
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1168", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: ae ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1170", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1171", className: "vg-spinner" }) }) : (W ? k.filter((d) => d._id === W) : k).map((d, w) => /* @__PURE__ */ o.jsxs(
1754
1788
  "div",
1755
1789
  {
1756
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1081",
1790
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1175",
1757
1791
  className: "vg-glassmorphism vg-animate-slide",
1758
1792
  style: {
1759
1793
  padding: "20px",
1760
1794
  marginBottom: "16px",
1761
1795
  border: "1px solid rgba(0,0,0,0.05)",
1762
1796
  background: "rgba(255,255,255,0.5)",
1763
- animationDelay: `${y * 0.05}s`
1797
+ animationDelay: `${w * 0.05}s`
1764
1798
  },
1765
1799
  children: [
1766
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1092", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1093", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
1767
- d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1095", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
1768
- /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1096", size: 14 }),
1800
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1186", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1187", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
1801
+ d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1189", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
1802
+ /* @__PURE__ */ o.jsx(se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1190", size: 14 }),
1769
1803
  " ",
1770
1804
  r.readyForReview
1771
- ] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1099", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
1772
- /* @__PURE__ */ o.jsx(Me, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1100", size: 14 }),
1805
+ ] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1193", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
1806
+ /* @__PURE__ */ o.jsx(ze, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1194", size: 14 }),
1773
1807
  " ",
1774
1808
  r.pending
1775
1809
  ] }),
1776
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1103", style: { fontSize: "12px", color: "#94a3b8" }, children: qr(d.timestamp || d.createdAt || d.reference?.timestamp, t) })
1810
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1197", style: { fontSize: "12px", color: "#000000" }, children: Yr(d.timestamp || d.createdAt || d.reference?.timestamp, t) })
1777
1811
  ] }) }),
1778
- oe === d._id ? /* @__PURE__ */ o.jsx(
1812
+ ie === d._id ? /* @__PURE__ */ o.jsx(
1779
1813
  "textarea",
1780
1814
  {
1781
1815
  className: "vg-textarea",
1782
1816
  value: c,
1783
- onChange: (h) => f(h.target.value),
1817
+ onChange: (y) => f(y.target.value),
1784
1818
  rows: 3,
1785
1819
  autoFocus: !0,
1786
1820
  style: { marginBottom: "16px" }
1787
1821
  }
1788
- ) : /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1119", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: d.message }),
1789
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1122", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: oe === d._id ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1822
+ ) : /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1213", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: d.message }),
1823
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1216", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: ie === d._id ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1790
1824
  /* @__PURE__ */ o.jsx(
1791
1825
  "button",
1792
1826
  {
1793
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1125",
1827
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1219",
1794
1828
  className: "vg-button-primary vg-animate-pop",
1795
1829
  style: { padding: "8px 16px", fontSize: "13px" },
1796
1830
  onClick: async () => {
@@ -1799,7 +1833,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1799
1833
  method: "PATCH",
1800
1834
  headers: { "Content-Type": "application/json", "x-api-key": n },
1801
1835
  body: JSON.stringify({ message: c })
1802
- })).ok && (Q(null), P(), e(r.updateSuccess, "success"));
1836
+ })).ok && (ee(null), G(), e(r.updateSuccess, "success"));
1803
1837
  } catch {
1804
1838
  e(r.error, "error");
1805
1839
  }
@@ -1807,19 +1841,19 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1807
1841
  children: r.save
1808
1842
  }
1809
1843
  ),
1810
- /* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1147", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => Q(null), children: r.cancel })
1844
+ /* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1241", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => ee(null), children: r.cancel })
1811
1845
  ] }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1812
1846
  /* @__PURE__ */ o.jsxs(
1813
1847
  "button",
1814
1848
  {
1815
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1151",
1849
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1245",
1816
1850
  className: "vg-button-ghost vg-animate-pop",
1817
1851
  style: { padding: "8px 16px", fontSize: "13px" },
1818
1852
  onClick: () => {
1819
- Q(d._id), f(d.message);
1853
+ ee(d._id), f(d.message);
1820
1854
  },
1821
1855
  children: [
1822
- /* @__PURE__ */ o.jsx(It, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1159", size: 14 }),
1856
+ /* @__PURE__ */ o.jsx(Ft, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1253", size: 14 }),
1823
1857
  " ",
1824
1858
  r.edit
1825
1859
  ]
@@ -1828,14 +1862,14 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1828
1862
  /* @__PURE__ */ o.jsxs(
1829
1863
  "button",
1830
1864
  {
1831
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1161",
1865
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1255",
1832
1866
  className: "vg-button-ghost vg-animate-pop",
1833
1867
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.05s" },
1834
1868
  onClick: () => {
1835
1869
  d.url && (window.location.href = d.url);
1836
1870
  },
1837
1871
  children: [
1838
- /* @__PURE__ */ o.jsx(Fe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1168", size: 14 }),
1872
+ /* @__PURE__ */ o.jsx(Fe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1262", size: 14 }),
1839
1873
  " ",
1840
1874
  r.review
1841
1875
  ]
@@ -1844,11 +1878,11 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1844
1878
  d.status === "pending" ? /* @__PURE__ */ o.jsxs(
1845
1879
  "button",
1846
1880
  {
1847
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1171",
1881
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1265",
1848
1882
  className: "vg-button-primary vg-animate-pop",
1849
1883
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
1850
1884
  onClick: () => {
1851
- M({
1885
+ D({
1852
1886
  title: r.markReadyConfirm,
1853
1887
  message: r.confirmMarkReady,
1854
1888
  type: "success",
@@ -1858,17 +1892,17 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1858
1892
  method: "PATCH",
1859
1893
  headers: { "Content-Type": "application/json", "x-api-key": n },
1860
1894
  body: JSON.stringify({ status: "ready_for_review" })
1861
- })).ok && (P(), e(r.updateSuccess, "success"));
1895
+ })).ok && (G(), e(r.updateSuccess, "success"));
1862
1896
  } catch {
1863
1897
  e(r.error, "error");
1864
1898
  } finally {
1865
- M(null);
1899
+ D(null);
1866
1900
  }
1867
1901
  }
1868
1902
  });
1869
1903
  },
1870
1904
  children: [
1871
- /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1199", size: 14 }),
1905
+ /* @__PURE__ */ o.jsx(se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1293", size: 14 }),
1872
1906
  " ",
1873
1907
  r.markReady
1874
1908
  ]
@@ -1876,11 +1910,11 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1876
1910
  ) : /* @__PURE__ */ o.jsxs(
1877
1911
  "button",
1878
1912
  {
1879
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1202",
1913
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1296",
1880
1914
  className: "vg-button-ghost vg-animate-pop",
1881
1915
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
1882
1916
  onClick: () => {
1883
- M({
1917
+ D({
1884
1918
  title: r.reopenConfirm,
1885
1919
  message: r.confirmReopen,
1886
1920
  type: "success",
@@ -1891,17 +1925,17 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1891
1925
  method: "PATCH",
1892
1926
  headers: { "Content-Type": "application/json", "x-api-key": n },
1893
1927
  body: JSON.stringify({ status: "pending" })
1894
- })).ok && (P(), e(r.updateSuccess, "success"));
1928
+ })).ok && (G(), e(r.updateSuccess, "success"));
1895
1929
  } catch {
1896
1930
  e(r.error, "error");
1897
1931
  } finally {
1898
- M(null);
1932
+ D(null);
1899
1933
  }
1900
1934
  }
1901
1935
  });
1902
1936
  },
1903
1937
  children: [
1904
- /* @__PURE__ */ o.jsx(Mt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1230", size: 14 }),
1938
+ /* @__PURE__ */ o.jsx(Ht, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1324", size: 14 }),
1905
1939
  " ",
1906
1940
  r.reopen
1907
1941
  ]
@@ -1910,11 +1944,11 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1910
1944
  /* @__PURE__ */ o.jsx(
1911
1945
  "button",
1912
1946
  {
1913
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1233",
1947
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1327",
1914
1948
  className: "vg-button-ghost vg-animate-pop",
1915
1949
  style: { padding: "8px 12px", color: "#ef4444", borderColor: "#fee2e2", animationDelay: "0.15s" },
1916
1950
  onClick: () => {
1917
- M({
1951
+ D({
1918
1952
  title: r.deleteConfirm,
1919
1953
  message: r.confirmDelete,
1920
1954
  type: "danger",
@@ -1923,16 +1957,16 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1923
1957
  (await fetch(`${a}/api/annotations/${d._id}`, {
1924
1958
  method: "DELETE",
1925
1959
  headers: { "x-api-key": n }
1926
- })).ok && (P(), e(r.deleteSuccess, "success"));
1960
+ })).ok && (G(), e(r.deleteSuccess, "success"));
1927
1961
  } catch {
1928
1962
  e(r.error, "error");
1929
1963
  } finally {
1930
- M(null);
1964
+ D(null);
1931
1965
  }
1932
1966
  }
1933
1967
  });
1934
1968
  },
1935
- children: /* @__PURE__ */ o.jsx(De, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1260", size: 16 })
1969
+ children: /* @__PURE__ */ o.jsx(De, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1354", size: 16 })
1936
1970
  }
1937
1971
  )
1938
1972
  ] }) })
@@ -1941,7 +1975,7 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1941
1975
  d._id
1942
1976
  )) })
1943
1977
  ] }) }),
1944
- I && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1275", className: "vg-animate-fade", style: {
1978
+ z && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1369", className: "vg-animate-fade", style: {
1945
1979
  position: "fixed",
1946
1980
  top: 0,
1947
1981
  left: 0,
@@ -1953,75 +1987,75 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
1953
1987
  alignItems: "center",
1954
1988
  justifyContent: "center",
1955
1989
  zIndex: Re + 100
1956
- }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1280", className: "vg-glassmorphism vg-animate-slide", style: {
1990
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1374", className: "vg-glassmorphism vg-animate-slide", style: {
1957
1991
  padding: "40px",
1958
1992
  width: "420px",
1959
1993
  textAlign: "center",
1960
1994
  border: "1px solid rgba(255, 255, 255, 0.1)",
1961
1995
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.5)"
1962
1996
  }, children: [
1963
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1287", style: {
1997
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1381", style: {
1964
1998
  width: "64px",
1965
1999
  height: "64px",
1966
- background: I.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
2000
+ background: z.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
1967
2001
  borderRadius: "20px",
1968
2002
  display: "flex",
1969
2003
  alignItems: "center",
1970
2004
  justifyContent: "center",
1971
2005
  margin: "0 auto 24px",
1972
- color: I.type === "danger" ? "#ef4444" : "#6366f1",
2006
+ color: z.type === "danger" ? "#ef4444" : "#6366f1",
1973
2007
  transform: "rotate(-5deg)"
1974
- }, children: I.type === "danger" ? /* @__PURE__ */ o.jsx(De, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1296", size: 32 }) : /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1296", size: 32 }) }),
1975
- /* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1298", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#f8fafc", letterSpacing: "-0.02em" }, children: I.title }),
1976
- /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1299", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#94a3b8", lineHeight: 1.6 }, children: I.message }),
1977
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1300", style: { display: "flex", gap: "16px" }, children: [
2008
+ }, children: z.type === "danger" ? /* @__PURE__ */ o.jsx(De, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1390", size: 32 }) : /* @__PURE__ */ o.jsx(se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1390", size: 32 }) }),
2009
+ /* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1392", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#000000", letterSpacing: "-0.02em" }, children: z.title }),
2010
+ /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1393", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#000000", lineHeight: 1.6 }, children: z.message }),
2011
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1394", style: { display: "flex", gap: "16px" }, children: [
1978
2012
  /* @__PURE__ */ o.jsx(
1979
2013
  "button",
1980
2014
  {
1981
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1301",
2015
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1395",
1982
2016
  className: "vg-button-ghost",
1983
2017
  style: { flex: 1, height: "44px" },
1984
- onClick: () => !B && M(null),
1985
- disabled: B,
2018
+ onClick: () => !X && D(null),
2019
+ disabled: X,
1986
2020
  children: r.no
1987
2021
  }
1988
2022
  ),
1989
2023
  /* @__PURE__ */ o.jsx(
1990
2024
  "button",
1991
2025
  {
1992
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1309",
2026
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1403",
1993
2027
  className: "vg-button-primary",
1994
2028
  style: {
1995
2029
  flex: 1,
1996
2030
  height: "44px",
1997
- backgroundColor: I.type === "danger" ? "#ef4444" : void 0,
1998
- backgroundImage: I.type === "danger" ? "none" : void 0,
2031
+ backgroundColor: z.type === "danger" ? "#ef4444" : void 0,
2032
+ backgroundImage: z.type === "danger" ? "none" : void 0,
1999
2033
  display: "flex",
2000
2034
  alignItems: "center",
2001
2035
  justifyContent: "center",
2002
2036
  gap: "8px"
2003
2037
  },
2004
- disabled: B,
2038
+ disabled: X,
2005
2039
  onClick: async () => {
2006
- ae(!0);
2040
+ oe(!0);
2007
2041
  try {
2008
- await I.onConfirm();
2042
+ await z.onConfirm();
2009
2043
  } catch (d) {
2010
2044
  console.error("Confirmation error:", d);
2011
2045
  } finally {
2012
- ae(!1);
2046
+ oe(!1);
2013
2047
  }
2014
2048
  },
2015
- children: B ? /* @__PURE__ */ o.jsx(At, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1334", size: 18, className: "vg-animate-spin" }) : r.yes
2049
+ children: X ? /* @__PURE__ */ o.jsx(Lt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1428", size: 18, className: "vg-animate-spin" }) : r.yes
2016
2050
  }
2017
2051
  )
2018
2052
  ] })
2019
2053
  ] }) }),
2020
- !l && !O && S.map((d, y) => {
2021
- const h = C[d._id];
2022
- if (!h) return null;
2023
- const _ = S.slice(0, y).filter(
2024
- (j) => j.reference?.selector && j.reference.selector === d.reference?.selector
2054
+ !l && !P && k.map((d, w) => {
2055
+ const y = C[d._id];
2056
+ if (!y) return null;
2057
+ const O = k.slice(0, w).filter(
2058
+ (_) => _.reference?.selector && _.reference.selector === d.reference?.selector
2025
2059
  ).length * 34;
2026
2060
  return /* @__PURE__ */ o.jsxs(
2027
2061
  "div",
@@ -2029,38 +2063,38 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
2029
2063
  className: "vg-pin-container vg-animate-pop",
2030
2064
  style: {
2031
2065
  position: "fixed",
2032
- top: h.top - 20 - window.scrollY,
2033
- left: h.left + h.width / 2 - 16 + _ - window.scrollX,
2066
+ top: y.top - 20 - window.scrollY,
2067
+ left: y.left + y.width / 2 - 16 + O - window.scrollX,
2034
2068
  cursor: "pointer",
2035
- animationDelay: `${y * 0.08}s`,
2069
+ animationDelay: `${w * 0.08}s`,
2036
2070
  transition: "all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",
2037
- zIndex: Hr - y
2071
+ zIndex: Ur - w
2038
2072
  // Ensure staggered pins don't overlap tooltips weirdly
2039
2073
  },
2040
- onMouseEnter: (j) => {
2041
- const R = j.currentTarget.getBoundingClientRect();
2042
- window.innerHeight - R.bottom < 180 ? me((G) => ({ ...G, [d._id]: "vg-top" })) : me((G) => ({ ...G, [d._id]: "" }));
2074
+ onMouseEnter: (_) => {
2075
+ const E = _.currentTarget.getBoundingClientRect();
2076
+ window.innerHeight - E.bottom < 180 ? fe((V) => ({ ...V, [d._id]: "vg-top" })) : fe((V) => ({ ...V, [d._id]: "" }));
2043
2077
  },
2044
2078
  onClick: () => {
2045
- T(!0), K(d._id);
2079
+ A(!0), Q(d._id);
2046
2080
  },
2047
2081
  children: [
2048
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1381", className: `vg-pin-tooltip ${pe[d._id] || ""}`, children: [
2049
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1382", style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: [
2050
- d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1384", style: { display: "flex", alignItems: "center", gap: "6px", color: "#16a34a", fontWeight: 700, fontSize: "11px" }, children: [
2051
- /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1385", size: 12 }),
2082
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1475", className: `vg-pin-tooltip ${me[d._id] || ""}`, children: [
2083
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1476", style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: [
2084
+ d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1478", style: { display: "flex", alignItems: "center", gap: "6px", color: "#16a34a", fontWeight: 700, fontSize: "11px" }, children: [
2085
+ /* @__PURE__ */ o.jsx(se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1479", size: 12 }),
2052
2086
  " ",
2053
2087
  r.readyForReview
2054
- ] }) : /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1388", style: { display: "flex", alignItems: "center", gap: "6px", color: h.isModal ? "#f59e0b" : "#ea580c", fontWeight: 700, fontSize: "11px" }, children: [
2055
- /* @__PURE__ */ o.jsx(Me, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1389", size: 12 }),
2088
+ ] }) : /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1482", style: { display: "flex", alignItems: "center", gap: "6px", color: y.isModal ? "#f59e0b" : "#ea580c", fontWeight: 700, fontSize: "11px" }, children: [
2089
+ /* @__PURE__ */ o.jsx(ze, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1483", size: 12 }),
2056
2090
  " ",
2057
2091
  r.pending
2058
2092
  ] }),
2059
- h.isModal && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1393", style: { display: "flex", alignItems: "center", gap: "6px", color: "#f59e0b", fontWeight: 700, fontSize: "11px", marginLeft: "auto" }, children: /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1394", children: "MODAL" }) })
2093
+ y.isModal && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1487", style: { display: "flex", alignItems: "center", gap: "6px", color: "#f59e0b", fontWeight: 700, fontSize: "11px", marginLeft: "auto" }, children: /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1488", children: "MODAL" }) })
2060
2094
  ] }),
2061
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1398", style: { fontWeight: 500, color: "#1e293b", lineHeight: 1.4 }, children: d.message })
2095
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1492", style: { fontWeight: 500, color: "#1e293b", lineHeight: 1.4 }, children: d.message })
2062
2096
  ] }),
2063
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1401", className: `vg-formal-pin ${d.status === "ready_for_review" ? "ready" : ""} ${h.isModal ? "modal-variant" : ""}`, children: d.status === "ready_for_review" ? /* @__PURE__ */ o.jsx(ne, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1402", size: 18 }) : h.isModal ? /* @__PURE__ */ o.jsx(Fe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1402", size: 16 }) : /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1402", size: 16 }) })
2097
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1495", className: `vg-formal-pin ${d.status === "ready_for_review" ? "ready" : ""} ${y.isModal ? "modal-variant" : ""}`, children: d.status === "ready_for_review" ? /* @__PURE__ */ o.jsx(se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1496", size: 18 }) : y.isModal ? /* @__PURE__ */ o.jsx(Fe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1496", size: 16 }) : /* @__PURE__ */ o.jsx(Ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1496", size: 16 }) })
2064
2098
  ]
2065
2099
  },
2066
2100
  `pin-${d._id}`
@@ -2068,37 +2102,37 @@ const we = 2147483647, ke = we, Re = 2e6, Fr = we - 10, Dr = we - 5, Hr = we - 1
2068
2102
  })
2069
2103
  ] }) });
2070
2104
  };
2071
- function dt(e, t, r) {
2105
+ function mt(e, t, r) {
2072
2106
  if (!t.endsWith(".tsx") && !t.endsWith(".jsx") || t.includes("node_modules")) return e;
2073
2107
  const n = (l) => l.replace(/\\/g, "/"), a = n(t).replace(n(r), "");
2074
2108
  return e.split(`
2075
2109
  `).map((l, p) => {
2076
2110
  const u = p + 1;
2077
- return l.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (x, m, w) => x.includes("data-source-path") || w === "Fragment" || w === "React.Fragment" ? x : `${m}<${w} data-source-path="${a}:${u}"`);
2111
+ return l.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (x, m, g) => x.includes("data-source-path") || g === "Fragment" || g === "React.Fragment" ? x : `${m}<${g} data-source-path="${a}:${u}"`);
2078
2112
  }).join(`
2079
2113
  `);
2080
2114
  }
2081
- function on() {
2115
+ function cn() {
2082
2116
  return {
2083
2117
  name: "vite-plugin-viewgate",
2084
2118
  enforce: "pre",
2085
2119
  transform(e, t) {
2086
2120
  return {
2087
- code: dt(e, t, process.cwd()),
2121
+ code: mt(e, t, process.cwd()),
2088
2122
  map: null
2089
2123
  };
2090
2124
  }
2091
2125
  };
2092
2126
  }
2093
- function cn(e) {
2127
+ function ln(e) {
2094
2128
  const t = this.resourcePath;
2095
- return t ? (process.env.NODE_ENV, dt(e, t, process.cwd())) : e;
2129
+ return t ? (process.env.NODE_ENV, mt(e, t, process.cwd())) : e;
2096
2130
  }
2097
2131
  export {
2098
- an as ViewGate,
2099
- rn as ViewGateOverlay,
2100
- dt as transformSourcePaths,
2101
- qt as useViewGate,
2102
- cn as viewgateNextLoader,
2103
- on as viewgatePlugin
2132
+ on as ViewGate,
2133
+ nn as ViewGateOverlay,
2134
+ mt as transformSourcePaths,
2135
+ Xt as useViewGate,
2136
+ ln as viewgateNextLoader,
2137
+ cn as viewgatePlugin
2104
2138
  };