viewgate-wrapper 1.9.1 → 1.9.2
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.
- package/dist/cli.js +74 -0
- package/dist/components/ViewGateOverlay.d.ts.map +1 -1
- package/dist/plugin/next-loader.js +11 -0
- package/dist/plugin/transform-logic.js +20 -0
- package/dist/plugin/vite-plugin-viewgate.js +14 -0
- package/dist/viewgate-wrapper.js +163 -171
- package/dist/viewgate-wrapper.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/cli.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import os from 'os';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
async function setup() {
|
|
9
|
+
console.log('🚀 Setting up ViewGate MCP Server...');
|
|
10
|
+
// 1. Locate mcp_config.json
|
|
11
|
+
const configDir = path.join(os.homedir(), '.gemini', 'antigravity');
|
|
12
|
+
const configPath = path.join(configDir, 'mcp_config.json');
|
|
13
|
+
if (!fs.existsSync(configPath)) {
|
|
14
|
+
console.error(`❌ Could not find mcp_config.json at ${configPath}`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
// 2. Determine the path to the MCP server
|
|
18
|
+
// In production (node_modules), we'll be in dist/cli.js, so mcp-server is at ../mcp-server
|
|
19
|
+
// During local dev, it might be different.
|
|
20
|
+
let mcpServerPath = '';
|
|
21
|
+
// Check if we are running from node_modules or local dev
|
|
22
|
+
const isLocalDev = __dirname.includes('view-gate-wrapper' + path.sep + 'src') || __dirname.includes('view-gate-wrapper' + path.sep + 'dist');
|
|
23
|
+
if (isLocalDev) {
|
|
24
|
+
// Find the root of the project
|
|
25
|
+
let root = __dirname;
|
|
26
|
+
while (root !== path.parse(root).root && !fs.existsSync(path.join(root, 'package.json'))) {
|
|
27
|
+
root = path.dirname(root);
|
|
28
|
+
}
|
|
29
|
+
mcpServerPath = path.join(root, 'mcp-server', 'dist', 'index.js');
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
// In node_modules, we expect to be in something like node_modules/viewgate-wrapper/dist
|
|
33
|
+
mcpServerPath = path.join(__dirname, '..', 'mcp-server', 'dist', 'index.js');
|
|
34
|
+
}
|
|
35
|
+
// Normalize to forward slashes for the JSON config (cleaner on Windows)
|
|
36
|
+
const normalizedMcpPath = mcpServerPath.replace(/\\/g, '/');
|
|
37
|
+
if (!fs.existsSync(mcpServerPath)) {
|
|
38
|
+
console.error(`❌ MCP Server not found at: ${mcpServerPath}`);
|
|
39
|
+
console.log('Please ensure you have built the project: npm run build');
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
// 3. Read and update mcp_config.json
|
|
43
|
+
try {
|
|
44
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
45
|
+
if (!config.mcpServers) {
|
|
46
|
+
config.mcpServers = {};
|
|
47
|
+
}
|
|
48
|
+
const currentServer = config.mcpServers.viewgate || {};
|
|
49
|
+
const env = currentServer.env || {};
|
|
50
|
+
// Default values if not present
|
|
51
|
+
const backendUrl = env.BACKEND_URL || 'https://view-gate.vercel.app';
|
|
52
|
+
const apiKey = env.API_KEY || 'YOUR_API_KEY_HERE';
|
|
53
|
+
config.mcpServers.viewgate = {
|
|
54
|
+
command: 'node',
|
|
55
|
+
args: [normalizedMcpPath],
|
|
56
|
+
env: {
|
|
57
|
+
BACKEND_URL: backendUrl,
|
|
58
|
+
API_KEY: apiKey
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
62
|
+
console.log(`✅ Updated mcp_config.json successfully!`);
|
|
63
|
+
console.log(`📍 MCP Path: ${normalizedMcpPath}`);
|
|
64
|
+
if (apiKey === 'YOUR_API_KEY_HERE') {
|
|
65
|
+
console.log('\n⚠️ Remember to set your API_KEY in:');
|
|
66
|
+
console.log(` ${configPath}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
console.error(`❌ Error updating configuration: ${error.message}`);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
setup();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewGateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ViewGateOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,wBAAwB,CAAC;AA+GhC,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"ViewGateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ViewGateOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,wBAAwB,CAAC;AA+GhC,eAAO,MAAM,eAAe,EAAE,EAipB7B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { transformSourcePaths } from './transform-logic.js';
|
|
2
|
+
export default function viewgateNextLoader(source) {
|
|
3
|
+
const id = this.resourcePath;
|
|
4
|
+
if (!id)
|
|
5
|
+
return source;
|
|
6
|
+
// Debug log to ensure loader is running
|
|
7
|
+
if (process.env.NODE_ENV === 'development') {
|
|
8
|
+
// console.log(`[ViewGate] Transforming: ${id}`);
|
|
9
|
+
}
|
|
10
|
+
return transformSourcePaths(source, id, process.cwd());
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function transformSourcePaths(code, id, cwd) {
|
|
2
|
+
if (!id.endsWith('.tsx') && !id.endsWith('.jsx'))
|
|
3
|
+
return code;
|
|
4
|
+
if (id.includes('node_modules'))
|
|
5
|
+
return code;
|
|
6
|
+
const normalizePath = (p) => p.replace(/\\/g, '/');
|
|
7
|
+
const relativePath = normalizePath(id).replace(normalizePath(cwd), '');
|
|
8
|
+
const lines = code.split('\n');
|
|
9
|
+
const transformedLines = lines.map((line, index) => {
|
|
10
|
+
const lineNumber = index + 1;
|
|
11
|
+
// Regex to find JSX tags and inject data-source-path (handles self-closing tags)
|
|
12
|
+
return line.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (match, prefix, tagName) => {
|
|
13
|
+
if (match.includes('data-source-path') || tagName === 'Fragment' || tagName === 'React.Fragment') {
|
|
14
|
+
return match;
|
|
15
|
+
}
|
|
16
|
+
return `${prefix}<${tagName} data-source-path="${relativePath}:${lineNumber}"`;
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return transformedLines.join('\n');
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { transformSourcePaths } from './transform-logic.js';
|
|
2
|
+
export default function viewgatePlugin() {
|
|
3
|
+
return {
|
|
4
|
+
name: 'vite-plugin-viewgate',
|
|
5
|
+
enforce: 'pre',
|
|
6
|
+
transform(code, id) {
|
|
7
|
+
const transformedCode = transformSourcePaths(code, id, process.cwd());
|
|
8
|
+
return {
|
|
9
|
+
code: transformedCode,
|
|
10
|
+
map: null
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
package/dist/viewgate-wrapper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}@keyframes vg-pop-in{0%{transform:scale(.9) translateY(10px);opacity:0}to{transform:scale(1) translateY(0);opacity:1}}.vg-button-appear{animation:vg-pop-in .4s cubic-bezier(.34,1.56,.64,1) forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-pulse-green{0%{box-shadow:0 0 #10b981b3;border-color:#10b981}70%{box-shadow:0 0 0 15px #10b98100;border-color:#10b981}to{box-shadow:0 0 #10b98100;border-color:#10b981}}.vg-highlight-active{animation:vg-pulse-green 2s infinite!important;outline:4px solid #10b981!important;outline-offset:2px!important;transition:all .3s ease!important;position:relative!important;z-index:9999!important}.vg-highlight-active:after{content:"✓ Revised";position:absolute;top:-25px;left:0;background:#10b981;color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:800;text-transform:uppercase;white-space:nowrap;pointer-events:none}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import Ae, { createContext as
|
|
2
|
+
import Ae, { createContext as Le, useState as C, useContext as Ge, useCallback as oe, useEffect as Z } from "react";
|
|
3
3
|
var K = { exports: {} }, U = {};
|
|
4
4
|
var de;
|
|
5
5
|
function $e() {
|
|
@@ -30,10 +30,10 @@ function Ie() {
|
|
|
30
30
|
function e(o) {
|
|
31
31
|
if (o == null) return null;
|
|
32
32
|
if (typeof o == "function")
|
|
33
|
-
return o.$$typeof ===
|
|
33
|
+
return o.$$typeof === _ ? null : o.displayName || o.name || null;
|
|
34
34
|
if (typeof o == "string") return o;
|
|
35
35
|
switch (o) {
|
|
36
|
-
case
|
|
36
|
+
case A:
|
|
37
37
|
return "Fragment";
|
|
38
38
|
case B:
|
|
39
39
|
return "Profiler";
|
|
@@ -56,7 +56,7 @@ function Ie() {
|
|
|
56
56
|
return o.displayName || "Context";
|
|
57
57
|
case D:
|
|
58
58
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
59
|
-
case
|
|
59
|
+
case L:
|
|
60
60
|
var p = o.render;
|
|
61
61
|
return o = o.displayName, o || (o = p.displayName || p.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
62
62
|
case se:
|
|
@@ -82,16 +82,16 @@ function Ie() {
|
|
|
82
82
|
}
|
|
83
83
|
if (p) {
|
|
84
84
|
p = console;
|
|
85
|
-
var x = p.error,
|
|
85
|
+
var x = p.error, w = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
86
86
|
return x.call(
|
|
87
87
|
p,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
89
|
+
w
|
|
90
90
|
), t(o);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function n(o) {
|
|
94
|
-
if (o ===
|
|
94
|
+
if (o === A) return "<>";
|
|
95
95
|
if (typeof o == "object" && o !== null && o.$$typeof === H)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
@@ -109,7 +109,7 @@ function Ie() {
|
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
111
|
function i(o) {
|
|
112
|
-
if (
|
|
112
|
+
if (j.call(o, "key")) {
|
|
113
113
|
var p = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
114
114
|
if (p && p.isReactWarning) return !1;
|
|
115
115
|
}
|
|
@@ -133,15 +133,15 @@ function Ie() {
|
|
|
133
133
|
"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."
|
|
134
134
|
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
135
135
|
}
|
|
136
|
-
function d(o, p, x,
|
|
137
|
-
var
|
|
136
|
+
function d(o, p, x, w, $, R) {
|
|
137
|
+
var y = x.ref;
|
|
138
138
|
return o = {
|
|
139
|
-
$$typeof:
|
|
139
|
+
$$typeof: k,
|
|
140
140
|
type: o,
|
|
141
141
|
key: p,
|
|
142
142
|
props: x,
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
143
|
+
_owner: w
|
|
144
|
+
}, (y !== void 0 ? y : null) !== null ? Object.defineProperty(o, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
146
|
get: u
|
|
147
147
|
}) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
@@ -158,69 +158,69 @@ function Ie() {
|
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
161
|
+
value: $
|
|
162
162
|
}), Object.defineProperty(o, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
166
|
+
value: R
|
|
167
167
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
168
168
|
}
|
|
169
|
-
function h(o, p, x,
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (z(
|
|
174
|
-
for (
|
|
175
|
-
g(w
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function h(o, p, x, w, $, R) {
|
|
170
|
+
var y = p.children;
|
|
171
|
+
if (y !== void 0)
|
|
172
|
+
if (w)
|
|
173
|
+
if (z(y)) {
|
|
174
|
+
for (w = 0; w < y.length; w++)
|
|
175
|
+
g(y[w]);
|
|
176
|
+
Object.freeze && Object.freeze(y);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
|
-
else g(
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var
|
|
181
|
+
else g(y);
|
|
182
|
+
if (j.call(p, "key")) {
|
|
183
|
+
y = e(o);
|
|
184
|
+
var O = Object.keys(p).filter(function(Ve) {
|
|
185
185
|
return Ve !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
w = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", T[y + w] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
y,
|
|
195
194
|
w,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
y,
|
|
196
|
+
O,
|
|
197
|
+
y
|
|
198
|
+
), T[y + w] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
200
|
+
if (y = null, x !== void 0 && (r(x), y = "" + x), i(p) && (r(p.key), y = "" + p.key), "key" in p) {
|
|
201
201
|
x = {};
|
|
202
202
|
for (var ae in p)
|
|
203
203
|
ae !== "key" && (x[ae] = p[ae]);
|
|
204
204
|
} else x = p;
|
|
205
|
-
return
|
|
205
|
+
return y && c(
|
|
206
206
|
x,
|
|
207
207
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
208
208
|
), d(
|
|
209
209
|
o,
|
|
210
|
-
|
|
210
|
+
y,
|
|
211
211
|
x,
|
|
212
212
|
a(),
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
$,
|
|
214
|
+
R
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
217
|
function g(o) {
|
|
218
218
|
v(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === H && (o._payload.status === "fulfilled" ? v(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
|
|
219
219
|
}
|
|
220
220
|
function v(o) {
|
|
221
|
-
return typeof o == "object" && o !== null && o.$$typeof ===
|
|
221
|
+
return typeof o == "object" && o !== null && o.$$typeof === k;
|
|
222
222
|
}
|
|
223
|
-
var E = Ae,
|
|
223
|
+
var E = Ae, k = /* @__PURE__ */ Symbol.for("react.transitional.element"), q = /* @__PURE__ */ Symbol.for("react.portal"), A = /* @__PURE__ */ Symbol.for("react.fragment"), N = /* @__PURE__ */ Symbol.for("react.strict_mode"), B = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), re = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), M = /* @__PURE__ */ Symbol.for("react.suspense"), ne = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), H = /* @__PURE__ */ Symbol.for("react.lazy"), J = /* @__PURE__ */ Symbol.for("react.activity"), _ = /* @__PURE__ */ Symbol.for("react.client.reference"), G = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, z = Array.isArray, V = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
226
|
E = {
|
|
@@ -231,26 +231,26 @@ React keys must be passed directly to JSX without using spread:
|
|
|
231
231
|
var X, W = {}, f = E.react_stack_bottom_frame.bind(
|
|
232
232
|
E,
|
|
233
233
|
s
|
|
234
|
-
)(), m =
|
|
235
|
-
Y.Fragment =
|
|
236
|
-
var
|
|
234
|
+
)(), m = V(n(s)), T = {};
|
|
235
|
+
Y.Fragment = A, Y.jsx = function(o, p, x) {
|
|
236
|
+
var w = 1e4 > G.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return h(
|
|
238
238
|
o,
|
|
239
239
|
p,
|
|
240
240
|
x,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
w ? Error("react-stack-top-frame") : f,
|
|
243
|
+
w ? V(n(o)) : m
|
|
244
244
|
);
|
|
245
245
|
}, Y.jsxs = function(o, p, x) {
|
|
246
|
-
var
|
|
246
|
+
var w = 1e4 > G.recentlyCreatedOwnerStacks++;
|
|
247
247
|
return h(
|
|
248
248
|
o,
|
|
249
249
|
p,
|
|
250
250
|
x,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
w ? Error("react-stack-top-frame") : f,
|
|
253
|
+
w ? V(n(o)) : m
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
256
|
})()), Y;
|
|
@@ -325,8 +325,8 @@ const Ne = {
|
|
|
325
325
|
updateSuccess: "Estado actualizado correctamente.",
|
|
326
326
|
navigating: "Redirigiendo a revisión..."
|
|
327
327
|
}
|
|
328
|
-
}, be =
|
|
329
|
-
const e =
|
|
328
|
+
}, be = Le(void 0), De = () => {
|
|
329
|
+
const e = Ge(be);
|
|
330
330
|
if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
|
|
331
331
|
return e;
|
|
332
332
|
}, Ft = ({ children: e, language: t = "es", apiKey: r, baseUrl: n = "https://view-gate.vercel.app" }) => {
|
|
@@ -366,7 +366,7 @@ const He = /* @__PURE__ */ (() => {
|
|
|
366
366
|
);
|
|
367
367
|
return () => (e += 1, `u${t()}${e}`);
|
|
368
368
|
})();
|
|
369
|
-
function
|
|
369
|
+
function P(e) {
|
|
370
370
|
const t = [];
|
|
371
371
|
for (let r = 0, n = e.length; r < n; r++)
|
|
372
372
|
t.push(e[r]);
|
|
@@ -374,7 +374,7 @@ function O(e) {
|
|
|
374
374
|
}
|
|
375
375
|
let I = null;
|
|
376
376
|
function Ee(e = {}) {
|
|
377
|
-
return I || (e.includeStyleProperties ? (I = e.includeStyleProperties, I) : (I =
|
|
377
|
+
return I || (e.includeStyleProperties ? (I = e.includeStyleProperties, I) : (I = P(window.getComputedStyle(document.documentElement)), I));
|
|
378
378
|
}
|
|
379
379
|
function Q(e, t) {
|
|
380
380
|
const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
@@ -557,7 +557,7 @@ async function lt(e, t, r) {
|
|
|
557
557
|
if (Re(t))
|
|
558
558
|
return t;
|
|
559
559
|
let s = [];
|
|
560
|
-
return ct(e) && e.assignedNodes ? s =
|
|
560
|
+
return ct(e) && e.assignedNodes ? s = P(e.assignedNodes()) : b(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = P(e.contentDocument.body.childNodes) : s = P(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || b(e, HTMLVideoElement) || await s.reduce((i, c) => i.then(() => te(c, r)).then((u) => {
|
|
561
561
|
u && t.appendChild(u);
|
|
562
562
|
}), Promise.resolve()), t;
|
|
563
563
|
}
|
|
@@ -678,7 +678,7 @@ async function Et(e, t) {
|
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
async function St(e, t) {
|
|
681
|
-
const n =
|
|
681
|
+
const n = P(e.childNodes).map((a) => Oe(a, t));
|
|
682
682
|
await Promise.all(n).then(() => e);
|
|
683
683
|
}
|
|
684
684
|
async function Oe(e, t) {
|
|
@@ -739,7 +739,7 @@ async function Rt(e, t) {
|
|
|
739
739
|
return e.forEach((a) => {
|
|
740
740
|
if ("cssRules" in a)
|
|
741
741
|
try {
|
|
742
|
-
|
|
742
|
+
P(a.cssRules || []).forEach((s, i) => {
|
|
743
743
|
if (s.type === CSSRule.IMPORT_RULE) {
|
|
744
744
|
let c = i + 1;
|
|
745
745
|
const u = s.href, d = ye(u).then((h) => we(h, t)).then((h) => ve(h).forEach((g) => {
|
|
@@ -768,7 +768,7 @@ async function Rt(e, t) {
|
|
|
768
768
|
}), Promise.all(n).then(() => (e.forEach((a) => {
|
|
769
769
|
if ("cssRules" in a)
|
|
770
770
|
try {
|
|
771
|
-
|
|
771
|
+
P(a.cssRules || []).forEach((s) => {
|
|
772
772
|
r.push(s);
|
|
773
773
|
});
|
|
774
774
|
} catch (s) {
|
|
@@ -782,7 +782,7 @@ function kt(e) {
|
|
|
782
782
|
async function jt(e, t) {
|
|
783
783
|
if (e.ownerDocument == null)
|
|
784
784
|
throw new Error("Provided element is not within a Document");
|
|
785
|
-
const r =
|
|
785
|
+
const r = P(e.ownerDocument.styleSheets), n = await Rt(r, t);
|
|
786
786
|
return kt(n);
|
|
787
787
|
}
|
|
788
788
|
function Pe(e) {
|
|
@@ -825,7 +825,7 @@ async function Vt(e, t = {}) {
|
|
|
825
825
|
async function At(e, t = {}) {
|
|
826
826
|
return (await Vt(e, t)).toDataURL();
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Lt = (e) => {
|
|
829
829
|
const r = Object.keys(e).find((s) => s.startsWith("__reactFiber$") || s.startsWith("__reactInternalInstance$"));
|
|
830
830
|
if (!r) return "";
|
|
831
831
|
const n = [];
|
|
@@ -839,7 +839,7 @@ const Gt = (e) => {
|
|
|
839
839
|
a = a.return;
|
|
840
840
|
}
|
|
841
841
|
return n.join(" > ") || "Generic Component";
|
|
842
|
-
},
|
|
842
|
+
}, Gt = (e) => {
|
|
843
843
|
let t = "unknown:0", r = e;
|
|
844
844
|
for (; r; ) {
|
|
845
845
|
const d = r.getAttribute("data-source-path");
|
|
@@ -849,7 +849,7 @@ const Gt = (e) => {
|
|
|
849
849
|
}
|
|
850
850
|
r = r.parentElement;
|
|
851
851
|
}
|
|
852
|
-
const n =
|
|
852
|
+
const n = Lt(e), s = ((d) => {
|
|
853
853
|
const h = [];
|
|
854
854
|
let g = d;
|
|
855
855
|
for (; g && g.nodeType === Node.ELEMENT_NODE; ) {
|
|
@@ -858,10 +858,10 @@ const Gt = (e) => {
|
|
|
858
858
|
v += "#" + g.id, h.unshift(v);
|
|
859
859
|
break;
|
|
860
860
|
} else {
|
|
861
|
-
let E = g,
|
|
861
|
+
let E = g, k = 1;
|
|
862
862
|
for (; E.previousElementSibling; )
|
|
863
|
-
E = E.previousElementSibling, E.nodeName.toLowerCase() === v &&
|
|
864
|
-
|
|
863
|
+
E = E.previousElementSibling, E.nodeName.toLowerCase() === v && k++;
|
|
864
|
+
k > 1 && (v += `:nth-of-type(${k})`);
|
|
865
865
|
}
|
|
866
866
|
h.unshift(v), g = g.parentElement;
|
|
867
867
|
}
|
|
@@ -890,7 +890,7 @@ const Gt = (e) => {
|
|
|
890
890
|
}
|
|
891
891
|
};
|
|
892
892
|
}, $t = () => {
|
|
893
|
-
const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, h] = C(null), [g, v] = C(""), [E,
|
|
893
|
+
const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, h] = C(null), [g, v] = C(""), [E, k] = C(!1), [q, A] = C(!1), [N, B] = C(!1), [D, re] = C([]), [L, M] = C(null), [ne, se] = C(!1), [H, J] = C(!1), [_, G] = C(null), j = oe(async () => {
|
|
894
894
|
if (n) {
|
|
895
895
|
J(!0);
|
|
896
896
|
try {
|
|
@@ -912,37 +912,37 @@ const Gt = (e) => {
|
|
|
912
912
|
const f = () => {
|
|
913
913
|
const m = window.location.hash;
|
|
914
914
|
if (m.includes("vg_hl=")) {
|
|
915
|
-
const
|
|
916
|
-
if (
|
|
917
|
-
const
|
|
918
|
-
[100, 500, 1e3, 2e3].forEach((
|
|
915
|
+
const o = m.split("vg_hl=")[1];
|
|
916
|
+
if (!o) return;
|
|
917
|
+
const p = decodeURIComponent(o);
|
|
918
|
+
[100, 500, 1e3, 2e3].forEach((w) => {
|
|
919
919
|
setTimeout(() => {
|
|
920
|
-
const
|
|
921
|
-
for (const R of
|
|
922
|
-
if (R.tagName.toLowerCase() ===
|
|
923
|
-
const
|
|
924
|
-
if (
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
920
|
+
const $ = document.querySelectorAll("*");
|
|
921
|
+
for (const R of $)
|
|
922
|
+
if (R.tagName.toLowerCase() === p.split("-")[0]) {
|
|
923
|
+
const y = R.getBoundingClientRect();
|
|
924
|
+
if (y.width > 0 && y.height > 0) {
|
|
925
|
+
const O = (R.innerText || "").slice(0, 50).trim().replace(/\s+/g, "_");
|
|
926
|
+
if (p.includes(O)) {
|
|
927
927
|
R.classList.add("vg-highlight-active"), G(R), R.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
928
928
|
break;
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
-
},
|
|
932
|
+
}, w);
|
|
933
933
|
});
|
|
934
934
|
}
|
|
935
935
|
};
|
|
936
936
|
return f(), window.addEventListener("hashchange", f), () => window.removeEventListener("hashchange", f);
|
|
937
937
|
}, []), Z(() => {
|
|
938
|
-
if (!
|
|
938
|
+
if (!_) return;
|
|
939
939
|
const f = () => {
|
|
940
|
-
|
|
940
|
+
_.classList.remove("vg-highlight-active"), G(null), window.history.replaceState && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
941
941
|
};
|
|
942
|
-
return
|
|
943
|
-
}, [
|
|
944
|
-
|
|
945
|
-
}, [
|
|
942
|
+
return _.addEventListener("mouseover", f), () => _.removeEventListener("mouseover", f);
|
|
943
|
+
}, [_]), Z(() => {
|
|
944
|
+
j();
|
|
945
|
+
}, [j]);
|
|
946
946
|
const z = oe((f) => {
|
|
947
947
|
if (!s || d) return;
|
|
948
948
|
const m = document.elementFromPoint(f.clientX, f.clientY);
|
|
@@ -956,39 +956,38 @@ const Gt = (e) => {
|
|
|
956
956
|
rect: m.getBoundingClientRect(),
|
|
957
957
|
element: m,
|
|
958
958
|
previewText: (m.innerText || "").slice(0, 100) || (m.getAttribute("placeholder") || "").slice(0, 100) || m.tagName.toLowerCase(),
|
|
959
|
-
semanticReference:
|
|
959
|
+
semanticReference: Gt(m)
|
|
960
960
|
});
|
|
961
|
-
}, [s, d]),
|
|
961
|
+
}, [s, d]), V = oe(async (f) => {
|
|
962
962
|
if (!(!s || d) && c) {
|
|
963
|
-
f.preventDefault(), f.stopPropagation(),
|
|
963
|
+
f.preventDefault(), f.stopPropagation(), A(!0);
|
|
964
964
|
try {
|
|
965
|
-
const m = c.element.style.display,
|
|
966
|
-
|
|
965
|
+
const m = c.element.style.display, T = window.getComputedStyle(c.element).display === "inline";
|
|
966
|
+
T && (c.element.style.display = "inline-block");
|
|
967
967
|
const o = await At(c.element, {
|
|
968
|
-
backgroundColor: "#ffffff",
|
|
969
968
|
pixelRatio: 2,
|
|
970
|
-
skipFonts: !
|
|
969
|
+
skipFonts: !1,
|
|
970
|
+
cacheBust: !0,
|
|
971
971
|
style: {
|
|
972
972
|
margin: "0",
|
|
973
973
|
padding: "4px"
|
|
974
|
-
// Extra padding for better look
|
|
975
974
|
}
|
|
976
975
|
});
|
|
977
|
-
|
|
976
|
+
T && (c.element.style.display = m), h({ ...c, visualPreview: o });
|
|
978
977
|
} catch (m) {
|
|
979
978
|
console.error("Failed to capture preview:", m), h(c);
|
|
980
979
|
} finally {
|
|
981
|
-
|
|
980
|
+
A(!1), u(null);
|
|
982
981
|
}
|
|
983
982
|
}
|
|
984
983
|
}, [s, c, d, N]);
|
|
985
|
-
Z(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", z), window.addEventListener("click",
|
|
986
|
-
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", z), window.removeEventListener("click",
|
|
987
|
-
}), [s, d, z,
|
|
984
|
+
Z(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", z), window.addEventListener("click", V, !0), () => {
|
|
985
|
+
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", z), window.removeEventListener("click", V, !0);
|
|
986
|
+
}), [s, d, z, V]);
|
|
988
987
|
const X = async () => {
|
|
989
988
|
if (!d || !g.trim()) return;
|
|
990
|
-
|
|
991
|
-
const { semanticReference: f } = d, [m,
|
|
989
|
+
k(!0);
|
|
990
|
+
const { semanticReference: f } = d, [m, T] = f.source.split(":"), o = T || "0";
|
|
992
991
|
try {
|
|
993
992
|
if (!(await fetch(`${a}/api/annotations`, {
|
|
994
993
|
method: "POST",
|
|
@@ -1005,15 +1004,15 @@ const Gt = (e) => {
|
|
|
1005
1004
|
reference: f
|
|
1006
1005
|
})
|
|
1007
1006
|
})).ok) throw new Error("Backend failed");
|
|
1008
|
-
e(r.success, "success"), h(null), v(""), i(!1),
|
|
1007
|
+
e(r.success, "success"), h(null), v(""), i(!1), j();
|
|
1009
1008
|
} catch (p) {
|
|
1010
1009
|
console.error(p), e(r.error, "error");
|
|
1011
1010
|
} finally {
|
|
1012
|
-
|
|
1011
|
+
k(!1);
|
|
1013
1012
|
}
|
|
1014
1013
|
}, W = (f) => f.split("/").pop()?.split("\\").pop() || "unknown";
|
|
1015
1014
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
1016
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1015
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:345", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
|
|
1017
1016
|
/* @__PURE__ */ l.jsx(
|
|
1018
1017
|
"button",
|
|
1019
1018
|
{
|
|
@@ -1036,7 +1035,7 @@ const Gt = (e) => {
|
|
|
1036
1035
|
"view-comments"
|
|
1037
1036
|
)
|
|
1038
1037
|
] }),
|
|
1039
|
-
q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1038
|
+
q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:371", style: {
|
|
1040
1039
|
position: "fixed",
|
|
1041
1040
|
top: 0,
|
|
1042
1041
|
left: 0,
|
|
@@ -1048,11 +1047,11 @@ const Gt = (e) => {
|
|
|
1048
1047
|
justifyContent: "center",
|
|
1049
1048
|
zIndex: 1e5,
|
|
1050
1049
|
cursor: "wait"
|
|
1051
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1052
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1050
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:384", className: "vg-glassmorphism", style: { padding: "30px 50px", fontWeight: 700, display: "flex", flexDirection: "column", alignItems: "center", backgroundColor: "rgba(0,0,0,0.7)", color: "white", border: "1px solid rgba(255,255,255,0.1)" }, children: [
|
|
1051
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:385", className: "vg-spinner" }),
|
|
1053
1052
|
"Capturing..."
|
|
1054
1053
|
] }) }),
|
|
1055
|
-
s && c && !d && !q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1054
|
+
s && c && !d && !q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:393", style: {
|
|
1056
1055
|
position: "fixed",
|
|
1057
1056
|
top: c.rect.top,
|
|
1058
1057
|
left: c.rect.left,
|
|
@@ -1066,7 +1065,7 @@ const Gt = (e) => {
|
|
|
1066
1065
|
boxShadow: "0 0 15px rgba(37, 19, 236, 0.2)",
|
|
1067
1066
|
transition: "all 0.1s ease-out"
|
|
1068
1067
|
} }),
|
|
1069
|
-
d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1068
|
+
d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:411", className: "vg-animate-fade", style: {
|
|
1070
1069
|
position: "fixed",
|
|
1071
1070
|
top: 0,
|
|
1072
1071
|
left: 0,
|
|
@@ -1078,52 +1077,49 @@ const Gt = (e) => {
|
|
|
1078
1077
|
alignItems: "center",
|
|
1079
1078
|
justifyContent: "center",
|
|
1080
1079
|
zIndex: 99999
|
|
1081
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1080
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:424", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1082
1081
|
padding: "32px",
|
|
1083
1082
|
width: "460px",
|
|
1084
1083
|
background: "white",
|
|
1085
1084
|
color: "#0f172a"
|
|
1086
1085
|
}, children: [
|
|
1087
|
-
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1088
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1089
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1090
|
-
d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1086
|
+
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:430", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
|
|
1087
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:432", style: { marginBottom: "20px" }, children: [
|
|
1088
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:433", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
|
|
1089
|
+
d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:435", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
|
|
1091
1090
|
"📦 ",
|
|
1092
1091
|
d.tag
|
|
1093
|
-
] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1094
|
-
d.semanticReference.source && !d.semanticReference.source.startsWith("unknown") ? /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1092
|
+
] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:439", className: "vg-badge", children: d.tag }),
|
|
1093
|
+
d.semanticReference.source && !d.semanticReference.source.startsWith("unknown") ? /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:444", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
|
|
1095
1094
|
"📄 ",
|
|
1096
1095
|
W(d.semanticReference.source.split(":")[0] || "unknown")
|
|
1097
|
-
] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1096
|
+
] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:449", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
|
|
1098
1097
|
"🆔 ",
|
|
1099
1098
|
d.semanticReference.signature
|
|
1100
1099
|
] })
|
|
1101
1100
|
] }),
|
|
1102
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1101
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:454", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
|
|
1103
1102
|
"🎯 ",
|
|
1104
1103
|
d.semanticReference.selector
|
|
1105
1104
|
] })
|
|
1106
1105
|
] }),
|
|
1107
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1117
|
-
|
|
1118
|
-
|
|
1106
|
+
d.visualPreview && /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:461", style: { marginBottom: "24px" }, children: [
|
|
1107
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:462", style: {
|
|
1108
|
+
fontSize: "11px",
|
|
1109
|
+
fontWeight: 800,
|
|
1110
|
+
textTransform: "uppercase",
|
|
1111
|
+
color: "#94a3b8",
|
|
1112
|
+
letterSpacing: "0.05em",
|
|
1113
|
+
marginBottom: "10px"
|
|
1114
|
+
}, children: r.preview }),
|
|
1115
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:472", style: {
|
|
1116
|
+
border: "1px dashed #e2e8f0",
|
|
1117
|
+
borderRadius: "10px",
|
|
1118
|
+
padding: "16px",
|
|
1119
1119
|
display: "flex",
|
|
1120
1120
|
justifyContent: "center",
|
|
1121
|
-
alignItems: "center",
|
|
1122
|
-
minHeight: "100px",
|
|
1123
|
-
maxHeight: "200px",
|
|
1124
|
-
overflow: "hidden",
|
|
1125
1121
|
backgroundColor: "#fdfdfd"
|
|
1126
|
-
}, children:
|
|
1122
|
+
}, children: /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:480", style: {
|
|
1127
1123
|
position: "relative",
|
|
1128
1124
|
width: "100%",
|
|
1129
1125
|
height: "100%",
|
|
@@ -1145,11 +1141,7 @@ const Gt = (e) => {
|
|
|
1145
1141
|
backgroundColor: "white"
|
|
1146
1142
|
}
|
|
1147
1143
|
}
|
|
1148
|
-
) })
|
|
1149
|
-
'"',
|
|
1150
|
-
d.previewText,
|
|
1151
|
-
'"'
|
|
1152
|
-
] }) })
|
|
1144
|
+
) }) })
|
|
1153
1145
|
] }),
|
|
1154
1146
|
/* @__PURE__ */ l.jsx(
|
|
1155
1147
|
"textarea",
|
|
@@ -1162,7 +1154,7 @@ const Gt = (e) => {
|
|
|
1162
1154
|
autoFocus: !0
|
|
1163
1155
|
}
|
|
1164
1156
|
),
|
|
1165
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1157
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:515", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
|
|
1166
1158
|
/* @__PURE__ */ l.jsx(
|
|
1167
1159
|
"button",
|
|
1168
1160
|
{
|
|
@@ -1183,7 +1175,7 @@ const Gt = (e) => {
|
|
|
1183
1175
|
)
|
|
1184
1176
|
] })
|
|
1185
1177
|
] }) }),
|
|
1186
|
-
N && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1178
|
+
N && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:537", className: "vg-animate-fade", style: {
|
|
1187
1179
|
position: "fixed",
|
|
1188
1180
|
top: 0,
|
|
1189
1181
|
left: 0,
|
|
@@ -1195,7 +1187,7 @@ const Gt = (e) => {
|
|
|
1195
1187
|
alignItems: "center",
|
|
1196
1188
|
justifyContent: "center",
|
|
1197
1189
|
zIndex: 99999
|
|
1198
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1190
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:550", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1199
1191
|
padding: "32px",
|
|
1200
1192
|
width: "600px",
|
|
1201
1193
|
maxHeight: "80vh",
|
|
@@ -1204,46 +1196,46 @@ const Gt = (e) => {
|
|
|
1204
1196
|
display: "flex",
|
|
1205
1197
|
flexDirection: "column"
|
|
1206
1198
|
}, children: [
|
|
1207
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1208
|
-
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1209
|
-
/* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1199
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:559", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
|
|
1200
|
+
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:560", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
|
|
1201
|
+
/* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:561", onClick: () => B(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
|
|
1210
1202
|
] }),
|
|
1211
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1203
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:564", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: H ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:566", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : D.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:568", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : D.map((f) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:571", style: {
|
|
1212
1204
|
border: "1px solid #e2e8f0",
|
|
1213
1205
|
borderRadius: "12px",
|
|
1214
1206
|
padding: "16px",
|
|
1215
1207
|
backgroundColor: f.status === "ready_for_review" ? "#f0fdf4" : "#fff"
|
|
1216
1208
|
}, children: [
|
|
1217
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1218
|
-
f.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1209
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:577", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:578", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
|
|
1210
|
+
f.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:580", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
|
|
1219
1211
|
"✓ ",
|
|
1220
1212
|
r.readyForReview
|
|
1221
|
-
] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1213
|
+
] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:582", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
|
|
1222
1214
|
"⏳ ",
|
|
1223
1215
|
r.pending
|
|
1224
1216
|
] }),
|
|
1225
|
-
/* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1217
|
+
/* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:584", style: { fontSize: "12px", color: "#64748b" }, children: new Date(f.timestamp).toLocaleString() })
|
|
1226
1218
|
] }) }),
|
|
1227
|
-
/* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1219
|
+
/* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:590", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
|
|
1228
1220
|
'"',
|
|
1229
1221
|
f.message,
|
|
1230
1222
|
'"'
|
|
1231
1223
|
] }),
|
|
1232
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1233
|
-
/* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1224
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:592", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
|
|
1225
|
+
/* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:593", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
|
|
1234
1226
|
"📦 ",
|
|
1235
1227
|
f.componentName?.split(" > ").pop() || "UI Element"
|
|
1236
1228
|
] }),
|
|
1237
|
-
f.filePath && f.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1229
|
+
f.filePath && f.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:597", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
|
|
1238
1230
|
"📄 ",
|
|
1239
1231
|
W(f.filePath)
|
|
1240
1232
|
] })
|
|
1241
1233
|
] }),
|
|
1242
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1234
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:603", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
|
|
1243
1235
|
f.status === "pending" ? /* @__PURE__ */ l.jsxs(
|
|
1244
1236
|
"button",
|
|
1245
1237
|
{
|
|
1246
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1238
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:605",
|
|
1247
1239
|
className: "vg-button-primary",
|
|
1248
1240
|
style: { display: "flex", alignItems: "center", gap: "6px" },
|
|
1249
1241
|
onClick: async () => {
|
|
@@ -1252,7 +1244,7 @@ const Gt = (e) => {
|
|
|
1252
1244
|
method: "PATCH",
|
|
1253
1245
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
1254
1246
|
body: JSON.stringify({ status: "ready_for_review" })
|
|
1255
|
-
})).ok && (
|
|
1247
|
+
})).ok && (j(), e(r.updateSuccess, "success"));
|
|
1256
1248
|
} catch {
|
|
1257
1249
|
e(r.error, "error");
|
|
1258
1250
|
}
|
|
@@ -1265,7 +1257,7 @@ const Gt = (e) => {
|
|
|
1265
1257
|
) : /* @__PURE__ */ l.jsxs(
|
|
1266
1258
|
"button",
|
|
1267
1259
|
{
|
|
1268
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1260
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:627",
|
|
1269
1261
|
className: "vg-button-ghost",
|
|
1270
1262
|
style: { display: "flex", alignItems: "center", gap: "6px" },
|
|
1271
1263
|
onClick: async () => {
|
|
@@ -1274,7 +1266,7 @@ const Gt = (e) => {
|
|
|
1274
1266
|
method: "PATCH",
|
|
1275
1267
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
1276
1268
|
body: JSON.stringify({ status: "pending" })
|
|
1277
|
-
})).ok && (
|
|
1269
|
+
})).ok && (j(), e(r.updateSuccess, "success"));
|
|
1278
1270
|
} catch {
|
|
1279
1271
|
e(r.error, "error");
|
|
1280
1272
|
}
|
|
@@ -1288,7 +1280,7 @@ const Gt = (e) => {
|
|
|
1288
1280
|
/* @__PURE__ */ l.jsxs(
|
|
1289
1281
|
"button",
|
|
1290
1282
|
{
|
|
1291
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1283
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:650",
|
|
1292
1284
|
className: "vg-button-ghost",
|
|
1293
1285
|
style: { display: "flex", alignItems: "center", gap: "6px" },
|
|
1294
1286
|
onClick: () => {
|
|
@@ -1309,7 +1301,7 @@ const Gt = (e) => {
|
|
|
1309
1301
|
/* @__PURE__ */ l.jsxs(
|
|
1310
1302
|
"button",
|
|
1311
1303
|
{
|
|
1312
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1304
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:667",
|
|
1313
1305
|
className: "vg-button-primary",
|
|
1314
1306
|
style: { backgroundColor: "#ef4444", display: "flex", alignItems: "center", gap: "6px" },
|
|
1315
1307
|
onClick: () => {
|
|
@@ -1321,7 +1313,7 @@ const Gt = (e) => {
|
|
|
1321
1313
|
(await fetch(`${a}/api/annotations/${f._id}`, {
|
|
1322
1314
|
method: "DELETE",
|
|
1323
1315
|
headers: { "x-api-key": n }
|
|
1324
|
-
})).ok && (
|
|
1316
|
+
})).ok && (j(), e(r.deleteSuccess, "success"));
|
|
1325
1317
|
} catch {
|
|
1326
1318
|
e(r.error, "error");
|
|
1327
1319
|
} finally {
|
|
@@ -1339,7 +1331,7 @@ const Gt = (e) => {
|
|
|
1339
1331
|
] })
|
|
1340
1332
|
] }, f._id)) })
|
|
1341
1333
|
] }) }),
|
|
1342
|
-
ne && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1334
|
+
ne && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:706", style: {
|
|
1343
1335
|
position: "fixed",
|
|
1344
1336
|
top: 0,
|
|
1345
1337
|
left: 0,
|
|
@@ -1352,11 +1344,11 @@ const Gt = (e) => {
|
|
|
1352
1344
|
zIndex: 3e5,
|
|
1353
1345
|
backdropFilter: "blur(10px)",
|
|
1354
1346
|
color: "white"
|
|
1355
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1356
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1357
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1347
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:720", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
|
|
1348
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:721", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
|
|
1349
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:722", style: { fontSize: "18px", fontWeight: 600, letterSpacing: "0.5px" }, children: r.navigating })
|
|
1358
1350
|
] }) }),
|
|
1359
|
-
|
|
1351
|
+
L && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:729", className: "vg-animate-fade", style: {
|
|
1360
1352
|
position: "fixed",
|
|
1361
1353
|
top: 0,
|
|
1362
1354
|
left: 0,
|
|
@@ -1368,20 +1360,20 @@ const Gt = (e) => {
|
|
|
1368
1360
|
alignItems: "center",
|
|
1369
1361
|
justifyContent: "center",
|
|
1370
1362
|
zIndex: 2e5
|
|
1371
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1363
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:742", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1372
1364
|
padding: "32px",
|
|
1373
1365
|
width: "400px",
|
|
1374
1366
|
background: "white",
|
|
1375
1367
|
textAlign: "center"
|
|
1376
1368
|
}, children: [
|
|
1377
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1378
|
-
/* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1379
|
-
/* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1380
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1369
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:748", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
|
|
1370
|
+
/* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:749", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: L.title }),
|
|
1371
|
+
/* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:750", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: L.message }),
|
|
1372
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:752", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
|
|
1381
1373
|
/* @__PURE__ */ l.jsx(
|
|
1382
1374
|
"button",
|
|
1383
1375
|
{
|
|
1384
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1376
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:753",
|
|
1385
1377
|
className: "vg-button-ghost",
|
|
1386
1378
|
onClick: () => M(null),
|
|
1387
1379
|
style: { flex: 1 },
|
|
@@ -1391,10 +1383,10 @@ const Gt = (e) => {
|
|
|
1391
1383
|
/* @__PURE__ */ l.jsx(
|
|
1392
1384
|
"button",
|
|
1393
1385
|
{
|
|
1394
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1386
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:760",
|
|
1395
1387
|
className: "vg-button-primary",
|
|
1396
1388
|
style: { backgroundColor: "#ef4444", flex: 1 },
|
|
1397
|
-
onClick:
|
|
1389
|
+
onClick: L.onConfirm,
|
|
1398
1390
|
children: r.yes
|
|
1399
1391
|
}
|
|
1400
1392
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
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;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}@keyframes vg-pop-in{0%{transform:scale(.9) translateY(10px);opacity:0}to{transform:scale(1) translateY(0);opacity:1}}.vg-button-appear{animation:vg-pop-in .4s cubic-bezier(.34,1.56,.64,1) forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-pulse-green{0%{box-shadow:0 0 #10b981b3;border-color:#10b981}70%{box-shadow:0 0 0 15px #10b98100;border-color:#10b981}to{box-shadow:0 0 #10b98100;border-color:#10b981}}.vg-highlight-active{animation:vg-pulse-green 2s infinite!important;outline:4px solid #10b981!important;outline-offset:2px!important;transition:all .3s ease!important;position:relative!important;z-index:9999!important}.vg-highlight-active:after{content:"✓ Revised";position:absolute;top:-25px;left:0;background:#10b981;color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:800;text-transform:uppercase;white-space:nowrap;pointer-events:none}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
(function(R,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],g):(R=typeof globalThis<"u"?globalThis:R||self,g(R.ViewGateWrapper={},R.React))})(this,(function(R,g){"use strict";var J={exports:{}},M={};var de;function Ae(){if(de)return M;de=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:s}}return M.Fragment=t,M.jsx=r,M.jsxs=r,M}var H={};var fe;function Ge(){return fe||(fe=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===
|
|
2
|
+
(function(R,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],g):(R=typeof globalThis<"u"?globalThis:R||self,g(R.ViewGateWrapper={},R.React))})(this,(function(R,g){"use strict";var J={exports:{}},M={};var de;function Ae(){if(de)return M;de=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:s}}return M.Fragment=t,M.jsx=r,M.jsxs=r,M}var H={};var fe;function Ge(){return fe||(fe=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===V?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case I:return"Fragment";case q:return"Profiler";case W:return"StrictMode";case U:return"Suspense";case ce:return"SuspenseList";case ee:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case Q:return"Portal";case ie:return o.displayName||"Context";case z:return(o._context.displayName||"Context")+".Consumer";case F:var p=o.render;return o=o.displayName,o||(o=p.displayName||p.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case le:return p=o.displayName||null,p!==null?p:e(o.type)||"Memo";case $:p=o._payload,o=o._init;try{return e(o(p))}catch{}}return null}function t(o){return""+o}function r(o){try{t(o);var p=!1}catch{p=!0}if(p){p=console;var x=p.error,v=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return x.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",v),t(o)}}function n(o){if(o===I)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===$)return"<...>";try{var p=e(o);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function a(){var o=N.A;return o===null?null:o.getOwner()}function s(){return Error("react-stack-top-frame")}function i(o){if(T.call(o,"key")){var p=Object.getOwnPropertyDescriptor(o,"key").get;if(p&&p.isReactWarning)return!1}return o.key!==void 0}function c(o,p){function x(){te||(te=!0,console.error("%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)",p))}x.isReactWarning=!0,Object.defineProperty(o,"key",{get:x,configurable:!0})}function u(){var o=e(this.type);return B[o]||(B[o]=!0,console.error("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.")),o=this.props.ref,o!==void 0?o:null}function d(o,p,x,v,D,k){var w=x.ref;return o={$$typeof:j,type:o,key:p,props:x,_owner:v},(w!==void 0?w:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:u}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function h(o,p,x,v,D,k){var w=p.children;if(w!==void 0)if(v)if(Y(w)){for(v=0;v<w.length;v++)y(w[v]);Object.freeze&&Object.freeze(w)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(w);if(T.call(p,"key")){w=e(o);var _=Object.keys(p).filter(function(Lt){return Lt!=="key"});v=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",P[w+v]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
3
3
|
let props = %s;
|
|
4
4
|
<%s {...props} />
|
|
5
5
|
React keys must be passed directly to JSX without using spread:
|
|
6
6
|
let props = %s;
|
|
7
|
-
<%s key={someKey} {...props} />`,w,v,D,v),j[v+w]=!0)}if(v=null,y!==void 0&&(r(y),v=""+y),i(p)&&(r(p.key),v=""+p.key),"key"in p){y={};for(var ue in p)ue!=="key"&&(y[ue]=p[ue])}else y=p;return v&&c(y,typeof o=="function"?o.displayName||o.name||"Unknown":o),d(o,v,y,a(),k,N)}function x(o){b(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===$&&(o._payload.status==="fulfilled"?b(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function b(o){return typeof o=="object"&&o!==null&&o.$$typeof===T}var C=g,T=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),F=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,Y=Array.isArray,V=console.createTask?console.createTask:function(){return null};C={react_stack_bottom_frame:function(o){return o()}};var te,B={},f=C.react_stack_bottom_frame.bind(C,s)(),m=V(n(s)),j={};H.Fragment=L,H.jsx=function(o,p,y){var w=1e4>F.recentlyCreatedOwnerStacks++;return h(o,p,y,!1,w?Error("react-stack-top-frame"):f,w?V(n(o)):m)},H.jsxs=function(o,p,y){var w=1e4>F.recentlyCreatedOwnerStacks++;return h(o,p,y,!0,w?Error("react-stack-top-frame"):f,w?V(n(o)):m)}})()),H}var pe;function Le(){return pe||(pe=1,process.env.NODE_ENV==="production"?J.exports=Ae():J.exports=Ge()),J.exports}var l=Le();const Ie={en:{enterMode:"🚀 Enter Feedback Mode",exitMode:"✨ Exit Mode",feedbackHeader:"Feedback",selectedElement:"Selected element:",line:"Line",placeholder:"Tell us what you'd like to change...",cancel:"Cancel",send:"Send Feedback",submitting:"Submitting...",success:"Your feedback has been submitted successfully!",error:"Failed to submit feedback. Check backend connection.",successHeader:"Success",errorHeader:"Error",preview:"Preview",viewComments:"👀 View Comments",close:"Close",observe:"Observe",pending:"Pending",readyForReview:"Ready for Review",noComments:"No comments found.",deleteConfirm:"Are you sure you want to close/delete this comment?",markReady:"Mark as Ready",reopen:"Reopen",review:"Review",confirmDelete:"Are you sure you want to delete this annotation?",yes:"Yes, delete",no:"No, cancel",deleteSuccess:"The annotation has been deleted.",updateSuccess:"Status updated successfully.",navigating:"Redirecting to review..."},es:{enterMode:"🚀 Activar Modo Comentarios",exitMode:"✨ Salir del Modo",feedbackHeader:"Comentarios",selectedElement:"Elemento seleccionado:",line:"Línea",placeholder:"Cuéntanos qué te gustaría cambiar...",cancel:"Cancelar",send:"Enviar Comentarios",submitting:"Enviando...",success:"¡Tus comentarios se han enviado con éxito!",error:"Error al enviar comentarios. Revisa la conexión con el servidor.",successHeader:"Éxito",errorHeader:"Error",preview:"Vista previa",viewComments:"👀 Ver Comentarios",close:"Cerrar",observe:"Observar",pending:"Pendiente",readyForReview:"Lista para revisión",noComments:"No hay comentarios.",deleteConfirm:"¿Estás seguro de que deseas cerrar y eliminar este comentario?",markReady:"Marcar como Listo",reopen:"Reabrir",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar este comentario?",yes:"Sí, eliminar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Estado actualizado correctamente.",navigating:"Redirigiendo a revisión..."}},me=g.createContext(void 0),he=()=>{const e=g.useContext(me);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},Fe=({children:e,language:t="es",apiKey:r,baseUrl:n="https://view-gate.vercel.app"})=>{const[a,s]=g.useState([]),i=(u,d)=>{const h=Date.now();s(x=>[...x,{id:h,message:u,type:d}]),setTimeout(()=>{s(x=>x.filter(b=>b.id!==h))},4e3)},c=Ie[t];return l.jsxs(me.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:136",value:{addToast:i,language:t,t:c,apiKey:r,baseUrl:n},children:[e,l.jsx(Ve,{"data-source-path":"/src/components/ViewGateProvider.tsx:138"}),l.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:139",className:"vg-toasts",children:a.map(u=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:141",className:`vg-toast vg-glassmorphism vg-animate-slide ${u.type}`,children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:142",style:{fontSize:"20px"},children:u.type==="success"?"✅":"❌"}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:143",children:[l.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:144",style:{display:"block"},children:u.type==="success"?c.successHeader:c.errorHeader}),l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:145",style:{fontSize:"14px"},children:u.message})]})]},u.id))})]})};function Ne(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),a=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(a),t&&(n.href=t),a.href=e,a.href}const De=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function P(e){const t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}let A=null;function ge(e={}){return A||(e.includeStyleProperties?(A=e.includeStyleProperties,A):(A=P(window.getComputedStyle(document.documentElement)),A))}function X(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function Me(e){const t=X(e,"border-left-width"),r=X(e,"border-right-width");return e.clientWidth+t+r}function He(e){const t=X(e,"border-top-width"),r=X(e,"border-bottom-width");return e.clientHeight+t+r}function xe(e,t={}){const r=t.width||Me(e),n=t.height||He(e);return{width:r,height:n}}function ze(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const E=16384;function We(e){(e.width>E||e.height>E)&&(e.width>E&&e.height>E?e.width>e.height?(e.height*=E/e.width,e.width=E):(e.width*=E/e.height,e.height=E):e.width>E?(e.height*=E/e.width,e.width=E):(e.width*=E/e.height,e.height=E))}function Z(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function Ue(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function $e(e,t,r){const n="http://www.w3.org/2000/svg",a=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");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),Ue(a)}const S=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||S(r,t)};function Ye(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Be(e,t){return ge(t).map(r=>{const n=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${n}${a?" !important":""};`}).join(" ")}function Je(e,t,r,n){const a=`.${e}:${t}`,s=r.cssText?Ye(r):Be(r,n);return document.createTextNode(`${a}{${s}}`)}function ye(e,t,r,n){const a=window.getComputedStyle(e,r),s=a.getPropertyValue("content");if(s===""||s==="none")return;const i=De();try{t.className=`${t.className} ${i}`}catch{return}const c=document.createElement("style");c.appendChild(Je(i,r,a,n)),t.appendChild(c)}function Xe(e,t,r){ye(e,t,":before",r),ye(e,t,":after",r)}const we="application/font-woff",ve="image/jpeg",Ze={woff:we,woff2:we,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ve,jpeg:ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ke(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function re(e){const t=Ke(e).toLowerCase();return Ze[t]||""}function Qe(e){return e.split(/,/)[1]}function ne(e){return e.search(/^(data:)/)!==-1}function qe(e,t){return`data:${t};base64,${e}`}async function be(e,t,r){const n=await fetch(e,t);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const a=await n.blob();return new Promise((s,i)=>{const c=new FileReader;c.onerror=i,c.onloadend=()=>{try{s(r({res:n,result:c.result}))}catch(u){i(u)}},c.readAsDataURL(a)})}const se={};function et(e,t,r){let n=e.replace(/\?.*/,"");return r&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function ae(e,t,r){const n=et(e,t,r.includeQueryParams);if(se[n]!=null)return se[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await be(e,r.fetchRequestInit,({res:i,result:c})=>(t||(t=i.headers.get("Content-Type")||""),Qe(c)));a=qe(s,t)}catch(s){a=r.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;s&&(i=typeof s=="string"?s:s.message),i&&console.warn(i)}return se[n]=a,a}async function tt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Z(t)}async function rt(e,t){if(e.currentSrc){const s=document.createElement("canvas"),i=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,i?.drawImage(e,0,0,s.width,s.height);const c=s.toDataURL();return Z(c)}const r=e.poster,n=re(r),a=await ae(r,n,t);return Z(a)}async function nt(e,t){var r;try{if(!((r=e?.contentDocument)===null||r===void 0)&&r.body)return await K(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function st(e,t){return S(e,HTMLCanvasElement)?tt(e):S(e,HTMLVideoElement)?rt(e,t):S(e,HTMLIFrameElement)?nt(e,t):e.cloneNode(Se(e))}const at=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Se=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ot(e,t,r){var n,a;if(Se(t))return t;let s=[];return at(e)&&e.assignedNodes?s=P(e.assignedNodes()):S(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?s=P(e.contentDocument.body.childNodes):s=P(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||S(e,HTMLVideoElement)||await s.reduce((i,c)=>i.then(()=>K(c,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function it(e,t,r){const n=t.style;if(!n)return;const a=window.getComputedStyle(e);a.cssText?(n.cssText=a.cssText,n.transformOrigin=a.transformOrigin):ge(r).forEach(s=>{let i=a.getPropertyValue(s);s==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),S(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))})}function ct(e,t){S(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),S(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function lt(e,t){if(S(e,HTMLSelectElement)){const n=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));n&&n.setAttribute("selected","")}}function ut(e,t,r){return S(t,Element)&&(it(e,t,r),Xe(e,t,r),ct(e,t),lt(e,t)),t}async function dt(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const n={};for(let s=0;s<r.length;s++){const c=r[s].getAttribute("xlink:href");if(c){const u=e.querySelector(c),d=document.querySelector(c);!u&&d&&!n[c]&&(n[c]=await K(d,t,!0))}}const a=Object.values(n);if(a.length){const s="http://www.w3.org/1999/xhtml",i=document.createElementNS(s,"svg");i.setAttribute("xmlns",s),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const c=document.createElementNS(s,"defs");i.appendChild(c);for(let u=0;u<a.length;u++)c.appendChild(a[u]);e.appendChild(i)}return e}async function K(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>st(n,t)).then(n=>ot(e,n,t)).then(n=>ut(e,n,t)).then(n=>dt(n,t))}const Ee=/url\((['"]?)([^'"]+?)\1\)/g,ft=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,pt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function mt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ht(e){const t=[];return e.replace(Ee,(r,n,a)=>(t.push(a),r)),t.filter(r=>!ne(r))}async function gt(e,t,r,n,a){try{const s=r?Ne(t,r):t,i=re(t);let c;return a||(c=await ae(s,i,n)),e.replace(mt(t),`$1${c}$3`)}catch{}return e}function xt(e,{preferredFontFormat:t}){return t?e.replace(pt,r=>{for(;;){const[n,,a]=ft.exec(r)||[];if(!a)return"";if(a===t)return`src: ${n};`}}):e}function Ce(e){return e.search(Ee)!==-1}async function Re(e,t,r){if(!Ce(e))return e;const n=xt(e,r);return ht(n).reduce((s,i)=>s.then(c=>gt(c,i,t,r)),Promise.resolve(n))}async function G(e,t,r){var n;const a=(n=t.style)===null||n===void 0?void 0:n.getPropertyValue(e);if(a){const s=await Re(a,null,r);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function yt(e,t){await G("background",e,t)||await G("background-image",e,t),await G("mask",e,t)||await G("-webkit-mask",e,t)||await G("mask-image",e,t)||await G("-webkit-mask-image",e,t)}async function wt(e,t){const r=S(e,HTMLImageElement);if(!(r&&!ne(e.src))&&!(S(e,SVGImageElement)&&!ne(e.href.baseVal)))return;const n=r?e.src:e.href.baseVal,a=await ae(n,re(n),t);await new Promise((s,i)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...u)=>{try{s(t.onImageErrorHandler(...u))}catch(d){i(d)}}:i;const c=e;c.decode&&(c.decode=s),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function vt(e,t){const n=P(e.childNodes).map(a=>ke(a,t));await Promise.all(n).then(()=>e)}async function ke(e,t){S(e,Element)&&(await yt(e,t),await wt(e,t),await vt(e,t))}function bt(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const n=t.style;return n!=null&&Object.keys(n).forEach(a=>{r[a]=n[a]}),e}const je={};async function Te(e){let t=je[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},je[e]=t,t}async function Oe(e,t){let r=e.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,s=(r.match(/url\([^)]+\)/g)||[]).map(async i=>{let c=i.replace(n,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),be(c,t.fetchRequestInit,({result:u})=>(r=r.replace(i,`url(${u})`),[i,u]))});return Promise.all(s).then(()=>r)}function Pe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(n);if(u===null)break;t.push(u[0])}n=n.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(i,"gi");for(;;){let u=s.exec(n);if(u===null){if(u=c.exec(n),u===null)break;s.lastIndex=c.lastIndex}else c.lastIndex=s.lastIndex;t.push(u[0])}return t}async function St(e,t){const r=[],n=[];return e.forEach(a=>{if("cssRules"in a)try{P(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let c=i+1;const u=s.href,d=Te(u).then(h=>Oe(h,t)).then(h=>Pe(h).forEach(x=>{try{a.insertRule(x,x.startsWith("@import")?c+=1:a.cssRules.length)}catch(b){console.error("Error inserting rule from remote css",{rule:x,error:b})}})).catch(h=>{console.error("Error loading remote css",h.toString())});n.push(d)}})}catch(s){const i=e.find(c=>c.href==null)||document.styleSheets[0];a.href!=null&&n.push(Te(a.href).then(c=>Oe(c,t)).then(c=>Pe(c).forEach(u=>{i.insertRule(u,i.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",s)}}),Promise.all(n).then(()=>(e.forEach(a=>{if("cssRules"in a)try{P(a.cssRules||[]).forEach(s=>{r.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),r))}function Et(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ce(t.style.getPropertyValue("src")))}async function Ct(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=P(e.ownerDocument.styleSheets),n=await St(r,t);return Et(n)}function _e(e){return e.trim().replace(/["']/g,"")}function Rt(e){const t=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(s=>{t.add(_e(s))}),Array.from(n.children).forEach(s=>{s instanceof HTMLElement&&r(s)})}return r(e),t}async function kt(e,t){const r=await Ct(e,t),n=Rt(e);return(await Promise.all(r.filter(s=>n.has(_e(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return Re(s.cssText,i,t)}))).join(`
|
|
8
|
-
`)}async function jt(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await kt(e,t);if(r){const n=document.createElement("style"),a=document.createTextNode(r);n.appendChild(a),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}}async function Tt(e,t={}){const{width:r,height:n}=xe(e,t),a=await K(e,t,!0);return await jt(a,t),await ke(a,t),bt(a,t),await $e(a,r,n)}async function Ot(e,t={}){const{width:r,height:n}=xe(e,t),a=await Tt(e,t),s=await Z(a),i=document.createElement("canvas"),c=i.getContext("2d"),u=t.pixelRatio||ze(),d=t.canvasWidth||r,h=t.canvasHeight||n;return i.width=d*u,i.height=h*u,t.skipAutoScale||We(i),i.style.width=`${d}`,i.style.height=`${h}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,i.width,i.height)),c.drawImage(s,0,0,i.width,i.height),i}async function Pt(e,t={}){return(await Ot(e,t)).toDataURL()}const _t=e=>{const r=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!r)return"";const n=[];let a=e[r];for(;a;){const s=a.type;if(typeof s=="function"){const i=s.displayName||s.name;i&&!i.includes("ViewGate")&&!n.includes(i)&&n.unshift(i)}a=a.return}return n.join(" > ")||"Generic Component"},Vt=e=>{let t="unknown:0",r=e;for(;r;){const d=r.getAttribute("data-source-path");if(d){t=d;break}r=r.parentElement}const n=_t(e),s=(d=>{const h=[];let x=d;for(;x&&x.nodeType===Node.ELEMENT_NODE;){let b=x.nodeName.toLowerCase();if(x.id){b+="#"+x.id,h.unshift(b);break}else{let C=x,T=1;for(;C.previousElementSibling;)C=C.previousElementSibling,C.nodeName.toLowerCase()===b&&T++;T>1&&(b+=`:nth-of-type(${T})`)}h.unshift(b),x=x.parentElement}return h.join(" > ")})(e),i=(e.innerText||"").slice(0,50).trim(),c={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(d=>{const h=e.getAttribute(d);h&&(c[d]=h)});const u=`${e.tagName.toLowerCase()}-${i.replace(/\s+/g,"_")}-${s.split(" > ").slice(-2).join("_")}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:s,outerHtml:(e.outerHTML||"").slice(0,1e3),parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:n,signature:u,source:t,attributes:c,metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`}}},Ve=()=>{const{addToast:e,language:t,t:r,apiKey:n,baseUrl:a}=he(),[s,i]=g.useState(!1),[c,u]=g.useState(null),[d,h]=g.useState(null),[x,b]=g.useState(""),[C,T]=g.useState(!1),[Q,L]=g.useState(!1),[z,q]=g.useState(!1),[W,ie]=g.useState([]),[I,U]=g.useState(null),[ce,le]=g.useState(!1),[$,ee]=g.useState(!1),[_,F]=g.useState(null),O=g.useCallback(async()=>{if(n){ee(!0);try{const f=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":n}});if(f.ok){const m=await f.json();ie(m)}}catch(f){console.error("Failed to fetch annotations",f)}finally{ee(!1)}}},[n,a]);g.useEffect(()=>{const f=()=>{const m=window.location.hash;if(m.includes("vg_hl=")){const j=m.split("vg_hl=");if(j.length<2)return;const o=decodeURIComponent(j[1]);[100,500,1e3,2e3].forEach(y=>{setTimeout(()=>{const w=document.querySelectorAll("*");for(const k of w)if(k.tagName.toLowerCase()===o.split("-")[0]){const N=k.getBoundingClientRect();if(N.width>0&&N.height>0){const v=(k.innerText||"").slice(0,50).trim().replace(/\s+/g,"_");if(o.includes(v)){k.classList.add("vg-highlight-active"),F(k),k.scrollIntoView({behavior:"smooth",block:"center"});break}}}},y)})}};return f(),window.addEventListener("hashchange",f),()=>window.removeEventListener("hashchange",f)},[]),g.useEffect(()=>{if(!_)return;const f=()=>{_.classList.remove("vg-highlight-active"),F(null),window.history.replaceState&&window.history.replaceState(null,"",window.location.pathname+window.location.search)};return _.addEventListener("mouseover",f),()=>_.removeEventListener("mouseover",f)},[_]),g.useEffect(()=>{O()},[O]);const Y=g.useCallback(f=>{if(!s||d)return;const m=document.elementFromPoint(f.clientX,f.clientY);if(!m||m.id==="viewgate-overlay"||m.closest("#viewgate-ui")){u(null);return}m.getAttribute("data-source-path"),u({tag:m.tagName.toLowerCase(),source:m.getAttribute("data-source-path")||"unknown:0",rect:m.getBoundingClientRect(),element:m,previewText:(m.innerText||"").slice(0,100)||(m.getAttribute("placeholder")||"").slice(0,100)||m.tagName.toLowerCase(),semanticReference:Vt(m)})},[s,d]),V=g.useCallback(async f=>{if(!(!s||d)&&c){f.preventDefault(),f.stopPropagation(),L(!0);try{const m=c.element.style.display,j=window.getComputedStyle(c.element).display==="inline";j&&(c.element.style.display="inline-block");const o=await Pt(c.element,{backgroundColor:"#ffffff",pixelRatio:2,skipFonts:!0,style:{margin:"0",padding:"4px"}});j&&(c.element.style.display=m),h({...c,visualPreview:o})}catch(m){console.error("Failed to capture preview:",m),h(c)}finally{L(!1),u(null)}}},[s,c,d,z]);g.useEffect(()=>(s&&!d?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("mousemove",Y),window.addEventListener("click",V,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("mousemove",Y),window.removeEventListener("click",V,!0)}),[s,d,Y,V]);const te=async()=>{if(!d||!x.trim())return;T(!0);const{semanticReference:f}=d,[m,j]=f.source.split(":"),o=j||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({filePath:m,line:parseInt(o),url:window.location.href,message:x,componentName:f.componentPath||d.tag,reference:f})})).ok)throw new Error("Backend failed");e(r.success,"success"),h(null),b(""),i(!1),O()}catch(p){console.error(p),e(r.error,"error")}finally{T(!1)}},B=f=>f.split("/").pop()?.split("\\").pop()||"unknown";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:344",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:99999},id:"viewgate-ui",children:[l.jsx("button",{onClick:()=>i(!s),className:"vg-button-primary vg-button-appear",style:{padding:"12px 24px",fontSize:"15px"},children:s?r.exitMode:r.enterMode}),W.length>0&&l.jsx("button",{onClick:()=>{q(!z),i(!1),h(null)},className:"vg-button-ghost vg-button-appear",style:{padding:"12px 24px",fontSize:"15px",marginLeft:"12px",background:"white"},children:r.viewComments},"view-comments")]}),Q&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:370",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e5,cursor:"wait"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:383",className:"vg-glassmorphism",style:{padding:"30px 50px",fontWeight:700,display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"rgba(0,0,0,0.7)",color:"white",border:"1px solid rgba(255,255,255,0.1)"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:384",className:"vg-spinner"}),"Capturing..."]})}),s&&c&&!d&&!Q&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:392",style:{position:"fixed",top:c.rect.top,left:c.rect.left,width:c.rect.width,height:c.rect.height,border:"2px solid var(--vg-primary)",backgroundColor:"rgba(37, 19, 236, 0.05)",pointerEvents:"none",zIndex:99998,borderRadius:"4px",boxShadow:"0 0 15px rgba(37, 19, 236, 0.2)",transition:"all 0.1s ease-out"}}),d&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:410",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:423",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"460px",background:"white",color:"#0f172a"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:429",style:{margin:"0 0 10px 0",fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:431",style:{marginBottom:"20px"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:432",style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[d.semanticReference.componentPath?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:434",className:"vg-badge",style:{backgroundColor:"#f5f3ff",color:"#7c3aed",borderColor:"#ddd6fe"},children:["📦 ",d.tag]}):l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:438",className:"vg-badge",children:d.tag}),d.semanticReference.source&&!d.semanticReference.source.startsWith("unknown")?l.jsx(l.Fragment,{children:l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:443",className:"vg-badge",style:{backgroundColor:"#fdf2f8",color:"#db2777",borderColor:"#fbcfe8"},children:["📄 ",B(d.semanticReference.source.split(":")[0]||"unknown")]})}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:448",className:"vg-badge",style:{backgroundColor:"#f0f9ff",color:"#0369a1",borderColor:"#bae6fd",maxWidth:"300px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["🆔 ",d.semanticReference.signature]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:453",style:{marginTop:"8px",fontSize:"11px",color:"#94a3b8"},children:["🎯 ",d.semanticReference.selector]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:459",style:{backgroundColor:"#f8fafc",borderRadius:"8px",border:"1px solid #e2e8f0",marginBottom:"20px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:468",style:{padding:"8px 12px",fontSize:"10px",color:"#94a3b8",textTransform:"uppercase",fontWeight:700,borderBottom:"1px solid #f1f5f9"},children:r.preview}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:471",style:{padding:"12px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100px",maxHeight:"200px",overflow:"hidden",backgroundColor:"#fdfdfd"},children:d.visualPreview?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:482",style:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx("img",{src:d.visualPreview,alt:"Element Preview",style:{maxWidth:"90%",maxHeight:"160px",objectFit:"contain",boxShadow:"0 4px 12px rgba(0,0,0,0.12)",borderRadius:"6px",border:"1px solid #e2e8f0",backgroundColor:"white"}})}):l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:505",style:{fontSize:"13px",color:"#64748b",fontStyle:"italic",textAlign:"center",padding:"0 20px"},children:['"',d.previewText,'"']})})]}),l.jsx("textarea",{className:"vg-textarea",value:x,onChange:f=>b(f.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:521",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"24px"},children:[l.jsx("button",{onClick:()=>h(null),className:"vg-button-ghost",children:r.cancel}),l.jsx("button",{onClick:te,className:"vg-button-primary",disabled:C||!x.trim(),style:{opacity:C||!x.trim()?.6:1},children:C?r.submitting:r.send})]})]})}),z&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:543",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:556",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"600px",maxHeight:"80vh",background:"white",color:"#0f172a",display:"flex",flexDirection:"column"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:565",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:566",style:{margin:0,fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:567",onClick:()=>q(!1),className:"vg-button-ghost",style:{padding:"6px 12px"},children:"✕"})]}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:570",style:{overflowY:"auto",flex:1,paddingRight:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:$?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:572",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:"Cargando..."}):W.length===0?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:574",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:r.noComments}):W.map(f=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:577",style:{border:"1px solid #e2e8f0",borderRadius:"12px",padding:"16px",backgroundColor:f.status==="ready_for_review"?"#f0fdf4":"#fff"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:583",style:{display:"flex",justifyContent:"space-between",marginBottom:"12px"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:584",style:{display:"flex",gap:"8px",alignItems:"center"},children:[f.status==="ready_for_review"?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:586",className:"vg-badge",style:{backgroundColor:"#dcfce7",color:"#166534",borderColor:"#bbf7d0"},children:["✓ ",r.readyForReview]}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:588",className:"vg-badge",style:{backgroundColor:"#fef3c7",color:"#92400e",borderColor:"#fde68a"},children:["⏳ ",r.pending]}),l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:590",style:{fontSize:"12px",color:"#64748b"},children:new Date(f.timestamp).toLocaleString()})]})}),l.jsxs("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:596",style:{margin:"0 0 12px 0",fontSize:"15px",fontWeight:600},children:['"',f.message,'"']}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:598",style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"16px"},children:[l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:599",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📦 ",f.componentName?.split(" > ").pop()||"UI Element"]}),f.filePath&&f.filePath!=="unknown"&&l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:603",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📄 ",B(f.filePath)]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:609",style:{display:"flex",gap:"8px",justifyContent:"flex-end",borderTop:"1px solid #e2e8f0",paddingTop:"16px",marginTop:"8px"},children:[f.status==="pending"?l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:611",className:"vg-button-primary",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"ready_for_review"})})).ok&&(O(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["✅ ",r.markReady]}):l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:633",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"pending"})})).ok&&(O(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["🔄 ",r.reopen]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:656",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{if(f.url){le(!0);const m=new URL(f.url);m.hash=`vg_hl=${encodeURIComponent(f.reference.signature)}`,setTimeout(()=>{window.location.href=m.toString()},1e3)}},children:["👁️ ",r.review]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:673",className:"vg-button-primary",style:{backgroundColor:"#ef4444",display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{U({title:r.deleteConfirm,message:r.confirmDelete,onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"DELETE",headers:{"x-api-key":n}})).ok&&(O(),e(r.deleteSuccess,"success"))}catch{e(r.error,"error")}finally{U(null)}}})},children:["🗑️ ",r.close]})]})]},f._id))})]})}),ce&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:712",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:3e5,backdropFilter:"blur(10px)",color:"white"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:726",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"20px"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:727",className:"vg-spinner",style:{width:"50px",height:"50px",borderTopColor:"white"}}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:728",style:{fontSize:"18px",fontWeight:600,letterSpacing:"0.5px"},children:r.navigating})]})}),I&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:735",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e5},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:748",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",background:"white",textAlign:"center"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:754",style:{fontSize:"48px",marginBottom:"16px"},children:"⚠️"}),l.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:755",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:700,color:"#0f172a"},children:I.title}),l.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:756",style:{margin:"0 0 24px 0",fontSize:"15px",color:"#64748b",lineHeight:1.5},children:I.message}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:758",style:{display:"flex",gap:"12px",justifyContent:"center"},children:[l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:759",className:"vg-button-ghost",onClick:()=>U(null),style:{flex:1},children:r.no}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:766",className:"vg-button-primary",style:{backgroundColor:"#ef4444",flex:1},onClick:I.onConfirm,children:r.yes})]})]})})]})};function oe(e,t,r){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const n=c=>c.replace(/\\/g,"/"),a=n(t).replace(n(r),"");return e.split(`
|
|
9
|
-
`).map((c,u)=>{const d=u+1;return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(h,
|
|
7
|
+
<%s key={someKey} {...props} />`,v,w,_,w),P[w+v]=!0)}if(w=null,x!==void 0&&(r(x),w=""+x),i(p)&&(r(p.key),w=""+p.key),"key"in p){x={};for(var ue in p)ue!=="key"&&(x[ue]=p[ue])}else x=p;return w&&c(x,typeof o=="function"?o.displayName||o.name||"Unknown":o),d(o,w,x,a(),D,k)}function y(o){b(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===$&&(o._payload.status==="fulfilled"?b(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function b(o){return typeof o=="object"&&o!==null&&o.$$typeof===j}var C=g,j=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),V=Symbol.for("react.client.reference"),N=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,Y=Array.isArray,A=console.createTask?console.createTask:function(){return null};C={react_stack_bottom_frame:function(o){return o()}};var te,B={},f=C.react_stack_bottom_frame.bind(C,s)(),m=A(n(s)),P={};H.Fragment=I,H.jsx=function(o,p,x){var v=1e4>N.recentlyCreatedOwnerStacks++;return h(o,p,x,!1,v?Error("react-stack-top-frame"):f,v?A(n(o)):m)},H.jsxs=function(o,p,x){var v=1e4>N.recentlyCreatedOwnerStacks++;return h(o,p,x,!0,v?Error("react-stack-top-frame"):f,v?A(n(o)):m)}})()),H}var pe;function Le(){return pe||(pe=1,process.env.NODE_ENV==="production"?J.exports=Ae():J.exports=Ge()),J.exports}var l=Le();const Ie={en:{enterMode:"🚀 Enter Feedback Mode",exitMode:"✨ Exit Mode",feedbackHeader:"Feedback",selectedElement:"Selected element:",line:"Line",placeholder:"Tell us what you'd like to change...",cancel:"Cancel",send:"Send Feedback",submitting:"Submitting...",success:"Your feedback has been submitted successfully!",error:"Failed to submit feedback. Check backend connection.",successHeader:"Success",errorHeader:"Error",preview:"Preview",viewComments:"👀 View Comments",close:"Close",observe:"Observe",pending:"Pending",readyForReview:"Ready for Review",noComments:"No comments found.",deleteConfirm:"Are you sure you want to close/delete this comment?",markReady:"Mark as Ready",reopen:"Reopen",review:"Review",confirmDelete:"Are you sure you want to delete this annotation?",yes:"Yes, delete",no:"No, cancel",deleteSuccess:"The annotation has been deleted.",updateSuccess:"Status updated successfully.",navigating:"Redirecting to review..."},es:{enterMode:"🚀 Activar Modo Comentarios",exitMode:"✨ Salir del Modo",feedbackHeader:"Comentarios",selectedElement:"Elemento seleccionado:",line:"Línea",placeholder:"Cuéntanos qué te gustaría cambiar...",cancel:"Cancelar",send:"Enviar Comentarios",submitting:"Enviando...",success:"¡Tus comentarios se han enviado con éxito!",error:"Error al enviar comentarios. Revisa la conexión con el servidor.",successHeader:"Éxito",errorHeader:"Error",preview:"Vista previa",viewComments:"👀 Ver Comentarios",close:"Cerrar",observe:"Observar",pending:"Pendiente",readyForReview:"Lista para revisión",noComments:"No hay comentarios.",deleteConfirm:"¿Estás seguro de que deseas cerrar y eliminar este comentario?",markReady:"Marcar como Listo",reopen:"Reabrir",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar este comentario?",yes:"Sí, eliminar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Estado actualizado correctamente.",navigating:"Redirigiendo a revisión..."}},me=g.createContext(void 0),he=()=>{const e=g.useContext(me);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},Fe=({children:e,language:t="es",apiKey:r,baseUrl:n="https://view-gate.vercel.app"})=>{const[a,s]=g.useState([]),i=(u,d)=>{const h=Date.now();s(y=>[...y,{id:h,message:u,type:d}]),setTimeout(()=>{s(y=>y.filter(b=>b.id!==h))},4e3)},c=Ie[t];return l.jsxs(me.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:136",value:{addToast:i,language:t,t:c,apiKey:r,baseUrl:n},children:[e,l.jsx(Ve,{"data-source-path":"/src/components/ViewGateProvider.tsx:138"}),l.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:139",className:"vg-toasts",children:a.map(u=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:141",className:`vg-toast vg-glassmorphism vg-animate-slide ${u.type}`,children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:142",style:{fontSize:"20px"},children:u.type==="success"?"✅":"❌"}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:143",children:[l.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:144",style:{display:"block"},children:u.type==="success"?c.successHeader:c.errorHeader}),l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:145",style:{fontSize:"14px"},children:u.message})]})]},u.id))})]})};function Ne(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),a=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(a),t&&(n.href=t),a.href=e,a.href}const De=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function O(e){const t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}let G=null;function ge(e={}){return G||(e.includeStyleProperties?(G=e.includeStyleProperties,G):(G=O(window.getComputedStyle(document.documentElement)),G))}function X(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function Me(e){const t=X(e,"border-left-width"),r=X(e,"border-right-width");return e.clientWidth+t+r}function He(e){const t=X(e,"border-top-width"),r=X(e,"border-bottom-width");return e.clientHeight+t+r}function ye(e,t={}){const r=t.width||Me(e),n=t.height||He(e);return{width:r,height:n}}function We(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const E=16384;function ze(e){(e.width>E||e.height>E)&&(e.width>E&&e.height>E?e.width>e.height?(e.height*=E/e.width,e.width=E):(e.width*=E/e.height,e.height=E):e.width>E?(e.height*=E/e.width,e.width=E):(e.width*=E/e.height,e.height=E))}function Z(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function Ue(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function $e(e,t,r){const n="http://www.w3.org/2000/svg",a=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");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),Ue(a)}const S=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||S(r,t)};function Ye(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Be(e,t){return ge(t).map(r=>{const n=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${n}${a?" !important":""};`}).join(" ")}function Je(e,t,r,n){const a=`.${e}:${t}`,s=r.cssText?Ye(r):Be(r,n);return document.createTextNode(`${a}{${s}}`)}function xe(e,t,r,n){const a=window.getComputedStyle(e,r),s=a.getPropertyValue("content");if(s===""||s==="none")return;const i=De();try{t.className=`${t.className} ${i}`}catch{return}const c=document.createElement("style");c.appendChild(Je(i,r,a,n)),t.appendChild(c)}function Xe(e,t,r){xe(e,t,":before",r),xe(e,t,":after",r)}const we="application/font-woff",ve="image/jpeg",Ze={woff:we,woff2:we,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ve,jpeg:ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ke(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function re(e){const t=Ke(e).toLowerCase();return Ze[t]||""}function Qe(e){return e.split(/,/)[1]}function ne(e){return e.search(/^(data:)/)!==-1}function qe(e,t){return`data:${t};base64,${e}`}async function be(e,t,r){const n=await fetch(e,t);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const a=await n.blob();return new Promise((s,i)=>{const c=new FileReader;c.onerror=i,c.onloadend=()=>{try{s(r({res:n,result:c.result}))}catch(u){i(u)}},c.readAsDataURL(a)})}const se={};function et(e,t,r){let n=e.replace(/\?.*/,"");return r&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function ae(e,t,r){const n=et(e,t,r.includeQueryParams);if(se[n]!=null)return se[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await be(e,r.fetchRequestInit,({res:i,result:c})=>(t||(t=i.headers.get("Content-Type")||""),Qe(c)));a=qe(s,t)}catch(s){a=r.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;s&&(i=typeof s=="string"?s:s.message),i&&console.warn(i)}return se[n]=a,a}async function tt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Z(t)}async function rt(e,t){if(e.currentSrc){const s=document.createElement("canvas"),i=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,i?.drawImage(e,0,0,s.width,s.height);const c=s.toDataURL();return Z(c)}const r=e.poster,n=re(r),a=await ae(r,n,t);return Z(a)}async function nt(e,t){var r;try{if(!((r=e?.contentDocument)===null||r===void 0)&&r.body)return await K(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function st(e,t){return S(e,HTMLCanvasElement)?tt(e):S(e,HTMLVideoElement)?rt(e,t):S(e,HTMLIFrameElement)?nt(e,t):e.cloneNode(Se(e))}const at=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Se=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ot(e,t,r){var n,a;if(Se(t))return t;let s=[];return at(e)&&e.assignedNodes?s=O(e.assignedNodes()):S(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?s=O(e.contentDocument.body.childNodes):s=O(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||S(e,HTMLVideoElement)||await s.reduce((i,c)=>i.then(()=>K(c,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function it(e,t,r){const n=t.style;if(!n)return;const a=window.getComputedStyle(e);a.cssText?(n.cssText=a.cssText,n.transformOrigin=a.transformOrigin):ge(r).forEach(s=>{let i=a.getPropertyValue(s);s==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),S(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))})}function ct(e,t){S(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),S(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function lt(e,t){if(S(e,HTMLSelectElement)){const n=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));n&&n.setAttribute("selected","")}}function ut(e,t,r){return S(t,Element)&&(it(e,t,r),Xe(e,t,r),ct(e,t),lt(e,t)),t}async function dt(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const n={};for(let s=0;s<r.length;s++){const c=r[s].getAttribute("xlink:href");if(c){const u=e.querySelector(c),d=document.querySelector(c);!u&&d&&!n[c]&&(n[c]=await K(d,t,!0))}}const a=Object.values(n);if(a.length){const s="http://www.w3.org/1999/xhtml",i=document.createElementNS(s,"svg");i.setAttribute("xmlns",s),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const c=document.createElementNS(s,"defs");i.appendChild(c);for(let u=0;u<a.length;u++)c.appendChild(a[u]);e.appendChild(i)}return e}async function K(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>st(n,t)).then(n=>ot(e,n,t)).then(n=>ut(e,n,t)).then(n=>dt(n,t))}const Ee=/url\((['"]?)([^'"]+?)\1\)/g,ft=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,pt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function mt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ht(e){const t=[];return e.replace(Ee,(r,n,a)=>(t.push(a),r)),t.filter(r=>!ne(r))}async function gt(e,t,r,n,a){try{const s=r?Ne(t,r):t,i=re(t);let c;return a||(c=await ae(s,i,n)),e.replace(mt(t),`$1${c}$3`)}catch{}return e}function yt(e,{preferredFontFormat:t}){return t?e.replace(pt,r=>{for(;;){const[n,,a]=ft.exec(r)||[];if(!a)return"";if(a===t)return`src: ${n};`}}):e}function Ce(e){return e.search(Ee)!==-1}async function Re(e,t,r){if(!Ce(e))return e;const n=yt(e,r);return ht(n).reduce((s,i)=>s.then(c=>gt(c,i,t,r)),Promise.resolve(n))}async function L(e,t,r){var n;const a=(n=t.style)===null||n===void 0?void 0:n.getPropertyValue(e);if(a){const s=await Re(a,null,r);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function xt(e,t){await L("background",e,t)||await L("background-image",e,t),await L("mask",e,t)||await L("-webkit-mask",e,t)||await L("mask-image",e,t)||await L("-webkit-mask-image",e,t)}async function wt(e,t){const r=S(e,HTMLImageElement);if(!(r&&!ne(e.src))&&!(S(e,SVGImageElement)&&!ne(e.href.baseVal)))return;const n=r?e.src:e.href.baseVal,a=await ae(n,re(n),t);await new Promise((s,i)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...u)=>{try{s(t.onImageErrorHandler(...u))}catch(d){i(d)}}:i;const c=e;c.decode&&(c.decode=s),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function vt(e,t){const n=O(e.childNodes).map(a=>ke(a,t));await Promise.all(n).then(()=>e)}async function ke(e,t){S(e,Element)&&(await xt(e,t),await wt(e,t),await vt(e,t))}function bt(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const n=t.style;return n!=null&&Object.keys(n).forEach(a=>{r[a]=n[a]}),e}const je={};async function Te(e){let t=je[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},je[e]=t,t}async function Oe(e,t){let r=e.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,s=(r.match(/url\([^)]+\)/g)||[]).map(async i=>{let c=i.replace(n,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),be(c,t.fetchRequestInit,({result:u})=>(r=r.replace(i,`url(${u})`),[i,u]))});return Promise.all(s).then(()=>r)}function Pe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(n);if(u===null)break;t.push(u[0])}n=n.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(i,"gi");for(;;){let u=s.exec(n);if(u===null){if(u=c.exec(n),u===null)break;s.lastIndex=c.lastIndex}else c.lastIndex=s.lastIndex;t.push(u[0])}return t}async function St(e,t){const r=[],n=[];return e.forEach(a=>{if("cssRules"in a)try{O(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let c=i+1;const u=s.href,d=Te(u).then(h=>Oe(h,t)).then(h=>Pe(h).forEach(y=>{try{a.insertRule(y,y.startsWith("@import")?c+=1:a.cssRules.length)}catch(b){console.error("Error inserting rule from remote css",{rule:y,error:b})}})).catch(h=>{console.error("Error loading remote css",h.toString())});n.push(d)}})}catch(s){const i=e.find(c=>c.href==null)||document.styleSheets[0];a.href!=null&&n.push(Te(a.href).then(c=>Oe(c,t)).then(c=>Pe(c).forEach(u=>{i.insertRule(u,i.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",s)}}),Promise.all(n).then(()=>(e.forEach(a=>{if("cssRules"in a)try{O(a.cssRules||[]).forEach(s=>{r.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),r))}function Et(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ce(t.style.getPropertyValue("src")))}async function Ct(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=O(e.ownerDocument.styleSheets),n=await St(r,t);return Et(n)}function _e(e){return e.trim().replace(/["']/g,"")}function Rt(e){const t=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(s=>{t.add(_e(s))}),Array.from(n.children).forEach(s=>{s instanceof HTMLElement&&r(s)})}return r(e),t}async function kt(e,t){const r=await Ct(e,t),n=Rt(e);return(await Promise.all(r.filter(s=>n.has(_e(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return Re(s.cssText,i,t)}))).join(`
|
|
8
|
+
`)}async function jt(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await kt(e,t);if(r){const n=document.createElement("style"),a=document.createTextNode(r);n.appendChild(a),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}}async function Tt(e,t={}){const{width:r,height:n}=ye(e,t),a=await K(e,t,!0);return await jt(a,t),await ke(a,t),bt(a,t),await $e(a,r,n)}async function Ot(e,t={}){const{width:r,height:n}=ye(e,t),a=await Tt(e,t),s=await Z(a),i=document.createElement("canvas"),c=i.getContext("2d"),u=t.pixelRatio||We(),d=t.canvasWidth||r,h=t.canvasHeight||n;return i.width=d*u,i.height=h*u,t.skipAutoScale||ze(i),i.style.width=`${d}`,i.style.height=`${h}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,i.width,i.height)),c.drawImage(s,0,0,i.width,i.height),i}async function Pt(e,t={}){return(await Ot(e,t)).toDataURL()}const _t=e=>{const r=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!r)return"";const n=[];let a=e[r];for(;a;){const s=a.type;if(typeof s=="function"){const i=s.displayName||s.name;i&&!i.includes("ViewGate")&&!n.includes(i)&&n.unshift(i)}a=a.return}return n.join(" > ")||"Generic Component"},Vt=e=>{let t="unknown:0",r=e;for(;r;){const d=r.getAttribute("data-source-path");if(d){t=d;break}r=r.parentElement}const n=_t(e),s=(d=>{const h=[];let y=d;for(;y&&y.nodeType===Node.ELEMENT_NODE;){let b=y.nodeName.toLowerCase();if(y.id){b+="#"+y.id,h.unshift(b);break}else{let C=y,j=1;for(;C.previousElementSibling;)C=C.previousElementSibling,C.nodeName.toLowerCase()===b&&j++;j>1&&(b+=`:nth-of-type(${j})`)}h.unshift(b),y=y.parentElement}return h.join(" > ")})(e),i=(e.innerText||"").slice(0,50).trim(),c={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(d=>{const h=e.getAttribute(d);h&&(c[d]=h)});const u=`${e.tagName.toLowerCase()}-${i.replace(/\s+/g,"_")}-${s.split(" > ").slice(-2).join("_")}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:s,outerHtml:(e.outerHTML||"").slice(0,1e3),parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:n,signature:u,source:t,attributes:c,metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`}}},Ve=()=>{const{addToast:e,language:t,t:r,apiKey:n,baseUrl:a}=he(),[s,i]=g.useState(!1),[c,u]=g.useState(null),[d,h]=g.useState(null),[y,b]=g.useState(""),[C,j]=g.useState(!1),[Q,I]=g.useState(!1),[W,q]=g.useState(!1),[z,ie]=g.useState([]),[F,U]=g.useState(null),[ce,le]=g.useState(!1),[$,ee]=g.useState(!1),[V,N]=g.useState(null),T=g.useCallback(async()=>{if(n){ee(!0);try{const f=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":n}});if(f.ok){const m=await f.json();ie(m)}}catch(f){console.error("Failed to fetch annotations",f)}finally{ee(!1)}}},[n,a]);g.useEffect(()=>{const f=()=>{const m=window.location.hash;if(m.includes("vg_hl=")){const o=m.split("vg_hl=")[1];if(!o)return;const p=decodeURIComponent(o);[100,500,1e3,2e3].forEach(v=>{setTimeout(()=>{const D=document.querySelectorAll("*");for(const k of D)if(k.tagName.toLowerCase()===p.split("-")[0]){const w=k.getBoundingClientRect();if(w.width>0&&w.height>0){const _=(k.innerText||"").slice(0,50).trim().replace(/\s+/g,"_");if(p.includes(_)){k.classList.add("vg-highlight-active"),N(k),k.scrollIntoView({behavior:"smooth",block:"center"});break}}}},v)})}};return f(),window.addEventListener("hashchange",f),()=>window.removeEventListener("hashchange",f)},[]),g.useEffect(()=>{if(!V)return;const f=()=>{V.classList.remove("vg-highlight-active"),N(null),window.history.replaceState&&window.history.replaceState(null,"",window.location.pathname+window.location.search)};return V.addEventListener("mouseover",f),()=>V.removeEventListener("mouseover",f)},[V]),g.useEffect(()=>{T()},[T]);const Y=g.useCallback(f=>{if(!s||d)return;const m=document.elementFromPoint(f.clientX,f.clientY);if(!m||m.id==="viewgate-overlay"||m.closest("#viewgate-ui")){u(null);return}m.getAttribute("data-source-path"),u({tag:m.tagName.toLowerCase(),source:m.getAttribute("data-source-path")||"unknown:0",rect:m.getBoundingClientRect(),element:m,previewText:(m.innerText||"").slice(0,100)||(m.getAttribute("placeholder")||"").slice(0,100)||m.tagName.toLowerCase(),semanticReference:Vt(m)})},[s,d]),A=g.useCallback(async f=>{if(!(!s||d)&&c){f.preventDefault(),f.stopPropagation(),I(!0);try{const m=c.element.style.display,P=window.getComputedStyle(c.element).display==="inline";P&&(c.element.style.display="inline-block");const o=await Pt(c.element,{pixelRatio:2,skipFonts:!1,cacheBust:!0,style:{margin:"0",padding:"4px"}});P&&(c.element.style.display=m),h({...c,visualPreview:o})}catch(m){console.error("Failed to capture preview:",m),h(c)}finally{I(!1),u(null)}}},[s,c,d,W]);g.useEffect(()=>(s&&!d?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("mousemove",Y),window.addEventListener("click",A,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("mousemove",Y),window.removeEventListener("click",A,!0)}),[s,d,Y,A]);const te=async()=>{if(!d||!y.trim())return;j(!0);const{semanticReference:f}=d,[m,P]=f.source.split(":"),o=P||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({filePath:m,line:parseInt(o),url:window.location.href,message:y,componentName:f.componentPath||d.tag,reference:f})})).ok)throw new Error("Backend failed");e(r.success,"success"),h(null),b(""),i(!1),T()}catch(p){console.error(p),e(r.error,"error")}finally{j(!1)}},B=f=>f.split("/").pop()?.split("\\").pop()||"unknown";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:345",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:99999},id:"viewgate-ui",children:[l.jsx("button",{onClick:()=>i(!s),className:"vg-button-primary vg-button-appear",style:{padding:"12px 24px",fontSize:"15px"},children:s?r.exitMode:r.enterMode}),z.length>0&&l.jsx("button",{onClick:()=>{q(!W),i(!1),h(null)},className:"vg-button-ghost vg-button-appear",style:{padding:"12px 24px",fontSize:"15px",marginLeft:"12px",background:"white"},children:r.viewComments},"view-comments")]}),Q&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:371",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e5,cursor:"wait"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:384",className:"vg-glassmorphism",style:{padding:"30px 50px",fontWeight:700,display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"rgba(0,0,0,0.7)",color:"white",border:"1px solid rgba(255,255,255,0.1)"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:385",className:"vg-spinner"}),"Capturing..."]})}),s&&c&&!d&&!Q&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:393",style:{position:"fixed",top:c.rect.top,left:c.rect.left,width:c.rect.width,height:c.rect.height,border:"2px solid var(--vg-primary)",backgroundColor:"rgba(37, 19, 236, 0.05)",pointerEvents:"none",zIndex:99998,borderRadius:"4px",boxShadow:"0 0 15px rgba(37, 19, 236, 0.2)",transition:"all 0.1s ease-out"}}),d&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:411",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:424",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"460px",background:"white",color:"#0f172a"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:430",style:{margin:"0 0 10px 0",fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:432",style:{marginBottom:"20px"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:433",style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[d.semanticReference.componentPath?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:435",className:"vg-badge",style:{backgroundColor:"#f5f3ff",color:"#7c3aed",borderColor:"#ddd6fe"},children:["📦 ",d.tag]}):l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:439",className:"vg-badge",children:d.tag}),d.semanticReference.source&&!d.semanticReference.source.startsWith("unknown")?l.jsx(l.Fragment,{children:l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:444",className:"vg-badge",style:{backgroundColor:"#fdf2f8",color:"#db2777",borderColor:"#fbcfe8"},children:["📄 ",B(d.semanticReference.source.split(":")[0]||"unknown")]})}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:449",className:"vg-badge",style:{backgroundColor:"#f0f9ff",color:"#0369a1",borderColor:"#bae6fd",maxWidth:"300px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["🆔 ",d.semanticReference.signature]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:454",style:{marginTop:"8px",fontSize:"11px",color:"#94a3b8"},children:["🎯 ",d.semanticReference.selector]})]}),d.visualPreview&&l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:461",style:{marginBottom:"24px"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:462",style:{fontSize:"11px",fontWeight:800,textTransform:"uppercase",color:"#94a3b8",letterSpacing:"0.05em",marginBottom:"10px"},children:r.preview}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:472",style:{border:"1px dashed #e2e8f0",borderRadius:"10px",padding:"16px",display:"flex",justifyContent:"center",backgroundColor:"#fdfdfd"},children:l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:480",style:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx("img",{src:d.visualPreview,alt:"Element Preview",style:{maxWidth:"90%",maxHeight:"160px",objectFit:"contain",boxShadow:"0 4px 12px rgba(0,0,0,0.12)",borderRadius:"6px",border:"1px solid #e2e8f0",backgroundColor:"white"}})})})]}),l.jsx("textarea",{className:"vg-textarea",value:y,onChange:f=>b(f.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:515",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"24px"},children:[l.jsx("button",{onClick:()=>h(null),className:"vg-button-ghost",children:r.cancel}),l.jsx("button",{onClick:te,className:"vg-button-primary",disabled:C||!y.trim(),style:{opacity:C||!y.trim()?.6:1},children:C?r.submitting:r.send})]})]})}),W&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:537",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:550",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"600px",maxHeight:"80vh",background:"white",color:"#0f172a",display:"flex",flexDirection:"column"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:559",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:560",style:{margin:0,fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:561",onClick:()=>q(!1),className:"vg-button-ghost",style:{padding:"6px 12px"},children:"✕"})]}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:564",style:{overflowY:"auto",flex:1,paddingRight:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:$?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:566",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:"Cargando..."}):z.length===0?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:568",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:r.noComments}):z.map(f=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:571",style:{border:"1px solid #e2e8f0",borderRadius:"12px",padding:"16px",backgroundColor:f.status==="ready_for_review"?"#f0fdf4":"#fff"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:577",style:{display:"flex",justifyContent:"space-between",marginBottom:"12px"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:578",style:{display:"flex",gap:"8px",alignItems:"center"},children:[f.status==="ready_for_review"?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:580",className:"vg-badge",style:{backgroundColor:"#dcfce7",color:"#166534",borderColor:"#bbf7d0"},children:["✓ ",r.readyForReview]}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:582",className:"vg-badge",style:{backgroundColor:"#fef3c7",color:"#92400e",borderColor:"#fde68a"},children:["⏳ ",r.pending]}),l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:584",style:{fontSize:"12px",color:"#64748b"},children:new Date(f.timestamp).toLocaleString()})]})}),l.jsxs("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:590",style:{margin:"0 0 12px 0",fontSize:"15px",fontWeight:600},children:['"',f.message,'"']}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:592",style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"16px"},children:[l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:593",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📦 ",f.componentName?.split(" > ").pop()||"UI Element"]}),f.filePath&&f.filePath!=="unknown"&&l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:597",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📄 ",B(f.filePath)]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:603",style:{display:"flex",gap:"8px",justifyContent:"flex-end",borderTop:"1px solid #e2e8f0",paddingTop:"16px",marginTop:"8px"},children:[f.status==="pending"?l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:605",className:"vg-button-primary",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"ready_for_review"})})).ok&&(T(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["✅ ",r.markReady]}):l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:627",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"pending"})})).ok&&(T(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["🔄 ",r.reopen]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:650",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{if(f.url){le(!0);const m=new URL(f.url);m.hash=`vg_hl=${encodeURIComponent(f.reference.signature)}`,setTimeout(()=>{window.location.href=m.toString()},1e3)}},children:["👁️ ",r.review]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:667",className:"vg-button-primary",style:{backgroundColor:"#ef4444",display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{U({title:r.deleteConfirm,message:r.confirmDelete,onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"DELETE",headers:{"x-api-key":n}})).ok&&(T(),e(r.deleteSuccess,"success"))}catch{e(r.error,"error")}finally{U(null)}}})},children:["🗑️ ",r.close]})]})]},f._id))})]})}),ce&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:706",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:3e5,backdropFilter:"blur(10px)",color:"white"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:720",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"20px"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:721",className:"vg-spinner",style:{width:"50px",height:"50px",borderTopColor:"white"}}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:722",style:{fontSize:"18px",fontWeight:600,letterSpacing:"0.5px"},children:r.navigating})]})}),F&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:729",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e5},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:742",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",background:"white",textAlign:"center"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:748",style:{fontSize:"48px",marginBottom:"16px"},children:"⚠️"}),l.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:749",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:700,color:"#0f172a"},children:F.title}),l.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:750",style:{margin:"0 0 24px 0",fontSize:"15px",color:"#64748b",lineHeight:1.5},children:F.message}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:752",style:{display:"flex",gap:"12px",justifyContent:"center"},children:[l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:753",className:"vg-button-ghost",onClick:()=>U(null),style:{flex:1},children:r.no}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:760",className:"vg-button-primary",style:{backgroundColor:"#ef4444",flex:1},onClick:F.onConfirm,children:r.yes})]})]})})]})};function oe(e,t,r){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const n=c=>c.replace(/\\/g,"/"),a=n(t).replace(n(r),"");return e.split(`
|
|
9
|
+
`).map((c,u)=>{const d=u+1;return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(h,y,b)=>h.includes("data-source-path")||b==="Fragment"||b==="React.Fragment"?h:`${y}<${b} data-source-path="${a}:${d}"`)}).join(`
|
|
10
10
|
`)}function At(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:oe(e,t,process.cwd()),map:null}}}}function Gt(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,oe(e,t,process.cwd())):e}R.ViewGate=Fe,R.ViewGateOverlay=Ve,R.transformSourcePaths=oe,R.useViewGate=he,R.viewgateNextLoader=Gt,R.viewgatePlugin=At,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
|