viewgate-wrapper 1.10.9 → 1.10.11

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 Tt, { useRef as fe, useState as j, useEffect as X, forwardRef as mt, createElement as Me, createContext as Vt, useContext as Pt, useCallback as be } from "react";
3
+ import { createPortal as At } from "react-dom";
4
+ var Ce = { exports: {} }, pe = {};
5
+ var Xe;
6
+ function Gt() {
7
+ if (Xe) return pe;
8
+ Xe = 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 Je;
29
+ function $t() {
30
+ return Je || (Je = 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 Oe:
44
44
  return "Suspense";
45
- case z:
45
+ case F:
46
46
  return "SuspenseList";
47
- case $e:
47
+ case Be:
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 _:
61
+ var g = c.render;
62
+ return c = c.displayName, c || (c = g.displayName || g.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
63
+ case W:
64
+ return g = c.displayName || null, g !== null ? g : e(c.type) || "Memo";
65
+ case ge:
66
+ g = c._payload, c = c._init;
67
67
  try {
68
- return e(c(f));
68
+ return e(c(g));
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 g = !1;
81
81
  } catch {
82
- f = !0;
82
+ g = !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 (g) {
85
+ g = console;
86
+ var v = g.error, k = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
87
+ return v.call(
88
+ g,
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
+ k
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 === ge)
97
97
  return "<...>";
98
98
  try {
99
- var f = e(c);
100
- return f ? "<" + f + ">" : "<...>";
99
+ var g = e(c);
100
+ return g ? "<" + g + ">" : "<...>";
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 (ye.call(c, "key")) {
114
+ var g = Object.getOwnPropertyDescriptor(c, "key").get;
115
+ if (g && g.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, g) {
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
+ g
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, g, v, k, te, q) {
138
+ var O = 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: g,
143
+ props: v,
144
+ _owner: k
145
+ }, (O !== void 0 ? O : 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,132 +159,132 @@ 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,
166
166
  writable: !0,
167
- value: U
167
+ value: q
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, g, v, k, te, q) {
171
+ var O = g.children;
172
+ if (O !== void 0)
173
+ if (k)
174
+ if (xe(O)) {
175
+ for (k = 0; k < O.length; k++)
176
+ m(O[k]);
177
+ Object.freeze && Object.freeze(O);
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(O);
183
+ if (ye.call(g, "key")) {
184
+ O = e(c);
185
+ var V = Object.keys(g).filter(function(_e) {
186
+ return _e !== "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
+ k = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", we[O + k] || (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
+ k,
196
+ O,
197
+ V,
198
+ O
199
+ ), we[O + k] = !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 (O = null, v !== void 0 && (r(v), O = "" + v), i(g) && (r(g.key), O = "" + g.key), "key" in g) {
202
+ v = {};
203
+ for (var ce in g)
204
+ ce !== "key" && (v[ce] = g[ce]);
205
+ } else v = g;
206
+ return O && 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
+ O,
212
+ v,
213
213
  a(),
214
- F,
215
- U
214
+ te,
215
+ q
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 === ge && (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 = Tt, 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"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), Oe = /* @__PURE__ */ Symbol.for("react.suspense"), F = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), ge = /* @__PURE__ */ Symbol.for("react.lazy"), Be = /* @__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, ye = Object.prototype.hasOwnProperty, xe = Array.isArray, B = 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
+ )(), U = B(n(s)), we = {};
236
+ me.Fragment = P, me.jsx = function(c, g, v) {
237
+ var k = 1e4 > Q.recentlyCreatedOwnerStacks++;
238
+ return w(
239
239
  c,
240
- f,
241
- C,
240
+ g,
241
+ v,
242
242
  !1,
243
- S ? Error("react-stack-top-frame") : oe,
244
- S ? W(n(c)) : ie
243
+ k ? Error("react-stack-top-frame") : ie,
244
+ k ? B(n(c)) : U
245
245
  );
246
- }, ue.jsxs = function(c, f, C) {
247
- var S = 1e4 > K.recentlyCreatedOwnerStacks++;
248
- return x(
246
+ }, me.jsxs = function(c, g, v) {
247
+ var k = 1e4 > Q.recentlyCreatedOwnerStacks++;
248
+ return w(
249
249
  c,
250
- f,
251
- C,
250
+ g,
251
+ v,
252
252
  !0,
253
- S ? Error("react-stack-top-frame") : oe,
254
- S ? W(n(c)) : ie
253
+ k ? Error("react-stack-top-frame") : ie,
254
+ k ? B(n(c)) : U
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 Ze;
260
+ function Lt() {
261
+ return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? Ce.exports = Gt() : Ce.exports = $t()), Ce.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 = Lt();
264
+ const Nt = ({ children: e }) => {
265
+ const t = fe(null), [r, n] = j(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 && At(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 ft = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
278
+ const It = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
279
+ const Mt = (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 Ke = (e) => {
284
+ const t = Mt(e);
285
285
  return t.charAt(0).toUpperCase() + t.slice(1);
286
286
  };
287
- var kt = {
287
+ var zt = {
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 Dt = (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 Ft = mt(
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) => Me(
315
315
  "svg",
316
316
  {
317
317
  ref: p,
318
- ...kt,
318
+ ...zt,
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: ft("lucide", a),
324
+ ...!s && !Dt(d) && { "aria-hidden": "true" },
325
+ ...d
326
326
  },
327
327
  [
328
- ...i.map(([u, x]) => _e(u, x)),
328
+ ...i.map(([u, w]) => Me(u, w)),
329
329
  ...Array.isArray(s) ? s : [s]
330
330
  ]
331
331
  )
332
332
  );
333
333
  const N = (e, t) => {
334
- const r = et(
335
- ({ className: n, ...a }, s) => _e(jt, {
334
+ const r = mt(
335
+ ({ className: n, ...a }, s) => Me(Ft, {
336
336
  ref: s,
337
337
  iconNode: t,
338
- className: tt(
339
- `lucide-${Et(Me(e))}`,
338
+ className: ft(
339
+ `lucide-${It(Ke(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 = Ke(e), r;
347
347
  };
348
- const Ot = [
348
+ const Ht = [
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
+ ], Wt = N("circle-alert", Ht);
353
+ const Bt = [
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 = N("circle-check", Bt);
357
+ const Ut = [
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
+ ], Qe = N("clock", Ut);
361
+ const qt = [
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
+ ], et = N("external-link", qt);
366
+ const Yt = [
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
+ ], Xt = N("eye", Yt);
376
+ const Jt = [
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
+ ], tt = N("grip-vertical", Jt);
384
+ const Zt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Kt = N("loader-circle", Zt);
385
+ const Qt = [
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
+ ], Ae = N("message-square", Qt);
394
+ const er = [
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
+ ], tr = N("mouse-pointer-2", er);
403
+ const rr = [
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
+ ], nr = N("pencil", rr);
413
+ const sr = [
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
+ ], ar = N("rotate-ccw", sr);
417
+ const or = [
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
+ ], ir = N("send", or);
427
+ const cr = [
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
+ ], rt = N("trash-2", cr);
434
+ const lr = [
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
+ ], Ge = N("x", lr), dr = {
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
+ }, ht = Vt(void 0), ur = () => {
531
+ const e = Pt(ht);
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
+ }, ze = "viewgate_enabled", pr = () => typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("viewgate") ? (sessionStorage.setItem(ze, "true"), !0) : sessionStorage.getItem(ze) === "true", En = ({
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] = j(!1), [i, d] = j([]);
541
+ X(() => {
542
+ s(pr());
535
543
  }, []);
536
544
  const p = () => {
537
- if (sessionStorage.removeItem(Ve), s(!1), typeof window < "u") {
545
+ if (sessionStorage.removeItem(ze), 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 = dr[t];
555
+ return /* @__PURE__ */ o.jsxs(ht.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(Nt, { "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(vn, { "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(Wt, { "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 mr(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 fr = /* @__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 gt(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 Se(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 hr(e) {
610
+ const t = Se(e, "border-left-width"), r = Se(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 gr(e) {
614
+ const t = Se(e, "border-top-width"), r = Se(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 yt(e, t = {}) {
618
+ const r = t.width || hr(e), n = t.height || gr(e);
611
619
  return { width: r, height: n };
612
620
  }
613
- function tr() {
621
+ function yr() {
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 M = 16384;
631
+ function xr(e) {
632
+ (e.width > M || e.height > M) && (e.width > M && e.height > M ? e.width > e.height ? (e.height *= M / e.width, e.width = M) : (e.width *= M / e.height, e.height = M) : e.width > M ? (e.height *= M / e.width, e.width = M) : (e.width *= M / e.height, e.height = M));
625
633
  }
626
- function xe(e) {
634
+ function ke(e) {
627
635
  return new Promise((t, r) => {
628
636
  const n = new Image();
629
637
  n.onload = () => {
@@ -633,223 +641,223 @@ 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 wr(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 vr(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), wr(a);
642
650
  }
643
- const $ = (e, t) => {
651
+ const L = (e, t) => {
644
652
  if (e instanceof t)
645
653
  return !0;
646
654
  const r = Object.getPrototypeOf(e);
647
- return r === null ? !1 : r.constructor.name === t.name || $(r, t);
655
+ return r === null ? !1 : r.constructor.name === t.name || L(r, t);
648
656
  };
649
- function ar(e) {
657
+ function br(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 Cr(e, t) {
662
+ return gt(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 Er(e, t, r, n) {
668
+ const a = `.${e}:${t}`, s = r.cssText ? br(r) : Cr(r, n);
661
669
  return document.createTextNode(`${a}{${s}}`);
662
670
  }
663
- function He(e, t, r, n) {
671
+ function nt(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 = fr();
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(Er(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 Sr(e, t, r) {
685
+ nt(e, t, ":before", r), nt(e, t, ":after", r);
678
686
  }
679
- const We = "application/font-woff", Ue = "image/jpeg", lr = {
680
- woff: We,
681
- woff2: We,
687
+ const st = "application/font-woff", at = "image/jpeg", kr = {
688
+ woff: st,
689
+ woff2: st,
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: at,
694
+ jpeg: at,
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 Rr(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 He(e) {
705
+ const t = Rr(e).toLowerCase();
706
+ return kr[t] || "";
699
707
  }
700
- function ur(e) {
708
+ function jr(e) {
701
709
  return e.split(/,/)[1];
702
710
  }
703
- function Te(e) {
711
+ function De(e) {
704
712
  return e.search(/^(data:)/) !== -1;
705
713
  }
706
- function pr(e, t) {
714
+ function Or(e, t) {
707
715
  return `data:${t};base64,${e}`;
708
716
  }
709
- async function at(e, t, r) {
717
+ async function xt(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 $e = {};
734
+ function _r(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 We(e, t, r) {
739
+ const n = _r(e, t, r.includeQueryParams);
740
+ if ($e[n] != null)
741
+ return $e[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 xt(e, r.fetchRequestInit, ({ res: i, result: d }) => (t || (t = i.headers.get("Content-Type") || ""), jr(d)));
746
+ a = Or(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 $e[n] = a, a;
745
753
  }
746
- async function fr(e) {
754
+ async function Tr(e) {
747
755
  const t = e.toDataURL();
748
- return t === "data:," ? e.cloneNode(!1) : xe(t);
756
+ return t === "data:," ? e.cloneNode(!1) : ke(t);
749
757
  }
750
- async function hr(e, t) {
758
+ async function Vr(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 ke(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 = He(r), a = await We(r, n, t);
766
+ return ke(a);
759
767
  }
760
- async function gr(e, t) {
768
+ async function Pr(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 Re(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 Ar(e, t) {
778
+ return L(e, HTMLCanvasElement) ? Tr(e) : L(e, HTMLVideoElement) ? Vr(e, t) : L(e, HTMLIFrameElement) ? Pr(e, t) : e.cloneNode(wt(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 Gr = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", wt = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
781
+ async function $r(e, t, r) {
774
782
  var n, a;
775
- if (ot(t))
783
+ if (wt(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 Gr(e) && e.assignedNodes ? s = J(e.assignedNodes()) : L(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 || L(e, HTMLVideoElement) || await s.reduce((i, d) => i.then(() => Re(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 Lr(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) : gt(r).forEach((s) => {
788
796
  let i = a.getPropertyValue(s);
789
- s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), $(e, HTMLIFrameElement) && s === "display" && i === "inline" && (i = "block"), s === "d" && t.getAttribute("d") && (i = `path(${t.getAttribute("d")})`), n.setProperty(s, i, a.getPropertyPriority(s));
797
+ s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), L(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) {
793
- $(e, HTMLTextAreaElement) && (t.innerHTML = e.value), $(e, HTMLInputElement) && t.setAttribute("value", e.value);
800
+ function Nr(e, t) {
801
+ L(e, HTMLTextAreaElement) && (t.innerHTML = e.value), L(e, HTMLInputElement) && t.setAttribute("value", e.value);
794
802
  }
795
- function Cr(e, t) {
796
- if ($(e, HTMLSelectElement)) {
803
+ function Ir(e, t) {
804
+ if (L(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 Mr(e, t, r) {
810
+ return L(t, Element) && (Lr(e, t, r), Sr(e, t, r), Nr(e, t), Ir(e, t)), t;
803
811
  }
804
- async function Sr(e, t) {
812
+ async function zr(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 Re(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 Re(e, t, r) {
837
+ return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => Ar(n, t)).then((n) => $r(e, n, t)).then((n) => Mr(e, n, t)).then((n) => zr(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 vt = /url\((['"]?)([^'"]+?)\1\)/g, Dr = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Fr = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
840
+ function Hr(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 Wr(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(vt, (r, n, a) => (t.push(a), r)), t.filter((r) => !De(r));
839
847
  }
840
- async function _r(e, t, r, n, a) {
848
+ async function Br(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 ? mr(t, r) : t, i = He(t);
851
+ let d;
852
+ return a || (d = await We(s, i, n)), e.replace(Hr(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 Ur(e, { preferredFontFormat: t }) {
858
+ return t ? e.replace(Fr, (r) => {
851
859
  for (; ; ) {
852
- const [n, , a] = kr.exec(r) || [];
860
+ const [n, , a] = Dr.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 bt(e) {
869
+ return e.search(vt) !== -1;
862
870
  }
863
- async function lt(e, t, r) {
864
- if (!ct(e))
871
+ async function Ct(e, t, r) {
872
+ if (!bt(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 = Ur(e, r);
875
+ return Wr(n).reduce((s, i) => s.then((d) => Br(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 Ct(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 qr(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) {
882
- const r = $(e, HTMLImageElement);
883
- if (!(r && !Te(e.src)) && !($(e, SVGImageElement) && !Te(e.href.baseVal)))
889
+ async function Yr(e, t) {
890
+ const r = L(e, HTMLImageElement);
891
+ if (!(r && !De(e.src)) && !(L(e, SVGImageElement) && !De(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 We(n, He(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 Xr(e, t) {
907
+ const n = J(e.childNodes).map((a) => Et(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 Et(e, t) {
911
+ L(e, Element) && (await qr(e, t), await Yr(e, t), await Xr(e, t));
904
912
  }
905
- function Gr(e, t) {
913
+ function Jr(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 ot = {};
922
+ async function it(e) {
923
+ let t = ot[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 }, ot[e] = t, t;
920
928
  }
921
- async function Ye(e, t) {
929
+ async function ct(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), xt(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 lt(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 Zr(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 = it(p).then((w) => ct(w, t)).then((w) => lt(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(it(a.href).then((d) => ct(d, t)).then((d) => lt(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 Kr(e) {
1006
+ return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => bt(t.style.getPropertyValue("src")));
999
1007
  }
1000
- async function Nr(e, t) {
1008
+ async function Qr(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 Zr(r, t);
1012
+ return Kr(n);
1005
1013
  }
1006
- function ut(e) {
1014
+ function St(e) {
1007
1015
  return e.trim().replace(/["']/g, "");
1008
1016
  }
1009
- function Ir(e) {
1017
+ function en(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(St(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 tn(e, t) {
1029
+ const r = await Qr(e, t), n = en(e);
1030
+ return (await Promise.all(r.filter((s) => n.has(St(s.style.fontFamily))).map((s) => {
1023
1031
  const i = s.parentStyleSheet ? s.parentStyleSheet.href : null;
1024
- return lt(s.cssText, i, t);
1032
+ return Ct(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 rn(e, t) {
1037
+ const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await tn(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 nn(e, t = {}) {
1044
+ const { width: r, height: n } = yt(e, t), a = await Re(e, t, !0);
1045
+ return await rn(a, t), await Et(a, t), Jr(a, t), await vr(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 sn(e, t = {}) {
1048
+ const { width: r, height: n } = yt(e, t), a = await nn(e, t), s = await ke(a), i = document.createElement("canvas"), d = i.getContext("2d"), p = t.pixelRatio || yr(), u = t.canvasWidth || r, w = t.canvasHeight || n;
1049
+ return i.width = u * p, i.height = w * p, t.skipAutoScale || xr(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 dt(e, t = {}) {
1052
+ return (await sn(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 je = 2147483647, Le = je, Ne = 2e6, an = je - 10, on = je - 5, cn = je - 15, he = "data-vg-pin-id", ln = () => {
1047
1055
  const e = window.innerWidth;
1048
1056
  return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
1049
- }, qr = (e) => {
1057
+ }, dn = (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
+ }, un = (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
+ }, pn = (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: dn(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
+ }, mn = /* @__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
+ })(), ut = (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
+ }), fn = (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] = mn(s);
1144
1142
  }), r;
1145
- }, Kr = (e) => {
1143
+ }, hn = (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
+ }, kt = (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
+ }, Fe = (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
+ }, Ee = (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 = Ee(e, s);
1185
1183
  if (i) return i;
1186
1184
  }
1187
1185
  }
1188
1186
  return null;
1189
- }, Qe = (e, t) => {
1187
+ }, pt = (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
+ }, gn = (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,37 @@ 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);
1209
- if (t) return t;
1205
+ }, yn = (e, t) => {
1206
+ if (t) {
1207
+ const n = Ee(`[${he}="${t}"]`);
1208
+ if (n && Fe(n)) return n;
1209
+ }
1210
+ let r = Ee(e.selector);
1211
+ if (r) return r;
1210
1212
  if (e.fallbackSelectors) {
1211
- for (const r of e.fallbackSelectors)
1212
- if (t = Pe(r), t) return t;
1213
+ for (const n of e.fallbackSelectors)
1214
+ if (r = Ee(n), r) return r;
1213
1215
  }
1214
- return t = Qr(e), t || null;
1215
- }, je = (e) => ({
1216
+ return r = gn(e), r || null;
1217
+ }, Ie = (e) => ({
1216
1218
  tag: e.tagName.toLowerCase(),
1217
1219
  text: (e.innerText || e.getAttribute("placeholder") || "").slice(0, 50).trim(),
1218
1220
  role: e.getAttribute("role") || void 0,
1219
1221
  type: e.getAttribute("type") || void 0
1220
- }), tn = (e) => {
1222
+ }), xn = (e) => {
1221
1223
  const t = e.parentElement;
1222
1224
  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);
1225
+ const r = Array.from(t.children).filter((i) => i !== e).slice(0, 5).map((i) => Ie(i)), n = Array.from(t.children), a = n.indexOf(e);
1224
1226
  let s = "middle";
1225
1227
  return a === 0 && (s = "start"), a === n.length - 1 && (s = "end"), {
1226
1228
  target: {
1227
- ...je(e),
1229
+ ...Ie(e),
1228
1230
  location: `${s} of ${t.tagName.toLowerCase()}`
1229
1231
  },
1230
- parent: je(t),
1232
+ parent: Ie(t),
1231
1233
  siblings: r
1232
1234
  };
1233
- }, rn = (e) => {
1235
+ }, wn = (e) => {
1234
1236
  let t = "unknown:0", r = e;
1235
1237
  for (; r; ) {
1236
1238
  const m = r.getAttribute("data-source-path");
@@ -1240,47 +1242,47 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1240
1242
  }
1241
1243
  r = r.parentElement;
1242
1244
  }
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);
1245
+ const n = hn(e), a = [], s = [], i = (m) => {
1246
+ const x = [];
1247
+ let y = m;
1248
+ for (; y && y.nodeType === Node.ELEMENT_NODE; ) {
1249
+ let b = y.nodeName.toLowerCase();
1250
+ s.unshift(b);
1251
+ const T = y.id && !y.id.startsWith("__") ? y.id : null;
1252
+ T && a.push(`#${T}`);
1253
+ const P = y.getAttribute("data-testid") || y.getAttribute("data-qa");
1254
+ P && a.push(`[data-testid="${P}"]`);
1255
+ const z = y.getAttribute("aria-label"), D = y.getAttribute("role"), A = y.getAttribute("name");
1256
+ if (P) {
1257
+ b = `[${y.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${P}"]`, x.unshift(b);
1256
1258
  break;
1257
- } else if (j) {
1258
- v = "#" + j, g.unshift(v);
1259
+ } else if (T) {
1260
+ b = "#" + T, x.unshift(b);
1259
1261
  break;
1260
- } else if (I) {
1261
- v = `${h.localName}[aria-label="${I}"]`, g.unshift(v);
1262
+ } else if (z) {
1263
+ b = `${y.localName}[aria-label="${z}"]`, x.unshift(b);
1262
1264
  break;
1263
- } else if (M) {
1264
- v = `${h.localName}[role="${M}"]`, g.unshift(v);
1265
+ } else if (D) {
1266
+ b = `${y.localName}[role="${D}"]`, x.unshift(b);
1265
1267
  break;
1266
- } else if (T) {
1267
- v = `${h.localName}[name="${T}"]`, g.unshift(v);
1268
+ } else if (A) {
1269
+ b = `${y.localName}[name="${A}"]`, x.unshift(b);
1268
1270
  break;
1269
1271
  } 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})`);
1272
+ let G = y, _ = 1;
1273
+ for (; G.previousElementSibling; )
1274
+ G = G.previousElementSibling, G.nodeName.toLowerCase() === y.nodeName.toLowerCase() && _++;
1275
+ _ > 1 && (b += `:nth-of-type(${_})`);
1274
1276
  }
1275
- g.unshift(v), h = h.parentElement;
1277
+ x.unshift(b), y = y.parentElement;
1276
1278
  }
1277
- return g.join(" > ");
1278
- }, l = pt(e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')), p = i(e), u = {};
1279
+ return x.join(" > ");
1280
+ }, d = kt(e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')), p = i(e), u = {};
1279
1281
  ["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((m) => {
1280
- const g = e.getAttribute(m);
1281
- g && (u[m] = g);
1282
+ const x = e.getAttribute(m);
1283
+ x && (u[m] = x);
1282
1284
  });
1283
- const x = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${p.split(" > ").slice(-1)}`;
1285
+ const w = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${p.split(" > ").slice(-1)}`;
1284
1286
  return {
1285
1287
  tag: e.tagName.toLowerCase(),
1286
1288
  id: e.id || "",
@@ -1290,190 +1292,248 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1290
1292
  outerHtml: e.outerHTML,
1291
1293
  parentContext: (e.parentElement?.innerText || "").slice(0, 150).trim(),
1292
1294
  componentPath: n,
1293
- signature: x,
1295
+ signature: w,
1294
1296
  source: t,
1295
1297
  attributes: u,
1296
1298
  fallbackSelectors: [...new Set(a)].slice(0, 5),
1297
1299
  domPath: s.slice(-10),
1298
1300
  viewportSize: { width: window.innerWidth, height: window.innerHeight },
1299
- uiContext: tn(e),
1300
- fingerprint: Xr(e),
1301
+ uiContext: xn(e),
1302
+ fingerprint: pn(e),
1301
1303
  metadata: {
1302
1304
  hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`,
1303
- computedStyles: Zr(e),
1304
- viewportBreakpoint: Br(),
1305
+ computedStyles: fn(e),
1306
+ viewportBreakpoint: ln(),
1305
1307
  outerHtml: e.outerHTML.slice(0, 1500),
1306
1308
  scrollPosition: { x: window.scrollX, y: window.scrollY },
1307
- isModal: l
1309
+ isModal: d
1308
1310
  }
1309
1311
  };
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))
1312
+ }, vn = () => {
1313
+ const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a, disableViewGate: s, hasActiveToasts: i } = ur(), [d, p] = j(!1), [u, w] = j(null), [m, x] = j(null), [y, b] = j(""), [T, P] = j(!1), [z, D] = j(!1), [A, G] = j(!1), [_, Oe] = j([]), [F, W] = j(null), [ge, Be] = j(!1), [oe, Q] = j(!1), [ye, xe] = j({}), [B, ee] = j(null), [Z, ie] = j(!1), [U, we] = j(() => {
1314
+ if (typeof window > "u") return { top: 24, right: 24 };
1315
+ const l = localStorage.getItem("vg-exit-pos");
1316
+ return l ? JSON.parse(l) : { top: 24, right: 24 };
1317
+ }), [c, g] = j(!1), v = fe(null), [k, te] = j(() => {
1318
+ if (typeof window > "u") return { bottom: 30, right: 30 };
1319
+ const l = localStorage.getItem("vg-bar-pos");
1320
+ return l ? JSON.parse(l) : { bottom: 30, right: 30 };
1321
+ }), [q, O] = j(!1), V = fe(null), ce = (l) => {
1322
+ l.preventDefault(), l.stopPropagation();
1323
+ const f = l.currentTarget.parentElement?.getBoundingClientRect();
1324
+ f && (g(!0), v.current = {
1325
+ x: l.clientX,
1326
+ y: l.clientY,
1327
+ top: U.top,
1328
+ right: U.right,
1329
+ width: f.width,
1330
+ height: f.height
1331
+ });
1332
+ }, _e = (l) => {
1333
+ l.preventDefault(), l.stopPropagation();
1334
+ const f = l.currentTarget.parentElement?.getBoundingClientRect();
1335
+ f && (O(!0), V.current = {
1336
+ x: l.clientX,
1337
+ y: l.clientY,
1338
+ bottom: k.bottom,
1339
+ right: k.right,
1340
+ width: f.width,
1341
+ height: f.height
1342
+ });
1343
+ };
1344
+ X(() => {
1345
+ if (!c && !q) return;
1346
+ const l = (h) => {
1347
+ if (c && v.current) {
1348
+ const $ = h.clientX - v.current.x, S = h.clientY - v.current.y;
1349
+ let C = v.current.top + S, E = v.current.right - $;
1350
+ const R = 10;
1351
+ C = Math.max(R, Math.min(window.innerHeight - v.current.height - R, C)), E = Math.max(R, Math.min(window.innerWidth - v.current.width - R, E)), we({ top: C, right: E });
1352
+ }
1353
+ if (q && V.current) {
1354
+ const $ = h.clientX - V.current.x, S = h.clientY - V.current.y;
1355
+ let C = V.current.bottom - S, E = V.current.right - $;
1356
+ const R = 10;
1357
+ C = Math.max(R, Math.min(window.innerHeight - V.current.height - R, C)), E = Math.max(R, Math.min(window.innerWidth - V.current.width - R, E)), te({ bottom: C, right: E });
1358
+ }
1359
+ }, f = () => {
1360
+ c && (g(!1), localStorage.setItem("vg-exit-pos", JSON.stringify(U)), v.current = null), q && (O(!1), localStorage.setItem("vg-bar-pos", JSON.stringify(k)), V.current = null);
1361
+ };
1362
+ return window.addEventListener("mousemove", l), window.addEventListener("mouseup", f), () => {
1363
+ window.removeEventListener("mousemove", l), window.removeEventListener("mouseup", f);
1364
+ };
1365
+ }, [c, q, U, k]);
1366
+ const [Ue, Te] = j(null), [qe, Ye] = j(""), [jt, Ot] = j({}), re = fe(null), le = fe(null), de = be(() => {
1367
+ le.current || (le.current = requestAnimationFrame(() => {
1368
+ const l = {}, h = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find((S) => kt(S) && Fe(S)), $ = !!h;
1369
+ _.forEach((S) => {
1370
+ if (!S.reference) return;
1371
+ const C = yn(S.reference, S._id), E = !!S.reference.metadata?.isModal;
1372
+ if (C && Fe(C)) {
1373
+ if (!C.hasAttribute(he))
1374
+ C.setAttribute(he, S._id);
1375
+ else {
1376
+ const H = C.getAttribute(he);
1377
+ H !== S._id && H?.startsWith("temp-") && C.setAttribute(he, S._id);
1378
+ }
1379
+ let R = !1;
1380
+ if ($ ? R = h.contains(C) : R = !E, !R) return;
1381
+ const I = C.getBoundingClientRect(), Y = I.left + I.width / 2, ue = I.top + I.height / 2;
1382
+ if (Y >= 0 && Y <= window.innerWidth && ue >= 0 && ue <= window.innerHeight) {
1383
+ const H = document.elementFromPoint(Y, ue);
1384
+ if (H && !C.contains(H) && !re.current?.contains(H))
1324
1385
  return;
1325
1386
  }
1326
- d[G._id] = {
1327
- top: _.top + window.scrollY,
1328
- left: _.left + window.scrollX,
1329
- width: _.width,
1387
+ l[S._id] = {
1388
+ top: I.top + window.scrollY,
1389
+ left: I.left + window.scrollX,
1390
+ width: I.width,
1330
1391
  isModal: E
1331
1392
  };
1332
1393
  }
1333
- }), S(d), U.current = null;
1394
+ }), Ot(l), le.current = null;
1334
1395
  }));
1335
- }, [k]), A = he(async () => {
1396
+ }, [_]), K = be(async () => {
1336
1397
  if (n) {
1337
- K(!0);
1398
+ Q(!0);
1338
1399
  try {
1339
- const d = await fetch(`${a}/api/annotations`, {
1400
+ const l = await fetch(`${a}/api/annotations`, {
1340
1401
  headers: { "x-api-key": n }
1341
1402
  });
1342
- if (d.ok) {
1343
- const w = await d.json();
1344
- be(w.data || []);
1403
+ if (l.ok) {
1404
+ const $ = ((await l.json()).data || []).reduce((S, C) => S.find((R) => R._id === C._id) ? S : S.concat([C]), []);
1405
+ Oe($);
1345
1406
  }
1346
- } catch (d) {
1347
- console.error("Failed to fetch annotations", d);
1407
+ } catch (l) {
1408
+ console.error("Failed to fetch annotations", l);
1348
1409
  } finally {
1349
- K(!1);
1410
+ Q(!1);
1350
1411
  }
1351
1412
  }
1352
1413
  }, [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, {
1414
+ X(() => {
1415
+ A && _.length === 0 && !oe && G(!1);
1416
+ }, [A, _.length, oe]), X(() => {
1417
+ if (!d && _.length > 0) {
1418
+ de();
1419
+ const l = new MutationObserver(() => de()), f = new ResizeObserver(() => de()), h = () => de();
1420
+ return l.observe(document.documentElement, {
1360
1421
  childList: !0,
1361
1422
  subtree: !0,
1362
1423
  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);
1424
+ }), f.observe(document.documentElement), window.addEventListener("scroll", h, !0), () => {
1425
+ l.disconnect(), f.disconnect(), window.removeEventListener("scroll", h, !0), le.current && cancelAnimationFrame(le.current);
1365
1426
  };
1366
1427
  }
1367
- }, [l, k.length, b]), Z(() => {
1368
- A();
1369
- }, [A]), Z(() => {
1370
- F.current = document.getElementById("viewgate-shadow-host");
1428
+ }, [d, _.length, de]), X(() => {
1429
+ K();
1430
+ }, [K]), X(() => {
1431
+ re.current = document.getElementById("viewgate-shadow-host");
1371
1432
  }, []);
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);
1433
+ const Ve = be((l) => {
1434
+ if (!d || m) return;
1435
+ const f = pt(l.clientX, l.clientY);
1436
+ if (!f || re.current?.contains(f) || f.closest(".vg-no-capture")) {
1437
+ w(null);
1377
1438
  return;
1378
1439
  }
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(),
1440
+ const h = f.getBoundingClientRect();
1441
+ w({
1442
+ tag: f.tagName.toLowerCase(),
1443
+ source: f.getAttribute("data-source-path") || "unknown:0",
1444
+ rect: h,
1445
+ element: f,
1446
+ previewText: (f.innerText || "").slice(0, 100) || (f.getAttribute("placeholder") || "").slice(0, 100) || f.tagName.toLowerCase(),
1386
1447
  semanticReference: {
1387
- ...rn(w),
1448
+ ...wn(f),
1388
1449
  normalizedOffset: {
1389
- x: (d.clientX - y.left) / y.width,
1390
- y: (d.clientY - y.top) / y.height
1450
+ x: (l.clientX - h.left) / h.width,
1451
+ y: (l.clientY - h.top) / h.height
1391
1452
  }
1392
1453
  }
1393
1454
  });
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);
1455
+ }, [d, m]), Pe = be(async (l) => {
1456
+ if (!d || m) return;
1457
+ const f = pt(l.clientX, l.clientY);
1458
+ if (!(!f || re.current?.contains(f) || f.closest(".vg-no-capture")) && u) {
1459
+ l.preventDefault(), l.stopPropagation(), D(!0);
1399
1460
  try {
1400
- const y = u.element.getBoundingClientRect(), H = 24, G = 2, O = await Je(document.documentElement, {
1461
+ const S = window.scrollX, C = window.scrollY, E = await dt(document.documentElement, {
1401
1462
  pixelRatio: 1.5,
1402
- // Reduced slightly for memory stability
1403
1463
  cacheBust: !0,
1404
1464
  width: window.innerWidth,
1405
1465
  height: window.innerHeight,
1466
+ backgroundColor: "#ffffff",
1406
1467
  style: {
1407
- transform: `scale(${1 / window.devicePixelRatio}) translate(-${window.scrollX}px, -${window.scrollY}px)`,
1468
+ transform: `scale(${1 / window.devicePixelRatio}) translate(-${S}px, -${C}px)`,
1408
1469
  transformOrigin: "top left"
1409
1470
  },
1410
- filter: (B) => {
1411
- const q = B;
1412
- return !(F.current?.contains(q) || q.id === "viewgate-ui");
1471
+ filter: (H) => {
1472
+ const ve = H;
1473
+ return !(re.current?.contains(ve) || ve.id === "viewgate-ui");
1413
1474
  }
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);
1475
+ }), R = u.element.getBoundingClientRect(), I = R.top >= 0 && R.left >= 0 && R.bottom <= window.innerHeight && R.right <= window.innerWidth;
1476
+ let Y = "";
1477
+ if (I && R.width > 0 && R.height > 0)
1478
+ Y = await ut(E, R, 24, 1.5);
1418
1479
  else
1419
1480
  try {
1420
- _ = await Je(u.element, {
1481
+ Y = await dt(u.element, {
1421
1482
  pixelRatio: 2,
1422
1483
  cacheBust: !0,
1423
1484
  backgroundColor: "#ffffff",
1424
- // For large elements, white background is safer
1425
- filter: (B) => {
1426
- const q = B;
1427
- return !F.current?.contains(q);
1485
+ filter: (H) => {
1486
+ const ve = H;
1487
+ return !re.current?.contains(ve);
1428
1488
  }
1429
1489
  });
1430
- } catch (B) {
1431
- console.warn("Direct element capture failed, falling back to viewport crop:", B), _ = await Ze(O, E, H, 1.5);
1490
+ } catch {
1491
+ Y = await ut(E, R, 24, 1.5);
1432
1492
  }
1433
- const le = {
1493
+ const ue = {
1434
1494
  ...u.semanticReference,
1435
1495
  metadata: {
1436
1496
  ...u.semanticReference.metadata,
1437
- screenshotUrl: O,
1438
- elementScreenshot: _
1497
+ screenshotUrl: E,
1498
+ elementScreenshot: Y
1439
1499
  }
1440
1500
  };
1441
- g({
1501
+ x({
1442
1502
  ...u,
1443
- visualPreview: _,
1444
- semanticReference: le
1503
+ visualPreview: Y,
1504
+ semanticReference: ue
1445
1505
  });
1446
- } catch (y) {
1447
- console.error("Failed to capture preview:", y), g(u);
1506
+ } catch (h) {
1507
+ console.error("Failed to capture preview:", h), x(u);
1448
1508
  } finally {
1449
- M(!1), x(null);
1509
+ D(!1), w(null);
1450
1510
  }
1451
1511
  }
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);
1512
+ }, [d, u, m]);
1513
+ X(() => {
1514
+ const l = (f) => {
1515
+ if (f.key === "Escape") {
1516
+ m ? x(null) : A ? G(!1) : d && p(!1);
1457
1517
  return;
1458
1518
  }
1459
- const H = (() => {
1519
+ const $ = (() => {
1460
1520
  let E = document.activeElement;
1461
1521
  for (; E && E.shadowRoot && E.shadowRoot.activeElement; )
1462
1522
  E = E.shadowRoot.activeElement;
1463
1523
  return E;
1464
1524
  })();
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));
1525
+ if (["input", "textarea"].includes(($?.tagName || "").toLowerCase()) || $?.isContentEditable) return;
1526
+ const C = f.key.toLowerCase();
1527
+ C === "c" && !m && !A && p((E) => !E), C === "v" && !m && (_.length > 0 || A) && (G((E) => !E), A || p(!1));
1468
1528
  };
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);
1529
+ return d && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", l), window.addEventListener("mousemove", Ve, !0), window.addEventListener("click", Pe, !0), () => {
1530
+ document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", l), window.removeEventListener("mousemove", Ve, !0), window.removeEventListener("click", Pe, !0);
1471
1531
  };
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";
1532
+ }, [d, m, A, _, Ve, Pe]);
1533
+ const _t = async () => {
1534
+ if (!m || !y.trim()) return;
1535
+ P(!0);
1536
+ const { semanticReference: l } = m, [f, h] = (l.source || "").split(":"), $ = h || "0";
1477
1537
  try {
1478
1538
  if (!(await fetch(`${a}/api/annotations`, {
1479
1539
  method: "POST",
@@ -1482,13 +1542,13 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1482
1542
  "x-api-key": n
1483
1543
  },
1484
1544
  body: JSON.stringify({
1485
- filePath: w,
1486
- line: parseInt(H),
1545
+ filePath: f,
1546
+ line: parseInt($),
1487
1547
  url: window.location.href,
1488
- message: h,
1489
- componentName: d.componentPath || m.tag,
1548
+ message: y,
1549
+ componentName: l.componentPath || m.tag,
1490
1550
  reference: {
1491
- ...d,
1551
+ ...l,
1492
1552
  viewport: {
1493
1553
  width: window.innerWidth,
1494
1554
  height: window.innerHeight
@@ -1498,86 +1558,179 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1498
1558
  }
1499
1559
  })
1500
1560
  })).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");
1561
+ e(r.success, "success"), x(null), b(""), p(!1), K();
1562
+ } catch (S) {
1563
+ console.error(S), e(r.error, "error");
1504
1564
  } finally {
1505
- V(!1);
1565
+ P(!1);
1506
1566
  }
1507
1567
  };
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",
1568
+ return /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1021", className: "vg-container", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1022", className: "vg-no-capture", children: [
1569
+ !i && /* @__PURE__ */ o.jsxs(
1570
+ "div",
1511
1571
  {
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
1572
  style: {
1522
1573
  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)",
1574
+ top: `${U.top}px`,
1575
+ right: `${U.right}px`,
1576
+ zIndex: Le + 10,
1530
1577
  display: "flex",
1531
1578
  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
1539
- },
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)";
1579
+ gap: "8px",
1580
+ transition: c ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
1545
1581
  },
1546
- children: /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:939", size: 20, strokeWidth: 2.5 })
1582
+ children: [
1583
+ /* @__PURE__ */ o.jsx(
1584
+ "div",
1585
+ {
1586
+ onMouseDown: ce,
1587
+ style: {
1588
+ width: "20px",
1589
+ height: "32px",
1590
+ borderRadius: "6px",
1591
+ backgroundColor: "rgba(255, 255, 255, 0.85)",
1592
+ backdropFilter: "blur(4px)",
1593
+ display: "flex",
1594
+ alignItems: "center",
1595
+ justifyContent: "center",
1596
+ cursor: "grab",
1597
+ color: "#1e293b",
1598
+ opacity: d ? 0 : 1,
1599
+ visibility: d ? "hidden" : "visible",
1600
+ transition: "all 0.2s",
1601
+ border: "1px solid rgba(0,0,0,0.1)",
1602
+ boxShadow: "0 2px 8px rgba(0,0,0,0.05)"
1603
+ },
1604
+ onMouseEnter: (l) => {
1605
+ l.currentTarget.style.backgroundColor = "white", l.currentTarget.style.color = "#000000";
1606
+ },
1607
+ onMouseLeave: (l) => {
1608
+ l.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.85)", l.currentTarget.style.color = "#1e293b";
1609
+ },
1610
+ children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1066", size: 14 })
1611
+ }
1612
+ ),
1613
+ /* @__PURE__ */ o.jsx(
1614
+ "button",
1615
+ {
1616
+ onClick: (l) => {
1617
+ l.stopPropagation(), W({
1618
+ title: r.exitConfirmTitle || "Close ViewGate?",
1619
+ message: r.exitConfirmMessage || "Are you sure you want to close ViewGate?",
1620
+ type: "danger",
1621
+ onConfirm: () => s()
1622
+ });
1623
+ },
1624
+ title: "Cerrar ViewGate",
1625
+ style: {
1626
+ width: "40px",
1627
+ height: "40px",
1628
+ borderRadius: "12px",
1629
+ backgroundColor: "rgba(255, 255, 255, 0.9)",
1630
+ backdropFilter: "blur(8px)",
1631
+ display: "flex",
1632
+ alignItems: "center",
1633
+ justifyContent: "center",
1634
+ border: "1px solid rgba(0,0,0,0.05)",
1635
+ boxShadow: "0 4px 12px rgba(0,0,0,0.1)",
1636
+ cursor: "pointer",
1637
+ color: "#64748b",
1638
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
1639
+ },
1640
+ onMouseEnter: (l) => {
1641
+ l.currentTarget.style.transform = "scale(1.1) rotate(90deg)", l.currentTarget.style.color = "#ef4444", l.currentTarget.style.backgroundColor = "white";
1642
+ },
1643
+ onMouseLeave: (l) => {
1644
+ l.currentTarget.style.transform = "scale(1) rotate(0deg)", l.currentTarget.style.color = "#64748b", l.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.9)";
1645
+ },
1646
+ children: /* @__PURE__ */ o.jsx(Ge, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1106", size: 20, strokeWidth: 2.5 })
1647
+ }
1648
+ )
1649
+ ]
1547
1650
  }
1548
1651
  ),
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 })
1652
+ /* @__PURE__ */ o.jsxs(
1653
+ "div",
1654
+ {
1655
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1112",
1656
+ style: {
1657
+ position: "fixed",
1658
+ bottom: `${k.bottom}px`,
1659
+ right: `${k.right}px`,
1660
+ zIndex: Le,
1661
+ display: "flex",
1662
+ alignItems: "center",
1663
+ gap: "8px",
1664
+ transition: q ? "none" : "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"
1665
+ },
1666
+ id: "viewgate-ui",
1667
+ children: [
1668
+ /* @__PURE__ */ o.jsx(
1669
+ "div",
1670
+ {
1671
+ onMouseDown: _e,
1672
+ style: {
1673
+ width: "24px",
1674
+ height: "40px",
1675
+ borderRadius: "10px",
1676
+ backgroundColor: "rgba(255, 255, 255, 0.85)",
1677
+ backdropFilter: "blur(4px)",
1678
+ display: "flex",
1679
+ alignItems: "center",
1680
+ justifyContent: "center",
1681
+ cursor: "grab",
1682
+ color: "#1e293b",
1683
+ opacity: d ? 0 : 1,
1684
+ visibility: d ? "hidden" : "visible",
1685
+ transition: "all 0.2s",
1686
+ border: "1px solid rgba(0,0,0,0.1)",
1687
+ boxShadow: "0 2px 8px rgba(0,0,0,0.05)"
1688
+ },
1689
+ onMouseEnter: (l) => {
1690
+ l.currentTarget.style.backgroundColor = "white", l.currentTarget.style.color = "#000000";
1691
+ },
1692
+ onMouseLeave: (l) => {
1693
+ l.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.85)", l.currentTarget.style.color = "#1e293b";
1694
+ },
1695
+ className: "vg-animate-slide-up",
1696
+ children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1155", size: 16 })
1697
+ }
1698
+ ),
1699
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1158", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
1700
+ /* @__PURE__ */ o.jsx(
1701
+ "button",
1702
+ {
1703
+ onClick: () => p(!d),
1704
+ className: "vg-button-primary vg-animate-pop",
1705
+ style: {
1706
+ padding: "12px 24px",
1707
+ background: d ? "#ef4444" : void 0
1708
+ },
1709
+ children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1167", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
1710
+ d ? /* @__PURE__ */ o.jsx(Ge, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1168", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1168", size: 20, className: "vg-animate-pop" }),
1711
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1169", children: d ? r.exitMode : r.enterMode })
1712
+ ] })
1713
+ }
1714
+ ),
1715
+ _.length > 0 && /* @__PURE__ */ o.jsxs(
1716
+ "button",
1717
+ {
1718
+ onClick: () => {
1719
+ G(!A), p(!1), x(null);
1720
+ },
1721
+ className: "vg-button-ghost vg-animate-pop",
1722
+ style: { animationDelay: "0.1s" },
1723
+ children: [
1724
+ /* @__PURE__ */ o.jsx(Xt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1182", size: 20 }),
1725
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1183", children: r.viewComments })
1726
+ ]
1727
+ }
1728
+ )
1562
1729
  ] })
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: {
1730
+ ]
1731
+ }
1732
+ ),
1733
+ z && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1191", style: {
1581
1734
  position: "fixed",
1582
1735
  top: 0,
1583
1736
  left: 0,
@@ -1588,16 +1741,16 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1588
1741
  display: "flex",
1589
1742
  alignItems: "center",
1590
1743
  justifyContent: "center",
1591
- zIndex: ke + 1,
1744
+ zIndex: Le + 1,
1592
1745
  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..." })
1746
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1197", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
1747
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1198", className: "vg-spinner" }),
1748
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1199", style: { fontWeight: 600, fontSize: "14px", color: "#000000" }, children: "Capturando..." })
1596
1749
  ] }) }),
1597
- l && !m && /* @__PURE__ */ o.jsx(
1750
+ d && !m && /* @__PURE__ */ o.jsx(
1598
1751
  "div",
1599
1752
  {
1600
- "data-source-path": "/src/components/ViewGateOverlay.tsx:993",
1753
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1206",
1601
1754
  className: "vg-backdrop-blur",
1602
1755
  style: {
1603
1756
  opacity: 1,
@@ -1609,36 +1762,36 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1609
1762
  ${u.rect.left}px ${u.rect.bottom}px,
1610
1763
  ${u.rect.left}px ${u.rect.top}px
1611
1764
  )` : "none",
1612
- zIndex: Hr
1765
+ zIndex: an
1613
1766
  }
1614
1767
  }
1615
1768
  ),
1616
- l && u && !m && !I && /* @__PURE__ */ o.jsx(
1769
+ d && u && !m && !z && /* @__PURE__ */ o.jsx(
1617
1770
  "div",
1618
1771
  {
1619
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1012",
1772
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1225",
1620
1773
  className: "vg-selection-pulse",
1621
1774
  style: {
1622
1775
  top: u.rect.top - 4,
1623
1776
  left: u.rect.left - 4,
1624
1777
  width: u.rect.width + 8,
1625
1778
  height: u.rect.height + 8,
1626
- zIndex: Wr
1779
+ zIndex: on
1627
1780
  },
1628
1781
  children: /* @__PURE__ */ o.jsxs(
1629
1782
  "div",
1630
1783
  {
1631
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1022",
1784
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1235",
1632
1785
  className: "vg-selection-label",
1633
1786
  style: {
1634
1787
  ...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
1788
  ...u.rect.left + 200 > window.innerWidth ? { left: "auto", right: "0" } : { left: "0", right: "auto" }
1636
1789
  },
1637
1790
  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: [
1791
+ /* @__PURE__ */ o.jsx(tr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1251", size: 16 }),
1792
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1252", style: { display: "flex", flexDirection: "column" }, children: [
1793
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1253", style: { fontWeight: 700 }, children: r.selectToComment }),
1794
+ /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1254", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
1642
1795
  Math.round(u.rect.width),
1643
1796
  " × ",
1644
1797
  Math.round(u.rect.height)
@@ -1649,7 +1802,7 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1649
1802
  )
1650
1803
  }
1651
1804
  ),
1652
- m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1051", className: "vg-animate-fade", style: {
1805
+ m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1264", className: "vg-animate-fade", style: {
1653
1806
  position: "fixed",
1654
1807
  top: 0,
1655
1808
  left: 0,
@@ -1660,14 +1813,14 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1660
1813
  display: "flex",
1661
1814
  alignItems: "center",
1662
1815
  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: {
1816
+ zIndex: Ne
1817
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1269", className: "vg-glassmorphism vg-animate-slide", style: {
1665
1818
  padding: "40px",
1666
1819
  width: "500px",
1667
1820
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
1668
1821
  }, 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: {
1822
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1273", style: { textAlign: "center", marginBottom: "32px" }, children: [
1823
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1274", style: {
1671
1824
  width: "48px",
1672
1825
  height: "48px",
1673
1826
  background: "var(--vg-primary-gradient)",
@@ -1678,11 +1831,11 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1678
1831
  margin: "0 auto 16px",
1679
1832
  color: "white",
1680
1833
  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 })
1834
+ }, children: /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1279", size: 24 }) }),
1835
+ /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1281", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
1836
+ /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1282", style: { margin: 0, color: "#000000", fontSize: "15px" }, children: r.feedbackSubheader })
1684
1837
  ] }),
1685
- m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1073", style: {
1838
+ m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1286", style: {
1686
1839
  marginBottom: "24px",
1687
1840
  borderRadius: "12px",
1688
1841
  overflow: "hidden",
@@ -1702,21 +1855,21 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1702
1855
  "textarea",
1703
1856
  {
1704
1857
  className: "vg-textarea",
1705
- value: h,
1706
- onChange: (d) => v(d.target.value),
1858
+ value: y,
1859
+ onChange: (l) => b(l.target.value),
1707
1860
  rows: 4,
1708
1861
  placeholder: r.placeholder,
1709
1862
  autoFocus: !0,
1710
1863
  style: { fontSize: "15px", padding: "16px", marginBottom: "24px" }
1711
1864
  }
1712
1865
  ),
1713
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1100", style: { display: "flex", gap: "12px" }, children: [
1866
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1313", style: { display: "flex", gap: "12px" }, children: [
1714
1867
  /* @__PURE__ */ o.jsx(
1715
1868
  "button",
1716
1869
  {
1717
- onClick: () => !j && g(null),
1870
+ onClick: () => !T && x(null),
1718
1871
  className: "vg-button-ghost",
1719
- disabled: j,
1872
+ disabled: T,
1720
1873
  style: { flex: 1, padding: "12px" },
1721
1874
  children: r.cancel
1722
1875
  }
@@ -1724,19 +1877,19 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1724
1877
  /* @__PURE__ */ o.jsx(
1725
1878
  "button",
1726
1879
  {
1727
- onClick: ft,
1880
+ onClick: _t,
1728
1881
  className: "vg-button-primary",
1729
- disabled: j || !h.trim(),
1882
+ disabled: T || !y.trim(),
1730
1883
  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" })
1884
+ children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1328", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1885
+ T ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1329", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ o.jsx(ir, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1329", size: 18 }),
1886
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1330", children: T ? r.submitting : r.sendFeedback || "Send Comment" })
1734
1887
  ] })
1735
1888
  }
1736
1889
  )
1737
1890
  ] })
1738
1891
  ] }) }),
1739
- T && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1127", className: "vg-animate-fade", style: {
1892
+ A && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1340", className: "vg-animate-fade", style: {
1740
1893
  position: "fixed",
1741
1894
  top: 0,
1742
1895
  left: 0,
@@ -1747,94 +1900,94 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1747
1900
  display: "flex",
1748
1901
  alignItems: "center",
1749
1902
  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: {
1903
+ zIndex: Ne
1904
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1345", className: "vg-glassmorphism vg-animate-slide", style: {
1752
1905
  padding: "32px",
1753
1906
  width: "650px",
1754
1907
  maxHeight: "85vh",
1755
1908
  display: "flex",
1756
1909
  flexDirection: "column"
1757
1910
  }, 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 })
1911
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1349", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
1912
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1350", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
1913
+ /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1351", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: B ? r.commentDetails : r.annotations }),
1914
+ !B && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1355", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: _.length })
1762
1915
  ] }),
1763
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1147", style: { display: "flex", gap: "8px" }, children: [
1764
- W && /* @__PURE__ */ o.jsx(
1916
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1360", style: { display: "flex", gap: "8px" }, children: [
1917
+ B && /* @__PURE__ */ o.jsx(
1765
1918
  "button",
1766
1919
  {
1767
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1149",
1920
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1362",
1768
1921
  className: "vg-button-ghost",
1769
1922
  style: { padding: "6px 14px", fontSize: "12px" },
1770
- onClick: () => Q(null),
1923
+ onClick: () => ee(null),
1771
1924
  children: r.viewAll || "View All"
1772
1925
  }
1773
1926
  ),
1774
1927
  /* @__PURE__ */ o.jsx(
1775
1928
  "button",
1776
1929
  {
1777
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1157",
1930
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1370",
1778
1931
  className: "vg-button-ghost",
1779
1932
  style: { padding: "8px", borderRadius: "50%" },
1780
1933
  onClick: () => {
1781
- P(!1), Q(null);
1934
+ G(!1), ee(null);
1782
1935
  },
1783
- children: /* @__PURE__ */ o.jsx(Ee, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1162", size: 20 })
1936
+ children: /* @__PURE__ */ o.jsx(Ge, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1375", size: 20 })
1784
1937
  }
1785
1938
  )
1786
1939
  ] })
1787
1940
  ] }),
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(
1941
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1380", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: oe ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1382", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1383", className: "vg-spinner" }) }) : (B ? _.filter((l) => l._id === B) : _).map((l, f) => /* @__PURE__ */ o.jsxs(
1789
1942
  "div",
1790
1943
  {
1791
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1174",
1944
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1387",
1792
1945
  className: "vg-glassmorphism vg-animate-slide",
1793
1946
  style: {
1794
1947
  padding: "20px",
1795
1948
  marginBottom: "16px",
1796
1949
  border: "1px solid rgba(0,0,0,0.05)",
1797
1950
  background: "rgba(255,255,255,0.5)",
1798
- animationDelay: `${w * 0.05}s`
1951
+ animationDelay: `${f * 0.05}s`
1799
1952
  },
1800
1953
  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 }),
1954
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1398", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1399", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
1955
+ l.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1401", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
1956
+ /* @__PURE__ */ o.jsx(ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1402", size: 14 }),
1804
1957
  " ",
1805
1958
  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 }),
1959
+ ] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1405", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
1960
+ /* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1406", size: 14 }),
1808
1961
  " ",
1809
1962
  r.pending
1810
1963
  ] }),
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) })
1964
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1409", style: { fontSize: "12px", color: "#000000" }, children: un(l.timestamp || l.createdAt || l.reference?.timestamp, t) })
1812
1965
  ] }) }),
1813
- ie === d._id ? /* @__PURE__ */ o.jsx(
1966
+ Ue === l._id ? /* @__PURE__ */ o.jsx(
1814
1967
  "textarea",
1815
1968
  {
1816
1969
  className: "vg-textarea",
1817
- value: c,
1818
- onChange: (y) => f(y.target.value),
1970
+ value: qe,
1971
+ onChange: (h) => Ye(h.target.value),
1819
1972
  rows: 3,
1820
1973
  autoFocus: !0,
1821
1974
  style: { marginBottom: "16px" }
1822
1975
  }
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: [
1976
+ ) : /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1425", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: l.message }),
1977
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1428", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: Ue === l._id ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1825
1978
  /* @__PURE__ */ o.jsx(
1826
1979
  "button",
1827
1980
  {
1828
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1218",
1981
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1431",
1829
1982
  className: "vg-button-primary vg-animate-pop",
1830
1983
  style: { padding: "8px 16px", fontSize: "13px" },
1831
1984
  onClick: async () => {
1832
1985
  try {
1833
- (await fetch(`${a}/api/annotations/${d._id}`, {
1986
+ (await fetch(`${a}/api/annotations/${l._id}`, {
1834
1987
  method: "PATCH",
1835
1988
  headers: { "Content-Type": "application/json", "x-api-key": n },
1836
- body: JSON.stringify({ message: c })
1837
- })).ok && (ee(null), A(), e(r.updateSuccess, "success"));
1989
+ body: JSON.stringify({ message: qe })
1990
+ })).ok && (Te(null), K(), e(r.updateSuccess, "success"));
1838
1991
  } catch {
1839
1992
  e(r.error, "error");
1840
1993
  }
@@ -1842,19 +1995,19 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1842
1995
  children: r.save
1843
1996
  }
1844
1997
  ),
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 })
1998
+ /* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1453", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => Te(null), children: r.cancel })
1846
1999
  ] }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1847
2000
  /* @__PURE__ */ o.jsxs(
1848
2001
  "button",
1849
2002
  {
1850
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1244",
2003
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1457",
1851
2004
  className: "vg-button-ghost vg-animate-pop",
1852
2005
  style: { padding: "8px 16px", fontSize: "13px" },
1853
2006
  onClick: () => {
1854
- ee(d._id), f(d.message);
2007
+ Te(l._id), Ye(l.message);
1855
2008
  },
1856
2009
  children: [
1857
- /* @__PURE__ */ o.jsx(Ft, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1252", size: 14 }),
2010
+ /* @__PURE__ */ o.jsx(nr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1465", size: 14 }),
1858
2011
  " ",
1859
2012
  r.edit
1860
2013
  ]
@@ -1863,47 +2016,47 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1863
2016
  /* @__PURE__ */ o.jsxs(
1864
2017
  "button",
1865
2018
  {
1866
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1254",
2019
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1467",
1867
2020
  className: "vg-button-ghost vg-animate-pop",
1868
2021
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.05s" },
1869
2022
  onClick: () => {
1870
- d.url && (window.location.href = d.url);
2023
+ l.url && (window.location.href = l.url);
1871
2024
  },
1872
2025
  children: [
1873
- /* @__PURE__ */ o.jsx(Fe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1261", size: 14 }),
2026
+ /* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1474", size: 14 }),
1874
2027
  " ",
1875
2028
  r.review
1876
2029
  ]
1877
2030
  }
1878
2031
  ),
1879
- d.status === "pending" ? /* @__PURE__ */ o.jsxs(
2032
+ l.status === "pending" ? /* @__PURE__ */ o.jsxs(
1880
2033
  "button",
1881
2034
  {
1882
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1264",
2035
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1477",
1883
2036
  className: "vg-button-primary vg-animate-pop",
1884
2037
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
1885
2038
  onClick: () => {
1886
- D({
2039
+ W({
1887
2040
  title: r.markReadyConfirm,
1888
2041
  message: r.confirmMarkReady,
1889
2042
  type: "success",
1890
2043
  onConfirm: async () => {
1891
2044
  try {
1892
- (await fetch(`${a}/api/annotations/${d._id}`, {
2045
+ (await fetch(`${a}/api/annotations/${l._id}`, {
1893
2046
  method: "PATCH",
1894
2047
  headers: { "Content-Type": "application/json", "x-api-key": n },
1895
2048
  body: JSON.stringify({ status: "ready_for_review" })
1896
- })).ok && (A(), e(r.updateSuccess, "success"));
2049
+ })).ok && (K(), e(r.updateSuccess, "success"));
1897
2050
  } catch {
1898
2051
  e(r.error, "error");
1899
2052
  } finally {
1900
- D(null);
2053
+ W(null);
1901
2054
  }
1902
2055
  }
1903
2056
  });
1904
2057
  },
1905
2058
  children: [
1906
- /* @__PURE__ */ o.jsx(se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1292", size: 14 }),
2059
+ /* @__PURE__ */ o.jsx(ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1505", size: 14 }),
1907
2060
  " ",
1908
2061
  r.markReady
1909
2062
  ]
@@ -1911,32 +2064,32 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1911
2064
  ) : /* @__PURE__ */ o.jsxs(
1912
2065
  "button",
1913
2066
  {
1914
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1295",
2067
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1508",
1915
2068
  className: "vg-button-ghost vg-animate-pop",
1916
2069
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
1917
2070
  onClick: () => {
1918
- D({
2071
+ W({
1919
2072
  title: r.reopenConfirm,
1920
2073
  message: r.confirmReopen,
1921
2074
  type: "success",
1922
2075
  // Reopening is a positive action, use success theme (indigo/check) or we could add a neutral theme
1923
2076
  onConfirm: async () => {
1924
2077
  try {
1925
- (await fetch(`${a}/api/annotations/${d._id}`, {
2078
+ (await fetch(`${a}/api/annotations/${l._id}`, {
1926
2079
  method: "PATCH",
1927
2080
  headers: { "Content-Type": "application/json", "x-api-key": n },
1928
2081
  body: JSON.stringify({ status: "pending" })
1929
- })).ok && (A(), e(r.updateSuccess, "success"));
2082
+ })).ok && (K(), e(r.updateSuccess, "success"));
1930
2083
  } catch {
1931
2084
  e(r.error, "error");
1932
2085
  } finally {
1933
- D(null);
2086
+ W(null);
1934
2087
  }
1935
2088
  }
1936
2089
  });
1937
2090
  },
1938
2091
  children: [
1939
- /* @__PURE__ */ o.jsx(Ht, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1323", size: 14 }),
2092
+ /* @__PURE__ */ o.jsx(ar, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1536", size: 14 }),
1940
2093
  " ",
1941
2094
  r.reopen
1942
2095
  ]
@@ -1945,38 +2098,38 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1945
2098
  /* @__PURE__ */ o.jsx(
1946
2099
  "button",
1947
2100
  {
1948
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1326",
2101
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1539",
1949
2102
  className: "vg-button-ghost vg-animate-pop",
1950
2103
  style: { padding: "8px 12px", color: "#ef4444", borderColor: "#fee2e2", animationDelay: "0.15s" },
1951
2104
  onClick: () => {
1952
- D({
2105
+ W({
1953
2106
  title: r.deleteConfirm,
1954
2107
  message: r.confirmDelete,
1955
2108
  type: "danger",
1956
2109
  onConfirm: async () => {
1957
2110
  try {
1958
- (await fetch(`${a}/api/annotations/${d._id}`, {
2111
+ (await fetch(`${a}/api/annotations/${l._id}`, {
1959
2112
  method: "DELETE",
1960
2113
  headers: { "x-api-key": n }
1961
- })).ok && (A(), e(r.deleteSuccess, "success"));
2114
+ })).ok && (K(), e(r.deleteSuccess, "success"));
1962
2115
  } catch {
1963
2116
  e(r.error, "error");
1964
2117
  } finally {
1965
- D(null);
2118
+ W(null);
1966
2119
  }
1967
2120
  }
1968
2121
  });
1969
2122
  },
1970
- children: /* @__PURE__ */ o.jsx(De, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1353", size: 16 })
2123
+ children: /* @__PURE__ */ o.jsx(rt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1566", size: 16 })
1971
2124
  }
1972
2125
  )
1973
2126
  ] }) })
1974
2127
  ]
1975
2128
  },
1976
- d._id
2129
+ l._id
1977
2130
  )) })
1978
2131
  ] }) }),
1979
- z && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1368", className: "vg-animate-fade", style: {
2132
+ F && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1581", className: "vg-animate-fade", style: {
1980
2133
  position: "fixed",
1981
2134
  top: 0,
1982
2135
  left: 0,
@@ -1987,76 +2140,76 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
1987
2140
  display: "flex",
1988
2141
  alignItems: "center",
1989
2142
  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: {
2143
+ zIndex: Ne + 100
2144
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1586", className: "vg-glassmorphism vg-animate-slide", style: {
1992
2145
  padding: "40px",
1993
2146
  width: "420px",
1994
2147
  textAlign: "center",
1995
2148
  border: "1px solid rgba(255, 255, 255, 0.1)",
1996
2149
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.5)"
1997
2150
  }, children: [
1998
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1380", style: {
2151
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1593", style: {
1999
2152
  width: "64px",
2000
2153
  height: "64px",
2001
- background: z.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
2154
+ background: F.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
2002
2155
  borderRadius: "20px",
2003
2156
  display: "flex",
2004
2157
  alignItems: "center",
2005
2158
  justifyContent: "center",
2006
2159
  margin: "0 auto 24px",
2007
- color: z.type === "danger" ? "#ef4444" : "#6366f1",
2160
+ color: F.type === "danger" ? "#ef4444" : "#6366f1",
2008
2161
  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: [
2162
+ }, children: F.type === "danger" ? /* @__PURE__ */ o.jsx(rt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1602", size: 32 }) : /* @__PURE__ */ o.jsx(ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1602", size: 32 }) }),
2163
+ /* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1604", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#000000", letterSpacing: "-0.02em" }, children: F.title }),
2164
+ /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1605", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#000000", lineHeight: 1.6 }, children: F.message }),
2165
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1606", style: { display: "flex", gap: "16px" }, children: [
2013
2166
  /* @__PURE__ */ o.jsx(
2014
2167
  "button",
2015
2168
  {
2016
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1394",
2169
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1607",
2017
2170
  className: "vg-button-ghost",
2018
2171
  style: { flex: 1, height: "44px" },
2019
- onClick: () => !X && D(null),
2020
- disabled: X,
2172
+ onClick: () => !Z && W(null),
2173
+ disabled: Z,
2021
2174
  children: r.no
2022
2175
  }
2023
2176
  ),
2024
2177
  /* @__PURE__ */ o.jsx(
2025
2178
  "button",
2026
2179
  {
2027
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1402",
2180
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1615",
2028
2181
  className: "vg-button-primary",
2029
2182
  style: {
2030
2183
  flex: 1,
2031
2184
  height: "44px",
2032
- backgroundColor: z.type === "danger" ? "#ef4444" : void 0,
2033
- backgroundImage: z.type === "danger" ? "none" : void 0,
2185
+ backgroundColor: F.type === "danger" ? "#ef4444" : void 0,
2186
+ backgroundImage: F.type === "danger" ? "none" : void 0,
2034
2187
  display: "flex",
2035
2188
  alignItems: "center",
2036
2189
  justifyContent: "center",
2037
2190
  gap: "8px"
2038
2191
  },
2039
- disabled: X,
2192
+ disabled: Z,
2040
2193
  onClick: async () => {
2041
- oe(!0);
2194
+ ie(!0);
2042
2195
  try {
2043
- await z.onConfirm();
2044
- } catch (d) {
2045
- console.error("Confirmation error:", d);
2196
+ await F.onConfirm();
2197
+ } catch (l) {
2198
+ console.error("Confirmation error:", l);
2046
2199
  } finally {
2047
- oe(!1);
2200
+ ie(!1);
2048
2201
  }
2049
2202
  },
2050
- children: X ? /* @__PURE__ */ o.jsx(Lt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1427", size: 18, className: "vg-animate-spin" }) : r.yes
2203
+ children: Z ? /* @__PURE__ */ o.jsx(Kt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1640", size: 18, className: "vg-animate-spin" }) : r.yes
2051
2204
  }
2052
2205
  )
2053
2206
  ] })
2054
2207
  ] }) }),
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
2208
+ !d && !A && _.map((l, f) => {
2209
+ const h = jt[l._id];
2210
+ if (!h) return null;
2211
+ const S = _.slice(0, f).filter(
2212
+ (C) => C.reference?.selector && C.reference.selector === l.reference?.selector
2060
2213
  ).length * 34;
2061
2214
  return /* @__PURE__ */ o.jsxs(
2062
2215
  "div",
@@ -2064,76 +2217,76 @@ const ve = 2147483647, ke = ve, Re = 2e6, Hr = ve - 10, Wr = ve - 5, Ur = ve - 1
2064
2217
  className: "vg-pin-container vg-animate-pop",
2065
2218
  style: {
2066
2219
  position: "fixed",
2067
- top: y.top - 20 - window.scrollY,
2068
- left: y.left + y.width / 2 - 16 + G - window.scrollX,
2220
+ top: h.top - 20 - window.scrollY,
2221
+ left: h.left + h.width / 2 - 16 + S - window.scrollX,
2069
2222
  cursor: "pointer",
2070
- animationDelay: `${w * 0.08}s`,
2223
+ animationDelay: `${f * 0.08}s`,
2071
2224
  transition: "all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",
2072
- zIndex: Ur - w
2225
+ zIndex: cn - f
2073
2226
  // Ensure staggered pins don't overlap tooltips weirdly
2074
2227
  },
2075
- onMouseEnter: (O) => {
2076
- const E = O.currentTarget.getBoundingClientRect();
2077
- window.innerHeight - E.bottom < 180 ? fe((_) => ({ ..._, [d._id]: "vg-top" })) : fe((_) => ({ ..._, [d._id]: "" }));
2228
+ onMouseEnter: (C) => {
2229
+ const E = C.currentTarget.getBoundingClientRect();
2230
+ window.innerHeight - E.bottom < 180 ? xe((I) => ({ ...I, [l._id]: "vg-top" })) : xe((I) => ({ ...I, [l._id]: "" }));
2078
2231
  },
2079
2232
  onClick: () => {
2080
- P(!0), Q(d._id);
2233
+ G(!0), ee(l._id);
2081
2234
  },
2082
2235
  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 }),
2236
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1687", className: `vg-pin-tooltip ${ye[l._id] || ""}`, children: [
2237
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1688", style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: [
2238
+ l.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1690", style: { display: "flex", alignItems: "center", gap: "6px", color: "#16a34a", fontWeight: 700, fontSize: "11px" }, children: [
2239
+ /* @__PURE__ */ o.jsx(ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1691", size: 12 }),
2087
2240
  " ",
2088
2241
  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 }),
2242
+ ] }) : /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1694", style: { display: "flex", alignItems: "center", gap: "6px", color: h.isModal ? "#f59e0b" : "#ea580c", fontWeight: 700, fontSize: "11px" }, children: [
2243
+ /* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1695", size: 12 }),
2091
2244
  " ",
2092
2245
  r.pending
2093
2246
  ] }),
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" }) })
2247
+ h.isModal && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1699", 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:1700", children: "MODAL" }) })
2095
2248
  ] }),
2096
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1491", style: { fontWeight: 500, color: "#1e293b", lineHeight: 1.4 }, children: d.message })
2249
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1704", style: { fontWeight: 500, color: "#1e293b", lineHeight: 1.4 }, children: l.message })
2097
2250
  ] }),
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 }) })
2251
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1707", className: `vg-formal-pin ${l.status === "ready_for_review" ? "ready" : ""} ${h.isModal ? "modal-variant" : ""}`, children: l.status === "ready_for_review" ? /* @__PURE__ */ o.jsx(ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1708", size: 18 }) : h.isModal ? /* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1708", size: 16 }) : /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1708", size: 16 }) })
2099
2252
  ]
2100
2253
  },
2101
- `pin-${d._id}`
2254
+ `pin-${l._id}`
2102
2255
  );
2103
2256
  })
2104
2257
  ] }) });
2105
2258
  };
2106
- function mt(e, t, r) {
2259
+ function Rt(e, t, r) {
2107
2260
  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), "");
2261
+ const n = (d) => d.replace(/\\/g, "/"), a = n(t).replace(n(r), "");
2109
2262
  return e.split(`
2110
- `).map((l, p) => {
2263
+ `).map((d, p) => {
2111
2264
  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}"`);
2265
+ 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
2266
  }).join(`
2114
2267
  `);
2115
2268
  }
2116
- function cn() {
2269
+ function Sn() {
2117
2270
  return {
2118
2271
  name: "vite-plugin-viewgate",
2119
2272
  enforce: "pre",
2120
2273
  transform(e, t) {
2121
2274
  return {
2122
- code: mt(e, t, process.cwd()),
2275
+ code: Rt(e, t, process.cwd()),
2123
2276
  map: null
2124
2277
  };
2125
2278
  }
2126
2279
  };
2127
2280
  }
2128
- function ln(e) {
2281
+ function kn(e) {
2129
2282
  const t = this.resourcePath;
2130
- return t ? (process.env.NODE_ENV, mt(e, t, process.cwd())) : e;
2283
+ return t ? (process.env.NODE_ENV, Rt(e, t, process.cwd())) : e;
2131
2284
  }
2132
2285
  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
2286
+ En as ViewGate,
2287
+ vn as ViewGateOverlay,
2288
+ Rt as transformSourcePaths,
2289
+ ur as useViewGate,
2290
+ kn as viewgateNextLoader,
2291
+ Sn as viewgatePlugin
2139
2292
  };