viewgate-wrapper 1.10.9 → 1.10.10

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