viewgate-wrapper 1.11.41 → 1.11.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.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;user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important}.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-fade-in{0%{opacity:0}to{opacity:1}}@keyframes vg-slide-in{0%{transform:translateY(30px) scale(.96);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@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 .4s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .5s 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 .5s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .35s cubic-bezier(.22,1,.36,1) 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);z-index:2147483645!important}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#f97316,#ea580c);border:3px solid white;box-shadow:0 4px 12px #ea580c66;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-formal-pin.ready{background:linear-gradient(135deg,#a855f7,#7e22ce);box-shadow:0 4px 12px #a855f766}.vg-formal-pin.completed{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.backlog{background:linear-gradient(135deg,#94a3b8,#64748b);box-shadow:0 4px 12px #64748b66}.vg-formal-pin.bug{background:linear-gradient(135deg,#f43f5e,#e11d48);box-shadow:0 4px 12px #e11d4866}.vg-formal-pin.mixed{border:3px solid #ea580c;box-shadow:0 4px 15px #ea580c66}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:16px;border-radius:16px;background:#fff;color:#1e293b;width:320px;font-size:13px;box-shadow:0 10px 40px #00000040;opacity:0;visibility:hidden;pointer-events:none;transition:all .3s cubic-bezier(.19,1,.22,1);border:1px solid #e2e8f0;z-index:1000;overflow:hidden}.vg-tooltip-scroll{scrollbar-width:thin;scrollbar-color:rgba(99,102,241,.2) transparent;overflow-y:auto;overflow-x:hidden;padding-right:12px;scroll-behavior:smooth}.vg-tooltip-scroll::-webkit-scrollbar{width:4px}.vg-tooltip-scroll::-webkit-scrollbar-track{background:transparent}.vg-tooltip-scroll::-webkit-scrollbar-thumb{background:#6366f14d;border-radius:10px}.vg-tooltip-scroll::-webkit-scrollbar-thumb:hover{background:#6366f180}.vg-text-wrap{word-break:break-word;overflow-wrap:break-word;word-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;white-space:pre-wrap}.vg-line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word;max-height:2.8em}.vg-pin-badge{position:absolute;top:-8px;right:-8px;background:#f43f5e;color:#fff;font-size:10px;font-weight:800;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:2px solid white;box-shadow:0 4px 12px #f43f5e66;z-index:2}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-tooltip.vg-tooltip-right{left:0;transform:translate(0)}.vg-pin-tooltip.vg-tooltip-left{left:auto;right:0;transform:translate(0)}.vg-pin-container:hover .vg-pin-tooltip.vg-tooltip-right,.vg-pin-container:hover .vg-pin-tooltip.vg-tooltip-left{transform:translate(0) translateY(-5px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;visibility:visible;pointer-events:auto;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}.vg-url-tag{position:relative;cursor:help;transition:all .2s ease}.vg-url-tag:hover{background:#f1f5f9!important;border-color:var(--vg-primary)!important}.vg-url-tooltip{position:fixed;left:0;top:0;background:#0f172a;color:#fff;padding:8px 14px;border-radius:10px;font-size:11px;font-weight:500;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;box-shadow:0 10px 25px -5px #0006;z-index:2147483647;border:1px solid rgba(255,255,255,.1)}.vg-url-tooltip.visible{opacity:1}.vg-url-tooltip:after{content:"";position:absolute;left:50%;transform:translate(-50%);border-width:6px;border-style:solid}.vg-url-tooltip.vg-top:after{top:100%;border-color:#0f172a transparent transparent transparent}.vg-url-tooltip.vg-bottom:after{bottom:100%;border-color:transparent transparent #0f172a transparent}.vg-segmented-control{display:flex;background:#f1f5f9;padding:4px;border-radius:99px;position:relative;cursor:pointer;-webkit-user-select:none;user-select:none;border:4px solid #e2e8f0;width:100%;max-width:480px;margin:0 auto}.vg-segmented-slider{position:absolute;top:4px;bottom:4px;border-radius:99px;transition:all .35s cubic-bezier(.4,0,.2,1);z-index:1}.vg-segmented-item{position:relative;flex:1;padding:8px 4px;font-size:11px;font-weight:700;text-align:center;z-index:2;transition:all .35s ease;display:flex;align-items:center;justify-content:center;gap:10px;border-radius:99px;color:#64748b;white-space:nowrap;min-width:0}.vg-segmented-item.active{color:#fff}.vg-glassmorphism.vg-animate-slide:last-child{margin-bottom:0!important}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(ve,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(ve=typeof globalThis<"u"?globalThis:ve||self,p(ve.ViewGateWrapper={},ve.React,ve.ReactDOM))})(this,(function(ve,p,Fs){"use strict";var Tt={exports:{}},gt={};var za;function Bs(){if(za)return gt;za=1;var e=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function s(r,c,d){var l=null;if(d!==void 0&&(l=""+d),c.key!==void 0&&(l=""+c.key),"key"in c){d={};for(var f in c)f!=="key"&&(d[f]=c[f])}else d=c;return c=d.ref,{$$typeof:e,type:r,key:l,ref:c!==void 0?c:null,props:d}}return gt.Fragment=o,gt.jsx=s,gt.jsxs=s,gt}var mt={};var Pa;function Hs(){return Pa||(Pa=1,process.env.NODE_ENV!=="production"&&(function(){function e(g){if(g==null)return null;if(typeof g=="function")return g.$$typeof===ce?null:g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case A:return"Fragment";case v:return"Profiler";case _:return"StrictMode";case I:return"Suspense";case J:return"SuspenseList";case oe:return"Activity"}if(typeof g=="object")switch(typeof g.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),g.$$typeof){case C:return"Portal";case N:return g.displayName||"Context";case ue:return(g._context.displayName||"Context")+".Consumer";case Y:var R=g.render;return g=g.displayName,g||(g=R.displayName||R.name||"",g=g!==""?"ForwardRef("+g+")":"ForwardRef"),g;case ae:return R=g.displayName||null,R!==null?R:e(g.type)||"Memo";case D:R=g._payload,g=g._init;try{return e(g(R))}catch{}}return null}function o(g){return""+g}function s(g){try{o(g);var R=!1}catch{R=!0}if(R){R=console;var z=R.error,F=typeof Symbol=="function"&&Symbol.toStringTag&&g[Symbol.toStringTag]||g.constructor.name||"Object";return z.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",F),o(g)}}function r(g){if(g===A)return"<>";if(typeof g=="object"&&g!==null&&g.$$typeof===D)return"<...>";try{var R=e(g);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function c(){var g=M.A;return g===null?null:g.getOwner()}function d(){return Error("react-stack-top-frame")}function l(g){if(de.call(g,"key")){var R=Object.getOwnPropertyDescriptor(g,"key").get;if(R&&R.isReactWarning)return!1}return g.key!==void 0}function f(g,R){function z(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",R))}z.isReactWarning=!0,Object.defineProperty(g,"key",{get:z,configurable:!0})}function h(){var g=e(this.type);return Se[g]||(Se[g]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),g=this.props.ref,g!==void 0?g:null}function S(g,R,z,F,Te,Ee){var P=z.ref;return g={$$typeof:V,type:g,key:R,props:z,_owner:F},(P!==void 0?P:null)!==null?Object.defineProperty(g,"ref",{enumerable:!1,get:h}):Object.defineProperty(g,"ref",{enumerable:!1,value:null}),g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(g,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(g,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Te}),Object.defineProperty(g,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ee}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g}function b(g,R,z,F,Te,Ee){var P=R.children;if(P!==void 0)if(F)if(H(P)){for(F=0;F<P.length;F++)m(P[F]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(P);if(de.call(R,"key")){P=e(g);var ye=Object.keys(R).filter(function(Le){return Le!=="key"});F=0<ye.length?"{key: someKey, "+ye.join(": ..., ")+": ...}":"{key: someKey}",Oe[P+F]||(ye=0<ye.length?"{"+ye.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ (function(ve,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],p):(ve=typeof globalThis<"u"?globalThis:ve||self,p(ve.ViewGateWrapper={},ve.React,ve.ReactDOM))})(this,(function(ve,p,Fs){"use strict";var Tt={exports:{}},gt={};var Pa;function Bs(){if(Pa)return gt;Pa=1;var e=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function s(r,i,c){var l=null;if(c!==void 0&&(l=""+c),i.key!==void 0&&(l=""+i.key),"key"in i){c={};for(var u in i)u!=="key"&&(c[u]=i[u])}else c=i;return i=c.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:c}}return gt.Fragment=o,gt.jsx=s,gt.jsxs=s,gt}var mt={};var Ma;function Hs(){return Ma||(Ma=1,process.env.NODE_ENV!=="production"&&(function(){function e(g){if(g==null)return null;if(typeof g=="function")return g.$$typeof===ce?null:g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case A:return"Fragment";case v:return"Profiler";case _:return"StrictMode";case I:return"Suspense";case J:return"SuspenseList";case oe:return"Activity"}if(typeof g=="object")switch(typeof g.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),g.$$typeof){case C:return"Portal";case N:return g.displayName||"Context";case ue:return(g._context.displayName||"Context")+".Consumer";case Y:var R=g.render;return g=g.displayName,g||(g=R.displayName||R.name||"",g=g!==""?"ForwardRef("+g+")":"ForwardRef"),g;case ae:return R=g.displayName||null,R!==null?R:e(g.type)||"Memo";case D:R=g._payload,g=g._init;try{return e(g(R))}catch{}}return null}function o(g){return""+g}function s(g){try{o(g);var R=!1}catch{R=!0}if(R){R=console;var z=R.error,F=typeof Symbol=="function"&&Symbol.toStringTag&&g[Symbol.toStringTag]||g.constructor.name||"Object";return z.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",F),o(g)}}function r(g){if(g===A)return"<>";if(typeof g=="object"&&g!==null&&g.$$typeof===D)return"<...>";try{var R=e(g);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function i(){var g=M.A;return g===null?null:g.getOwner()}function c(){return Error("react-stack-top-frame")}function l(g){if(de.call(g,"key")){var R=Object.getOwnPropertyDescriptor(g,"key").get;if(R&&R.isReactWarning)return!1}return g.key!==void 0}function u(g,R){function z(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",R))}z.isReactWarning=!0,Object.defineProperty(g,"key",{get:z,configurable:!0})}function h(){var g=e(this.type);return ke[g]||(ke[g]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),g=this.props.ref,g!==void 0?g:null}function j(g,R,z,F,Te,Ee){var P=z.ref;return g={$$typeof:V,type:g,key:R,props:z,_owner:F},(P!==void 0?P:null)!==null?Object.defineProperty(g,"ref",{enumerable:!1,get:h}):Object.defineProperty(g,"ref",{enumerable:!1,value:null}),g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(g,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(g,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Te}),Object.defineProperty(g,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ee}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g}function b(g,R,z,F,Te,Ee){var P=R.children;if(P!==void 0)if(F)if(H(P)){for(F=0;F<P.length;F++)m(P[F]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(P);if(de.call(R,"key")){P=e(g);var ye=Object.keys(R).filter(function(Le){return Le!=="key"});F=0<ye.length?"{key: someKey, "+ye.join(": ..., ")+": ...}":"{key: someKey}",Oe[P+F]||(ye=0<ye.length?"{"+ye.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
3
3
  let props = %s;
4
4
  <%s {...props} />
5
5
  React keys must be passed directly to JSX without using spread:
6
6
  let props = %s;
7
- <%s key={someKey} {...props} />`,F,P,ye,P),Oe[P+F]=!0)}if(P=null,z!==void 0&&(s(z),P=""+z),l(R)&&(s(R.key),P=""+R.key),"key"in R){z={};for(var ot in R)ot!=="key"&&(z[ot]=R[ot])}else z=R;return P&&f(z,typeof g=="function"?g.displayName||g.name||"Unknown":g),S(g,P,z,c(),Te,Ee)}function m(g){x(g)?g._store&&(g._store.validated=1):typeof g=="object"&&g!==null&&g.$$typeof===D&&(g._payload.status==="fulfilled"?x(g._payload.value)&&g._payload.value._store&&(g._payload.value._store.validated=1):g._store&&(g._store.validated=1))}function x(g){return typeof g=="object"&&g!==null&&g.$$typeof===V}var j=p,V=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),N=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ce=Symbol.for("react.client.reference"),M=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de=Object.prototype.hasOwnProperty,H=Array.isArray,re=console.createTask?console.createTask:function(){return null};j={react_stack_bottom_frame:function(g){return g()}};var L,Se={},je=j.react_stack_bottom_frame.bind(j,d)(),He=re(r(d)),Oe={};mt.Fragment=A,mt.jsx=function(g,R,z){var F=1e4>M.recentlyCreatedOwnerStacks++;return b(g,R,z,!1,F?Error("react-stack-top-frame"):je,F?re(r(g)):He)},mt.jsxs=function(g,R,z){var F=1e4>M.recentlyCreatedOwnerStacks++;return b(g,R,z,!0,F?Error("react-stack-top-frame"):je,F?re(r(g)):He)}})()),mt}var Ma;function Us(){return Ma||(Ma=1,process.env.NODE_ENV==="production"?Tt.exports=Bs():Tt.exports=Hs()),Tt.exports}var t=Us(),At={exports:{}},aa={};var La;function Ys(){if(La)return aa;La=1;var e=p;function o(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var s=typeof Object.is=="function"?Object.is:o,r=e.useState,c=e.useEffect,d=e.useLayoutEffect,l=e.useDebugValue;function f(m,x){var j=x(),V=r({inst:{value:j,getSnapshot:x}}),C=V[0].inst,A=V[1];return d(function(){C.value=j,C.getSnapshot=x,h(C)&&A({inst:C})},[m,j,x]),c(function(){return h(C)&&A({inst:C}),m(function(){h(C)&&A({inst:C})})},[m]),l(j),j}function h(m){var x=m.getSnapshot;m=m.value;try{var j=x();return!s(m,j)}catch{return!0}}function S(m,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:f;return aa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b,aa}var sa={};var Wa;function Xs(){return Wa||(Wa=1,process.env.NODE_ENV!=="production"&&(function(){function e(j,V){return j===V&&(j!==0||1/j===1/V)||j!==j&&V!==V}function o(j,V){b||c.startTransition===void 0||(b=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var C=V();if(!m){var A=V();d(C,A)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}A=l({inst:{value:C,getSnapshot:V}});var _=A[0].inst,v=A[1];return h(function(){_.value=C,_.getSnapshot=V,s(_)&&v({inst:_})},[j,C,V]),f(function(){return s(_)&&v({inst:_}),j(function(){s(_)&&v({inst:_})})},[j]),S(C),C}function s(j){var V=j.getSnapshot;j=j.value;try{var C=V();return!d(j,C)}catch{return!0}}function r(j,V){return V()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var c=p,d=typeof Object.is=="function"?Object.is:e,l=c.useState,f=c.useEffect,h=c.useLayoutEffect,S=c.useDebugValue,b=!1,m=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:o;sa.useSyncExternalStore=c.useSyncExternalStore!==void 0?c.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),sa}var Da;function Ks(){return Da||(Da=1,process.env.NODE_ENV==="production"?At.exports=Ys():At.exports=Xs()),At.exports}var Fa=Ks();const Ba=0,Ha=1,Ua=2,Ya=3;var Xa=Object.prototype.hasOwnProperty;function oa(e,o){var s,r;if(e===o)return!0;if(e&&o&&(s=e.constructor)===o.constructor){if(s===Date)return e.getTime()===o.getTime();if(s===RegExp)return e.toString()===o.toString();if(s===Array){if((r=e.length)===o.length)for(;r--&&oa(e[r],o[r]););return r===-1}if(!s||typeof e=="object"){r=0;for(s in e)if(Xa.call(e,s)&&++r&&!Xa.call(o,s)||!(s in o)||!oa(e[s],o[s]))return!1;return Object.keys(o).length===r}}return e!==e&&o!==o}const ze=new WeakMap,Pe=()=>{},se=Pe(),ra=Object,T=e=>e===se,Ge=e=>typeof e=="function",Fe=(e,o)=>({...e,...o}),Ka=e=>Ge(e.then),na={},Nt={},ia="undefined",ht=typeof window!=ia,ca=typeof document!=ia,Js=ht&&"Deno"in window,Zs=()=>ht&&typeof window.requestAnimationFrame!=ia,Ja=(e,o)=>{const s=ze.get(e);return[()=>!T(o)&&e.get(o)||na,r=>{if(!T(o)){const c=e.get(o);o in Nt||(Nt[o]=c),s[5](o,Fe(c,r),c||na)}},s[6],()=>!T(o)&&o in Nt?Nt[o]:!T(o)&&e.get(o)||na]};let da=!0;const Qs=()=>da,[la,pa]=ht&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Pe,Pe],qs=()=>{const e=ca&&document.visibilityState;return T(e)||e!=="hidden"},$s=e=>(ca&&document.addEventListener("visibilitychange",e),la("focus",e),()=>{ca&&document.removeEventListener("visibilitychange",e),pa("focus",e)}),eo=e=>{const o=()=>{da=!0,e()},s=()=>{da=!1};return la("online",o),la("offline",s),()=>{pa("online",o),pa("offline",s)}},to={isOnline:Qs,isVisible:qs},ao={initFocus:$s,initReconnect:eo},Za=!p.useId,st=!ht||Js,so=e=>Zs()?window.requestAnimationFrame(e):setTimeout(e,1),ua=st?p.useEffect:p.useLayoutEffect,fa=typeof navigator<"u"&&navigator.connection,Qa=!st&&fa&&(["slow-2g","2g"].includes(fa.effectiveType)||fa.saveData),It=new WeakMap,oo=e=>ra.prototype.toString.call(e),ga=(e,o)=>e===`[object ${o}]`;let ro=0;const ma=e=>{const o=typeof e,s=oo(e),r=ga(s,"Date"),c=ga(s,"RegExp"),d=ga(s,"Object");let l,f;if(ra(e)===e&&!r&&!c){if(l=It.get(e),l)return l;if(l=++ro+"~",It.set(e,l),Array.isArray(e)){for(l="@",f=0;f<e.length;f++)l+=ma(e[f])+",";It.set(e,l)}if(d){l="#";const h=ra.keys(e).sort();for(;!T(f=h.pop());)T(e[f])||(l+=f+":"+ma(e[f])+",");It.set(e,l)}}else l=r?e.toJSON():o=="symbol"?e.toString():o=="string"?JSON.stringify(e):""+e;return l},ha=e=>{if(Ge(e))try{e=e()}catch{e=""}const o=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ma(e):"",[e,o]};let no=0;const xa=()=>++no;async function qa(...e){const[o,s,r,c]=e,d=Fe({populateCache:!0,throwOnError:!0},typeof c=="boolean"?{revalidate:c}:c||{});let l=d.populateCache;const f=d.rollbackOnError;let h=d.optimisticData;const S=x=>typeof f=="function"?f(x):f!==!1,b=d.throwOnError;if(Ge(s)){const x=s,j=[],V=o.keys();for(const C of V)!/^\$(inf|sub)\$/.test(C)&&x(o.get(C)._k)&&j.push(C);return Promise.all(j.map(m))}return m(s);async function m(x){const[j]=ha(x);if(!j)return;const[V,C]=Ja(o,j),[A,_,v,ue]=ze.get(o),N=()=>{const H=A[j];return(Ge(d.revalidate)?d.revalidate(V().data,x):d.revalidate!==!1)&&(delete v[j],delete ue[j],H&&H[0])?H[0](Ua).then(()=>V().data):V().data};if(e.length<3)return N();let Y=r,I,J=!1;const ae=xa();_[j]=[ae,0];const D=!T(h),oe=V(),ce=oe.data,M=oe._c,de=T(M)?ce:M;if(D&&(h=Ge(h)?h(de,ce):h,C({data:h,_c:de})),Ge(Y))try{Y=Y(de)}catch(H){I=H,J=!0}if(Y&&Ka(Y))if(Y=await Y.catch(H=>{I=H,J=!0}),ae!==_[j][0]){if(J)throw I;return Y}else J&&D&&S(I)&&(l=!0,C({data:de,_c:se}));if(l&&!J)if(Ge(l)){const H=l(Y,de);C({data:H,error:se,_c:se})}else C({data:Y,error:se,_c:se});if(_[j][1]=xa(),Promise.resolve(N()).then(()=>{C({_c:se})}),J){if(b)throw I;return}return Y}}const $a=(e,o)=>{for(const s in e)e[s][0]&&e[s][0](o)},io=(e,o)=>{if(!ze.has(e)){const s=Fe(ao,o),r=Object.create(null),c=qa.bind(se,e);let d=Pe;const l=Object.create(null),f=(b,m)=>{const x=l[b]||[];return l[b]=x,x.push(m),()=>x.splice(x.indexOf(m),1)},h=(b,m,x)=>{e.set(b,m);const j=l[b];if(j)for(const V of j)V(m,x)},S=()=>{if(!ze.has(e)&&(ze.set(e,[r,Object.create(null),Object.create(null),Object.create(null),c,h,f]),!st)){const b=s.initFocus(setTimeout.bind(se,$a.bind(se,r,Ba))),m=s.initReconnect(setTimeout.bind(se,$a.bind(se,r,Ha)));d=()=>{b&&b(),m&&m(),ze.delete(e)}}};return S(),[e,c,S,d]}return[e,ze.get(e)[4]]},co=(e,o,s,r,c)=>{const d=s.errorRetryCount,l=c.retryCount,f=~~((Math.random()+.5)*(1<<(l<8?l:8)))*s.errorRetryInterval;!T(d)&&l>d||setTimeout(r,f,c)},lo=oa,[es,po]=io(new Map),uo=Fe({onLoadingSlow:Pe,onSuccess:Pe,onError:Pe,onErrorRetry:co,onDiscarded:Pe,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Qa?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Qa?5e3:3e3,compare:lo,isPaused:()=>!1,cache:es,mutate:po,fallback:{}},to),fo=(e,o)=>{const s=Fe(e,o);if(o){const{use:r,fallback:c}=e,{use:d,fallback:l}=o;r&&d&&(s.use=r.concat(d)),c&&l&&(s.fallback=Fe(c,l))}return s},go=p.createContext({}),mo="$inf$",ts=ht&&window.__SWR_DEVTOOLS_USE__,ho=ts?window.__SWR_DEVTOOLS_USE__:[],xo=()=>{ts&&(window.__SWR_DEVTOOLS_REACT__=p)},vo=e=>Ge(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],as=()=>{const e=p.useContext(go);return p.useMemo(()=>Fe(uo,e),[e])},yo=e=>(o,s,r)=>e(o,s&&((...d)=>{const[l]=ha(o),[,,,f]=ze.get(es);if(l.startsWith(mo))return s(...d);const h=f[l];return T(h)?s(...d):(delete f[l],h)}),r),bo=ho.concat(yo),wo=e=>function(...s){const r=as(),[c,d,l]=vo(s),f=fo(r,l);let h=e;const{use:S}=f,b=(S||[]).concat(bo);for(let m=b.length;m--;)h=b[m](h);return h(c,d||f.fetcher||null,f)},ko=(e,o,s)=>{const r=o[e]||(o[e]=[]);return r.push(s),()=>{const c=r.indexOf(s);c>=0&&(r[c]=r[r.length-1],r.pop())}};xo();const va=p.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(o=>{e.status="fulfilled",e.value=o},o=>{e.status="rejected",e.reason=o}),e}}),ya={dedupe:!0},ss=Promise.resolve(se),So=()=>Pe,os=wo((e,o,s)=>{const{cache:r,compare:c,suspense:d,fallbackData:l,revalidateOnMount:f,revalidateIfStale:h,refreshInterval:S,refreshWhenHidden:b,refreshWhenOffline:m,keepPreviousData:x,strictServerPrefetchWarning:j}=s,[V,C,A,_]=ze.get(r),[v,ue]=ha(e),N=p.useRef(!1),Y=p.useRef(!1),I=p.useRef(v),J=p.useRef(o),ae=p.useRef(s),D=()=>ae.current,oe=()=>D().isVisible()&&D().isOnline(),[ce,M,de,H]=Ja(r,v),re=p.useRef({}).current,L=T(l)?T(s.fallback)?se:s.fallback[v]:l,Se=(W,B)=>{for(const X in re){const Z=X;if(Z==="data"){if(!c(W[Z],B[Z])&&(!T(W[Z])||!c(Ee,B[Z])))return!1}else if(B[Z]!==W[Z])return!1}return!0},je=!N.current,He=p.useMemo(()=>{const W=ce(),B=H(),X=Q=>{const K=Fe(Q);return delete K._k,(()=>{if(!v||!o||D().isPaused())return!1;if(je&&!T(f))return f;const Ne=T(L)?K.data:L;return T(Ne)||h})()?{isValidating:!0,isLoading:!0,...K}:K},Z=X(W),Ve=W===B?Z:X(B);let me=Z;return[()=>{const Q=X(ce());return Se(Q,me)?(me.data=Q.data,me.isLoading=Q.isLoading,me.isValidating=Q.isValidating,me.error=Q.error,me):(me=Q,Q)},()=>Ve]},[r,v]),Oe=Fa.useSyncExternalStore(p.useCallback(W=>de(v,(B,X)=>{Se(X,B)||W()}),[r,v]),He[0],He[1]),g=V[v]&&V[v].length>0,R=Oe.data,z=T(R)?L&&Ka(L)?va(L):L:R,F=Oe.error,Te=p.useRef(z),Ee=x?T(R)?T(Te.current)?z:Te.current:R:z,P=v&&T(z),ye=p.useRef(null);!st&&Fa.useSyncExternalStore(So,()=>(ye.current=!1,ye),()=>(ye.current=!0,ye));const ot=ye.current;j&&ot&&!d&&P&&console.warn(`Missing pre-initiated data for serialized key "${v}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const Le=!v||!o||D().isPaused()||g&&!T(F)?!1:je&&!T(f)?f:d?T(z)?!1:h:T(z)||h,Ue=je&&Le,fe=T(Oe.isValidating)?Ue:Oe.isValidating,Ae=T(Oe.isLoading)?Ue:Oe.isLoading,te=p.useCallback(async W=>{const B=J.current;if(!v||!B||Y.current||D().isPaused())return!1;let X,Z,Ve=!0;const me=W||{},Q=!A[v]||!me.dedupe,K=()=>Za?!Y.current&&v===I.current&&N.current:v===I.current,We={isValidating:!1,isLoading:!1},Ne=()=>{M(We)},jt=()=>{const le=A[v];le&&le[1]===Z&&delete A[v]},_e={isValidating:!0};T(ce().data)&&(_e.isLoading=!0);try{if(Q&&(M(_e),s.loadingTimeout&&T(ce().data)&&setTimeout(()=>{Ve&&K()&&D().onLoadingSlow(v,s)},s.loadingTimeout),A[v]=[B(ue),xa()]),[X,Z]=A[v],X=await X,Q&&setTimeout(jt,s.dedupingInterval),!A[v]||A[v][1]!==Z)return Q&&K()&&D().onDiscarded(v),!1;We.error=se;const le=C[v];if(!T(le)&&(Z<=le[0]||Z<=le[1]||le[1]===0))return Ne(),Q&&K()&&D().onDiscarded(v),!1;const Ie=ce().data;We.data=c(Ie,X)?Ie:X,Q&&K()&&D().onSuccess(X,v,s)}catch(le){jt();const Ie=D(),{shouldRetryOnError:Bt}=Ie;Ie.isPaused()||(We.error=le,Q&&K()&&(Ie.onError(le,v,Ie),(Bt===!0||Ge(Bt)&&Bt(le))&&(!D().revalidateOnFocus||!D().revalidateOnReconnect||oe())&&Ie.onErrorRetry(le,v,Ie,q=>{const Qe=V[v];Qe&&Qe[0]&&Qe[0](Ya,q)},{retryCount:(me.retryCount||0)+1,dedupe:!0})))}return Ve=!1,Ne(),!0},[v,r]),Ze=p.useCallback((...W)=>qa(r,I.current,...W),[]);if(ua(()=>{J.current=o,ae.current=s,T(R)||(Te.current=R)}),ua(()=>{if(!v)return;const W=te.bind(se,ya);let B=0;D().revalidateOnFocus&&(B=Date.now()+D().focusThrottleInterval);const Z=ko(v,V,(Ve,me={})=>{if(Ve==Ba){const Q=Date.now();D().revalidateOnFocus&&Q>B&&oe()&&(B=Q+D().focusThrottleInterval,W())}else if(Ve==Ha)D().revalidateOnReconnect&&oe()&&W();else{if(Ve==Ua)return te();if(Ve==Ya)return te(me)}});return Y.current=!1,I.current=v,N.current=!0,M({_k:ue}),Le&&(A[v]||(T(z)||st?W():so(W))),()=>{Y.current=!0,Z()}},[v]),ua(()=>{let W;function B(){const Z=Ge(S)?S(ce().data):S;Z&&W!==-1&&(W=setTimeout(X,Z))}function X(){!ce().error&&(b||D().isVisible())&&(m||D().isOnline())?te(ya).then(B):B()}return B(),()=>{W&&(clearTimeout(W),W=-1)}},[S,b,m,v]),p.useDebugValue(Ee),d){if(!Za&&st&&P)throw new Error("Fallback data is required when using Suspense in SSR.");P&&(J.current=o,ae.current=s,Y.current=!1);const W=_[v],B=!T(W)&&P?Ze(W):ss;if(va(B),!T(F)&&P)throw F;const X=P?te(ya):ss;!T(Ee)&&P&&(X.status="fulfilled",X.value=!0),va(X)}return{mutate:Ze,get data(){return re.data=!0,Ee},get error(){return re.error=!0,F},get isValidating(){return re.isValidating=!0,fe},get isLoading(){return re.isLoading=!0,Ae}}}),jo=({children:e})=>{const o=p.useRef(null),[s,r]=p.useState(null);return p.useEffect(()=>{if(o.current&&!o.current.shadowRoot){const c=o.current.attachShadow({mode:"open"});document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach(f=>{(f.textContent?.includes(".vg-")||f.textContent?.includes("--vg-"))&&c.appendChild(f.cloneNode(!0))});const l=document.createElement("link");l.rel="stylesheet",l.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",c.appendChild(l),r(c)}},[]),t.jsx("div",{"data-vg-id":"49696d6b","data-source-path":"/src/components/ShadowRootWrapper.tsx:38",ref:o,id:"viewgate-shadow-host",style:{position:"relative",zIndex:2147483647},children:s&&Fs.createPortal(e,s)})};const rs=(...e)=>e.filter((o,s,r)=>!!o&&o.trim()!==""&&r.indexOf(o)===s).join(" ").trim();const Oo=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Eo=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,s,r)=>r?r.toUpperCase():s.toLowerCase());const ns=e=>{const o=Eo(e);return o.charAt(0).toUpperCase()+o.slice(1)};var Co={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Vo=e=>{for(const o in e)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};const _o=p.forwardRef(({color:e="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:c="",children:d,iconNode:l,...f},h)=>p.createElement("svg",{ref:h,...Co,width:o,height:o,stroke:e,strokeWidth:r?Number(s)*24/Number(o):s,className:rs("lucide",c),...!d&&!Vo(f)&&{"aria-hidden":"true"},...f},[...l.map(([S,b])=>p.createElement(S,b)),...Array.isArray(d)?d:[d]]));const U=(e,o)=>{const s=p.forwardRef(({className:r,...c},d)=>p.createElement(_o,{ref:d,iconNode:o,className:rs(`lucide-${Oo(ns(e))}`,`lucide-${e}`,r),...c}));return s.displayName=ns(e),s};const xt=U("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);const Ro=U("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);const is=U("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Go=U("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Ke=U("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const cs=U("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const ba=U("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const To=U("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Be=U("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const Ao=U("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const No=U("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);const zt=U("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const Pt=U("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);const Mt=U("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const ds=U("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Lt=U("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);const Io=U("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const vt=U("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const zo=U("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Po=U("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Mo=U("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const Wt=U("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Lo=U("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const yt=U("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Wo={en:{enterMode:"Enter Feedback Mode",exitMode:"Exit Mode",completed:"Completed",feedbackHeader:"Feedback",selectedElement:"Selected element:",line:"Line",placeholder:"Tell us what you'd like to change...",cancel:"Cancel",send:"Send Feedback",submitting:"Submitting...",success:"Your feedback has been submitted successfully!",error:"Failed to submit feedback. Check backend connection.",successHeader:"Success",errorHeader:"Error",preview:"Preview",viewComments:"View Comments",close:"Close",observe:"Observe",pending:"Pending",readyForReview:"Ready for Review",noComments:"No comments found.",deleteConfirm:"Delete comment",completeConfirm:"Mark as completed?",confirmComplete:"The ticket will be marked as completed and archived.",markReady:"Mark as Ready for Review",reopen:"Reopen",reopenPlaceholder:"Add a new comment before confirming...",review:"Review",confirmDelete:"Are you sure you want to permanently delete this comment? This action cannot be undone.",markReadyConfirm:"Mark as Ready for Review?",confirmMarkReady:"Do you want to mark this comment as ready for review? it will be moved to the review state.",reopenConfirm:"Reopen comment",confirmReopen:"Do you want to set this comment back to pending status?",yes:"Yes, confirm",no:"No, cancel",deleteSuccess:"Comment deleted successfully.",updateSuccess:"Updated successfully.",navigating:"Redirecting to review...",selectToComment:"Click to comment",feedbackSubheader:"What would you like to improve here?",sendFeedback:"Send Comment",edit:"Edit",save:"Save",commentDetails:"Comment Details",annotations:"Comments",viewAll:"View All",exitConfirmTitle:"Close ViewGate?",exitConfirmMessage:"Are you sure you want to close ViewGate? Remember you can reopen it by pressing ALT once (Normal Mode) or holding it for 1 second (Backlog Mode).",backlog:"Backlog",low:"Low",medium:"Medium",high:"High",urgent:"Urgent",priority:"Priority",selectMember:"Select who you are to comment",asMember:"Commenting as",changeMember:"Change",focusAreas:"Focus Areas",frontend:"Frontend",backend:"Backend",ux:"UX/UI",figmaLink:"Figma Reference Link",figmaLinkPlaceholder:"https://www.figma.com/file/...",endpoint:"Related Backend Endpoint",selectEndpoint:"Select endpoint...",figmaNamePlaceholder:"e.g. Main Design, Modal, etc.",addLink:"Add another link",removeLink:"Remove",figmaPrimaryDesign:"Principal Design",invalidToken:"Invalid or expired token"},es:{enterMode:"Activar Modo Comentarios",exitMode:"Salir del Modo",completed:"Completado",feedbackHeader:"Comentarios",selectedElement:"Elemento seleccionado:",line:"Línea",placeholder:"Cuéntanos qué te gustaría cambiar...",cancel:"Cancelar",send:"Enviar Comentarios",submitting:"Enviando...",success:"¡Tus comentarios se han enviado con éxito!",error:"Error al enviar comentarios. Revisa la conexión con el servidor.",successHeader:"Éxito",errorHeader:"Error",preview:"Vista previa",viewComments:"Ver Comentarios",close:"Cerrar",observe:"Observar",pending:"Pendiente",readyForReview:"Listo para revisión",noComments:"No hay comentarios.",deleteConfirm:"Eliminar comentario",completeConfirm:"¿Completar ticket?",confirmComplete:"El ticket se marcará como completado y se archivará.",markReady:"Marcar como Listo para revisión",reopen:"Reabrir",reopenPlaceholder:"Agrega un nuevo comentario antes de confirmar...",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar permanentemente este comentario? Esta acción no se puede deshacer.",markReadyConfirm:"¿Listo para revisión?",confirmMarkReady:"¿Deseas marcar este comentario como listo para revisión? Pasará al estado de revisión.",reopenConfirm:"Reabrir comentario",confirmReopen:"¿Deseas volver a poner este comentario en estado pendiente?",yes:"Sí, confirmar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Actualizado correctamente.",navigating:"Redirigiendo a revisión...",selectToComment:"Haz clic para comentar",feedbackSubheader:"¿Qué te gustaría mejorar aquí?",sendFeedback:"Enviar Comentario",edit:"Editar",save:"Guardar",commentDetails:"Detalles del Comentario",annotations:"Comentarios",viewAll:"Ver Todos",exitConfirmTitle:"¿Cerrar ViewGate?",exitConfirmMessage:"¿Estás seguro de que deseas cerrar ViewGate? Recuerda que puedes volver a activarlo pulsando una vez la tecla ALT (Modo Normal) o manteniéndola pulsada 1 segundo (Modo Backlog).",backlog:"Backlog",low:"Baja",medium:"Media",high:"Alta",urgent:"Urgente",priority:"Prioridad",selectMember:"Selecciona quién eres para comentar",asMember:"Comentando como",changeMember:"Cambiar",focusAreas:"Áreas de Foco",frontend:"Frontend",backend:"Backend",ux:"UX/UI",figmaLink:"Link de Referencia Figma",figmaLinkPlaceholder:"https://www.figma.com/file/...",endpoint:"Endpoint de Backend Relacionado",selectEndpoint:"Seleccionar endpoint...",figmaNamePlaceholder:"ej. Diseño Principal, Modal, etc.",addLink:"Agregar otro link",removeLink:"Eliminar",figmaPrimaryDesign:"Diseño Principal",invalidToken:"Token inválido o expirado"}},ls=p.createContext(void 0),ps=()=>{const e=p.useContext(ls);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},bt="viewgate_enabled",Do=()=>{if(typeof window>"u")return!1;const e=new URLSearchParams(window.location.search);return e.has("viewgate")||e.has("viewgate-backlog")?(sessionStorage.setItem(bt,"true"),!0):sessionStorage.getItem(bt)==="true"},Fo=({children:e,language:o="es",apiKey:s,baseUrl:r="https://view-gate.vercel.app",dashboardUrl:c})=>{const d=c||(r==="https://view-gate.vercel.app"?"https://view-gate-dashboard.vercel.app":r.includes("localhost:5000")?r.replace("5000","3000"):r),[l,f]=p.useState(!1),[h,S]=p.useState([]);p.useRef(0);const b=p.useRef(null),m=p.useRef(!1);p.useEffect(()=>{f(Do());const C=_=>{_.key==="Alt"&&!_.repeat&&(_.preventDefault(),m.current=!1,b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{const v=new URL(window.location.href);v.searchParams.delete("viewgate"),v.searchParams.set("viewgate-backlog","true"),window.history.replaceState({},"",v.toString()),f(!0),sessionStorage.setItem(bt,"true"),window.dispatchEvent(new PopStateEvent("popstate")),j(o==="es"?"Modo Backlog activado":"Backlog Mode activated","success"),m.current=!0,b.current=null},1e3))},A=_=>{if(_.key==="Alt"&&(_.preventDefault(),b.current)){clearTimeout(b.current),b.current=null;const v=new URL(window.location.href);v.searchParams.delete("viewgate-backlog"),v.searchParams.set("viewgate","true"),window.history.replaceState({},"",v.toString()),f(!0),sessionStorage.setItem(bt,"true"),window.dispatchEvent(new PopStateEvent("popstate")),j(o==="es"?"Modo Normal activado":"Normal Mode activated","success")}};return window.addEventListener("keydown",C),window.addEventListener("keyup",A),()=>{window.removeEventListener("keydown",C),window.removeEventListener("keyup",A)}},[o]);const x=()=>{if(sessionStorage.removeItem(bt),f(!1),typeof window<"u"){const C=new URL(window.location.href);C.searchParams.delete("viewgate"),window.history.replaceState({},"",C.toString())}},j=(C,A)=>{const _=Date.now();S(v=>[...v,{id:_,message:C,type:A}]),setTimeout(()=>{S(v=>v.filter(ue=>ue.id!==_))},4e3)},V=Wo[o];return t.jsxs(ls.Provider,{"data-vg-id":"89da3486","data-source-path":"/src/components/ViewGateProvider.tsx:369",value:{addToast:j,language:o,t:V,apiKey:s,baseUrl:r,dashboardUrl:d,disableViewGate:x,hasActiveToasts:h.length>0},children:[e,l&&t.jsx(jo,{"data-vg-id":"f1499d3a","data-source-path":"/src/components/ViewGateProvider.tsx:381",children:t.jsxs("div",{"data-vg-id":"1bedb79b","data-source-path":"/src/components/ViewGateProvider.tsx:382",className:"vg-container",children:[t.jsx(Ss,{"data-vg-id":"d3f262cb","data-source-path":"/src/components/ViewGateProvider.tsx:383"}),t.jsx("div",{"data-vg-id":"1bedb79d","data-source-path":"/src/components/ViewGateProvider.tsx:384",className:"vg-toasts",style:{zIndex:2147483647},children:h.map(C=>t.jsxs("div",{"data-vg-id":"1bedb79e","data-source-path":"/src/components/ViewGateProvider.tsx:386",className:`vg-toast vg-animate-slide ${C.type}`,children:[C.type==="success"?t.jsx(Ke,{"data-vg-id":"c7ae3b26","data-source-path":"/src/components/ViewGateProvider.tsx:388",size:24,color:"#22c55e"}):C.type==="warning"?t.jsx(Lo,{"data-vg-id":"137eb473","data-source-path":"/src/components/ViewGateProvider.tsx:390",size:24,color:"#f59e0b"}):t.jsx(Go,{"data-vg-id":"e7ad3c7c","data-source-path":"/src/components/ViewGateProvider.tsx:392",size:24,color:"#ef4444"}),t.jsxs("div",{"data-vg-id":"61c93bb7","data-source-path":"/src/components/ViewGateProvider.tsx:394",children:[t.jsx("strong",{"data-vg-id":"29b8e974","data-source-path":"/src/components/ViewGateProvider.tsx:395",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:C.type==="success"?V.successHeader:C.type==="warning"?o==="es"?"Aviso":"Warning":V.errorHeader}),t.jsx("span",{"data-vg-id":"fbbd7822","data-source-path":"/src/components/ViewGateProvider.tsx:398",style:{fontSize:"14px",color:"#000000"},children:C.message})]})]},C.id))})]})})]})},us=async(e,o={})=>{const{scale:s=window.devicePixelRatio||2,padding:r=48,backgroundColor:c="#000000",logging:d=!1}=o,l=e.getBoundingClientRect(),f=document.createElement("canvas");f.width=(l.width+r*2)*s,f.height=(l.height+r*2)*s;const h=f.getContext("2d");return h?(h.fillStyle=c,h.fillRect(0,0,f.width,f.height),h.save(),h.scale(s,s),h.translate(r-l.left,r-l.top),d&&console.log("[VGCap] Starting recursive render of",e),await fs(e,h),h.restore(),f.toDataURL("image/webp",.98)):""},fs=async(e,o)=>{if(e.nodeType===Node.TEXT_NODE){await Ho(e,o);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const s=e,r=window.getComputedStyle(s);if(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")return;const c=s.getBoundingClientRect();o.save(),o.globalAlpha=parseFloat(r.opacity||"1"),Bo(o,c,r),s instanceof HTMLImageElement&&await Uo(o,s,c),r.backgroundImage!=="none"&&await Yo(o,s,c,r);const d=Array.from(s.childNodes);for(const l of d)await fs(l,o);o.restore()},Bo=(e,o,s)=>{const r=parseFloat(s.borderRadius)||0,c=s.backgroundColor;if(e.beginPath(),r>0){const l=o.left,f=o.top,h=o.width,S=o.height;e.moveTo(l+r,f),e.arcTo(l+h,f,l+h,f+S,r),e.arcTo(l+h,f+S,l,f+S,r),e.arcTo(l,f+S,l,f,r),e.arcTo(l,f,l+h,f,r),e.closePath()}else e.rect(o.left,o.top,o.width,o.height);if(s.boxShadow!=="none"){const l=s.boxShadow.match(/rgba?\(.*?\)\s+(\d+)px\s+(\d+)px\s+(\d+)px/);l&&l[0]&&(e.shadowColor=l[0],e.shadowBlur=parseInt(l[3]||"0"),e.shadowOffsetX=parseInt(l[1]||"0"),e.shadowOffsetY=parseInt(l[2]||"0"))}c!=="rgba(0, 0, 0, 0)"&&c!=="transparent"&&(e.fillStyle=c,e.fill());const d=parseFloat(s.borderWidth)||0;d>0&&(e.strokeStyle=s.borderColor,e.lineWidth=d,e.stroke()),e.shadowColor="transparent",e.shadowBlur=0},Ho=async(e,o)=>{const s=e.parentElement;if(!s||!e.textContent?.trim())return;const r=window.getComputedStyle(s),c=document.createRange();c.selectNodeContents(e);const d=c.getClientRects();if(d.length===0)return;o.font=`${r.fontStyle} ${r.fontVariant} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`,o.fillStyle=r.color,o.textBaseline="alphabetic";const l=e.textContent||"";for(const f of Array.from(d)){o.fillText(l,f.left,f.bottom-parseFloat(r.fontSize||"16")*.2);break}},Uo=async(e,o,s,r)=>{if(o.complete)try{e.drawImage(o,s.left,s.top,s.width,s.height)}catch{}},Yo=async(e,o,s,r)=>{const d=r.backgroundImage.match(/url\(["']?(.*?)["']?\)/);if(!d)return;const l=d[1],f=new Image;f.crossOrigin="anonymous",f.src=l,await new Promise(h=>{f.onload=h,f.onerror=h,setTimeout(h,500)}),f.complete&&f.naturalWidth>0&&e.drawImage(f,s.left,s.top,s.width,s.height)},wt=2147e6,gs=wt,Je=wt,Xo=wt-100,Ko=wt-50,Jo=wt-150,Ce="data-vg-pin-id",Zo=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},ms=(e,o)=>{if(!e)return"";try{const s=new Date(e);return isNaN(s.getTime())?"":new Intl.DateTimeFormat(o==="es"?"es-ES":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(s)}catch{return""}},hs=({url:e,className:o,style:s,tooltipStyle:r,onHover:c})=>{const d=p.useRef(null),l=()=>{if(!d.current||!c)return;const S=d.current.getBoundingClientRect(),b=S.top,m=window.innerHeight-S.bottom,x=b<140&&m>b?"bottom":"top";c({url:e,x:S.left+S.width/2,y:x==="top"?S.top:S.bottom,direction:x})},f=S=>S.toLowerCase().replace(/\/$/g,"").replace(/\/(?:[0-9]+|(?:[0-9a-f]{24}))(?=\/|$)/g,"/:id"),h=()=>{try{const S=f(window.location.pathname),b=new URL(e),m=f(b.pathname);return S===m||S.startsWith(m)||m.startsWith(S)}catch{return!1}};return t.jsxs("div",{ref:d,className:`vg-url-tag ${o||""}`,style:{...s,opacity:h()?1:.6,borderColor:h()?"var(--vg-primary)":"#e2e8f0"},onMouseEnter:l,onMouseMove:l,onMouseLeave:()=>c?.(null),children:[t.jsx(Be,{"data-vg-id":"353251b6","data-source-path":"/src/components/ViewGateOverlay.tsx:149",size:s?.fontSize?parseInt(s.fontSize)+1:10}),t.jsx("span",{"data-vg-id":"1b724dd0","data-source-path":"/src/components/ViewGateOverlay.tsx:150",style:{maxWidth:s?.maxWidth||"150px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:new URL(e).pathname})]})},kt=e=>{const o=[],s=[],r=[];let c=e,d=!1;for(;c&&c.nodeType===Node.ELEMENT_NODE;){const l=c.localName.toLowerCase();let f=1,h=c.previousElementSibling;for(;h;)h.localName.toLowerCase()===l&&f++,h=h.previousElementSibling;const S=l==="body"||l==="head"||l==="html"?l:`${l}:nth-of-type(${f})`;if(r.unshift(S),!d){const b=c.getAttribute("data-testid")||c.getAttribute("data-qa");if(b){const m=c.hasAttribute("data-testid")?"data-testid":"data-qa";s.push(`[${m}="${b}"]`)}c.id&&!c.id.startsWith("vg-")&&!c.id.includes(":")?(o.unshift(`#${c.id}`),d=!0):b?(o.unshift(`[${c.hasAttribute("data-testid")?"data-testid":"data-qa"}="${b}"]`),d=!0):o.unshift(S)}if(c=c.parentElement,l==="html")break}return{selector:o.join(" > "),fallbacks:s,vgPath:r.join(" > ")}},xs=e=>{const{vgPath:o}=kt(e);return{vgPath:o,classHash:e.className,parentTag:e.parentElement?.tagName.toLowerCase(),neighborCount:e.parentElement?.children.length,ariaLabel:e.getAttribute("aria-label")||e.getAttribute("title")||void 0,role:e.getAttribute("role")||void 0,name:e.getAttribute("name")||void 0,type:e.getAttribute("type")||void 0,placeholder:e.getAttribute("placeholder")||void 0,testId:e.getAttribute("data-testid")||e.getAttribute("data-qa")||void 0,textSnippet:(e.innerText||"").slice(0,50).trim()}},Qo=(()=>{let e=null,o=null;return s=>{if(!s||typeof window>"u"||typeof document>"u")return s;if(s.includes("oklch")||s.includes("oklab")||s.includes("lab(")||s.includes("lch(")||s.includes("color("))try{if(e||(e=document.createElement("canvas"),e.width=1,e.height=1),o||(o=e.getContext("2d",{willReadFrequently:!0})),o){o.fillStyle="#000000",o.fillStyle=s;const d=o.fillStyle;if(d&&!d.includes("oklch")&&!d.includes("oklab"))return d}const r=document.createElement("div");r.style.color=s,document.body.appendChild(r);const c=getComputedStyle(r).color;return document.body.removeChild(r),c&&!c.includes("oklch")?c:"rgb(0,0,0)"}catch{return"rgb(0,0,0)"}return s}})(),qo=e=>{const o=window.getComputedStyle(e),s={};return["display","position","margin","padding","font-size","color","background-color","width","height","z-index"].forEach(c=>{const d=o.getPropertyValue(c);s[c]=Qo(d)}),s},$o=e=>{const s=Object.keys(e).find(d=>d.startsWith("__reactFiber$")||d.startsWith("__reactInternalInstance$"));if(!s)return"";const r=[];let c=e[s];for(;c;){const d=c.type;if(typeof d=="function"){const l=d.displayName||d.name;l&&!l.includes("ViewGate")&&!r.includes(l)&&r.unshift(l)}c=c.return}return r.join(" > ")||"Generic Component"},Dt=e=>{if(!e||e.id==="viewgate-ui"||e.id==="viewgate-shadow-host"||e.closest("#viewgate-shadow-host"))return!1;if(e.getAttribute("role")==="dialog"||e.getAttribute("aria-modal")==="true"||e.classList.contains("modal")||e.classList.contains("modal-content"))return!0;const o=window.getComputedStyle(e),s=e.getBoundingClientRect(),r=e.getAttribute("role");if(r&&["listbox","menu","combobox","tooltip","option"].includes(r)||s.width<120&&s.height<120)return!1;const d=parseInt(o.zIndex)||0,l=o.position==="fixed"||o.position==="absolute",f=s.width>window.innerWidth*.4&&s.height>window.innerHeight*.4,h=Math.abs(s.left+s.width/2-window.innerWidth/2)<50,S=e.getAttribute("class")||"",b=S.toLowerCase().includes("modal")||S.toLowerCase().includes("dialog");return!!(l&&d>=100&&(f||h||b))},Ft=e=>{let o=e;for(;o&&o!==document.body;){if(Dt(o))return o;o=o.parentElement}return null},Me=e=>{if(!e.isConnected)return!1;const o=window.getComputedStyle(e);if(o.display==="none"||o.visibility==="hidden"||o.opacity==="0")return e.tagName!=="BODY"&&e.tagName,!1;if(e.offsetWidth===0||e.offsetHeight===0)return!1;let s=e.parentElement;for(;s;){const c=window.getComputedStyle(s);if(c.display==="none"||c.visibility==="hidden"||c.opacity==="0")return!1;s=s.parentElement}const r=e.getBoundingClientRect();return!(r.width===0||r.height===0)},vs=(e,o=document)=>{const s=o.querySelector(e);if(s)return s;const r=o.querySelectorAll("*");for(const c of Array.from(r)){const d=c.shadowRoot;if(d){const l=vs(e,d);if(l)return l}}return null},ys=(e,o)=>{let s=document.elementFromPoint(e,o);for(;s&&s.shadowRoot;){const r=s.shadowRoot.elementFromPoint(e,o);if(!r||r===s)break;s=r}return s},er=e=>{if(!e.tag)return null;const o=Array.from(document.getElementsByTagName(e.tag));let s=null,r=0;for(const c of o){if(!St(c,e))continue;let d=0;const l=c.getAttribute("placeholder"),f=e.attributes?.placeholder||e.fingerprint?.placeholder;f&&l===f&&(d+=6);const h=c.getAttribute("type"),S=e.attributes?.type||e.fingerprint?.type;if(S&&h===S&&(d+=2),c.innerText?.trim()===e.text.trim()&&(d+=5),e.fingerprint?.vgPath){const{vgPath:b}=kt(c);(b===e.vgPath||e.fingerprint?.vgPath===b)&&(d+=10)}d>r&&d>=7&&(r=d,s=c)}return s},St=(e,o)=>{if(e.tagName.toLowerCase()!==o.tag.toLowerCase())return!1;const s=e.getAttribute("placeholder"),r=o.attributes?.placeholder||o.fingerprint?.placeholder;if(r&&s&&r!==s)return!1;const c=e.getAttribute("type"),d=o.attributes?.type||o.fingerprint?.type;return!(d&&c&&d!==c)},bs=(e,o)=>{if(o){const l=Array.from(document.querySelectorAll(`[${Ce}="${o}"]`));if(l.length>0){const f=l.filter(h=>St(h,e));if(f.length===0)l.forEach(h=>h.removeAttribute(Ce));else{const h=f.find(b=>{const{vgPath:m}=kt(b);return m===e.vgPath||e.fingerprint?.vgPath===m}),S=h&&Me(h)?h:f.find(b=>!(!Me(b)||e.metadata?.isModal&&!b.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')));return S?(l.forEach(b=>{b!==S&&b.removeAttribute(Ce)}),S):null}}}if(e.vgPath)try{const l=document.querySelector(e.vgPath);if(l&&St(l,e)&&Me(l)&&(!e.metadata?.isModal||Ft(l)))return l}catch{}const r=(e.selector?Array.from(document.querySelectorAll(e.selector)):[]).filter(l=>St(l,e));let c=r.find(l=>{const{vgPath:f}=kt(l);return f===e.vgPath||e.fingerprint?.vgPath===f})||r[0]||null;if(c&&Me(c))if(e.metadata?.isModal&&!Ft(c))c=null;else return c;if(e.fallbackSelectors)for(const l of e.fallbackSelectors){const f=vs(l);if(f&&St(f,e)&&Me(f)){if(e.metadata?.isModal&&!Ft(f))continue;return f}}const d=er(e);return d&&Me(d)?e.metadata?.isModal&&!Ft(d)?null:d:null},wa=e=>({tag:e.tagName.toLowerCase(),text:(e.innerText||e.getAttribute("placeholder")||"").slice(0,50).trim(),role:e.getAttribute("role")||void 0,type:e.getAttribute("type")||void 0}),ws=e=>{if(!e)return"";let o=e.replace(/<path[^>]*d="([^"]{50,})"[^>]*\/?>/gi,(s,r)=>s.replace(r,`${r.substring(0,20)}...[STRIPPED_${r.length}]`));return o=o.replace(/<polygon[^>]*points="([^"]{50,})"[^>]*\/?>/gi,(s,r)=>s.replace(r,`${r.substring(0,20)}...[STRIPPED_${r.length}]`)),o},tr=e=>{const o=e.parentElement;if(!o)return;const s=Array.from(o.children).filter(l=>l!==e).slice(0,5).map(l=>wa(l)),r=Array.from(o.children),c=r.indexOf(e);let d="middle";return c===0&&(d="start"),c===r.length-1&&(d="end"),{target:{...wa(e),location:`${d} of ${o.tagName.toLowerCase()}`},parent:wa(o),siblings:s}},ks=(e,o)=>{const s=e.getAttribute("data-vg-id")||void 0;let r;const d=Object.keys(e).find(_=>_.startsWith("__reactFiber$")||_.startsWith("__reactInternalInstance$"));if(d){let _=e[d];for(;_;){if(_._debugSource){const{fileName:v,lineNumber:ue,columnNumber:N}=_._debugSource;r=`${v}:${ue}${N?":"+N:""}`;break}_=_.return}}const l=xs(e),f={vgId:s?1:0,fiber:r?.8:0,fingerprint:.5+(l.testId?.3:0)+(l.ariaLabel?.1:0)};let h=e.getAttribute("data-source-path")||r||"unknown:0";const S=$o(e),{selector:b,fallbacks:m,vgPath:x}=kt(e),j={};["placeholder","aria-label","name","type","alt","title","value","role","data-testid"].forEach(_=>{const v=e.getAttribute(_);v&&(j[_]=v)});const V=(()=>{let _=e;for(;_&&_!==document.body;){if(Dt(_))return!0;_=_.parentElement}return!1})();let C;V&&o&&!o.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')&&(C=ks(o));const A=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${b.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:b,vgPath:x,vgId:s,outerHtml:ws(e.outerHTML),parentContext:e.parentElement?`<${e.parentElement.tagName.toLowerCase()} ${Array.from(e.parentElement.attributes).map(_=>`${_.name}="${_.value}"`).join(" ").slice(0,500)}>`:"N/A",componentPath:S,signature:A,source:h,attributes:j,confidence:f,fallbackSelectors:[...new Set(m)].slice(0,5),domPath:[],viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:tr(e),fingerprint:xs(e),metadata:{hint:`Edit ${h.split(":")[0]} at line ${h.split(":")[1]||"?"}`,computedStyles:qo(e),viewportBreakpoint:Zo(),outerHtml:ws(e.outerHTML).slice(0,2e3),scrollPosition:{x:window.scrollX,y:window.scrollY},isModal:V,triggerReference:C}}},Ss=()=>{const{mutate:e}=as(),{addToast:o,language:s,t:r,apiKey:c,baseUrl:d,dashboardUrl:l,disableViewGate:f,hasActiveToasts:h}=ps(),[S,b]=p.useState(typeof window<"u"?window.location.pathname+window.location.search:"/"),m=p.useMemo(()=>typeof window>"u"?!1:window.location.href.includes("viewgate-backlog"),[S]);p.useEffect(()=>{const a=()=>b(window.location.pathname+window.location.search);window.addEventListener("popstate",a);const n=window.history.pushState,i=window.history.replaceState;return window.history.pushState=function(...u){n.apply(this,u),setTimeout(a,0)},window.history.replaceState=function(...u){i.apply(this,u),setTimeout(a,0)},()=>{window.removeEventListener("popstate",a),window.history.pushState=n,window.history.replaceState=i}},[]);const[x,j]=p.useState(!1),[V,C]=p.useState("medium"),[A,_]=p.useState("medium"),[v,ue]=p.useState("all"),[N,Y]=p.useState(null),[I,J]=p.useState(null),[ae,D]=p.useState(""),[oe,ce]=p.useState(!1),[M,de]=p.useState([]),[H,re]=p.useState([{name:r.figmaPrimaryDesign,link:""}]),[L,Se]=p.useState([]),[je,He]=p.useState([]),[Oe,g]=p.useState(null),[R,z]=p.useState(!1),[F,Te]=p.useState(""),[Ee,P]=p.useState(!1),[ye,ot]=p.useState("down");p.useRef(null);const[Le,Ue]=p.useState(!1),[fe,Ae]=p.useState(!1),[te,Ze]=p.useState([]),[ge,W]=p.useState(null),[B,X]=p.useState(""),[Z,Ve]=p.useState(!1),[me,Q]=p.useState({}),[K,We]=p.useState(null),[Ne,jt]=p.useState(!1),[_e,le]=p.useState(null),[Ie,Bt]=p.useState([]),[q,Qe]=p.useState(()=>typeof window>"u"?null:localStorage.getItem("vg_token")||sessionStorage.getItem("vg_token")),[ne,Sa]=p.useState(()=>{if(typeof window>"u")return null;const a=localStorage.getItem("vg_user")||sessionStorage.getItem("vg_user");return a&&a!=="undefined"?JSON.parse(a):null}),[Ot,ja]=p.useState(()=>typeof window>"u"?null:localStorage.getItem("vg_role")||sessionStorage.getItem("vg_role")),[qe,js]=p.useState(""),[Oa,Os]=p.useState(!1),[Wr,rr]=p.useState(!1),[Et,Es]=p.useState(!1),[Ht,Cs]=p.useState(!1),[Ut,nr]=p.useState(!1),[Yt,Vs]=p.useState(!0),ir=async a=>{if(a&&a.preventDefault(),!(!qe.trim()||!d)){Os(!0);try{const n=await fetch(`${d}/api/auth/me`,{headers:{Authorization:`Bearer ${qe.trim()}`,"x-api-key":c||""}});if(!n.ok){const k=await n.json().catch(()=>({}));throw new Error(k.error||k.message||"Invalid token")}const i=await n.json();console.log("[ViewGate] Auth data received:",i);const u=i.user||(i.email?i:null),y=i.role||u?.role||"dev";if(console.log("[ViewGate] Identified as:",u?.email,u?.name,"Role:",y),!u)throw new Error("User not found in token");Qe(qe.trim()),Sa(u),ja(y),localStorage.setItem("vg_token",qe.trim()),u&&localStorage.setItem("vg_user",JSON.stringify(u)),y&&localStorage.setItem("vg_role",y),o(s==="es"?"Sesión iniciada correctamente":r.successHeader,"success"),js(""),Cs(!1),Es(!1),rr(!1),Ea()}catch(n){let i=n.message||(s==="es"?"Clave inválida o expirada":"Invalid or expired key");i.toLowerCase().includes("invalid or expired token")&&(i=r.invalidToken),o(i,"error")}finally{Os(!1)}}},Ct=p.useCallback(()=>{console.log("[VIEWGATE_WRAPPER] Clearing session"),Qe(null),Sa(null),ja(null),Vs(!1),sessionStorage.removeItem("vg_token"),sessionStorage.removeItem("vg_user"),sessionStorage.removeItem("vg_role"),localStorage.removeItem("vg_token"),localStorage.removeItem("vg_user"),localStorage.removeItem("vg_role");const a=d;e(n=>typeof n=="string"&&a&&n.startsWith(a),void 0,{revalidate:!1}),Ze([]),le(null),j(!1),J(null),D(""),Ae(!1),o(s==="es"?"Sesión finalizada o inválida":"Session ended or invalid","error")},[d,s]);p.useEffect(()=>{const a=n=>{if(n.data?.type?.startsWith("VIEWGATE_")&&console.log("[VIEWGATE_WRAPPER] Received message:",n.data.type,n.data),n.data?.type==="VIEWGATE_AUTH_SUCCESS"||n.data?.type==="VIEWGATE_SILENT_AUTH"){const{token:i,user:u,role:y,error:k}=n.data;if(console.log("[VIEWGATE_WRAPPER] Auth process:",{type:n.data.type,hasToken:!!i,hasUser:!!u}),k==="NO_SESSION")return;const E=sessionStorage.getItem("vg_token");if(i&&i!==E||!i&&E){console.log("[VIEWGATE_WRAPPER] Session sync detected change, clearing caches");const O=d;e($=>typeof $=="string"&&O&&$.startsWith(O),void 0,{revalidate:!0}),Ze([])}i&&(Qe(i),sessionStorage.setItem("vg_token",i),localStorage.setItem("vg_token",i),u&&(Sa(u),ja(y||u.role||"dev"),sessionStorage.setItem("vg_user",JSON.stringify(u)),localStorage.setItem("vg_user",JSON.stringify(u))),n.data.type==="VIEWGATE_AUTH_SUCCESS"&&o(s==="es"?"Sesión iniciada correctamente":"Logged in successfully","success"))}if(n.data?.type==="VIEWGATE_LOGOUT"){if(console.log("[VIEWGATE_WRAPPER] Logout message received"),sessionStorage.getItem("vg_token")){console.log("[VIEWGATE_WRAPPER] Protective logout: Ignoring logout since we have a valid manual session.");return}Ct()}};return window.addEventListener("message",a),()=>window.removeEventListener("message",a)},[s,Ct,d]);const Ea=p.useCallback(()=>{if(!c||!d||Ht)return;const a={"x-api-key":c};q&&(a.Authorization=`Bearer ${q}`),fetch(`${d}/api/projects/settings-check`,{headers:a}).then(n=>{if(n.status===403)throw Ct(),new Error("Unauthorized");return n.json()}).then(n=>{n.projectId&&g(n.projectId),typeof n.isFigmaConnected=="boolean"&&z(n.isFigmaConnected),typeof n.hasEndpoints=="boolean"&&nr(n.hasEndpoints),Cs(!0)}).catch(n=>{n.message!=="Unauthorized"&&console.error("Failed to fetch project settings-check",n)})},[c,d,Ht]),Ca=p.useCallback(()=>{if(!c||!d||Et)return;const a={"x-api-key":c};q&&(a.Authorization=`Bearer ${q}`),fetch(`${d}/api/projects/endpoints`,{headers:a}).then(n=>{if(n.status===403)throw Ct(),new Error("Unauthorized");return n.json()}).then(n=>{n.endpoints&&Array.isArray(n.endpoints)?He(n.endpoints):Array.isArray(n)&&He(n),typeof n.isFigmaConnected=="boolean"&&z(n.isFigmaConnected),Es(!0)}).catch(n=>{n.message!=="Unauthorized"&&console.error("Failed to fetch project endpoints",n)})},[c,d,Et]);p.useEffect(()=>{(x||q)&&(Ht||Ea())},[x,q,Ht,Ea]),p.useEffect(()=>{Ee&&!Et&&Ca()},[Ee,Et,Ca]),p.useEffect(()=>{if(M.length===0)return;const a=["frontend"];Ut&&a.push("backend"),R&&a.push("ux");const n=M.filter(i=>a.includes(i));n.length!==M.length&&de(n)},[je.length,R,M]);const _s=p.useCallback(async a=>{const n={"x-api-key":c};q&&(n.Authorization=`Bearer ${q}`);const i=await fetch(a,{headers:n});if(!i.ok){i.status===403&&Ct();const u=await i.json().catch(()=>({}));let y=u.message||u.error||"Fetch failed";y.toLowerCase().includes("invalid or expired token")&&(y=r.invalidToken);const k=new Error(y);throw k.status=i.status,k}return Vs(!0),i.json()},[c,q]),cr=p.useMemo(()=>m?"backlog":"pending,todo,in_progress,review,ready_for_review,bug_fixing",[m]),{data:Xt,isLoading:Kt,error:Rs}=os(c?`${d}/api/projects/active-sprint`:null,_s,{revalidateOnFocus:!0,revalidateOnMount:!0,dedupingInterval:6e4}),{data:Vt,isLoading:$e,mutate:Jt}=os(c&&(Xt||m)?`${d}/api/annotations?status=${cr}`:null,_s,{refreshInterval:3e4,revalidateOnFocus:!0,dedupingInterval:5e3}),[et,Gs]=p.useState(null),[rt,Dr]=p.useState(null),Ts=p.useRef(te);Ts.current=te;const[ie,Zt]=p.useState(null),As=p.useRef(null),[nt,dr]=p.useState([]),Ns=p.useMemo(()=>{const a=(F||"").toLowerCase().trim();return a?je.filter(n=>{const i=n.path&&n.path.toLowerCase().includes(a),u=n.description&&n.description.toLowerCase().includes(a),y=n.method&&n.method.toLowerCase().includes(a);return i||u||y}):je},[je,F]),Is=p.useMemo(()=>{const a={},n=s==="es"?"Seleccionados":"Selected";return Ns.forEach(i=>{const u=`${i.method}|${i.path}`;L.includes(u)&&(a[n]||(a[n]={name:n,endpoints:[]}),a[n].endpoints.push(i));const k=(i.path||"").split("/").filter($=>$&&!["api","v1.0","v2","rest"].includes($.toLowerCase()));let E=k.length>0?k[0]:"General";E=E.replace(/([a-z])([A-Z])/g,"$1 $2"),E=E.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2"),E=E.charAt(0).toUpperCase()+E.slice(1),a[E]||(a[E]={name:E,endpoints:[]});const O=a[E];O&&O.endpoints.push(i)}),Object.values(a).sort((i,u)=>i.name===n?-1:u.name===n||i.name==="General"?1:u.name==="General"?-1:i.name.localeCompare(u.name))},[Ns,L,s]),Va=p.useMemo(()=>{let a=Array.isArray(te)?te:[];if(K){const i=nt.find(u=>u.annotations&&Array.isArray(u.annotations)&&u.annotations.some(y=>y._id===K));i?a=i.annotations:a=a.filter(u=>u._id===K)}return a=a.filter(i=>i.status!=="completed"&&i.status!=="done"),window.location.href.includes("viewgate-backlog")||(ie==="pending"?a=a.filter(i=>i.status!=="ready_for_review"):ie==="ready"&&(a=a.filter(i=>i.status==="ready_for_review"))),v!=="all"&&(a=a.filter(i=>(i.priority||"medium")===v)),a},[K,te,nt,ie,v]);p.useEffect(()=>{K&&Va.length===0&&!$e&&We(null)},[K,Va.length,$e]);const[it,lr]=p.useState(()=>{if(typeof window>"u")return{bottom:30,right:30};const a=localStorage.getItem("vg-bar-pos");return a?JSON.parse(a):{bottom:30,right:30}}),[_t,zs]=p.useState(!1),De=p.useRef(null),pr=a=>{a.preventDefault(),a.stopPropagation();const n=a.currentTarget.parentElement?.getBoundingClientRect();n&&(zs(!0),De.current={x:a.clientX,y:a.clientY,bottom:it.bottom,right:it.right,width:n.width,height:n.height})};p.useEffect(()=>{if(!_t)return;const a=i=>{if(_t&&De.current){const u=i.clientX-De.current.x,y=i.clientY-De.current.y;let k=De.current.bottom-y,E=De.current.right-u;const O=10;k=Math.max(O,Math.min(window.innerHeight-De.current.height-O,k)),E=Math.max(O,Math.min(window.innerWidth-De.current.width-O,E)),lr({bottom:k,right:E})}},n=()=>{_t&&(zs(!1),localStorage.setItem("vg-bar-pos",JSON.stringify(it)),De.current=null)};return window.addEventListener("mousemove",a),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",n)}},[_t,it]);const[ct,Qt]=p.useState(null),[Ps,Ms]=p.useState(""),[dt,_a]=p.useState([]),[tt,Rt]=p.useState([]),[Ye,qt]=p.useState([]),[$t,Ls]=p.useState(!1);p.useEffect(()=>{ct&&qt(L)},[L,ct]);const[Fr,Br]=p.useState({}),Ra=p.useRef(null),lt=p.useRef(null),Ga=p.useRef(null),ea=p.useRef(!1),Ws=p.useCallback(()=>{typeof window>"u"||ea.current||(lt.current&&cancelAnimationFrame(lt.current),lt.current=requestAnimationFrame(()=>{lt.current=null,ea.current=!0,Ga.current;const a=Ts.current,n=Array.isArray(a)?a:[],i=new Set(n.map(G=>G._id));document.querySelectorAll(`[${Ce}]`).forEach(G=>{const pe=G.getAttribute(Ce);pe&&!i.has(pe)&&G.removeAttribute(Ce)});const u=Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], [class*="modal" i], [class*="dialog" i], .fixed, .modal-backdrop, .fixed.inset-0')),y=u.find(G=>Dt(G)&&Me(G));let k=!!y;console.log("[ViewGate Debug] Modal Detection:",{potentialModals:u.length,activeModal:y,isAnyModalOpen:k});const E=new Map;n.forEach(G=>{if(!G||!G.reference)return;try{const be=()=>{const pt=window.location.pathname.toLowerCase().replace(/\/$/g,"").replace(/\/(?:[0-9]+|(?:[0-9a-f]{24}))(?=\/|$)/g,"/:id"),Xe=new URLSearchParams(window.location.search);Xe.delete("viewgate"),Xe.sort();const ut=Xe.toString();return ut?`${pt}?${ut}`:pt},we=pt=>{try{const Xe=new URL(pt),ut=Xe.pathname.toLowerCase().replace(/\/$/g,"").replace(/\/(?:[0-9]+|(?:[0-9a-f]{24}))(?=\/|$)/g,"/:id"),ft=new URLSearchParams(Xe.search);ft.delete("viewgate"),ft.sort();const Gt=ft.toString();return Gt?`${ut}?${Gt}`:ut}catch{return""}},ke=be(),ta=we(G.url);if(ke!==ta)return}catch{return}const pe=!!G.reference.metadata?.isModal;let ee=bs(G.reference,G._id);if(console.log(`[ViewGate Debug] Processing Pin [${G._id}]:`,{isModalTarget:pe,targetEl:ee,isVisible:ee?Me(ee):!1}),!ee||!Me(ee))return;let Re=!1;if(pe?(Re=!0,k=!0,console.log(`[ViewGate Debug] Pin [${G._id}] Modal Open Check: isModalTarget=true`)):(Re=!k,console.log(`[ViewGate Debug] Pin [${G._id}] No Modal Check: !isAnyModalOpen=${Re}`)),!Re)return;const he=ee.getAttribute(Ce);he!==G._id&&(document.querySelectorAll(`[${Ce}="${G._id}"]`).forEach(be=>{be.removeAttribute(Ce)}),he||ee.setAttribute(Ce,G._id));const xe=E;xe.has(ee)||xe.set(ee,{anns:[]}),xe.get(ee).anns.push(G)});const O=[];(G=>{G.forEach((pe,ee)=>{const{anns:Re}=pe,he=ee.getBoundingClientRect(),xe=he.left+he.width/2,be=he.top+he.height/2;if(xe>=0&&xe<=window.innerWidth&&be>=0&&be<=window.innerHeight){const we=document.elementFromPoint(xe,be),ke=document.getElementById("viewgate-shadow-host");if(we&&!ee.contains(we)&&we!==ke&&!ke?.contains(we))return}O.push({id:Re[0]._id,element:ee,rect:he,annotations:Re.sort((we,ke)=>new Date(ke.timestamp||ke.createdAt).getTime()-new Date(we.timestamp||we.createdAt).getTime()),isModal:!!Re[0].reference?.metadata?.isModal})})})(E),dr(O),ea.current=!1}))},[_e]);p.useEffect(()=>{if(Vt){const a=Array.isArray(Vt)?Vt:Vt?.data||[];if(Array.isArray(a)){const n=a.reduce((i,u)=>i.find(k=>k._id===u._id)?i:i.concat([u]),[]);Ze(n)}}else $e||Ze([])},[Vt,$e]),p.useEffect(()=>{le(Xt||null)},[Xt]),p.useEffect(()=>{fe&&te.length===0&&!$e&&Ae(!1)},[fe,te.length,$e]),p.useEffect(()=>{let a=null;const n=()=>{ea.current||Ws()},i=new MutationObserver(k=>{k.some(O=>O.type!=="attributes"||O.attributeName!==Ce&&!O.target.parentElement?.closest("#viewgate-shadow-host"))&&(a&&clearTimeout(a),a=setTimeout(()=>{n(),setTimeout(n,350)},32))});Ga.current=i;const u=new ResizeObserver(()=>n()),y=()=>n();return n(),i.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),u.observe(document.documentElement),window.addEventListener("scroll",y,{capture:!0,passive:!0}),()=>{a&&clearTimeout(a),i.disconnect(),u.disconnect(),window.removeEventListener("scroll",y,!0),lt.current&&cancelAnimationFrame(lt.current),Ga.current=null}},[x,te,Ws,fe,K,S]);const Ta=p.useCallback(a=>{let n=a;for(;n&&n!==document.body;){if(Dt(n))return n;n=n.parentElement}return null},[]);p.useEffect(()=>{const a=n=>{const i=n.target;i&&(Ta(i)||(As.current=i))};return window.addEventListener("mousedown",a,!0),()=>window.removeEventListener("mousedown",a,!0)},[Ta]),p.useEffect(()=>{Ra.current=document.getElementById("viewgate-shadow-host")},[]);const Aa=p.useCallback(a=>{if(!x||I)return;const n=ys(a.clientX,a.clientY);if(!n||Ra.current?.contains(n)||n.closest(".vg-no-capture")){Y(null);return}const i=n.getBoundingClientRect();Y({tag:n.tagName.toLowerCase(),source:n.getAttribute("data-source-path")||"unknown:0",rect:i,element:n,previewText:(n.innerText||"").slice(0,100)||(n.getAttribute("placeholder")||"").slice(0,100)||n.tagName.toLowerCase(),semanticReference:{...ks(n,As.current),normalizedOffset:{x:(a.clientX-i.left)/i.width,y:(a.clientY-i.top)/i.height}}})},[x,I]),Na=p.useCallback(async a=>{if(!x||I)return;const n=ys(a.clientX,a.clientY);if(!(!n||Ra.current?.contains(n)||n.closest(".vg-no-capture"))&&N){const i=N;let u=i.element;Ta(u);let y=i.semanticReference,k=i.tag;a.preventDefault(),a.stopPropagation(),Ue(!0);try{await new Promise(G=>requestAnimationFrame(G)),await new Promise(G=>setTimeout(G,150));const E=u.getBoundingClientRect(),O=await us(u,{scale:3,padding:48,backgroundColor:"#000000"}),$={...i,element:u,rect:E,semanticReference:y,tag:k,visualPreview:O};J($)}catch(E){console.error("[ViewGate] Capture failed:",E),J(i)}finally{Ue(!1),Y(null)}}},[x,N,I]);p.useEffect(()=>{const a=n=>{const u=(()=>{let E=document.activeElement;for(;E&&E.shadowRoot&&E.shadowRoot.activeElement;)E=E.shadowRoot.activeElement;return E})();if(["input","textarea"].includes((u?.tagName||"").toLowerCase())||u?.isContentEditable)return;const k=n.key.toLowerCase();if(!q){(k==="c"||k==="v")&&o(s==="es"?"Debes iniciar sesión en el Dashboard para usar ViewGate":"Log in to the Dashboard to use ViewGate","warning");return}if(n.key==="Escape"){I?J(null):fe?Ae(!1):x&&j(!1);return}if(k==="c"&&!n.ctrlKey&&!n.metaKey&&!I&&!fe){if(!Yt){o(s==="es"?"Acceso denegado a este proyecto":"No project access","error");return}if(Ot==="client"){o(s==="es"?"Acceso de solo lectura (Backlog)":"Read-only access (Backlog)","warning");return}if(Kt&&!x){if(Rs?.status===403||!Yt){const $=Rs?.message||(s==="es"?"Acceso denegado a este proyecto":"No project access");o($,"error");return}o(s==="es"?"Verificando información del sprint...":"Checking sprint info...","warning");return}if(!(_e&&_e.status!=="closed")&&!m&&!x){o(s==="es"?"No hay un sprint activo. No se pueden generar comentarios.":"No active sprint found. Cannot generate comments.","error");return}j(O=>!O)}if(k==="v"&&!I){if(!Yt){o(s==="es"?"Acceso denegado a este proyecto":"No project access","error");return}(te.length>0||fe)&&(Ae(E=>!E),fe||j(!1))}};return x&&!I?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",a),window.addEventListener("mousemove",Aa,!0),window.addEventListener("click",Na,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",a),window.removeEventListener("mousemove",Aa,!0),window.removeEventListener("click",Na,!0)}},[x,I,fe,te,Aa,Na,q,Ot]);const ur=async()=>{if(!I||!ae.trim())return;if(M.includes("backend")&&L.length===0){o(s==="es"?"Selecciona al menos un endpoint de backend":"Select at least one backend endpoint","error");return}if(M.includes("ux")&&H.some(E=>!E.name.trim()||!E.link.trim())){o(s==="es"?"Todos los diseños de Figma deben tener nombre y link":"All Figma designs must have a name and link","error");return}if(!ne){o(s==="es"?"Selecciona un usuario para comentar":"Please select a user to comment","error");return}ce(!0);const{semanticReference:a}=I,[n,i]=(a.source||"").split(":"),y={filePath:n,line:parseInt(i||"0"),url:window.location.href,title:ae.length>50?ae.substring(0,50)+"...":ae,message:ae,status:m?"backlog":"pending",priority:V,type:I.visualPreview&&!m&&Xt?.status==="active"?"bug":"task",screenshot:I.visualPreview,componentName:a.componentPath||I.tag,reference:{...a,viewport:{width:window.innerWidth,height:window.innerHeight},timestamp:new Date().toISOString()},focusAreas:M,figmaReference:M.includes("ux")?H:void 0,backendEndpoints:M.includes("backend")?L:[]};ne&&(y.creator={name:ne.name,email:ne.email,avatar:ne.avatar});try{const k=await fetch(`${d}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":c,Authorization:q?`Bearer ${q}`:""},body:JSON.stringify(y)});if(!k.ok){const E=await k.json().catch(()=>({}));throw new Error(E.message||E.error||"Backend failed")}o(r.success,"success"),J(null),D(""),de([]),re([{name:r.figmaPrimaryDesign,link:""}]),Se([]),j(!1),Jt()}catch(k){console.error(k);const E=k.message&&k.message!=="Backend failed"?k.message:r.error;o(E,"error")}finally{ce(!1)}},fr=async a=>{Ue(!0);try{const n=bs(a.reference,a._id);if(!n){o(s==="es"?"No se pudo encontrar el elemento original para la captura":"Could not find the original element for capture","error"),Ue(!1);return}n.scrollIntoView({behavior:"smooth",block:"center"}),await new Promise(k=>setTimeout(k,600));const i=n.style.outline,u=n.style.transition;n.style.transition="outline 0.3s ease",n.style.outline="4px solid #10b981",n.style.outlineOffset="4px",await new Promise(k=>setTimeout(k,400)),n.style.outline=i,n.style.transition=u,await new Promise(k=>requestAnimationFrame(k)),await new Promise(k=>setTimeout(k,50));const y=await us(n,{scale:3,padding:48,backgroundColor:"#000000"});if(y){const k=await fetch(`${d}/api/tickets/${a._id}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:q?`Bearer ${q}`:""},body:JSON.stringify({status:"completed",resolvedScreenshot:y})});if(!k.ok){const E=await k.json().catch(()=>({}));throw new Error(E.message||E.error||"API failed")}o(s==="es"?"¡Ticket resuelto con éxito!":"Ticket resolved successfully!","success"),Jt()}n.style.outline=i,n.style.transition=u}catch(n){console.error("[ViewGate] Resolve with evidence failed:",n),o(s==="es"?`Error: ${n.message}`:`Error: ${n.message}`,"error")}finally{Ue(!1)}};return t.jsx("div",{"data-vg-id":"ef883ffc","data-source-path":"/src/components/ViewGateOverlay.tsx:2016",className:"vg-container",style:{userSelect:"none",WebkitUserSelect:"none"},children:t.jsxs("div",{"data-vg-id":"ef883ffd","data-source-path":"/src/components/ViewGateOverlay.tsx:2017",className:"vg-no-capture",style:{userSelect:"none",WebkitUserSelect:"none"},children:[t.jsxs("div",{style:{position:"fixed",bottom:`${it.bottom}px`,right:`${it.right}px`,zIndex:gs,display:"flex",alignItems:"center",gap:"8px",transition:_t?"none":"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},id:"viewgate-ui",children:[t.jsx("div",{onMouseDown:pr,style:{width:"24px",height:"40px",borderRadius:"10px",backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"#1e293b",opacity:x?0:1,visibility:x?"hidden":"visible",transition:"all 0.2s",border:"1px solid rgba(0,0,0,0.1)",boxShadow:"0 2px 8px rgba(0,0,0,0.05)"},onMouseEnter:a=>{a.currentTarget.style.backgroundColor="white",a.currentTarget.style.color="#000000"},onMouseLeave:a=>{a.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.85)",a.currentTarget.style.color="#1e293b"},className:"vg-animate-slide-up",children:t.jsx(Ao,{"data-vg-id":"3dbe6a11","data-source-path":"/src/components/ViewGateOverlay.tsx:2064",size:16})}),t.jsxs("div",{"data-vg-id":"ef883fff","data-source-path":"/src/components/ViewGateOverlay.tsx:2067",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[q?Yt?t.jsxs(t.Fragment,{children:[Ot!=="client"&&t.jsx("button",{onClick:()=>{if(Kt&&!x){o(s==="es"?"Sincronizando con el servidor...":"Syncing with server...","warning");return}if(!_e&&!m&&!x){o(s==="es"?"No hay un sprint activo. No se pueden generar comentarios.":"No active sprint found. Cannot generate comments.","error");return}j(!x)},className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:x?"#ef4444":!_e&&!m?"#94a3b8":void 0,cursor:!_e&&!m&&!x?"not-allowed":"pointer",opacity:!_e&&!m&&!x?.7:1},title:!_e&&!m&&!x?s==="es"?"Requiere sprint activo":"Requires active sprint":"",children:t.jsxs("div",{"data-vg-id":"ef884001","data-source-path":"/src/components/ViewGateOverlay.tsx:2106",style:{display:"flex",alignItems:"center",gap:"10px"},children:[Kt&&!x?t.jsx(Mt,{"data-vg-id":"edca6150","data-source-path":"/src/components/ViewGateOverlay.tsx:2108",size:20,className:"vg-animate-spin"}):x?t.jsx(yt,{"data-vg-id":"ff5f5cf","data-source-path":"/src/components/ViewGateOverlay.tsx:2110",size:20,className:"vg-animate-pop"}):t.jsx(Lt,{"data-vg-id":"10c621c4","data-source-path":"/src/components/ViewGateOverlay.tsx:2112",size:20,className:"vg-animate-pop"}),t.jsx("span",{"data-vg-id":"52d76c43","data-source-path":"/src/components/ViewGateOverlay.tsx:2114",children:Kt&&!x?s==="es"?"Cargando...":"Loading...":x?r.exitMode:r.enterMode})]})}),te.length>0&&t.jsxs("button",{onClick:()=>{Ae(!fe),j(!1),J(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[t.jsx(To,{"data-vg-id":"cd7341f9","data-source-path":"/src/components/ViewGateOverlay.tsx:2132",size:20}),t.jsx("span",{"data-vg-id":"52d76c45","data-source-path":"/src/components/ViewGateOverlay.tsx:2133",children:r.viewComments})]})]}):t.jsx("div",{"data-vg-id":"ef884000","data-source-path":"/src/components/ViewGateOverlay.tsx:2070",style:{padding:"8px 16px",background:"#fee2e2",color:"#b91c1c",borderRadius:"20px",fontSize:"12px",fontWeight:600,border:"1px solid #fecaca",whiteSpace:"nowrap"},children:s==="es"?"Acceso denegado a este proyecto":"No project access"}):t.jsxs("button",{onClick:()=>{j(!0),J({rect:new DOMRect})},className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:"var(--vg-primary-gradient)",display:"flex",alignItems:"center",gap:"10px"},children:[t.jsx(ds,{"data-vg-id":"422a5ea5","data-source-path":"/src/components/ViewGateOverlay.tsx:2153",size:18}),t.jsx("span",{"data-vg-id":"52d76c47","data-source-path":"/src/components/ViewGateOverlay.tsx:2154",style:{fontWeight:700},children:s==="es"?"Desbloquear con Clave":"Unlock with Key"})]}),t.jsx("button",{onClick:a=>{a.stopPropagation(),W({title:r.exitConfirmTitle||"Close ViewGate?",message:r.exitConfirmMessage||"Are you sure you want to close ViewGate?",type:"danger",onConfirm:()=>f()})},className:"vg-button-ghost vg-animate-pop",style:{width:"40px",height:"40px",minWidth:"40px",padding:"0",animationDelay:"0.2s",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"12px",backgroundColor:"rgba(255, 255, 255, 0.8)",color:"#64748b",border:"1px solid rgba(0,0,0,0.05)"},onMouseEnter:a=>{a.currentTarget.style.color="#ef4444",a.currentTarget.style.backgroundColor="white",a.currentTarget.style.borderColor="rgba(239, 68, 68, 0.2)",a.currentTarget.style.transform="scale(1.05)"},onMouseLeave:a=>{a.currentTarget.style.color="#64748b",a.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.8)",a.currentTarget.style.borderColor="rgba(0,0,0,0.05)",a.currentTarget.style.transform="scale(1)"},title:r.close||"Cerrar ViewGate",children:t.jsx(yt,{"data-vg-id":"ff5f5d6","data-source-path":"/src/components/ViewGateOverlay.tsx:2198",size:20,strokeWidth:2.5})})]})]}),Le&&t.jsx("div",{"data-vg-id":"17fbf7e","data-source-path":"/src/components/ViewGateOverlay.tsx:2207",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:gs+1,cursor:"wait"},children:t.jsxs("div",{"data-vg-id":"17fbf7f","data-source-path":"/src/components/ViewGateOverlay.tsx:2213",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[t.jsx("div",{"data-vg-id":"17fbf95","data-source-path":"/src/components/ViewGateOverlay.tsx:2214",className:"vg-spinner"}),t.jsx("span",{"data-vg-id":"52d76c61","data-source-path":"/src/components/ViewGateOverlay.tsx:2215",style:{fontWeight:600,fontSize:"14px",color:"#000000"},children:"Capturando..."})]})}),x&&!I&&t.jsx("div",{className:"vg-backdrop-blur",style:{opacity:1,clipPath:N?`polygon(
7
+ <%s key={someKey} {...props} />`,F,P,ye,P),Oe[P+F]=!0)}if(P=null,z!==void 0&&(s(z),P=""+z),l(R)&&(s(R.key),P=""+R.key),"key"in R){z={};for(var ot in R)ot!=="key"&&(z[ot]=R[ot])}else z=R;return P&&u(z,typeof g=="function"?g.displayName||g.name||"Unknown":g),j(g,P,z,i(),Te,Ee)}function m(g){x(g)?g._store&&(g._store.validated=1):typeof g=="object"&&g!==null&&g.$$typeof===D&&(g._payload.status==="fulfilled"?x(g._payload.value)&&g._payload.value._store&&(g._payload.value._store.validated=1):g._store&&(g._store.validated=1))}function x(g){return typeof g=="object"&&g!==null&&g.$$typeof===V}var k=p,V=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),N=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ce=Symbol.for("react.client.reference"),M=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de=Object.prototype.hasOwnProperty,H=Array.isArray,re=console.createTask?console.createTask:function(){return null};k={react_stack_bottom_frame:function(g){return g()}};var L,ke={},je=k.react_stack_bottom_frame.bind(k,c)(),He=re(r(c)),Oe={};mt.Fragment=A,mt.jsx=function(g,R,z){var F=1e4>M.recentlyCreatedOwnerStacks++;return b(g,R,z,!1,F?Error("react-stack-top-frame"):je,F?re(r(g)):He)},mt.jsxs=function(g,R,z){var F=1e4>M.recentlyCreatedOwnerStacks++;return b(g,R,z,!0,F?Error("react-stack-top-frame"):je,F?re(r(g)):He)}})()),mt}var La;function Us(){return La||(La=1,process.env.NODE_ENV==="production"?Tt.exports=Bs():Tt.exports=Hs()),Tt.exports}var t=Us(),At={exports:{}},sa={};var Wa;function Ys(){if(Wa)return sa;Wa=1;var e=p;function o(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var s=typeof Object.is=="function"?Object.is:o,r=e.useState,i=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue;function u(m,x){var k=x(),V=r({inst:{value:k,getSnapshot:x}}),C=V[0].inst,A=V[1];return c(function(){C.value=k,C.getSnapshot=x,h(C)&&A({inst:C})},[m,k,x]),i(function(){return h(C)&&A({inst:C}),m(function(){h(C)&&A({inst:C})})},[m]),l(k),k}function h(m){var x=m.getSnapshot;m=m.value;try{var k=x();return!s(m,k)}catch{return!0}}function j(m,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?j:u;return sa.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b,sa}var oa={};var Da;function Xs(){return Da||(Da=1,process.env.NODE_ENV!=="production"&&(function(){function e(k,V){return k===V&&(k!==0||1/k===1/V)||k!==k&&V!==V}function o(k,V){b||i.startTransition===void 0||(b=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var C=V();if(!m){var A=V();c(C,A)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}A=l({inst:{value:C,getSnapshot:V}});var _=A[0].inst,v=A[1];return h(function(){_.value=C,_.getSnapshot=V,s(_)&&v({inst:_})},[k,C,V]),u(function(){return s(_)&&v({inst:_}),k(function(){s(_)&&v({inst:_})})},[k]),j(C),C}function s(k){var V=k.getSnapshot;k=k.value;try{var C=V();return!c(k,C)}catch{return!0}}function r(k,V){return V()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=p,c=typeof Object.is=="function"?Object.is:e,l=i.useState,u=i.useEffect,h=i.useLayoutEffect,j=i.useDebugValue,b=!1,m=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:o;oa.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),oa}var Fa;function Ks(){return Fa||(Fa=1,process.env.NODE_ENV==="production"?At.exports=Ys():At.exports=Xs()),At.exports}var Ba=Ks();const Ha=0,Ua=1,Ya=2,Xa=3;var Ka=Object.prototype.hasOwnProperty;function ra(e,o){var s,r;if(e===o)return!0;if(e&&o&&(s=e.constructor)===o.constructor){if(s===Date)return e.getTime()===o.getTime();if(s===RegExp)return e.toString()===o.toString();if(s===Array){if((r=e.length)===o.length)for(;r--&&ra(e[r],o[r]););return r===-1}if(!s||typeof e=="object"){r=0;for(s in e)if(Ka.call(e,s)&&++r&&!Ka.call(o,s)||!(s in o)||!ra(e[s],o[s]))return!1;return Object.keys(o).length===r}}return e!==e&&o!==o}const ze=new WeakMap,Pe=()=>{},se=Pe(),na=Object,T=e=>e===se,Ge=e=>typeof e=="function",Fe=(e,o)=>({...e,...o}),Ja=e=>Ge(e.then),ia={},Nt={},ca="undefined",ht=typeof window!=ca,da=typeof document!=ca,Js=ht&&"Deno"in window,Zs=()=>ht&&typeof window.requestAnimationFrame!=ca,Za=(e,o)=>{const s=ze.get(e);return[()=>!T(o)&&e.get(o)||ia,r=>{if(!T(o)){const i=e.get(o);o in Nt||(Nt[o]=i),s[5](o,Fe(i,r),i||ia)}},s[6],()=>!T(o)&&o in Nt?Nt[o]:!T(o)&&e.get(o)||ia]};let la=!0;const Qs=()=>la,[pa,ua]=ht&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Pe,Pe],qs=()=>{const e=da&&document.visibilityState;return T(e)||e!=="hidden"},$s=e=>(da&&document.addEventListener("visibilitychange",e),pa("focus",e),()=>{da&&document.removeEventListener("visibilitychange",e),ua("focus",e)}),eo=e=>{const o=()=>{la=!0,e()},s=()=>{la=!1};return pa("online",o),pa("offline",s),()=>{ua("online",o),ua("offline",s)}},to={isOnline:Qs,isVisible:qs},ao={initFocus:$s,initReconnect:eo},Qa=!p.useId,st=!ht||Js,so=e=>Zs()?window.requestAnimationFrame(e):setTimeout(e,1),fa=st?p.useEffect:p.useLayoutEffect,ga=typeof navigator<"u"&&navigator.connection,qa=!st&&ga&&(["slow-2g","2g"].includes(ga.effectiveType)||ga.saveData),It=new WeakMap,oo=e=>na.prototype.toString.call(e),ma=(e,o)=>e===`[object ${o}]`;let ro=0;const ha=e=>{const o=typeof e,s=oo(e),r=ma(s,"Date"),i=ma(s,"RegExp"),c=ma(s,"Object");let l,u;if(na(e)===e&&!r&&!i){if(l=It.get(e),l)return l;if(l=++ro+"~",It.set(e,l),Array.isArray(e)){for(l="@",u=0;u<e.length;u++)l+=ha(e[u])+",";It.set(e,l)}if(c){l="#";const h=na.keys(e).sort();for(;!T(u=h.pop());)T(e[u])||(l+=u+":"+ha(e[u])+",");It.set(e,l)}}else l=r?e.toJSON():o=="symbol"?e.toString():o=="string"?JSON.stringify(e):""+e;return l},xa=e=>{if(Ge(e))try{e=e()}catch{e=""}const o=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ha(e):"",[e,o]};let no=0;const va=()=>++no;async function $a(...e){const[o,s,r,i]=e,c=Fe({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let l=c.populateCache;const u=c.rollbackOnError;let h=c.optimisticData;const j=x=>typeof u=="function"?u(x):u!==!1,b=c.throwOnError;if(Ge(s)){const x=s,k=[],V=o.keys();for(const C of V)!/^\$(inf|sub)\$/.test(C)&&x(o.get(C)._k)&&k.push(C);return Promise.all(k.map(m))}return m(s);async function m(x){const[k]=xa(x);if(!k)return;const[V,C]=Za(o,k),[A,_,v,ue]=ze.get(o),N=()=>{const H=A[k];return(Ge(c.revalidate)?c.revalidate(V().data,x):c.revalidate!==!1)&&(delete v[k],delete ue[k],H&&H[0])?H[0](Ya).then(()=>V().data):V().data};if(e.length<3)return N();let Y=r,I,J=!1;const ae=va();_[k]=[ae,0];const D=!T(h),oe=V(),ce=oe.data,M=oe._c,de=T(M)?ce:M;if(D&&(h=Ge(h)?h(de,ce):h,C({data:h,_c:de})),Ge(Y))try{Y=Y(de)}catch(H){I=H,J=!0}if(Y&&Ja(Y))if(Y=await Y.catch(H=>{I=H,J=!0}),ae!==_[k][0]){if(J)throw I;return Y}else J&&D&&j(I)&&(l=!0,C({data:de,_c:se}));if(l&&!J)if(Ge(l)){const H=l(Y,de);C({data:H,error:se,_c:se})}else C({data:Y,error:se,_c:se});if(_[k][1]=va(),Promise.resolve(N()).then(()=>{C({_c:se})}),J){if(b)throw I;return}return Y}}const es=(e,o)=>{for(const s in e)e[s][0]&&e[s][0](o)},io=(e,o)=>{if(!ze.has(e)){const s=Fe(ao,o),r=Object.create(null),i=$a.bind(se,e);let c=Pe;const l=Object.create(null),u=(b,m)=>{const x=l[b]||[];return l[b]=x,x.push(m),()=>x.splice(x.indexOf(m),1)},h=(b,m,x)=>{e.set(b,m);const k=l[b];if(k)for(const V of k)V(m,x)},j=()=>{if(!ze.has(e)&&(ze.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,h,u]),!st)){const b=s.initFocus(setTimeout.bind(se,es.bind(se,r,Ha))),m=s.initReconnect(setTimeout.bind(se,es.bind(se,r,Ua)));c=()=>{b&&b(),m&&m(),ze.delete(e)}}};return j(),[e,i,j,c]}return[e,ze.get(e)[4]]},co=(e,o,s,r,i)=>{const c=s.errorRetryCount,l=i.retryCount,u=~~((Math.random()+.5)*(1<<(l<8?l:8)))*s.errorRetryInterval;!T(c)&&l>c||setTimeout(r,u,i)},lo=ra,[ts,po]=io(new Map),uo=Fe({onLoadingSlow:Pe,onSuccess:Pe,onError:Pe,onErrorRetry:co,onDiscarded:Pe,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:qa?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:qa?5e3:3e3,compare:lo,isPaused:()=>!1,cache:ts,mutate:po,fallback:{}},to),fo=(e,o)=>{const s=Fe(e,o);if(o){const{use:r,fallback:i}=e,{use:c,fallback:l}=o;r&&c&&(s.use=r.concat(c)),i&&l&&(s.fallback=Fe(i,l))}return s},go=p.createContext({}),mo="$inf$",as=ht&&window.__SWR_DEVTOOLS_USE__,ho=as?window.__SWR_DEVTOOLS_USE__:[],xo=()=>{as&&(window.__SWR_DEVTOOLS_REACT__=p)},vo=e=>Ge(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],ss=()=>{const e=p.useContext(go);return p.useMemo(()=>Fe(uo,e),[e])},yo=e=>(o,s,r)=>e(o,s&&((...c)=>{const[l]=xa(o),[,,,u]=ze.get(ts);if(l.startsWith(mo))return s(...c);const h=u[l];return T(h)?s(...c):(delete u[l],h)}),r),bo=ho.concat(yo),wo=e=>function(...s){const r=ss(),[i,c,l]=vo(s),u=fo(r,l);let h=e;const{use:j}=u,b=(j||[]).concat(bo);for(let m=b.length;m--;)h=b[m](h);return h(i,c||u.fetcher||null,u)},So=(e,o,s)=>{const r=o[e]||(o[e]=[]);return r.push(s),()=>{const i=r.indexOf(s);i>=0&&(r[i]=r[r.length-1],r.pop())}};xo();const ya=p.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(o=>{e.status="fulfilled",e.value=o},o=>{e.status="rejected",e.reason=o}),e}}),ba={dedupe:!0},os=Promise.resolve(se),ko=()=>Pe,rs=wo((e,o,s)=>{const{cache:r,compare:i,suspense:c,fallbackData:l,revalidateOnMount:u,revalidateIfStale:h,refreshInterval:j,refreshWhenHidden:b,refreshWhenOffline:m,keepPreviousData:x,strictServerPrefetchWarning:k}=s,[V,C,A,_]=ze.get(r),[v,ue]=xa(e),N=p.useRef(!1),Y=p.useRef(!1),I=p.useRef(v),J=p.useRef(o),ae=p.useRef(s),D=()=>ae.current,oe=()=>D().isVisible()&&D().isOnline(),[ce,M,de,H]=Za(r,v),re=p.useRef({}).current,L=T(l)?T(s.fallback)?se:s.fallback[v]:l,ke=(W,B)=>{for(const X in re){const Z=X;if(Z==="data"){if(!i(W[Z],B[Z])&&(!T(W[Z])||!i(Ee,B[Z])))return!1}else if(B[Z]!==W[Z])return!1}return!0},je=!N.current,He=p.useMemo(()=>{const W=ce(),B=H(),X=Q=>{const K=Fe(Q);return delete K._k,(()=>{if(!v||!o||D().isPaused())return!1;if(je&&!T(u))return u;const Ne=T(L)?K.data:L;return T(Ne)||h})()?{isValidating:!0,isLoading:!0,...K}:K},Z=X(W),Ve=W===B?Z:X(B);let me=Z;return[()=>{const Q=X(ce());return ke(Q,me)?(me.data=Q.data,me.isLoading=Q.isLoading,me.isValidating=Q.isValidating,me.error=Q.error,me):(me=Q,Q)},()=>Ve]},[r,v]),Oe=Ba.useSyncExternalStore(p.useCallback(W=>de(v,(B,X)=>{ke(X,B)||W()}),[r,v]),He[0],He[1]),g=V[v]&&V[v].length>0,R=Oe.data,z=T(R)?L&&Ja(L)?ya(L):L:R,F=Oe.error,Te=p.useRef(z),Ee=x?T(R)?T(Te.current)?z:Te.current:R:z,P=v&&T(z),ye=p.useRef(null);!st&&Ba.useSyncExternalStore(ko,()=>(ye.current=!1,ye),()=>(ye.current=!0,ye));const ot=ye.current;k&&ot&&!c&&P&&console.warn(`Missing pre-initiated data for serialized key "${v}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const Le=!v||!o||D().isPaused()||g&&!T(F)?!1:je&&!T(u)?u:c?T(z)?!1:h:T(z)||h,Ue=je&&Le,fe=T(Oe.isValidating)?Ue:Oe.isValidating,Ae=T(Oe.isLoading)?Ue:Oe.isLoading,te=p.useCallback(async W=>{const B=J.current;if(!v||!B||Y.current||D().isPaused())return!1;let X,Z,Ve=!0;const me=W||{},Q=!A[v]||!me.dedupe,K=()=>Qa?!Y.current&&v===I.current&&N.current:v===I.current,We={isValidating:!1,isLoading:!1},Ne=()=>{M(We)},jt=()=>{const le=A[v];le&&le[1]===Z&&delete A[v]},_e={isValidating:!0};T(ce().data)&&(_e.isLoading=!0);try{if(Q&&(M(_e),s.loadingTimeout&&T(ce().data)&&setTimeout(()=>{Ve&&K()&&D().onLoadingSlow(v,s)},s.loadingTimeout),A[v]=[B(ue),va()]),[X,Z]=A[v],X=await X,Q&&setTimeout(jt,s.dedupingInterval),!A[v]||A[v][1]!==Z)return Q&&K()&&D().onDiscarded(v),!1;We.error=se;const le=C[v];if(!T(le)&&(Z<=le[0]||Z<=le[1]||le[1]===0))return Ne(),Q&&K()&&D().onDiscarded(v),!1;const Ie=ce().data;We.data=i(Ie,X)?Ie:X,Q&&K()&&D().onSuccess(X,v,s)}catch(le){jt();const Ie=D(),{shouldRetryOnError:Ht}=Ie;Ie.isPaused()||(We.error=le,Q&&K()&&(Ie.onError(le,v,Ie),(Ht===!0||Ge(Ht)&&Ht(le))&&(!D().revalidateOnFocus||!D().revalidateOnReconnect||oe())&&Ie.onErrorRetry(le,v,Ie,q=>{const Qe=V[v];Qe&&Qe[0]&&Qe[0](Xa,q)},{retryCount:(me.retryCount||0)+1,dedupe:!0})))}return Ve=!1,Ne(),!0},[v,r]),Ze=p.useCallback((...W)=>$a(r,I.current,...W),[]);if(fa(()=>{J.current=o,ae.current=s,T(R)||(Te.current=R)}),fa(()=>{if(!v)return;const W=te.bind(se,ba);let B=0;D().revalidateOnFocus&&(B=Date.now()+D().focusThrottleInterval);const Z=So(v,V,(Ve,me={})=>{if(Ve==Ha){const Q=Date.now();D().revalidateOnFocus&&Q>B&&oe()&&(B=Q+D().focusThrottleInterval,W())}else if(Ve==Ua)D().revalidateOnReconnect&&oe()&&W();else{if(Ve==Ya)return te();if(Ve==Xa)return te(me)}});return Y.current=!1,I.current=v,N.current=!0,M({_k:ue}),Le&&(A[v]||(T(z)||st?W():so(W))),()=>{Y.current=!0,Z()}},[v]),fa(()=>{let W;function B(){const Z=Ge(j)?j(ce().data):j;Z&&W!==-1&&(W=setTimeout(X,Z))}function X(){!ce().error&&(b||D().isVisible())&&(m||D().isOnline())?te(ba).then(B):B()}return B(),()=>{W&&(clearTimeout(W),W=-1)}},[j,b,m,v]),p.useDebugValue(Ee),c){if(!Qa&&st&&P)throw new Error("Fallback data is required when using Suspense in SSR.");P&&(J.current=o,ae.current=s,Y.current=!1);const W=_[v],B=!T(W)&&P?Ze(W):os;if(ya(B),!T(F)&&P)throw F;const X=P?te(ba):os;!T(Ee)&&P&&(X.status="fulfilled",X.value=!0),ya(X)}return{mutate:Ze,get data(){return re.data=!0,Ee},get error(){return re.error=!0,F},get isValidating(){return re.isValidating=!0,fe},get isLoading(){return re.isLoading=!0,Ae}}}),jo=({children:e})=>{const o=p.useRef(null),[s,r]=p.useState(null);return p.useEffect(()=>{if(o.current&&!o.current.shadowRoot){const i=o.current.attachShadow({mode:"open"});document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach(u=>{(u.textContent?.includes(".vg-")||u.textContent?.includes("--vg-"))&&i.appendChild(u.cloneNode(!0))});const l=document.createElement("link");l.rel="stylesheet",l.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",i.appendChild(l),r(i)}},[]),t.jsx("div",{"data-vg-id":"49696d6b","data-source-path":"/src/components/ShadowRootWrapper.tsx:38",ref:o,id:"viewgate-shadow-host",style:{position:"relative",zIndex:2147483647},children:s&&Fs.createPortal(e,s)})};const ns=(...e)=>e.filter((o,s,r)=>!!o&&o.trim()!==""&&r.indexOf(o)===s).join(" ").trim();const Oo=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Eo=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,s,r)=>r?r.toUpperCase():s.toLowerCase());const is=e=>{const o=Eo(e);return o.charAt(0).toUpperCase()+o.slice(1)};var Co={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Vo=e=>{for(const o in e)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};const _o=p.forwardRef(({color:e="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:i="",children:c,iconNode:l,...u},h)=>p.createElement("svg",{ref:h,...Co,width:o,height:o,stroke:e,strokeWidth:r?Number(s)*24/Number(o):s,className:ns("lucide",i),...!c&&!Vo(u)&&{"aria-hidden":"true"},...u},[...l.map(([j,b])=>p.createElement(j,b)),...Array.isArray(c)?c:[c]]));const U=(e,o)=>{const s=p.forwardRef(({className:r,...i},c)=>p.createElement(_o,{ref:c,iconNode:o,className:ns(`lucide-${Oo(is(e))}`,`lucide-${e}`,r),...i}));return s.displayName=is(e),s};const xt=U("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);const Ro=U("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);const cs=U("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Go=U("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Ke=U("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const ds=U("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const wa=U("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const To=U("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Be=U("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const Ao=U("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const No=U("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);const zt=U("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const Pt=U("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);const Mt=U("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const ls=U("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Lt=U("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);const Io=U("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const vt=U("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const zo=U("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Po=U("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Mo=U("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const Wt=U("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Lo=U("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const yt=U("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Wo={en:{enterMode:"Enter Feedback Mode",exitMode:"Exit Mode",completed:"Completed",feedbackHeader:"Feedback",selectedElement:"Selected element:",line:"Line",placeholder:"Tell us what you'd like to change...",cancel:"Cancel",send:"Send Feedback",submitting:"Submitting...",success:"Your feedback has been submitted successfully!",error:"Failed to submit feedback. Check backend connection.",successHeader:"Success",errorHeader:"Error",preview:"Preview",viewComments:"View Comments",close:"Close",observe:"Observe",pending:"Pending",readyForReview:"Ready for Review",noComments:"No comments found.",deleteConfirm:"Delete comment",completeConfirm:"Mark as completed?",confirmComplete:"The ticket will be marked as completed and archived.",markReady:"Mark as Ready for Review",reopen:"Reopen",reopenPlaceholder:"Add a new comment before confirming...",review:"Review",confirmDelete:"Are you sure you want to permanently delete this comment? This action cannot be undone.",markReadyConfirm:"Mark as Ready for Review?",confirmMarkReady:"Do you want to mark this comment as ready for review? it will be moved to the review state.",reopenConfirm:"Reopen comment",confirmReopen:"Do you want to set this comment back to pending status?",yes:"Yes, confirm",no:"No, cancel",deleteSuccess:"Comment deleted successfully.",updateSuccess:"Updated successfully.",navigating:"Redirecting to review...",selectToComment:"Click to comment",feedbackSubheader:"What would you like to improve here?",sendFeedback:"Send Comment",edit:"Edit",save:"Save",commentDetails:"Comment Details",annotations:"Comments",viewAll:"View All",exitConfirmTitle:"Close ViewGate?",exitConfirmMessage:"Are you sure you want to close ViewGate? Remember you can reopen it by pressing ALT once (Normal Mode) or holding it for 1 second (Backlog Mode).",backlog:"Backlog",low:"Low",medium:"Medium",high:"High",urgent:"Urgent",priority:"Priority",selectMember:"Select who you are to comment",asMember:"Commenting as",changeMember:"Change",focusAreas:"Focus Areas",frontend:"Frontend",backend:"Backend",ux:"UX/UI",figmaLink:"Figma Reference Link",figmaLinkPlaceholder:"https://www.figma.com/file/...",endpoint:"Related Backend Endpoint",selectEndpoint:"Select endpoint...",figmaNamePlaceholder:"e.g. Main Design, Modal, etc.",addLink:"Add another link",removeLink:"Remove",figmaPrimaryDesign:"Principal Design",invalidToken:"Invalid or expired token"},es:{enterMode:"Activar Modo Comentarios",exitMode:"Salir del Modo",completed:"Completado",feedbackHeader:"Comentarios",selectedElement:"Elemento seleccionado:",line:"Línea",placeholder:"Cuéntanos qué te gustaría cambiar...",cancel:"Cancelar",send:"Enviar Comentarios",submitting:"Enviando...",success:"¡Tus comentarios se han enviado con éxito!",error:"Error al enviar comentarios. Revisa la conexión con el servidor.",successHeader:"Éxito",errorHeader:"Error",preview:"Vista previa",viewComments:"Ver Comentarios",close:"Cerrar",observe:"Observar",pending:"Pendiente",readyForReview:"Listo para revisión",noComments:"No hay comentarios.",deleteConfirm:"Eliminar comentario",completeConfirm:"¿Completar ticket?",confirmComplete:"El ticket se marcará como completado y se archivará.",markReady:"Marcar como Listo para revisión",reopen:"Reabrir",reopenPlaceholder:"Agrega un nuevo comentario antes de confirmar...",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar permanentemente este comentario? Esta acción no se puede deshacer.",markReadyConfirm:"¿Listo para revisión?",confirmMarkReady:"¿Deseas marcar este comentario como listo para revisión? Pasará al estado de revisión.",reopenConfirm:"Reabrir comentario",confirmReopen:"¿Deseas volver a poner este comentario en estado pendiente?",yes:"Sí, confirmar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Actualizado correctamente.",navigating:"Redirigiendo a revisión...",selectToComment:"Haz clic para comentar",feedbackSubheader:"¿Qué te gustaría mejorar aquí?",sendFeedback:"Enviar Comentario",edit:"Editar",save:"Guardar",commentDetails:"Detalles del Comentario",annotations:"Comentarios",viewAll:"Ver Todos",exitConfirmTitle:"¿Cerrar ViewGate?",exitConfirmMessage:"¿Estás seguro de que deseas cerrar ViewGate? Recuerda que puedes volver a activarlo pulsando una vez la tecla ALT (Modo Normal) o manteniéndola pulsada 1 segundo (Modo Backlog).",backlog:"Backlog",low:"Baja",medium:"Media",high:"Alta",urgent:"Urgente",priority:"Prioridad",selectMember:"Selecciona quién eres para comentar",asMember:"Comentando como",changeMember:"Cambiar",focusAreas:"Áreas de Foco",frontend:"Frontend",backend:"Backend",ux:"UX/UI",figmaLink:"Link de Referencia Figma",figmaLinkPlaceholder:"https://www.figma.com/file/...",endpoint:"Endpoint de Backend Relacionado",selectEndpoint:"Seleccionar endpoint...",figmaNamePlaceholder:"ej. Diseño Principal, Modal, etc.",addLink:"Agregar otro link",removeLink:"Eliminar",figmaPrimaryDesign:"Diseño Principal",invalidToken:"Token inválido o expirado"}},ps=p.createContext(void 0),us=()=>{const e=p.useContext(ps);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},bt="viewgate_enabled",Do=()=>{if(typeof window>"u")return!1;const e=new URLSearchParams(window.location.search);return e.has("viewgate")||e.has("viewgate-backlog")?(sessionStorage.setItem(bt,"true"),!0):sessionStorage.getItem(bt)==="true"},Fo=({children:e,language:o="es",apiKey:s,baseUrl:r="https://view-gate.vercel.app",dashboardUrl:i})=>{const c=i||(r==="https://view-gate.vercel.app"?"https://view-gate-dashboard.vercel.app":r.includes("localhost:5000")?r.replace("5000","3000"):r),[l,u]=p.useState(!1),[h,j]=p.useState([]);p.useRef(0);const b=p.useRef(null),m=p.useRef(!1);p.useEffect(()=>{u(Do());const C=_=>{_.key==="Alt"&&!_.repeat&&(_.preventDefault(),m.current=!1,b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{const v=new URL(window.location.href);v.searchParams.delete("viewgate"),v.searchParams.set("viewgate-backlog","true"),window.history.replaceState({},"",v.toString()),u(!0),sessionStorage.setItem(bt,"true"),window.dispatchEvent(new PopStateEvent("popstate")),k(o==="es"?"Modo Backlog activado":"Backlog Mode activated","success"),m.current=!0,b.current=null},1e3))},A=_=>{if(_.key==="Alt"&&(_.preventDefault(),b.current)){clearTimeout(b.current),b.current=null;const v=new URL(window.location.href);v.searchParams.delete("viewgate-backlog"),v.searchParams.set("viewgate","true"),window.history.replaceState({},"",v.toString()),u(!0),sessionStorage.setItem(bt,"true"),window.dispatchEvent(new PopStateEvent("popstate")),k(o==="es"?"Modo Normal activado":"Normal Mode activated","success")}};return window.addEventListener("keydown",C),window.addEventListener("keyup",A),()=>{window.removeEventListener("keydown",C),window.removeEventListener("keyup",A)}},[o]);const x=()=>{if(sessionStorage.removeItem(bt),u(!1),typeof window<"u"){const C=new URL(window.location.href);C.searchParams.delete("viewgate"),window.history.replaceState({},"",C.toString())}},k=(C,A)=>{const _=Date.now();j(v=>[...v,{id:_,message:C,type:A}]),setTimeout(()=>{j(v=>v.filter(ue=>ue.id!==_))},4e3)},V=Wo[o];return t.jsxs(ps.Provider,{"data-vg-id":"89da3486","data-source-path":"/src/components/ViewGateProvider.tsx:369",value:{addToast:k,language:o,t:V,apiKey:s,baseUrl:r,dashboardUrl:c,disableViewGate:x,hasActiveToasts:h.length>0},children:[e,l&&t.jsx(jo,{"data-vg-id":"f1499d3a","data-source-path":"/src/components/ViewGateProvider.tsx:381",children:t.jsxs("div",{"data-vg-id":"1bedb79b","data-source-path":"/src/components/ViewGateProvider.tsx:382",className:"vg-container",children:[t.jsx(ks,{"data-vg-id":"d3f262cb","data-source-path":"/src/components/ViewGateProvider.tsx:383"}),t.jsx("div",{"data-vg-id":"1bedb79d","data-source-path":"/src/components/ViewGateProvider.tsx:384",className:"vg-toasts",style:{zIndex:2147483647},children:h.map(C=>t.jsxs("div",{"data-vg-id":"1bedb79e","data-source-path":"/src/components/ViewGateProvider.tsx:386",className:`vg-toast vg-animate-slide ${C.type}`,children:[C.type==="success"?t.jsx(Ke,{"data-vg-id":"c7ae3b26","data-source-path":"/src/components/ViewGateProvider.tsx:388",size:24,color:"#22c55e"}):C.type==="warning"?t.jsx(Lo,{"data-vg-id":"137eb473","data-source-path":"/src/components/ViewGateProvider.tsx:390",size:24,color:"#f59e0b"}):t.jsx(Go,{"data-vg-id":"e7ad3c7c","data-source-path":"/src/components/ViewGateProvider.tsx:392",size:24,color:"#ef4444"}),t.jsxs("div",{"data-vg-id":"61c93bb7","data-source-path":"/src/components/ViewGateProvider.tsx:394",children:[t.jsx("strong",{"data-vg-id":"29b8e974","data-source-path":"/src/components/ViewGateProvider.tsx:395",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:C.type==="success"?V.successHeader:C.type==="warning"?o==="es"?"Aviso":"Warning":V.errorHeader}),t.jsx("span",{"data-vg-id":"fbbd7822","data-source-path":"/src/components/ViewGateProvider.tsx:398",style:{fontSize:"14px",color:"#000000"},children:C.message})]})]},C.id))})]})})]})},fs=async(e,o={})=>{const{scale:s=window.devicePixelRatio||2,padding:r=48,backgroundColor:i="#000000",logging:c=!1}=o,l=e.getBoundingClientRect(),u=document.createElement("canvas");u.width=(l.width+r*2)*s,u.height=(l.height+r*2)*s;const h=u.getContext("2d");return h?(h.fillStyle=i,h.fillRect(0,0,u.width,u.height),h.save(),h.scale(s,s),h.translate(r-l.left,r-l.top),await Dt(e,h),h.restore(),u.toDataURL("image/webp",.98)):""},Dt=async(e,o)=>{if(e.nodeType===Node.TEXT_NODE){await Ko(e,o);return}if(e.nodeType!==Node.ELEMENT_NODE){if(e instanceof HTMLElement&&e.shadowRoot)for(const u of Array.from(e.shadowRoot.childNodes))await Dt(u,o);return}const s=e,r=window.getComputedStyle(s);if(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")return;const i=s.getBoundingClientRect();o.save(),o.globalAlpha*=parseFloat(r.opacity||"1");const c=parseFloat(r.borderRadius)>0;Bo(o,i,r),Ho(o,r),Uo(o,s,i,r),c&&o.clip(),s instanceof HTMLImageElement&&await Jo(o,s,i),r.backgroundImage.includes("url(")&&await Zo(o,s,i,r);const l=Array.from(s.childNodes);for(const u of l)await Dt(u,o);if(s.shadowRoot)for(const u of Array.from(s.shadowRoot.childNodes))await Dt(u,o);o.restore(),Xo(o,i,r)},Bo=(e,o,s)=>{const r=parseFloat(s.borderRadius)||0,i=o.left,c=o.top,l=o.width,u=o.height;e.beginPath(),r>0?(e.moveTo(i+r,c),e.arcTo(i+l,c,i+l,c+u,r),e.arcTo(i+l,c+u,i,c+u,r),e.arcTo(i,c+u,i,c,r),e.arcTo(i,c,i+l,c,r),e.closePath()):e.rect(i,c,l,u)},Ho=(e,o)=>{if(o.boxShadow==="none")return;const s=o.boxShadow.match(/rgba?\(.*?\)\s+(-?\d+)px\s+(-?\d+)px\s+(\d+)px/);s&&s[0]&&(e.shadowColor=s[0],e.shadowBlur=parseInt(s[3]||"0"),e.shadowOffsetX=parseInt(s[1]||"0"),e.shadowOffsetY=parseInt(s[2]||"0"))},Uo=(e,o,s,r)=>{const i=r.backgroundImage,c=r.backgroundColor;if(i.includes("linear-gradient")){const l=Yo(e,i,s);if(l){e.fillStyle=l,e.fill(),e.shadowColor="transparent";return}}c!=="rgba(0, 0, 0, 0)"&&c!=="transparent"&&(e.fillStyle=c,e.fill(),e.shadowColor="transparent")},Yo=(e,o,s)=>{const r=o.match(/(rgba?\(.*?\)|#[a-fA-F0-9]{3,8}|[a-z]+)(\s+(\d+%))?/g);if(!r||r.length<2)return null;const i=e.createLinearGradient(s.left,s.top,s.left,s.bottom);return r.forEach((c,l)=>{const u=c.trim().split(/\s+/),h=u[0];let j=l/(r.length-1);u.length>1&&u[1]&&u[1].includes("%")&&(j=parseInt(u[1]||"0")/100);try{h&&i.addColorStop(Math.max(0,Math.min(1,j)),h)}catch{}}),i},Xo=(e,o,s)=>{const r=parseFloat(s.borderWidth)||0;if(r<=0)return;const i=parseFloat(s.borderRadius)||0,c=o.left,l=o.top,u=o.width,h=o.height;e.save(),e.strokeStyle=s.borderColor,e.lineWidth=r,e.beginPath(),i>0?(e.moveTo(c+i,l),e.arcTo(c+u,l,c+u,l+h,i),e.arcTo(c+u,l+h,c,l+h,i),e.arcTo(c,l+h,c,l,i),e.arcTo(c,l,c+u,l,i),e.closePath()):e.rect(c,l,u,h),e.stroke(),e.restore()},Ko=async(e,o)=>{const s=e.parentElement;if(!s||!e.textContent?.trim())return;const r=window.getComputedStyle(s),i=document.createRange();i.selectNodeContents(e);const c=i.getClientRects();if(c.length===0)return;o.save(),o.font=`${r.fontStyle} ${r.fontVariant} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`,o.fillStyle=r.color,o.textBaseline="alphabetic";const l=e.textContent||"";for(let u=0;u<c.length;u++){const h=c[u];h&&u===0&&o.fillText(l,h.left,h.bottom-parseFloat(r.fontSize||"16")*.2)}o.restore()},Jo=async(e,o,s,r)=>{if(o.complete)try{e.drawImage(o,s.left,s.top,s.width,s.height)}catch{}},Zo=async(e,o,s,r)=>{const c=r.backgroundImage.match(/url\(["']?(.*?)["']?\)/);if(!c)return;const l=c[1];if(!l)return;const u=new Image;u.crossOrigin="anonymous",u.src=l,await new Promise(h=>{u.onload=h,u.onerror=h,setTimeout(h,800)}),u.complete&&u.naturalWidth>0&&e.drawImage(u,s.left,s.top,s.width,s.height)},wt=2147e6,gs=wt,Je=wt,Qo=wt-100,qo=wt-50,$o=wt-150,Ce="data-vg-pin-id",er=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},ms=(e,o)=>{if(!e)return"";try{const s=new Date(e);return isNaN(s.getTime())?"":new Intl.DateTimeFormat(o==="es"?"es-ES":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(s)}catch{return""}},hs=({url:e,className:o,style:s,tooltipStyle:r,onHover:i})=>{const c=p.useRef(null),l=()=>{if(!c.current||!i)return;const j=c.current.getBoundingClientRect(),b=j.top,m=window.innerHeight-j.bottom,x=b<140&&m>b?"bottom":"top";i({url:e,x:j.left+j.width/2,y:x==="top"?j.top:j.bottom,direction:x})},u=j=>j.toLowerCase().replace(/\/$/g,"").replace(/\/(?:[0-9]+|(?:[0-9a-f]{24}))(?=\/|$)/g,"/:id"),h=()=>{try{const j=u(window.location.pathname),b=new URL(e),m=u(b.pathname);return j===m||j.startsWith(m)||m.startsWith(j)}catch{return!1}};return t.jsxs("div",{ref:c,className:`vg-url-tag ${o||""}`,style:{...s,opacity:h()?1:.6,borderColor:h()?"var(--vg-primary)":"#e2e8f0"},onMouseEnter:l,onMouseMove:l,onMouseLeave:()=>i?.(null),children:[t.jsx(Be,{"data-vg-id":"353251b6","data-source-path":"/src/components/ViewGateOverlay.tsx:149",size:s?.fontSize?parseInt(s.fontSize)+1:10}),t.jsx("span",{"data-vg-id":"1b724dd0","data-source-path":"/src/components/ViewGateOverlay.tsx:150",style:{maxWidth:s?.maxWidth||"150px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:new URL(e).pathname})]})},St=e=>{const o=[],s=[],r=[];let i=e,c=!1;for(;i&&i.nodeType===Node.ELEMENT_NODE;){const l=i.localName.toLowerCase();let u=1,h=i.previousElementSibling;for(;h;)h.localName.toLowerCase()===l&&u++,h=h.previousElementSibling;const j=l==="body"||l==="head"||l==="html"?l:`${l}:nth-of-type(${u})`;if(r.unshift(j),!c){const b=i.getAttribute("data-testid")||i.getAttribute("data-qa");if(b){const m=i.hasAttribute("data-testid")?"data-testid":"data-qa";s.push(`[${m}="${b}"]`)}i.id&&!i.id.startsWith("vg-")&&!i.id.includes(":")?(o.unshift(`#${i.id}`),c=!0):b?(o.unshift(`[${i.hasAttribute("data-testid")?"data-testid":"data-qa"}="${b}"]`),c=!0):o.unshift(j)}if(i=i.parentElement,l==="html")break}return{selector:o.join(" > "),fallbacks:s,vgPath:r.join(" > ")}},xs=e=>{const{vgPath:o}=St(e);return{vgPath:o,classHash:e.className,parentTag:e.parentElement?.tagName.toLowerCase(),neighborCount:e.parentElement?.children.length,ariaLabel:e.getAttribute("aria-label")||e.getAttribute("title")||void 0,role:e.getAttribute("role")||void 0,name:e.getAttribute("name")||void 0,type:e.getAttribute("type")||void 0,placeholder:e.getAttribute("placeholder")||void 0,testId:e.getAttribute("data-testid")||e.getAttribute("data-qa")||void 0,textSnippet:(e.innerText||"").slice(0,50).trim()}},tr=(()=>{let e=null,o=null;return s=>{if(!s||typeof window>"u"||typeof document>"u")return s;if(s.includes("oklch")||s.includes("oklab")||s.includes("lab(")||s.includes("lch(")||s.includes("color("))try{if(e||(e=document.createElement("canvas"),e.width=1,e.height=1),o||(o=e.getContext("2d",{willReadFrequently:!0})),o){o.fillStyle="#000000",o.fillStyle=s;const c=o.fillStyle;if(c&&!c.includes("oklch")&&!c.includes("oklab"))return c}const r=document.createElement("div");r.style.color=s,document.body.appendChild(r);const i=getComputedStyle(r).color;return document.body.removeChild(r),i&&!i.includes("oklch")?i:"rgb(0,0,0)"}catch{return"rgb(0,0,0)"}return s}})(),ar=e=>{const o=window.getComputedStyle(e),s={};return["display","position","margin","padding","font-size","color","background-color","width","height","z-index"].forEach(i=>{const c=o.getPropertyValue(i);s[i]=tr(c)}),s},sr=e=>{const s=Object.keys(e).find(c=>c.startsWith("__reactFiber$")||c.startsWith("__reactInternalInstance$"));if(!s)return"";const r=[];let i=e[s];for(;i;){const c=i.type;if(typeof c=="function"){const l=c.displayName||c.name;l&&!l.includes("ViewGate")&&!r.includes(l)&&r.unshift(l)}i=i.return}return r.join(" > ")||"Generic Component"},Ft=e=>{if(!e||e.id==="viewgate-ui"||e.id==="viewgate-shadow-host"||e.closest("#viewgate-shadow-host"))return!1;if(e.getAttribute("role")==="dialog"||e.getAttribute("aria-modal")==="true"||e.classList.contains("modal")||e.classList.contains("modal-content"))return!0;const o=window.getComputedStyle(e),s=e.getBoundingClientRect(),r=e.getAttribute("role");if(r&&["listbox","menu","combobox","tooltip","option"].includes(r)||s.width<120&&s.height<120)return!1;const c=parseInt(o.zIndex)||0,l=o.position==="fixed"||o.position==="absolute",u=s.width>window.innerWidth*.4&&s.height>window.innerHeight*.4,h=Math.abs(s.left+s.width/2-window.innerWidth/2)<50,j=e.getAttribute("class")||"",b=j.toLowerCase().includes("modal")||j.toLowerCase().includes("dialog");return!!(l&&c>=100&&(u||h||b))},Bt=e=>{let o=e;for(;o&&o!==document.body;){if(Ft(o))return o;o=o.parentElement}return null},Me=e=>{if(!e.isConnected)return!1;const o=window.getComputedStyle(e);if(o.display==="none"||o.visibility==="hidden"||o.opacity==="0")return e.tagName!=="BODY"&&e.tagName,!1;if(e.offsetWidth===0||e.offsetHeight===0)return!1;let s=e.parentElement;for(;s;){const i=window.getComputedStyle(s);if(i.display==="none"||i.visibility==="hidden"||i.opacity==="0")return!1;s=s.parentElement}const r=e.getBoundingClientRect();return!(r.width===0||r.height===0)},vs=(e,o=document)=>{const s=o.querySelector(e);if(s)return s;const r=o.querySelectorAll("*");for(const i of Array.from(r)){const c=i.shadowRoot;if(c){const l=vs(e,c);if(l)return l}}return null},ys=(e,o)=>{let s=document.elementFromPoint(e,o);for(;s&&s.shadowRoot;){const r=s.shadowRoot.elementFromPoint(e,o);if(!r||r===s)break;s=r}return s},or=e=>{if(!e.tag)return null;const o=Array.from(document.getElementsByTagName(e.tag));let s=null,r=0;for(const i of o){if(!kt(i,e))continue;let c=0;const l=i.getAttribute("placeholder"),u=e.attributes?.placeholder||e.fingerprint?.placeholder;u&&l===u&&(c+=6);const h=i.getAttribute("type"),j=e.attributes?.type||e.fingerprint?.type;if(j&&h===j&&(c+=2),i.innerText?.trim()===e.text.trim()&&(c+=5),e.fingerprint?.vgPath){const{vgPath:b}=St(i);(b===e.vgPath||e.fingerprint?.vgPath===b)&&(c+=10)}c>r&&c>=7&&(r=c,s=i)}return s},kt=(e,o)=>{if(e.tagName.toLowerCase()!==o.tag.toLowerCase())return!1;const s=e.getAttribute("placeholder"),r=o.attributes?.placeholder||o.fingerprint?.placeholder;if(r&&s&&r!==s)return!1;const i=e.getAttribute("type"),c=o.attributes?.type||o.fingerprint?.type;return!(c&&i&&c!==i)},bs=(e,o)=>{if(o){const l=Array.from(document.querySelectorAll(`[${Ce}="${o}"]`));if(l.length>0){const u=l.filter(h=>kt(h,e));if(u.length===0)l.forEach(h=>h.removeAttribute(Ce));else{const h=u.find(b=>{const{vgPath:m}=St(b);return m===e.vgPath||e.fingerprint?.vgPath===m}),j=h&&Me(h)?h:u.find(b=>!(!Me(b)||e.metadata?.isModal&&!b.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')));return j?(l.forEach(b=>{b!==j&&b.removeAttribute(Ce)}),j):null}}}if(e.vgPath)try{const l=document.querySelector(e.vgPath);if(l&&kt(l,e)&&Me(l)&&(!e.metadata?.isModal||Bt(l)))return l}catch{}const r=(e.selector?Array.from(document.querySelectorAll(e.selector)):[]).filter(l=>kt(l,e));let i=r.find(l=>{const{vgPath:u}=St(l);return u===e.vgPath||e.fingerprint?.vgPath===u})||r[0]||null;if(i&&Me(i))if(e.metadata?.isModal&&!Bt(i))i=null;else return i;if(e.fallbackSelectors)for(const l of e.fallbackSelectors){const u=vs(l);if(u&&kt(u,e)&&Me(u)){if(e.metadata?.isModal&&!Bt(u))continue;return u}}const c=or(e);return c&&Me(c)?e.metadata?.isModal&&!Bt(c)?null:c:null},Sa=e=>({tag:e.tagName.toLowerCase(),text:(e.innerText||e.getAttribute("placeholder")||"").slice(0,50).trim(),role:e.getAttribute("role")||void 0,type:e.getAttribute("type")||void 0}),ws=e=>{if(!e)return"";let o=e.replace(/<path[^>]*d="([^"]{50,})"[^>]*\/?>/gi,(s,r)=>s.replace(r,`${r.substring(0,20)}...[STRIPPED_${r.length}]`));return o=o.replace(/<polygon[^>]*points="([^"]{50,})"[^>]*\/?>/gi,(s,r)=>s.replace(r,`${r.substring(0,20)}...[STRIPPED_${r.length}]`)),o},rr=e=>{const o=e.parentElement;if(!o)return;const s=Array.from(o.children).filter(l=>l!==e).slice(0,5).map(l=>Sa(l)),r=Array.from(o.children),i=r.indexOf(e);let c="middle";return i===0&&(c="start"),i===r.length-1&&(c="end"),{target:{...Sa(e),location:`${c} of ${o.tagName.toLowerCase()}`},parent:Sa(o),siblings:s}},Ss=(e,o)=>{const s=e.getAttribute("data-vg-id")||void 0;let r;const c=Object.keys(e).find(_=>_.startsWith("__reactFiber$")||_.startsWith("__reactInternalInstance$"));if(c){let _=e[c];for(;_;){if(_._debugSource){const{fileName:v,lineNumber:ue,columnNumber:N}=_._debugSource;r=`${v}:${ue}${N?":"+N:""}`;break}_=_.return}}const l=xs(e),u={vgId:s?1:0,fiber:r?.8:0,fingerprint:.5+(l.testId?.3:0)+(l.ariaLabel?.1:0)};let h=e.getAttribute("data-source-path")||r||"unknown:0";const j=sr(e),{selector:b,fallbacks:m,vgPath:x}=St(e),k={};["placeholder","aria-label","name","type","alt","title","value","role","data-testid"].forEach(_=>{const v=e.getAttribute(_);v&&(k[_]=v)});const V=(()=>{let _=e;for(;_&&_!==document.body;){if(Ft(_))return!0;_=_.parentElement}return!1})();let C;V&&o&&!o.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')&&(C=Ss(o));const A=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${b.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:b,vgPath:x,vgId:s,outerHtml:ws(e.outerHTML),parentContext:e.parentElement?`<${e.parentElement.tagName.toLowerCase()} ${Array.from(e.parentElement.attributes).map(_=>`${_.name}="${_.value}"`).join(" ").slice(0,500)}>`:"N/A",componentPath:j,signature:A,source:h,attributes:k,confidence:u,fallbackSelectors:[...new Set(m)].slice(0,5),domPath:[],viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:rr(e),fingerprint:xs(e),metadata:{hint:`Edit ${h.split(":")[0]} at line ${h.split(":")[1]||"?"}`,computedStyles:ar(e),viewportBreakpoint:er(),outerHtml:ws(e.outerHTML).slice(0,2e3),scrollPosition:{x:window.scrollX,y:window.scrollY},isModal:V,triggerReference:C}}},ks=()=>{const{mutate:e}=ss(),{addToast:o,language:s,t:r,apiKey:i,baseUrl:c,dashboardUrl:l,disableViewGate:u,hasActiveToasts:h}=us(),[j,b]=p.useState(typeof window<"u"?window.location.pathname+window.location.search:"/"),m=p.useMemo(()=>typeof window>"u"?!1:window.location.href.includes("viewgate-backlog"),[j]);p.useEffect(()=>{const a=()=>b(window.location.pathname+window.location.search);window.addEventListener("popstate",a);const n=window.history.pushState,d=window.history.replaceState;return window.history.pushState=function(...f){n.apply(this,f),setTimeout(a,0)},window.history.replaceState=function(...f){d.apply(this,f),setTimeout(a,0)},()=>{window.removeEventListener("popstate",a),window.history.pushState=n,window.history.replaceState=d}},[]);const[x,k]=p.useState(!1),[V,C]=p.useState("medium"),[A,_]=p.useState("medium"),[v,ue]=p.useState("all"),[N,Y]=p.useState(null),[I,J]=p.useState(null),[ae,D]=p.useState(""),[oe,ce]=p.useState(!1),[M,de]=p.useState([]),[H,re]=p.useState([{name:r.figmaPrimaryDesign,link:""}]),[L,ke]=p.useState([]),[je,He]=p.useState([]),[Oe,g]=p.useState(null),[R,z]=p.useState(!1),[F,Te]=p.useState(""),[Ee,P]=p.useState(!1),[ye,ot]=p.useState("down");p.useRef(null);const[Le,Ue]=p.useState(!1),[fe,Ae]=p.useState(!1),[te,Ze]=p.useState([]),[ge,W]=p.useState(null),[B,X]=p.useState(""),[Z,Ve]=p.useState(!1),[me,Q]=p.useState({}),[K,We]=p.useState(null),[Ne,jt]=p.useState(!1),[_e,le]=p.useState(null),[Ie,Ht]=p.useState([]),[q,Qe]=p.useState(()=>typeof window>"u"?null:localStorage.getItem("vg_token")||sessionStorage.getItem("vg_token")),[ne,ja]=p.useState(()=>{if(typeof window>"u")return null;const a=localStorage.getItem("vg_user")||sessionStorage.getItem("vg_user");return a&&a!=="undefined"?JSON.parse(a):null}),[Ot,Oa]=p.useState(()=>typeof window>"u"?null:localStorage.getItem("vg_role")||sessionStorage.getItem("vg_role")),[qe,js]=p.useState(""),[Ea,Os]=p.useState(!1),[Hr,dr]=p.useState(!1),[Et,Es]=p.useState(!1),[Ut,Cs]=p.useState(!1),[Yt,lr]=p.useState(!1),[Xt,Vs]=p.useState(!0),pr=async a=>{if(a&&a.preventDefault(),!(!qe.trim()||!c)){Os(!0);try{const n=await fetch(`${c}/api/auth/me`,{headers:{Authorization:`Bearer ${qe.trim()}`,"x-api-key":i||""}});if(!n.ok){const S=await n.json().catch(()=>({}));throw new Error(S.error||S.message||"Invalid token")}const d=await n.json();console.log("[ViewGate] Auth data received:",d);const f=d.user||(d.email?d:null),y=d.role||f?.role||"dev";if(console.log("[ViewGate] Identified as:",f?.email,f?.name,"Role:",y),!f)throw new Error("User not found in token");Qe(qe.trim()),ja(f),Oa(y),localStorage.setItem("vg_token",qe.trim()),f&&localStorage.setItem("vg_user",JSON.stringify(f)),y&&localStorage.setItem("vg_role",y),o(s==="es"?"Sesión iniciada correctamente":r.successHeader,"success"),js(""),Cs(!1),Es(!1),dr(!1),Ca()}catch(n){let d=n.message||(s==="es"?"Clave inválida o expirada":"Invalid or expired key");d.toLowerCase().includes("invalid or expired token")&&(d=r.invalidToken),o(d,"error")}finally{Os(!1)}}},Ct=p.useCallback(()=>{console.log("[VIEWGATE_WRAPPER] Clearing session"),Qe(null),ja(null),Oa(null),Vs(!1),sessionStorage.removeItem("vg_token"),sessionStorage.removeItem("vg_user"),sessionStorage.removeItem("vg_role"),localStorage.removeItem("vg_token"),localStorage.removeItem("vg_user"),localStorage.removeItem("vg_role");const a=c;e(n=>typeof n=="string"&&a&&n.startsWith(a),void 0,{revalidate:!1}),Ze([]),le(null),k(!1),J(null),D(""),Ae(!1),o(s==="es"?"Sesión finalizada o inválida":"Session ended or invalid","error")},[c,s]);p.useEffect(()=>{const a=n=>{if(n.data?.type?.startsWith("VIEWGATE_")&&console.log("[VIEWGATE_WRAPPER] Received message:",n.data.type,n.data),n.data?.type==="VIEWGATE_AUTH_SUCCESS"||n.data?.type==="VIEWGATE_SILENT_AUTH"){const{token:d,user:f,role:y,error:S}=n.data;if(console.log("[VIEWGATE_WRAPPER] Auth process:",{type:n.data.type,hasToken:!!d,hasUser:!!f}),S==="NO_SESSION")return;const E=sessionStorage.getItem("vg_token");if(d&&d!==E||!d&&E){console.log("[VIEWGATE_WRAPPER] Session sync detected change, clearing caches");const O=c;e($=>typeof $=="string"&&O&&$.startsWith(O),void 0,{revalidate:!0}),Ze([])}d&&(Qe(d),sessionStorage.setItem("vg_token",d),localStorage.setItem("vg_token",d),f&&(ja(f),Oa(y||f.role||"dev"),sessionStorage.setItem("vg_user",JSON.stringify(f)),localStorage.setItem("vg_user",JSON.stringify(f))),n.data.type==="VIEWGATE_AUTH_SUCCESS"&&o(s==="es"?"Sesión iniciada correctamente":"Logged in successfully","success"))}if(n.data?.type==="VIEWGATE_LOGOUT"){if(console.log("[VIEWGATE_WRAPPER] Logout message received"),sessionStorage.getItem("vg_token")){console.log("[VIEWGATE_WRAPPER] Protective logout: Ignoring logout since we have a valid manual session.");return}Ct()}};return window.addEventListener("message",a),()=>window.removeEventListener("message",a)},[s,Ct,c]);const Ca=p.useCallback(()=>{if(!i||!c||Ut)return;const a={"x-api-key":i};q&&(a.Authorization=`Bearer ${q}`),fetch(`${c}/api/projects/settings-check`,{headers:a}).then(n=>{if(n.status===403)throw Ct(),new Error("Unauthorized");return n.json()}).then(n=>{n.projectId&&g(n.projectId),typeof n.isFigmaConnected=="boolean"&&z(n.isFigmaConnected),typeof n.hasEndpoints=="boolean"&&lr(n.hasEndpoints),Cs(!0)}).catch(n=>{n.message!=="Unauthorized"&&console.error("Failed to fetch project settings-check",n)})},[i,c,Ut]),Va=p.useCallback(()=>{if(!i||!c||Et)return;const a={"x-api-key":i};q&&(a.Authorization=`Bearer ${q}`),fetch(`${c}/api/projects/endpoints`,{headers:a}).then(n=>{if(n.status===403)throw Ct(),new Error("Unauthorized");return n.json()}).then(n=>{n.endpoints&&Array.isArray(n.endpoints)?He(n.endpoints):Array.isArray(n)&&He(n),typeof n.isFigmaConnected=="boolean"&&z(n.isFigmaConnected),Es(!0)}).catch(n=>{n.message!=="Unauthorized"&&console.error("Failed to fetch project endpoints",n)})},[i,c,Et]);p.useEffect(()=>{(x||q)&&(Ut||Ca())},[x,q,Ut,Ca]),p.useEffect(()=>{Ee&&!Et&&Va()},[Ee,Et,Va]),p.useEffect(()=>{if(M.length===0)return;const a=["frontend"];Yt&&a.push("backend"),R&&a.push("ux");const n=M.filter(d=>a.includes(d));n.length!==M.length&&de(n)},[je.length,R,M]);const _s=p.useCallback(async a=>{const n={"x-api-key":i};q&&(n.Authorization=`Bearer ${q}`);const d=await fetch(a,{headers:n});if(!d.ok){d.status===403&&Ct();const f=await d.json().catch(()=>({}));let y=f.message||f.error||"Fetch failed";y.toLowerCase().includes("invalid or expired token")&&(y=r.invalidToken);const S=new Error(y);throw S.status=d.status,S}return Vs(!0),d.json()},[i,q]),ur=p.useMemo(()=>m?"backlog":"pending,todo,in_progress,review,ready_for_review,bug_fixing",[m]),{data:Kt,isLoading:Jt,error:Rs}=rs(i?`${c}/api/projects/active-sprint`:null,_s,{revalidateOnFocus:!0,revalidateOnMount:!0,dedupingInterval:6e4}),{data:Vt,isLoading:$e,mutate:Zt}=rs(i&&(Kt||m)?`${c}/api/annotations?status=${ur}`:null,_s,{refreshInterval:3e4,revalidateOnFocus:!0,dedupingInterval:5e3}),[et,Gs]=p.useState(null),[rt,Ur]=p.useState(null),Ts=p.useRef(te);Ts.current=te;const[ie,Qt]=p.useState(null),As=p.useRef(null),[nt,fr]=p.useState([]),Ns=p.useMemo(()=>{const a=(F||"").toLowerCase().trim();return a?je.filter(n=>{const d=n.path&&n.path.toLowerCase().includes(a),f=n.description&&n.description.toLowerCase().includes(a),y=n.method&&n.method.toLowerCase().includes(a);return d||f||y}):je},[je,F]),Is=p.useMemo(()=>{const a={},n=s==="es"?"Seleccionados":"Selected";return Ns.forEach(d=>{const f=`${d.method}|${d.path}`;L.includes(f)&&(a[n]||(a[n]={name:n,endpoints:[]}),a[n].endpoints.push(d));const S=(d.path||"").split("/").filter($=>$&&!["api","v1.0","v2","rest"].includes($.toLowerCase()));let E=S.length>0?S[0]:"General";E=E.replace(/([a-z])([A-Z])/g,"$1 $2"),E=E.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2"),E=E.charAt(0).toUpperCase()+E.slice(1),a[E]||(a[E]={name:E,endpoints:[]});const O=a[E];O&&O.endpoints.push(d)}),Object.values(a).sort((d,f)=>d.name===n?-1:f.name===n||d.name==="General"?1:f.name==="General"?-1:d.name.localeCompare(f.name))},[Ns,L,s]),_a=p.useMemo(()=>{let a=Array.isArray(te)?te:[];if(K){const d=nt.find(f=>f.annotations&&Array.isArray(f.annotations)&&f.annotations.some(y=>y._id===K));d?a=d.annotations:a=a.filter(f=>f._id===K)}return a=a.filter(d=>d.status!=="completed"&&d.status!=="done"),window.location.href.includes("viewgate-backlog")||(ie==="pending"?a=a.filter(d=>d.status!=="ready_for_review"):ie==="ready"&&(a=a.filter(d=>d.status==="ready_for_review"))),v!=="all"&&(a=a.filter(d=>(d.priority||"medium")===v)),a},[K,te,nt,ie,v]);p.useEffect(()=>{K&&_a.length===0&&!$e&&We(null)},[K,_a.length,$e]);const[it,gr]=p.useState(()=>{if(typeof window>"u")return{bottom:30,right:30};const a=localStorage.getItem("vg-bar-pos");return a?JSON.parse(a):{bottom:30,right:30}}),[_t,zs]=p.useState(!1),De=p.useRef(null),mr=a=>{a.preventDefault(),a.stopPropagation();const n=a.currentTarget.parentElement?.getBoundingClientRect();n&&(zs(!0),De.current={x:a.clientX,y:a.clientY,bottom:it.bottom,right:it.right,width:n.width,height:n.height})};p.useEffect(()=>{if(!_t)return;const a=d=>{if(_t&&De.current){const f=d.clientX-De.current.x,y=d.clientY-De.current.y;let S=De.current.bottom-y,E=De.current.right-f;const O=10;S=Math.max(O,Math.min(window.innerHeight-De.current.height-O,S)),E=Math.max(O,Math.min(window.innerWidth-De.current.width-O,E)),gr({bottom:S,right:E})}},n=()=>{_t&&(zs(!1),localStorage.setItem("vg-bar-pos",JSON.stringify(it)),De.current=null)};return window.addEventListener("mousemove",a),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",n)}},[_t,it]);const[ct,qt]=p.useState(null),[Ps,Ms]=p.useState(""),[dt,Ra]=p.useState([]),[tt,Rt]=p.useState([]),[Ye,$t]=p.useState([]),[ea,Ls]=p.useState(!1);p.useEffect(()=>{ct&&$t(L)},[L,ct]);const[Yr,Xr]=p.useState({}),Ga=p.useRef(null),lt=p.useRef(null),Ta=p.useRef(null),ta=p.useRef(!1),Ws=p.useCallback(()=>{typeof window>"u"||ta.current||(lt.current&&cancelAnimationFrame(lt.current),lt.current=requestAnimationFrame(()=>{lt.current=null,ta.current=!0,Ta.current;const a=Ts.current,n=Array.isArray(a)?a:[],d=new Set(n.map(G=>G._id));document.querySelectorAll(`[${Ce}]`).forEach(G=>{const pe=G.getAttribute(Ce);pe&&!d.has(pe)&&G.removeAttribute(Ce)});const f=Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], [class*="modal" i], [class*="dialog" i], .fixed, .modal-backdrop, .fixed.inset-0')),y=f.find(G=>Ft(G)&&Me(G));let S=!!y;console.log("[ViewGate Debug] Modal Detection:",{potentialModals:f.length,activeModal:y,isAnyModalOpen:S});const E=new Map;n.forEach(G=>{if(!G||!G.reference)return;try{const be=()=>{const pt=window.location.pathname.toLowerCase().replace(/\/$/g,"").replace(/\/(?:[0-9]+|(?:[0-9a-f]{24}))(?=\/|$)/g,"/:id"),Xe=new URLSearchParams(window.location.search);Xe.delete("viewgate"),Xe.sort();const ut=Xe.toString();return ut?`${pt}?${ut}`:pt},we=pt=>{try{const Xe=new URL(pt),ut=Xe.pathname.toLowerCase().replace(/\/$/g,"").replace(/\/(?:[0-9]+|(?:[0-9a-f]{24}))(?=\/|$)/g,"/:id"),ft=new URLSearchParams(Xe.search);ft.delete("viewgate"),ft.sort();const Gt=ft.toString();return Gt?`${ut}?${Gt}`:ut}catch{return""}},Se=be(),aa=we(G.url);if(Se!==aa)return}catch{return}const pe=!!G.reference.metadata?.isModal;let ee=bs(G.reference,G._id);if(console.log(`[ViewGate Debug] Processing Pin [${G._id}]:`,{isModalTarget:pe,targetEl:ee,isVisible:ee?Me(ee):!1}),!ee||!Me(ee))return;let Re=!1;if(pe?(Re=!0,S=!0,console.log(`[ViewGate Debug] Pin [${G._id}] Modal Open Check: isModalTarget=true`)):(Re=!S,console.log(`[ViewGate Debug] Pin [${G._id}] No Modal Check: !isAnyModalOpen=${Re}`)),!Re)return;const he=ee.getAttribute(Ce);he!==G._id&&(document.querySelectorAll(`[${Ce}="${G._id}"]`).forEach(be=>{be.removeAttribute(Ce)}),he||ee.setAttribute(Ce,G._id));const xe=E;xe.has(ee)||xe.set(ee,{anns:[]}),xe.get(ee).anns.push(G)});const O=[];(G=>{G.forEach((pe,ee)=>{const{anns:Re}=pe,he=ee.getBoundingClientRect(),xe=he.left+he.width/2,be=he.top+he.height/2;if(xe>=0&&xe<=window.innerWidth&&be>=0&&be<=window.innerHeight){const we=document.elementFromPoint(xe,be),Se=document.getElementById("viewgate-shadow-host");if(we&&!ee.contains(we)&&we!==Se&&!Se?.contains(we))return}O.push({id:Re[0]._id,element:ee,rect:he,annotations:Re.sort((we,Se)=>new Date(Se.timestamp||Se.createdAt).getTime()-new Date(we.timestamp||we.createdAt).getTime()),isModal:!!Re[0].reference?.metadata?.isModal})})})(E),fr(O),ta.current=!1}))},[_e]);p.useEffect(()=>{if(Vt){const a=Array.isArray(Vt)?Vt:Vt?.data||[];if(Array.isArray(a)){const n=a.reduce((d,f)=>d.find(S=>S._id===f._id)?d:d.concat([f]),[]);Ze(n)}}else $e||Ze([])},[Vt,$e]),p.useEffect(()=>{le(Kt||null)},[Kt]),p.useEffect(()=>{fe&&te.length===0&&!$e&&Ae(!1)},[fe,te.length,$e]),p.useEffect(()=>{let a=null;const n=()=>{ta.current||Ws()},d=new MutationObserver(S=>{S.some(O=>O.type!=="attributes"||O.attributeName!==Ce&&!O.target.parentElement?.closest("#viewgate-shadow-host"))&&(a&&clearTimeout(a),a=setTimeout(()=>{n(),setTimeout(n,350)},32))});Ta.current=d;const f=new ResizeObserver(()=>n()),y=()=>n();return n(),d.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),f.observe(document.documentElement),window.addEventListener("scroll",y,{capture:!0,passive:!0}),()=>{a&&clearTimeout(a),d.disconnect(),f.disconnect(),window.removeEventListener("scroll",y,!0),lt.current&&cancelAnimationFrame(lt.current),Ta.current=null}},[x,te,Ws,fe,K,j]);const Aa=p.useCallback(a=>{let n=a;for(;n&&n!==document.body;){if(Ft(n))return n;n=n.parentElement}return null},[]);p.useEffect(()=>{const a=n=>{const d=n.target;d&&(Aa(d)||(As.current=d))};return window.addEventListener("mousedown",a,!0),()=>window.removeEventListener("mousedown",a,!0)},[Aa]),p.useEffect(()=>{Ga.current=document.getElementById("viewgate-shadow-host")},[]);const Na=p.useCallback(a=>{if(!x||I)return;const n=ys(a.clientX,a.clientY);if(!n||Ga.current?.contains(n)||n.closest(".vg-no-capture")){Y(null);return}const d=n.getBoundingClientRect();Y({tag:n.tagName.toLowerCase(),source:n.getAttribute("data-source-path")||"unknown:0",rect:d,element:n,previewText:(n.innerText||"").slice(0,100)||(n.getAttribute("placeholder")||"").slice(0,100)||n.tagName.toLowerCase(),semanticReference:{...Ss(n,As.current),normalizedOffset:{x:(a.clientX-d.left)/d.width,y:(a.clientY-d.top)/d.height}}})},[x,I]),Ia=p.useCallback(async a=>{if(!x||I)return;const n=ys(a.clientX,a.clientY);if(!(!n||Ga.current?.contains(n)||n.closest(".vg-no-capture"))&&N){const d=N;let f=d.element;Aa(f);let y=d.semanticReference,S=d.tag;a.preventDefault(),a.stopPropagation(),Ue(!0);try{await new Promise(G=>requestAnimationFrame(G)),await new Promise(G=>setTimeout(G,150));const E=f.getBoundingClientRect(),O=await fs(f,{scale:3,padding:48,backgroundColor:"#000000"}),$={...d,element:f,rect:E,semanticReference:y,tag:S,visualPreview:O};J($)}catch(E){console.error("[ViewGate] Capture failed:",E),J(d)}finally{Ue(!1),Y(null)}}},[x,N,I]);p.useEffect(()=>{const a=n=>{const f=(()=>{let E=document.activeElement;for(;E&&E.shadowRoot&&E.shadowRoot.activeElement;)E=E.shadowRoot.activeElement;return E})();if(["input","textarea"].includes((f?.tagName||"").toLowerCase())||f?.isContentEditable)return;const S=n.key.toLowerCase();if(!q){(S==="c"||S==="v")&&o(s==="es"?"Debes iniciar sesión en el Dashboard para usar ViewGate":"Log in to the Dashboard to use ViewGate","warning");return}if(n.key==="Escape"){I?J(null):fe?Ae(!1):x&&k(!1);return}if(S==="c"&&!n.ctrlKey&&!n.metaKey&&!I&&!fe){if(!Xt){o(s==="es"?"Acceso denegado a este proyecto":"No project access","error");return}if(Ot==="client"){o(s==="es"?"Acceso de solo lectura (Backlog)":"Read-only access (Backlog)","warning");return}if(Jt&&!x){if(Rs?.status===403||!Xt){const $=Rs?.message||(s==="es"?"Acceso denegado a este proyecto":"No project access");o($,"error");return}o(s==="es"?"Verificando información del sprint...":"Checking sprint info...","warning");return}if(!(_e&&_e.status!=="closed")&&!m&&!x){o(s==="es"?"No hay un sprint activo. No se pueden generar comentarios.":"No active sprint found. Cannot generate comments.","error");return}k(O=>!O)}if(S==="v"&&!I){if(!Xt){o(s==="es"?"Acceso denegado a este proyecto":"No project access","error");return}(te.length>0||fe)&&(Ae(E=>!E),fe||k(!1))}};return x&&!I?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",a),window.addEventListener("mousemove",Na,!0),window.addEventListener("click",Ia,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",a),window.removeEventListener("mousemove",Na,!0),window.removeEventListener("click",Ia,!0)}},[x,I,fe,te,Na,Ia,q,Ot]);const hr=async()=>{if(!I||!ae.trim())return;if(M.includes("backend")&&L.length===0){o(s==="es"?"Selecciona al menos un endpoint de backend":"Select at least one backend endpoint","error");return}if(M.includes("ux")&&H.some(E=>!E.name.trim()||!E.link.trim())){o(s==="es"?"Todos los diseños de Figma deben tener nombre y link":"All Figma designs must have a name and link","error");return}if(!ne){o(s==="es"?"Selecciona un usuario para comentar":"Please select a user to comment","error");return}ce(!0);const{semanticReference:a}=I,[n,d]=(a.source||"").split(":"),y={filePath:n,line:parseInt(d||"0"),url:window.location.href,title:ae.length>50?ae.substring(0,50)+"...":ae,message:ae,status:m?"backlog":"pending",priority:V,type:I.visualPreview&&!m&&Kt?.status==="active"?"bug":"task",screenshot:I.visualPreview,componentName:a.componentPath||I.tag,reference:{...a,viewport:{width:window.innerWidth,height:window.innerHeight},timestamp:new Date().toISOString()},focusAreas:M,figmaReference:M.includes("ux")?H:void 0,backendEndpoints:M.includes("backend")?L:[]};ne&&(y.creator={name:ne.name,email:ne.email,avatar:ne.avatar});try{const S=await fetch(`${c}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":i,Authorization:q?`Bearer ${q}`:""},body:JSON.stringify(y)});if(!S.ok){const E=await S.json().catch(()=>({}));throw new Error(E.message||E.error||"Backend failed")}o(r.success,"success"),J(null),D(""),de([]),re([{name:r.figmaPrimaryDesign,link:""}]),ke([]),k(!1),Zt()}catch(S){console.error(S);const E=S.message&&S.message!=="Backend failed"?S.message:r.error;o(E,"error")}finally{ce(!1)}},xr=async a=>{Ue(!0);try{const n=bs(a.reference,a._id);if(!n){o(s==="es"?"No se pudo encontrar el elemento original para la captura":"Could not find the original element for capture","error"),Ue(!1);return}n.scrollIntoView({behavior:"smooth",block:"center"}),await new Promise(S=>setTimeout(S,600));const d=n.style.outline,f=n.style.transition;n.style.transition="outline 0.3s ease",n.style.outline="4px solid #10b981",n.style.outlineOffset="4px",await new Promise(S=>setTimeout(S,400)),n.style.outline=d,n.style.transition=f,await new Promise(S=>requestAnimationFrame(S)),await new Promise(S=>setTimeout(S,50));const y=await fs(n,{scale:3,padding:48,backgroundColor:"#000000"});if(y){const S=await fetch(`${c}/api/tickets/${a._id}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:q?`Bearer ${q}`:""},body:JSON.stringify({status:"completed",resolvedScreenshot:y})});if(!S.ok){const E=await S.json().catch(()=>({}));throw new Error(E.message||E.error||"API failed")}o(s==="es"?"¡Ticket resuelto con éxito!":"Ticket resolved successfully!","success"),Zt()}n.style.outline=d,n.style.transition=f}catch(n){console.error("[ViewGate] Resolve with evidence failed:",n),o(s==="es"?`Error: ${n.message}`:`Error: ${n.message}`,"error")}finally{Ue(!1)}};return t.jsx("div",{"data-vg-id":"ef883ffc","data-source-path":"/src/components/ViewGateOverlay.tsx:2016",className:"vg-container",style:{userSelect:"none",WebkitUserSelect:"none"},children:t.jsxs("div",{"data-vg-id":"ef883ffd","data-source-path":"/src/components/ViewGateOverlay.tsx:2017",className:"vg-no-capture",style:{userSelect:"none",WebkitUserSelect:"none"},children:[t.jsxs("div",{style:{position:"fixed",bottom:`${it.bottom}px`,right:`${it.right}px`,zIndex:gs,display:"flex",alignItems:"center",gap:"8px",transition:_t?"none":"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},id:"viewgate-ui",children:[t.jsx("div",{onMouseDown:mr,style:{width:"24px",height:"40px",borderRadius:"10px",backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"#1e293b",opacity:x?0:1,visibility:x?"hidden":"visible",transition:"all 0.2s",border:"1px solid rgba(0,0,0,0.1)",boxShadow:"0 2px 8px rgba(0,0,0,0.05)"},onMouseEnter:a=>{a.currentTarget.style.backgroundColor="white",a.currentTarget.style.color="#000000"},onMouseLeave:a=>{a.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.85)",a.currentTarget.style.color="#1e293b"},className:"vg-animate-slide-up",children:t.jsx(Ao,{"data-vg-id":"3dbe6a11","data-source-path":"/src/components/ViewGateOverlay.tsx:2064",size:16})}),t.jsxs("div",{"data-vg-id":"ef883fff","data-source-path":"/src/components/ViewGateOverlay.tsx:2067",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[q?Xt?t.jsxs(t.Fragment,{children:[Ot!=="client"&&t.jsx("button",{onClick:()=>{if(Jt&&!x){o(s==="es"?"Sincronizando con el servidor...":"Syncing with server...","warning");return}if(!_e&&!m&&!x){o(s==="es"?"No hay un sprint activo. No se pueden generar comentarios.":"No active sprint found. Cannot generate comments.","error");return}k(!x)},className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:x?"#ef4444":!_e&&!m?"#94a3b8":void 0,cursor:!_e&&!m&&!x?"not-allowed":"pointer",opacity:!_e&&!m&&!x?.7:1},title:!_e&&!m&&!x?s==="es"?"Requiere sprint activo":"Requires active sprint":"",children:t.jsxs("div",{"data-vg-id":"ef884001","data-source-path":"/src/components/ViewGateOverlay.tsx:2106",style:{display:"flex",alignItems:"center",gap:"10px"},children:[Jt&&!x?t.jsx(Mt,{"data-vg-id":"edca6150","data-source-path":"/src/components/ViewGateOverlay.tsx:2108",size:20,className:"vg-animate-spin"}):x?t.jsx(yt,{"data-vg-id":"ff5f5cf","data-source-path":"/src/components/ViewGateOverlay.tsx:2110",size:20,className:"vg-animate-pop"}):t.jsx(Lt,{"data-vg-id":"10c621c4","data-source-path":"/src/components/ViewGateOverlay.tsx:2112",size:20,className:"vg-animate-pop"}),t.jsx("span",{"data-vg-id":"52d76c43","data-source-path":"/src/components/ViewGateOverlay.tsx:2114",children:Jt&&!x?s==="es"?"Cargando...":"Loading...":x?r.exitMode:r.enterMode})]})}),te.length>0&&t.jsxs("button",{onClick:()=>{Ae(!fe),k(!1),J(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[t.jsx(To,{"data-vg-id":"cd7341f9","data-source-path":"/src/components/ViewGateOverlay.tsx:2132",size:20}),t.jsx("span",{"data-vg-id":"52d76c45","data-source-path":"/src/components/ViewGateOverlay.tsx:2133",children:r.viewComments})]})]}):t.jsx("div",{"data-vg-id":"ef884000","data-source-path":"/src/components/ViewGateOverlay.tsx:2070",style:{padding:"8px 16px",background:"#fee2e2",color:"#b91c1c",borderRadius:"20px",fontSize:"12px",fontWeight:600,border:"1px solid #fecaca",whiteSpace:"nowrap"},children:s==="es"?"Acceso denegado a este proyecto":"No project access"}):t.jsxs("button",{onClick:()=>{k(!0),J({rect:new DOMRect})},className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:"var(--vg-primary-gradient)",display:"flex",alignItems:"center",gap:"10px"},children:[t.jsx(ls,{"data-vg-id":"422a5ea5","data-source-path":"/src/components/ViewGateOverlay.tsx:2153",size:18}),t.jsx("span",{"data-vg-id":"52d76c47","data-source-path":"/src/components/ViewGateOverlay.tsx:2154",style:{fontWeight:700},children:s==="es"?"Desbloquear con Clave":"Unlock with Key"})]}),t.jsx("button",{onClick:a=>{a.stopPropagation(),W({title:r.exitConfirmTitle||"Close ViewGate?",message:r.exitConfirmMessage||"Are you sure you want to close ViewGate?",type:"danger",onConfirm:()=>u()})},className:"vg-button-ghost vg-animate-pop",style:{width:"40px",height:"40px",minWidth:"40px",padding:"0",animationDelay:"0.2s",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"12px",backgroundColor:"rgba(255, 255, 255, 0.8)",color:"#64748b",border:"1px solid rgba(0,0,0,0.05)"},onMouseEnter:a=>{a.currentTarget.style.color="#ef4444",a.currentTarget.style.backgroundColor="white",a.currentTarget.style.borderColor="rgba(239, 68, 68, 0.2)",a.currentTarget.style.transform="scale(1.05)"},onMouseLeave:a=>{a.currentTarget.style.color="#64748b",a.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.8)",a.currentTarget.style.borderColor="rgba(0,0,0,0.05)",a.currentTarget.style.transform="scale(1)"},title:r.close||"Cerrar ViewGate",children:t.jsx(yt,{"data-vg-id":"ff5f5d6","data-source-path":"/src/components/ViewGateOverlay.tsx:2198",size:20,strokeWidth:2.5})})]})]}),Le&&t.jsx("div",{"data-vg-id":"17fbf7e","data-source-path":"/src/components/ViewGateOverlay.tsx:2207",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:gs+1,cursor:"wait"},children:t.jsxs("div",{"data-vg-id":"17fbf7f","data-source-path":"/src/components/ViewGateOverlay.tsx:2213",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[t.jsx("div",{"data-vg-id":"17fbf95","data-source-path":"/src/components/ViewGateOverlay.tsx:2214",className:"vg-spinner"}),t.jsx("span",{"data-vg-id":"52d76c61","data-source-path":"/src/components/ViewGateOverlay.tsx:2215",style:{fontWeight:600,fontSize:"14px",color:"#000000"},children:"Capturando..."})]})}),x&&!I&&t.jsx("div",{className:"vg-backdrop-blur",style:{opacity:1,clipPath:N?`polygon(
8
8
  0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
9
9
  ${N.rect.left}px ${N.rect.top}px,
10
10
  ${N.rect.right}px ${N.rect.top}px,
11
11
  ${N.rect.right}px ${N.rect.bottom}px,
12
12
  ${N.rect.left}px ${N.rect.bottom}px,
13
13
  ${N.rect.left}px ${N.rect.top}px
14
- )`:"none",zIndex:Xo}}),x&&N&&!I&&!Le&&t.jsx("div",{className:"vg-selection-pulse",style:{top:N.rect.top-4,left:N.rect.left-4,width:N.rect.width+8,height:N.rect.height+8,zIndex:Ko},children:t.jsxs("div",{className:"vg-selection-label",style:{...N.rect.top<60?N.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...N.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[t.jsx(Io,{"data-vg-id":"f840c8ce","data-source-path":"/src/components/ViewGateOverlay.tsx:2267",size:16}),t.jsxs("div",{"data-vg-id":"17fbf98","data-source-path":"/src/components/ViewGateOverlay.tsx:2268",style:{display:"flex",flexDirection:"column"},children:[t.jsx("span",{"data-vg-id":"52d76c64","data-source-path":"/src/components/ViewGateOverlay.tsx:2269",style:{fontWeight:700},children:r.selectToComment}),t.jsxs("span",{"data-vg-id":"52d76c65","data-source-path":"/src/components/ViewGateOverlay.tsx:2270",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(N.rect.width)," × ",Math.round(N.rect.height)]})]})]})}),!q&&(x||fe||I)&&t.jsx("div",{"data-vg-id":"17fbf9b","data-source-path":"/src/components/ViewGateOverlay.tsx:2280",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(12px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je},children:t.jsxs("div",{"data-vg-id":"17fbf9c","data-source-path":"/src/components/ViewGateOverlay.tsx:2285",className:"vg-glassmorphism vg-animate-slide",style:{width:"90%",maxWidth:"440px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.4)",display:"flex",flexDirection:"column",overflow:"hidden",padding:"48px 32px"},children:[t.jsxs("div",{"data-vg-id":"17fbf9d","data-source-path":"/src/components/ViewGateOverlay.tsx:2294",style:{textAlign:"center",marginBottom:"32px"},children:[t.jsx("div",{"data-vg-id":"17fbf9e","data-source-path":"/src/components/ViewGateOverlay.tsx:2295",style:{width:"64px",height:"64px",background:"var(--vg-primary-gradient)",borderRadius:"20px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",color:"white",boxShadow:"0 8px 20px -4px var(--vg-primary)",animation:"pulse 2s infinite"},children:t.jsx(ds,{"data-vg-id":"422a5ede","data-source-path":"/src/components/ViewGateOverlay.tsx:2301",size:32})}),t.jsx("h2",{"data-vg-id":"efa6bb80","data-source-path":"/src/components/ViewGateOverlay.tsx:2303",style:{margin:"0 0 12px 0",fontSize:"24px",fontWeight:800,color:"#0f172a",letterSpacing:"-0.025em"},children:s==="es"?"ViewGate Protegido":"ViewGate Protected"}),t.jsx("p",{"data-vg-id":"1000def7","data-source-path":"/src/components/ViewGateOverlay.tsx:2306",style:{margin:0,color:"#64748b",fontSize:"15px",lineHeight:1.6},children:s==="es"?"Ingresa tu Clave de Acceso Semanal para continuar.":"Enter your project Weekly Access Key to continue."})]}),t.jsxs("form",{"data-vg-id":"a260acc8","data-source-path":"/src/components/ViewGateOverlay.tsx:2313",onSubmit:ir,style:{width:"100%"},children:[t.jsx("div",{"data-vg-id":"17fbfb8","data-source-path":"/src/components/ViewGateOverlay.tsx:2314",style:{position:"relative",marginBottom:"24px"},children:t.jsx("input",{autoFocus:!0,type:"password",value:qe,onChange:a=>js(a.target.value),placeholder:s==="es"?"Pega tu clave aquí...":"Paste your key here...",style:{width:"100%",padding:"16px",borderRadius:"12px",border:"2px solid #e2e8f0",fontSize:"15px",outline:"none",transition:"all 0.2s",backgroundColor:"rgba(255, 255, 255, 0.8)",color:"#1e293b"},onFocus:a=>{a.target.style.borderColor="var(--vg-primary)",a.target.style.boxShadow="0 0 0 4px rgba(99, 102, 241, 0.1)"},onBlur:a=>{a.target.style.borderColor="#e2e8f0",a.target.style.boxShadow="none"}})}),t.jsxs("button",{type:"submit",disabled:Oa||!qe.trim(),className:"vg-button-primary",style:{width:"100%",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",fontSize:"16px",fontWeight:700,opacity:Oa||!qe.trim()?.7:1,boxShadow:"0 10px 15px -3px rgba(99, 102, 241, 0.3)"},children:[Oa?t.jsx(Mt,{"data-vg-id":"cb81c82b","data-source-path":"/src/components/ViewGateOverlay.tsx:2361",size:20,className:"vg-animate-spin"}):t.jsx(No,{"data-vg-id":"d69f974c","data-source-path":"/src/components/ViewGateOverlay.tsx:2363",size:20}),s==="es"?"Desbloquear":"Unlock Now"]})]}),t.jsx("div",{"data-vg-id":"17fbfbb","data-source-path":"/src/components/ViewGateOverlay.tsx:2369",style:{margin:"32px 0 24px",height:"1px",background:"linear-gradient(to right, transparent, #e2e8f0, transparent)"}}),t.jsx("button",{onClick:()=>{J(null),j(!1),Ae(!1)},className:"vg-button-ghost",style:{width:"100%",padding:"12px",fontSize:"14px",color:"#94a3b8"},children:s==="es"?"Cerrar ViewGate":"Close ViewGate"}),t.jsx("div",{"data-vg-id":"17fbfbc","data-source-path":"/src/components/ViewGateOverlay.tsx:2383",style:{marginTop:"24px",textAlign:"center"},children:t.jsx("p",{"data-vg-id":"1000defe","data-source-path":"/src/components/ViewGateOverlay.tsx:2384",style:{fontSize:"12px",color:"#94a3b8",margin:0,lineHeight:1.5},children:s==="es"?"Encuentra tu clave en Dashboard > Proyectos":"Find your key in Dashboard > Projects"})})]})}),I&&ne&&t.jsx("div",{"data-vg-id":"17fbfd3","data-source-path":"/src/components/ViewGateOverlay.tsx:2397",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je},children:t.jsxs("div",{"data-vg-id":"17fbfd4","data-source-path":"/src/components/ViewGateOverlay.tsx:2402",className:"vg-glassmorphism vg-animate-slide",style:{width:"90%",maxWidth:"700px",maxHeight:"92vh",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[t.jsxs("div",{"data-vg-id":"17fbfd5","data-source-path":"/src/components/ViewGateOverlay.tsx:2412",style:{padding:"24px 24px 16px",textAlign:"center",borderBottom:"1px solid rgba(0,0,0,0.05)",flexShrink:0,position:"relative"},children:[ne&&t.jsxs("div",{"data-vg-id":"17fbfd6","data-source-path":"/src/components/ViewGateOverlay.tsx:2414",className:"vg-profile-info-card",style:{position:"absolute",top:"20px",right:"20px",display:"flex",alignItems:"center",gap:"8px",padding:"4px 8px",borderRadius:"20px",background:"white",border:"1px solid #e2e8f0",boxShadow:"0 2px 6px rgba(0,0,0,0.05)",zIndex:10},children:[t.jsx("span",{"data-vg-id":"52d76ca2","data-source-path":"/src/components/ViewGateOverlay.tsx:2431",style:{fontSize:"10px",fontWeight:800,color:"#64748b",textTransform:"uppercase"},children:ne.name.split(" ")[0]}),ne.avatar?t.jsx("img",{"data-vg-id":"a398766","data-source-path":"/src/components/ViewGateOverlay.tsx:2435",src:ne.avatar,style:{width:"24px",height:"24px",borderRadius:"50%"},alt:""}):t.jsx("div",{"data-vg-id":"17fbfd9","data-source-path":"/src/components/ViewGateOverlay.tsx:2437",style:{width:"24px",height:"24px",borderRadius:"50%",background:"#6366f1",color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:700},children:ne.name?.[0]})]}),t.jsx("div",{"data-vg-id":"17fbfda","data-source-path":"/src/components/ViewGateOverlay.tsx:2443",style:{width:"40px",height:"40px",background:"var(--vg-primary-gradient)",borderRadius:"10px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 12px",color:"white",boxShadow:"0 4px 12px rgba(99, 102, 241, 0.2)"},children:t.jsx(Lt,{"data-vg-id":"10c62228","data-source-path":"/src/components/ViewGateOverlay.tsx:2448",size:20})}),t.jsx("h2",{"data-vg-id":"efa6bba7","data-source-path":"/src/components/ViewGateOverlay.tsx:2450",style:{margin:"0 0 4px 0",fontSize:"20px",fontWeight:800,color:"#0f172a"},children:r.feedbackHeader}),t.jsx("p",{"data-vg-id":"1000df33","data-source-path":"/src/components/ViewGateOverlay.tsx:2451",style:{margin:0,color:"#64748b",fontSize:"14px"},children:r.feedbackSubheader})]}),t.jsxs("div",{"data-vg-id":"17fbff3","data-source-path":"/src/components/ViewGateOverlay.tsx:2455",className:"vg-custom-scrollbar",style:{flex:1,overflowY:"auto",padding:"24px",display:"flex",flexDirection:"column"},children:[I.visualPreview&&t.jsx("div",{"data-vg-id":"17fbff4","data-source-path":"/src/components/ViewGateOverlay.tsx:2464",style:{marginBottom:"24px",borderRadius:"12px",width:"fit-content",maxWidth:"100%",maxHeight:"45vh",alignSelf:"center",overflow:"hidden",display:"flex"},children:t.jsx("img",{src:I.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"45vh",objectFit:"contain",display:"block"}})}),t.jsx("textarea",{className:"vg-textarea",value:ae,onChange:a=>D(a.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px",minHeight:"120px"}}),t.jsxs("div",{"data-vg-id":"17fbff5","data-source-path":"/src/components/ViewGateOverlay.tsx:2498",style:{marginBottom:"24px"},children:[t.jsx("label",{"data-vg-id":"18bd4b33","data-source-path":"/src/components/ViewGateOverlay.tsx:2499",style:{fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",display:"block"},children:r.priority}),t.jsx("div",{"data-vg-id":"17fbff7","data-source-path":"/src/components/ViewGateOverlay.tsx:2502",style:{display:"flex",gap:"8px"},children:["low","medium","high","urgent"].map(a=>t.jsx("button",{onClick:()=>C(a),style:{flex:1,padding:"12px 6px",borderRadius:"8px",fontSize:"13px",fontWeight:700,border:"1px solid",borderColor:V===a?a==="low"?"#10b981":a==="medium"?"#6366f1":a==="high"?"#f59e0b":"#ef4444":"#e2e8f0",backgroundColor:V===a?a==="low"?"#ecfdf5":a==="medium"?"#eef2ff":a==="high"?"#fffbeb":"#fef2f2":"white",color:V===a?a==="low"?"#059669":a==="medium"?"#4338ca":a==="high"?"#b45309":"#b91c1c":"#64748b",cursor:"pointer",transition:"all 0.2s",textTransform:"uppercase"},children:r[a]},a))})]}),t.jsxs("div",{"data-vg-id":"17fbff8","data-source-path":"/src/components/ViewGateOverlay.tsx:2529",style:{marginBottom:"24px"},children:[t.jsx("label",{"data-vg-id":"18bd4b36","data-source-path":"/src/components/ViewGateOverlay.tsx:2530",style:{fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",display:"block"},children:r.focusAreas}),t.jsx("div",{"data-vg-id":"17fbffa","data-source-path":"/src/components/ViewGateOverlay.tsx:2533",style:{display:"flex",gap:"8px",marginBottom:M.length>0?"12px":"0"},children:[{id:"frontend",label:r.frontend,icon:t.jsx(zt,{"data-vg-id":"377c172e","data-source-path":"/src/components/ViewGateOverlay.tsx:2535",size:14}),color:"#10b981",bg:"#ecfdf5",border:"#d1fae5"},{id:"backend",label:r.backend,icon:t.jsx(Be,{"data-vg-id":"7117e5d5","data-source-path":"/src/components/ViewGateOverlay.tsx:2536",size:14}),color:"#6366f1",bg:"#eef2ff",border:"#e0e7ff"},{id:"ux",label:r.ux,icon:t.jsx(vt,{"data-vg-id":"de42479a","data-source-path":"/src/components/ViewGateOverlay.tsx:2537",size:14}),color:"#d946ef",bg:"#fdf4ff",border:"#f5d0fe"}].filter(a=>a.id==="backend"?Ut:a.id==="ux"?R:!0).map(a=>{const n=M.includes(a.id);return t.jsxs("button",{onClick:()=>{n?de(M.filter(i=>i!==a.id)):(de([...M,a.id]),a.id==="backend"&&Ca())},style:{flex:1,padding:"10px 4px",borderRadius:"8px",fontSize:"12px",fontWeight:700,border:"1px solid",borderColor:n?a.color:"#e2e8f0",backgroundColor:n?a.bg:"white",color:n?a.color:"#64748b",cursor:"pointer",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[a.icon,a.label]},a.id)})}),M.includes("ux")&&t.jsxs("div",{"data-vg-id":"17fc013","data-source-path":"/src/components/ViewGateOverlay.tsx:2584",className:"vg-animate-slide",style:{marginBottom:"16px"},children:[t.jsxs("div",{"data-vg-id":"17fc014","data-source-path":"/src/components/ViewGateOverlay.tsx:2585",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[t.jsxs("div",{"data-vg-id":"17fc015","data-source-path":"/src/components/ViewGateOverlay.tsx:2586",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx(Pt,{"data-vg-id":"38884e11","data-source-path":"/src/components/ViewGateOverlay.tsx:2587",size:14,style:{color:"#d946ef"}}),t.jsx("span",{"data-vg-id":"52d76ce2","data-source-path":"/src/components/ViewGateOverlay.tsx:2588",style:{fontSize:"11px",fontWeight:800,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em"},children:r.figmaLink})]}),t.jsxs("button",{"data-vg-id":"23e21f7b","data-source-path":"/src/components/ViewGateOverlay.tsx:2592",onClick:()=>re([...H,{name:"",link:""}]),style:{background:"rgba(217, 70, 239, 0.1)",border:"1px solid rgba(217, 70, 239, 0.2)",color:"#d946ef",borderRadius:"6px",padding:"4px 8px",fontSize:"10px",fontWeight:800,display:"flex",alignItems:"center",gap:"4px",cursor:"pointer",transition:"all 0.2s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(217, 70, 239, 0.15)",onMouseLeave:a=>a.currentTarget.style.background="rgba(217, 70, 239, 0.1)",children:[t.jsx(zo,{"data-vg-id":"11a60c74","data-source-path":"/src/components/ViewGateOverlay.tsx:2611",size:10})," ",r.addLink]})]}),t.jsx("div",{"data-vg-id":"17fc01a","data-source-path":"/src/components/ViewGateOverlay.tsx:2615",style:{display:"flex",flexDirection:"column",gap:"8px"},children:H.map((a,n)=>t.jsxs("div",{"data-vg-id":"17fc030","data-source-path":"/src/components/ViewGateOverlay.tsx:2617",style:{display:"flex",gap:"6px",alignItems:"flex-start"},className:"vg-animate-slide",children:[t.jsxs("div",{"data-vg-id":"17fc031","data-source-path":"/src/components/ViewGateOverlay.tsx:2618",style:{flex:1,display:"flex",flexDirection:"column",gap:"4px"},children:[t.jsx("input",{"data-vg-id":"a993bad9","data-source-path":"/src/components/ViewGateOverlay.tsx:2619",type:"text",className:"vg-textarea",style:{padding:"8px 10px",fontSize:"11px",minHeight:"auto",borderRadius:"8px",border:"1px solid rgba(0,0,0,0.05)"},placeholder:r.figmaNamePlaceholder,value:a.name,onChange:i=>{const u=[...H];u[n]&&(u[n].name=i.target.value,re(u))}}),t.jsx("input",{"data-vg-id":"a993bada","data-source-path":"/src/components/ViewGateOverlay.tsx:2633",type:"text",className:"vg-textarea",style:{padding:"8px 10px",fontSize:"11px",minHeight:"auto",borderRadius:"8px",border:"1px solid rgba(0,0,0,0.05)"},placeholder:r.figmaLinkPlaceholder,value:a.link,onChange:i=>{const u=[...H];u[n]&&(u[n].link=i.target.value,re(u))}})]}),H.length>1&&t.jsx("button",{"data-vg-id":"23e21f97","data-source-path":"/src/components/ViewGateOverlay.tsx:2649",onClick:()=>re(H.filter((i,u)=>u!==n)),style:{background:"rgba(239, 68, 68, 0.05)",border:"1px solid rgba(239, 68, 68, 0.1)",color:"#ef4444",borderRadius:"8px",padding:"10px",cursor:"pointer",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:i=>i.currentTarget.style.background="rgba(239, 68, 68, 0.1)",onMouseLeave:i=>i.currentTarget.style.background="rgba(239, 68, 68, 0.05)",children:t.jsx(Wt,{"data-vg-id":"e1375db0","data-source-path":"/src/components/ViewGateOverlay.tsx:2666",size:14})})]},n))})]}),je.length>0&&M.includes("backend")&&t.jsxs("div",{"data-vg-id":"17fc036","data-source-path":"/src/components/ViewGateOverlay.tsx:2678",className:"vg-animate-slide",style:{marginBottom:"16px"},children:[t.jsxs("div",{"data-vg-id":"17fc037","data-source-path":"/src/components/ViewGateOverlay.tsx:2679",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[t.jsxs("div",{"data-vg-id":"17fc038","data-source-path":"/src/components/ViewGateOverlay.tsx:2680",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx(Be,{"data-vg-id":"7117e5fd","data-source-path":"/src/components/ViewGateOverlay.tsx:2681",size:14,style:{color:"#6366f1"}}),t.jsx("span",{"data-vg-id":"52d76d1a","data-source-path":"/src/components/ViewGateOverlay.tsx:2682",style:{fontSize:"11px",fontWeight:700,color:"#64748b"},children:r.endpoint})]}),L.length>0&&t.jsxs("span",{"data-vg-id":"52d76d1b","data-source-path":"/src/components/ViewGateOverlay.tsx:2685",style:{fontSize:"10px",background:"#eef2ff",color:"#6366f1",padding:"2px 8px",borderRadius:"12px",fontWeight:700},children:[L.length," ",s==="es"?"seleccionados":"selected"]})]}),t.jsxs("button",{"data-vg-id":"23e21fb4","data-source-path":"/src/components/ViewGateOverlay.tsx:2691",onClick:()=>P(!0),className:"vg-input-like-button",style:{width:"100%",padding:"12px 16px",fontSize:"13px",borderRadius:"12px",background:"#f8fafc",border:"1px solid #e2e8f0",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s",textAlign:"left",color:L.length>0?"#0f172a":"#94a3b8"},children:[t.jsx("div",{"data-vg-id":"17fc052","data-source-path":"/src/components/ViewGateOverlay.tsx:2710",style:{display:"flex",gap:"4px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:L.length>0?L.slice(0,2).map(a=>{const n=a.split("|"),i=n.length>1?n[0]:"",u=n.length>1?n[1]:a;return t.jsxs("span",{"data-vg-id":"52d76d1e","data-source-path":"/src/components/ViewGateOverlay.tsx:2717",style:{background:"rgba(99, 102, 241, 0.1)",color:"#6366f1",padding:"1px 6px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[i&&t.jsx("span",{"data-vg-id":"52d76d1f","data-source-path":"/src/components/ViewGateOverlay.tsx:2725",style:{opacity:.6,marginRight:"4px"},children:i}),(u||"").split("/").pop()||u]},a)}).concat(L.length>2?[t.jsxs("span",{"data-vg-id":"52d76d20","data-source-path":"/src/components/ViewGateOverlay.tsx:2729",children:["+",L.length-2]},"more")]:[]):r.selectEndpoint}),t.jsx(is,{"data-vg-id":"c71f9a0a","data-source-path":"/src/components/ViewGateOverlay.tsx:2732",size:14,style:{color:"#64748b"}})]})]})]})]}),t.jsxs("div",{"data-vg-id":"17fc057","data-source-path":"/src/components/ViewGateOverlay.tsx:2741",style:{padding:"16px 24px 24px",borderTop:"1px solid rgba(0,0,0,0.05)",display:"flex",gap:"12px",flexShrink:0,backgroundColor:"rgba(255,255,255,0.02)",backdropFilter:"blur(2px)"},children:[t.jsx("button",{onClick:()=>{oe||(J(null),j(!1))},className:"vg-button-ghost",disabled:oe,style:{flex:1,padding:"12px"},children:r.cancel}),t.jsx("button",{onClick:ur,className:"vg-button-primary",disabled:oe||!ae.trim()||M.includes("backend")&&L.length===0||M.includes("ux")&&H.some(a=>!a.name.trim()||!a.link.trim()),style:{flex:2,opacity:oe||!ae.trim()||M.includes("backend")&&L.length===0||M.includes("ux")&&H.some(a=>!a.name.trim()||!a.link.trim())?.6:1,cursor:oe||!ae.trim()||M.includes("backend")&&L.length===0||M.includes("ux")&&H.some(a=>!a.name.trim()||!a.link.trim())?"not-allowed":"pointer"},children:t.jsxs("div",{"data-vg-id":"17fc058","data-source-path":"/src/components/ViewGateOverlay.tsx:2778",style:{display:"flex",alignItems:"center",gap:"8px"},children:[oe?t.jsx("div",{"data-vg-id":"17fc06e","data-source-path":"/src/components/ViewGateOverlay.tsx:2779",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):t.jsx(Mo,{"data-vg-id":"a3fd5c1c","data-source-path":"/src/components/ViewGateOverlay.tsx:2779",size:18}),t.jsx("span",{"data-vg-id":"52d76d3b","data-source-path":"/src/components/ViewGateOverlay.tsx:2780",children:oe?r.submitting:r.sendFeedback||"Send Comment"})]})})]})]})}),fe&&t.jsx("div",{"data-vg-id":"17fc071","data-source-path":"/src/components/ViewGateOverlay.tsx:2791",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je},children:t.jsxs("div",{"data-vg-id":"17fc072","data-source-path":"/src/components/ViewGateOverlay.tsx:2797",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"820px",maxHeight:"85vh",display:"flex",flexDirection:"column",transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[t.jsxs("div",{"data-vg-id":"17fc073","data-source-path":"/src/components/ViewGateOverlay.tsx:2802",style:{display:"flex",flexDirection:"column",gap:"16px",marginBottom:"24px"},children:[t.jsxs("div",{"data-vg-id":"17fc074","data-source-path":"/src/components/ViewGateOverlay.tsx:2803",style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("h2",{"data-vg-id":"efa6bc40","data-source-path":"/src/components/ViewGateOverlay.tsx:2804",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a",whiteSpace:"nowrap"},children:K?r.commentDetails:r.annotations}),t.jsxs("div",{"data-vg-id":"17fc076","data-source-path":"/src/components/ViewGateOverlay.tsx:2807",style:{display:"flex",alignItems:"center",gap:"12px"},children:[ne?t.jsxs("div",{"data-vg-id":"17fc077","data-source-path":"/src/components/ViewGateOverlay.tsx:2809",style:{display:"flex",alignItems:"center",gap:"8px",padding:"4px 12px",background:"rgba(99, 102, 241, 0.1)",borderRadius:"20px"},children:[ne.avatar?t.jsx("img",{"data-vg-id":"3cf759ac","data-source-path":"/src/components/ViewGateOverlay.tsx:2811",src:ne.avatar,style:{width:"20px",height:"20px",borderRadius:"50%"},alt:""}):t.jsx("div",{"data-vg-id":"2e782f7b","data-source-path":"/src/components/ViewGateOverlay.tsx:2813",style:{width:"20px",height:"20px",borderRadius:"50%",background:"#6366f1",color:"white",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center"},children:ne.name?.[0]}),t.jsx("span",{"data-vg-id":"8161c11","data-source-path":"/src/components/ViewGateOverlay.tsx:2817",style:{fontSize:"12px",fontWeight:600,color:"#4338ca"},children:ne.name})]}):t.jsx("div",{"data-vg-id":"2e782f7d","data-source-path":"/src/components/ViewGateOverlay.tsx:2824",style:{fontSize:"12px",color:"#64748b",fontWeight:600},children:s==="es"?"Sin usuario":"No user selected"}),t.jsx("button",{className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{Ae(!1),We(null),Zt(null),ue("all")},children:t.jsx(yt,{"data-vg-id":"eec8c445","data-source-path":"/src/components/ViewGateOverlay.tsx:2833",size:20})})]})]}),t.jsx("div",{"data-vg-id":"2e782f7f","data-source-path":"/src/components/ViewGateOverlay.tsx:2837",style:{display:"flex",flexDirection:"column",gap:"8px",alignItems:"center",width:"100%"},children:(()=>{const a=Array.isArray(te)?te:[],n=K?nt.find(O=>O.annotations?.some($=>$._id===K)):null,u=(n?n.annotations:a).filter(O=>O.status!=="completed"&&O.status!=="done"),y=u.filter(O=>O.status!=="ready_for_review").length,k=u.filter(O=>O.status==="ready_for_review").length,E=u.length;return E<=0?E===0?null:t.jsxs("div",{"data-vg-id":"2e782f80","data-source-path":"/src/components/ViewGateOverlay.tsx:2851",style:{display:"flex",gap:"8px",opacity:.9},children:[y>0&&t.jsxs("div",{"data-vg-id":"2e782f81","data-source-path":"/src/components/ViewGateOverlay.tsx:2853",className:"vg-badge",style:{background:"#fff7ed",color:"#c2410c",border:"1px solid #ffedd5",fontSize:"11px",padding:"2px 8px"},children:[y," ",y===1?"pendiente":"pendientes"]}),k>0&&t.jsxs("div",{"data-vg-id":"2e782f82","data-source-path":"/src/components/ViewGateOverlay.tsx:2858",className:"vg-badge",style:{background:"#f3e8ff",color:"#a855f7",border:"1px solid #e9d5ff",fontSize:"11px",padding:"2px 8px"},children:[k," ",s==="es"?k===1?"Listo para revisión":"Listos para revisión":"ready for review"]})]}):t.jsxs(t.Fragment,{children:[!m&&t.jsxs("div",{"data-vg-id":"2e782f83","data-source-path":"/src/components/ViewGateOverlay.tsx:2869",className:"vg-segmented-control",style:{marginBottom:"4px"},children:[t.jsx("div",{className:"vg-segmented-slider",style:{left:ie===null?"4px":ie==="pending"?"calc(4px + (100% - 8px) / 3)":"calc(4px + 2 * (100% - 8px) / 3)",width:"calc((100% - 8px) / 3)",background:ie===null?"var(--vg-primary)":ie==="pending"?"#ea580c":"#a855f7",boxShadow:ie===null?"0 4px 12px rgba(99, 102, 241, 0.3)":ie==="pending"?"0 4px 12px rgba(234, 88, 12, 0.3)":"0 4px 12px rgba(168, 85, 247, 0.3)"}}),t.jsxs("div",{onClick:()=>Zt(null),className:`vg-segmented-item ${ie===null?"active":""}`,children:[r.viewAll||"Todos"," (",E,")"]}),t.jsxs("div",{onClick:()=>Zt("pending"),className:`vg-segmented-item ${ie==="pending"?"active":""}`,children:[s==="es"?y===1?"Pendiente":"Pendientes":"Pending"," (",y,")"]}),t.jsxs("div",{onClick:()=>Zt("ready"),className:`vg-segmented-item ${ie==="ready"?"active":""}`,children:[s==="es"?"Listo para revisión":"Ready for Review"," (",k,")"]})]}),t.jsxs("div",{"data-vg-id":"2e782f99","data-source-path":"/src/components/ViewGateOverlay.tsx:2900",style:{display:"flex",gap:"6px",justifyContent:"center",flexWrap:"wrap",marginTop:m?"0":"4px"},children:[t.jsxs("button",{onClick:()=>ue("all"),style:{padding:"8px 16px",borderRadius:"20px",fontSize:"12px",fontWeight:700,border:"1px solid",borderColor:v==="all"?"var(--vg-primary)":"#e2e8f0",backgroundColor:v==="all"?"var(--vg-primary)":"transparent",color:v==="all"?"white":"#64748b",cursor:"pointer",transition:"all 0.2s"},children:[r.viewAll||"Todos"," (",u.filter(O=>m?!0:ie==="pending"?O.status!=="ready_for_review":ie==="ready"?O.status==="ready_for_review":!0).length,")"]}),["low","medium","high","urgent"].map(O=>{const $=u.filter(G=>m?!0:ie==="pending"?G.status!=="ready_for_review":ie==="ready"?G.status==="ready_for_review":!0).filter(G=>(G.priority||"medium")===O).length;return $===0&&v!==O?null:t.jsxs("button",{onClick:()=>ue(O),style:{padding:"8px 16px",borderRadius:"20px",fontSize:"12px",fontWeight:700,border:"1px solid",borderColor:v===O?O==="low"?"#10b981":O==="medium"?"#6366f1":O==="high"?"#f59e0b":"#ef4444":"#e2e8f0",backgroundColor:v===O?O==="low"?"#ecfdf5":O==="medium"?"#eef2ff":O==="high"?"#fffbeb":"#fef2f2":"transparent",color:v===O?O==="low"?"#059669":O==="medium"?"#4338ca":O==="high"?"#b45309":"#b91c1c":"#64748b",cursor:"pointer",transition:"all 0.2s",textTransform:"uppercase"},children:[r[O]," (",$,")"]},O)})]})]})})()})]}),t.jsx("div",{style:{flex:1,overflowY:"auto",paddingRight:"10px",overflowX:"hidden"},className:"vg-custom-scrollbar",children:$e?t.jsx("div",{"data-vg-id":"2e782f9a","data-source-path":"/src/components/ViewGateOverlay.tsx:2966",style:{display:"flex",justifyContent:"center",padding:"40px"},children:t.jsx("div",{"data-vg-id":"2e782f9b","data-source-path":"/src/components/ViewGateOverlay.tsx:2967",className:"vg-spinner"})}):Va.map((a,n)=>t.jsxs("div",{className:"vg-glassmorphism vg-animate-slide",style:{padding:"20px",marginBottom:"16px",border:"1px solid rgba(0,0,0,0.05)",background:"rgba(255,255,255,0.5)",animationDelay:`${n*.05}s`},children:[t.jsxs("div",{"data-vg-id":"2e782f9c","data-source-path":"/src/components/ViewGateOverlay.tsx:2982",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:[t.jsxs("div",{"data-vg-id":"2e782f9d","data-source-path":"/src/components/ViewGateOverlay.tsx:2983",style:{display:"flex",gap:"12px",alignItems:"center"},children:[t.jsx("span",{"data-vg-id":"8161c33","data-source-path":"/src/components/ViewGateOverlay.tsx:2984",style:{fontSize:"12px",color:"#000000",fontWeight:600},children:ms(a.timestamp||a.createdAt||a.reference?.timestamp,s)}),t.jsx("div",{"data-vg-id":"2e782f9f","data-source-path":"/src/components/ViewGateOverlay.tsx:2987",onClick:i=>{i.stopPropagation();const u=a.key||`VG-${a._id.slice(-6).toUpperCase()}`;navigator.clipboard.writeText(u);const y=i.currentTarget;y.innerText="¡Copiado!",y.style.color="#22c55e",setTimeout(()=>{y.innerText=u,y.style.color=m?"#64748b":"#6366f1"},1500)},style:{fontSize:"10px",fontFamily:"monospace",color:m?"#64748b":"#6366f1",background:m?"rgba(100, 116, 139, 0.1)":"rgba(99, 102, 241, 0.1)",padding:"2px 6px",borderRadius:"4px",cursor:"pointer",fontWeight:900,transition:"all 0.2s"},title:s==="es"?"Click para copiar":"Click to copy",children:a.key||`VG-${a._id.slice(-6).toUpperCase()}`}),a.reference?.metadata?.isModal&&t.jsx("span",{"data-vg-id":"8161c35","data-source-path":"/src/components/ViewGateOverlay.tsx:3016",className:"vg-badge",style:{fontSize:"10px",background:m?"#f1f5f9":a.status==="completed"||a.status==="done"?"#ecfdf5":a.status==="ready_for_review"?"#f3e8ff":"#fef3c7",color:m?"#64748b":a.status==="completed"||a.status==="done"?"#059669":a.status==="ready_for_review"?"#a855f7":"#92400e",border:"none",padding:"2px 6px"},children:"MODAL"}),a.creator&&t.jsx("div",{"data-vg-id":"2e782fa1","data-source-path":"/src/components/ViewGateOverlay.tsx:3025",style:{display:"flex",alignItems:"center",background:"#f8fafc",padding:"2px",borderRadius:"50%",border:"1px solid #e2e8f0",marginLeft:"4px"},children:a.creator.avatar?t.jsx("img",{"data-vg-id":"3cf759d4","data-source-path":"/src/components/ViewGateOverlay.tsx:3035",src:a.creator.avatar,style:{width:"16px",height:"16px",borderRadius:"50%"},alt:""}):t.jsx("div",{"data-vg-id":"2e782fb8","data-source-path":"/src/components/ViewGateOverlay.tsx:3037",style:{width:"16px",height:"16px",borderRadius:"50%",background:"#6366f1",color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"8px",fontWeight:700},children:a.creator.name?.[0]})}),a.url&&t.jsx(hs,{url:a.url,onHover:Gs,style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"11px",color:"#64748b",background:"#f8fafc",padding:"2px 8px",borderRadius:"6px",border:"1px solid #e2e8f0",maxWidth:"220px"}}),(a.focusAreas?.length>0?a.focusAreas:[...a.backendEndpoints?.length>0?["backend"]:[],...a.figmaReference?.length>0?["ux"]:[]]).map(i=>t.jsxs("span",{"data-vg-id":"8161c4e","data-source-path":"/src/components/ViewGateOverlay.tsx:3063",style:{fontSize:"10px",fontWeight:800,textTransform:"uppercase",padding:"4px 10px",borderRadius:"24px",background:i==="frontend"?"linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%)":i==="backend"?"linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%)":"linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%)",color:i==="frontend"?"#059669":i==="backend"?"#4f46e5":"#c026d3",display:"flex",alignItems:"center",gap:"4px",border:`1px solid ${i==="frontend"?"#a7f3d0":i==="backend"?"#c7d2fe":"#fbcfe8"}`,boxShadow:i==="frontend"?"0 2px 4px rgba(5, 150, 105, 0.05)":i==="backend"?"0 2px 4px rgba(79, 70, 229, 0.05)":"0 2px 4px rgba(192, 38, 211, 0.05)",letterSpacing:"0.02em"},children:[i==="frontend"?t.jsx(zt,{"data-vg-id":"b806bee7","data-source-path":"/src/components/ViewGateOverlay.tsx:3071",size:11,strokeWidth:2.5}):i==="backend"?t.jsx(Be,{"data-vg-id":"b1e4c277","data-source-path":"/src/components/ViewGateOverlay.tsx:3071",size:11,strokeWidth:2.5}):t.jsx(vt,{"data-vg-id":"ea069934","data-source-path":"/src/components/ViewGateOverlay.tsx:3071",size:11,strokeWidth:2.5}),i==="frontend"?"Frontend":i==="backend"?"Backend":"UX / UI"]},i))]}),a.status==="completed"?t.jsxs("span",{"data-vg-id":"8161c52","data-source-path":"/src/components/ViewGateOverlay.tsx:3077",className:"vg-badge",style:{backgroundColor:"#ecfdf5",color:"#059669",border:"1px solid #d1fae5"},children:[t.jsx(Ke,{"data-vg-id":"a75c1a63","data-source-path":"/src/components/ViewGateOverlay.tsx:3078",size:14})," ",r.completed||(s==="es"?"Listo para revisión":"Ready for Review")]}):a.status==="ready_for_review"?t.jsxs("span",{"data-vg-id":"8161c54","data-source-path":"/src/components/ViewGateOverlay.tsx:3081",className:"vg-badge",style:{backgroundColor:"#f3e8ff",color:"#a855f7",border:"1px solid #e9d5ff"},children:[t.jsx(Ke,{"data-vg-id":"a75c1a65","data-source-path":"/src/components/ViewGateOverlay.tsx:3082",size:14})," ",r.readyForReview]}):a.status==="bug_fixing"?t.jsxs("span",{"data-vg-id":"8161c56","data-source-path":"/src/components/ViewGateOverlay.tsx:3085",className:"vg-badge",style:{backgroundColor:"#fff1f2",color:"#e11d48",border:"1px solid #ffe4e6"},children:[t.jsx(xt,{"data-vg-id":"3b8b181a","data-source-path":"/src/components/ViewGateOverlay.tsx:3086",size:14})," ","Bug Fixing"]}):t.jsxs("span",{"data-vg-id":"8161c6d","data-source-path":"/src/components/ViewGateOverlay.tsx:3089",className:"vg-badge",style:{backgroundColor:m||a.status==="backlog"?"#f1f5f9":"#fff7ed",color:m||a.status==="backlog"?"#64748b":"#ea580c",border:m||a.status==="backlog"?"1px solid #e2e8f0":"1px solid #ffedd5"},children:[t.jsx(cs,{"data-vg-id":"62dc6c36","data-source-path":"/src/components/ViewGateOverlay.tsx:3094",size:14}),m||a.status==="backlog"?r.backlog:r.pending]})]}),(a.screenshot||a.reference?.previewUrl)&&t.jsx("div",{"data-vg-id":"2e782fda","data-source-path":"/src/components/ViewGateOverlay.tsx:3101",style:{margin:"0 0 20px 0",borderRadius:"8px",overflow:"hidden",width:"fit-content",maxWidth:"100%",maxHeight:"280px",alignSelf:"center",display:"flex"},children:t.jsx("img",{"data-vg-id":"3cf75a0d","data-source-path":"/src/components/ViewGateOverlay.tsx:3111",src:a.screenshot||a.reference?.previewUrl,alt:"Visual Preview",style:{maxWidth:"100%",maxHeight:"280px",objectFit:"contain",display:"block"}})}),t.jsxs("div",{"data-vg-id":"2e782fdc","data-source-path":"/src/components/ViewGateOverlay.tsx:3124",style:{marginBottom:"20px"},children:[t.jsx("div",{"data-vg-id":"2e782fdd","data-source-path":"/src/components/ViewGateOverlay.tsx:3125",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:t.jsxs("div",{"data-vg-id":"2e782fde","data-source-path":"/src/components/ViewGateOverlay.tsx:3126",style:{fontSize:"10px",fontWeight:800,color:a.priority==="low"?"#059669":a.priority==="urgent"?"#b91c1c":a.priority==="high"?"#b45309":"#4338ca",backgroundColor:a.priority==="low"?"#ecfdf5":a.priority==="urgent"?"#fef2f2":a.priority==="high"?"#fffbeb":"#eef2ff",padding:"4px 10px",borderRadius:"6px",letterSpacing:"0.5px",border:"1px solid",borderColor:a.priority==="low"?"#d1fae5":a.priority==="urgent"?"#fee2e2":a.priority==="high"?"#fef3c7":"#e0e7ff"},children:[r.priority,": ",r[a.priority||"medium"]]})}),t.jsx("p",{"data-vg-id":"f01af8be","data-source-path":"/src/components/ViewGateOverlay.tsx:3140",className:"vg-text-wrap",style:{margin:"0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:a.message}),a.figmaReference?.length>0&&t.jsxs("div",{"data-vg-id":"2e782fe0","data-source-path":"/src/components/ViewGateOverlay.tsx:3145",style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px",padding:"12px",background:"#faf5ff",borderRadius:"12px",border:"1px solid #fae8ff"},children:[t.jsxs("div",{"data-vg-id":"2e782ff6","data-source-path":"/src/components/ViewGateOverlay.tsx:3146",style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:"4px"},children:[t.jsx(vt,{"data-vg-id":"ea06996f","data-source-path":"/src/components/ViewGateOverlay.tsx:3147",size:14,style:{color:"#d946ef"}}),t.jsx("span",{"data-vg-id":"8161c8d","data-source-path":"/src/components/ViewGateOverlay.tsx:3148",style:{fontSize:"11px",fontWeight:800,color:"#a21caf",textTransform:"uppercase",letterSpacing:"0.05em"},children:s==="es"?"Diseños Figma":"Figma Designs"})]}),a.figmaReference.map((i,u)=>t.jsxs("a",{"data-vg-id":"ef479849","data-source-path":"/src/components/ViewGateOverlay.tsx:3151",href:i.link,target:"_blank",rel:"noreferrer",className:"vg-animate-pop",style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 14px",background:"#ffffff",border:"1px solid #f5d0fe",borderRadius:"10px",fontSize:"13px",color:"#c026d3",textDecoration:"none",transition:"all 0.2s",boxShadow:"0 2px 4px rgba(217, 70, 239, 0.05)"},onMouseEnter:y=>{y.currentTarget.style.transform="translateY(-2px)",y.currentTarget.style.boxShadow="0 4px 12px rgba(217, 70, 239, 0.15)",y.currentTarget.style.borderColor="#d946ef"},onMouseLeave:y=>{y.currentTarget.style.transform="translateY(0)",y.currentTarget.style.boxShadow="0 2px 4px rgba(217, 70, 239, 0.05)",y.currentTarget.style.borderColor="#f5d0fe"},children:[t.jsxs("div",{"data-vg-id":"2e782ffa","data-source-path":"/src/components/ViewGateOverlay.tsx:3159",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t.jsx("div",{"data-vg-id":"2e782ffb","data-source-path":"/src/components/ViewGateOverlay.tsx:3160",style:{width:"24px",height:"24px",borderRadius:"6px",background:"rgba(217, 70, 239, 0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(zt,{"data-vg-id":"b806bf29","data-source-path":"/src/components/ViewGateOverlay.tsx:3161",size:12,strokeWidth:3})}),t.jsx("span",{"data-vg-id":"8161c92","data-source-path":"/src/components/ViewGateOverlay.tsx:3163",style:{fontWeight:700},children:i.name||"Figma Reference"})]}),t.jsx(ba,{"data-vg-id":"5c2be04e","data-source-path":"/src/components/ViewGateOverlay.tsx:3165",size:14,style:{opacity:.5}})]},u))]}),a.backendEndpoints?.length>0&&t.jsxs("div",{"data-vg-id":"2e782fff","data-source-path":"/src/components/ViewGateOverlay.tsx:3172",style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px",padding:"12px",background:"#f5f8ff",borderRadius:"12px",border:"1px solid #e0e7ff"},children:[t.jsxs("div",{"data-vg-id":"2e783015","data-source-path":"/src/components/ViewGateOverlay.tsx:3173",style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:"4px"},children:[t.jsx(Be,{"data-vg-id":"b1e4c2d2","data-source-path":"/src/components/ViewGateOverlay.tsx:3174",size:14,style:{color:"#4f46e5"}}),t.jsx("span",{"data-vg-id":"8161cac","data-source-path":"/src/components/ViewGateOverlay.tsx:3175",style:{fontSize:"11px",fontWeight:800,color:"#3730a3",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Backend Endpoints"})]}),t.jsx("div",{"data-vg-id":"2e783018","data-source-path":"/src/components/ViewGateOverlay.tsx:3177",style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:a.backendEndpoints.map(i=>{const u=i.split("|"),y=u.length>1?u[0]:"";let k=u.length>1?u[1]||"":i||"",E="#4f46e5",O="#e0e7ff";return y==="GET"?(E="#059669",O="#d1fae5"):y==="POST"?(E="#ea580c",O="#ffedd5"):y==="PUT"?(E="#0284c7",O="#e0f2fe"):y==="DELETE"&&(E="#e11d48",O="#ffe4e6"),t.jsxs("div",{"data-vg-id":"2e783019","data-source-path":"/src/components/ViewGateOverlay.tsx:3192",className:"vg-animate-slide",style:{fontSize:"12px",padding:"6px 12px",background:"#ffffff",color:"#4f46e5",borderRadius:"8px",border:"1px solid #c7d2fe",display:"flex",alignItems:"center",gap:"8px",boxShadow:"0 2px 4px rgba(79, 70, 229, 0.05)"},children:[y&&t.jsx("span",{"data-vg-id":"8161caf","data-source-path":"/src/components/ViewGateOverlay.tsx:3198",style:{fontWeight:800,color:E,background:O,padding:"2px 6px",borderRadius:"4px",fontSize:"10px"},children:y}),t.jsx("span",{"data-vg-id":"8161cb0","data-source-path":"/src/components/ViewGateOverlay.tsx:3199",style:{fontWeight:600,fontFamily:"monospace",letterSpacing:"-0.02em",color:"#1e293b"},children:k})]},i)})})]})]}),t.jsxs("div",{"data-vg-id":"2e78301c","data-source-path":"/src/components/ViewGateOverlay.tsx:3209",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"12px",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:[t.jsx("div",{"data-vg-id":"2e78301d","data-source-path":"/src/components/ViewGateOverlay.tsx:3211",style:{display:"flex",gap:"6px"},children:Ot!=="client"&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"vg-button-ghost vg-animate-pop",style:{padding:"8px",minWidth:"36px"},onClick:()=>{const i=a.backendEndpoints||[],u=a.focusAreas&&a.focusAreas.length>0?a.focusAreas:[...i.length>0?["backend"]:[],...a.figmaReference&&a.figmaReference.length>0?["ux"]:[]];Qt(a._id),Ms(a.message),_(a.priority||"medium"),_a(u),Rt(a.figmaReference&&a.figmaReference.length>0?a.figmaReference:[{name:r.figmaPrimaryDesign,link:""}]),qt(i),Se(i)},title:r.edit,children:t.jsx(vt,{"data-vg-id":"ea069996","data-source-path":"/src/components/ViewGateOverlay.tsx:3235",size:16})}),t.jsx("button",{className:"vg-button-ghost vg-animate-pop",style:{padding:"8px",minWidth:"36px",color:"#ef4444"},onClick:()=>{W({title:r.deleteConfirm,message:r.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${d}/api/annotations/${a._id}`,{method:"DELETE",headers:{"x-api-key":c}})).ok&&(Jt(),o(r.deleteSuccess,"success"))}catch{o(r.error,"error")}finally{W(null)}}})},title:s==="es"?"Eliminar":"Delete",children:t.jsx(Wt,{"data-vg-id":"45b44219","data-source-path":"/src/components/ViewGateOverlay.tsx:3265",size:16})})]})}),t.jsxs("div",{"data-vg-id":"2e783035","data-source-path":"/src/components/ViewGateOverlay.tsx:3271",style:{display:"flex",gap:"8px"},children:[Ot!=="client"&&a.status==="ready_for_review"&&t.jsxs("button",{onClick:()=>fr(a),className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",whiteSpace:"nowrap",background:"linear-gradient(135deg, #059669 0%, #10b981 100%)",boxShadow:"0 4px 12px rgba(5, 150, 69, 0.2)",display:"flex",alignItems:"center",gap:"8px",fontWeight:700},disabled:Le,children:[Le?t.jsx(Mt,{"data-vg-id":"a4b73604","data-source-path":"/src/components/ViewGateOverlay.tsx:3289",size:14,className:"vg-animate-spin"}):t.jsx(Ro,{"data-vg-id":"41e603c7","data-source-path":"/src/components/ViewGateOverlay.tsx:3289",size:14}),s==="es"?"Resolver con Evidencia":"Resolve & Capture"]}),t.jsxs("a",{href:`${(l||"").replace(/\/$/,"")}/${m||a.status==="backlog"?"backlog":"board"}?search=${a.key||(a._id?"VG-"+a._id.slice(-6).toUpperCase():"TICKET")}${Oe?`&projectId=${Oe}`:""}`,target:"_blank",rel:"noopener noreferrer",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",whiteSpace:"nowrap",textDecoration:"none",display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"},children:[t.jsx(ba,{"data-vg-id":"5c2be088","data-source-path":"/src/components/ViewGateOverlay.tsx:3309",size:14}),s==="es"?"Ver en Dashboard":"View in Dashboard"]})]})]})]},a._id))},K||"all")]})}),ge&&t.jsx("div",{"data-vg-id":"2e783039","data-source-path":"/src/components/ViewGateOverlay.tsx:3325",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(11, 15, 25, 0.7)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je+100},children:t.jsxs("div",{"data-vg-id":"2e78303a","data-source-path":"/src/components/ViewGateOverlay.tsx:3330",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"420px",textAlign:"center",border:"1px solid rgba(255, 255, 255, 0.1)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.5)"},children:[t.jsx("div",{"data-vg-id":"2e78303b","data-source-path":"/src/components/ViewGateOverlay.tsx:3337",style:{width:"64px",height:"64px",background:ge.type==="danger"?"rgba(239, 68, 68, 0.1)":"rgba(99, 102, 241, 0.1)",borderRadius:"20px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",color:ge.type==="danger"?"#ef4444":"#6366f1",transform:"rotate(-5deg)"},children:ge.type==="danger"?t.jsx(Wt,{"data-vg-id":"45b44221","data-source-path":"/src/components/ViewGateOverlay.tsx:3346",size:32}):t.jsx(Ke,{"data-vg-id":"a75c1ae2","data-source-path":"/src/components/ViewGateOverlay.tsx:3346",size:32})}),t.jsx("h3",{"data-vg-id":"53ec569","data-source-path":"/src/components/ViewGateOverlay.tsx:3348",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:800,color:"#000000",letterSpacing:"-0.02em"},children:ge.title}),t.jsx("p",{"data-vg-id":"f01af933","data-source-path":"/src/components/ViewGateOverlay.tsx:3349",style:{margin:"0 0 24px 0",fontSize:"15px",color:"#000000",lineHeight:1.6},children:ge.message}),ge.showInput&&t.jsx("textarea",{className:"vg-textarea",placeholder:r.reopenPlaceholder,value:B,onChange:a=>X(a.target.value),rows:3,autoFocus:!0,style:{marginBottom:"24px",minHeight:"80px",textAlign:"left"}}),t.jsxs("div",{"data-vg-id":"2e783055","data-source-path":"/src/components/ViewGateOverlay.tsx:3363",style:{display:"flex",gap:"16px"},children:[t.jsx("button",{className:"vg-button-ghost",style:{flex:1,height:"44px"},onClick:()=>!Ne&&W(null),disabled:Ne,children:r.no}),t.jsx("button",{className:"vg-button-primary",style:{flex:1,height:"44px",backgroundColor:ge.type==="danger"?"#ef4444":void 0,backgroundImage:ge.type==="danger"?"none":void 0,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",opacity:ge.showInput&&!B.trim()?.5:1,cursor:ge.showInput&&!B.trim()?"not-allowed":"pointer"},disabled:Ne||ge.showInput&&!B.trim(),onClick:async()=>{jt(!0);try{await ge.onConfirm(B)}catch(a){console.error("Confirmation error:",a)}finally{jt(!1)}},children:Ne?t.jsx(Mt,{"data-vg-id":"a4b73624","data-source-path":"/src/components/ViewGateOverlay.tsx:3399",size:18,className:"vg-animate-spin"}):r.yes})]})]})}),!fe&&!x&&q&&nt.map((a,n)=>{const{rect:i,annotations:u,isModal:y}=a,k=u[0],E=u.length,O=u.some(w=>w.status==="ready_for_review"),$=u.some(w=>w.status==="completed"||w.status==="done"),G=u.some(w=>w.status!=="ready_for_review"&&w.status!=="completed"&&w.status!=="done"),pe=$&&!O&&!G,ee=O&&!G&&!$,Re=(O||$)&&!G,he=(O||$)&&G,xe=u.filter(w=>w.status!=="ready_for_review"&&w.status!=="completed"&&w.status!=="done").length,be=u.filter(w=>w.status==="ready_for_review").length,we=u.filter(w=>w.status==="completed"||w.status==="done").length,ke=u.some(w=>w.status==="bug_fixing"||w.type==="bug"||w.originalStatus==="bug_fixing"),ta=ke&&!ee&&!pe?"#f43f5e":xe>0?m?"#64748b":"#ea580c":be>0?"#a855f7":"#10b981",pt=nt.some(w=>w.element===a.element&&w.isTriggerPin),Xe=nt.some(w=>w.element===a.element&&!w.isTriggerPin),ft=pt&&Xe?a.isTriggerPin?-18:18:0,Gt=i.top===0&&i.left===0&&i.width>window.innerWidth*.9;return t.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:Math.max(20,Math.min(window.innerHeight-52,i.top-20)),left:Gt?Math.max(20,i.left+40+ft):Math.max(20,Math.min(window.innerWidth-52,i.left+i.width/2-16+ft)),width:"32px",height:"32px",cursor:"pointer",transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:Jo},onMouseEnter:w=>{const at=w.currentTarget.getBoundingClientRect(),Ds=window.innerHeight-at.bottom,gr=at.top;Ds<250&&gr>Ds?Q(Ia=>({...Ia,[a.id]:"vg-top"})):Q(Ia=>({...Ia,[a.id]:""}))},onWheel:w=>{const at=w.currentTarget.querySelector(".vg-tooltip-scroll");at&&at.scrollBy({top:w.deltaY,behavior:"smooth"})},onClick:()=>{Ae(!0),We(k._id)},children:[t.jsxs("div",{"data-vg-id":"2e783057","data-source-path":"/src/components/ViewGateOverlay.tsx:3474",className:`vg-pin-tooltip ${me[a.id]||""} ${Gt||i.left<160?"vg-tooltip-right":i.left>window.innerWidth-160?"vg-tooltip-left":""}`,style:{padding:"16px"},children:[t.jsxs("div",{"data-vg-id":"2e783058","data-source-path":"/src/components/ViewGateOverlay.tsx:3475",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[t.jsxs("div",{"data-vg-id":"2e783059","data-source-path":"/src/components/ViewGateOverlay.tsx:3476",style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[a.isTriggerPin?t.jsx(Pt,{"data-vg-id":"d88161bf","data-source-path":"/src/components/ViewGateOverlay.tsx:3478",size:14,color:ta}):t.jsx(Lt,{"data-vg-id":"7fe17ae","data-source-path":"/src/components/ViewGateOverlay.tsx:3480",size:14,color:ta}),t.jsxs("div",{"data-vg-id":"2e78305c","data-source-path":"/src/components/ViewGateOverlay.tsx:3482",style:{display:"flex",gap:"4px"},children:[xe>0&&t.jsxs("span",{"data-vg-id":"8161d07","data-source-path":"/src/components/ViewGateOverlay.tsx:3484",className:"vg-badge",style:{fontSize:"10px",background:m?"#f1f5f9":"#fff7ed",color:m?"#64748b":"#c2410c"},children:[xe," ",m||k.status==="backlog"?"Backlog":s==="es"?xe===1?r.pending:"Pendientes":"pending"]}),be>0&&t.jsxs("span",{"data-vg-id":"8161d08","data-source-path":"/src/components/ViewGateOverlay.tsx:3493",style:{fontSize:"10px",fontWeight:700,color:"#a855f7",background:"#f3e8ff",padding:"2px 6px",borderRadius:"6px"},children:[be," ",s==="es"?be===1?"Listo para revisión":"Listos para revisión":"ready for review"]}),we>0&&t.jsxs("span",{"data-vg-id":"8161d09","data-source-path":"/src/components/ViewGateOverlay.tsx:3505",style:{fontSize:"10px",fontWeight:700,color:"#059669",background:"#ecfdf5",padding:"2px 6px",borderRadius:"6px"},children:[we," ",s==="es"?we===1?"Completado":"Completados":"completed"]}),u.some(w=>w.status==="bug_fixing")&&t.jsx("span",{"data-vg-id":"8161d0a","data-source-path":"/src/components/ViewGateOverlay.tsx:3517",style:{fontSize:"10px",fontWeight:700,color:"#e11d48",background:"#fff1f2",padding:"2px 6px",borderRadius:"6px"},children:"BUG"})]})]}),y&&t.jsx("span",{"data-vg-id":"8161d0b","data-source-path":"/src/components/ViewGateOverlay.tsx:3531",className:"vg-badge",style:{fontSize:"10px",background:m?"#f1f5f9":he?`linear-gradient(90deg, #ea580c 50%, ${$?"#10b981":"#a855f7"} 50%)`:xe>0?"#fff7ed":pe?"#ecfdf5":"#f3e8ff",color:m?"#64748b":he?"#ffffff":xe>0?"#c2410c":pe?"#059669":"#a855f7",border:"none",fontWeight:800,textShadow:he&&!m?"0 1px 2px rgba(0,0,0,0.2)":"none"},children:"MODAL"})]}),t.jsx("div",{"data-vg-id":"2e783077","data-source-path":"/src/components/ViewGateOverlay.tsx:3543",className:"vg-tooltip-scroll",style:{maxHeight:"180px",overflowY:"auto"},children:u.map((w,at)=>t.jsxs("div",{"data-vg-id":"2e783078","data-source-path":"/src/components/ViewGateOverlay.tsx:3545",style:{padding:"10px 0",borderTop:at===0?"none":"1px solid #f1f5f9",display:"flex",gap:"12px",alignItems:"flex-start"},children:[t.jsxs("div",{"data-vg-id":"2e783079","data-source-path":"/src/components/ViewGateOverlay.tsx:3552",style:{flex:1,display:"flex",flexDirection:"column",gap:"4px"},children:[t.jsxs("div",{"data-vg-id":"2e78307a","data-source-path":"/src/components/ViewGateOverlay.tsx:3553",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx("span",{"data-vg-id":"8161d10","data-source-path":"/src/components/ViewGateOverlay.tsx:3554",style:{fontSize:"10px",fontWeight:600,color:"#64748b"},children:ms(w.timestamp||w.createdAt,s)}),w.creator&&t.jsx("div",{"data-vg-id":"2e783091","data-source-path":"/src/components/ViewGateOverlay.tsx:3558",style:{marginLeft:"4px"},children:w.creator.avatar?t.jsx("img",{"data-vg-id":"3cf75ac4","data-source-path":"/src/components/ViewGateOverlay.tsx:3560",src:w.creator.avatar,style:{width:"14px",height:"14px",borderRadius:"50%"},alt:""}):t.jsx("div",{"data-vg-id":"2e783093","data-source-path":"/src/components/ViewGateOverlay.tsx:3562",style:{width:"14px",height:"14px",borderRadius:"50%",background:"#6366f1",color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"7px",fontWeight:700},children:w.creator.name?.[0]})})]}),w.url&&t.jsx(hs,{url:w.url,onHover:Gs,style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"9px",color:"#6366f1",opacity:.8,background:"rgba(99, 102, 241, 0.05)",padding:"2px 6px",borderRadius:"4px",maxWidth:"120px"},tooltipStyle:{fontSize:"9px"}}),t.jsx("div",{"data-vg-id":"2e783094","data-source-path":"/src/components/ViewGateOverlay.tsx:3588",className:"vg-line-clamp-2",style:{fontSize:"13px",color:"#1e293b",lineHeight:1.4,fontWeight:500},children:w.message.length>100?w.message.slice(0,97)+"...":w.message})]}),t.jsxs("div",{"data-vg-id":"2e783095","data-source-path":"/src/components/ViewGateOverlay.tsx:3592",style:{flexShrink:0,marginTop:"2px",display:"flex",flexDirection:"column",gap:"4px",alignItems:"flex-end"},children:[t.jsx("div",{"data-vg-id":"2e783096","data-source-path":"/src/components/ViewGateOverlay.tsx:3593",style:{fontSize:"8px",fontWeight:800,color:w.priority==="low"?"#059669":w.priority==="urgent"?"#b91c1c":w.priority==="high"?"#b45309":"#4338ca",backgroundColor:w.priority==="low"?"#ecfdf5":w.priority==="urgent"?"#fef2f2":w.priority==="high"?"#fffbeb":"#eef2ff",padding:"2px 6px",borderRadius:"4px",textTransform:"uppercase",border:"1px solid",borderColor:w.priority==="low"?"#d1fae5":w.priority==="urgent"?"#fee2e2":w.priority==="high"?"#fef3c7":"#e0e7ff"},children:r[w.priority||"medium"]}),w.status==="completed"||w.status==="done"?t.jsxs("span",{"data-vg-id":"8161d2c","data-source-path":"/src/components/ViewGateOverlay.tsx:3607",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"8px",fontWeight:800,color:"#059669",background:"#ecfdf5",padding:"2px 6px",borderRadius:"6px",textTransform:"uppercase",border:"1px solid #d1fae5"},children:[t.jsx(Ke,{"data-vg-id":"a75c1b3d","data-source-path":"/src/components/ViewGateOverlay.tsx:3620",size:10}),r.completed]}):w.status==="ready_for_review"?t.jsxs("span",{"data-vg-id":"8161d2e","data-source-path":"/src/components/ViewGateOverlay.tsx:3624",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"8px",fontWeight:800,color:"#a855f7",background:"#f3e8ff",padding:"2px 6px",borderRadius:"6px",textTransform:"uppercase",border:"1px solid #e9d5ff"},children:[w.type==="bug"||w.status==="bug_fixing"||w.originalStatus==="bug_fixing"?t.jsx(xt,{"data-vg-id":"3b8b18dd","data-source-path":"/src/components/ViewGateOverlay.tsx:3637",size:10}):t.jsx(Ke,{"data-vg-id":"a75c1de0","data-source-path":"/src/components/ViewGateOverlay.tsx:3637",size:10}),r.readyForReview]}):w.status==="bug_fixing"?t.jsxs("span",{"data-vg-id":"8161fd1","data-source-path":"/src/components/ViewGateOverlay.tsx:3641",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"8px",fontWeight:800,color:"#e11d48",background:"#fff1f2",padding:"2px 6px",borderRadius:"6px",textTransform:"uppercase",border:"1px solid #ffe4e6"},children:[t.jsx(xt,{"data-vg-id":"3b8b1b80","data-source-path":"/src/components/ViewGateOverlay.tsx:3654",size:10}),"Bug Fixing"]}):t.jsxs("span",{"data-vg-id":"8161fd3","data-source-path":"/src/components/ViewGateOverlay.tsx:3658",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"8px",fontWeight:800,color:m||w.status==="backlog"?"#64748b":"#ea580c",background:m||w.status==="backlog"?"#f1f5f9":"#fff7ed",padding:"2px 6px",borderRadius:"6px",textTransform:"uppercase",border:m||w.status==="backlog"?"1px solid #e2e8f0":"1px solid #ffedd5"},children:[t.jsx(cs,{"data-vg-id":"62dc6f9c","data-source-path":"/src/components/ViewGateOverlay.tsx:3671",size:10}),m||w.status==="backlog"?r.backlog:r.pending]})]})]},w._id))})]}),t.jsxs("div",{"data-vg-id":"2e783340","data-source-path":"/src/components/ViewGateOverlay.tsx:3681",className:`vg-formal-pin ${pe?"completed":ee||Re?"ready":ke?"bug":he?"mixed":m?"backlog":""} ${a.isTriggerPin?"modal-variant":""}`,style:{position:"relative",background:ke&&!ee&&!pe?"linear-gradient(135deg, #f43f5e 0%, #e11d48 100%)":ee?"linear-gradient(135deg, #a855f7 0%, #7e22ce 100%)":he?$?"linear-gradient(135deg, #10b981 0%, #059669 100%)":"linear-gradient(135deg, #a855f7 0%, #7e22ce 100%)":void 0},children:[ee||pe||Re?ke&&!pe?t.jsx(xt,{"data-vg-id":"3b8b1b84","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:18}):t.jsx(Ke,{"data-vg-id":"a75c1de7","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:18}):ke?t.jsx(xt,{"data-vg-id":"3b8b1b86","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:18}):a.isTriggerPin?t.jsx(Pt,{"data-vg-id":"d88164a9","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:16}):y?t.jsx(ba,{"data-vg-id":"5c2be3aa","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:16}):t.jsx(Lt,{"data-vg-id":"7fe1aae","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:16}),E>1&&t.jsx("div",{"data-vg-id":"2e78335c","data-source-path":"/src/components/ViewGateOverlay.tsx:3691",className:"vg-pin-badge vg-animate-pop",children:E})]})]},`group-${a.id}`)}),t.jsx("div",{className:`vg-url-tooltip ${et?"visible":""} ${et?.direction==="bottom"?"vg-bottom":"vg-top"}`,style:{transform:et?`translate(-50%, ${et.direction==="top"?"-110%":"10%"})`:"translate(-50%, 0)",left:et?.x||0,top:et?.y||0},children:et?.url}),Ee&&t.jsx("div",{"data-vg-id":"2e78335d","data-source-path":"/src/components/ViewGateOverlay.tsx:3716",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.75)",backdropFilter:"blur(16px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je+100,animation:"vg-fade-in 0.3s ease-out"},onClick:a=>{a.target===a.currentTarget&&P(!1)},children:t.jsxs("div",{"data-vg-id":"2e78335e","data-source-path":"/src/components/ViewGateOverlay.tsx:3725",className:"vg-glassmorphism vg-animate-pop",style:{width:"95%",maxWidth:"800px",height:"85vh",maxHeight:"850px",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 50px 100px rgba(0,0,0,0.6)",borderRadius:"32px",border:"1px solid rgba(255, 255, 255, 0.15)",backgroundColor:"rgba(255, 255, 255, 0.98)"},children:[t.jsxs("div",{"data-vg-id":"2e78335f","data-source-path":"/src/components/ViewGateOverlay.tsx:3738",style:{padding:"32px 40px",borderBottom:"1px solid rgba(0,0,0,0.06)",display:"flex",alignItems:"center",justifyContent:"space-between",background:"white"},children:[t.jsxs("div",{"data-vg-id":"2e783360","data-source-path":"/src/components/ViewGateOverlay.tsx:3739",children:[t.jsx("h3",{"data-vg-id":"53ec877","data-source-path":"/src/components/ViewGateOverlay.tsx:3740",style:{margin:0,fontSize:"24px",fontWeight:900,letterSpacing:"-0.03em",color:"#0f172a"},children:s==="es"?"Selector de Endpoints":"Endpoint Selector"}),t.jsx("p",{"data-vg-id":"f01afc41","data-source-path":"/src/components/ViewGateOverlay.tsx:3743",style:{margin:"6px 0 0 0",fontSize:"14px",color:"#64748b",fontWeight:500},children:s==="es"?"Asocia múltiples rutas backend a este ticket para mayor precisión":"Associate multiple backend routes to this ticket for better precision"})]}),t.jsx("button",{"data-vg-id":"5861c060","data-source-path":"/src/components/ViewGateOverlay.tsx:3747",onClick:()=>P(!1),className:"vg-close-pill",style:{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"14px",background:"#f1f5f9",color:"#64748b",border:"none",cursor:"pointer",transition:"all 0.2s"},onMouseEnter:a=>{a.currentTarget.style.background="#e2e8f0",a.currentTarget.style.color="#0f172a"},onMouseLeave:a=>{a.currentTarget.style.background="#f1f5f9",a.currentTarget.style.color="#64748b"},children:t.jsx(yt,{"data-vg-id":"eec8c840","data-source-path":"/src/components/ViewGateOverlay.tsx:3754",size:20,strokeWidth:2.5})})]}),t.jsx("div",{"data-vg-id":"2e78337a","data-source-path":"/src/components/ViewGateOverlay.tsx:3758",style:{padding:"24px 40px",borderBottom:"1px solid rgba(0,0,0,0.06)",background:"#fcfcfc"},children:t.jsxs("div",{"data-vg-id":"2e78337b","data-source-path":"/src/components/ViewGateOverlay.tsx:3759",style:{position:"relative"},children:[t.jsx(Po,{"data-vg-id":"8f7bb00f","data-source-path":"/src/components/ViewGateOverlay.tsx:3760",size:20,style:{position:"absolute",left:"16px",top:"50%",transform:"translateY(-50%)",color:"#94a3b8"}}),t.jsx("input",{"data-vg-id":"88e38db6","data-source-path":"/src/components/ViewGateOverlay.tsx:3761",type:"text",placeholder:s==="es"?"Buscar rutas, métodos o descripciones...":"Search routes, methods, or descriptions...",value:F,onChange:a=>Te(a.target.value),className:"vg-textarea",style:{padding:"14px 16px 14px 50px",fontSize:"16px",minHeight:"auto",borderRadius:"16px",border:"1px solid #e2e8f0",backgroundColor:"white",boxShadow:"0 2px 8px rgba(0,0,0,0.04)"},autoFocus:!0})]})}),t.jsx("div",{"data-vg-id":"2e78337e","data-source-path":"/src/components/ViewGateOverlay.tsx:3781",style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"24px 40px"},className:"vg-custom-scrollbar",children:Et?Is.length>0?t.jsx("div",{"data-vg-id":"2e783382","data-source-path":"/src/components/ViewGateOverlay.tsx:3788",style:{display:"flex",flexDirection:"column",gap:"0px"},children:Is.map(a=>{const n=a.name===(s==="es"?"Seleccionados":"Selected");return t.jsxs("div",{"data-vg-id":"2e783398","data-source-path":"/src/components/ViewGateOverlay.tsx:3792",style:{marginBottom:"32px"},children:[t.jsxs("div",{"data-vg-id":"2e783399","data-source-path":"/src/components/ViewGateOverlay.tsx:3793",style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"16px",padding:"0 4px"},children:[t.jsx("span",{"data-vg-id":"816202f","data-source-path":"/src/components/ViewGateOverlay.tsx:3794",style:{fontSize:"11px",fontWeight:900,textTransform:"uppercase",letterSpacing:"0.1em",color:n?"#10b981":"#6366f1",backgroundColor:n?"rgba(10, 185, 129, 0.08)":"rgba(99, 102, 241, 0.08)",padding:"4px 10px",borderRadius:"6px",border:"1px solid",borderColor:n?"rgba(10, 185, 129, 0.1)":"rgba(99, 102, 241, 0.1)"},children:a.name}),t.jsx("div",{"data-vg-id":"2e78339b","data-source-path":"/src/components/ViewGateOverlay.tsx:3808",style:{flex:1,height:"1px",background:`linear-gradient(90deg, ${n?"rgba(16, 185, 129, 0.15)":"rgba(99, 102, 241, 0.15)"} 0%, transparent 100%)`}})]}),t.jsx("div",{"data-vg-id":"2e78339c","data-source-path":"/src/components/ViewGateOverlay.tsx:3815",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(340px, 1fr))",gap:"12px"},children:a.endpoints.map(i=>{const u=`${i.method}|${i.path}`,y=L.includes(u);return t.jsxs("div",{"data-vg-id":"2e78339d","data-source-path":"/src/components/ViewGateOverlay.tsx:3824",onClick:()=>{Se(y?L.filter(k=>k!==u):[...L,u])},style:{padding:"16px 20px",borderRadius:"18px",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",background:y?"#f5f7ff":"#ffffff",border:"1px solid",borderColor:y?"rgba(99, 102, 241, 0.2)":"#f1f5f9",display:"flex",alignItems:"center",gap:"16px",boxShadow:y?"0 4px 12px rgba(99, 102, 241, 0.08)":"none"},onMouseEnter:k=>{y||(k.currentTarget.style.background="#f8fafc",k.currentTarget.style.borderColor="#e2e8f0")},onMouseLeave:k=>{y||(k.currentTarget.style.background="#ffffff",k.currentTarget.style.borderColor="#f1f5f9")},children:[t.jsx("div",{"data-vg-id":"2e78339e","data-source-path":"/src/components/ViewGateOverlay.tsx:3856",style:{width:"24px",height:"24px",borderRadius:"8px",border:"2px solid",borderColor:y?"#6366f1":"#cbd5e1",backgroundColor:y?"#6366f1":"white",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",flexShrink:0},children:y&&t.jsx("div",{"data-vg-id":"2e78339f","data-source-path":"/src/components/ViewGateOverlay.tsx:3869",style:{color:"white",fontSize:"14px",fontWeight:900},children:"✓"})}),t.jsxs("div",{"data-vg-id":"2e7833a0","data-source-path":"/src/components/ViewGateOverlay.tsx:3871",style:{flex:1,minWidth:0},children:[t.jsxs("div",{"data-vg-id":"2e7833a1","data-source-path":"/src/components/ViewGateOverlay.tsx:3872",style:{display:"flex",alignItems:"center",gap:"10px"},children:[t.jsx("span",{"data-vg-id":"816204c","data-source-path":"/src/components/ViewGateOverlay.tsx:3873",style:{fontSize:"11px",fontWeight:800,padding:"3px 8px",borderRadius:"8px",background:i.method==="GET"?"#dcfce7":"#fee2e2",color:i.method==="GET"?"#166534":"#991b1b",flexShrink:0},children:i.method}),t.jsx("span",{"data-vg-id":"816204d","data-source-path":"/src/components/ViewGateOverlay.tsx:3884",style:{fontWeight:700,color:y?"#4338ca":"#1e293b",fontSize:"14px",wordBreak:"break-all"},children:i.path}),i.contract&&t.jsx("div",{"data-vg-id":"2e7833b9","data-source-path":"/src/components/ViewGateOverlay.tsx:3893",style:{fontSize:"9px",fontWeight:900,color:"#6366f1",background:"rgba(99, 102, 241, 0.1)",padding:"1px 5px",borderRadius:"4px",textTransform:"uppercase"},children:"JSON"})]}),i.description&&t.jsx("div",{"data-vg-id":"2e7833ba","data-source-path":"/src/components/ViewGateOverlay.tsx:3905",style:{fontSize:"12px",color:"#64748b",marginTop:"6px",wordBreak:"break-word",fontWeight:450,lineHeight:1.4},children:i.description})]})]},u)})})]},a.name)})}):t.jsxs("div",{"data-vg-id":"2e7833bb","data-source-path":"/src/components/ViewGateOverlay.tsx:3926",style:{padding:"80px 20px",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center"},children:[t.jsx("div",{"data-vg-id":"2e7833bc","data-source-path":"/src/components/ViewGateOverlay.tsx:3927",style:{width:"80px",height:"80px",borderRadius:"24px",backgroundColor:"#f1f5f9",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"24px"},children:t.jsx(Be,{"data-vg-id":"b1e4c679","data-source-path":"/src/components/ViewGateOverlay.tsx:3928",size:40,style:{color:"#94a3b8"}})}),t.jsx("p",{"data-vg-id":"f01afc9d","data-source-path":"/src/components/ViewGateOverlay.tsx:3930",style:{color:"#0f172a",fontSize:"18px",fontWeight:800,margin:"0 0 8px 0"},children:s==="es"?"No encontramos lo que buscas":"No results found"}),t.jsx("p",{"data-vg-id":"f01afc9e","data-source-path":"/src/components/ViewGateOverlay.tsx:3933",style:{color:"#64748b",fontSize:"15px",margin:0},children:s==="es"?"Intenta buscar con otros términos o revisa la sincronización":"Try searching with different terms or check synchronization"})]}):t.jsxs("div",{"data-vg-id":"2e78337f","data-source-path":"/src/components/ViewGateOverlay.tsx:3783",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"100px 0",gap:"20px"},children:[t.jsx("div",{"data-vg-id":"2e783380","data-source-path":"/src/components/ViewGateOverlay.tsx:3784",className:"vg-spinner",style:{width:"40px",height:"40px",border:"3px solid rgba(99, 102, 241, 0.1)",borderTopColor:"#6366f1"}}),t.jsx("p",{"data-vg-id":"f01afc60","data-source-path":"/src/components/ViewGateOverlay.tsx:3785",style:{color:"#64748b",fontSize:"15px",fontWeight:600},children:s==="es"?"Cargando endpoints...":"Loading endpoints..."})]})}),t.jsxs("div",{"data-vg-id":"2e7833c0","data-source-path":"/src/components/ViewGateOverlay.tsx:3940",style:{padding:"24px 40px",borderTop:"1px solid rgba(0,0,0,0.06)",background:"white",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"20px"},children:[t.jsxs("div",{"data-vg-id":"2e7833d6","data-source-path":"/src/components/ViewGateOverlay.tsx:3941",style:{display:"flex",alignItems:"center",gap:"12px"},children:[t.jsxs("div",{"data-vg-id":"2e7833d7","data-source-path":"/src/components/ViewGateOverlay.tsx:3942",style:{padding:"6px 12px",background:"#f1f5f9",borderRadius:"10px",fontSize:"14px",fontWeight:700,color:"#475569"},children:[L.length," ",s==="es"?"seleccionados":"selected"]}),L.length>0&&t.jsx("button",{"data-vg-id":"5861c0d5","data-source-path":"/src/components/ViewGateOverlay.tsx:3946",onClick:()=>{Se([]),ct&&qt([])},style:{background:"none",border:"none",color:"#6366f1",fontSize:"14px",fontWeight:700,cursor:"pointer",padding:"4px 8px"},children:s==="es"?"Desmarcar todos":"Deselect all"})]}),t.jsx("div",{"data-vg-id":"2e7833d9","data-source-path":"/src/components/ViewGateOverlay.tsx:3957",style:{display:"flex",gap:"12px"},children:t.jsx("button",{"data-vg-id":"5861c0d7","data-source-path":"/src/components/ViewGateOverlay.tsx:3958",onClick:()=>{ct&&qt(L),P(!1)},style:{minWidth:"160px",padding:"14px 28px",borderRadius:"16px",fontSize:"15px",fontWeight:850,border:"none",background:"var(--vg-primary-gradient)",color:"white",cursor:"pointer",boxShadow:"0 10px 25px -5px rgba(99, 102, 241, 0.45)",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:a=>{a.currentTarget.style.transform="translateY(-2px)",a.currentTarget.style.boxShadow="0 15px 30px -5px rgba(99, 102, 241, 0.6)"},onMouseLeave:a=>{a.currentTarget.style.transform="translateY(0)",a.currentTarget.style.boxShadow="0 10px 25px -5px rgba(99, 102, 241, 0.45)"},children:s==="es"?"Confirmar Selección":"Confirm Selection"})})]})]})}),rt?.contract&&t.jsx("div",{"data-vg-id":"2e7833db","data-source-path":"/src/components/ViewGateOverlay.tsx:3992",className:"vg-animate-fade",style:{position:"fixed",left:Math.min(rt.x,window.innerWidth-420),top:Math.min(rt.y,window.innerHeight-300),width:"400px",zIndex:Je+500,pointerEvents:"none"},children:t.jsxs("div",{"data-vg-id":"2e7833dc","data-source-path":"/src/components/ViewGateOverlay.tsx:4000",className:"vg-glassmorphism",style:{padding:"20px",background:"rgba(15, 23, 42, 0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"20px",boxShadow:"0 20px 40px rgba(0,0,0,0.4)",display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsxs("div",{"data-vg-id":"2e7833dd","data-source-path":"/src/components/ViewGateOverlay.tsx:4011",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t.jsx("div",{"data-vg-id":"2e7833de","data-source-path":"/src/components/ViewGateOverlay.tsx:4012",style:{padding:"4px 10px",background:"rgba(99, 102, 241, 0.2)",borderRadius:"8px",fontSize:"11px",fontWeight:900,color:"#818cf8",textTransform:"uppercase"},children:s==="es"?"CONTRATO":"CONTRACT"}),t.jsxs("span",{"data-vg-id":"8162074","data-source-path":"/src/components/ViewGateOverlay.tsx:4021",style:{color:"rgba(255, 255, 255, 0.5)",fontSize:"12px",fontWeight:600},children:[rt.method," ",rt.path]})]}),t.jsx("div",{"data-vg-id":"2e7833f5","data-source-path":"/src/components/ViewGateOverlay.tsx:4023",className:"vg-custom-scrollbar",style:{maxHeight:"250px",overflowY:"auto",background:"rgba(0,0,0,0.3)",borderRadius:"12px",padding:"12px"},children:t.jsx("pre",{"data-vg-id":"b7af0908","data-source-path":"/src/components/ViewGateOverlay.tsx:4030",style:{margin:0,fontSize:"11px",color:"#94a3b8",whiteSpace:"pre-wrap",wordBreak:"break-all",lineHeight:1.5,fontFamily:"JetBrains Mono, Fira Code, monospace"},children:rt.contract})})]})}),ct&&t.jsx("div",{"data-vg-id":"2e7833f7","data-source-path":"/src/components/ViewGateOverlay.tsx:4049",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(11, 15, 25, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je+50},children:t.jsxs("div",{"data-vg-id":"2e7833f8","data-source-path":"/src/components/ViewGateOverlay.tsx:4055",className:"vg-glassmorphism vg-animate-slide",style:{width:"600px",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",background:"#ffffff",borderRadius:"24px",padding:"32px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",gap:"24px"},children:[t.jsxs("div",{"data-vg-id":"2e7833f9","data-source-path":"/src/components/ViewGateOverlay.tsx:4066",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsx("h2",{"data-vg-id":"530b18f","data-source-path":"/src/components/ViewGateOverlay.tsx:4067",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#1e293b"},children:s==="es"?"Editar Comentario":"Edit Comment"}),t.jsx("button",{"data-vg-id":"5861c0f8","data-source-path":"/src/components/ViewGateOverlay.tsx:4070",onClick:()=>Qt(null),style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8"},children:t.jsx(yt,{"data-vg-id":"eec8c8c3","data-source-path":"/src/components/ViewGateOverlay.tsx:4071",size:24})})]}),t.jsxs("div",{"data-vg-id":"2e7833fd","data-source-path":"/src/components/ViewGateOverlay.tsx:4075",style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsxs("div",{"data-vg-id":"2e7833fe","data-source-path":"/src/components/ViewGateOverlay.tsx:4076",children:[t.jsx("label",{"data-vg-id":"feec1077","data-source-path":"/src/components/ViewGateOverlay.tsx:4077",style:{display:"block",fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},children:r.priority}),t.jsx("div",{"data-vg-id":"2e783415","data-source-path":"/src/components/ViewGateOverlay.tsx:4078",style:{display:"flex",gap:"8px"},children:["low","medium","high","urgent"].map(a=>t.jsx("button",{onClick:()=>_(a),style:{flex:1,padding:"10px 12px",borderRadius:"12px",fontSize:"13px",fontWeight:800,border:"2px solid",borderColor:A===a?a==="low"?"#10b981":a==="medium"?"#6366f1":a==="high"?"#f59e0b":"#ef4444":"#f1f5f9",backgroundColor:A===a?a==="low"?"#ecfdf5":a==="medium"?"#eef2ff":a==="high"?"#fffbeb":"#fef2f2":"white",color:A===a?a==="low"?"#059669":a==="medium"?"#4338ca":a==="high"?"#b45309":"#b91c1c":"#64748b",cursor:"pointer",transition:"all 0.2s",textTransform:"capitalize"},children:r[a]},a))})]}),t.jsxs("div",{"data-vg-id":"2e783416","data-source-path":"/src/components/ViewGateOverlay.tsx:4098",style:{marginBottom:"8px"},children:[t.jsx("label",{"data-vg-id":"feec107a","data-source-path":"/src/components/ViewGateOverlay.tsx:4099",style:{display:"block",fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},children:r.focusAreas}),t.jsx("div",{"data-vg-id":"2e783418","data-source-path":"/src/components/ViewGateOverlay.tsx:4100",style:{display:"flex",gap:"8px"},children:[{id:"frontend",label:r.frontend,icon:t.jsx(zt,{"data-vg-id":"b806c346","data-source-path":"/src/components/ViewGateOverlay.tsx:4102",size:14}),color:"#10b981",bg:"#ecfdf5",border:"#d1fae5"},{id:"backend",label:r.backend,icon:t.jsx(Be,{"data-vg-id":"b1e4c6d6","data-source-path":"/src/components/ViewGateOverlay.tsx:4103",size:14}),color:"#6366f1",bg:"#eef2ff",border:"#e0e7ff"},{id:"ux",label:r.ux,icon:t.jsx(vt,{"data-vg-id":"ea069d93","data-source-path":"/src/components/ViewGateOverlay.tsx:4104",size:14}),color:"#d946ef",bg:"#fdf4ff",border:"#f5d0fe"}].filter(a=>a.id==="backend"?Ut:a.id==="ux"?R:!0).map(a=>{const n=dt.includes(a.id);return t.jsxs("button",{onClick:()=>{_a(n?dt.filter(i=>i!==a.id):[...dt,a.id])},style:{flex:1,padding:"10px 4px",borderRadius:"12px",fontSize:"12px",fontWeight:700,border:"2px solid",borderColor:n?a.color:"#f1f5f9",backgroundColor:n?a.bg:"white",color:n?a.color:"#64748b",cursor:"pointer",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[a.icon,a.label]},a.id)})})]}),dt.includes("ux")&&t.jsxs("div",{"data-vg-id":"2e78341c","data-source-path":"/src/components/ViewGateOverlay.tsx:4140",className:"vg-animate-slide",style:{padding:"16px",borderRadius:"16px",background:"#f8fafc",border:"1px solid #e2e8f0"},children:[t.jsxs("div",{"data-vg-id":"2e78341d","data-source-path":"/src/components/ViewGateOverlay.tsx:4141",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[t.jsxs("div",{"data-vg-id":"2e783433","data-source-path":"/src/components/ViewGateOverlay.tsx:4142",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx(Pt,{"data-vg-id":"d8816599","data-source-path":"/src/components/ViewGateOverlay.tsx:4143",size:14,style:{color:"#d946ef"}}),t.jsx("span",{"data-vg-id":"81620ca","data-source-path":"/src/components/ViewGateOverlay.tsx:4144",style:{fontSize:"11px",fontWeight:800,color:"#64748b",textTransform:"uppercase"},children:r.figmaLink})]}),t.jsxs("button",{"data-vg-id":"5861c133","data-source-path":"/src/components/ViewGateOverlay.tsx:4146",onClick:()=>Rt([...tt,{name:"",link:""}]),style:{background:"#fdf4ff",border:"1px solid #f5d0fe",color:"#d946ef",borderRadius:"8px",padding:"4px 10px",fontSize:"11px",fontWeight:800,cursor:"pointer"},children:["+ ",r.addLink]})]}),t.jsx("div",{"data-vg-id":"2e783437","data-source-path":"/src/components/ViewGateOverlay.tsx:4153",style:{display:"flex",flexDirection:"column",gap:"8px"},children:tt.map((a,n)=>t.jsxs("div",{"data-vg-id":"2e783438","data-source-path":"/src/components/ViewGateOverlay.tsx:4155",style:{display:"flex",gap:"8px"},children:[t.jsx("input",{"data-vg-id":"88e38e72","data-source-path":"/src/components/ViewGateOverlay.tsx:4156",type:"text",className:"vg-textarea",style:{padding:"8px 12px",fontSize:"12px",minHeight:"auto",borderRadius:"10px"},placeholder:r.figmaNamePlaceholder,value:a.name,onChange:i=>{const u=[...tt];u[n]&&(u[n].name=i.target.value,Rt(u))}}),t.jsx("input",{"data-vg-id":"88e38e73","data-source-path":"/src/components/ViewGateOverlay.tsx:4167",type:"text",className:"vg-textarea",style:{padding:"8px 12px",fontSize:"12px",minHeight:"auto",borderRadius:"10px"},placeholder:r.figmaLinkPlaceholder,value:a.link,onChange:i=>{const u=[...tt];u[n]&&(u[n].link=i.target.value,Rt(u))}}),tt.length>1&&t.jsx("button",{"data-vg-id":"5861c138","data-source-path":"/src/components/ViewGateOverlay.tsx:4179",onClick:()=>Rt(tt.filter((i,u)=>u!==n)),style:{color:"#ef4444",background:"none",border:"none",cursor:"pointer"},children:t.jsx(Wt,{"data-vg-id":"45b44621","data-source-path":"/src/components/ViewGateOverlay.tsx:4180",size:16})})]},n))})]}),Ut&&dt.includes("backend")&&t.jsxs("div",{"data-vg-id":"2e783452","data-source-path":"/src/components/ViewGateOverlay.tsx:4191",className:"vg-animate-slide",style:{padding:"16px",borderRadius:"16px",background:"#f8fafc",border:"1px solid #e2e8f0"},children:[t.jsxs("div",{"data-vg-id":"2e783453","data-source-path":"/src/components/ViewGateOverlay.tsx:4192",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[t.jsxs("div",{"data-vg-id":"2e783454","data-source-path":"/src/components/ViewGateOverlay.tsx:4193",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx(Be,{"data-vg-id":"b1e4c711","data-source-path":"/src/components/ViewGateOverlay.tsx:4194",size:14,style:{color:"#6366f1"}}),t.jsx("span",{"data-vg-id":"81620eb","data-source-path":"/src/components/ViewGateOverlay.tsx:4195",style:{fontSize:"11px",fontWeight:800,color:"#64748b",textTransform:"uppercase"},children:r.endpoint})]}),Ye.length>0&&t.jsxs("span",{"data-vg-id":"81620ec","data-source-path":"/src/components/ViewGateOverlay.tsx:4198",style:{fontSize:"10px",background:"#eef2ff",color:"#6366f1",padding:"2px 8px",borderRadius:"12px",fontWeight:700},children:[Ye.length," ",s==="es"?"seleccionados":"selected"]})]}),t.jsxs("button",{"data-vg-id":"5861c155","data-source-path":"/src/components/ViewGateOverlay.tsx:4203",onClick:()=>P(!0),style:{width:"100%",padding:"12px 16px",fontSize:"14px",borderRadius:"12px",background:"white",border:"1px solid #e2e8f0",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",textAlign:"left",color:Ye.length>0?"#0f172a":"#94a3b8"},children:[t.jsx("div",{"data-vg-id":"2e783459","data-source-path":"/src/components/ViewGateOverlay.tsx:4207",style:{display:"flex",gap:"4px",overflow:"hidden"},children:Ye.length>0?Ye.slice(0,2).map(a=>t.jsx("span",{"data-vg-id":"81620ef","data-source-path":"/src/components/ViewGateOverlay.tsx:4209",style:{background:"#eef2ff",color:"#6366f1",padding:"1px 6px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:a.split("|").pop()},a)).concat(Ye.length>2?[t.jsxs("span",{"data-vg-id":"81620f0","data-source-path":"/src/components/ViewGateOverlay.tsx:4209",children:["+",Ye.length-2]},"plus")]:[]):r.selectEndpoint}),t.jsx(is,{"data-vg-id":"1cd393c8","data-source-path":"/src/components/ViewGateOverlay.tsx:4212",size:14,style:{color:"#64748b"}})]})]}),t.jsxs("div",{"data-vg-id":"2e7836fd","data-source-path":"/src/components/ViewGateOverlay.tsx:4217",children:[t.jsx("label",{"data-vg-id":"feec1361","data-source-path":"/src/components/ViewGateOverlay.tsx:4218",style:{display:"block",fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},children:s==="es"?"Mensaje":"Message"}),t.jsx("textarea",{className:"vg-textarea",value:Ps,onChange:a=>Ms(a.target.value),rows:5,style:{minHeight:"120px",fontSize:"15px"}})]})]}),t.jsxs("div",{"data-vg-id":"2e7836ff","data-source-path":"/src/components/ViewGateOverlay.tsx:4229",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"16px",paddingTop:"24px",borderTop:"1px solid #f1f5f9"},children:[t.jsx("button",{"data-vg-id":"5861c3fd","data-source-path":"/src/components/ViewGateOverlay.tsx:4230",className:"vg-button-ghost",style:{padding:"12px 24px",fontSize:"14px",borderRadius:"12px",color:"#64748b",fontWeight:700},onClick:()=>{Qt(null),Se([])},children:r.cancel}),t.jsx("button",{className:"vg-button-primary vg-animate-pop",style:{padding:"12px 32px",fontSize:"15px",borderRadius:"12px",background:"var(--vg-primary-gradient)",fontWeight:800,boxShadow:"0 10px 25px -5px rgba(99, 102, 241, 0.45)",opacity:$t?.7:1,cursor:$t?"not-allowed":"pointer"},disabled:$t,onClick:async()=>{Ls(!0);try{(await fetch(`${d}/api/annotations/${ct}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:q?`Bearer ${q}`:"","x-api-key":c||""},body:JSON.stringify({message:Ps,priority:A,focusAreas:dt,figmaReference:tt,backendEndpoints:Ye})})).ok&&(Qt(null),Jt(),o(r.updateSuccess,"success"))}catch{}finally{Ls(!1)}},children:$t?"...":r.save})]})]})})]})})};function ka(e,o,s){if(!o.endsWith(".tsx")&&!o.endsWith(".jsx")||o.includes("node_modules"))return e;const r=S=>S.replace(/\\/g,"/"),c=r(o).replace(r(s),""),d=S=>{let b=0;for(let m=0;m<S.length;m++)b=Math.imul(31,b)+S.charCodeAt(m)|0;return(b>>>0).toString(16)};let l=0;return e.split(`
15
- `).map((S,b)=>{const m=b+1;return S.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(x,j,V)=>{if(x.includes("data-source-path")||x.includes("data-vg-id")||V==="Fragment"||V==="React.Fragment")return x;l++;const C=d(`${c}:${V}:${l}`);return`${j}<${V} data-vg-id="${C}" data-source-path="${c}:${m}"`})}).join(`
16
- `)}function ar(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,o){return{code:ka(e,o,process.cwd()),map:null}}}}function sr(e){const o=this.resourcePath;return o?(this.getOptions&&this.getOptions(),ka(e,o,process.cwd())):e}function or(e){return sr.call(this,e)}ve.ViewGate=Fo,ve.ViewGateOverlay=Ss,ve.transformSourcePaths=ka,ve.useViewGate=ps,ve.viewgateNextLoader=or,ve.viewgatePlugin=ar,Object.defineProperty(ve,Symbol.toStringTag,{value:"Module"})}));
14
+ )`:"none",zIndex:Qo}}),x&&N&&!I&&!Le&&t.jsx("div",{className:"vg-selection-pulse",style:{top:N.rect.top-4,left:N.rect.left-4,width:N.rect.width+8,height:N.rect.height+8,zIndex:qo},children:t.jsxs("div",{className:"vg-selection-label",style:{...N.rect.top<60?N.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...N.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[t.jsx(Io,{"data-vg-id":"f840c8ce","data-source-path":"/src/components/ViewGateOverlay.tsx:2267",size:16}),t.jsxs("div",{"data-vg-id":"17fbf98","data-source-path":"/src/components/ViewGateOverlay.tsx:2268",style:{display:"flex",flexDirection:"column"},children:[t.jsx("span",{"data-vg-id":"52d76c64","data-source-path":"/src/components/ViewGateOverlay.tsx:2269",style:{fontWeight:700},children:r.selectToComment}),t.jsxs("span",{"data-vg-id":"52d76c65","data-source-path":"/src/components/ViewGateOverlay.tsx:2270",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(N.rect.width)," × ",Math.round(N.rect.height)]})]})]})}),!q&&(x||fe||I)&&t.jsx("div",{"data-vg-id":"17fbf9b","data-source-path":"/src/components/ViewGateOverlay.tsx:2280",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(12px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je},children:t.jsxs("div",{"data-vg-id":"17fbf9c","data-source-path":"/src/components/ViewGateOverlay.tsx:2285",className:"vg-glassmorphism vg-animate-slide",style:{width:"90%",maxWidth:"440px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.4)",display:"flex",flexDirection:"column",overflow:"hidden",padding:"48px 32px"},children:[t.jsxs("div",{"data-vg-id":"17fbf9d","data-source-path":"/src/components/ViewGateOverlay.tsx:2294",style:{textAlign:"center",marginBottom:"32px"},children:[t.jsx("div",{"data-vg-id":"17fbf9e","data-source-path":"/src/components/ViewGateOverlay.tsx:2295",style:{width:"64px",height:"64px",background:"var(--vg-primary-gradient)",borderRadius:"20px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",color:"white",boxShadow:"0 8px 20px -4px var(--vg-primary)",animation:"pulse 2s infinite"},children:t.jsx(ls,{"data-vg-id":"422a5ede","data-source-path":"/src/components/ViewGateOverlay.tsx:2301",size:32})}),t.jsx("h2",{"data-vg-id":"efa6bb80","data-source-path":"/src/components/ViewGateOverlay.tsx:2303",style:{margin:"0 0 12px 0",fontSize:"24px",fontWeight:800,color:"#0f172a",letterSpacing:"-0.025em"},children:s==="es"?"ViewGate Protegido":"ViewGate Protected"}),t.jsx("p",{"data-vg-id":"1000def7","data-source-path":"/src/components/ViewGateOverlay.tsx:2306",style:{margin:0,color:"#64748b",fontSize:"15px",lineHeight:1.6},children:s==="es"?"Ingresa tu Clave de Acceso Semanal para continuar.":"Enter your project Weekly Access Key to continue."})]}),t.jsxs("form",{"data-vg-id":"a260acc8","data-source-path":"/src/components/ViewGateOverlay.tsx:2313",onSubmit:pr,style:{width:"100%"},children:[t.jsx("div",{"data-vg-id":"17fbfb8","data-source-path":"/src/components/ViewGateOverlay.tsx:2314",style:{position:"relative",marginBottom:"24px"},children:t.jsx("input",{autoFocus:!0,type:"password",value:qe,onChange:a=>js(a.target.value),placeholder:s==="es"?"Pega tu clave aquí...":"Paste your key here...",style:{width:"100%",padding:"16px",borderRadius:"12px",border:"2px solid #e2e8f0",fontSize:"15px",outline:"none",transition:"all 0.2s",backgroundColor:"rgba(255, 255, 255, 0.8)",color:"#1e293b"},onFocus:a=>{a.target.style.borderColor="var(--vg-primary)",a.target.style.boxShadow="0 0 0 4px rgba(99, 102, 241, 0.1)"},onBlur:a=>{a.target.style.borderColor="#e2e8f0",a.target.style.boxShadow="none"}})}),t.jsxs("button",{type:"submit",disabled:Ea||!qe.trim(),className:"vg-button-primary",style:{width:"100%",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",fontSize:"16px",fontWeight:700,opacity:Ea||!qe.trim()?.7:1,boxShadow:"0 10px 15px -3px rgba(99, 102, 241, 0.3)"},children:[Ea?t.jsx(Mt,{"data-vg-id":"cb81c82b","data-source-path":"/src/components/ViewGateOverlay.tsx:2361",size:20,className:"vg-animate-spin"}):t.jsx(No,{"data-vg-id":"d69f974c","data-source-path":"/src/components/ViewGateOverlay.tsx:2363",size:20}),s==="es"?"Desbloquear":"Unlock Now"]})]}),t.jsx("div",{"data-vg-id":"17fbfbb","data-source-path":"/src/components/ViewGateOverlay.tsx:2369",style:{margin:"32px 0 24px",height:"1px",background:"linear-gradient(to right, transparent, #e2e8f0, transparent)"}}),t.jsx("button",{onClick:()=>{J(null),k(!1),Ae(!1)},className:"vg-button-ghost",style:{width:"100%",padding:"12px",fontSize:"14px",color:"#94a3b8"},children:s==="es"?"Cerrar ViewGate":"Close ViewGate"}),t.jsx("div",{"data-vg-id":"17fbfbc","data-source-path":"/src/components/ViewGateOverlay.tsx:2383",style:{marginTop:"24px",textAlign:"center"},children:t.jsx("p",{"data-vg-id":"1000defe","data-source-path":"/src/components/ViewGateOverlay.tsx:2384",style:{fontSize:"12px",color:"#94a3b8",margin:0,lineHeight:1.5},children:s==="es"?"Encuentra tu clave en Dashboard > Proyectos":"Find your key in Dashboard > Projects"})})]})}),I&&ne&&t.jsx("div",{"data-vg-id":"17fbfd3","data-source-path":"/src/components/ViewGateOverlay.tsx:2397",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je},children:t.jsxs("div",{"data-vg-id":"17fbfd4","data-source-path":"/src/components/ViewGateOverlay.tsx:2402",className:"vg-glassmorphism vg-animate-slide",style:{width:"90%",maxWidth:"700px",maxHeight:"92vh",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[t.jsxs("div",{"data-vg-id":"17fbfd5","data-source-path":"/src/components/ViewGateOverlay.tsx:2412",style:{padding:"24px 24px 16px",textAlign:"center",borderBottom:"1px solid rgba(0,0,0,0.05)",flexShrink:0,position:"relative"},children:[ne&&t.jsxs("div",{"data-vg-id":"17fbfd6","data-source-path":"/src/components/ViewGateOverlay.tsx:2414",className:"vg-profile-info-card",style:{position:"absolute",top:"20px",right:"20px",display:"flex",alignItems:"center",gap:"8px",padding:"4px 8px",borderRadius:"20px",background:"white",border:"1px solid #e2e8f0",boxShadow:"0 2px 6px rgba(0,0,0,0.05)",zIndex:10},children:[t.jsx("span",{"data-vg-id":"52d76ca2","data-source-path":"/src/components/ViewGateOverlay.tsx:2431",style:{fontSize:"10px",fontWeight:800,color:"#64748b",textTransform:"uppercase"},children:ne.name.split(" ")[0]}),ne.avatar?t.jsx("img",{"data-vg-id":"a398766","data-source-path":"/src/components/ViewGateOverlay.tsx:2435",src:ne.avatar,style:{width:"24px",height:"24px",borderRadius:"50%"},alt:""}):t.jsx("div",{"data-vg-id":"17fbfd9","data-source-path":"/src/components/ViewGateOverlay.tsx:2437",style:{width:"24px",height:"24px",borderRadius:"50%",background:"#6366f1",color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:700},children:ne.name?.[0]})]}),t.jsx("div",{"data-vg-id":"17fbfda","data-source-path":"/src/components/ViewGateOverlay.tsx:2443",style:{width:"40px",height:"40px",background:"var(--vg-primary-gradient)",borderRadius:"10px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 12px",color:"white",boxShadow:"0 4px 12px rgba(99, 102, 241, 0.2)"},children:t.jsx(Lt,{"data-vg-id":"10c62228","data-source-path":"/src/components/ViewGateOverlay.tsx:2448",size:20})}),t.jsx("h2",{"data-vg-id":"efa6bba7","data-source-path":"/src/components/ViewGateOverlay.tsx:2450",style:{margin:"0 0 4px 0",fontSize:"20px",fontWeight:800,color:"#0f172a"},children:r.feedbackHeader}),t.jsx("p",{"data-vg-id":"1000df33","data-source-path":"/src/components/ViewGateOverlay.tsx:2451",style:{margin:0,color:"#64748b",fontSize:"14px"},children:r.feedbackSubheader})]}),t.jsxs("div",{"data-vg-id":"17fbff3","data-source-path":"/src/components/ViewGateOverlay.tsx:2455",className:"vg-custom-scrollbar",style:{flex:1,overflowY:"auto",padding:"24px",display:"flex",flexDirection:"column"},children:[I.visualPreview&&t.jsx("div",{"data-vg-id":"17fbff4","data-source-path":"/src/components/ViewGateOverlay.tsx:2464",style:{marginBottom:"24px",borderRadius:"12px",width:"fit-content",maxWidth:"100%",maxHeight:"45vh",alignSelf:"center",overflow:"hidden",display:"flex"},children:t.jsx("img",{src:I.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"45vh",objectFit:"contain",display:"block"}})}),t.jsx("textarea",{className:"vg-textarea",value:ae,onChange:a=>D(a.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px",minHeight:"120px"}}),t.jsxs("div",{"data-vg-id":"17fbff5","data-source-path":"/src/components/ViewGateOverlay.tsx:2498",style:{marginBottom:"24px"},children:[t.jsx("label",{"data-vg-id":"18bd4b33","data-source-path":"/src/components/ViewGateOverlay.tsx:2499",style:{fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",display:"block"},children:r.priority}),t.jsx("div",{"data-vg-id":"17fbff7","data-source-path":"/src/components/ViewGateOverlay.tsx:2502",style:{display:"flex",gap:"8px"},children:["low","medium","high","urgent"].map(a=>t.jsx("button",{onClick:()=>C(a),style:{flex:1,padding:"12px 6px",borderRadius:"8px",fontSize:"13px",fontWeight:700,border:"1px solid",borderColor:V===a?a==="low"?"#10b981":a==="medium"?"#6366f1":a==="high"?"#f59e0b":"#ef4444":"#e2e8f0",backgroundColor:V===a?a==="low"?"#ecfdf5":a==="medium"?"#eef2ff":a==="high"?"#fffbeb":"#fef2f2":"white",color:V===a?a==="low"?"#059669":a==="medium"?"#4338ca":a==="high"?"#b45309":"#b91c1c":"#64748b",cursor:"pointer",transition:"all 0.2s",textTransform:"uppercase"},children:r[a]},a))})]}),t.jsxs("div",{"data-vg-id":"17fbff8","data-source-path":"/src/components/ViewGateOverlay.tsx:2529",style:{marginBottom:"24px"},children:[t.jsx("label",{"data-vg-id":"18bd4b36","data-source-path":"/src/components/ViewGateOverlay.tsx:2530",style:{fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",display:"block"},children:r.focusAreas}),t.jsx("div",{"data-vg-id":"17fbffa","data-source-path":"/src/components/ViewGateOverlay.tsx:2533",style:{display:"flex",gap:"8px",marginBottom:M.length>0?"12px":"0"},children:[{id:"frontend",label:r.frontend,icon:t.jsx(zt,{"data-vg-id":"377c172e","data-source-path":"/src/components/ViewGateOverlay.tsx:2535",size:14}),color:"#10b981",bg:"#ecfdf5",border:"#d1fae5"},{id:"backend",label:r.backend,icon:t.jsx(Be,{"data-vg-id":"7117e5d5","data-source-path":"/src/components/ViewGateOverlay.tsx:2536",size:14}),color:"#6366f1",bg:"#eef2ff",border:"#e0e7ff"},{id:"ux",label:r.ux,icon:t.jsx(vt,{"data-vg-id":"de42479a","data-source-path":"/src/components/ViewGateOverlay.tsx:2537",size:14}),color:"#d946ef",bg:"#fdf4ff",border:"#f5d0fe"}].filter(a=>a.id==="backend"?Yt:a.id==="ux"?R:!0).map(a=>{const n=M.includes(a.id);return t.jsxs("button",{onClick:()=>{n?de(M.filter(d=>d!==a.id)):(de([...M,a.id]),a.id==="backend"&&Va())},style:{flex:1,padding:"10px 4px",borderRadius:"8px",fontSize:"12px",fontWeight:700,border:"1px solid",borderColor:n?a.color:"#e2e8f0",backgroundColor:n?a.bg:"white",color:n?a.color:"#64748b",cursor:"pointer",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[a.icon,a.label]},a.id)})}),M.includes("ux")&&t.jsxs("div",{"data-vg-id":"17fc013","data-source-path":"/src/components/ViewGateOverlay.tsx:2584",className:"vg-animate-slide",style:{marginBottom:"16px"},children:[t.jsxs("div",{"data-vg-id":"17fc014","data-source-path":"/src/components/ViewGateOverlay.tsx:2585",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[t.jsxs("div",{"data-vg-id":"17fc015","data-source-path":"/src/components/ViewGateOverlay.tsx:2586",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx(Pt,{"data-vg-id":"38884e11","data-source-path":"/src/components/ViewGateOverlay.tsx:2587",size:14,style:{color:"#d946ef"}}),t.jsx("span",{"data-vg-id":"52d76ce2","data-source-path":"/src/components/ViewGateOverlay.tsx:2588",style:{fontSize:"11px",fontWeight:800,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em"},children:r.figmaLink})]}),t.jsxs("button",{"data-vg-id":"23e21f7b","data-source-path":"/src/components/ViewGateOverlay.tsx:2592",onClick:()=>re([...H,{name:"",link:""}]),style:{background:"rgba(217, 70, 239, 0.1)",border:"1px solid rgba(217, 70, 239, 0.2)",color:"#d946ef",borderRadius:"6px",padding:"4px 8px",fontSize:"10px",fontWeight:800,display:"flex",alignItems:"center",gap:"4px",cursor:"pointer",transition:"all 0.2s"},onMouseEnter:a=>a.currentTarget.style.background="rgba(217, 70, 239, 0.15)",onMouseLeave:a=>a.currentTarget.style.background="rgba(217, 70, 239, 0.1)",children:[t.jsx(zo,{"data-vg-id":"11a60c74","data-source-path":"/src/components/ViewGateOverlay.tsx:2611",size:10})," ",r.addLink]})]}),t.jsx("div",{"data-vg-id":"17fc01a","data-source-path":"/src/components/ViewGateOverlay.tsx:2615",style:{display:"flex",flexDirection:"column",gap:"8px"},children:H.map((a,n)=>t.jsxs("div",{"data-vg-id":"17fc030","data-source-path":"/src/components/ViewGateOverlay.tsx:2617",style:{display:"flex",gap:"6px",alignItems:"flex-start"},className:"vg-animate-slide",children:[t.jsxs("div",{"data-vg-id":"17fc031","data-source-path":"/src/components/ViewGateOverlay.tsx:2618",style:{flex:1,display:"flex",flexDirection:"column",gap:"4px"},children:[t.jsx("input",{"data-vg-id":"a993bad9","data-source-path":"/src/components/ViewGateOverlay.tsx:2619",type:"text",className:"vg-textarea",style:{padding:"8px 10px",fontSize:"11px",minHeight:"auto",borderRadius:"8px",border:"1px solid rgba(0,0,0,0.05)"},placeholder:r.figmaNamePlaceholder,value:a.name,onChange:d=>{const f=[...H];f[n]&&(f[n].name=d.target.value,re(f))}}),t.jsx("input",{"data-vg-id":"a993bada","data-source-path":"/src/components/ViewGateOverlay.tsx:2633",type:"text",className:"vg-textarea",style:{padding:"8px 10px",fontSize:"11px",minHeight:"auto",borderRadius:"8px",border:"1px solid rgba(0,0,0,0.05)"},placeholder:r.figmaLinkPlaceholder,value:a.link,onChange:d=>{const f=[...H];f[n]&&(f[n].link=d.target.value,re(f))}})]}),H.length>1&&t.jsx("button",{"data-vg-id":"23e21f97","data-source-path":"/src/components/ViewGateOverlay.tsx:2649",onClick:()=>re(H.filter((d,f)=>f!==n)),style:{background:"rgba(239, 68, 68, 0.05)",border:"1px solid rgba(239, 68, 68, 0.1)",color:"#ef4444",borderRadius:"8px",padding:"10px",cursor:"pointer",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:d=>d.currentTarget.style.background="rgba(239, 68, 68, 0.1)",onMouseLeave:d=>d.currentTarget.style.background="rgba(239, 68, 68, 0.05)",children:t.jsx(Wt,{"data-vg-id":"e1375db0","data-source-path":"/src/components/ViewGateOverlay.tsx:2666",size:14})})]},n))})]}),je.length>0&&M.includes("backend")&&t.jsxs("div",{"data-vg-id":"17fc036","data-source-path":"/src/components/ViewGateOverlay.tsx:2678",className:"vg-animate-slide",style:{marginBottom:"16px"},children:[t.jsxs("div",{"data-vg-id":"17fc037","data-source-path":"/src/components/ViewGateOverlay.tsx:2679",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[t.jsxs("div",{"data-vg-id":"17fc038","data-source-path":"/src/components/ViewGateOverlay.tsx:2680",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx(Be,{"data-vg-id":"7117e5fd","data-source-path":"/src/components/ViewGateOverlay.tsx:2681",size:14,style:{color:"#6366f1"}}),t.jsx("span",{"data-vg-id":"52d76d1a","data-source-path":"/src/components/ViewGateOverlay.tsx:2682",style:{fontSize:"11px",fontWeight:700,color:"#64748b"},children:r.endpoint})]}),L.length>0&&t.jsxs("span",{"data-vg-id":"52d76d1b","data-source-path":"/src/components/ViewGateOverlay.tsx:2685",style:{fontSize:"10px",background:"#eef2ff",color:"#6366f1",padding:"2px 8px",borderRadius:"12px",fontWeight:700},children:[L.length," ",s==="es"?"seleccionados":"selected"]})]}),t.jsxs("button",{"data-vg-id":"23e21fb4","data-source-path":"/src/components/ViewGateOverlay.tsx:2691",onClick:()=>P(!0),className:"vg-input-like-button",style:{width:"100%",padding:"12px 16px",fontSize:"13px",borderRadius:"12px",background:"#f8fafc",border:"1px solid #e2e8f0",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s",textAlign:"left",color:L.length>0?"#0f172a":"#94a3b8"},children:[t.jsx("div",{"data-vg-id":"17fc052","data-source-path":"/src/components/ViewGateOverlay.tsx:2710",style:{display:"flex",gap:"4px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:L.length>0?L.slice(0,2).map(a=>{const n=a.split("|"),d=n.length>1?n[0]:"",f=n.length>1?n[1]:a;return t.jsxs("span",{"data-vg-id":"52d76d1e","data-source-path":"/src/components/ViewGateOverlay.tsx:2717",style:{background:"rgba(99, 102, 241, 0.1)",color:"#6366f1",padding:"1px 6px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[d&&t.jsx("span",{"data-vg-id":"52d76d1f","data-source-path":"/src/components/ViewGateOverlay.tsx:2725",style:{opacity:.6,marginRight:"4px"},children:d}),(f||"").split("/").pop()||f]},a)}).concat(L.length>2?[t.jsxs("span",{"data-vg-id":"52d76d20","data-source-path":"/src/components/ViewGateOverlay.tsx:2729",children:["+",L.length-2]},"more")]:[]):r.selectEndpoint}),t.jsx(cs,{"data-vg-id":"c71f9a0a","data-source-path":"/src/components/ViewGateOverlay.tsx:2732",size:14,style:{color:"#64748b"}})]})]})]})]}),t.jsxs("div",{"data-vg-id":"17fc057","data-source-path":"/src/components/ViewGateOverlay.tsx:2741",style:{padding:"16px 24px 24px",borderTop:"1px solid rgba(0,0,0,0.05)",display:"flex",gap:"12px",flexShrink:0,backgroundColor:"rgba(255,255,255,0.02)",backdropFilter:"blur(2px)"},children:[t.jsx("button",{onClick:()=>{oe||(J(null),k(!1))},className:"vg-button-ghost",disabled:oe,style:{flex:1,padding:"12px"},children:r.cancel}),t.jsx("button",{onClick:hr,className:"vg-button-primary",disabled:oe||!ae.trim()||M.includes("backend")&&L.length===0||M.includes("ux")&&H.some(a=>!a.name.trim()||!a.link.trim()),style:{flex:2,opacity:oe||!ae.trim()||M.includes("backend")&&L.length===0||M.includes("ux")&&H.some(a=>!a.name.trim()||!a.link.trim())?.6:1,cursor:oe||!ae.trim()||M.includes("backend")&&L.length===0||M.includes("ux")&&H.some(a=>!a.name.trim()||!a.link.trim())?"not-allowed":"pointer"},children:t.jsxs("div",{"data-vg-id":"17fc058","data-source-path":"/src/components/ViewGateOverlay.tsx:2778",style:{display:"flex",alignItems:"center",gap:"8px"},children:[oe?t.jsx("div",{"data-vg-id":"17fc06e","data-source-path":"/src/components/ViewGateOverlay.tsx:2779",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):t.jsx(Mo,{"data-vg-id":"a3fd5c1c","data-source-path":"/src/components/ViewGateOverlay.tsx:2779",size:18}),t.jsx("span",{"data-vg-id":"52d76d3b","data-source-path":"/src/components/ViewGateOverlay.tsx:2780",children:oe?r.submitting:r.sendFeedback||"Send Comment"})]})})]})]})}),fe&&t.jsx("div",{"data-vg-id":"17fc071","data-source-path":"/src/components/ViewGateOverlay.tsx:2791",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je},children:t.jsxs("div",{"data-vg-id":"17fc072","data-source-path":"/src/components/ViewGateOverlay.tsx:2797",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"820px",maxHeight:"85vh",display:"flex",flexDirection:"column",transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[t.jsxs("div",{"data-vg-id":"17fc073","data-source-path":"/src/components/ViewGateOverlay.tsx:2802",style:{display:"flex",flexDirection:"column",gap:"16px",marginBottom:"24px"},children:[t.jsxs("div",{"data-vg-id":"17fc074","data-source-path":"/src/components/ViewGateOverlay.tsx:2803",style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsx("h2",{"data-vg-id":"efa6bc40","data-source-path":"/src/components/ViewGateOverlay.tsx:2804",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a",whiteSpace:"nowrap"},children:K?r.commentDetails:r.annotations}),t.jsxs("div",{"data-vg-id":"17fc076","data-source-path":"/src/components/ViewGateOverlay.tsx:2807",style:{display:"flex",alignItems:"center",gap:"12px"},children:[ne?t.jsxs("div",{"data-vg-id":"17fc077","data-source-path":"/src/components/ViewGateOverlay.tsx:2809",style:{display:"flex",alignItems:"center",gap:"8px",padding:"4px 12px",background:"rgba(99, 102, 241, 0.1)",borderRadius:"20px"},children:[ne.avatar?t.jsx("img",{"data-vg-id":"3cf759ac","data-source-path":"/src/components/ViewGateOverlay.tsx:2811",src:ne.avatar,style:{width:"20px",height:"20px",borderRadius:"50%"},alt:""}):t.jsx("div",{"data-vg-id":"2e782f7b","data-source-path":"/src/components/ViewGateOverlay.tsx:2813",style:{width:"20px",height:"20px",borderRadius:"50%",background:"#6366f1",color:"white",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center"},children:ne.name?.[0]}),t.jsx("span",{"data-vg-id":"8161c11","data-source-path":"/src/components/ViewGateOverlay.tsx:2817",style:{fontSize:"12px",fontWeight:600,color:"#4338ca"},children:ne.name})]}):t.jsx("div",{"data-vg-id":"2e782f7d","data-source-path":"/src/components/ViewGateOverlay.tsx:2824",style:{fontSize:"12px",color:"#64748b",fontWeight:600},children:s==="es"?"Sin usuario":"No user selected"}),t.jsx("button",{className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{Ae(!1),We(null),Qt(null),ue("all")},children:t.jsx(yt,{"data-vg-id":"eec8c445","data-source-path":"/src/components/ViewGateOverlay.tsx:2833",size:20})})]})]}),t.jsx("div",{"data-vg-id":"2e782f7f","data-source-path":"/src/components/ViewGateOverlay.tsx:2837",style:{display:"flex",flexDirection:"column",gap:"8px",alignItems:"center",width:"100%"},children:(()=>{const a=Array.isArray(te)?te:[],n=K?nt.find(O=>O.annotations?.some($=>$._id===K)):null,f=(n?n.annotations:a).filter(O=>O.status!=="completed"&&O.status!=="done"),y=f.filter(O=>O.status!=="ready_for_review").length,S=f.filter(O=>O.status==="ready_for_review").length,E=f.length;return E<=0?E===0?null:t.jsxs("div",{"data-vg-id":"2e782f80","data-source-path":"/src/components/ViewGateOverlay.tsx:2851",style:{display:"flex",gap:"8px",opacity:.9},children:[y>0&&t.jsxs("div",{"data-vg-id":"2e782f81","data-source-path":"/src/components/ViewGateOverlay.tsx:2853",className:"vg-badge",style:{background:"#fff7ed",color:"#c2410c",border:"1px solid #ffedd5",fontSize:"11px",padding:"2px 8px"},children:[y," ",y===1?"pendiente":"pendientes"]}),S>0&&t.jsxs("div",{"data-vg-id":"2e782f82","data-source-path":"/src/components/ViewGateOverlay.tsx:2858",className:"vg-badge",style:{background:"#f3e8ff",color:"#a855f7",border:"1px solid #e9d5ff",fontSize:"11px",padding:"2px 8px"},children:[S," ",s==="es"?S===1?"Listo para revisión":"Listos para revisión":"ready for review"]})]}):t.jsxs(t.Fragment,{children:[!m&&t.jsxs("div",{"data-vg-id":"2e782f83","data-source-path":"/src/components/ViewGateOverlay.tsx:2869",className:"vg-segmented-control",style:{marginBottom:"4px"},children:[t.jsx("div",{className:"vg-segmented-slider",style:{left:ie===null?"4px":ie==="pending"?"calc(4px + (100% - 8px) / 3)":"calc(4px + 2 * (100% - 8px) / 3)",width:"calc((100% - 8px) / 3)",background:ie===null?"var(--vg-primary)":ie==="pending"?"#ea580c":"#a855f7",boxShadow:ie===null?"0 4px 12px rgba(99, 102, 241, 0.3)":ie==="pending"?"0 4px 12px rgba(234, 88, 12, 0.3)":"0 4px 12px rgba(168, 85, 247, 0.3)"}}),t.jsxs("div",{onClick:()=>Qt(null),className:`vg-segmented-item ${ie===null?"active":""}`,children:[r.viewAll||"Todos"," (",E,")"]}),t.jsxs("div",{onClick:()=>Qt("pending"),className:`vg-segmented-item ${ie==="pending"?"active":""}`,children:[s==="es"?y===1?"Pendiente":"Pendientes":"Pending"," (",y,")"]}),t.jsxs("div",{onClick:()=>Qt("ready"),className:`vg-segmented-item ${ie==="ready"?"active":""}`,children:[s==="es"?"Listo para revisión":"Ready for Review"," (",S,")"]})]}),t.jsxs("div",{"data-vg-id":"2e782f99","data-source-path":"/src/components/ViewGateOverlay.tsx:2900",style:{display:"flex",gap:"6px",justifyContent:"center",flexWrap:"wrap",marginTop:m?"0":"4px"},children:[t.jsxs("button",{onClick:()=>ue("all"),style:{padding:"8px 16px",borderRadius:"20px",fontSize:"12px",fontWeight:700,border:"1px solid",borderColor:v==="all"?"var(--vg-primary)":"#e2e8f0",backgroundColor:v==="all"?"var(--vg-primary)":"transparent",color:v==="all"?"white":"#64748b",cursor:"pointer",transition:"all 0.2s"},children:[r.viewAll||"Todos"," (",f.filter(O=>m?!0:ie==="pending"?O.status!=="ready_for_review":ie==="ready"?O.status==="ready_for_review":!0).length,")"]}),["low","medium","high","urgent"].map(O=>{const $=f.filter(G=>m?!0:ie==="pending"?G.status!=="ready_for_review":ie==="ready"?G.status==="ready_for_review":!0).filter(G=>(G.priority||"medium")===O).length;return $===0&&v!==O?null:t.jsxs("button",{onClick:()=>ue(O),style:{padding:"8px 16px",borderRadius:"20px",fontSize:"12px",fontWeight:700,border:"1px solid",borderColor:v===O?O==="low"?"#10b981":O==="medium"?"#6366f1":O==="high"?"#f59e0b":"#ef4444":"#e2e8f0",backgroundColor:v===O?O==="low"?"#ecfdf5":O==="medium"?"#eef2ff":O==="high"?"#fffbeb":"#fef2f2":"transparent",color:v===O?O==="low"?"#059669":O==="medium"?"#4338ca":O==="high"?"#b45309":"#b91c1c":"#64748b",cursor:"pointer",transition:"all 0.2s",textTransform:"uppercase"},children:[r[O]," (",$,")"]},O)})]})]})})()})]}),t.jsx("div",{style:{flex:1,overflowY:"auto",paddingRight:"10px",overflowX:"hidden"},className:"vg-custom-scrollbar",children:$e?t.jsx("div",{"data-vg-id":"2e782f9a","data-source-path":"/src/components/ViewGateOverlay.tsx:2966",style:{display:"flex",justifyContent:"center",padding:"40px"},children:t.jsx("div",{"data-vg-id":"2e782f9b","data-source-path":"/src/components/ViewGateOverlay.tsx:2967",className:"vg-spinner"})}):_a.map((a,n)=>t.jsxs("div",{className:"vg-glassmorphism vg-animate-slide",style:{padding:"20px",marginBottom:"16px",border:"1px solid rgba(0,0,0,0.05)",background:"rgba(255,255,255,0.5)",animationDelay:`${n*.05}s`},children:[t.jsxs("div",{"data-vg-id":"2e782f9c","data-source-path":"/src/components/ViewGateOverlay.tsx:2982",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:[t.jsxs("div",{"data-vg-id":"2e782f9d","data-source-path":"/src/components/ViewGateOverlay.tsx:2983",style:{display:"flex",gap:"12px",alignItems:"center"},children:[t.jsx("span",{"data-vg-id":"8161c33","data-source-path":"/src/components/ViewGateOverlay.tsx:2984",style:{fontSize:"12px",color:"#000000",fontWeight:600},children:ms(a.timestamp||a.createdAt||a.reference?.timestamp,s)}),t.jsx("div",{"data-vg-id":"2e782f9f","data-source-path":"/src/components/ViewGateOverlay.tsx:2987",onClick:d=>{d.stopPropagation();const f=a.key||`VG-${a._id.slice(-6).toUpperCase()}`;navigator.clipboard.writeText(f);const y=d.currentTarget;y.innerText="¡Copiado!",y.style.color="#22c55e",setTimeout(()=>{y.innerText=f,y.style.color=m?"#64748b":"#6366f1"},1500)},style:{fontSize:"10px",fontFamily:"monospace",color:m?"#64748b":"#6366f1",background:m?"rgba(100, 116, 139, 0.1)":"rgba(99, 102, 241, 0.1)",padding:"2px 6px",borderRadius:"4px",cursor:"pointer",fontWeight:900,transition:"all 0.2s"},title:s==="es"?"Click para copiar":"Click to copy",children:a.key||`VG-${a._id.slice(-6).toUpperCase()}`}),a.reference?.metadata?.isModal&&t.jsx("span",{"data-vg-id":"8161c35","data-source-path":"/src/components/ViewGateOverlay.tsx:3016",className:"vg-badge",style:{fontSize:"10px",background:m?"#f1f5f9":a.status==="completed"||a.status==="done"?"#ecfdf5":a.status==="ready_for_review"?"#f3e8ff":"#fef3c7",color:m?"#64748b":a.status==="completed"||a.status==="done"?"#059669":a.status==="ready_for_review"?"#a855f7":"#92400e",border:"none",padding:"2px 6px"},children:"MODAL"}),a.creator&&t.jsx("div",{"data-vg-id":"2e782fa1","data-source-path":"/src/components/ViewGateOverlay.tsx:3025",style:{display:"flex",alignItems:"center",background:"#f8fafc",padding:"2px",borderRadius:"50%",border:"1px solid #e2e8f0",marginLeft:"4px"},children:a.creator.avatar?t.jsx("img",{"data-vg-id":"3cf759d4","data-source-path":"/src/components/ViewGateOverlay.tsx:3035",src:a.creator.avatar,style:{width:"16px",height:"16px",borderRadius:"50%"},alt:""}):t.jsx("div",{"data-vg-id":"2e782fb8","data-source-path":"/src/components/ViewGateOverlay.tsx:3037",style:{width:"16px",height:"16px",borderRadius:"50%",background:"#6366f1",color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"8px",fontWeight:700},children:a.creator.name?.[0]})}),a.url&&t.jsx(hs,{url:a.url,onHover:Gs,style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"11px",color:"#64748b",background:"#f8fafc",padding:"2px 8px",borderRadius:"6px",border:"1px solid #e2e8f0",maxWidth:"220px"}}),(a.focusAreas?.length>0?a.focusAreas:[...a.backendEndpoints?.length>0?["backend"]:[],...a.figmaReference?.length>0?["ux"]:[]]).map(d=>t.jsxs("span",{"data-vg-id":"8161c4e","data-source-path":"/src/components/ViewGateOverlay.tsx:3063",style:{fontSize:"10px",fontWeight:800,textTransform:"uppercase",padding:"4px 10px",borderRadius:"24px",background:d==="frontend"?"linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%)":d==="backend"?"linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%)":"linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%)",color:d==="frontend"?"#059669":d==="backend"?"#4f46e5":"#c026d3",display:"flex",alignItems:"center",gap:"4px",border:`1px solid ${d==="frontend"?"#a7f3d0":d==="backend"?"#c7d2fe":"#fbcfe8"}`,boxShadow:d==="frontend"?"0 2px 4px rgba(5, 150, 105, 0.05)":d==="backend"?"0 2px 4px rgba(79, 70, 229, 0.05)":"0 2px 4px rgba(192, 38, 211, 0.05)",letterSpacing:"0.02em"},children:[d==="frontend"?t.jsx(zt,{"data-vg-id":"b806bee7","data-source-path":"/src/components/ViewGateOverlay.tsx:3071",size:11,strokeWidth:2.5}):d==="backend"?t.jsx(Be,{"data-vg-id":"b1e4c277","data-source-path":"/src/components/ViewGateOverlay.tsx:3071",size:11,strokeWidth:2.5}):t.jsx(vt,{"data-vg-id":"ea069934","data-source-path":"/src/components/ViewGateOverlay.tsx:3071",size:11,strokeWidth:2.5}),d==="frontend"?"Frontend":d==="backend"?"Backend":"UX / UI"]},d))]}),a.status==="completed"?t.jsxs("span",{"data-vg-id":"8161c52","data-source-path":"/src/components/ViewGateOverlay.tsx:3077",className:"vg-badge",style:{backgroundColor:"#ecfdf5",color:"#059669",border:"1px solid #d1fae5"},children:[t.jsx(Ke,{"data-vg-id":"a75c1a63","data-source-path":"/src/components/ViewGateOverlay.tsx:3078",size:14})," ",r.completed||(s==="es"?"Listo para revisión":"Ready for Review")]}):a.status==="ready_for_review"?t.jsxs("span",{"data-vg-id":"8161c54","data-source-path":"/src/components/ViewGateOverlay.tsx:3081",className:"vg-badge",style:{backgroundColor:"#f3e8ff",color:"#a855f7",border:"1px solid #e9d5ff"},children:[t.jsx(Ke,{"data-vg-id":"a75c1a65","data-source-path":"/src/components/ViewGateOverlay.tsx:3082",size:14})," ",r.readyForReview]}):a.status==="bug_fixing"?t.jsxs("span",{"data-vg-id":"8161c56","data-source-path":"/src/components/ViewGateOverlay.tsx:3085",className:"vg-badge",style:{backgroundColor:"#fff1f2",color:"#e11d48",border:"1px solid #ffe4e6"},children:[t.jsx(xt,{"data-vg-id":"3b8b181a","data-source-path":"/src/components/ViewGateOverlay.tsx:3086",size:14})," ","Bug Fixing"]}):t.jsxs("span",{"data-vg-id":"8161c6d","data-source-path":"/src/components/ViewGateOverlay.tsx:3089",className:"vg-badge",style:{backgroundColor:m||a.status==="backlog"?"#f1f5f9":"#fff7ed",color:m||a.status==="backlog"?"#64748b":"#ea580c",border:m||a.status==="backlog"?"1px solid #e2e8f0":"1px solid #ffedd5"},children:[t.jsx(ds,{"data-vg-id":"62dc6c36","data-source-path":"/src/components/ViewGateOverlay.tsx:3094",size:14}),m||a.status==="backlog"?r.backlog:r.pending]})]}),(a.screenshot||a.reference?.previewUrl)&&t.jsx("div",{"data-vg-id":"2e782fda","data-source-path":"/src/components/ViewGateOverlay.tsx:3101",style:{margin:"0 0 20px 0",borderRadius:"8px",overflow:"hidden",width:"fit-content",maxWidth:"100%",maxHeight:"280px",alignSelf:"center",display:"flex"},children:t.jsx("img",{"data-vg-id":"3cf75a0d","data-source-path":"/src/components/ViewGateOverlay.tsx:3111",src:a.screenshot||a.reference?.previewUrl,alt:"Visual Preview",style:{maxWidth:"100%",maxHeight:"280px",objectFit:"contain",display:"block"}})}),t.jsxs("div",{"data-vg-id":"2e782fdc","data-source-path":"/src/components/ViewGateOverlay.tsx:3124",style:{marginBottom:"20px"},children:[t.jsx("div",{"data-vg-id":"2e782fdd","data-source-path":"/src/components/ViewGateOverlay.tsx:3125",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:t.jsxs("div",{"data-vg-id":"2e782fde","data-source-path":"/src/components/ViewGateOverlay.tsx:3126",style:{fontSize:"10px",fontWeight:800,color:a.priority==="low"?"#059669":a.priority==="urgent"?"#b91c1c":a.priority==="high"?"#b45309":"#4338ca",backgroundColor:a.priority==="low"?"#ecfdf5":a.priority==="urgent"?"#fef2f2":a.priority==="high"?"#fffbeb":"#eef2ff",padding:"4px 10px",borderRadius:"6px",letterSpacing:"0.5px",border:"1px solid",borderColor:a.priority==="low"?"#d1fae5":a.priority==="urgent"?"#fee2e2":a.priority==="high"?"#fef3c7":"#e0e7ff"},children:[r.priority,": ",r[a.priority||"medium"]]})}),t.jsx("p",{"data-vg-id":"f01af8be","data-source-path":"/src/components/ViewGateOverlay.tsx:3140",className:"vg-text-wrap",style:{margin:"0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:a.message}),a.figmaReference?.length>0&&t.jsxs("div",{"data-vg-id":"2e782fe0","data-source-path":"/src/components/ViewGateOverlay.tsx:3145",style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px",padding:"12px",background:"#faf5ff",borderRadius:"12px",border:"1px solid #fae8ff"},children:[t.jsxs("div",{"data-vg-id":"2e782ff6","data-source-path":"/src/components/ViewGateOverlay.tsx:3146",style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:"4px"},children:[t.jsx(vt,{"data-vg-id":"ea06996f","data-source-path":"/src/components/ViewGateOverlay.tsx:3147",size:14,style:{color:"#d946ef"}}),t.jsx("span",{"data-vg-id":"8161c8d","data-source-path":"/src/components/ViewGateOverlay.tsx:3148",style:{fontSize:"11px",fontWeight:800,color:"#a21caf",textTransform:"uppercase",letterSpacing:"0.05em"},children:s==="es"?"Diseños Figma":"Figma Designs"})]}),a.figmaReference.map((d,f)=>t.jsxs("a",{"data-vg-id":"ef479849","data-source-path":"/src/components/ViewGateOverlay.tsx:3151",href:d.link,target:"_blank",rel:"noreferrer",className:"vg-animate-pop",style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 14px",background:"#ffffff",border:"1px solid #f5d0fe",borderRadius:"10px",fontSize:"13px",color:"#c026d3",textDecoration:"none",transition:"all 0.2s",boxShadow:"0 2px 4px rgba(217, 70, 239, 0.05)"},onMouseEnter:y=>{y.currentTarget.style.transform="translateY(-2px)",y.currentTarget.style.boxShadow="0 4px 12px rgba(217, 70, 239, 0.15)",y.currentTarget.style.borderColor="#d946ef"},onMouseLeave:y=>{y.currentTarget.style.transform="translateY(0)",y.currentTarget.style.boxShadow="0 2px 4px rgba(217, 70, 239, 0.05)",y.currentTarget.style.borderColor="#f5d0fe"},children:[t.jsxs("div",{"data-vg-id":"2e782ffa","data-source-path":"/src/components/ViewGateOverlay.tsx:3159",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t.jsx("div",{"data-vg-id":"2e782ffb","data-source-path":"/src/components/ViewGateOverlay.tsx:3160",style:{width:"24px",height:"24px",borderRadius:"6px",background:"rgba(217, 70, 239, 0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(zt,{"data-vg-id":"b806bf29","data-source-path":"/src/components/ViewGateOverlay.tsx:3161",size:12,strokeWidth:3})}),t.jsx("span",{"data-vg-id":"8161c92","data-source-path":"/src/components/ViewGateOverlay.tsx:3163",style:{fontWeight:700},children:d.name||"Figma Reference"})]}),t.jsx(wa,{"data-vg-id":"5c2be04e","data-source-path":"/src/components/ViewGateOverlay.tsx:3165",size:14,style:{opacity:.5}})]},f))]}),a.backendEndpoints?.length>0&&t.jsxs("div",{"data-vg-id":"2e782fff","data-source-path":"/src/components/ViewGateOverlay.tsx:3172",style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px",padding:"12px",background:"#f5f8ff",borderRadius:"12px",border:"1px solid #e0e7ff"},children:[t.jsxs("div",{"data-vg-id":"2e783015","data-source-path":"/src/components/ViewGateOverlay.tsx:3173",style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:"4px"},children:[t.jsx(Be,{"data-vg-id":"b1e4c2d2","data-source-path":"/src/components/ViewGateOverlay.tsx:3174",size:14,style:{color:"#4f46e5"}}),t.jsx("span",{"data-vg-id":"8161cac","data-source-path":"/src/components/ViewGateOverlay.tsx:3175",style:{fontSize:"11px",fontWeight:800,color:"#3730a3",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Backend Endpoints"})]}),t.jsx("div",{"data-vg-id":"2e783018","data-source-path":"/src/components/ViewGateOverlay.tsx:3177",style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:a.backendEndpoints.map(d=>{const f=d.split("|"),y=f.length>1?f[0]:"";let S=f.length>1?f[1]||"":d||"",E="#4f46e5",O="#e0e7ff";return y==="GET"?(E="#059669",O="#d1fae5"):y==="POST"?(E="#ea580c",O="#ffedd5"):y==="PUT"?(E="#0284c7",O="#e0f2fe"):y==="DELETE"&&(E="#e11d48",O="#ffe4e6"),t.jsxs("div",{"data-vg-id":"2e783019","data-source-path":"/src/components/ViewGateOverlay.tsx:3192",className:"vg-animate-slide",style:{fontSize:"12px",padding:"6px 12px",background:"#ffffff",color:"#4f46e5",borderRadius:"8px",border:"1px solid #c7d2fe",display:"flex",alignItems:"center",gap:"8px",boxShadow:"0 2px 4px rgba(79, 70, 229, 0.05)"},children:[y&&t.jsx("span",{"data-vg-id":"8161caf","data-source-path":"/src/components/ViewGateOverlay.tsx:3198",style:{fontWeight:800,color:E,background:O,padding:"2px 6px",borderRadius:"4px",fontSize:"10px"},children:y}),t.jsx("span",{"data-vg-id":"8161cb0","data-source-path":"/src/components/ViewGateOverlay.tsx:3199",style:{fontWeight:600,fontFamily:"monospace",letterSpacing:"-0.02em",color:"#1e293b"},children:S})]},d)})})]})]}),t.jsxs("div",{"data-vg-id":"2e78301c","data-source-path":"/src/components/ViewGateOverlay.tsx:3209",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"12px",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:[t.jsx("div",{"data-vg-id":"2e78301d","data-source-path":"/src/components/ViewGateOverlay.tsx:3211",style:{display:"flex",gap:"6px"},children:Ot!=="client"&&t.jsxs(t.Fragment,{children:[t.jsx("button",{className:"vg-button-ghost vg-animate-pop",style:{padding:"8px",minWidth:"36px"},onClick:()=>{const d=a.backendEndpoints||[],f=a.focusAreas&&a.focusAreas.length>0?a.focusAreas:[...d.length>0?["backend"]:[],...a.figmaReference&&a.figmaReference.length>0?["ux"]:[]];qt(a._id),Ms(a.message),_(a.priority||"medium"),Ra(f),Rt(a.figmaReference&&a.figmaReference.length>0?a.figmaReference:[{name:r.figmaPrimaryDesign,link:""}]),$t(d),ke(d)},title:r.edit,children:t.jsx(vt,{"data-vg-id":"ea069996","data-source-path":"/src/components/ViewGateOverlay.tsx:3235",size:16})}),t.jsx("button",{className:"vg-button-ghost vg-animate-pop",style:{padding:"8px",minWidth:"36px",color:"#ef4444"},onClick:()=>{W({title:r.deleteConfirm,message:r.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${c}/api/annotations/${a._id}`,{method:"DELETE",headers:{"x-api-key":i}})).ok&&(Zt(),o(r.deleteSuccess,"success"))}catch{o(r.error,"error")}finally{W(null)}}})},title:s==="es"?"Eliminar":"Delete",children:t.jsx(Wt,{"data-vg-id":"45b44219","data-source-path":"/src/components/ViewGateOverlay.tsx:3265",size:16})})]})}),t.jsxs("div",{"data-vg-id":"2e783035","data-source-path":"/src/components/ViewGateOverlay.tsx:3271",style:{display:"flex",gap:"8px"},children:[Ot!=="client"&&a.status==="ready_for_review"&&t.jsxs("button",{onClick:()=>xr(a),className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",whiteSpace:"nowrap",background:"linear-gradient(135deg, #059669 0%, #10b981 100%)",boxShadow:"0 4px 12px rgba(5, 150, 69, 0.2)",display:"flex",alignItems:"center",gap:"8px",fontWeight:700},disabled:Le,children:[Le?t.jsx(Mt,{"data-vg-id":"a4b73604","data-source-path":"/src/components/ViewGateOverlay.tsx:3289",size:14,className:"vg-animate-spin"}):t.jsx(Ro,{"data-vg-id":"41e603c7","data-source-path":"/src/components/ViewGateOverlay.tsx:3289",size:14}),s==="es"?"Resolver con Evidencia":"Resolve & Capture"]}),t.jsxs("a",{href:`${(l||"").replace(/\/$/,"")}/${m||a.status==="backlog"?"backlog":"board"}?search=${a.key||(a._id?"VG-"+a._id.slice(-6).toUpperCase():"TICKET")}${Oe?`&projectId=${Oe}`:""}`,target:"_blank",rel:"noopener noreferrer",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",whiteSpace:"nowrap",textDecoration:"none",display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"},children:[t.jsx(wa,{"data-vg-id":"5c2be088","data-source-path":"/src/components/ViewGateOverlay.tsx:3309",size:14}),s==="es"?"Ver en Dashboard":"View in Dashboard"]})]})]})]},a._id))},K||"all")]})}),ge&&t.jsx("div",{"data-vg-id":"2e783039","data-source-path":"/src/components/ViewGateOverlay.tsx:3325",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(11, 15, 25, 0.7)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je+100},children:t.jsxs("div",{"data-vg-id":"2e78303a","data-source-path":"/src/components/ViewGateOverlay.tsx:3330",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"420px",textAlign:"center",border:"1px solid rgba(255, 255, 255, 0.1)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.5)"},children:[t.jsx("div",{"data-vg-id":"2e78303b","data-source-path":"/src/components/ViewGateOverlay.tsx:3337",style:{width:"64px",height:"64px",background:ge.type==="danger"?"rgba(239, 68, 68, 0.1)":"rgba(99, 102, 241, 0.1)",borderRadius:"20px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px",color:ge.type==="danger"?"#ef4444":"#6366f1",transform:"rotate(-5deg)"},children:ge.type==="danger"?t.jsx(Wt,{"data-vg-id":"45b44221","data-source-path":"/src/components/ViewGateOverlay.tsx:3346",size:32}):t.jsx(Ke,{"data-vg-id":"a75c1ae2","data-source-path":"/src/components/ViewGateOverlay.tsx:3346",size:32})}),t.jsx("h3",{"data-vg-id":"53ec569","data-source-path":"/src/components/ViewGateOverlay.tsx:3348",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:800,color:"#000000",letterSpacing:"-0.02em"},children:ge.title}),t.jsx("p",{"data-vg-id":"f01af933","data-source-path":"/src/components/ViewGateOverlay.tsx:3349",style:{margin:"0 0 24px 0",fontSize:"15px",color:"#000000",lineHeight:1.6},children:ge.message}),ge.showInput&&t.jsx("textarea",{className:"vg-textarea",placeholder:r.reopenPlaceholder,value:B,onChange:a=>X(a.target.value),rows:3,autoFocus:!0,style:{marginBottom:"24px",minHeight:"80px",textAlign:"left"}}),t.jsxs("div",{"data-vg-id":"2e783055","data-source-path":"/src/components/ViewGateOverlay.tsx:3363",style:{display:"flex",gap:"16px"},children:[t.jsx("button",{className:"vg-button-ghost",style:{flex:1,height:"44px"},onClick:()=>!Ne&&W(null),disabled:Ne,children:r.no}),t.jsx("button",{className:"vg-button-primary",style:{flex:1,height:"44px",backgroundColor:ge.type==="danger"?"#ef4444":void 0,backgroundImage:ge.type==="danger"?"none":void 0,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",opacity:ge.showInput&&!B.trim()?.5:1,cursor:ge.showInput&&!B.trim()?"not-allowed":"pointer"},disabled:Ne||ge.showInput&&!B.trim(),onClick:async()=>{jt(!0);try{await ge.onConfirm(B)}catch(a){console.error("Confirmation error:",a)}finally{jt(!1)}},children:Ne?t.jsx(Mt,{"data-vg-id":"a4b73624","data-source-path":"/src/components/ViewGateOverlay.tsx:3399",size:18,className:"vg-animate-spin"}):r.yes})]})]})}),!fe&&!x&&q&&nt.map((a,n)=>{const{rect:d,annotations:f,isModal:y}=a,S=f[0],E=f.length,O=f.some(w=>w.status==="ready_for_review"),$=f.some(w=>w.status==="completed"||w.status==="done"),G=f.some(w=>w.status!=="ready_for_review"&&w.status!=="completed"&&w.status!=="done"),pe=$&&!O&&!G,ee=O&&!G&&!$,Re=(O||$)&&!G,he=(O||$)&&G,xe=f.filter(w=>w.status!=="ready_for_review"&&w.status!=="completed"&&w.status!=="done").length,be=f.filter(w=>w.status==="ready_for_review").length,we=f.filter(w=>w.status==="completed"||w.status==="done").length,Se=f.some(w=>w.status==="bug_fixing"||w.type==="bug"||w.originalStatus==="bug_fixing"),aa=Se&&!ee&&!pe?"#f43f5e":xe>0?m?"#64748b":"#ea580c":be>0?"#a855f7":"#10b981",pt=nt.some(w=>w.element===a.element&&w.isTriggerPin),Xe=nt.some(w=>w.element===a.element&&!w.isTriggerPin),ft=pt&&Xe?a.isTriggerPin?-18:18:0,Gt=d.top===0&&d.left===0&&d.width>window.innerWidth*.9;return t.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:Math.max(20,Math.min(window.innerHeight-52,d.top-20)),left:Gt?Math.max(20,d.left+40+ft):Math.max(20,Math.min(window.innerWidth-52,d.left+d.width/2-16+ft)),width:"32px",height:"32px",cursor:"pointer",transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:$o},onMouseEnter:w=>{const at=w.currentTarget.getBoundingClientRect(),Ds=window.innerHeight-at.bottom,vr=at.top;Ds<250&&vr>Ds?Q(za=>({...za,[a.id]:"vg-top"})):Q(za=>({...za,[a.id]:""}))},onWheel:w=>{const at=w.currentTarget.querySelector(".vg-tooltip-scroll");at&&at.scrollBy({top:w.deltaY,behavior:"smooth"})},onClick:()=>{Ae(!0),We(S._id)},children:[t.jsxs("div",{"data-vg-id":"2e783057","data-source-path":"/src/components/ViewGateOverlay.tsx:3474",className:`vg-pin-tooltip ${me[a.id]||""} ${Gt||d.left<160?"vg-tooltip-right":d.left>window.innerWidth-160?"vg-tooltip-left":""}`,style:{padding:"16px"},children:[t.jsxs("div",{"data-vg-id":"2e783058","data-source-path":"/src/components/ViewGateOverlay.tsx:3475",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[t.jsxs("div",{"data-vg-id":"2e783059","data-source-path":"/src/components/ViewGateOverlay.tsx:3476",style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[a.isTriggerPin?t.jsx(Pt,{"data-vg-id":"d88161bf","data-source-path":"/src/components/ViewGateOverlay.tsx:3478",size:14,color:aa}):t.jsx(Lt,{"data-vg-id":"7fe17ae","data-source-path":"/src/components/ViewGateOverlay.tsx:3480",size:14,color:aa}),t.jsxs("div",{"data-vg-id":"2e78305c","data-source-path":"/src/components/ViewGateOverlay.tsx:3482",style:{display:"flex",gap:"4px"},children:[xe>0&&t.jsxs("span",{"data-vg-id":"8161d07","data-source-path":"/src/components/ViewGateOverlay.tsx:3484",className:"vg-badge",style:{fontSize:"10px",background:m?"#f1f5f9":"#fff7ed",color:m?"#64748b":"#c2410c"},children:[xe," ",m||S.status==="backlog"?"Backlog":s==="es"?xe===1?r.pending:"Pendientes":"pending"]}),be>0&&t.jsxs("span",{"data-vg-id":"8161d08","data-source-path":"/src/components/ViewGateOverlay.tsx:3493",style:{fontSize:"10px",fontWeight:700,color:"#a855f7",background:"#f3e8ff",padding:"2px 6px",borderRadius:"6px"},children:[be," ",s==="es"?be===1?"Listo para revisión":"Listos para revisión":"ready for review"]}),we>0&&t.jsxs("span",{"data-vg-id":"8161d09","data-source-path":"/src/components/ViewGateOverlay.tsx:3505",style:{fontSize:"10px",fontWeight:700,color:"#059669",background:"#ecfdf5",padding:"2px 6px",borderRadius:"6px"},children:[we," ",s==="es"?we===1?"Completado":"Completados":"completed"]}),f.some(w=>w.status==="bug_fixing")&&t.jsx("span",{"data-vg-id":"8161d0a","data-source-path":"/src/components/ViewGateOverlay.tsx:3517",style:{fontSize:"10px",fontWeight:700,color:"#e11d48",background:"#fff1f2",padding:"2px 6px",borderRadius:"6px"},children:"BUG"})]})]}),y&&t.jsx("span",{"data-vg-id":"8161d0b","data-source-path":"/src/components/ViewGateOverlay.tsx:3531",className:"vg-badge",style:{fontSize:"10px",background:m?"#f1f5f9":he?`linear-gradient(90deg, #ea580c 50%, ${$?"#10b981":"#a855f7"} 50%)`:xe>0?"#fff7ed":pe?"#ecfdf5":"#f3e8ff",color:m?"#64748b":he?"#ffffff":xe>0?"#c2410c":pe?"#059669":"#a855f7",border:"none",fontWeight:800,textShadow:he&&!m?"0 1px 2px rgba(0,0,0,0.2)":"none"},children:"MODAL"})]}),t.jsx("div",{"data-vg-id":"2e783077","data-source-path":"/src/components/ViewGateOverlay.tsx:3543",className:"vg-tooltip-scroll",style:{maxHeight:"180px",overflowY:"auto"},children:f.map((w,at)=>t.jsxs("div",{"data-vg-id":"2e783078","data-source-path":"/src/components/ViewGateOverlay.tsx:3545",style:{padding:"10px 0",borderTop:at===0?"none":"1px solid #f1f5f9",display:"flex",gap:"12px",alignItems:"flex-start"},children:[t.jsxs("div",{"data-vg-id":"2e783079","data-source-path":"/src/components/ViewGateOverlay.tsx:3552",style:{flex:1,display:"flex",flexDirection:"column",gap:"4px"},children:[t.jsxs("div",{"data-vg-id":"2e78307a","data-source-path":"/src/components/ViewGateOverlay.tsx:3553",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx("span",{"data-vg-id":"8161d10","data-source-path":"/src/components/ViewGateOverlay.tsx:3554",style:{fontSize:"10px",fontWeight:600,color:"#64748b"},children:ms(w.timestamp||w.createdAt,s)}),w.creator&&t.jsx("div",{"data-vg-id":"2e783091","data-source-path":"/src/components/ViewGateOverlay.tsx:3558",style:{marginLeft:"4px"},children:w.creator.avatar?t.jsx("img",{"data-vg-id":"3cf75ac4","data-source-path":"/src/components/ViewGateOverlay.tsx:3560",src:w.creator.avatar,style:{width:"14px",height:"14px",borderRadius:"50%"},alt:""}):t.jsx("div",{"data-vg-id":"2e783093","data-source-path":"/src/components/ViewGateOverlay.tsx:3562",style:{width:"14px",height:"14px",borderRadius:"50%",background:"#6366f1",color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"7px",fontWeight:700},children:w.creator.name?.[0]})})]}),w.url&&t.jsx(hs,{url:w.url,onHover:Gs,style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"9px",color:"#6366f1",opacity:.8,background:"rgba(99, 102, 241, 0.05)",padding:"2px 6px",borderRadius:"4px",maxWidth:"120px"},tooltipStyle:{fontSize:"9px"}}),t.jsx("div",{"data-vg-id":"2e783094","data-source-path":"/src/components/ViewGateOverlay.tsx:3588",className:"vg-line-clamp-2",style:{fontSize:"13px",color:"#1e293b",lineHeight:1.4,fontWeight:500},children:w.message.length>100?w.message.slice(0,97)+"...":w.message})]}),t.jsxs("div",{"data-vg-id":"2e783095","data-source-path":"/src/components/ViewGateOverlay.tsx:3592",style:{flexShrink:0,marginTop:"2px",display:"flex",flexDirection:"column",gap:"4px",alignItems:"flex-end"},children:[t.jsx("div",{"data-vg-id":"2e783096","data-source-path":"/src/components/ViewGateOverlay.tsx:3593",style:{fontSize:"8px",fontWeight:800,color:w.priority==="low"?"#059669":w.priority==="urgent"?"#b91c1c":w.priority==="high"?"#b45309":"#4338ca",backgroundColor:w.priority==="low"?"#ecfdf5":w.priority==="urgent"?"#fef2f2":w.priority==="high"?"#fffbeb":"#eef2ff",padding:"2px 6px",borderRadius:"4px",textTransform:"uppercase",border:"1px solid",borderColor:w.priority==="low"?"#d1fae5":w.priority==="urgent"?"#fee2e2":w.priority==="high"?"#fef3c7":"#e0e7ff"},children:r[w.priority||"medium"]}),w.status==="completed"||w.status==="done"?t.jsxs("span",{"data-vg-id":"8161d2c","data-source-path":"/src/components/ViewGateOverlay.tsx:3607",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"8px",fontWeight:800,color:"#059669",background:"#ecfdf5",padding:"2px 6px",borderRadius:"6px",textTransform:"uppercase",border:"1px solid #d1fae5"},children:[t.jsx(Ke,{"data-vg-id":"a75c1b3d","data-source-path":"/src/components/ViewGateOverlay.tsx:3620",size:10}),r.completed]}):w.status==="ready_for_review"?t.jsxs("span",{"data-vg-id":"8161d2e","data-source-path":"/src/components/ViewGateOverlay.tsx:3624",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"8px",fontWeight:800,color:"#a855f7",background:"#f3e8ff",padding:"2px 6px",borderRadius:"6px",textTransform:"uppercase",border:"1px solid #e9d5ff"},children:[w.type==="bug"||w.status==="bug_fixing"||w.originalStatus==="bug_fixing"?t.jsx(xt,{"data-vg-id":"3b8b18dd","data-source-path":"/src/components/ViewGateOverlay.tsx:3637",size:10}):t.jsx(Ke,{"data-vg-id":"a75c1de0","data-source-path":"/src/components/ViewGateOverlay.tsx:3637",size:10}),r.readyForReview]}):w.status==="bug_fixing"?t.jsxs("span",{"data-vg-id":"8161fd1","data-source-path":"/src/components/ViewGateOverlay.tsx:3641",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"8px",fontWeight:800,color:"#e11d48",background:"#fff1f2",padding:"2px 6px",borderRadius:"6px",textTransform:"uppercase",border:"1px solid #ffe4e6"},children:[t.jsx(xt,{"data-vg-id":"3b8b1b80","data-source-path":"/src/components/ViewGateOverlay.tsx:3654",size:10}),"Bug Fixing"]}):t.jsxs("span",{"data-vg-id":"8161fd3","data-source-path":"/src/components/ViewGateOverlay.tsx:3658",style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"8px",fontWeight:800,color:m||w.status==="backlog"?"#64748b":"#ea580c",background:m||w.status==="backlog"?"#f1f5f9":"#fff7ed",padding:"2px 6px",borderRadius:"6px",textTransform:"uppercase",border:m||w.status==="backlog"?"1px solid #e2e8f0":"1px solid #ffedd5"},children:[t.jsx(ds,{"data-vg-id":"62dc6f9c","data-source-path":"/src/components/ViewGateOverlay.tsx:3671",size:10}),m||w.status==="backlog"?r.backlog:r.pending]})]})]},w._id))})]}),t.jsxs("div",{"data-vg-id":"2e783340","data-source-path":"/src/components/ViewGateOverlay.tsx:3681",className:`vg-formal-pin ${pe?"completed":ee||Re?"ready":Se?"bug":he?"mixed":m?"backlog":""} ${a.isTriggerPin?"modal-variant":""}`,style:{position:"relative",background:Se&&!ee&&!pe?"linear-gradient(135deg, #f43f5e 0%, #e11d48 100%)":ee?"linear-gradient(135deg, #a855f7 0%, #7e22ce 100%)":he?$?"linear-gradient(135deg, #10b981 0%, #059669 100%)":"linear-gradient(135deg, #a855f7 0%, #7e22ce 100%)":void 0},children:[ee||pe||Re?Se&&!pe?t.jsx(xt,{"data-vg-id":"3b8b1b84","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:18}):t.jsx(Ke,{"data-vg-id":"a75c1de7","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:18}):Se?t.jsx(xt,{"data-vg-id":"3b8b1b86","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:18}):a.isTriggerPin?t.jsx(Pt,{"data-vg-id":"d88164a9","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:16}):y?t.jsx(wa,{"data-vg-id":"5c2be3aa","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:16}):t.jsx(Lt,{"data-vg-id":"7fe1aae","data-source-path":"/src/components/ViewGateOverlay.tsx:3688",size:16}),E>1&&t.jsx("div",{"data-vg-id":"2e78335c","data-source-path":"/src/components/ViewGateOverlay.tsx:3691",className:"vg-pin-badge vg-animate-pop",children:E})]})]},`group-${a.id}`)}),t.jsx("div",{className:`vg-url-tooltip ${et?"visible":""} ${et?.direction==="bottom"?"vg-bottom":"vg-top"}`,style:{transform:et?`translate(-50%, ${et.direction==="top"?"-110%":"10%"})`:"translate(-50%, 0)",left:et?.x||0,top:et?.y||0},children:et?.url}),Ee&&t.jsx("div",{"data-vg-id":"2e78335d","data-source-path":"/src/components/ViewGateOverlay.tsx:3716",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.75)",backdropFilter:"blur(16px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je+100,animation:"vg-fade-in 0.3s ease-out"},onClick:a=>{a.target===a.currentTarget&&P(!1)},children:t.jsxs("div",{"data-vg-id":"2e78335e","data-source-path":"/src/components/ViewGateOverlay.tsx:3725",className:"vg-glassmorphism vg-animate-pop",style:{width:"95%",maxWidth:"800px",height:"85vh",maxHeight:"850px",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 50px 100px rgba(0,0,0,0.6)",borderRadius:"32px",border:"1px solid rgba(255, 255, 255, 0.15)",backgroundColor:"rgba(255, 255, 255, 0.98)"},children:[t.jsxs("div",{"data-vg-id":"2e78335f","data-source-path":"/src/components/ViewGateOverlay.tsx:3738",style:{padding:"32px 40px",borderBottom:"1px solid rgba(0,0,0,0.06)",display:"flex",alignItems:"center",justifyContent:"space-between",background:"white"},children:[t.jsxs("div",{"data-vg-id":"2e783360","data-source-path":"/src/components/ViewGateOverlay.tsx:3739",children:[t.jsx("h3",{"data-vg-id":"53ec877","data-source-path":"/src/components/ViewGateOverlay.tsx:3740",style:{margin:0,fontSize:"24px",fontWeight:900,letterSpacing:"-0.03em",color:"#0f172a"},children:s==="es"?"Selector de Endpoints":"Endpoint Selector"}),t.jsx("p",{"data-vg-id":"f01afc41","data-source-path":"/src/components/ViewGateOverlay.tsx:3743",style:{margin:"6px 0 0 0",fontSize:"14px",color:"#64748b",fontWeight:500},children:s==="es"?"Asocia múltiples rutas backend a este ticket para mayor precisión":"Associate multiple backend routes to this ticket for better precision"})]}),t.jsx("button",{"data-vg-id":"5861c060","data-source-path":"/src/components/ViewGateOverlay.tsx:3747",onClick:()=>P(!1),className:"vg-close-pill",style:{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"14px",background:"#f1f5f9",color:"#64748b",border:"none",cursor:"pointer",transition:"all 0.2s"},onMouseEnter:a=>{a.currentTarget.style.background="#e2e8f0",a.currentTarget.style.color="#0f172a"},onMouseLeave:a=>{a.currentTarget.style.background="#f1f5f9",a.currentTarget.style.color="#64748b"},children:t.jsx(yt,{"data-vg-id":"eec8c840","data-source-path":"/src/components/ViewGateOverlay.tsx:3754",size:20,strokeWidth:2.5})})]}),t.jsx("div",{"data-vg-id":"2e78337a","data-source-path":"/src/components/ViewGateOverlay.tsx:3758",style:{padding:"24px 40px",borderBottom:"1px solid rgba(0,0,0,0.06)",background:"#fcfcfc"},children:t.jsxs("div",{"data-vg-id":"2e78337b","data-source-path":"/src/components/ViewGateOverlay.tsx:3759",style:{position:"relative"},children:[t.jsx(Po,{"data-vg-id":"8f7bb00f","data-source-path":"/src/components/ViewGateOverlay.tsx:3760",size:20,style:{position:"absolute",left:"16px",top:"50%",transform:"translateY(-50%)",color:"#94a3b8"}}),t.jsx("input",{"data-vg-id":"88e38db6","data-source-path":"/src/components/ViewGateOverlay.tsx:3761",type:"text",placeholder:s==="es"?"Buscar rutas, métodos o descripciones...":"Search routes, methods, or descriptions...",value:F,onChange:a=>Te(a.target.value),className:"vg-textarea",style:{padding:"14px 16px 14px 50px",fontSize:"16px",minHeight:"auto",borderRadius:"16px",border:"1px solid #e2e8f0",backgroundColor:"white",boxShadow:"0 2px 8px rgba(0,0,0,0.04)"},autoFocus:!0})]})}),t.jsx("div",{"data-vg-id":"2e78337e","data-source-path":"/src/components/ViewGateOverlay.tsx:3781",style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"24px 40px"},className:"vg-custom-scrollbar",children:Et?Is.length>0?t.jsx("div",{"data-vg-id":"2e783382","data-source-path":"/src/components/ViewGateOverlay.tsx:3788",style:{display:"flex",flexDirection:"column",gap:"0px"},children:Is.map(a=>{const n=a.name===(s==="es"?"Seleccionados":"Selected");return t.jsxs("div",{"data-vg-id":"2e783398","data-source-path":"/src/components/ViewGateOverlay.tsx:3792",style:{marginBottom:"32px"},children:[t.jsxs("div",{"data-vg-id":"2e783399","data-source-path":"/src/components/ViewGateOverlay.tsx:3793",style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"16px",padding:"0 4px"},children:[t.jsx("span",{"data-vg-id":"816202f","data-source-path":"/src/components/ViewGateOverlay.tsx:3794",style:{fontSize:"11px",fontWeight:900,textTransform:"uppercase",letterSpacing:"0.1em",color:n?"#10b981":"#6366f1",backgroundColor:n?"rgba(10, 185, 129, 0.08)":"rgba(99, 102, 241, 0.08)",padding:"4px 10px",borderRadius:"6px",border:"1px solid",borderColor:n?"rgba(10, 185, 129, 0.1)":"rgba(99, 102, 241, 0.1)"},children:a.name}),t.jsx("div",{"data-vg-id":"2e78339b","data-source-path":"/src/components/ViewGateOverlay.tsx:3808",style:{flex:1,height:"1px",background:`linear-gradient(90deg, ${n?"rgba(16, 185, 129, 0.15)":"rgba(99, 102, 241, 0.15)"} 0%, transparent 100%)`}})]}),t.jsx("div",{"data-vg-id":"2e78339c","data-source-path":"/src/components/ViewGateOverlay.tsx:3815",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(340px, 1fr))",gap:"12px"},children:a.endpoints.map(d=>{const f=`${d.method}|${d.path}`,y=L.includes(f);return t.jsxs("div",{"data-vg-id":"2e78339d","data-source-path":"/src/components/ViewGateOverlay.tsx:3824",onClick:()=>{ke(y?L.filter(S=>S!==f):[...L,f])},style:{padding:"16px 20px",borderRadius:"18px",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",background:y?"#f5f7ff":"#ffffff",border:"1px solid",borderColor:y?"rgba(99, 102, 241, 0.2)":"#f1f5f9",display:"flex",alignItems:"center",gap:"16px",boxShadow:y?"0 4px 12px rgba(99, 102, 241, 0.08)":"none"},onMouseEnter:S=>{y||(S.currentTarget.style.background="#f8fafc",S.currentTarget.style.borderColor="#e2e8f0")},onMouseLeave:S=>{y||(S.currentTarget.style.background="#ffffff",S.currentTarget.style.borderColor="#f1f5f9")},children:[t.jsx("div",{"data-vg-id":"2e78339e","data-source-path":"/src/components/ViewGateOverlay.tsx:3856",style:{width:"24px",height:"24px",borderRadius:"8px",border:"2px solid",borderColor:y?"#6366f1":"#cbd5e1",backgroundColor:y?"#6366f1":"white",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",flexShrink:0},children:y&&t.jsx("div",{"data-vg-id":"2e78339f","data-source-path":"/src/components/ViewGateOverlay.tsx:3869",style:{color:"white",fontSize:"14px",fontWeight:900},children:"✓"})}),t.jsxs("div",{"data-vg-id":"2e7833a0","data-source-path":"/src/components/ViewGateOverlay.tsx:3871",style:{flex:1,minWidth:0},children:[t.jsxs("div",{"data-vg-id":"2e7833a1","data-source-path":"/src/components/ViewGateOverlay.tsx:3872",style:{display:"flex",alignItems:"center",gap:"10px"},children:[t.jsx("span",{"data-vg-id":"816204c","data-source-path":"/src/components/ViewGateOverlay.tsx:3873",style:{fontSize:"11px",fontWeight:800,padding:"3px 8px",borderRadius:"8px",background:d.method==="GET"?"#dcfce7":"#fee2e2",color:d.method==="GET"?"#166534":"#991b1b",flexShrink:0},children:d.method}),t.jsx("span",{"data-vg-id":"816204d","data-source-path":"/src/components/ViewGateOverlay.tsx:3884",style:{fontWeight:700,color:y?"#4338ca":"#1e293b",fontSize:"14px",wordBreak:"break-all"},children:d.path}),d.contract&&t.jsx("div",{"data-vg-id":"2e7833b9","data-source-path":"/src/components/ViewGateOverlay.tsx:3893",style:{fontSize:"9px",fontWeight:900,color:"#6366f1",background:"rgba(99, 102, 241, 0.1)",padding:"1px 5px",borderRadius:"4px",textTransform:"uppercase"},children:"JSON"})]}),d.description&&t.jsx("div",{"data-vg-id":"2e7833ba","data-source-path":"/src/components/ViewGateOverlay.tsx:3905",style:{fontSize:"12px",color:"#64748b",marginTop:"6px",wordBreak:"break-word",fontWeight:450,lineHeight:1.4},children:d.description})]})]},f)})})]},a.name)})}):t.jsxs("div",{"data-vg-id":"2e7833bb","data-source-path":"/src/components/ViewGateOverlay.tsx:3926",style:{padding:"80px 20px",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center"},children:[t.jsx("div",{"data-vg-id":"2e7833bc","data-source-path":"/src/components/ViewGateOverlay.tsx:3927",style:{width:"80px",height:"80px",borderRadius:"24px",backgroundColor:"#f1f5f9",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"24px"},children:t.jsx(Be,{"data-vg-id":"b1e4c679","data-source-path":"/src/components/ViewGateOverlay.tsx:3928",size:40,style:{color:"#94a3b8"}})}),t.jsx("p",{"data-vg-id":"f01afc9d","data-source-path":"/src/components/ViewGateOverlay.tsx:3930",style:{color:"#0f172a",fontSize:"18px",fontWeight:800,margin:"0 0 8px 0"},children:s==="es"?"No encontramos lo que buscas":"No results found"}),t.jsx("p",{"data-vg-id":"f01afc9e","data-source-path":"/src/components/ViewGateOverlay.tsx:3933",style:{color:"#64748b",fontSize:"15px",margin:0},children:s==="es"?"Intenta buscar con otros términos o revisa la sincronización":"Try searching with different terms or check synchronization"})]}):t.jsxs("div",{"data-vg-id":"2e78337f","data-source-path":"/src/components/ViewGateOverlay.tsx:3783",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"100px 0",gap:"20px"},children:[t.jsx("div",{"data-vg-id":"2e783380","data-source-path":"/src/components/ViewGateOverlay.tsx:3784",className:"vg-spinner",style:{width:"40px",height:"40px",border:"3px solid rgba(99, 102, 241, 0.1)",borderTopColor:"#6366f1"}}),t.jsx("p",{"data-vg-id":"f01afc60","data-source-path":"/src/components/ViewGateOverlay.tsx:3785",style:{color:"#64748b",fontSize:"15px",fontWeight:600},children:s==="es"?"Cargando endpoints...":"Loading endpoints..."})]})}),t.jsxs("div",{"data-vg-id":"2e7833c0","data-source-path":"/src/components/ViewGateOverlay.tsx:3940",style:{padding:"24px 40px",borderTop:"1px solid rgba(0,0,0,0.06)",background:"white",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"20px"},children:[t.jsxs("div",{"data-vg-id":"2e7833d6","data-source-path":"/src/components/ViewGateOverlay.tsx:3941",style:{display:"flex",alignItems:"center",gap:"12px"},children:[t.jsxs("div",{"data-vg-id":"2e7833d7","data-source-path":"/src/components/ViewGateOverlay.tsx:3942",style:{padding:"6px 12px",background:"#f1f5f9",borderRadius:"10px",fontSize:"14px",fontWeight:700,color:"#475569"},children:[L.length," ",s==="es"?"seleccionados":"selected"]}),L.length>0&&t.jsx("button",{"data-vg-id":"5861c0d5","data-source-path":"/src/components/ViewGateOverlay.tsx:3946",onClick:()=>{ke([]),ct&&$t([])},style:{background:"none",border:"none",color:"#6366f1",fontSize:"14px",fontWeight:700,cursor:"pointer",padding:"4px 8px"},children:s==="es"?"Desmarcar todos":"Deselect all"})]}),t.jsx("div",{"data-vg-id":"2e7833d9","data-source-path":"/src/components/ViewGateOverlay.tsx:3957",style:{display:"flex",gap:"12px"},children:t.jsx("button",{"data-vg-id":"5861c0d7","data-source-path":"/src/components/ViewGateOverlay.tsx:3958",onClick:()=>{ct&&$t(L),P(!1)},style:{minWidth:"160px",padding:"14px 28px",borderRadius:"16px",fontSize:"15px",fontWeight:850,border:"none",background:"var(--vg-primary-gradient)",color:"white",cursor:"pointer",boxShadow:"0 10px 25px -5px rgba(99, 102, 241, 0.45)",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:a=>{a.currentTarget.style.transform="translateY(-2px)",a.currentTarget.style.boxShadow="0 15px 30px -5px rgba(99, 102, 241, 0.6)"},onMouseLeave:a=>{a.currentTarget.style.transform="translateY(0)",a.currentTarget.style.boxShadow="0 10px 25px -5px rgba(99, 102, 241, 0.45)"},children:s==="es"?"Confirmar Selección":"Confirm Selection"})})]})]})}),rt?.contract&&t.jsx("div",{"data-vg-id":"2e7833db","data-source-path":"/src/components/ViewGateOverlay.tsx:3992",className:"vg-animate-fade",style:{position:"fixed",left:Math.min(rt.x,window.innerWidth-420),top:Math.min(rt.y,window.innerHeight-300),width:"400px",zIndex:Je+500,pointerEvents:"none"},children:t.jsxs("div",{"data-vg-id":"2e7833dc","data-source-path":"/src/components/ViewGateOverlay.tsx:4000",className:"vg-glassmorphism",style:{padding:"20px",background:"rgba(15, 23, 42, 0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"20px",boxShadow:"0 20px 40px rgba(0,0,0,0.4)",display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsxs("div",{"data-vg-id":"2e7833dd","data-source-path":"/src/components/ViewGateOverlay.tsx:4011",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t.jsx("div",{"data-vg-id":"2e7833de","data-source-path":"/src/components/ViewGateOverlay.tsx:4012",style:{padding:"4px 10px",background:"rgba(99, 102, 241, 0.2)",borderRadius:"8px",fontSize:"11px",fontWeight:900,color:"#818cf8",textTransform:"uppercase"},children:s==="es"?"CONTRATO":"CONTRACT"}),t.jsxs("span",{"data-vg-id":"8162074","data-source-path":"/src/components/ViewGateOverlay.tsx:4021",style:{color:"rgba(255, 255, 255, 0.5)",fontSize:"12px",fontWeight:600},children:[rt.method," ",rt.path]})]}),t.jsx("div",{"data-vg-id":"2e7833f5","data-source-path":"/src/components/ViewGateOverlay.tsx:4023",className:"vg-custom-scrollbar",style:{maxHeight:"250px",overflowY:"auto",background:"rgba(0,0,0,0.3)",borderRadius:"12px",padding:"12px"},children:t.jsx("pre",{"data-vg-id":"b7af0908","data-source-path":"/src/components/ViewGateOverlay.tsx:4030",style:{margin:0,fontSize:"11px",color:"#94a3b8",whiteSpace:"pre-wrap",wordBreak:"break-all",lineHeight:1.5,fontFamily:"JetBrains Mono, Fira Code, monospace"},children:rt.contract})})]})}),ct&&t.jsx("div",{"data-vg-id":"2e7833f7","data-source-path":"/src/components/ViewGateOverlay.tsx:4049",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(11, 15, 25, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Je+50},children:t.jsxs("div",{"data-vg-id":"2e7833f8","data-source-path":"/src/components/ViewGateOverlay.tsx:4055",className:"vg-glassmorphism vg-animate-slide",style:{width:"600px",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",background:"#ffffff",borderRadius:"24px",padding:"32px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",display:"flex",flexDirection:"column",gap:"24px"},children:[t.jsxs("div",{"data-vg-id":"2e7833f9","data-source-path":"/src/components/ViewGateOverlay.tsx:4066",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsx("h2",{"data-vg-id":"530b18f","data-source-path":"/src/components/ViewGateOverlay.tsx:4067",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#1e293b"},children:s==="es"?"Editar Comentario":"Edit Comment"}),t.jsx("button",{"data-vg-id":"5861c0f8","data-source-path":"/src/components/ViewGateOverlay.tsx:4070",onClick:()=>qt(null),style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8"},children:t.jsx(yt,{"data-vg-id":"eec8c8c3","data-source-path":"/src/components/ViewGateOverlay.tsx:4071",size:24})})]}),t.jsxs("div",{"data-vg-id":"2e7833fd","data-source-path":"/src/components/ViewGateOverlay.tsx:4075",style:{display:"flex",flexDirection:"column",gap:"16px"},children:[t.jsxs("div",{"data-vg-id":"2e7833fe","data-source-path":"/src/components/ViewGateOverlay.tsx:4076",children:[t.jsx("label",{"data-vg-id":"feec1077","data-source-path":"/src/components/ViewGateOverlay.tsx:4077",style:{display:"block",fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},children:r.priority}),t.jsx("div",{"data-vg-id":"2e783415","data-source-path":"/src/components/ViewGateOverlay.tsx:4078",style:{display:"flex",gap:"8px"},children:["low","medium","high","urgent"].map(a=>t.jsx("button",{onClick:()=>_(a),style:{flex:1,padding:"10px 12px",borderRadius:"12px",fontSize:"13px",fontWeight:800,border:"2px solid",borderColor:A===a?a==="low"?"#10b981":a==="medium"?"#6366f1":a==="high"?"#f59e0b":"#ef4444":"#f1f5f9",backgroundColor:A===a?a==="low"?"#ecfdf5":a==="medium"?"#eef2ff":a==="high"?"#fffbeb":"#fef2f2":"white",color:A===a?a==="low"?"#059669":a==="medium"?"#4338ca":a==="high"?"#b45309":"#b91c1c":"#64748b",cursor:"pointer",transition:"all 0.2s",textTransform:"capitalize"},children:r[a]},a))})]}),t.jsxs("div",{"data-vg-id":"2e783416","data-source-path":"/src/components/ViewGateOverlay.tsx:4098",style:{marginBottom:"8px"},children:[t.jsx("label",{"data-vg-id":"feec107a","data-source-path":"/src/components/ViewGateOverlay.tsx:4099",style:{display:"block",fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},children:r.focusAreas}),t.jsx("div",{"data-vg-id":"2e783418","data-source-path":"/src/components/ViewGateOverlay.tsx:4100",style:{display:"flex",gap:"8px"},children:[{id:"frontend",label:r.frontend,icon:t.jsx(zt,{"data-vg-id":"b806c346","data-source-path":"/src/components/ViewGateOverlay.tsx:4102",size:14}),color:"#10b981",bg:"#ecfdf5",border:"#d1fae5"},{id:"backend",label:r.backend,icon:t.jsx(Be,{"data-vg-id":"b1e4c6d6","data-source-path":"/src/components/ViewGateOverlay.tsx:4103",size:14}),color:"#6366f1",bg:"#eef2ff",border:"#e0e7ff"},{id:"ux",label:r.ux,icon:t.jsx(vt,{"data-vg-id":"ea069d93","data-source-path":"/src/components/ViewGateOverlay.tsx:4104",size:14}),color:"#d946ef",bg:"#fdf4ff",border:"#f5d0fe"}].filter(a=>a.id==="backend"?Yt:a.id==="ux"?R:!0).map(a=>{const n=dt.includes(a.id);return t.jsxs("button",{onClick:()=>{Ra(n?dt.filter(d=>d!==a.id):[...dt,a.id])},style:{flex:1,padding:"10px 4px",borderRadius:"12px",fontSize:"12px",fontWeight:700,border:"2px solid",borderColor:n?a.color:"#f1f5f9",backgroundColor:n?a.bg:"white",color:n?a.color:"#64748b",cursor:"pointer",transition:"all 0.2s",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[a.icon,a.label]},a.id)})})]}),dt.includes("ux")&&t.jsxs("div",{"data-vg-id":"2e78341c","data-source-path":"/src/components/ViewGateOverlay.tsx:4140",className:"vg-animate-slide",style:{padding:"16px",borderRadius:"16px",background:"#f8fafc",border:"1px solid #e2e8f0"},children:[t.jsxs("div",{"data-vg-id":"2e78341d","data-source-path":"/src/components/ViewGateOverlay.tsx:4141",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[t.jsxs("div",{"data-vg-id":"2e783433","data-source-path":"/src/components/ViewGateOverlay.tsx:4142",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx(Pt,{"data-vg-id":"d8816599","data-source-path":"/src/components/ViewGateOverlay.tsx:4143",size:14,style:{color:"#d946ef"}}),t.jsx("span",{"data-vg-id":"81620ca","data-source-path":"/src/components/ViewGateOverlay.tsx:4144",style:{fontSize:"11px",fontWeight:800,color:"#64748b",textTransform:"uppercase"},children:r.figmaLink})]}),t.jsxs("button",{"data-vg-id":"5861c133","data-source-path":"/src/components/ViewGateOverlay.tsx:4146",onClick:()=>Rt([...tt,{name:"",link:""}]),style:{background:"#fdf4ff",border:"1px solid #f5d0fe",color:"#d946ef",borderRadius:"8px",padding:"4px 10px",fontSize:"11px",fontWeight:800,cursor:"pointer"},children:["+ ",r.addLink]})]}),t.jsx("div",{"data-vg-id":"2e783437","data-source-path":"/src/components/ViewGateOverlay.tsx:4153",style:{display:"flex",flexDirection:"column",gap:"8px"},children:tt.map((a,n)=>t.jsxs("div",{"data-vg-id":"2e783438","data-source-path":"/src/components/ViewGateOverlay.tsx:4155",style:{display:"flex",gap:"8px"},children:[t.jsx("input",{"data-vg-id":"88e38e72","data-source-path":"/src/components/ViewGateOverlay.tsx:4156",type:"text",className:"vg-textarea",style:{padding:"8px 12px",fontSize:"12px",minHeight:"auto",borderRadius:"10px"},placeholder:r.figmaNamePlaceholder,value:a.name,onChange:d=>{const f=[...tt];f[n]&&(f[n].name=d.target.value,Rt(f))}}),t.jsx("input",{"data-vg-id":"88e38e73","data-source-path":"/src/components/ViewGateOverlay.tsx:4167",type:"text",className:"vg-textarea",style:{padding:"8px 12px",fontSize:"12px",minHeight:"auto",borderRadius:"10px"},placeholder:r.figmaLinkPlaceholder,value:a.link,onChange:d=>{const f=[...tt];f[n]&&(f[n].link=d.target.value,Rt(f))}}),tt.length>1&&t.jsx("button",{"data-vg-id":"5861c138","data-source-path":"/src/components/ViewGateOverlay.tsx:4179",onClick:()=>Rt(tt.filter((d,f)=>f!==n)),style:{color:"#ef4444",background:"none",border:"none",cursor:"pointer"},children:t.jsx(Wt,{"data-vg-id":"45b44621","data-source-path":"/src/components/ViewGateOverlay.tsx:4180",size:16})})]},n))})]}),Yt&&dt.includes("backend")&&t.jsxs("div",{"data-vg-id":"2e783452","data-source-path":"/src/components/ViewGateOverlay.tsx:4191",className:"vg-animate-slide",style:{padding:"16px",borderRadius:"16px",background:"#f8fafc",border:"1px solid #e2e8f0"},children:[t.jsxs("div",{"data-vg-id":"2e783453","data-source-path":"/src/components/ViewGateOverlay.tsx:4192",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[t.jsxs("div",{"data-vg-id":"2e783454","data-source-path":"/src/components/ViewGateOverlay.tsx:4193",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t.jsx(Be,{"data-vg-id":"b1e4c711","data-source-path":"/src/components/ViewGateOverlay.tsx:4194",size:14,style:{color:"#6366f1"}}),t.jsx("span",{"data-vg-id":"81620eb","data-source-path":"/src/components/ViewGateOverlay.tsx:4195",style:{fontSize:"11px",fontWeight:800,color:"#64748b",textTransform:"uppercase"},children:r.endpoint})]}),Ye.length>0&&t.jsxs("span",{"data-vg-id":"81620ec","data-source-path":"/src/components/ViewGateOverlay.tsx:4198",style:{fontSize:"10px",background:"#eef2ff",color:"#6366f1",padding:"2px 8px",borderRadius:"12px",fontWeight:700},children:[Ye.length," ",s==="es"?"seleccionados":"selected"]})]}),t.jsxs("button",{"data-vg-id":"5861c155","data-source-path":"/src/components/ViewGateOverlay.tsx:4203",onClick:()=>P(!0),style:{width:"100%",padding:"12px 16px",fontSize:"14px",borderRadius:"12px",background:"white",border:"1px solid #e2e8f0",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",textAlign:"left",color:Ye.length>0?"#0f172a":"#94a3b8"},children:[t.jsx("div",{"data-vg-id":"2e783459","data-source-path":"/src/components/ViewGateOverlay.tsx:4207",style:{display:"flex",gap:"4px",overflow:"hidden"},children:Ye.length>0?Ye.slice(0,2).map(a=>t.jsx("span",{"data-vg-id":"81620ef","data-source-path":"/src/components/ViewGateOverlay.tsx:4209",style:{background:"#eef2ff",color:"#6366f1",padding:"1px 6px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:a.split("|").pop()},a)).concat(Ye.length>2?[t.jsxs("span",{"data-vg-id":"81620f0","data-source-path":"/src/components/ViewGateOverlay.tsx:4209",children:["+",Ye.length-2]},"plus")]:[]):r.selectEndpoint}),t.jsx(cs,{"data-vg-id":"1cd393c8","data-source-path":"/src/components/ViewGateOverlay.tsx:4212",size:14,style:{color:"#64748b"}})]})]}),t.jsxs("div",{"data-vg-id":"2e7836fd","data-source-path":"/src/components/ViewGateOverlay.tsx:4217",children:[t.jsx("label",{"data-vg-id":"feec1361","data-source-path":"/src/components/ViewGateOverlay.tsx:4218",style:{display:"block",fontSize:"12px",fontWeight:700,color:"#64748b",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},children:s==="es"?"Mensaje":"Message"}),t.jsx("textarea",{className:"vg-textarea",value:Ps,onChange:a=>Ms(a.target.value),rows:5,style:{minHeight:"120px",fontSize:"15px"}})]})]}),t.jsxs("div",{"data-vg-id":"2e7836ff","data-source-path":"/src/components/ViewGateOverlay.tsx:4229",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"16px",paddingTop:"24px",borderTop:"1px solid #f1f5f9"},children:[t.jsx("button",{"data-vg-id":"5861c3fd","data-source-path":"/src/components/ViewGateOverlay.tsx:4230",className:"vg-button-ghost",style:{padding:"12px 24px",fontSize:"14px",borderRadius:"12px",color:"#64748b",fontWeight:700},onClick:()=>{qt(null),ke([])},children:r.cancel}),t.jsx("button",{className:"vg-button-primary vg-animate-pop",style:{padding:"12px 32px",fontSize:"15px",borderRadius:"12px",background:"var(--vg-primary-gradient)",fontWeight:800,boxShadow:"0 10px 25px -5px rgba(99, 102, 241, 0.45)",opacity:ea?.7:1,cursor:ea?"not-allowed":"pointer"},disabled:ea,onClick:async()=>{Ls(!0);try{(await fetch(`${c}/api/annotations/${ct}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:q?`Bearer ${q}`:"","x-api-key":i||""},body:JSON.stringify({message:Ps,priority:A,focusAreas:dt,figmaReference:tt,backendEndpoints:Ye})})).ok&&(qt(null),Zt(),o(r.updateSuccess,"success"))}catch{}finally{Ls(!1)}},children:ea?"...":r.save})]})]})})]})})};function ka(e,o,s){if(!o.endsWith(".tsx")&&!o.endsWith(".jsx")||o.includes("node_modules"))return e;const r=j=>j.replace(/\\/g,"/"),i=r(o).replace(r(s),""),c=j=>{let b=0;for(let m=0;m<j.length;m++)b=Math.imul(31,b)+j.charCodeAt(m)|0;return(b>>>0).toString(16)};let l=0;return e.split(`
15
+ `).map((j,b)=>{const m=b+1;return j.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(x,k,V)=>{if(x.includes("data-source-path")||x.includes("data-vg-id")||V==="Fragment"||V==="React.Fragment")return x;l++;const C=c(`${i}:${V}:${l}`);return`${k}<${V} data-vg-id="${C}" data-source-path="${i}:${m}"`})}).join(`
16
+ `)}function nr(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,o){return{code:ka(e,o,process.cwd()),map:null}}}}function ir(e){const o=this.resourcePath;return o?(this.getOptions&&this.getOptions(),ka(e,o,process.cwd())):e}function cr(e){return ir.call(this,e)}ve.ViewGate=Fo,ve.ViewGateOverlay=ks,ve.transformSourcePaths=ka,ve.useViewGate=us,ve.viewgateNextLoader=cr,ve.viewgatePlugin=nr,Object.defineProperty(ve,Symbol.toStringTag,{value:"Module"})}));