viewgate-wrapper 1.10.12 → 1.10.13
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/viewgate-wrapper.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled,.vg-button-ghost:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(.4);transform:none!important;box-shadow:none!important;pointer-events:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:12px 16px;border-radius:12px;background:#fff;color:#1e293b;width:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .2s ease;border:1px solid #e2e8f0}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-animate-spin{animation:vg-spin .8s linear infinite}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import Tt, { useRef as ge, useState as j, useEffect as Z, forwardRef as mt, createElement as
|
|
2
|
+
import Tt, { useRef as ge, useState as j, useEffect as Z, forwardRef as mt, createElement as Ie, createContext as Vt, useContext as Pt, useCallback as Ee } from "react";
|
|
3
3
|
import { createPortal as At } from "react-dom";
|
|
4
|
-
var
|
|
4
|
+
var Se = { exports: {} }, fe = {};
|
|
5
5
|
var Xe;
|
|
6
6
|
function $t() {
|
|
7
7
|
if (Xe) return fe;
|
|
8
8
|
Xe = 1;
|
|
9
9
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
-
function r(n,
|
|
10
|
+
function r(n, a, s) {
|
|
11
11
|
var i = null;
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
for (var
|
|
15
|
-
|
|
16
|
-
} else
|
|
17
|
-
return
|
|
12
|
+
if (s !== void 0 && (i = "" + s), a.key !== void 0 && (i = "" + a.key), "key" in a) {
|
|
13
|
+
s = {};
|
|
14
|
+
for (var c in a)
|
|
15
|
+
c !== "key" && (s[c] = a[c]);
|
|
16
|
+
} else s = a;
|
|
17
|
+
return a = s.ref, {
|
|
18
18
|
$$typeof: e,
|
|
19
19
|
type: n,
|
|
20
20
|
key: i,
|
|
21
|
-
ref:
|
|
22
|
-
props:
|
|
21
|
+
ref: a !== void 0 ? a : null,
|
|
22
|
+
props: s
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
return fe.Fragment = t, fe.jsx = r, fe.jsxs = r, fe;
|
|
@@ -28,12 +28,12 @@ var he = {};
|
|
|
28
28
|
var Je;
|
|
29
29
|
function Gt() {
|
|
30
30
|
return Je || (Je = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
-
function e(
|
|
32
|
-
if (
|
|
33
|
-
if (typeof
|
|
34
|
-
return
|
|
35
|
-
if (typeof
|
|
36
|
-
switch (
|
|
31
|
+
function e(l) {
|
|
32
|
+
if (l == null) return null;
|
|
33
|
+
if (typeof l == "function")
|
|
34
|
+
return l.$$typeof === ce ? null : l.displayName || l.name || null;
|
|
35
|
+
if (typeof l == "string") return l;
|
|
36
|
+
switch (l) {
|
|
37
37
|
case P:
|
|
38
38
|
return "Fragment";
|
|
39
39
|
case D:
|
|
@@ -47,131 +47,131 @@ function Gt() {
|
|
|
47
47
|
case Be:
|
|
48
48
|
return "Activity";
|
|
49
49
|
}
|
|
50
|
-
if (typeof
|
|
51
|
-
switch (typeof
|
|
50
|
+
if (typeof l == "object")
|
|
51
|
+
switch (typeof l.tag == "number" && console.error(
|
|
52
52
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
-
),
|
|
53
|
+
), l.$$typeof) {
|
|
54
54
|
case T:
|
|
55
55
|
return "Portal";
|
|
56
56
|
case F:
|
|
57
|
-
return
|
|
57
|
+
return l.displayName || "Context";
|
|
58
58
|
case A:
|
|
59
|
-
return (
|
|
59
|
+
return (l._context.displayName || "Context") + ".Consumer";
|
|
60
60
|
case _:
|
|
61
|
-
var y =
|
|
62
|
-
return
|
|
61
|
+
var y = l.render;
|
|
62
|
+
return l = l.displayName, l || (l = y.displayName || y.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
63
63
|
case H:
|
|
64
|
-
return y =
|
|
65
|
-
case
|
|
66
|
-
y =
|
|
64
|
+
return y = l.displayName || null, y !== null ? y : e(l.type) || "Memo";
|
|
65
|
+
case we:
|
|
66
|
+
y = l._payload, l = l._init;
|
|
67
67
|
try {
|
|
68
|
-
return e(
|
|
68
|
+
return e(l(y));
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
|
-
function t(
|
|
75
|
-
return "" +
|
|
74
|
+
function t(l) {
|
|
75
|
+
return "" + l;
|
|
76
76
|
}
|
|
77
|
-
function r(
|
|
77
|
+
function r(l) {
|
|
78
78
|
try {
|
|
79
|
-
t(
|
|
79
|
+
t(l);
|
|
80
80
|
var y = !1;
|
|
81
81
|
} catch {
|
|
82
82
|
y = !0;
|
|
83
83
|
}
|
|
84
84
|
if (y) {
|
|
85
85
|
y = console;
|
|
86
|
-
var b = y.error, k = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
86
|
+
var b = y.error, k = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
87
87
|
return b.call(
|
|
88
88
|
y,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
90
|
k
|
|
91
|
-
), t(
|
|
91
|
+
), t(l);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function n(
|
|
95
|
-
if (
|
|
96
|
-
if (typeof
|
|
94
|
+
function n(l) {
|
|
95
|
+
if (l === P) return "<>";
|
|
96
|
+
if (typeof l == "object" && l !== null && l.$$typeof === we)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
|
-
var y = e(
|
|
99
|
+
var y = e(l);
|
|
100
100
|
return y ? "<" + y + ">" : "<...>";
|
|
101
101
|
} catch {
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
function s() {
|
|
106
|
-
var c = te.A;
|
|
107
|
-
return c === null ? null : c.getOwner();
|
|
108
|
-
}
|
|
109
105
|
function a() {
|
|
106
|
+
var l = te.A;
|
|
107
|
+
return l === null ? null : l.getOwner();
|
|
108
|
+
}
|
|
109
|
+
function s() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
|
-
function i(
|
|
113
|
-
if (
|
|
114
|
-
var y = Object.getOwnPropertyDescriptor(
|
|
112
|
+
function i(l) {
|
|
113
|
+
if (ve.call(l, "key")) {
|
|
114
|
+
var y = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
115
115
|
if (y && y.isReactWarning) return !1;
|
|
116
116
|
}
|
|
117
|
-
return
|
|
117
|
+
return l.key !== void 0;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function c(l, y) {
|
|
120
120
|
function b() {
|
|
121
121
|
re || (re = !0, console.error(
|
|
122
122
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
123
123
|
y
|
|
124
124
|
));
|
|
125
125
|
}
|
|
126
|
-
b.isReactWarning = !0, Object.defineProperty(
|
|
126
|
+
b.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
127
127
|
get: b,
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
function p() {
|
|
132
|
-
var
|
|
133
|
-
return Q[
|
|
132
|
+
var l = e(this.type);
|
|
133
|
+
return Q[l] || (Q[l] = !0, console.error(
|
|
134
134
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
|
-
)),
|
|
135
|
+
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
136
136
|
}
|
|
137
|
-
function u(
|
|
137
|
+
function u(l, y, b, k, ne, q) {
|
|
138
138
|
var O = b.ref;
|
|
139
|
-
return
|
|
139
|
+
return l = {
|
|
140
140
|
$$typeof: w,
|
|
141
|
-
type:
|
|
141
|
+
type: l,
|
|
142
142
|
key: y,
|
|
143
143
|
props: b,
|
|
144
144
|
_owner: k
|
|
145
|
-
}, (O !== void 0 ? O : null) !== null ? Object.defineProperty(
|
|
145
|
+
}, (O !== void 0 ? O : null) !== null ? Object.defineProperty(l, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
147
147
|
get: p
|
|
148
|
-
}) : Object.defineProperty(
|
|
148
|
+
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
149
149
|
configurable: !1,
|
|
150
150
|
enumerable: !1,
|
|
151
151
|
writable: !0,
|
|
152
152
|
value: 0
|
|
153
|
-
}), Object.defineProperty(
|
|
153
|
+
}), Object.defineProperty(l, "_debugInfo", {
|
|
154
154
|
configurable: !1,
|
|
155
155
|
enumerable: !1,
|
|
156
156
|
writable: !0,
|
|
157
157
|
value: null
|
|
158
|
-
}), Object.defineProperty(
|
|
158
|
+
}), Object.defineProperty(l, "_debugStack", {
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
162
|
value: ne
|
|
163
|
-
}), Object.defineProperty(
|
|
163
|
+
}), Object.defineProperty(l, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
167
|
value: q
|
|
168
|
-
}), Object.freeze && (Object.freeze(
|
|
168
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
169
169
|
}
|
|
170
|
-
function v(
|
|
170
|
+
function v(l, y, b, k, ne, q) {
|
|
171
171
|
var O = y.children;
|
|
172
172
|
if (O !== void 0)
|
|
173
173
|
if (k)
|
|
174
|
-
if (
|
|
174
|
+
if (be(O)) {
|
|
175
175
|
for (k = 0; k < O.length; k++)
|
|
176
176
|
m(O[k]);
|
|
177
177
|
Object.freeze && Object.freeze(O);
|
|
@@ -180,12 +180,12 @@ function Gt() {
|
|
|
180
180
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
181
|
);
|
|
182
182
|
else m(O);
|
|
183
|
-
if (
|
|
184
|
-
O = e(
|
|
185
|
-
var V = Object.keys(y).filter(function(
|
|
186
|
-
return
|
|
183
|
+
if (ve.call(y, "key")) {
|
|
184
|
+
O = e(l);
|
|
185
|
+
var V = Object.keys(y).filter(function(_e) {
|
|
186
|
+
return _e !== "key";
|
|
187
187
|
});
|
|
188
|
-
k = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
188
|
+
k = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Ce[O + k] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
190
|
let props = %s;
|
|
191
191
|
<%s {...props} />
|
|
@@ -196,81 +196,81 @@ React keys must be passed directly to JSX without using spread:
|
|
|
196
196
|
O,
|
|
197
197
|
V,
|
|
198
198
|
O
|
|
199
|
-
),
|
|
199
|
+
), Ce[O + k] = !0);
|
|
200
200
|
}
|
|
201
201
|
if (O = null, b !== void 0 && (r(b), O = "" + b), i(y) && (r(y.key), O = "" + y.key), "key" in y) {
|
|
202
202
|
b = {};
|
|
203
203
|
for (var de in y)
|
|
204
204
|
de !== "key" && (b[de] = y[de]);
|
|
205
205
|
} else b = y;
|
|
206
|
-
return O &&
|
|
206
|
+
return O && c(
|
|
207
207
|
b,
|
|
208
|
-
typeof
|
|
208
|
+
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
209
209
|
), u(
|
|
210
|
-
|
|
210
|
+
l,
|
|
211
211
|
O,
|
|
212
212
|
b,
|
|
213
|
-
|
|
213
|
+
a(),
|
|
214
214
|
ne,
|
|
215
215
|
q
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
|
-
function m(
|
|
219
|
-
x(
|
|
218
|
+
function m(l) {
|
|
219
|
+
x(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === we && (l._payload.status === "fulfilled" ? x(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
220
220
|
}
|
|
221
|
-
function x(
|
|
222
|
-
return typeof
|
|
221
|
+
function x(l) {
|
|
222
|
+
return typeof l == "object" && l !== null && l.$$typeof === w;
|
|
223
223
|
}
|
|
224
|
-
var f = Tt, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), P = /* @__PURE__ */ Symbol.for("react.fragment"), z = /* @__PURE__ */ Symbol.for("react.strict_mode"), D = /* @__PURE__ */ Symbol.for("react.profiler"), A = /* @__PURE__ */ Symbol.for("react.consumer"), F = /* @__PURE__ */ Symbol.for("react.context"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), W = /* @__PURE__ */ Symbol.for("react.suspense"), $ = /* @__PURE__ */ Symbol.for("react.suspense_list"), H = /* @__PURE__ */ Symbol.for("react.memo"),
|
|
224
|
+
var f = Tt, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), P = /* @__PURE__ */ Symbol.for("react.fragment"), z = /* @__PURE__ */ Symbol.for("react.strict_mode"), D = /* @__PURE__ */ Symbol.for("react.profiler"), A = /* @__PURE__ */ Symbol.for("react.consumer"), F = /* @__PURE__ */ Symbol.for("react.context"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), W = /* @__PURE__ */ Symbol.for("react.suspense"), $ = /* @__PURE__ */ Symbol.for("react.suspense_list"), H = /* @__PURE__ */ Symbol.for("react.memo"), we = /* @__PURE__ */ Symbol.for("react.lazy"), Be = /* @__PURE__ */ Symbol.for("react.activity"), ce = /* @__PURE__ */ Symbol.for("react.client.reference"), te = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ve = Object.prototype.hasOwnProperty, be = Array.isArray, B = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
227
|
f = {
|
|
228
|
-
react_stack_bottom_frame: function(
|
|
229
|
-
return
|
|
228
|
+
react_stack_bottom_frame: function(l) {
|
|
229
|
+
return l();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
232
|
var re, Q = {}, le = f.react_stack_bottom_frame.bind(
|
|
233
233
|
f,
|
|
234
|
-
|
|
235
|
-
)(), U = B(n(
|
|
236
|
-
he.Fragment = P, he.jsx = function(
|
|
234
|
+
s
|
|
235
|
+
)(), U = B(n(s)), Ce = {};
|
|
236
|
+
he.Fragment = P, he.jsx = function(l, y, b) {
|
|
237
237
|
var k = 1e4 > te.recentlyCreatedOwnerStacks++;
|
|
238
238
|
return v(
|
|
239
|
-
|
|
239
|
+
l,
|
|
240
240
|
y,
|
|
241
241
|
b,
|
|
242
242
|
!1,
|
|
243
243
|
k ? Error("react-stack-top-frame") : le,
|
|
244
|
-
k ? B(n(
|
|
244
|
+
k ? B(n(l)) : U
|
|
245
245
|
);
|
|
246
|
-
}, he.jsxs = function(
|
|
246
|
+
}, he.jsxs = function(l, y, b) {
|
|
247
247
|
var k = 1e4 > te.recentlyCreatedOwnerStacks++;
|
|
248
248
|
return v(
|
|
249
|
-
|
|
249
|
+
l,
|
|
250
250
|
y,
|
|
251
251
|
b,
|
|
252
252
|
!0,
|
|
253
253
|
k ? Error("react-stack-top-frame") : le,
|
|
254
|
-
k ? B(n(
|
|
254
|
+
k ? B(n(l)) : U
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
257
|
})()), he;
|
|
258
258
|
}
|
|
259
259
|
var Ze;
|
|
260
260
|
function Lt() {
|
|
261
|
-
return Ze || (Ze = 1, process.env.NODE_ENV === "production" ?
|
|
261
|
+
return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? Se.exports = $t() : Se.exports = Gt()), Se.exports;
|
|
262
262
|
}
|
|
263
263
|
var o = Lt();
|
|
264
264
|
const Nt = ({ children: e }) => {
|
|
265
265
|
const t = ge(null), [r, n] = j(null);
|
|
266
266
|
return Z(() => {
|
|
267
267
|
if (t.current && !t.current.shadowRoot) {
|
|
268
|
-
const
|
|
269
|
-
document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach((
|
|
270
|
-
(
|
|
268
|
+
const a = t.current.attachShadow({ mode: "open" });
|
|
269
|
+
document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach((c) => {
|
|
270
|
+
(c.textContent?.includes(".vg-") || c.textContent?.includes("--vg-")) && a.appendChild(c.cloneNode(!0));
|
|
271
271
|
});
|
|
272
272
|
const i = document.createElement("link");
|
|
273
|
-
i.rel = "stylesheet", i.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",
|
|
273
|
+
i.rel = "stylesheet", i.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap", a.appendChild(i), n(a);
|
|
274
274
|
}
|
|
275
275
|
}, []), /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ShadowRootWrapper.tsx:38", ref: t, id: "viewgate-shadow-host", children: r && At(e, r) });
|
|
276
276
|
};
|
|
@@ -307,11 +307,11 @@ const Ft = mt(
|
|
|
307
307
|
size: t = 24,
|
|
308
308
|
strokeWidth: r = 2,
|
|
309
309
|
absoluteStrokeWidth: n,
|
|
310
|
-
className:
|
|
311
|
-
children:
|
|
310
|
+
className: a = "",
|
|
311
|
+
children: s,
|
|
312
312
|
iconNode: i,
|
|
313
|
-
...
|
|
314
|
-
}, p) =>
|
|
313
|
+
...c
|
|
314
|
+
}, p) => Ie(
|
|
315
315
|
"svg",
|
|
316
316
|
{
|
|
317
317
|
ref: p,
|
|
@@ -320,27 +320,27 @@ const Ft = mt(
|
|
|
320
320
|
height: t,
|
|
321
321
|
stroke: e,
|
|
322
322
|
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
323
|
-
className: ft("lucide",
|
|
324
|
-
...!
|
|
325
|
-
...
|
|
323
|
+
className: ft("lucide", a),
|
|
324
|
+
...!s && !Dt(c) && { "aria-hidden": "true" },
|
|
325
|
+
...c
|
|
326
326
|
},
|
|
327
327
|
[
|
|
328
|
-
...i.map(([u, v]) =>
|
|
329
|
-
...Array.isArray(
|
|
328
|
+
...i.map(([u, v]) => Ie(u, v)),
|
|
329
|
+
...Array.isArray(s) ? s : [s]
|
|
330
330
|
]
|
|
331
331
|
)
|
|
332
332
|
);
|
|
333
333
|
const N = (e, t) => {
|
|
334
334
|
const r = mt(
|
|
335
|
-
({ className: n, ...
|
|
336
|
-
ref:
|
|
335
|
+
({ className: n, ...a }, s) => Ie(Ft, {
|
|
336
|
+
ref: s,
|
|
337
337
|
iconNode: t,
|
|
338
338
|
className: ft(
|
|
339
339
|
`lucide-${Mt(Ke(e))}`,
|
|
340
340
|
`lucide-${e}`,
|
|
341
341
|
n
|
|
342
342
|
),
|
|
343
|
-
...
|
|
343
|
+
...a
|
|
344
344
|
})
|
|
345
345
|
);
|
|
346
346
|
return r.displayName = Ke(e), r;
|
|
@@ -390,7 +390,7 @@ const Qt = [
|
|
|
390
390
|
key: "18887p"
|
|
391
391
|
}
|
|
392
392
|
]
|
|
393
|
-
],
|
|
393
|
+
], Ae = N("message-square", Qt);
|
|
394
394
|
const er = [
|
|
395
395
|
[
|
|
396
396
|
"path",
|
|
@@ -410,10 +410,10 @@ const rr = [
|
|
|
410
410
|
],
|
|
411
411
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
412
412
|
], nr = N("pencil", rr);
|
|
413
|
-
const
|
|
413
|
+
const sr = [
|
|
414
414
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
415
415
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
416
|
-
],
|
|
416
|
+
], ar = N("rotate-ccw", sr);
|
|
417
417
|
const or = [
|
|
418
418
|
[
|
|
419
419
|
"path",
|
|
@@ -434,7 +434,7 @@ const cr = [
|
|
|
434
434
|
const lr = [
|
|
435
435
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
436
436
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
437
|
-
],
|
|
437
|
+
], $e = N("x", lr), dr = {
|
|
438
438
|
en: {
|
|
439
439
|
enterMode: "Enter Feedback Mode",
|
|
440
440
|
exitMode: "Exit Mode",
|
|
@@ -531,25 +531,25 @@ const lr = [
|
|
|
531
531
|
const e = Pt(ht);
|
|
532
532
|
if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
|
|
533
533
|
return e;
|
|
534
|
-
},
|
|
534
|
+
}, ze = "viewgate_enabled", pr = () => typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("viewgate") ? (sessionStorage.setItem(ze, "true"), !0) : sessionStorage.getItem(ze) === "true", En = ({
|
|
535
535
|
children: e,
|
|
536
536
|
language: t = "es",
|
|
537
537
|
apiKey: r,
|
|
538
538
|
baseUrl: n = "https://view-gate.vercel.app"
|
|
539
539
|
}) => {
|
|
540
|
-
const [
|
|
540
|
+
const [a, s] = j(!1), [i, c] = j([]);
|
|
541
541
|
Z(() => {
|
|
542
|
-
|
|
542
|
+
s(pr());
|
|
543
543
|
}, []);
|
|
544
544
|
const p = () => {
|
|
545
|
-
if (sessionStorage.removeItem(
|
|
545
|
+
if (sessionStorage.removeItem(ze), s(!1), typeof window < "u") {
|
|
546
546
|
const m = new URL(window.location.href);
|
|
547
547
|
m.searchParams.delete("viewgate"), window.history.replaceState({}, "", m.toString());
|
|
548
548
|
}
|
|
549
549
|
}, u = (m, x) => {
|
|
550
550
|
const f = Date.now();
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
c((w) => [...w, { id: f, message: m, type: x }]), setTimeout(() => {
|
|
552
|
+
c((w) => w.filter((T) => T.id !== f));
|
|
553
553
|
}, 4e3);
|
|
554
554
|
}, v = dr[t];
|
|
555
555
|
return /* @__PURE__ */ o.jsxs(ht.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:248", value: {
|
|
@@ -562,7 +562,7 @@ const lr = [
|
|
|
562
562
|
hasActiveToasts: i.length > 0
|
|
563
563
|
}, children: [
|
|
564
564
|
e,
|
|
565
|
-
|
|
565
|
+
a && /* @__PURE__ */ o.jsx(Nt, { "data-source-path": "/src/components/ViewGateProvider.tsx:259", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:260", className: "vg-container", children: [
|
|
566
566
|
/* @__PURE__ */ o.jsx(vn, { "data-source-path": "/src/components/ViewGateProvider.tsx:261" }),
|
|
567
567
|
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:262", className: "vg-toasts", style: { zIndex: 2147483646 }, children: i.map((m) => /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:264", className: `vg-toast vg-animate-slide ${m.type}`, children: [
|
|
568
568
|
m.type === "success" ? /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateProvider.tsx:266", size: 24, color: "#22c55e" }) : /* @__PURE__ */ o.jsx(Wt, { "data-source-path": "/src/components/ViewGateProvider.tsx:268", size: 24, color: "#ef4444" }),
|
|
@@ -581,8 +581,8 @@ function mr(e, t) {
|
|
|
581
581
|
return window.location.protocol + e;
|
|
582
582
|
if (e.match(/^[a-z]+:/i))
|
|
583
583
|
return e;
|
|
584
|
-
const r = document.implementation.createHTMLDocument(), n = r.createElement("base"),
|
|
585
|
-
return r.head.appendChild(n), r.body.appendChild(
|
|
584
|
+
const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), a = r.createElement("a");
|
|
585
|
+
return r.head.appendChild(n), r.body.appendChild(a), t && (n.href = t), a.href = e, a.href;
|
|
586
586
|
}
|
|
587
587
|
const fr = /* @__PURE__ */ (() => {
|
|
588
588
|
let e = 0;
|
|
@@ -598,20 +598,20 @@ function K(e) {
|
|
|
598
598
|
t.push(e[r]);
|
|
599
599
|
return t;
|
|
600
600
|
}
|
|
601
|
-
let
|
|
601
|
+
let ae = null;
|
|
602
602
|
function gt(e = {}) {
|
|
603
|
-
return
|
|
603
|
+
return ae || (e.includeStyleProperties ? (ae = e.includeStyleProperties, ae) : (ae = K(window.getComputedStyle(document.documentElement)), ae));
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function ke(e, t) {
|
|
606
606
|
const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
607
607
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
608
608
|
}
|
|
609
609
|
function hr(e) {
|
|
610
|
-
const t =
|
|
610
|
+
const t = ke(e, "border-left-width"), r = ke(e, "border-right-width");
|
|
611
611
|
return e.clientWidth + t + r;
|
|
612
612
|
}
|
|
613
613
|
function gr(e) {
|
|
614
|
-
const t =
|
|
614
|
+
const t = ke(e, "border-top-width"), r = ke(e, "border-bottom-width");
|
|
615
615
|
return e.clientHeight + t + r;
|
|
616
616
|
}
|
|
617
617
|
function yt(e, t = {}) {
|
|
@@ -631,7 +631,7 @@ const I = 16384;
|
|
|
631
631
|
function xr(e) {
|
|
632
632
|
(e.width > I || e.height > I) && (e.width > I && e.height > I ? e.width > e.height ? (e.height *= I / e.width, e.width = I) : (e.width *= I / e.height, e.height = I) : e.width > I ? (e.height *= I / e.width, e.width = I) : (e.width *= I / e.height, e.height = I));
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Re(e) {
|
|
635
635
|
return new Promise((t, r) => {
|
|
636
636
|
const n = new Image();
|
|
637
637
|
n.onload = () => {
|
|
@@ -645,8 +645,8 @@ async function wr(e) {
|
|
|
645
645
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
|
|
646
646
|
}
|
|
647
647
|
async function vr(e, t, r) {
|
|
648
|
-
const n = "http://www.w3.org/2000/svg",
|
|
649
|
-
return
|
|
648
|
+
const n = "http://www.w3.org/2000/svg", a = document.createElementNS(n, "svg"), s = document.createElementNS(n, "foreignObject");
|
|
649
|
+
return a.setAttribute("width", `${t}`), a.setAttribute("height", `${r}`), a.setAttribute("viewBox", `0 0 ${t} ${r}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), a.appendChild(s), s.appendChild(e), wr(a);
|
|
650
650
|
}
|
|
651
651
|
const L = (e, t) => {
|
|
652
652
|
if (e instanceof t)
|
|
@@ -660,17 +660,17 @@ function br(e) {
|
|
|
660
660
|
}
|
|
661
661
|
function Cr(e, t) {
|
|
662
662
|
return gt(t).map((r) => {
|
|
663
|
-
const n = e.getPropertyValue(r),
|
|
664
|
-
return `${r}: ${n}${
|
|
663
|
+
const n = e.getPropertyValue(r), a = e.getPropertyPriority(r);
|
|
664
|
+
return `${r}: ${n}${a ? " !important" : ""};`;
|
|
665
665
|
}).join(" ");
|
|
666
666
|
}
|
|
667
667
|
function Er(e, t, r, n) {
|
|
668
|
-
const
|
|
669
|
-
return document.createTextNode(`${
|
|
668
|
+
const a = `.${e}:${t}`, s = r.cssText ? br(r) : Cr(r, n);
|
|
669
|
+
return document.createTextNode(`${a}{${s}}`);
|
|
670
670
|
}
|
|
671
671
|
function nt(e, t, r, n) {
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
672
|
+
const a = window.getComputedStyle(e, r), s = a.getPropertyValue("content");
|
|
673
|
+
if (s === "" || s === "none")
|
|
674
674
|
return;
|
|
675
675
|
const i = fr();
|
|
676
676
|
try {
|
|
@@ -678,20 +678,20 @@ function nt(e, t, r, n) {
|
|
|
678
678
|
} catch {
|
|
679
679
|
return;
|
|
680
680
|
}
|
|
681
|
-
const
|
|
682
|
-
|
|
681
|
+
const c = document.createElement("style");
|
|
682
|
+
c.appendChild(Er(i, r, a, n)), t.appendChild(c);
|
|
683
683
|
}
|
|
684
684
|
function Sr(e, t, r) {
|
|
685
685
|
nt(e, t, ":before", r), nt(e, t, ":after", r);
|
|
686
686
|
}
|
|
687
|
-
const
|
|
688
|
-
woff:
|
|
689
|
-
woff2:
|
|
687
|
+
const st = "application/font-woff", at = "image/jpeg", kr = {
|
|
688
|
+
woff: st,
|
|
689
|
+
woff2: st,
|
|
690
690
|
ttf: "application/font-truetype",
|
|
691
691
|
eot: "application/vnd.ms-fontobject",
|
|
692
692
|
png: "image/png",
|
|
693
|
-
jpg:
|
|
694
|
-
jpeg:
|
|
693
|
+
jpg: at,
|
|
694
|
+
jpeg: at,
|
|
695
695
|
gif: "image/gif",
|
|
696
696
|
tiff: "image/tiff",
|
|
697
697
|
svg: "image/svg+xml",
|
|
@@ -708,7 +708,7 @@ function He(e) {
|
|
|
708
708
|
function jr(e) {
|
|
709
709
|
return e.split(/,/)[1];
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function De(e) {
|
|
712
712
|
return e.search(/^(data:)/) !== -1;
|
|
713
713
|
}
|
|
714
714
|
function Or(e, t) {
|
|
@@ -718,58 +718,58 @@ async function xt(e, t, r) {
|
|
|
718
718
|
const n = await fetch(e, t);
|
|
719
719
|
if (n.status === 404)
|
|
720
720
|
throw new Error(`Resource "${n.url}" not found`);
|
|
721
|
-
const
|
|
722
|
-
return new Promise((
|
|
723
|
-
const
|
|
724
|
-
|
|
721
|
+
const a = await n.blob();
|
|
722
|
+
return new Promise((s, i) => {
|
|
723
|
+
const c = new FileReader();
|
|
724
|
+
c.onerror = i, c.onloadend = () => {
|
|
725
725
|
try {
|
|
726
|
-
|
|
726
|
+
s(r({ res: n, result: c.result }));
|
|
727
727
|
} catch (p) {
|
|
728
728
|
i(p);
|
|
729
729
|
}
|
|
730
|
-
},
|
|
730
|
+
}, c.readAsDataURL(a);
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
|
-
const
|
|
733
|
+
const Ge = {};
|
|
734
734
|
function _r(e, t, r) {
|
|
735
735
|
let n = e.replace(/\?.*/, "");
|
|
736
736
|
return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
|
|
737
737
|
}
|
|
738
738
|
async function We(e, t, r) {
|
|
739
739
|
const n = _r(e, t, r.includeQueryParams);
|
|
740
|
-
if (
|
|
741
|
-
return
|
|
740
|
+
if (Ge[n] != null)
|
|
741
|
+
return Ge[n];
|
|
742
742
|
r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
743
|
-
let
|
|
743
|
+
let a;
|
|
744
744
|
try {
|
|
745
|
-
const
|
|
746
|
-
|
|
747
|
-
} catch (
|
|
748
|
-
|
|
745
|
+
const s = await xt(e, r.fetchRequestInit, ({ res: i, result: c }) => (t || (t = i.headers.get("Content-Type") || ""), jr(c)));
|
|
746
|
+
a = Or(s, t);
|
|
747
|
+
} catch (s) {
|
|
748
|
+
a = r.imagePlaceholder || "";
|
|
749
749
|
let i = `Failed to fetch resource: ${e}`;
|
|
750
|
-
|
|
750
|
+
s && (i = typeof s == "string" ? s : s.message), i && console.warn(i);
|
|
751
751
|
}
|
|
752
|
-
return
|
|
752
|
+
return Ge[n] = a, a;
|
|
753
753
|
}
|
|
754
754
|
async function Tr(e) {
|
|
755
755
|
const t = e.toDataURL();
|
|
756
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
756
|
+
return t === "data:," ? e.cloneNode(!1) : Re(t);
|
|
757
757
|
}
|
|
758
758
|
async function Vr(e, t) {
|
|
759
759
|
if (e.currentSrc) {
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
const
|
|
763
|
-
return
|
|
760
|
+
const s = document.createElement("canvas"), i = s.getContext("2d");
|
|
761
|
+
s.width = e.clientWidth, s.height = e.clientHeight, i?.drawImage(e, 0, 0, s.width, s.height);
|
|
762
|
+
const c = s.toDataURL();
|
|
763
|
+
return Re(c);
|
|
764
764
|
}
|
|
765
|
-
const r = e.poster, n = He(r),
|
|
766
|
-
return
|
|
765
|
+
const r = e.poster, n = He(r), a = await We(r, n, t);
|
|
766
|
+
return Re(a);
|
|
767
767
|
}
|
|
768
768
|
async function Pr(e, t) {
|
|
769
769
|
var r;
|
|
770
770
|
try {
|
|
771
771
|
if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
|
|
772
|
-
return await
|
|
772
|
+
return await je(e.contentDocument.body, t, !0);
|
|
773
773
|
} catch {
|
|
774
774
|
}
|
|
775
775
|
return e.cloneNode(!1);
|
|
@@ -779,11 +779,11 @@ async function Ar(e, t) {
|
|
|
779
779
|
}
|
|
780
780
|
const $r = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", wt = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
781
781
|
async function Gr(e, t, r) {
|
|
782
|
-
var n,
|
|
782
|
+
var n, a;
|
|
783
783
|
if (wt(t))
|
|
784
784
|
return t;
|
|
785
|
-
let
|
|
786
|
-
return $r(e) && e.assignedNodes ?
|
|
785
|
+
let s = [];
|
|
786
|
+
return $r(e) && e.assignedNodes ? s = K(e.assignedNodes()) : L(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = K(e.contentDocument.body.childNodes) : s = K(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || L(e, HTMLVideoElement) || await s.reduce((i, c) => i.then(() => je(c, r)).then((p) => {
|
|
787
787
|
p && t.appendChild(p);
|
|
788
788
|
}), Promise.resolve()), t;
|
|
789
789
|
}
|
|
@@ -791,10 +791,10 @@ function Lr(e, t, r) {
|
|
|
791
791
|
const n = t.style;
|
|
792
792
|
if (!n)
|
|
793
793
|
return;
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
let i =
|
|
797
|
-
|
|
794
|
+
const a = window.getComputedStyle(e);
|
|
795
|
+
a.cssText ? (n.cssText = a.cssText, n.transformOrigin = a.transformOrigin) : gt(r).forEach((s) => {
|
|
796
|
+
let i = a.getPropertyValue(s);
|
|
797
|
+
s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), L(e, HTMLIFrameElement) && s === "display" && i === "inline" && (i = "block"), s === "d" && t.getAttribute("d") && (i = `path(${t.getAttribute("d")})`), n.setProperty(s, i, a.getPropertyPriority(s));
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
800
|
function Nr(e, t) {
|
|
@@ -802,7 +802,7 @@ function Nr(e, t) {
|
|
|
802
802
|
}
|
|
803
803
|
function Mr(e, t) {
|
|
804
804
|
if (L(e, HTMLSelectElement)) {
|
|
805
|
-
const n = Array.from(t.children).find((
|
|
805
|
+
const n = Array.from(t.children).find((a) => e.value === a.getAttribute("value"));
|
|
806
806
|
n && n.setAttribute("selected", "");
|
|
807
807
|
}
|
|
808
808
|
}
|
|
@@ -814,26 +814,26 @@ async function zr(e, t) {
|
|
|
814
814
|
if (r.length === 0)
|
|
815
815
|
return e;
|
|
816
816
|
const n = {};
|
|
817
|
-
for (let
|
|
818
|
-
const
|
|
819
|
-
if (
|
|
820
|
-
const p = e.querySelector(
|
|
821
|
-
!p && u && !n[
|
|
817
|
+
for (let s = 0; s < r.length; s++) {
|
|
818
|
+
const c = r[s].getAttribute("xlink:href");
|
|
819
|
+
if (c) {
|
|
820
|
+
const p = e.querySelector(c), u = document.querySelector(c);
|
|
821
|
+
!p && u && !n[c] && (n[c] = await je(u, t, !0));
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
const
|
|
825
|
-
if (
|
|
826
|
-
const
|
|
827
|
-
i.setAttribute("xmlns",
|
|
828
|
-
const
|
|
829
|
-
i.appendChild(
|
|
830
|
-
for (let p = 0; p <
|
|
831
|
-
|
|
824
|
+
const a = Object.values(n);
|
|
825
|
+
if (a.length) {
|
|
826
|
+
const s = "http://www.w3.org/1999/xhtml", i = document.createElementNS(s, "svg");
|
|
827
|
+
i.setAttribute("xmlns", s), i.style.position = "absolute", i.style.width = "0", i.style.height = "0", i.style.overflow = "hidden", i.style.display = "none";
|
|
828
|
+
const c = document.createElementNS(s, "defs");
|
|
829
|
+
i.appendChild(c);
|
|
830
|
+
for (let p = 0; p < a.length; p++)
|
|
831
|
+
c.appendChild(a[p]);
|
|
832
832
|
e.appendChild(i);
|
|
833
833
|
}
|
|
834
834
|
return e;
|
|
835
835
|
}
|
|
836
|
-
async function
|
|
836
|
+
async function je(e, t, r) {
|
|
837
837
|
return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => Ar(n, t)).then((n) => Gr(e, n, t)).then((n) => Ir(e, n, t)).then((n) => zr(n, t));
|
|
838
838
|
}
|
|
839
839
|
const vt = /url\((['"]?)([^'"]+?)\1\)/g, Dr = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Fr = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
@@ -843,13 +843,13 @@ function Hr(e) {
|
|
|
843
843
|
}
|
|
844
844
|
function Wr(e) {
|
|
845
845
|
const t = [];
|
|
846
|
-
return e.replace(vt, (r, n,
|
|
846
|
+
return e.replace(vt, (r, n, a) => (t.push(a), r)), t.filter((r) => !De(r));
|
|
847
847
|
}
|
|
848
|
-
async function Br(e, t, r, n,
|
|
848
|
+
async function Br(e, t, r, n, a) {
|
|
849
849
|
try {
|
|
850
|
-
const
|
|
851
|
-
let
|
|
852
|
-
return
|
|
850
|
+
const s = r ? mr(t, r) : t, i = He(t);
|
|
851
|
+
let c;
|
|
852
|
+
return a || (c = await We(s, i, n)), e.replace(Hr(t), `$1${c}$3`);
|
|
853
853
|
} catch {
|
|
854
854
|
}
|
|
855
855
|
return e;
|
|
@@ -857,10 +857,10 @@ async function Br(e, t, r, n, s) {
|
|
|
857
857
|
function Ur(e, { preferredFontFormat: t }) {
|
|
858
858
|
return t ? e.replace(Fr, (r) => {
|
|
859
859
|
for (; ; ) {
|
|
860
|
-
const [n, ,
|
|
861
|
-
if (!
|
|
860
|
+
const [n, , a] = Dr.exec(r) || [];
|
|
861
|
+
if (!a)
|
|
862
862
|
return "";
|
|
863
|
-
if (
|
|
863
|
+
if (a === t)
|
|
864
864
|
return `src: ${n};`;
|
|
865
865
|
}
|
|
866
866
|
}) : e;
|
|
@@ -872,14 +872,14 @@ async function Ct(e, t, r) {
|
|
|
872
872
|
if (!bt(e))
|
|
873
873
|
return e;
|
|
874
874
|
const n = Ur(e, r);
|
|
875
|
-
return Wr(n).reduce((
|
|
875
|
+
return Wr(n).reduce((s, i) => s.then((c) => Br(c, i, t, r)), Promise.resolve(n));
|
|
876
876
|
}
|
|
877
877
|
async function oe(e, t, r) {
|
|
878
878
|
var n;
|
|
879
|
-
const
|
|
880
|
-
if (
|
|
881
|
-
const
|
|
882
|
-
return t.style.setProperty(e,
|
|
879
|
+
const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
|
|
880
|
+
if (a) {
|
|
881
|
+
const s = await Ct(a, null, r);
|
|
882
|
+
return t.style.setProperty(e, s, t.style.getPropertyPriority(e)), !0;
|
|
883
883
|
}
|
|
884
884
|
return !1;
|
|
885
885
|
}
|
|
@@ -888,23 +888,23 @@ async function qr(e, t) {
|
|
|
888
888
|
}
|
|
889
889
|
async function Yr(e, t) {
|
|
890
890
|
const r = L(e, HTMLImageElement);
|
|
891
|
-
if (!(r && !
|
|
891
|
+
if (!(r && !De(e.src)) && !(L(e, SVGImageElement) && !De(e.href.baseVal)))
|
|
892
892
|
return;
|
|
893
|
-
const n = r ? e.src : e.href.baseVal,
|
|
894
|
-
await new Promise((
|
|
895
|
-
e.onload =
|
|
893
|
+
const n = r ? e.src : e.href.baseVal, a = await We(n, He(n), t);
|
|
894
|
+
await new Promise((s, i) => {
|
|
895
|
+
e.onload = s, e.onerror = t.onImageErrorHandler ? (...p) => {
|
|
896
896
|
try {
|
|
897
|
-
|
|
897
|
+
s(t.onImageErrorHandler(...p));
|
|
898
898
|
} catch (u) {
|
|
899
899
|
i(u);
|
|
900
900
|
}
|
|
901
901
|
} : i;
|
|
902
|
-
const
|
|
903
|
-
|
|
902
|
+
const c = e;
|
|
903
|
+
c.decode && (c.decode = s), c.loading === "lazy" && (c.loading = "eager"), r ? (e.srcset = "", e.src = a) : e.href.baseVal = a;
|
|
904
904
|
});
|
|
905
905
|
}
|
|
906
906
|
async function Xr(e, t) {
|
|
907
|
-
const n = K(e.childNodes).map((
|
|
907
|
+
const n = K(e.childNodes).map((a) => Et(a, t));
|
|
908
908
|
await Promise.all(n).then(() => e);
|
|
909
909
|
}
|
|
910
910
|
async function Et(e, t) {
|
|
@@ -914,8 +914,8 @@ function Jr(e, t) {
|
|
|
914
914
|
const { style: r } = e;
|
|
915
915
|
t.backgroundColor && (r.backgroundColor = t.backgroundColor), t.width && (r.width = `${t.width}px`), t.height && (r.height = `${t.height}px`);
|
|
916
916
|
const n = t.style;
|
|
917
|
-
return n != null && Object.keys(n).forEach((
|
|
918
|
-
r[
|
|
917
|
+
return n != null && Object.keys(n).forEach((a) => {
|
|
918
|
+
r[a] = n[a];
|
|
919
919
|
}), e;
|
|
920
920
|
}
|
|
921
921
|
const ot = {};
|
|
@@ -928,49 +928,49 @@ async function it(e) {
|
|
|
928
928
|
}
|
|
929
929
|
async function ct(e, t) {
|
|
930
930
|
let r = e.cssText;
|
|
931
|
-
const n = /url\(["']?([^"')]+)["']?\)/g,
|
|
932
|
-
let
|
|
933
|
-
return
|
|
931
|
+
const n = /url\(["']?([^"')]+)["']?\)/g, s = (r.match(/url\([^)]+\)/g) || []).map(async (i) => {
|
|
932
|
+
let c = i.replace(n, "$1");
|
|
933
|
+
return c.startsWith("https://") || (c = new URL(c, e.url).href), xt(c, t.fetchRequestInit, ({ result: p }) => (r = r.replace(i, `url(${p})`), [i, p]));
|
|
934
934
|
});
|
|
935
|
-
return Promise.all(
|
|
935
|
+
return Promise.all(s).then(() => r);
|
|
936
936
|
}
|
|
937
937
|
function lt(e) {
|
|
938
938
|
if (e == null)
|
|
939
939
|
return [];
|
|
940
940
|
const t = [], r = /(\/\*[\s\S]*?\*\/)/gi;
|
|
941
941
|
let n = e.replace(r, "");
|
|
942
|
-
const
|
|
942
|
+
const a = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
943
943
|
for (; ; ) {
|
|
944
|
-
const p =
|
|
944
|
+
const p = a.exec(n);
|
|
945
945
|
if (p === null)
|
|
946
946
|
break;
|
|
947
947
|
t.push(p[0]);
|
|
948
948
|
}
|
|
949
|
-
n = n.replace(
|
|
950
|
-
const
|
|
949
|
+
n = n.replace(a, "");
|
|
950
|
+
const s = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, i = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", c = new RegExp(i, "gi");
|
|
951
951
|
for (; ; ) {
|
|
952
|
-
let p =
|
|
952
|
+
let p = s.exec(n);
|
|
953
953
|
if (p === null) {
|
|
954
|
-
if (p =
|
|
954
|
+
if (p = c.exec(n), p === null)
|
|
955
955
|
break;
|
|
956
|
-
|
|
956
|
+
s.lastIndex = c.lastIndex;
|
|
957
957
|
} else
|
|
958
|
-
|
|
958
|
+
c.lastIndex = s.lastIndex;
|
|
959
959
|
t.push(p[0]);
|
|
960
960
|
}
|
|
961
961
|
return t;
|
|
962
962
|
}
|
|
963
963
|
async function Zr(e, t) {
|
|
964
964
|
const r = [], n = [];
|
|
965
|
-
return e.forEach((
|
|
966
|
-
if ("cssRules" in
|
|
965
|
+
return e.forEach((a) => {
|
|
966
|
+
if ("cssRules" in a)
|
|
967
967
|
try {
|
|
968
|
-
K(
|
|
969
|
-
if (
|
|
970
|
-
let
|
|
971
|
-
const p =
|
|
968
|
+
K(a.cssRules || []).forEach((s, i) => {
|
|
969
|
+
if (s.type === CSSRule.IMPORT_RULE) {
|
|
970
|
+
let c = i + 1;
|
|
971
|
+
const p = s.href, u = it(p).then((v) => ct(v, t)).then((v) => lt(v).forEach((m) => {
|
|
972
972
|
try {
|
|
973
|
-
|
|
973
|
+
a.insertRule(m, m.startsWith("@import") ? c += 1 : a.cssRules.length);
|
|
974
974
|
} catch (x) {
|
|
975
975
|
console.error("Error inserting rule from remote css", {
|
|
976
976
|
rule: m,
|
|
@@ -983,22 +983,22 @@ async function Zr(e, t) {
|
|
|
983
983
|
n.push(u);
|
|
984
984
|
}
|
|
985
985
|
});
|
|
986
|
-
} catch (
|
|
987
|
-
const i = e.find((
|
|
988
|
-
|
|
986
|
+
} catch (s) {
|
|
987
|
+
const i = e.find((c) => c.href == null) || document.styleSheets[0];
|
|
988
|
+
a.href != null && n.push(it(a.href).then((c) => ct(c, t)).then((c) => lt(c).forEach((p) => {
|
|
989
989
|
i.insertRule(p, i.cssRules.length);
|
|
990
|
-
})).catch((
|
|
991
|
-
console.error("Error loading remote stylesheet",
|
|
992
|
-
})), console.error("Error inlining remote css file",
|
|
990
|
+
})).catch((c) => {
|
|
991
|
+
console.error("Error loading remote stylesheet", c);
|
|
992
|
+
})), console.error("Error inlining remote css file", s);
|
|
993
993
|
}
|
|
994
|
-
}), Promise.all(n).then(() => (e.forEach((
|
|
995
|
-
if ("cssRules" in
|
|
994
|
+
}), Promise.all(n).then(() => (e.forEach((a) => {
|
|
995
|
+
if ("cssRules" in a)
|
|
996
996
|
try {
|
|
997
|
-
K(
|
|
998
|
-
r.push(
|
|
997
|
+
K(a.cssRules || []).forEach((s) => {
|
|
998
|
+
r.push(s);
|
|
999
999
|
});
|
|
1000
|
-
} catch (
|
|
1001
|
-
console.error(`Error while reading CSS rules from ${
|
|
1000
|
+
} catch (s) {
|
|
1001
|
+
console.error(`Error while reading CSS rules from ${a.href}`, s);
|
|
1002
1002
|
}
|
|
1003
1003
|
}), r));
|
|
1004
1004
|
}
|
|
@@ -1017,41 +1017,41 @@ function St(e) {
|
|
|
1017
1017
|
function en(e) {
|
|
1018
1018
|
const t = /* @__PURE__ */ new Set();
|
|
1019
1019
|
function r(n) {
|
|
1020
|
-
(n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((
|
|
1021
|
-
t.add(St(
|
|
1022
|
-
}), Array.from(n.children).forEach((
|
|
1023
|
-
|
|
1020
|
+
(n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((s) => {
|
|
1021
|
+
t.add(St(s));
|
|
1022
|
+
}), Array.from(n.children).forEach((s) => {
|
|
1023
|
+
s instanceof HTMLElement && r(s);
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
1026
|
return r(e), t;
|
|
1027
1027
|
}
|
|
1028
1028
|
async function tn(e, t) {
|
|
1029
1029
|
const r = await Qr(e, t), n = en(e);
|
|
1030
|
-
return (await Promise.all(r.filter((
|
|
1031
|
-
const i =
|
|
1032
|
-
return Ct(
|
|
1030
|
+
return (await Promise.all(r.filter((s) => n.has(St(s.style.fontFamily))).map((s) => {
|
|
1031
|
+
const i = s.parentStyleSheet ? s.parentStyleSheet.href : null;
|
|
1032
|
+
return Ct(s.cssText, i, t);
|
|
1033
1033
|
}))).join(`
|
|
1034
1034
|
`);
|
|
1035
1035
|
}
|
|
1036
1036
|
async function rn(e, t) {
|
|
1037
1037
|
const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await tn(e, t);
|
|
1038
1038
|
if (r) {
|
|
1039
|
-
const n = document.createElement("style"),
|
|
1040
|
-
n.appendChild(
|
|
1039
|
+
const n = document.createElement("style"), a = document.createTextNode(r);
|
|
1040
|
+
n.appendChild(a), e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n);
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
1043
|
async function nn(e, t = {}) {
|
|
1044
|
-
const { width: r, height: n } = yt(e, t),
|
|
1045
|
-
return await rn(
|
|
1044
|
+
const { width: r, height: n } = yt(e, t), a = await je(e, t, !0);
|
|
1045
|
+
return await rn(a, t), await Et(a, t), Jr(a, t), await vr(a, r, n);
|
|
1046
1046
|
}
|
|
1047
|
-
async function
|
|
1048
|
-
const { width: r, height: n } = yt(e, t),
|
|
1049
|
-
return i.width = u * p, i.height = v * p, t.skipAutoScale || xr(i), i.style.width = `${u}`, i.style.height = `${v}`, t.backgroundColor && (
|
|
1047
|
+
async function sn(e, t = {}) {
|
|
1048
|
+
const { width: r, height: n } = yt(e, t), a = await nn(e, t), s = await Re(a), i = document.createElement("canvas"), c = i.getContext("2d"), p = t.pixelRatio || yr(), u = t.canvasWidth || r, v = t.canvasHeight || n;
|
|
1049
|
+
return i.width = u * p, i.height = v * p, t.skipAutoScale || xr(i), i.style.width = `${u}`, i.style.height = `${v}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, i.width, i.height)), c.drawImage(s, 0, 0, i.width, i.height), i;
|
|
1050
1050
|
}
|
|
1051
1051
|
async function dt(e, t = {}) {
|
|
1052
|
-
return (await
|
|
1052
|
+
return (await sn(e, t)).toDataURL();
|
|
1053
1053
|
}
|
|
1054
|
-
const
|
|
1054
|
+
const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 15, xe = "data-vg-pin-id", ln = () => {
|
|
1055
1055
|
const e = window.innerWidth;
|
|
1056
1056
|
return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
|
|
1057
1057
|
}, dn = (e) => {
|
|
@@ -1085,10 +1085,10 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1085
1085
|
neighborCount: e.parentElement?.children.length || 0
|
|
1086
1086
|
}, n = e.getAttribute("aria-label");
|
|
1087
1087
|
n && (r.ariaLabel = n);
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
const
|
|
1091
|
-
return
|
|
1088
|
+
const a = e.getAttribute("role");
|
|
1089
|
+
a && (r.role = a);
|
|
1090
|
+
const s = e.getAttribute("name");
|
|
1091
|
+
return s && (r.name = s), r;
|
|
1092
1092
|
}, mn = /* @__PURE__ */ (() => {
|
|
1093
1093
|
let e = null, t = null;
|
|
1094
1094
|
return (r) => {
|
|
@@ -1097,32 +1097,32 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1097
1097
|
try {
|
|
1098
1098
|
if (e || (e = document.createElement("canvas"), e.width = 1, e.height = 1), t || (t = e.getContext("2d", { willReadFrequently: !0 })), t) {
|
|
1099
1099
|
t.fillStyle = "#000000", t.fillStyle = r;
|
|
1100
|
-
const
|
|
1101
|
-
if (
|
|
1102
|
-
return
|
|
1100
|
+
const s = t.fillStyle;
|
|
1101
|
+
if (s && !s.includes("oklch") && !s.includes("oklab"))
|
|
1102
|
+
return s;
|
|
1103
1103
|
}
|
|
1104
1104
|
const n = document.createElement("div");
|
|
1105
1105
|
n.style.color = r, document.body.appendChild(n);
|
|
1106
|
-
const
|
|
1107
|
-
return document.body.removeChild(n),
|
|
1106
|
+
const a = getComputedStyle(n).color;
|
|
1107
|
+
return document.body.removeChild(n), a && !a.includes("oklch") ? a : "rgb(0,0,0)";
|
|
1108
1108
|
} catch {
|
|
1109
1109
|
return "rgb(0,0,0)";
|
|
1110
1110
|
}
|
|
1111
1111
|
return r;
|
|
1112
1112
|
};
|
|
1113
|
-
})(), ut = (e, t, r, n) => new Promise((
|
|
1114
|
-
const
|
|
1115
|
-
|
|
1116
|
-
const i = document.createElement("canvas"),
|
|
1117
|
-
i.width = p *
|
|
1113
|
+
})(), ut = (e, t, r, n) => new Promise((a) => {
|
|
1114
|
+
const s = new Image();
|
|
1115
|
+
s.onload = () => {
|
|
1116
|
+
const i = document.createElement("canvas"), c = window.devicePixelRatio || 1, p = t.width + r * 2, u = t.height + r * 2;
|
|
1117
|
+
i.width = p * c, i.height = u * c;
|
|
1118
1118
|
const v = i.getContext("2d");
|
|
1119
1119
|
if (v) {
|
|
1120
|
-
v.scale(
|
|
1120
|
+
v.scale(c, c);
|
|
1121
1121
|
let m = (t.left - r) * n, x = (t.top - r) * n, f = p * n, w = u * n, T = 0, P = 0, z = p, D = u;
|
|
1122
|
-
m < 0 && (T = Math.abs(m) / n, f += m, z -= T, m = 0), m + f >
|
|
1122
|
+
m < 0 && (T = Math.abs(m) / n, f += m, z -= T, m = 0), m + f > s.width && (f = s.width - m, z = f / n), x < 0 && (P = Math.abs(x) / n, w += x, D -= P, x = 0), x + w > s.height && (w = s.height - x, D = w / n), v.fillStyle = "#ffffff", v.fillRect(0, 0, p, u), f > 0 && w > 0 && v.drawImage(s, m, x, f, w, T, P, z, D);
|
|
1123
1123
|
}
|
|
1124
|
-
|
|
1125
|
-
},
|
|
1124
|
+
a(i.toDataURL("image/png"));
|
|
1125
|
+
}, s.onerror = () => a(""), s.src = e;
|
|
1126
1126
|
}), fn = (e) => {
|
|
1127
1127
|
const t = window.getComputedStyle(e), r = {};
|
|
1128
1128
|
return [
|
|
@@ -1136,50 +1136,50 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1136
1136
|
"width",
|
|
1137
1137
|
"height",
|
|
1138
1138
|
"z-index"
|
|
1139
|
-
].forEach((
|
|
1140
|
-
const
|
|
1141
|
-
r[
|
|
1139
|
+
].forEach((a) => {
|
|
1140
|
+
const s = t.getPropertyValue(a);
|
|
1141
|
+
r[a] = mn(s);
|
|
1142
1142
|
}), r;
|
|
1143
1143
|
}, hn = (e) => {
|
|
1144
|
-
const r = Object.keys(e).find((
|
|
1144
|
+
const r = Object.keys(e).find((s) => s.startsWith("__reactFiber$") || s.startsWith("__reactInternalInstance$"));
|
|
1145
1145
|
if (!r) return "";
|
|
1146
1146
|
const n = [];
|
|
1147
|
-
let
|
|
1148
|
-
for (;
|
|
1149
|
-
const
|
|
1150
|
-
if (typeof
|
|
1151
|
-
const i =
|
|
1147
|
+
let a = e[r];
|
|
1148
|
+
for (; a; ) {
|
|
1149
|
+
const s = a.type;
|
|
1150
|
+
if (typeof s == "function") {
|
|
1151
|
+
const i = s.displayName || s.name;
|
|
1152
1152
|
i && !i.includes("ViewGate") && !n.includes(i) && n.unshift(i);
|
|
1153
1153
|
}
|
|
1154
|
-
|
|
1154
|
+
a = a.return;
|
|
1155
1155
|
}
|
|
1156
1156
|
return n.join(" > ") || "Generic Component";
|
|
1157
1157
|
}, kt = (e) => {
|
|
1158
1158
|
if (!e) return !1;
|
|
1159
1159
|
const t = window.getComputedStyle(e), r = e.getBoundingClientRect(), n = e.getAttribute("role");
|
|
1160
1160
|
if (n && ["listbox", "menu", "combobox", "tooltip", "option"].includes(n)) return !1;
|
|
1161
|
-
const
|
|
1162
|
-
return r.width <
|
|
1161
|
+
const s = 120;
|
|
1162
|
+
return r.width < s && r.height < s || t.position !== "fixed" && t.position !== "absolute" ? !1 : !!(e.closest('[role="dialog"]') || e.closest('[aria-modal="true"]') || e.classList.contains("modal") || e.classList.contains("modal-content"));
|
|
1163
1163
|
}, ye = (e) => {
|
|
1164
1164
|
if (!e.isConnected) return !1;
|
|
1165
1165
|
const t = window.getComputedStyle(e);
|
|
1166
1166
|
if (t.display === "none" || t.visibility === "hidden" || t.opacity === "0" || e.offsetWidth === 0 || e.offsetHeight === 0) return !1;
|
|
1167
1167
|
let r = e.parentElement;
|
|
1168
1168
|
for (; r; ) {
|
|
1169
|
-
const
|
|
1170
|
-
if (
|
|
1169
|
+
const a = window.getComputedStyle(r);
|
|
1170
|
+
if (a.display === "none" || a.visibility === "hidden" || a.opacity === "0") return !1;
|
|
1171
1171
|
r = r.parentElement;
|
|
1172
1172
|
}
|
|
1173
1173
|
const n = e.getBoundingClientRect();
|
|
1174
1174
|
return !(n.width === 0 || n.height === 0 || n.top === 0 && n.left === 0 && n.width > window.innerWidth * 0.9);
|
|
1175
|
-
},
|
|
1175
|
+
}, Fe = (e, t = document) => {
|
|
1176
1176
|
const r = t.querySelector(e);
|
|
1177
1177
|
if (r) return r;
|
|
1178
1178
|
const n = t.querySelectorAll("*");
|
|
1179
|
-
for (const
|
|
1180
|
-
const
|
|
1181
|
-
if (
|
|
1182
|
-
const i =
|
|
1179
|
+
for (const a of Array.from(n)) {
|
|
1180
|
+
const s = a.shadowRoot;
|
|
1181
|
+
if (s) {
|
|
1182
|
+
const i = Fe(e, s);
|
|
1183
1183
|
if (i) return i;
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
@@ -1196,19 +1196,24 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1196
1196
|
if (!e.tag) return null;
|
|
1197
1197
|
const t = document.getElementsByTagName(e.tag);
|
|
1198
1198
|
let r = null, n = 0;
|
|
1199
|
-
for (let
|
|
1200
|
-
const
|
|
1199
|
+
for (let a = 0; a < t.length; a++) {
|
|
1200
|
+
const s = t[a];
|
|
1201
1201
|
let i = 0;
|
|
1202
|
-
|
|
1202
|
+
const c = s.getAttribute("placeholder");
|
|
1203
|
+
e.attributes?.placeholder && c === e.attributes.placeholder ? i += 6 : c && e.attributes?.placeholder && c.includes(e.attributes.placeholder) && (i += 2), s.innerText?.trim() === e.text.trim() ? i += 5 : s.innerText?.includes(e.text.slice(0, 20)) && (i += 3), e.fingerprint?.classHash && s.className.includes(e.fingerprint.classHash) && (i += 2), e.fingerprint?.ariaLabel && s.getAttribute("aria-label") === e.fingerprint.ariaLabel && (i += 3), e.fingerprint?.role && s.getAttribute("role") === e.fingerprint.role && (i += 2), e.parentContext && (s.parentElement?.innerText || "").includes(e.parentContext.slice(0, 30)) && (i += 2), e.fingerprint?.neighborCount === s.parentElement?.children.length && (i += 1), e.fingerprint?.parentTag === s.parentElement?.tagName.toLowerCase() && (i += 1), i > n && i >= 7 && (n = i, r = s);
|
|
1203
1204
|
}
|
|
1204
1205
|
return r;
|
|
1205
1206
|
}, yn = (e, t) => {
|
|
1206
1207
|
if (t) {
|
|
1207
|
-
const n =
|
|
1208
|
-
if (n)
|
|
1209
|
-
|
|
1208
|
+
const n = Array.from(document.querySelectorAll(`[${xe}="${t}"]`));
|
|
1209
|
+
if (n.length > 0) {
|
|
1210
|
+
const a = n.find((s) => !(!ye(s) || e.metadata?.isModal && !s.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')));
|
|
1211
|
+
return a ? (n.forEach((s) => {
|
|
1212
|
+
s !== a && s.removeAttribute(xe);
|
|
1213
|
+
}), a) : null;
|
|
1214
|
+
}
|
|
1210
1215
|
}
|
|
1211
|
-
let r =
|
|
1216
|
+
let r = Fe(e.selector);
|
|
1212
1217
|
if (r && ye(r))
|
|
1213
1218
|
if (e.metadata?.isModal && !r.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content'))
|
|
1214
1219
|
r = null;
|
|
@@ -1216,13 +1221,13 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1216
1221
|
return r;
|
|
1217
1222
|
if (e.fallbackSelectors) {
|
|
1218
1223
|
for (const n of e.fallbackSelectors)
|
|
1219
|
-
if (r =
|
|
1224
|
+
if (r = Fe(n), r && ye(r)) {
|
|
1220
1225
|
if (e.metadata?.isModal && !r.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')) continue;
|
|
1221
1226
|
return r;
|
|
1222
1227
|
}
|
|
1223
1228
|
}
|
|
1224
1229
|
return r = gn(e), r && ye(r) ? e.metadata?.isModal && !r.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content') ? null : r : null;
|
|
1225
|
-
},
|
|
1230
|
+
}, Me = (e) => ({
|
|
1226
1231
|
tag: e.tagName.toLowerCase(),
|
|
1227
1232
|
text: (e.innerText || e.getAttribute("placeholder") || "").slice(0, 50).trim(),
|
|
1228
1233
|
role: e.getAttribute("role") || void 0,
|
|
@@ -1230,14 +1235,14 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1230
1235
|
}), xn = (e) => {
|
|
1231
1236
|
const t = e.parentElement;
|
|
1232
1237
|
if (!t) return;
|
|
1233
|
-
const r = Array.from(t.children).filter((i) => i !== e).slice(0, 5).map((i) =>
|
|
1234
|
-
let
|
|
1235
|
-
return
|
|
1238
|
+
const r = Array.from(t.children).filter((i) => i !== e).slice(0, 5).map((i) => Me(i)), n = Array.from(t.children), a = n.indexOf(e);
|
|
1239
|
+
let s = "middle";
|
|
1240
|
+
return a === 0 && (s = "start"), a === n.length - 1 && (s = "end"), {
|
|
1236
1241
|
target: {
|
|
1237
|
-
...
|
|
1238
|
-
location: `${
|
|
1242
|
+
...Me(e),
|
|
1243
|
+
location: `${s} of ${t.tagName.toLowerCase()}`
|
|
1239
1244
|
},
|
|
1240
|
-
parent:
|
|
1245
|
+
parent: Me(t),
|
|
1241
1246
|
siblings: r
|
|
1242
1247
|
};
|
|
1243
1248
|
}, wn = (e) => {
|
|
@@ -1250,16 +1255,16 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1250
1255
|
}
|
|
1251
1256
|
r = r.parentElement;
|
|
1252
1257
|
}
|
|
1253
|
-
const n = hn(e),
|
|
1258
|
+
const n = hn(e), a = [], s = [], i = (m) => {
|
|
1254
1259
|
const x = [];
|
|
1255
1260
|
let f = m;
|
|
1256
1261
|
for (; f && f.nodeType === Node.ELEMENT_NODE; ) {
|
|
1257
1262
|
let w = f.nodeName.toLowerCase();
|
|
1258
|
-
|
|
1263
|
+
s.unshift(w);
|
|
1259
1264
|
const T = f.id && !f.id.startsWith("__") ? f.id : null;
|
|
1260
|
-
T &&
|
|
1265
|
+
T && a.push(`#${T}`);
|
|
1261
1266
|
const P = f.getAttribute("data-testid") || f.getAttribute("data-qa");
|
|
1262
|
-
P &&
|
|
1267
|
+
P && a.push(`[data-testid="${P}"]`);
|
|
1263
1268
|
const z = f.getAttribute("placeholder"), D = f.getAttribute("aria-label"), A = f.getAttribute("role"), F = f.getAttribute("name"), _ = f.getAttribute("title");
|
|
1264
1269
|
if (P) {
|
|
1265
1270
|
w = `[${f.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${P}"]`, x.unshift(w);
|
|
@@ -1291,7 +1296,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1291
1296
|
x.unshift(w), f = f.parentElement;
|
|
1292
1297
|
}
|
|
1293
1298
|
return x.join(" > ");
|
|
1294
|
-
},
|
|
1299
|
+
}, c = kt(e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')), p = i(e), u = {};
|
|
1295
1300
|
["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((m) => {
|
|
1296
1301
|
const x = e.getAttribute(m);
|
|
1297
1302
|
x && (u[m] = x);
|
|
@@ -1309,8 +1314,8 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1309
1314
|
signature: v,
|
|
1310
1315
|
source: t,
|
|
1311
1316
|
attributes: u,
|
|
1312
|
-
fallbackSelectors: [...new Set(
|
|
1313
|
-
domPath:
|
|
1317
|
+
fallbackSelectors: [...new Set(a)].slice(0, 5),
|
|
1318
|
+
domPath: s.slice(-10),
|
|
1314
1319
|
viewportSize: { width: window.innerWidth, height: window.innerHeight },
|
|
1315
1320
|
uiContext: xn(e),
|
|
1316
1321
|
fingerprint: pn(e),
|
|
@@ -1320,35 +1325,35 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1320
1325
|
viewportBreakpoint: ln(),
|
|
1321
1326
|
outerHtml: e.outerHTML.slice(0, 1500),
|
|
1322
1327
|
scrollPosition: { x: window.scrollX, y: window.scrollY },
|
|
1323
|
-
isModal:
|
|
1328
|
+
isModal: c
|
|
1324
1329
|
}
|
|
1325
1330
|
};
|
|
1326
1331
|
}, vn = () => {
|
|
1327
|
-
const { addToast: e, language: t, t: r, apiKey: n, baseUrl:
|
|
1332
|
+
const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a, disableViewGate: s, hasActiveToasts: i } = ur(), [c, p] = j(!1), [u, v] = j(null), [m, x] = j(null), [f, w] = j(""), [T, P] = j(!1), [z, D] = j(!1), [A, F] = j(!1), [_, W] = j([]), [$, H] = j(null), [we, Be] = j(!1), [ce, te] = j(!1), [ve, be] = j({}), [B, re] = j(null), [Q, le] = j(!1), [U, Ce] = j(() => {
|
|
1328
1333
|
if (typeof window > "u") return { top: 24, right: 24 };
|
|
1329
|
-
const
|
|
1330
|
-
return
|
|
1331
|
-
}), [
|
|
1334
|
+
const d = localStorage.getItem("vg-exit-pos");
|
|
1335
|
+
return d ? JSON.parse(d) : { top: 24, right: 24 };
|
|
1336
|
+
}), [l, y] = j(!1), b = ge(null), [k, ne] = j(() => {
|
|
1332
1337
|
if (typeof window > "u") return { bottom: 30, right: 30 };
|
|
1333
|
-
const
|
|
1334
|
-
return
|
|
1335
|
-
}), [q, O] = j(!1), V = ge(null), de = (
|
|
1336
|
-
|
|
1337
|
-
const h =
|
|
1338
|
+
const d = localStorage.getItem("vg-bar-pos");
|
|
1339
|
+
return d ? JSON.parse(d) : { bottom: 30, right: 30 };
|
|
1340
|
+
}), [q, O] = j(!1), V = ge(null), de = (d) => {
|
|
1341
|
+
d.preventDefault(), d.stopPropagation();
|
|
1342
|
+
const h = d.currentTarget.parentElement?.getBoundingClientRect();
|
|
1338
1343
|
h && (y(!0), b.current = {
|
|
1339
|
-
x:
|
|
1340
|
-
y:
|
|
1344
|
+
x: d.clientX,
|
|
1345
|
+
y: d.clientY,
|
|
1341
1346
|
top: U.top,
|
|
1342
1347
|
right: U.right,
|
|
1343
1348
|
width: h.width,
|
|
1344
1349
|
height: h.height
|
|
1345
1350
|
});
|
|
1346
|
-
},
|
|
1347
|
-
|
|
1348
|
-
const h =
|
|
1351
|
+
}, _e = (d) => {
|
|
1352
|
+
d.preventDefault(), d.stopPropagation();
|
|
1353
|
+
const h = d.currentTarget.parentElement?.getBoundingClientRect();
|
|
1349
1354
|
h && (O(!0), V.current = {
|
|
1350
|
-
x:
|
|
1351
|
-
y:
|
|
1355
|
+
x: d.clientX,
|
|
1356
|
+
y: d.clientY,
|
|
1352
1357
|
bottom: k.bottom,
|
|
1353
1358
|
right: k.right,
|
|
1354
1359
|
width: h.width,
|
|
@@ -1356,13 +1361,13 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1356
1361
|
});
|
|
1357
1362
|
};
|
|
1358
1363
|
Z(() => {
|
|
1359
|
-
if (!
|
|
1360
|
-
const
|
|
1361
|
-
if (
|
|
1364
|
+
if (!l && !q) return;
|
|
1365
|
+
const d = (g) => {
|
|
1366
|
+
if (l && b.current) {
|
|
1362
1367
|
const G = g.clientX - b.current.x, C = g.clientY - b.current.y;
|
|
1363
1368
|
let E = b.current.top + C, S = b.current.right - G;
|
|
1364
1369
|
const R = 10;
|
|
1365
|
-
E = Math.max(R, Math.min(window.innerHeight - b.current.height - R, E)), S = Math.max(R, Math.min(window.innerWidth - b.current.width - R, S)),
|
|
1370
|
+
E = Math.max(R, Math.min(window.innerHeight - b.current.height - R, E)), S = Math.max(R, Math.min(window.innerWidth - b.current.width - R, S)), Ce({ top: E, right: S });
|
|
1366
1371
|
}
|
|
1367
1372
|
if (q && V.current) {
|
|
1368
1373
|
const G = g.clientX - V.current.x, C = g.clientY - V.current.y;
|
|
@@ -1371,79 +1376,79 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1371
1376
|
E = Math.max(R, Math.min(window.innerHeight - V.current.height - R, E)), S = Math.max(R, Math.min(window.innerWidth - V.current.width - R, S)), ne({ bottom: E, right: S });
|
|
1372
1377
|
}
|
|
1373
1378
|
}, h = () => {
|
|
1374
|
-
|
|
1379
|
+
l && (y(!1), localStorage.setItem("vg-exit-pos", JSON.stringify(U)), b.current = null), q && (O(!1), localStorage.setItem("vg-bar-pos", JSON.stringify(k)), V.current = null);
|
|
1375
1380
|
};
|
|
1376
|
-
return window.addEventListener("mousemove",
|
|
1377
|
-
window.removeEventListener("mousemove",
|
|
1381
|
+
return window.addEventListener("mousemove", d), window.addEventListener("mouseup", h), () => {
|
|
1382
|
+
window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", h);
|
|
1378
1383
|
};
|
|
1379
|
-
}, [
|
|
1380
|
-
const [Ue,
|
|
1384
|
+
}, [l, q, U, k]);
|
|
1385
|
+
const [Ue, Te] = j(null), [qe, Ye] = j(""), [jt, Ot] = j({}), se = ge(null), ue = ge(null), pe = Ee(() => {
|
|
1381
1386
|
ue.current || (ue.current = requestAnimationFrame(() => {
|
|
1382
|
-
const
|
|
1387
|
+
const d = {}, g = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find((C) => kt(C) && ye(C)), G = !!g;
|
|
1383
1388
|
_.forEach((C) => {
|
|
1384
1389
|
if (!C.reference) return;
|
|
1385
1390
|
const E = yn(C.reference, C._id), S = !!C.reference.metadata?.isModal;
|
|
1386
1391
|
if (E) {
|
|
1387
|
-
const R = E.getAttribute(
|
|
1388
|
-
R ? R !== C._id && (console.warn(`Element already tagged with ${R}, skipping ${C._id}`), R.length < 10 && E.setAttribute(
|
|
1392
|
+
const R = E.getAttribute(xe);
|
|
1393
|
+
R ? R !== C._id && (console.warn(`Element already tagged with ${R}, skipping ${C._id}`), R.length < 10 && E.setAttribute(xe, C._id)) : E.setAttribute(xe, C._id);
|
|
1389
1394
|
let Y = !1;
|
|
1390
1395
|
if (G ? Y = g.contains(E) : Y = !S, !Y) return;
|
|
1391
1396
|
const M = E.getBoundingClientRect(), me = M.left + M.width / 2, X = M.top + M.height / 2;
|
|
1392
1397
|
if (me >= 0 && me <= window.innerWidth && X >= 0 && X <= window.innerHeight) {
|
|
1393
1398
|
const J = document.elementFromPoint(me, X);
|
|
1394
|
-
if (J && !E.contains(J) && !
|
|
1399
|
+
if (J && !E.contains(J) && !se.current?.contains(J))
|
|
1395
1400
|
return;
|
|
1396
1401
|
}
|
|
1397
|
-
|
|
1402
|
+
d[C._id] = {
|
|
1398
1403
|
top: M.top + window.scrollY,
|
|
1399
1404
|
left: M.left + window.scrollX,
|
|
1400
1405
|
width: M.width,
|
|
1401
1406
|
isModal: S
|
|
1402
1407
|
};
|
|
1403
1408
|
}
|
|
1404
|
-
}), Ot(
|
|
1409
|
+
}), Ot(d), ue.current = null;
|
|
1405
1410
|
}));
|
|
1406
|
-
}, [_]), ee =
|
|
1411
|
+
}, [_]), ee = Ee(async () => {
|
|
1407
1412
|
if (n) {
|
|
1408
1413
|
te(!0);
|
|
1409
1414
|
try {
|
|
1410
|
-
const
|
|
1415
|
+
const d = await fetch(`${a}/api/annotations`, {
|
|
1411
1416
|
headers: { "x-api-key": n }
|
|
1412
1417
|
});
|
|
1413
|
-
if (
|
|
1414
|
-
const G = ((await
|
|
1418
|
+
if (d.ok) {
|
|
1419
|
+
const G = ((await d.json()).data || []).reduce((C, E) => C.find((R) => R._id === E._id) ? C : C.concat([E]), []);
|
|
1415
1420
|
W(G);
|
|
1416
1421
|
}
|
|
1417
|
-
} catch (
|
|
1418
|
-
console.error("Failed to fetch annotations",
|
|
1422
|
+
} catch (d) {
|
|
1423
|
+
console.error("Failed to fetch annotations", d);
|
|
1419
1424
|
} finally {
|
|
1420
1425
|
te(!1);
|
|
1421
1426
|
}
|
|
1422
1427
|
}
|
|
1423
|
-
}, [n,
|
|
1428
|
+
}, [n, a]);
|
|
1424
1429
|
Z(() => {
|
|
1425
1430
|
A && _.length === 0 && !ce && F(!1);
|
|
1426
1431
|
}, [A, _.length, ce]), Z(() => {
|
|
1427
|
-
if (!
|
|
1432
|
+
if (!c && _.length > 0) {
|
|
1428
1433
|
pe();
|
|
1429
|
-
const
|
|
1430
|
-
return
|
|
1434
|
+
const d = new MutationObserver(() => pe()), h = new ResizeObserver(() => pe()), g = () => pe();
|
|
1435
|
+
return d.observe(document.documentElement, {
|
|
1431
1436
|
childList: !0,
|
|
1432
1437
|
subtree: !0,
|
|
1433
1438
|
attributes: !0
|
|
1434
1439
|
}), h.observe(document.documentElement), window.addEventListener("scroll", g, !0), () => {
|
|
1435
|
-
|
|
1440
|
+
d.disconnect(), h.disconnect(), window.removeEventListener("scroll", g, !0), ue.current && cancelAnimationFrame(ue.current);
|
|
1436
1441
|
};
|
|
1437
1442
|
}
|
|
1438
|
-
}, [
|
|
1443
|
+
}, [c, _.length, pe]), Z(() => {
|
|
1439
1444
|
ee();
|
|
1440
1445
|
}, [ee]), Z(() => {
|
|
1441
|
-
|
|
1446
|
+
se.current = document.getElementById("viewgate-shadow-host");
|
|
1442
1447
|
}, []);
|
|
1443
|
-
const
|
|
1444
|
-
if (!
|
|
1445
|
-
const h = pt(
|
|
1446
|
-
if (!h ||
|
|
1448
|
+
const Ve = Ee((d) => {
|
|
1449
|
+
if (!c || m) return;
|
|
1450
|
+
const h = pt(d.clientX, d.clientY);
|
|
1451
|
+
if (!h || se.current?.contains(h) || h.closest(".vg-no-capture")) {
|
|
1447
1452
|
v(null);
|
|
1448
1453
|
return;
|
|
1449
1454
|
}
|
|
@@ -1457,16 +1462,16 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1457
1462
|
semanticReference: {
|
|
1458
1463
|
...wn(h),
|
|
1459
1464
|
normalizedOffset: {
|
|
1460
|
-
x: (
|
|
1461
|
-
y: (
|
|
1465
|
+
x: (d.clientX - g.left) / g.width,
|
|
1466
|
+
y: (d.clientY - g.top) / g.height
|
|
1462
1467
|
}
|
|
1463
1468
|
}
|
|
1464
1469
|
});
|
|
1465
|
-
}, [
|
|
1466
|
-
if (!
|
|
1467
|
-
const h = pt(
|
|
1468
|
-
if (!(!h ||
|
|
1469
|
-
|
|
1470
|
+
}, [c, m]), Pe = Ee(async (d) => {
|
|
1471
|
+
if (!c || m) return;
|
|
1472
|
+
const h = pt(d.clientX, d.clientY);
|
|
1473
|
+
if (!(!h || se.current?.contains(h) || h.closest(".vg-no-capture")) && u) {
|
|
1474
|
+
d.preventDefault(), d.stopPropagation(), D(!0);
|
|
1470
1475
|
try {
|
|
1471
1476
|
const C = window.scrollX, E = window.scrollY, S = await dt(document.documentElement, {
|
|
1472
1477
|
pixelRatio: 1.5,
|
|
@@ -1480,7 +1485,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1480
1485
|
},
|
|
1481
1486
|
filter: (X) => {
|
|
1482
1487
|
const J = X;
|
|
1483
|
-
return !(
|
|
1488
|
+
return !(se.current?.contains(J) || J.id === "viewgate-ui");
|
|
1484
1489
|
}
|
|
1485
1490
|
}), R = u.element.getBoundingClientRect(), Y = R.top >= 0 && R.left >= 0 && R.bottom <= window.innerHeight && R.right <= window.innerWidth;
|
|
1486
1491
|
let M = "";
|
|
@@ -1494,7 +1499,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1494
1499
|
backgroundColor: "#ffffff",
|
|
1495
1500
|
filter: (X) => {
|
|
1496
1501
|
const J = X;
|
|
1497
|
-
return !
|
|
1502
|
+
return !se.current?.contains(J);
|
|
1498
1503
|
}
|
|
1499
1504
|
});
|
|
1500
1505
|
} catch {
|
|
@@ -1519,11 +1524,11 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1519
1524
|
D(!1), v(null);
|
|
1520
1525
|
}
|
|
1521
1526
|
}
|
|
1522
|
-
}, [
|
|
1527
|
+
}, [c, u, m]);
|
|
1523
1528
|
Z(() => {
|
|
1524
|
-
const
|
|
1529
|
+
const d = (h) => {
|
|
1525
1530
|
if (h.key === "Escape") {
|
|
1526
|
-
m ? x(null) : A ? F(!1) :
|
|
1531
|
+
m ? x(null) : A ? F(!1) : c && p(!1);
|
|
1527
1532
|
return;
|
|
1528
1533
|
}
|
|
1529
1534
|
const G = (() => {
|
|
@@ -1536,16 +1541,16 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1536
1541
|
const E = h.key.toLowerCase();
|
|
1537
1542
|
E === "c" && !m && !A && p((S) => !S), E === "v" && !m && (_.length > 0 || A) && (F((S) => !S), A || p(!1));
|
|
1538
1543
|
};
|
|
1539
|
-
return
|
|
1540
|
-
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown",
|
|
1544
|
+
return c && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", d), window.addEventListener("mousemove", Ve, !0), window.addEventListener("click", Pe, !0), () => {
|
|
1545
|
+
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove", Ve, !0), window.removeEventListener("click", Pe, !0);
|
|
1541
1546
|
};
|
|
1542
|
-
}, [
|
|
1547
|
+
}, [c, m, A, _, Ve, Pe]);
|
|
1543
1548
|
const _t = async () => {
|
|
1544
1549
|
if (!m || !f.trim()) return;
|
|
1545
1550
|
P(!0);
|
|
1546
|
-
const { semanticReference:
|
|
1551
|
+
const { semanticReference: d } = m, [h, g] = (d.source || "").split(":"), G = g || "0";
|
|
1547
1552
|
try {
|
|
1548
|
-
if (!(await fetch(`${
|
|
1553
|
+
if (!(await fetch(`${a}/api/annotations`, {
|
|
1549
1554
|
method: "POST",
|
|
1550
1555
|
headers: {
|
|
1551
1556
|
"Content-Type": "application/json",
|
|
@@ -1556,9 +1561,9 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1556
1561
|
line: parseInt(G),
|
|
1557
1562
|
url: window.location.href,
|
|
1558
1563
|
message: f,
|
|
1559
|
-
componentName:
|
|
1564
|
+
componentName: d.componentPath || m.tag,
|
|
1560
1565
|
reference: {
|
|
1561
|
-
...
|
|
1566
|
+
...d,
|
|
1562
1567
|
viewport: {
|
|
1563
1568
|
width: window.innerWidth,
|
|
1564
1569
|
height: window.innerHeight
|
|
@@ -1575,7 +1580,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1575
1580
|
P(!1);
|
|
1576
1581
|
}
|
|
1577
1582
|
};
|
|
1578
|
-
return /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1583
|
+
return /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1077", className: "vg-container", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1078", className: "vg-no-capture", children: [
|
|
1579
1584
|
!i && /* @__PURE__ */ o.jsxs(
|
|
1580
1585
|
"div",
|
|
1581
1586
|
{
|
|
@@ -1583,11 +1588,11 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1583
1588
|
position: "fixed",
|
|
1584
1589
|
top: `${U.top}px`,
|
|
1585
1590
|
right: `${U.right}px`,
|
|
1586
|
-
zIndex:
|
|
1591
|
+
zIndex: Le + 10,
|
|
1587
1592
|
display: "flex",
|
|
1588
1593
|
alignItems: "center",
|
|
1589
1594
|
gap: "8px",
|
|
1590
|
-
transition:
|
|
1595
|
+
transition: l ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
1591
1596
|
},
|
|
1592
1597
|
children: [
|
|
1593
1598
|
/* @__PURE__ */ o.jsx(
|
|
@@ -1605,30 +1610,30 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1605
1610
|
justifyContent: "center",
|
|
1606
1611
|
cursor: "grab",
|
|
1607
1612
|
color: "#1e293b",
|
|
1608
|
-
opacity:
|
|
1609
|
-
visibility:
|
|
1613
|
+
opacity: c ? 0 : 1,
|
|
1614
|
+
visibility: c ? "hidden" : "visible",
|
|
1610
1615
|
transition: "all 0.2s",
|
|
1611
1616
|
border: "1px solid rgba(0,0,0,0.1)",
|
|
1612
1617
|
boxShadow: "0 2px 8px rgba(0,0,0,0.05)"
|
|
1613
1618
|
},
|
|
1614
|
-
onMouseEnter: (
|
|
1615
|
-
|
|
1619
|
+
onMouseEnter: (d) => {
|
|
1620
|
+
d.currentTarget.style.backgroundColor = "white", d.currentTarget.style.color = "#000000";
|
|
1616
1621
|
},
|
|
1617
|
-
onMouseLeave: (
|
|
1618
|
-
|
|
1622
|
+
onMouseLeave: (d) => {
|
|
1623
|
+
d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.85)", d.currentTarget.style.color = "#1e293b";
|
|
1619
1624
|
},
|
|
1620
|
-
children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1625
|
+
children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1122", size: 14 })
|
|
1621
1626
|
}
|
|
1622
1627
|
),
|
|
1623
1628
|
/* @__PURE__ */ o.jsx(
|
|
1624
1629
|
"button",
|
|
1625
1630
|
{
|
|
1626
|
-
onClick: (
|
|
1627
|
-
|
|
1631
|
+
onClick: (d) => {
|
|
1632
|
+
d.stopPropagation(), H({
|
|
1628
1633
|
title: r.exitConfirmTitle || "Close ViewGate?",
|
|
1629
1634
|
message: r.exitConfirmMessage || "Are you sure you want to close ViewGate?",
|
|
1630
1635
|
type: "danger",
|
|
1631
|
-
onConfirm: () =>
|
|
1636
|
+
onConfirm: () => s()
|
|
1632
1637
|
});
|
|
1633
1638
|
},
|
|
1634
1639
|
title: "Cerrar ViewGate",
|
|
@@ -1647,13 +1652,13 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1647
1652
|
color: "#64748b",
|
|
1648
1653
|
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
1649
1654
|
},
|
|
1650
|
-
onMouseEnter: (
|
|
1651
|
-
|
|
1655
|
+
onMouseEnter: (d) => {
|
|
1656
|
+
d.currentTarget.style.transform = "scale(1.1) rotate(90deg)", d.currentTarget.style.color = "#ef4444", d.currentTarget.style.backgroundColor = "white";
|
|
1652
1657
|
},
|
|
1653
|
-
onMouseLeave: (
|
|
1654
|
-
|
|
1658
|
+
onMouseLeave: (d) => {
|
|
1659
|
+
d.currentTarget.style.transform = "scale(1) rotate(0deg)", d.currentTarget.style.color = "#64748b", d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.9)";
|
|
1655
1660
|
},
|
|
1656
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1661
|
+
children: /* @__PURE__ */ o.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1162", size: 20, strokeWidth: 2.5 })
|
|
1657
1662
|
}
|
|
1658
1663
|
)
|
|
1659
1664
|
]
|
|
@@ -1662,12 +1667,12 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1662
1667
|
/* @__PURE__ */ o.jsxs(
|
|
1663
1668
|
"div",
|
|
1664
1669
|
{
|
|
1665
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1670
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1168",
|
|
1666
1671
|
style: {
|
|
1667
1672
|
position: "fixed",
|
|
1668
1673
|
bottom: `${k.bottom}px`,
|
|
1669
1674
|
right: `${k.right}px`,
|
|
1670
|
-
zIndex:
|
|
1675
|
+
zIndex: Le,
|
|
1671
1676
|
display: "flex",
|
|
1672
1677
|
alignItems: "center",
|
|
1673
1678
|
gap: "8px",
|
|
@@ -1678,7 +1683,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1678
1683
|
/* @__PURE__ */ o.jsx(
|
|
1679
1684
|
"div",
|
|
1680
1685
|
{
|
|
1681
|
-
onMouseDown:
|
|
1686
|
+
onMouseDown: _e,
|
|
1682
1687
|
style: {
|
|
1683
1688
|
width: "24px",
|
|
1684
1689
|
height: "40px",
|
|
@@ -1690,35 +1695,35 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1690
1695
|
justifyContent: "center",
|
|
1691
1696
|
cursor: "grab",
|
|
1692
1697
|
color: "#1e293b",
|
|
1693
|
-
opacity:
|
|
1694
|
-
visibility:
|
|
1698
|
+
opacity: c ? 0 : 1,
|
|
1699
|
+
visibility: c ? "hidden" : "visible",
|
|
1695
1700
|
transition: "all 0.2s",
|
|
1696
1701
|
border: "1px solid rgba(0,0,0,0.1)",
|
|
1697
1702
|
boxShadow: "0 2px 8px rgba(0,0,0,0.05)"
|
|
1698
1703
|
},
|
|
1699
|
-
onMouseEnter: (
|
|
1700
|
-
|
|
1704
|
+
onMouseEnter: (d) => {
|
|
1705
|
+
d.currentTarget.style.backgroundColor = "white", d.currentTarget.style.color = "#000000";
|
|
1701
1706
|
},
|
|
1702
|
-
onMouseLeave: (
|
|
1703
|
-
|
|
1707
|
+
onMouseLeave: (d) => {
|
|
1708
|
+
d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.85)", d.currentTarget.style.color = "#1e293b";
|
|
1704
1709
|
},
|
|
1705
1710
|
className: "vg-animate-slide-up",
|
|
1706
|
-
children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1711
|
+
children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1211", size: 16 })
|
|
1707
1712
|
}
|
|
1708
1713
|
),
|
|
1709
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1714
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1214", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
|
|
1710
1715
|
/* @__PURE__ */ o.jsx(
|
|
1711
1716
|
"button",
|
|
1712
1717
|
{
|
|
1713
|
-
onClick: () => p(!
|
|
1718
|
+
onClick: () => p(!c),
|
|
1714
1719
|
className: "vg-button-primary vg-animate-pop",
|
|
1715
1720
|
style: {
|
|
1716
1721
|
padding: "12px 24px",
|
|
1717
|
-
background:
|
|
1722
|
+
background: c ? "#ef4444" : void 0
|
|
1718
1723
|
},
|
|
1719
|
-
children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1720
|
-
|
|
1721
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1724
|
+
children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1223", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
1725
|
+
c ? /* @__PURE__ */ o.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1224", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1224", size: 20, className: "vg-animate-pop" }),
|
|
1726
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1225", children: c ? r.exitMode : r.enterMode })
|
|
1722
1727
|
] })
|
|
1723
1728
|
}
|
|
1724
1729
|
),
|
|
@@ -1731,8 +1736,8 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1731
1736
|
className: "vg-button-ghost vg-animate-pop",
|
|
1732
1737
|
style: { animationDelay: "0.1s" },
|
|
1733
1738
|
children: [
|
|
1734
|
-
/* @__PURE__ */ o.jsx(Xt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1735
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1739
|
+
/* @__PURE__ */ o.jsx(Xt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1238", size: 20 }),
|
|
1740
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1239", children: r.viewComments })
|
|
1736
1741
|
]
|
|
1737
1742
|
}
|
|
1738
1743
|
)
|
|
@@ -1740,7 +1745,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1740
1745
|
]
|
|
1741
1746
|
}
|
|
1742
1747
|
),
|
|
1743
|
-
z && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1748
|
+
z && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1247", style: {
|
|
1744
1749
|
position: "fixed",
|
|
1745
1750
|
top: 0,
|
|
1746
1751
|
left: 0,
|
|
@@ -1751,16 +1756,16 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1751
1756
|
display: "flex",
|
|
1752
1757
|
alignItems: "center",
|
|
1753
1758
|
justifyContent: "center",
|
|
1754
|
-
zIndex:
|
|
1759
|
+
zIndex: Le + 1,
|
|
1755
1760
|
cursor: "wait"
|
|
1756
|
-
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1757
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1758
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1761
|
+
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1253", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
|
|
1762
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1254", className: "vg-spinner" }),
|
|
1763
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1255", style: { fontWeight: 600, fontSize: "14px", color: "#000000" }, children: "Capturando..." })
|
|
1759
1764
|
] }) }),
|
|
1760
|
-
|
|
1765
|
+
c && !m && /* @__PURE__ */ o.jsx(
|
|
1761
1766
|
"div",
|
|
1762
1767
|
{
|
|
1763
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1768
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1262",
|
|
1764
1769
|
className: "vg-backdrop-blur",
|
|
1765
1770
|
style: {
|
|
1766
1771
|
opacity: 1,
|
|
@@ -1772,14 +1777,14 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1772
1777
|
${u.rect.left}px ${u.rect.bottom}px,
|
|
1773
1778
|
${u.rect.left}px ${u.rect.top}px
|
|
1774
1779
|
)` : "none",
|
|
1775
|
-
zIndex:
|
|
1780
|
+
zIndex: an
|
|
1776
1781
|
}
|
|
1777
1782
|
}
|
|
1778
1783
|
),
|
|
1779
|
-
|
|
1784
|
+
c && u && !m && !z && /* @__PURE__ */ o.jsx(
|
|
1780
1785
|
"div",
|
|
1781
1786
|
{
|
|
1782
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1787
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1281",
|
|
1783
1788
|
className: "vg-selection-pulse",
|
|
1784
1789
|
style: {
|
|
1785
1790
|
top: u.rect.top - 4,
|
|
@@ -1791,17 +1796,17 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1791
1796
|
children: /* @__PURE__ */ o.jsxs(
|
|
1792
1797
|
"div",
|
|
1793
1798
|
{
|
|
1794
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1799
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1291",
|
|
1795
1800
|
className: "vg-selection-label",
|
|
1796
1801
|
style: {
|
|
1797
1802
|
...u.rect.top < 60 ? u.rect.bottom > window.innerHeight - 60 ? { top: "8px", bottom: "auto" } : { top: "100%", marginTop: "8px", bottom: "auto" } : { top: "-40px", bottom: "auto" },
|
|
1798
1803
|
...u.rect.left + 200 > window.innerWidth ? { left: "auto", right: "0" } : { left: "0", right: "auto" }
|
|
1799
1804
|
},
|
|
1800
1805
|
children: [
|
|
1801
|
-
/* @__PURE__ */ o.jsx(tr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1802
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1803
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1804
|
-
/* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1806
|
+
/* @__PURE__ */ o.jsx(tr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1307", size: 16 }),
|
|
1807
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1308", style: { display: "flex", flexDirection: "column" }, children: [
|
|
1808
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1309", style: { fontWeight: 700 }, children: r.selectToComment }),
|
|
1809
|
+
/* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1310", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
|
|
1805
1810
|
Math.round(u.rect.width),
|
|
1806
1811
|
" × ",
|
|
1807
1812
|
Math.round(u.rect.height)
|
|
@@ -1812,7 +1817,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1812
1817
|
)
|
|
1813
1818
|
}
|
|
1814
1819
|
),
|
|
1815
|
-
m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1820
|
+
m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1320", className: "vg-animate-fade", style: {
|
|
1816
1821
|
position: "fixed",
|
|
1817
1822
|
top: 0,
|
|
1818
1823
|
left: 0,
|
|
@@ -1823,14 +1828,14 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1823
1828
|
display: "flex",
|
|
1824
1829
|
alignItems: "center",
|
|
1825
1830
|
justifyContent: "center",
|
|
1826
|
-
zIndex:
|
|
1827
|
-
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1831
|
+
zIndex: Ne
|
|
1832
|
+
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1325", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1828
1833
|
padding: "40px",
|
|
1829
1834
|
width: "500px",
|
|
1830
1835
|
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
1831
1836
|
}, children: [
|
|
1832
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1833
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1837
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1329", style: { textAlign: "center", marginBottom: "32px" }, children: [
|
|
1838
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1330", style: {
|
|
1834
1839
|
width: "48px",
|
|
1835
1840
|
height: "48px",
|
|
1836
1841
|
background: "var(--vg-primary-gradient)",
|
|
@@ -1841,11 +1846,11 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1841
1846
|
margin: "0 auto 16px",
|
|
1842
1847
|
color: "white",
|
|
1843
1848
|
boxShadow: "0 8px 16px rgba(99, 102, 241, 0.3)"
|
|
1844
|
-
}, children: /* @__PURE__ */ o.jsx(
|
|
1845
|
-
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1846
|
-
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1849
|
+
}, children: /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1335", size: 24 }) }),
|
|
1850
|
+
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1337", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
|
|
1851
|
+
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1338", style: { margin: 0, color: "#000000", fontSize: "15px" }, children: r.feedbackSubheader })
|
|
1847
1852
|
] }),
|
|
1848
|
-
m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1853
|
+
m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1342", style: {
|
|
1849
1854
|
marginBottom: "24px",
|
|
1850
1855
|
borderRadius: "12px",
|
|
1851
1856
|
overflow: "hidden",
|
|
@@ -1866,14 +1871,14 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1866
1871
|
{
|
|
1867
1872
|
className: "vg-textarea",
|
|
1868
1873
|
value: f,
|
|
1869
|
-
onChange: (
|
|
1874
|
+
onChange: (d) => w(d.target.value),
|
|
1870
1875
|
rows: 4,
|
|
1871
1876
|
placeholder: r.placeholder,
|
|
1872
1877
|
autoFocus: !0,
|
|
1873
1878
|
style: { fontSize: "15px", padding: "16px", marginBottom: "24px" }
|
|
1874
1879
|
}
|
|
1875
1880
|
),
|
|
1876
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1881
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1369", style: { display: "flex", gap: "12px" }, children: [
|
|
1877
1882
|
/* @__PURE__ */ o.jsx(
|
|
1878
1883
|
"button",
|
|
1879
1884
|
{
|
|
@@ -1891,15 +1896,15 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1891
1896
|
className: "vg-button-primary",
|
|
1892
1897
|
disabled: T || !f.trim(),
|
|
1893
1898
|
style: { flex: 2 },
|
|
1894
|
-
children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1895
|
-
T ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1896
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1899
|
+
children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1384", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1900
|
+
T ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1385", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ o.jsx(ir, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1385", size: 18 }),
|
|
1901
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1386", children: T ? r.submitting : r.sendFeedback || "Send Comment" })
|
|
1897
1902
|
] })
|
|
1898
1903
|
}
|
|
1899
1904
|
)
|
|
1900
1905
|
] })
|
|
1901
1906
|
] }) }),
|
|
1902
|
-
A && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1907
|
+
A && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1396", className: "vg-animate-fade", style: {
|
|
1903
1908
|
position: "fixed",
|
|
1904
1909
|
top: 0,
|
|
1905
1910
|
left: 0,
|
|
@@ -1910,24 +1915,24 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1910
1915
|
display: "flex",
|
|
1911
1916
|
alignItems: "center",
|
|
1912
1917
|
justifyContent: "center",
|
|
1913
|
-
zIndex:
|
|
1914
|
-
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1918
|
+
zIndex: Ne
|
|
1919
|
+
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1401", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1915
1920
|
padding: "32px",
|
|
1916
1921
|
width: "650px",
|
|
1917
1922
|
maxHeight: "85vh",
|
|
1918
1923
|
display: "flex",
|
|
1919
1924
|
flexDirection: "column"
|
|
1920
1925
|
}, children: [
|
|
1921
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1922
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1923
|
-
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1924
|
-
!B && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1926
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1405", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
|
|
1927
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1406", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
1928
|
+
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1407", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: B ? r.commentDetails : r.annotations }),
|
|
1929
|
+
!B && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1411", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: _.length })
|
|
1925
1930
|
] }),
|
|
1926
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1931
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1416", style: { display: "flex", gap: "8px" }, children: [
|
|
1927
1932
|
B && /* @__PURE__ */ o.jsx(
|
|
1928
1933
|
"button",
|
|
1929
1934
|
{
|
|
1930
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1935
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1418",
|
|
1931
1936
|
className: "vg-button-ghost",
|
|
1932
1937
|
style: { padding: "6px 14px", fontSize: "12px" },
|
|
1933
1938
|
onClick: () => re(null),
|
|
@@ -1937,21 +1942,21 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1937
1942
|
/* @__PURE__ */ o.jsx(
|
|
1938
1943
|
"button",
|
|
1939
1944
|
{
|
|
1940
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1945
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1426",
|
|
1941
1946
|
className: "vg-button-ghost",
|
|
1942
1947
|
style: { padding: "8px", borderRadius: "50%" },
|
|
1943
1948
|
onClick: () => {
|
|
1944
1949
|
F(!1), re(null);
|
|
1945
1950
|
},
|
|
1946
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1951
|
+
children: /* @__PURE__ */ o.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1431", size: 20 })
|
|
1947
1952
|
}
|
|
1948
1953
|
)
|
|
1949
1954
|
] })
|
|
1950
1955
|
] }),
|
|
1951
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1956
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1436", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: ce ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1438", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1439", className: "vg-spinner" }) }) : (B ? _.filter((d) => d._id === B) : _).map((d, h) => /* @__PURE__ */ o.jsxs(
|
|
1952
1957
|
"div",
|
|
1953
1958
|
{
|
|
1954
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1959
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1443",
|
|
1955
1960
|
className: "vg-glassmorphism vg-animate-slide",
|
|
1956
1961
|
style: {
|
|
1957
1962
|
padding: "20px",
|
|
@@ -1961,19 +1966,19 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1961
1966
|
animationDelay: `${h * 0.05}s`
|
|
1962
1967
|
},
|
|
1963
1968
|
children: [
|
|
1964
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1965
|
-
|
|
1966
|
-
/* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1969
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1454", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1455", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
|
|
1970
|
+
d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1457", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
|
|
1971
|
+
/* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1458", size: 14 }),
|
|
1967
1972
|
" ",
|
|
1968
1973
|
r.readyForReview
|
|
1969
|
-
] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1970
|
-
/* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1974
|
+
] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1461", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
|
|
1975
|
+
/* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1462", size: 14 }),
|
|
1971
1976
|
" ",
|
|
1972
1977
|
r.pending
|
|
1973
1978
|
] }),
|
|
1974
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1979
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1465", style: { fontSize: "12px", color: "#000000" }, children: un(d.timestamp || d.createdAt || d.reference?.timestamp, t) })
|
|
1975
1980
|
] }) }),
|
|
1976
|
-
Ue ===
|
|
1981
|
+
Ue === d._id ? /* @__PURE__ */ o.jsx(
|
|
1977
1982
|
"textarea",
|
|
1978
1983
|
{
|
|
1979
1984
|
className: "vg-textarea",
|
|
@@ -1983,21 +1988,21 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
1983
1988
|
autoFocus: !0,
|
|
1984
1989
|
style: { marginBottom: "16px" }
|
|
1985
1990
|
}
|
|
1986
|
-
) : /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1987
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1991
|
+
) : /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1481", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: d.message }),
|
|
1992
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1484", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: Ue === d._id ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
1988
1993
|
/* @__PURE__ */ o.jsx(
|
|
1989
1994
|
"button",
|
|
1990
1995
|
{
|
|
1991
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1996
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1487",
|
|
1992
1997
|
className: "vg-button-primary vg-animate-pop",
|
|
1993
1998
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
1994
1999
|
onClick: async () => {
|
|
1995
2000
|
try {
|
|
1996
|
-
(await fetch(`${
|
|
2001
|
+
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
1997
2002
|
method: "PATCH",
|
|
1998
2003
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
1999
2004
|
body: JSON.stringify({ message: qe })
|
|
2000
|
-
})).ok && (
|
|
2005
|
+
})).ok && (Te(null), ee(), e(r.updateSuccess, "success"));
|
|
2001
2006
|
} catch {
|
|
2002
2007
|
e(r.error, "error");
|
|
2003
2008
|
}
|
|
@@ -2005,19 +2010,19 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2005
2010
|
children: r.save
|
|
2006
2011
|
}
|
|
2007
2012
|
),
|
|
2008
|
-
/* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2013
|
+
/* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1509", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => Te(null), children: r.cancel })
|
|
2009
2014
|
] }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2010
2015
|
/* @__PURE__ */ o.jsxs(
|
|
2011
2016
|
"button",
|
|
2012
2017
|
{
|
|
2013
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2018
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1513",
|
|
2014
2019
|
className: "vg-button-ghost vg-animate-pop",
|
|
2015
2020
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
2016
2021
|
onClick: () => {
|
|
2017
|
-
|
|
2022
|
+
Te(d._id), Ye(d.message);
|
|
2018
2023
|
},
|
|
2019
2024
|
children: [
|
|
2020
|
-
/* @__PURE__ */ o.jsx(nr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2025
|
+
/* @__PURE__ */ o.jsx(nr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1521", size: 14 }),
|
|
2021
2026
|
" ",
|
|
2022
2027
|
r.edit
|
|
2023
2028
|
]
|
|
@@ -2026,23 +2031,23 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2026
2031
|
/* @__PURE__ */ o.jsxs(
|
|
2027
2032
|
"button",
|
|
2028
2033
|
{
|
|
2029
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2034
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1523",
|
|
2030
2035
|
className: "vg-button-ghost vg-animate-pop",
|
|
2031
2036
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.05s" },
|
|
2032
2037
|
onClick: () => {
|
|
2033
|
-
|
|
2038
|
+
d.url && (window.location.href = d.url);
|
|
2034
2039
|
},
|
|
2035
2040
|
children: [
|
|
2036
|
-
/* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2041
|
+
/* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1530", size: 14 }),
|
|
2037
2042
|
" ",
|
|
2038
2043
|
r.review
|
|
2039
2044
|
]
|
|
2040
2045
|
}
|
|
2041
2046
|
),
|
|
2042
|
-
|
|
2047
|
+
d.status === "pending" ? /* @__PURE__ */ o.jsxs(
|
|
2043
2048
|
"button",
|
|
2044
2049
|
{
|
|
2045
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2050
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1533",
|
|
2046
2051
|
className: "vg-button-primary vg-animate-pop",
|
|
2047
2052
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
2048
2053
|
onClick: () => {
|
|
@@ -2052,7 +2057,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2052
2057
|
type: "success",
|
|
2053
2058
|
onConfirm: async () => {
|
|
2054
2059
|
try {
|
|
2055
|
-
(await fetch(`${
|
|
2060
|
+
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
2056
2061
|
method: "PATCH",
|
|
2057
2062
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
2058
2063
|
body: JSON.stringify({ status: "ready_for_review" })
|
|
@@ -2066,7 +2071,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2066
2071
|
});
|
|
2067
2072
|
},
|
|
2068
2073
|
children: [
|
|
2069
|
-
/* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2074
|
+
/* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1561", size: 14 }),
|
|
2070
2075
|
" ",
|
|
2071
2076
|
r.markReady
|
|
2072
2077
|
]
|
|
@@ -2074,7 +2079,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2074
2079
|
) : /* @__PURE__ */ o.jsxs(
|
|
2075
2080
|
"button",
|
|
2076
2081
|
{
|
|
2077
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2082
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1564",
|
|
2078
2083
|
className: "vg-button-ghost vg-animate-pop",
|
|
2079
2084
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
2080
2085
|
onClick: () => {
|
|
@@ -2085,7 +2090,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2085
2090
|
// Reopening is a positive action, use success theme (indigo/check) or we could add a neutral theme
|
|
2086
2091
|
onConfirm: async () => {
|
|
2087
2092
|
try {
|
|
2088
|
-
(await fetch(`${
|
|
2093
|
+
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
2089
2094
|
method: "PATCH",
|
|
2090
2095
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
2091
2096
|
body: JSON.stringify({ status: "pending" })
|
|
@@ -2099,7 +2104,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2099
2104
|
});
|
|
2100
2105
|
},
|
|
2101
2106
|
children: [
|
|
2102
|
-
/* @__PURE__ */ o.jsx(
|
|
2107
|
+
/* @__PURE__ */ o.jsx(ar, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1592", size: 14 }),
|
|
2103
2108
|
" ",
|
|
2104
2109
|
r.reopen
|
|
2105
2110
|
]
|
|
@@ -2108,7 +2113,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2108
2113
|
/* @__PURE__ */ o.jsx(
|
|
2109
2114
|
"button",
|
|
2110
2115
|
{
|
|
2111
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2116
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1595",
|
|
2112
2117
|
className: "vg-button-ghost vg-animate-pop",
|
|
2113
2118
|
style: { padding: "8px 12px", color: "#ef4444", borderColor: "#fee2e2", animationDelay: "0.15s" },
|
|
2114
2119
|
onClick: () => {
|
|
@@ -2118,7 +2123,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2118
2123
|
type: "danger",
|
|
2119
2124
|
onConfirm: async () => {
|
|
2120
2125
|
try {
|
|
2121
|
-
(await fetch(`${
|
|
2126
|
+
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
2122
2127
|
method: "DELETE",
|
|
2123
2128
|
headers: { "x-api-key": n }
|
|
2124
2129
|
})).ok && (ee(), e(r.deleteSuccess, "success"));
|
|
@@ -2130,16 +2135,16 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2130
2135
|
}
|
|
2131
2136
|
});
|
|
2132
2137
|
},
|
|
2133
|
-
children: /* @__PURE__ */ o.jsx(rt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2138
|
+
children: /* @__PURE__ */ o.jsx(rt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1622", size: 16 })
|
|
2134
2139
|
}
|
|
2135
2140
|
)
|
|
2136
2141
|
] }) })
|
|
2137
2142
|
]
|
|
2138
2143
|
},
|
|
2139
|
-
|
|
2144
|
+
d._id
|
|
2140
2145
|
)) })
|
|
2141
2146
|
] }) }),
|
|
2142
|
-
$ && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2147
|
+
$ && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1637", className: "vg-animate-fade", style: {
|
|
2143
2148
|
position: "fixed",
|
|
2144
2149
|
top: 0,
|
|
2145
2150
|
left: 0,
|
|
@@ -2150,15 +2155,15 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2150
2155
|
display: "flex",
|
|
2151
2156
|
alignItems: "center",
|
|
2152
2157
|
justifyContent: "center",
|
|
2153
|
-
zIndex:
|
|
2154
|
-
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2158
|
+
zIndex: Ne + 100
|
|
2159
|
+
}, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1642", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
2155
2160
|
padding: "40px",
|
|
2156
2161
|
width: "420px",
|
|
2157
2162
|
textAlign: "center",
|
|
2158
2163
|
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
2159
2164
|
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.5)"
|
|
2160
2165
|
}, children: [
|
|
2161
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2166
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1649", style: {
|
|
2162
2167
|
width: "64px",
|
|
2163
2168
|
height: "64px",
|
|
2164
2169
|
background: $.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
|
|
@@ -2169,14 +2174,14 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2169
2174
|
margin: "0 auto 24px",
|
|
2170
2175
|
color: $.type === "danger" ? "#ef4444" : "#6366f1",
|
|
2171
2176
|
transform: "rotate(-5deg)"
|
|
2172
|
-
}, children: $.type === "danger" ? /* @__PURE__ */ o.jsx(rt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2173
|
-
/* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2174
|
-
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2175
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2177
|
+
}, children: $.type === "danger" ? /* @__PURE__ */ o.jsx(rt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1658", size: 32 }) : /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1658", size: 32 }) }),
|
|
2178
|
+
/* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1660", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#000000", letterSpacing: "-0.02em" }, children: $.title }),
|
|
2179
|
+
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1661", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#000000", lineHeight: 1.6 }, children: $.message }),
|
|
2180
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1662", style: { display: "flex", gap: "16px" }, children: [
|
|
2176
2181
|
/* @__PURE__ */ o.jsx(
|
|
2177
2182
|
"button",
|
|
2178
2183
|
{
|
|
2179
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2184
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1663",
|
|
2180
2185
|
className: "vg-button-ghost",
|
|
2181
2186
|
style: { flex: 1, height: "44px" },
|
|
2182
2187
|
onClick: () => !Q && H(null),
|
|
@@ -2187,7 +2192,7 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2187
2192
|
/* @__PURE__ */ o.jsx(
|
|
2188
2193
|
"button",
|
|
2189
2194
|
{
|
|
2190
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2195
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1671",
|
|
2191
2196
|
className: "vg-button-primary",
|
|
2192
2197
|
style: {
|
|
2193
2198
|
flex: 1,
|
|
@@ -2204,22 +2209,22 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2204
2209
|
le(!0);
|
|
2205
2210
|
try {
|
|
2206
2211
|
await $.onConfirm();
|
|
2207
|
-
} catch (
|
|
2208
|
-
console.error("Confirmation error:",
|
|
2212
|
+
} catch (d) {
|
|
2213
|
+
console.error("Confirmation error:", d);
|
|
2209
2214
|
} finally {
|
|
2210
2215
|
le(!1);
|
|
2211
2216
|
}
|
|
2212
2217
|
},
|
|
2213
|
-
children: Q ? /* @__PURE__ */ o.jsx(Kt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2218
|
+
children: Q ? /* @__PURE__ */ o.jsx(Kt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1696", size: 18, className: "vg-animate-spin" }) : r.yes
|
|
2214
2219
|
}
|
|
2215
2220
|
)
|
|
2216
2221
|
] })
|
|
2217
2222
|
] }) }),
|
|
2218
|
-
!
|
|
2219
|
-
const g = jt[
|
|
2223
|
+
!c && !A && _.map((d, h) => {
|
|
2224
|
+
const g = jt[d._id];
|
|
2220
2225
|
if (!g) return null;
|
|
2221
2226
|
const C = _.slice(0, h).filter(
|
|
2222
|
-
(E) => E.reference?.selector && E.reference.selector ===
|
|
2227
|
+
(E) => E.reference?.selector && E.reference.selector === d.reference?.selector
|
|
2223
2228
|
).length * 34;
|
|
2224
2229
|
return /* @__PURE__ */ o.jsxs(
|
|
2225
2230
|
"div",
|
|
@@ -2237,42 +2242,42 @@ const _e = 2147483647, Ne = _e, Me = 2e6, sn = _e - 10, on = _e - 5, cn = _e - 1
|
|
|
2237
2242
|
},
|
|
2238
2243
|
onMouseEnter: (E) => {
|
|
2239
2244
|
const S = E.currentTarget.getBoundingClientRect();
|
|
2240
|
-
window.innerHeight - S.bottom < 180 ?
|
|
2245
|
+
window.innerHeight - S.bottom < 180 ? be((Y) => ({ ...Y, [d._id]: "vg-top" })) : be((Y) => ({ ...Y, [d._id]: "" }));
|
|
2241
2246
|
},
|
|
2242
2247
|
onClick: () => {
|
|
2243
|
-
F(!0), re(
|
|
2248
|
+
F(!0), re(d._id);
|
|
2244
2249
|
},
|
|
2245
2250
|
children: [
|
|
2246
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2247
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2248
|
-
|
|
2249
|
-
/* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2251
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1743", className: `vg-pin-tooltip ${ve[d._id] || ""}`, children: [
|
|
2252
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1744", style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: [
|
|
2253
|
+
d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1746", style: { display: "flex", alignItems: "center", gap: "6px", color: "#16a34a", fontWeight: 700, fontSize: "11px" }, children: [
|
|
2254
|
+
/* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1747", size: 12 }),
|
|
2250
2255
|
" ",
|
|
2251
2256
|
r.readyForReview
|
|
2252
|
-
] }) : /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2253
|
-
/* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2257
|
+
] }) : /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1750", style: { display: "flex", alignItems: "center", gap: "6px", color: g.isModal ? "#f59e0b" : "#ea580c", fontWeight: 700, fontSize: "11px" }, children: [
|
|
2258
|
+
/* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1751", size: 12 }),
|
|
2254
2259
|
" ",
|
|
2255
2260
|
r.pending
|
|
2256
2261
|
] }),
|
|
2257
|
-
g.isModal && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2262
|
+
g.isModal && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1755", style: { display: "flex", alignItems: "center", gap: "6px", color: "#f59e0b", fontWeight: 700, fontSize: "11px", marginLeft: "auto" }, children: /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1756", children: "MODAL" }) })
|
|
2258
2263
|
] }),
|
|
2259
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2264
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1760", style: { fontWeight: 500, color: "#1e293b", lineHeight: 1.4 }, children: d.message })
|
|
2260
2265
|
] }),
|
|
2261
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2266
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1763", className: `vg-formal-pin ${d.status === "ready_for_review" ? "ready" : ""} ${g.isModal ? "modal-variant" : ""}`, children: d.status === "ready_for_review" ? /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1764", size: 18 }) : g.isModal ? /* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1764", size: 16 }) : /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1764", size: 16 }) })
|
|
2262
2267
|
]
|
|
2263
2268
|
},
|
|
2264
|
-
`pin-${
|
|
2269
|
+
`pin-${d._id}`
|
|
2265
2270
|
);
|
|
2266
2271
|
})
|
|
2267
2272
|
] }) });
|
|
2268
2273
|
};
|
|
2269
2274
|
function Rt(e, t, r) {
|
|
2270
2275
|
if (!t.endsWith(".tsx") && !t.endsWith(".jsx") || t.includes("node_modules")) return e;
|
|
2271
|
-
const n = (
|
|
2276
|
+
const n = (c) => c.replace(/\\/g, "/"), a = n(t).replace(n(r), "");
|
|
2272
2277
|
return e.split(`
|
|
2273
|
-
`).map((
|
|
2278
|
+
`).map((c, p) => {
|
|
2274
2279
|
const u = p + 1;
|
|
2275
|
-
return
|
|
2280
|
+
return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (v, m, x) => v.includes("data-source-path") || x === "Fragment" || x === "React.Fragment" ? v : `${m}<${x} data-source-path="${a}:${u}"`);
|
|
2276
2281
|
}).join(`
|
|
2277
2282
|
`);
|
|
2278
2283
|
}
|