(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(l){if(l.ep)return;l.ep=!0;const s=n(l);fetch(l.href,s)}})();function Rf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pu={exports:{}},ql={},Lu={exports:{}},F={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Or=Symbol.for("react.element"),Tf=Symbol.for("react.portal"),Pf=Symbol.for("react.fragment"),Lf=Symbol.for("react.strict_mode"),Of=Symbol.for("react.profiler"),zf=Symbol.for("react.provider"),Df=Symbol.for("react.context"),Af=Symbol.for("react.forward_ref"),Mf=Symbol.for("react.suspense"),If=Symbol.for("react.memo"),Ff=Symbol.for("react.lazy"),eo=Symbol.iterator;function Uf(e){return e===null||typeof e!="object"?null:(e=eo&&e[eo]||e["@@iterator"],typeof e=="function"?e:null)}var Ou={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zu=Object.assign,Du={};function Un(e,t,n){this.props=e,this.context=t,this.refs=Du,this.updater=n||Ou}Un.prototype.isReactComponent={};Un.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Au(){}Au.prototype=Un.prototype;function Ji(e,t,n){this.props=e,this.context=t,this.refs=Du,this.updater=n||Ou}var Xi=Ji.prototype=new Au;Xi.constructor=Ji;zu(Xi,Un.prototype);Xi.isPureReactComponent=!0;var to=Array.isArray,Mu=Object.prototype.hasOwnProperty,Gi={current:null},Iu={key:!0,ref:!0,__self:!0,__source:!0};function Fu(e,t,n){var r,l={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Mu.call(t,r)&&!Iu.hasOwnProperty(r)&&(l[r]=t[r]);var o=arguments.length-2;if(o===1)l.children=n;else if(1>>1,W=R[$];if(0>>1;$l(jt,A))utl(re,jt)?(R[$]=re,R[ut]=A,$=ut):(R[$]=jt,R[we]=A,$=we);else if(utl(re,A))R[$]=re,R[ut]=A,$=ut;else break e}}return O}function l(R,O){var A=R.sortIndex-O.sortIndex;return A!==0?A:R.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var u=[],c=[],p=1,m=null,x=3,y=!1,g=!1,w=!1,j=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(R){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=R)r(c),O.sortIndex=O.expirationTime,t(u,O);else break;O=n(c)}}function k(R){if(w=!1,h(R),!g)if(n(u)!==null)g=!0,he(b);else{var O=n(c);O!==null&&Nt(k,O.startTime-R)}}function b(R,O){g=!1,w&&(w=!1,d(N),N=-1),y=!0;var A=x;try{for(h(O),m=n(u);m!==null&&(!(m.expirationTime>O)||R&&!V());){var $=m.callback;if(typeof $=="function"){m.callback=null,x=m.priorityLevel;var W=$(m.expirationTime<=O);O=e.unstable_now(),typeof W=="function"?m.callback=W:m===n(u)&&r(u),h(O)}else r(u);m=n(u)}if(m!==null)var nt=!0;else{var we=n(c);we!==null&&Nt(k,we.startTime-O),nt=!1}return nt}finally{m=null,x=A,y=!1}}var _=!1,E=null,N=-1,I=5,C=-1;function V(){return!(e.unstable_now()-CR||125$?(R.sortIndex=A,t(c,R),n(u)===null&&R===n(c)&&(w?(d(N),N=-1):w=!0,Nt(k,A-$))):(R.sortIndex=W,t(u,R),g||y||(g=!0,he(b))),R},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(R){var O=x;return function(){var A=x;x=O;try{return R.apply(this,arguments)}finally{x=A}}}})(Vu);Hu.exports=Vu;var Yf=Hu.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Zf=T,Me=Yf;function S(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xs=Object.prototype.hasOwnProperty,ep=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ro={},lo={};function tp(e){return Xs.call(lo,e)?!0:Xs.call(ro,e)?!1:ep.test(e)?lo[e]=!0:(ro[e]=!0,!1)}function np(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rp(e,t,n,r){if(t===null||typeof t>"u"||np(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function be(e,t,n,r,l,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pe[e]=new be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pe[t]=new be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pe[e]=new be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pe[e]=new be(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pe[e]=new be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pe[e]=new be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pe[e]=new be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pe[e]=new be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pe[e]=new be(e,5,!1,e.toLowerCase(),null,!1,!1)});var Zi=/[\-:]([a-z])/g;function ea(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Zi,ea);pe[t]=new be(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Zi,ea);pe[t]=new be(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Zi,ea);pe[t]=new be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pe[e]=new be(e,1,!1,e.toLowerCase(),null,!1,!1)});pe.xlinkHref=new be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pe[e]=new be(e,1,!1,e.toLowerCase(),null,!0,!0)});function ta(e,t,n,r){var l=pe.hasOwnProperty(t)?pe[t]:null;(l!==null?l.type!==0:r||!(2o||l[i]!==s[o]){var u=` `+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=o);break}}}finally{vs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?er(e):""}function lp(e){switch(e.tag){case 5:return er(e.type);case 16:return er("Lazy");case 13:return er("Suspense");case 19:return er("SuspenseList");case 0:case 2:case 15:return e=ws(e.type,!1),e;case 11:return e=ws(e.type.render,!1),e;case 1:return e=ws(e.type,!0),e;default:return""}}function ei(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mn:return"Fragment";case hn:return"Portal";case Gs:return"Profiler";case na:return"StrictMode";case Ys:return"Suspense";case Zs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ku:return(e.displayName||"Context")+".Consumer";case Qu:return(e._context.displayName||"Context")+".Provider";case ra:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case la:return t=e.displayName||null,t!==null?t:ei(e.type)||"Memo";case Et:t=e._payload,e=e._init;try{return ei(e(t))}catch{}}return null}function sp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ei(t);case 8:return t===na?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ut(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ju(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ip(e){var t=Ju(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wr(e){e._valueTracker||(e._valueTracker=ip(e))}function Xu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ju(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function jl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ti(e,t){var n=t.checked;return Z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function io(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ut(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gu(e,t){t=t.checked,t!=null&&ta(e,"checked",t,!1)}function ni(e,t){Gu(e,t);var n=Ut(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ri(e,t.type,n):t.hasOwnProperty("defaultValue")&&ri(e,t.type,Ut(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ao(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ri(e,t,n){(t!=="number"||jl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tr=Array.isArray;function En(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Qr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ap=["Webkit","ms","Moz","O"];Object.keys(sr).forEach(function(e){ap.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sr[t]=sr[e]})});function tc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||sr.hasOwnProperty(e)&&sr[e]?(""+t).trim():t+"px"}function nc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=tc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var op=Z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ii(e,t){if(t){if(op[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function ai(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var oi=null;function sa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ui=null,Cn=null,_n=null;function co(e){if(e=Ar(e)){if(typeof ui!="function")throw Error(S(280));var t=e.stateNode;t&&(t=Zl(t),ui(e.stateNode,e.type,t))}}function rc(e){Cn?_n?_n.push(e):_n=[e]:Cn=e}function lc(){if(Cn){var e=Cn,t=_n;if(_n=Cn=null,co(e),t)for(e=0;e>>=0,e===0?32:31-(vp(e)/wp|0)|0}var Kr=64,qr=4194304;function nr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Cl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var o=i&~l;o!==0?r=nr(o):(s&=i,s!==0&&(r=nr(s)))}else i=n&~l,i!==0?r=nr(i):s!==0&&(r=nr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,s=t&-t,l>=s||l===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ye(t),e[t]=n}function Sp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ar),wo=" ",ko=!1;function Sc(e,t){switch(e){case"keyup":return Yp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xn=!1;function e0(e,t){switch(e){case"compositionend":return bc(t);case"keypress":return t.which!==32?null:(ko=!0,wo);case"textInput":return e=t.data,e===wo&&ko?null:e;default:return null}}function t0(e,t){if(xn)return e==="compositionend"||!pa&&Sc(e,t)?(e=Nc(),dl=ca=Tt=null,xn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=bo(n)}}function Rc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tc(){for(var e=window,t=jl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=jl(e.document)}return t}function ha(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function c0(e){var t=Tc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rc(n.ownerDocument.documentElement,n)){if(r!==null&&ha(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,s=Math.min(r.start,l);r=r.end===void 0?s:Math.min(r.end,l),!e.extend&&s>r&&(l=r,r=s,s=l),l=Eo(n,s);var i=Eo(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gn=null,mi=null,ur=null,xi=!1;function Co(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xi||gn==null||gn!==jl(r)||(r=gn,"selectionStart"in r&&ha(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ur&&Nr(ur,r)||(ur=r,r=Tl(mi,"onSelect"),0wn||(e.current=Ni[wn],Ni[wn]=null,wn--)}function Q(e,t){wn++,Ni[wn]=e.current,e.current=t}var $t={},ve=Vt($t),_e=Vt(!1),tn=$t;function On(e,t){var n=e.type.contextTypes;if(!n)return $t;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},s;for(s in n)l[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Re(e){return e=e.childContextTypes,e!=null}function Ll(){q(_e),q(ve)}function zo(e,t,n){if(ve.current!==$t)throw Error(S(168));Q(ve,t),Q(_e,n)}function Fc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(S(108,sp(e)||"Unknown",l));return Z({},n,r)}function Ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$t,tn=ve.current,Q(ve,e),Q(_e,_e.current),!0}function Do(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=Fc(e,t,tn),r.__reactInternalMemoizedMergedChildContext=e,q(_e),q(ve),Q(ve,e)):q(_e),Q(_e,n)}var dt=null,es=!1,zs=!1;function Uc(e){dt===null?dt=[e]:dt.push(e)}function N0(e){es=!0,Uc(e)}function Wt(){if(!zs&&dt!==null){zs=!0;var e=0,t=B;try{var n=dt;for(B=1;e>=i,l-=i,pt=1<<32-Ye(t)+l|n<N?(I=E,E=null):I=E.sibling;var C=x(d,E,h[N],k);if(C===null){E===null&&(E=I);break}e&&E&&C.alternate===null&&t(d,E),f=s(C,f,N),_===null?b=C:_.sibling=C,_=C,E=I}if(N===h.length)return n(d,E),J&&Qt(d,N),b;if(E===null){for(;NN?(I=E,E=null):I=E.sibling;var V=x(d,E,C.value,k);if(V===null){E===null&&(E=I);break}e&&E&&V.alternate===null&&t(d,E),f=s(V,f,N),_===null?b=V:_.sibling=V,_=V,E=I}if(C.done)return n(d,E),J&&Qt(d,N),b;if(E===null){for(;!C.done;N++,C=h.next())C=m(d,C.value,k),C!==null&&(f=s(C,f,N),_===null?b=C:_.sibling=C,_=C);return J&&Qt(d,N),b}for(E=r(d,E);!C.done;N++,C=h.next())C=y(E,d,N,C.value,k),C!==null&&(e&&C.alternate!==null&&E.delete(C.key===null?N:C.key),f=s(C,f,N),_===null?b=C:_.sibling=C,_=C);return e&&E.forEach(function(ce){return t(d,ce)}),J&&Qt(d,N),b}function j(d,f,h,k){if(typeof h=="object"&&h!==null&&h.type===mn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Vr:e:{for(var b=h.key,_=f;_!==null;){if(_.key===b){if(b=h.type,b===mn){if(_.tag===7){n(d,_.sibling),f=l(_,h.props.children),f.return=d,d=f;break e}}else if(_.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Et&&Io(b)===_.type){n(d,_.sibling),f=l(_,h.props),f.ref=Xn(d,_,h),f.return=d,d=f;break e}n(d,_);break}else t(d,_);_=_.sibling}h.type===mn?(f=Zt(h.props.children,d.mode,k,h.key),f.return=d,d=f):(k=vl(h.type,h.key,h.props,null,d.mode,k),k.ref=Xn(d,f,h),k.return=d,d=k)}return i(d);case hn:e:{for(_=h.key;f!==null;){if(f.key===_)if(f.tag===4&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(d,f.sibling),f=l(f,h.children||[]),f.return=d,d=f;break e}else{n(d,f);break}else t(d,f);f=f.sibling}f=Bs(h,d.mode,k),f.return=d,d=f}return i(d);case Et:return _=h._init,j(d,f,_(h._payload),k)}if(tr(h))return g(d,f,h,k);if(Wn(h))return w(d,f,h,k);tl(d,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,f!==null&&f.tag===6?(n(d,f.sibling),f=l(f,h),f.return=d,d=f):(n(d,f),f=$s(h,d.mode,k),f.return=d,d=f),i(d)):n(d,f)}return j}var Dn=Vc(!0),Wc=Vc(!1),Al=Vt(null),Ml=null,jn=null,ya=null;function va(){ya=jn=Ml=null}function wa(e){var t=Al.current;q(Al),e._currentValue=t}function bi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Tn(e,t){Ml=e,ya=jn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ce=!0),e.firstContext=null)}function We(e){var t=e._currentValue;if(ya!==e)if(e={context:e,memoizedValue:t,next:null},jn===null){if(Ml===null)throw Error(S(308));jn=e,Ml.dependencies={lanes:0,firstContext:e}}else jn=jn.next=e;return t}var Jt=null;function ka(e){Jt===null?Jt=[e]:Jt.push(e)}function Qc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,ka(t)):(n.next=l.next,l.next=n),t.interleaved=n,yt(e,r)}function yt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ct=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Kc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function At(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,yt(e,n)}return l=r.interleaved,l===null?(t.next=t,ka(r)):(t.next=l.next,l.next=t),r.interleaved=t,yt(e,n)}function pl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,aa(e,n)}}function Fo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?l=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?l=s=t:s=s.next=t}else l=s=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Il(e,t,n,r){var l=e.updateQueue;Ct=!1;var s=l.firstBaseUpdate,i=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var u=o,c=u.next;u.next=null,i===null?s=c:i.next=c,i=u;var p=e.alternate;p!==null&&(p=p.updateQueue,o=p.lastBaseUpdate,o!==i&&(o===null?p.firstBaseUpdate=c:o.next=c,p.lastBaseUpdate=u))}if(s!==null){var m=l.baseState;i=0,p=c=u=null,o=s;do{var x=o.lane,y=o.eventTime;if((r&x)===x){p!==null&&(p=p.next={eventTime:y,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,w=o;switch(x=t,y=n,w.tag){case 1:if(g=w.payload,typeof g=="function"){m=g.call(y,m,x);break e}m=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=w.payload,x=typeof g=="function"?g.call(y,m,x):g,x==null)break e;m=Z({},m,x);break e;case 2:Ct=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,x=l.effects,x===null?l.effects=[o]:x.push(o))}else y={eventTime:y,lane:x,tag:o.tag,payload:o.payload,callback:o.callback,next:null},p===null?(c=p=y,u=m):p=p.next=y,i|=x;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;x=o,o=x.next,x.next=null,l.lastBaseUpdate=x,l.shared.pending=null}}while(!0);if(p===null&&(u=m),l.baseState=u,l.firstBaseUpdate=c,l.lastBaseUpdate=p,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else s===null&&(l.shared.lanes=0);ln|=i,e.lanes=i,e.memoizedState=m}}function Uo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=As.transition;As.transition={};try{e(!1),t()}finally{B=n,As.transition=r}}function cd(){return Qe().memoizedState}function E0(e,t,n){var r=It(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},dd(e))fd(t,n);else if(n=Qc(e,t,n,r),n!==null){var l=je();Ze(n,e,r,l),pd(n,t,r)}}function C0(e,t,n){var r=It(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(dd(e))fd(t,l);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,o=s(i,n);if(l.hasEagerState=!0,l.eagerState=o,et(o,i)){var u=t.interleaved;u===null?(l.next=l,ka(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Qc(e,t,l,r),n!==null&&(l=je(),Ze(n,e,r,l),pd(n,t,r))}}function dd(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function fd(e,t){cr=Ul=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,aa(e,n)}}var $l={readContext:We,useCallback:me,useContext:me,useEffect:me,useImperativeHandle:me,useInsertionEffect:me,useLayoutEffect:me,useMemo:me,useReducer:me,useRef:me,useState:me,useDebugValue:me,useDeferredValue:me,useTransition:me,useMutableSource:me,useSyncExternalStore:me,useId:me,unstable_isNewReconciler:!1},_0={readContext:We,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:Bo,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ml(4194308,4,sd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ml(4194308,4,e,t)},useInsertionEffect:function(e,t){return ml(4,2,e,t)},useMemo:function(e,t){var n=st();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=st();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=E0.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:$o,useDebugValue:Ta,useDeferredValue:function(e){return st().memoizedState=e},useTransition:function(){var e=$o(!1),t=e[0];return e=b0.bind(null,e[1]),st().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,l=st();if(J){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),ue===null)throw Error(S(349));rn&30||Gc(r,t,n)}l.memoizedState=n;var s={value:n,getSnapshot:t};return l.queue=s,Bo(Zc.bind(null,r,s,e),[e]),r.flags|=2048,Tr(9,Yc.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=st(),t=ue.identifierPrefix;if(J){var n=ht,r=pt;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_r++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[it]=t,e[br]=r,jd(e,t,!1,!1),t.stateNode=e;e:{switch(i=ai(n,r),n){case"dialog":K("cancel",e),K("close",e),l=r;break;case"iframe":case"object":case"embed":K("load",e),l=r;break;case"video":case"audio":for(l=0;lIn&&(t.flags|=128,r=!0,Gn(s,!1),t.lanes=4194304)}else{if(!r)if(e=Fl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!J)return xe(t),null}else 2*te()-s.renderingStartTime>In&&n!==1073741824&&(t.flags|=128,r=!0,Gn(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=te(),t.sibling=null,n=G.current,Q(G,r?n&1|2:n&1),t):(xe(t),null);case 22:case 23:return Aa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ze&1073741824&&(xe(t),t.subtreeFlags&6&&(t.flags|=8192)):xe(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function A0(e,t){switch(xa(t),t.tag){case 1:return Re(t.type)&&Ll(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return An(),q(_e),q(ve),ba(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Sa(t),null;case 13:if(q(G),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(G),null;case 4:return An(),null;case 10:return wa(t.type._context),null;case 22:case 23:return Aa(),null;case 24:return null;default:return null}}var rl=!1,ge=!1,M0=typeof WeakSet=="function"?WeakSet:Set,P=null;function Sn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ee(e,t,r)}else n.current=null}function zi(e,t,n){try{n()}catch(r){ee(e,t,r)}}var Zo=!1;function I0(e,t){if(gi=_l,e=Tc(),ha(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,o=-1,u=-1,c=0,p=0,m=e,x=null;t:for(;;){for(var y;m!==n||l!==0&&m.nodeType!==3||(o=i+l),m!==s||r!==0&&m.nodeType!==3||(u=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(y=m.firstChild)!==null;)x=m,m=y;for(;;){if(m===e)break t;if(x===n&&++c===l&&(o=i),x===s&&++p===r&&(u=i),(y=m.nextSibling)!==null)break;m=x,x=m.parentNode}m=y}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(yi={focusedElem:e,selectionRange:n},_l=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var w=g.memoizedProps,j=g.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?w:Je(t.type,w),j);d.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(k){ee(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return g=Zo,Zo=!1,g}function dr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var s=l.destroy;l.destroy=void 0,s!==void 0&&zi(t,n,s)}l=l.next}while(l!==r)}}function rs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Di(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ed(e){var t=e.alternate;t!==null&&(e.alternate=null,Ed(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[it],delete t[br],delete t[ki],delete t[w0],delete t[k0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Cd(e){return e.tag===5||e.tag===3||e.tag===4}function eu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ai(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pl));else if(r!==4&&(e=e.child,e!==null))for(Ai(e,t,n),e=e.sibling;e!==null;)Ai(e,t,n),e=e.sibling}function Mi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mi(e,t,n),e=e.sibling;e!==null;)Mi(e,t,n),e=e.sibling}var de=null,Xe=!1;function bt(e,t,n){for(n=n.child;n!==null;)_d(e,t,n),n=n.sibling}function _d(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Jl,n)}catch{}switch(n.tag){case 5:ge||Sn(n,t);case 6:var r=de,l=Xe;de=null,bt(e,t,n),de=r,Xe=l,de!==null&&(Xe?(e=de,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):de.removeChild(n.stateNode));break;case 18:de!==null&&(Xe?(e=de,n=n.stateNode,e.nodeType===8?Os(e.parentNode,n):e.nodeType===1&&Os(e,n),wr(e)):Os(de,n.stateNode));break;case 4:r=de,l=Xe,de=n.stateNode.containerInfo,Xe=!0,bt(e,t,n),de=r,Xe=l;break;case 0:case 11:case 14:case 15:if(!ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var s=l,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&zi(n,t,i),l=l.next}while(l!==r)}bt(e,t,n);break;case 1:if(!ge&&(Sn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ee(n,t,o)}bt(e,t,n);break;case 21:bt(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,bt(e,t,n),ge=r):bt(e,t,n);break;default:bt(e,t,n)}}function tu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new M0),t.forEach(function(r){var l=K0.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function qe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~s}if(r=l,r=te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*U0(r/1960))-r,10e?16:e,Pt===null)var r=!1;else{if(e=Pt,Pt=null,Vl=0,U&6)throw Error(S(331));var l=U;for(U|=4,P=e.current;P!==null;){var s=P,i=s.child;if(P.flags&16){var o=s.deletions;if(o!==null){for(var u=0;ute()-za?Yt(e,0):Oa|=n),Te(e,t)}function Ad(e,t){t===0&&(e.mode&1?(t=qr,qr<<=1,!(qr&130023424)&&(qr=4194304)):t=1);var n=je();e=yt(e,t),e!==null&&(zr(e,t,n),Te(e,n))}function Q0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ad(e,n)}function K0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),Ad(e,n)}var Md;Md=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_e.current)Ce=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ce=!1,z0(e,t,n);Ce=!!(e.flags&131072)}else Ce=!1,J&&t.flags&1048576&&$c(t,Dl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xl(e,t),e=t.pendingProps;var l=On(t,ve.current);Tn(t,n),l=Ca(null,t,r,e,l,n);var s=_a();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Re(r)?(s=!0,Ol(t)):s=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Na(t),l.updater=ns,t.stateNode=l,l._reactInternals=t,Ci(t,r,e,n),t=Ti(null,t,r,!0,s,n)):(t.tag=0,J&&s&&ma(t),Ne(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(xl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=J0(r),e=Je(r,e),l){case 0:t=Ri(null,t,r,e,n);break e;case 1:t=Xo(null,t,r,e,n);break e;case 11:t=qo(null,t,r,e,n);break e;case 14:t=Jo(null,t,r,Je(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Ri(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Xo(e,t,r,l,n);case 3:e:{if(wd(t),e===null)throw Error(S(387));r=t.pendingProps,s=t.memoizedState,l=s.element,Kc(e,t),Il(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){l=Mn(Error(S(423)),t),t=Go(e,t,r,n,l);break e}else if(r!==l){l=Mn(Error(S(424)),t),t=Go(e,t,r,n,l);break e}else for(De=Dt(t.stateNode.containerInfo.firstChild),Ae=t,J=!0,Ge=null,n=Wc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zn(),r===l){t=vt(e,t,n);break e}Ne(e,t,r,n)}t=t.child}return t;case 5:return qc(t),e===null&&Si(t),r=t.type,l=t.pendingProps,s=e!==null?e.memoizedProps:null,i=l.children,vi(r,l)?i=null:s!==null&&vi(r,s)&&(t.flags|=32),vd(e,t),Ne(e,t,i,n),t.child;case 6:return e===null&&Si(t),null;case 13:return kd(e,t,n);case 4:return ja(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Dn(t,null,r,n):Ne(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),qo(e,t,r,l,n);case 7:return Ne(e,t,t.pendingProps,n),t.child;case 8:return Ne(e,t,t.pendingProps.children,n),t.child;case 12:return Ne(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,s=t.memoizedProps,i=l.value,Q(Al,r._currentValue),r._currentValue=i,s!==null)if(et(s.value,i)){if(s.children===l.children&&!_e.current){t=vt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){i=s.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=mt(-1,n&-n),u.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var p=c.pending;p===null?u.next=u:(u.next=p.next,p.next=u),c.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),bi(s.return,n,t),o.lanes|=n;break}u=u.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(S(341));i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),bi(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Ne(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Tn(t,n),l=We(l),r=r(l),t.flags|=1,Ne(e,t,r,n),t.child;case 14:return r=t.type,l=Je(r,t.pendingProps),l=Je(r.type,l),Jo(e,t,r,l,n);case 15:return gd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),xl(e,t),t.tag=1,Re(r)?(e=!0,Ol(t)):e=!1,Tn(t,n),hd(t,r,l),Ci(t,r,l,n),Ti(null,t,r,!0,e,n);case 19:return Nd(e,t,n);case 22:return yd(e,t,n)}throw Error(S(156,t.tag))};function Id(e,t){return dc(e,t)}function q0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function He(e,t,n,r){return new q0(e,t,n,r)}function Ia(e){return e=e.prototype,!(!e||!e.isReactComponent)}function J0(e){if(typeof e=="function")return Ia(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ra)return 11;if(e===la)return 14}return 2}function Ft(e,t){var n=e.alternate;return n===null?(n=He(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vl(e,t,n,r,l,s){var i=2;if(r=e,typeof e=="function")Ia(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case mn:return Zt(n.children,l,s,t);case na:i=8,l|=8;break;case Gs:return e=He(12,n,t,l|2),e.elementType=Gs,e.lanes=s,e;case Ys:return e=He(13,n,t,l),e.elementType=Ys,e.lanes=s,e;case Zs:return e=He(19,n,t,l),e.elementType=Zs,e.lanes=s,e;case qu:return ss(n,l,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qu:i=10;break e;case Ku:i=9;break e;case ra:i=11;break e;case la:i=14;break e;case Et:i=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=He(i,n,t,l),t.elementType=e,t.type=r,t.lanes=s,t}function Zt(e,t,n,r){return e=He(7,e,r,t),e.lanes=n,e}function ss(e,t,n,r){return e=He(22,e,r,t),e.elementType=qu,e.lanes=n,e.stateNode={isHidden:!1},e}function $s(e,t,n){return e=He(6,e,null,t),e.lanes=n,e}function Bs(e,t,n){return t=He(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function X0(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ns(0),this.expirationTimes=Ns(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ns(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fa(e,t,n,r,l,s,i,o,u){return e=new X0(e,t,n,o,u),t===1?(t=1,s===!0&&(t|=8)):t=0,s=He(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Na(s),e}function G0(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bd)}catch(e){console.error(e)}}Bd(),Bu.exports=Ie;var nh=Bu.exports,uu=nh;Js.createRoot=uu.createRoot,Js.hydrateRoot=uu.hydrateRoot;function Hd(e,t){return function(){return e.apply(t,arguments)}}const{toString:rh}=Object.prototype,{getPrototypeOf:Ha}=Object,{iterator:cs,toStringTag:Vd}=Symbol,ds=(e=>t=>{const n=rh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tt=e=>(e=e.toLowerCase(),t=>ds(t)===e),fs=e=>t=>typeof t===e,{isArray:Hn}=Array,Fn=fs("undefined");function Ir(e){return e!==null&&!Fn(e)&&e.constructor!==null&&!Fn(e.constructor)&&Pe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Wd=tt("ArrayBuffer");function lh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Wd(e.buffer),t}const sh=fs("string"),Pe=fs("function"),Qd=fs("number"),Fr=e=>e!==null&&typeof e=="object",ih=e=>e===!0||e===!1,wl=e=>{if(ds(e)!=="object")return!1;const t=Ha(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Vd in e)&&!(cs in e)},ah=e=>{if(!Fr(e)||Ir(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},oh=tt("Date"),uh=tt("File"),ch=tt("Blob"),dh=tt("FileList"),fh=e=>Fr(e)&&Pe(e.pipe),ph=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Pe(e.append)&&((t=ds(e))==="formdata"||t==="object"&&Pe(e.toString)&&e.toString()==="[object FormData]"))},hh=tt("URLSearchParams"),[mh,xh,gh,yh]=["ReadableStream","Request","Response","Headers"].map(tt),vh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ur(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,l;if(typeof e!="object"&&(e=[e]),Hn(e))for(r=0,l=e.length;r0;)if(l=n[r],t===l.toLowerCase())return l;return null}const Gt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qd=e=>!Fn(e)&&e!==Gt;function Bi(){const{caseless:e,skipUndefined:t}=qd(this)&&this||{},n={},r=(l,s)=>{const i=e&&Kd(n,s)||s;wl(n[i])&&wl(l)?n[i]=Bi(n[i],l):wl(l)?n[i]=Bi({},l):Hn(l)?n[i]=l.slice():(!t||!Fn(l))&&(n[i]=l)};for(let l=0,s=arguments.length;l(Ur(t,(l,s)=>{n&&Pe(l)?e[s]=Hd(l,n):e[s]=l},{allOwnKeys:r}),e),kh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},jh=(e,t,n,r)=>{let l,s,i;const o={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),s=l.length;s-- >0;)i=l[s],(!r||r(i,e,t))&&!o[i]&&(t[i]=e[i],o[i]=!0);e=n!==!1&&Ha(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Sh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},bh=e=>{if(!e)return null;if(Hn(e))return e;let t=e.length;if(!Qd(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Eh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ha(Uint8Array)),Ch=(e,t)=>{const r=(e&&e[cs]).call(e);let l;for(;(l=r.next())&&!l.done;){const s=l.value;t.call(e,s[0],s[1])}},_h=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Rh=tt("HTMLFormElement"),Th=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,l){return r.toUpperCase()+l}),cu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ph=tt("RegExp"),Jd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ur(n,(l,s)=>{let i;(i=t(l,s,e))!==!1&&(r[s]=i||l)}),Object.defineProperties(e,r)},Lh=e=>{Jd(e,(t,n)=>{if(Pe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Pe(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Oh=(e,t)=>{const n={},r=l=>{l.forEach(s=>{n[s]=!0})};return Hn(e)?r(e):r(String(e).split(t)),n},zh=()=>{},Dh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ah(e){return!!(e&&Pe(e.append)&&e[Vd]==="FormData"&&e[cs])}const Mh=e=>{const t=new Array(10),n=(r,l)=>{if(Fr(r)){if(t.indexOf(r)>=0)return;if(Ir(r))return r;if(!("toJSON"in r)){t[l]=r;const s=Hn(r)?[]:{};return Ur(r,(i,o)=>{const u=n(i,l+1);!Fn(u)&&(s[o]=u)}),t[l]=void 0,s}}return r};return n(e,0)},Ih=tt("AsyncFunction"),Fh=e=>e&&(Fr(e)||Pe(e))&&Pe(e.then)&&Pe(e.catch),Xd=((e,t)=>e?setImmediate:t?((n,r)=>(Gt.addEventListener("message",({source:l,data:s})=>{l===Gt&&s===n&&r.length&&r.shift()()},!1),l=>{r.push(l),Gt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Pe(Gt.postMessage)),Uh=typeof queueMicrotask<"u"?queueMicrotask.bind(Gt):typeof process<"u"&&process.nextTick||Xd,$h=e=>e!=null&&Pe(e[cs]),v={isArray:Hn,isArrayBuffer:Wd,isBuffer:Ir,isFormData:ph,isArrayBufferView:lh,isString:sh,isNumber:Qd,isBoolean:ih,isObject:Fr,isPlainObject:wl,isEmptyObject:ah,isReadableStream:mh,isRequest:xh,isResponse:gh,isHeaders:yh,isUndefined:Fn,isDate:oh,isFile:uh,isBlob:ch,isRegExp:Ph,isFunction:Pe,isStream:fh,isURLSearchParams:hh,isTypedArray:Eh,isFileList:dh,forEach:Ur,merge:Bi,extend:wh,trim:vh,stripBOM:kh,inherits:Nh,toFlatObject:jh,kindOf:ds,kindOfTest:tt,endsWith:Sh,toArray:bh,forEachEntry:Ch,matchAll:_h,isHTMLForm:Rh,hasOwnProperty:cu,hasOwnProp:cu,reduceDescriptors:Jd,freezeMethods:Lh,toObjectSet:Oh,toCamelCase:Th,noop:zh,toFiniteNumber:Dh,findKey:Kd,global:Gt,isContextDefined:qd,isSpecCompliantForm:Ah,toJSONObject:Mh,isAsyncFn:Ih,isThenable:Fh,setImmediate:Xd,asap:Uh,isIterable:$h};function M(e,t,n,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),l&&(this.response=l,this.status=l.status?l.status:null)}v.inherits(M,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:v.toJSONObject(this.config),code:this.code,status:this.status}}});const Gd=M.prototype,Yd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Yd[e]={value:e}});Object.defineProperties(M,Yd);Object.defineProperty(Gd,"isAxiosError",{value:!0});M.from=(e,t,n,r,l,s)=>{const i=Object.create(Gd);v.toFlatObject(e,i,function(p){return p!==Error.prototype},c=>c!=="isAxiosError");const o=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return M.call(i,o,u,n,r,l),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};const Bh=null;function Hi(e){return v.isPlainObject(e)||v.isArray(e)}function Zd(e){return v.endsWith(e,"[]")?e.slice(0,-2):e}function du(e,t,n){return e?e.concat(t).map(function(l,s){return l=Zd(l),!n&&s?"["+l+"]":l}).join(n?".":""):t}function Hh(e){return v.isArray(e)&&!e.some(Hi)}const Vh=v.toFlatObject(v,{},null,function(t){return/^is[A-Z]/.test(t)});function ps(e,t,n){if(!v.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=v.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,j){return!v.isUndefined(j[w])});const r=n.metaTokens,l=n.visitor||p,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&v.isSpecCompliantForm(t);if(!v.isFunction(l))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(v.isDate(g))return g.toISOString();if(v.isBoolean(g))return g.toString();if(!u&&v.isBlob(g))throw new M("Blob is not supported. Use a Buffer instead.");return v.isArrayBuffer(g)||v.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function p(g,w,j){let d=g;if(g&&!j&&typeof g=="object"){if(v.endsWith(w,"{}"))w=r?w:w.slice(0,-2),g=JSON.stringify(g);else if(v.isArray(g)&&Hh(g)||(v.isFileList(g)||v.endsWith(w,"[]"))&&(d=v.toArray(g)))return w=Zd(w),d.forEach(function(h,k){!(v.isUndefined(h)||h===null)&&t.append(i===!0?du([w],k,s):i===null?w:w+"[]",c(h))}),!1}return Hi(g)?!0:(t.append(du(j,w,s),c(g)),!1)}const m=[],x=Object.assign(Vh,{defaultVisitor:p,convertValue:c,isVisitable:Hi});function y(g,w){if(!v.isUndefined(g)){if(m.indexOf(g)!==-1)throw Error("Circular reference detected in "+w.join("."));m.push(g),v.forEach(g,function(d,f){(!(v.isUndefined(d)||d===null)&&l.call(t,d,v.isString(f)?f.trim():f,w,x))===!0&&y(d,w?w.concat(f):[f])}),m.pop()}}if(!v.isObject(e))throw new TypeError("data must be an object");return y(e),t}function fu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Va(e,t){this._pairs=[],e&&ps(e,this,t)}const ef=Va.prototype;ef.append=function(t,n){this._pairs.push([t,n])};ef.toString=function(t){const n=t?function(r){return t.call(this,r,fu)}:fu;return this._pairs.map(function(l){return n(l[0])+"="+n(l[1])},"").join("&")};function Wh(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tf(e,t,n){if(!t)return e;const r=n&&n.encode||Wh;v.isFunction(n)&&(n={serialize:n});const l=n&&n.serialize;let s;if(l?s=l(t,n):s=v.isURLSearchParams(t)?t.toString():new Va(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class pu{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){v.forEach(this.handlers,function(r){r!==null&&t(r)})}}const nf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qh=typeof URLSearchParams<"u"?URLSearchParams:Va,Kh=typeof FormData<"u"?FormData:null,qh=typeof Blob<"u"?Blob:null,Jh={isBrowser:!0,classes:{URLSearchParams:Qh,FormData:Kh,Blob:qh},protocols:["http","https","file","blob","url","data"]},Wa=typeof window<"u"&&typeof document<"u",Vi=typeof navigator=="object"&&navigator||void 0,Xh=Wa&&(!Vi||["ReactNative","NativeScript","NS"].indexOf(Vi.product)<0),Gh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Yh=Wa&&window.location.href||"http://localhost",Zh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wa,hasStandardBrowserEnv:Xh,hasStandardBrowserWebWorkerEnv:Gh,navigator:Vi,origin:Yh},Symbol.toStringTag,{value:"Module"})),ye={...Zh,...Jh};function em(e,t){return ps(e,new ye.classes.URLSearchParams,{visitor:function(n,r,l,s){return ye.isNode&&v.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function tm(e){return v.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nm(e){const t={},n=Object.keys(e);let r;const l=n.length;let s;for(r=0;r=n.length;return i=!i&&v.isArray(l)?l.length:i,u?(v.hasOwnProp(l,i)?l[i]=[l[i],r]:l[i]=r,!o):((!l[i]||!v.isObject(l[i]))&&(l[i]=[]),t(n,r,l[i],s)&&v.isArray(l[i])&&(l[i]=nm(l[i])),!o)}if(v.isFormData(e)&&v.isFunction(e.entries)){const n={};return v.forEachEntry(e,(r,l)=>{t(tm(r),l,n,0)}),n}return null}function rm(e,t,n){if(v.isString(e))try{return(t||JSON.parse)(e),v.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $r={transitional:nf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",l=r.indexOf("application/json")>-1,s=v.isObject(t);if(s&&v.isHTMLForm(t)&&(t=new FormData(t)),v.isFormData(t))return l?JSON.stringify(rf(t)):t;if(v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t)||v.isReadableStream(t))return t;if(v.isArrayBufferView(t))return t.buffer;if(v.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return em(t,this.formSerializer).toString();if((o=v.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ps(o?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||l?(n.setContentType("application/json",!1),rm(t)):t}],transformResponse:[function(t){const n=this.transitional||$r.transitional,r=n&&n.forcedJSONParsing,l=this.responseType==="json";if(v.isResponse(t)||v.isReadableStream(t))return t;if(t&&v.isString(t)&&(r&&!this.responseType||l)){const i=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(t,this.parseReviver)}catch(o){if(i)throw o.name==="SyntaxError"?M.from(o,M.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ye.classes.FormData,Blob:ye.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};v.forEach(["delete","get","head","post","put","patch"],e=>{$r.headers[e]={}});const lm=v.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sm=e=>{const t={};let n,r,l;return e&&e.split(` `).forEach(function(i){l=i.indexOf(":"),n=i.substring(0,l).trim().toLowerCase(),r=i.substring(l+1).trim(),!(!n||t[n]&&lm[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},hu=Symbol("internals");function Zn(e){return e&&String(e).trim().toLowerCase()}function kl(e){return e===!1||e==null?e:v.isArray(e)?e.map(kl):String(e)}function im(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const am=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Hs(e,t,n,r,l){if(v.isFunction(r))return r.call(this,t,n);if(l&&(t=n),!!v.isString(t)){if(v.isString(r))return t.indexOf(r)!==-1;if(v.isRegExp(r))return r.test(t)}}function om(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function um(e,t){const n=v.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(l,s,i){return this[r].call(this,t,l,s,i)},configurable:!0})})}let Le=class{constructor(t){t&&this.set(t)}set(t,n,r){const l=this;function s(o,u,c){const p=Zn(u);if(!p)throw new Error("header name must be a non-empty string");const m=v.findKey(l,p);(!m||l[m]===void 0||c===!0||c===void 0&&l[m]!==!1)&&(l[m||u]=kl(o))}const i=(o,u)=>v.forEach(o,(c,p)=>s(c,p,u));if(v.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(v.isString(t)&&(t=t.trim())&&!am(t))i(sm(t),n);else if(v.isObject(t)&&v.isIterable(t)){let o={},u,c;for(const p of t){if(!v.isArray(p))throw TypeError("Object iterator must return a key-value pair");o[c=p[0]]=(u=o[c])?v.isArray(u)?[...u,p[1]]:[u,p[1]]:p[1]}i(o,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=Zn(t),t){const r=v.findKey(this,t);if(r){const l=this[r];if(!n)return l;if(n===!0)return im(l);if(v.isFunction(n))return n.call(this,l,r);if(v.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Zn(t),t){const r=v.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Hs(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let l=!1;function s(i){if(i=Zn(i),i){const o=v.findKey(r,i);o&&(!n||Hs(r,r[o],o,n))&&(delete r[o],l=!0)}}return v.isArray(t)?t.forEach(s):s(t),l}clear(t){const n=Object.keys(this);let r=n.length,l=!1;for(;r--;){const s=n[r];(!t||Hs(this,this[s],s,t,!0))&&(delete this[s],l=!0)}return l}normalize(t){const n=this,r={};return v.forEach(this,(l,s)=>{const i=v.findKey(r,s);if(i){n[i]=kl(l),delete n[s];return}const o=t?om(s):String(s).trim();o!==s&&delete n[s],n[o]=kl(l),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return v.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=t&&v.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(l=>r.set(l)),r}static accessor(t){const r=(this[hu]=this[hu]={accessors:{}}).accessors,l=this.prototype;function s(i){const o=Zn(i);r[o]||(um(l,i),r[o]=!0)}return v.isArray(t)?t.forEach(s):s(t),this}};Le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);v.reduceDescriptors(Le.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});v.freezeMethods(Le);function Vs(e,t){const n=this||$r,r=t||n,l=Le.from(r.headers);let s=r.data;return v.forEach(e,function(o){s=o.call(n,s,l.normalize(),t?t.status:void 0)}),l.normalize(),s}function lf(e){return!!(e&&e.__CANCEL__)}function Vn(e,t,n){M.call(this,e??"canceled",M.ERR_CANCELED,t,n),this.name="CanceledError"}v.inherits(Vn,M,{__CANCEL__:!0});function sf(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new M("Request failed with status code "+n.status,[M.ERR_BAD_REQUEST,M.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function cm(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dm(e,t){e=e||10;const n=new Array(e),r=new Array(e);let l=0,s=0,i;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),p=r[s];i||(i=c),n[l]=u,r[l]=c;let m=s,x=0;for(;m!==l;)x+=n[m++],m=m%e;if(l=(l+1)%e,l===s&&(s=(s+1)%e),c-i{n=p,l=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const p=Date.now(),m=p-n;m>=r?i(c,p):(l=c,s||(s=setTimeout(()=>{s=null,i(l)},r-m)))},()=>l&&i(l)]}const Kl=(e,t,n=3)=>{let r=0;const l=dm(50,250);return fm(s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,u=i-r,c=l(u),p=i<=o;r=i;const m={loaded:i,total:o,progress:o?i/o:void 0,bytes:u,rate:c||void 0,estimated:c&&o&&p?(o-i)/c:void 0,event:s,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(m)},n)},mu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},xu=e=>(...t)=>v.asap(()=>e(...t)),pm=ye.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ye.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ye.origin),ye.navigator&&/(msie|trident)/i.test(ye.navigator.userAgent)):()=>!0,hm=ye.hasStandardBrowserEnv?{write(e,t,n,r,l,s,i){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];v.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),v.isString(r)&&o.push(`path=${r}`),v.isString(l)&&o.push(`domain=${l}`),s===!0&&o.push("secure"),v.isString(i)&&o.push(`SameSite=${i}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function mm(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xm(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function af(e,t,n){let r=!mm(t);return e&&(r||n==!1)?xm(e,t):t}const gu=e=>e instanceof Le?{...e}:e;function an(e,t){t=t||{};const n={};function r(c,p,m,x){return v.isPlainObject(c)&&v.isPlainObject(p)?v.merge.call({caseless:x},c,p):v.isPlainObject(p)?v.merge({},p):v.isArray(p)?p.slice():p}function l(c,p,m,x){if(v.isUndefined(p)){if(!v.isUndefined(c))return r(void 0,c,m,x)}else return r(c,p,m,x)}function s(c,p){if(!v.isUndefined(p))return r(void 0,p)}function i(c,p){if(v.isUndefined(p)){if(!v.isUndefined(c))return r(void 0,c)}else return r(void 0,p)}function o(c,p,m){if(m in t)return r(c,p);if(m in e)return r(void 0,c)}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:o,headers:(c,p,m)=>l(gu(c),gu(p),m,!0)};return v.forEach(Object.keys({...e,...t}),function(p){const m=u[p]||l,x=m(e[p],t[p],p);v.isUndefined(x)&&m!==o||(n[p]=x)}),n}const of=e=>{const t=an({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:s,headers:i,auth:o}=t;if(t.headers=i=Le.from(i),t.url=tf(af(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&i.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),v.isFormData(n)){if(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(v.isFunction(n.getHeaders)){const u=n.getHeaders(),c=["content-type","content-length"];Object.entries(u).forEach(([p,m])=>{c.includes(p.toLowerCase())&&i.set(p,m)})}}if(ye.hasStandardBrowserEnv&&(r&&v.isFunction(r)&&(r=r(t)),r||r!==!1&&pm(t.url))){const u=l&&s&&hm.read(s);u&&i.set(l,u)}return t},gm=typeof XMLHttpRequest<"u",ym=gm&&function(e){return new Promise(function(n,r){const l=of(e);let s=l.data;const i=Le.from(l.headers).normalize();let{responseType:o,onUploadProgress:u,onDownloadProgress:c}=l,p,m,x,y,g;function w(){y&&y(),g&&g(),l.cancelToken&&l.cancelToken.unsubscribe(p),l.signal&&l.signal.removeEventListener("abort",p)}let j=new XMLHttpRequest;j.open(l.method.toUpperCase(),l.url,!0),j.timeout=l.timeout;function d(){if(!j)return;const h=Le.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),b={data:!o||o==="text"||o==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:h,config:e,request:j};sf(function(E){n(E),w()},function(E){r(E),w()},b),j=null}"onloadend"in j?j.onloadend=d:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(d)},j.onabort=function(){j&&(r(new M("Request aborted",M.ECONNABORTED,e,j)),j=null)},j.onerror=function(k){const b=k&&k.message?k.message:"Network Error",_=new M(b,M.ERR_NETWORK,e,j);_.event=k||null,r(_),j=null},j.ontimeout=function(){let k=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const b=l.transitional||nf;l.timeoutErrorMessage&&(k=l.timeoutErrorMessage),r(new M(k,b.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,j)),j=null},s===void 0&&i.setContentType(null),"setRequestHeader"in j&&v.forEach(i.toJSON(),function(k,b){j.setRequestHeader(b,k)}),v.isUndefined(l.withCredentials)||(j.withCredentials=!!l.withCredentials),o&&o!=="json"&&(j.responseType=l.responseType),c&&([x,g]=Kl(c,!0),j.addEventListener("progress",x)),u&&j.upload&&([m,y]=Kl(u),j.upload.addEventListener("progress",m),j.upload.addEventListener("loadend",y)),(l.cancelToken||l.signal)&&(p=h=>{j&&(r(!h||h.type?new Vn(null,e,j):h),j.abort(),j=null)},l.cancelToken&&l.cancelToken.subscribe(p),l.signal&&(l.signal.aborted?p():l.signal.addEventListener("abort",p)));const f=cm(l.url);if(f&&ye.protocols.indexOf(f)===-1){r(new M("Unsupported protocol "+f+":",M.ERR_BAD_REQUEST,e));return}j.send(s||null)})},vm=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,l;const s=function(c){if(!l){l=!0,o();const p=c instanceof Error?c:this.reason;r.abort(p instanceof M?p:new Vn(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{i=null,s(new M(`timeout ${t} of ms exceeded`,M.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:u}=r;return u.unsubscribe=()=>v.asap(o),u}},wm=function*(e,t){let n=e.byteLength;if(n{const l=km(e,t);let s=0,i,o=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:p}=await l.next();if(c){o(),u.close();return}let m=p.byteLength;if(n){let x=s+=m;n(x)}u.enqueue(new Uint8Array(p))}catch(c){throw o(c),c}},cancel(u){return o(u),l.return()}},{highWaterMark:2})},vu=64*1024,{isFunction:il}=v,jm=(({Request:e,Response:t})=>({Request:e,Response:t}))(v.global),{ReadableStream:wu,TextEncoder:ku}=v.global,Nu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Sm=e=>{e=v.merge.call({skipUndefined:!0},jm,e);const{fetch:t,Request:n,Response:r}=e,l=t?il(t):typeof fetch=="function",s=il(n),i=il(r);if(!l)return!1;const o=l&&il(wu),u=l&&(typeof ku=="function"?(g=>w=>g.encode(w))(new ku):async g=>new Uint8Array(await new n(g).arrayBuffer())),c=s&&o&&Nu(()=>{let g=!1;const w=new n(ye.origin,{body:new wu,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!w}),p=i&&o&&Nu(()=>v.isReadableStream(new r("").body)),m={stream:p&&(g=>g.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!m[g]&&(m[g]=(w,j)=>{let d=w&&w[g];if(d)return d.call(w);throw new M(`Response type '${g}' is not supported`,M.ERR_NOT_SUPPORT,j)})});const x=async g=>{if(g==null)return 0;if(v.isBlob(g))return g.size;if(v.isSpecCompliantForm(g))return(await new n(ye.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(v.isArrayBufferView(g)||v.isArrayBuffer(g))return g.byteLength;if(v.isURLSearchParams(g)&&(g=g+""),v.isString(g))return(await u(g)).byteLength},y=async(g,w)=>{const j=v.toFiniteNumber(g.getContentLength());return j??x(w)};return async g=>{let{url:w,method:j,data:d,signal:f,cancelToken:h,timeout:k,onDownloadProgress:b,onUploadProgress:_,responseType:E,headers:N,withCredentials:I="same-origin",fetchOptions:C}=of(g),V=t||fetch;E=E?(E+"").toLowerCase():"text";let ce=vm([f,h&&h.toAbortSignal()],k),ae=null;const H=ce&&ce.unsubscribe&&(()=>{ce.unsubscribe()});let kt;try{if(_&&c&&j!=="get"&&j!=="head"&&(kt=await y(N,d))!==0){let $=new n(w,{method:"POST",body:d,duplex:"half"}),W;if(v.isFormData(d)&&(W=$.headers.get("content-type"))&&N.setContentType(W),$.body){const[nt,we]=mu(kt,Kl(xu(_)));d=yu($.body,vu,nt,we)}}v.isString(I)||(I=I?"include":"omit");const he=s&&"credentials"in n.prototype,Nt={...C,signal:ce,method:j.toUpperCase(),headers:N.normalize().toJSON(),body:d,duplex:"half",credentials:he?I:void 0};ae=s&&new n(w,Nt);let R=await(s?V(ae,C):V(w,Nt));const O=p&&(E==="stream"||E==="response");if(p&&(b||O&&H)){const $={};["status","statusText","headers"].forEach(jt=>{$[jt]=R[jt]});const W=v.toFiniteNumber(R.headers.get("content-length")),[nt,we]=b&&mu(W,Kl(xu(b),!0))||[];R=new r(yu(R.body,vu,nt,()=>{we&&we(),H&&H()}),$)}E=E||"text";let A=await m[v.findKey(m,E)||"text"](R,g);return!O&&H&&H(),await new Promise(($,W)=>{sf($,W,{data:A,headers:Le.from(R.headers),status:R.status,statusText:R.statusText,config:g,request:ae})})}catch(he){throw H&&H(),he&&he.name==="TypeError"&&/Load failed|fetch/i.test(he.message)?Object.assign(new M("Network Error",M.ERR_NETWORK,g,ae),{cause:he.cause||he}):M.from(he,he&&he.code,g,ae)}}},bm=new Map,uf=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:l}=t,s=[r,l,n];let i=s.length,o=i,u,c,p=bm;for(;o--;)u=s[o],c=p.get(u),c===void 0&&p.set(u,c=o?new Map:Sm(t)),p=c;return c};uf();const Qa={http:Bh,xhr:ym,fetch:{get:uf}};v.forEach(Qa,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ju=e=>`- ${e}`,Em=e=>v.isFunction(e)||e===null||e===!1;function Cm(e,t){e=v.isArray(e)?e:[e];const{length:n}=e;let r,l;const s={};for(let i=0;i`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?i.length>1?`since : `+i.map(ju).join(` `):" "+ju(i[0]):"as no adapter specified";throw new M("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return l}const cf={getAdapter:Cm,adapters:Qa};function Ws(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vn(null,e)}function Su(e){return Ws(e),e.headers=Le.from(e.headers),e.data=Vs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),cf.getAdapter(e.adapter||$r.adapter,e)(e).then(function(r){return Ws(e),r.data=Vs.call(e,e.transformResponse,r),r.headers=Le.from(r.headers),r},function(r){return lf(r)||(Ws(e),r&&r.response&&(r.response.data=Vs.call(e,e.transformResponse,r.response),r.response.headers=Le.from(r.response.headers))),Promise.reject(r)})}const df="1.13.2",hs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const bu={};hs.transitional=function(t,n,r){function l(s,i){return"[Axios v"+df+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,o)=>{if(t===!1)throw new M(l(i," has been removed"+(n?" in "+n:"")),M.ERR_DEPRECATED);return n&&!bu[i]&&(bu[i]=!0,console.warn(l(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,o):!0}};hs.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function _m(e,t,n){if(typeof e!="object")throw new M("options must be an object",M.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let l=r.length;for(;l-- >0;){const s=r[l],i=t[s];if(i){const o=e[s],u=o===void 0||i(o,s,e);if(u!==!0)throw new M("option "+s+" must be "+u,M.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new M("Unknown option "+s,M.ERR_BAD_OPTION)}}const Nl={assertOptions:_m,validators:hs},lt=Nl.validators;let en=class{constructor(t){this.defaults=t||{},this.interceptors={request:new pu,response:new pu}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const s=l.stack?l.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=an(this.defaults,n);const{transitional:r,paramsSerializer:l,headers:s}=n;r!==void 0&&Nl.assertOptions(r,{silentJSONParsing:lt.transitional(lt.boolean),forcedJSONParsing:lt.transitional(lt.boolean),clarifyTimeoutError:lt.transitional(lt.boolean)},!1),l!=null&&(v.isFunction(l)?n.paramsSerializer={serialize:l}:Nl.assertOptions(l,{encode:lt.function,serialize:lt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Nl.assertOptions(n,{baseUrl:lt.spelling("baseURL"),withXsrfToken:lt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&v.merge(s.common,s[n.method]);s&&v.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=Le.concat(i,s);const o=[];let u=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(u=u&&w.synchronous,o.unshift(w.fulfilled,w.rejected))});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let p,m=0,x;if(!u){const g=[Su.bind(this),void 0];for(g.unshift(...o),g.push(...c),x=g.length,p=Promise.resolve(n);m{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](l);r._listeners=null}),this.promise.then=l=>{let s;const i=new Promise(o=>{r.subscribe(o),s=o}).then(l);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,o){r.reason||(r.reason=new Vn(s,i,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ff(function(l){t=l}),cancel:t}}};function Tm(e){return function(n){return e.apply(null,n)}}function Pm(e){return v.isObject(e)&&e.isAxiosError===!0}const Wi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Wi).forEach(([e,t])=>{Wi[t]=e});function pf(e){const t=new en(e),n=Hd(en.prototype.request,t);return v.extend(n,en.prototype,t,{allOwnKeys:!0}),v.extend(n,t,null,{allOwnKeys:!0}),n.create=function(l){return pf(an(e,l))},n}const z=pf($r);z.Axios=en;z.CanceledError=Vn;z.CancelToken=Rm;z.isCancel=lf;z.VERSION=df;z.toFormData=ps;z.AxiosError=M;z.Cancel=z.CanceledError;z.all=function(t){return Promise.all(t)};z.spread=Tm;z.isAxiosError=Pm;z.mergeConfig=an;z.AxiosHeaders=Le;z.formToJSON=e=>rf(v.isHTMLForm(e)?new FormData(e):e);z.getAdapter=cf.getAdapter;z.HttpStatusCode=Wi;z.default=z;const{Axios:lx,AxiosError:sx,CanceledError:ix,isCancel:ax,CancelToken:ox,VERSION:ux,all:cx,Cancel:dx,isAxiosError:fx,spread:px,toFormData:hx,AxiosHeaders:mx,HttpStatusCode:xx,formToJSON:gx,getAdapter:yx,mergeConfig:vx}=z;/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Lm={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"};/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Om=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),D=(e,t)=>{const n=T.forwardRef(({color:r="currentColor",size:l=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:o="",children:u,...c},p)=>T.createElement("svg",{ref:p,...Lm,width:l,height:l,stroke:r,strokeWidth:i?Number(s)*24/Number(l):s,className:["lucide",`lucide-${Om(e)}`,o].join(" "),...c},[...t.map(([m,x])=>T.createElement(m,x)),...Array.isArray(u)?u:[u]]));return n.displayName=`${e}`,n};/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zm=D("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hf=D("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pn=D("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qs=D("Briefcase",[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lr=D("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dm=D("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Am=D("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const al=D("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mf=D("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xf=D("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ks=D("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mm=D("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Im=D("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fm=D("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Eu=D("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lr=D("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"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Um=D("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gf=D("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yf=D("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cu=D("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _u=D("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"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vf=D("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qi=D("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $m=D("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qs=D("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ru=D("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wf=D("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ki=D("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bm=D("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kf=D("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hr=D("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Hm=D("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vm=D("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wm=D("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qi=D("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qm=D("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nf=D("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tu=D("Unlock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jf=D("UploadCloud",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sf=D("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Km=D("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bt=D("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ft=D("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function bf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t{w(!0);try{const N=await z.get(`${e}/companies?skip=${u*k}&limit=${k}&search=${p}&sort_by=${x}`);s(N.data.items),o(N.data.total)}catch(N){console.error("Failed to fetch companies",N)}finally{w(!1)}};T.useEffect(()=>{const N=setTimeout(b,300);return()=>clearTimeout(N)},[u,p,n,x]);const _=async N=>{d(N);try{await z.post(`${e}/enrich/discover`,{company_id:N}),setTimeout(b,2e3)}catch{alert("Discovery Error")}finally{d(null)}},E=async N=>{d(N);try{await z.post(`${e}/enrich/analyze`,{company_id:N}),setTimeout(b,2e3)}catch{alert("Analysis Error")}finally{d(null)}};return a.jsxs("div",{className:"flex flex-col h-full bg-white dark:bg-slate-900 transition-colors",children:[a.jsxs("div",{className:"flex flex-col md:flex-row gap-4 p-4 border-b border-slate-200 dark:border-slate-800 items-center justify-between bg-slate-50 dark:bg-slate-950/50",children:[a.jsxs("div",{className:"flex items-center gap-2 text-slate-700 dark:text-slate-300 font-bold text-lg",children:[a.jsx(Lr,{className:"h-5 w-5"}),a.jsxs("h2",{children:["Companies (",i,")"]})]}),a.jsxs("div",{className:"flex flex-1 w-full md:w-auto items-center gap-2 max-w-2xl",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(hr,{className:"absolute left-3 top-2.5 h-4 w-4 text-slate-400"}),a.jsx("input",{type:"text",placeholder:"Search companies...",className:"w-full pl-10 pr-4 py-2 bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm text-slate-900 dark:text-slate-200 focus:ring-2 focus:ring-blue-500 outline-none",value:p,onChange:N=>{m(N.target.value),c(0)}})]}),a.jsxs("div",{className:"relative flex items-center text-slate-700 dark:text-slate-300",children:[a.jsx(hf,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 pointer-events-none"}),a.jsxs("select",{value:x,onChange:N=>y(N.target.value),className:"pl-8 pr-4 py-2 appearance-none bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm focus:ring-2 focus:ring-blue-500 outline-none",children:[a.jsx("option",{value:"name_asc",children:"Alphabetical"}),a.jsx("option",{value:"created_desc",children:"Newest First"}),a.jsx("option",{value:"updated_desc",children:"Last Modified"})]})]}),a.jsxs("div",{className:"flex items-center bg-slate-200 dark:bg-slate-800 p-1 rounded-md text-slate-700 dark:text-slate-300",children:[a.jsx("button",{onClick:()=>h("grid"),className:X("p-1.5 rounded",f==="grid"&&"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white"),title:"Grid View",children:a.jsx(gf,{className:"h-4 w-4"})}),a.jsx("button",{onClick:()=>h("list"),className:X("p-1.5 rounded",f==="list"&&"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white"),title:"List View",children:a.jsx(yf,{className:"h-4 w-4"})})]}),a.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white text-sm font-bold rounded-md shadow-sm",children:[a.jsx(Sf,{className:"h-4 w-4"})," ",a.jsx("span",{className:"hidden md:inline",children:"Import"})]})]})]}),a.jsxs("div",{className:"flex-1 overflow-auto bg-slate-50 dark:bg-slate-950/30",children:[g&&a.jsx("div",{className:"p-4 text-center text-slate-500",children:"Loading companies..."}),l.length===0&&!g?a.jsxs("div",{className:"p-12 text-center text-slate-500",children:[a.jsx(Lr,{className:"h-12 w-12 mx-auto mb-4 opacity-20"}),a.jsx("p",{className:"text-lg font-medium",children:"No companies found"}),a.jsx("p",{className:"text-slate-400 mt-2",children:"Import a list or create one manually to get started."})]}):f==="grid"?a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 p-4",children:l.map(N=>a.jsxs("div",{onClick:()=>t(N.id),className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-lg p-4 hover:shadow-lg transition-all flex flex-col gap-3 group cursor-pointer border-l-4",style:{borderLeftColor:N.status==="ENRICHED"?"#22c55e":N.status==="DISCOVERED"?"#3b82f6":"#94a3b8"},children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"font-bold text-slate-900 dark:text-white text-sm truncate",title:N.name,children:N.name}),a.jsx("div",{className:"flex items-center gap-1 text-[10px] text-slate-500 dark:text-slate-400 font-medium",children:N.city&&N.country?a.jsxs(a.Fragment,{children:[a.jsx(Qi,{className:"h-3 w-3"})," ",N.city," ",a.jsxs("span",{className:"text-slate-400",children:["(",N.country,")"]})]}):a.jsx("span",{className:"italic opacity-50",children:"-"})})]}),a.jsx("div",{className:"flex gap-1 ml-2",children:j===N.id?a.jsx(Cu,{className:"h-4 w-4 animate-spin text-blue-500"}):N.status==="NEW"||!N.website||N.website==="k.A."?a.jsx("button",{onClick:I=>{I.stopPropagation(),_(N.id)},className:"p-1.5 bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-400 rounded hover:bg-blue-600 hover:text-white transition-colors",children:a.jsx(hr,{className:"h-3.5 w-3.5"})}):a.jsx("button",{onClick:I=>{I.stopPropagation(),E(N.id)},className:"p-1.5 bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 rounded hover:bg-blue-600 hover:text-white transition-colors",children:a.jsx(Ru,{className:"h-3.5 w-3.5 fill-current"})})})]}),a.jsxs("div",{className:"space-y-2 pt-2 border-t border-slate-100 dark:border-slate-800/50",children:[N.website&&N.website!=="k.A."?a.jsxs("div",{className:"flex items-center gap-2 text-xs text-blue-600 dark:text-blue-400 font-medium truncate",children:[a.jsx(lr,{className:"h-3 w-3"}),a.jsx("span",{children:new URL(N.website).hostname.replace("www.","")})]}):a.jsx("div",{className:"text-xs text-slate-400 italic",children:"No website found"}),a.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-wider truncate",children:N.industry_ai||"Industry Pending"})]})]},N.id))}):a.jsxs("table",{className:"min-w-full divide-y divide-slate-200 dark:divide-slate-800",children:[a.jsx("thead",{className:"bg-slate-100 dark:bg-slate-950/50",children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Company"}),a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Location"}),a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Website"}),a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"AI Industry"}),a.jsx("th",{scope:"col",className:"relative px-3 py-3.5",children:a.jsx("span",{className:"sr-only",children:"Actions"})})]})}),a.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800 bg-white dark:bg-slate-900",children:l.map(N=>a.jsxs("tr",{onClick:()=>t(N.id),className:"hover:bg-slate-50 dark:hover:bg-slate-800/50 cursor-pointer",children:[a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-slate-900 dark:text-white",children:N.name}),a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:N.city&&N.country?`${N.city}, (${N.country})`:"-"}),a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-blue-600 dark:text-blue-400",children:N.website&&N.website!=="k.A."?a.jsx("a",{href:N.website,target:"_blank",rel:"noreferrer",children:new URL(N.website).hostname.replace("www.","")}):"n/a"}),a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:N.industry_ai||"Pending"}),a.jsx("td",{className:"relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0",children:j===N.id?a.jsx(Cu,{className:"h-4 w-4 animate-spin text-blue-500"}):N.status==="NEW"||!N.website||N.website==="k.A."?a.jsx("button",{onClick:I=>{I.stopPropagation(),_(N.id)},className:"text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400",children:a.jsx(hr,{className:"h-4 w-4"})}):a.jsx("button",{onClick:I=>{I.stopPropagation(),E(N.id)},className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300",children:a.jsx(Ru,{className:"h-4 w-4 fill-current"})})})]},N.id))})]})]}),a.jsxs("div",{className:"p-3 border-t border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 flex justify-between items-center text-xs text-slate-500 dark:text-slate-400",children:[a.jsxs("span",{children:[i," Companies total"]}),a.jsxs("div",{className:"flex gap-1 items-center",children:[a.jsx("button",{disabled:u===0,onClick:()=>c(N=>N-1),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-30",children:a.jsx(mf,{className:"h-4 w-4"})}),a.jsxs("span",{children:["Page ",u+1]}),a.jsx("button",{disabled:(u+1)*k>=i,onClick:()=>c(N=>N+1),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-30",children:a.jsx(xf,{className:"h-4 w-4"})})]})]})]})}function Jm({apiBase:e,onCompanyClick:t,onContactClick:n}){const[r,l]=T.useState([]),[s,i]=T.useState(0),[o,u]=T.useState(0),[c,p]=T.useState(""),[m,x]=T.useState("name_asc"),[y,g]=T.useState(!1),[w,j]=T.useState("grid"),d=50,[f,h]=T.useState(!1),[k,b]=T.useState(""),[_,E]=T.useState(null),N=()=>{g(!0),z.get(`${e}/contacts/all?skip=${o*d}&limit=${d}&search=${c}&sort_by=${m}`).then(C=>{l(C.data.items),i(C.data.total)}).finally(()=>g(!1))};T.useEffect(()=>{const C=setTimeout(N,300);return()=>clearTimeout(C)},[o,c,m]);const I=async()=>{if(k){E("Parsing...");try{const V=k.split(` `).filter(ae=>ae.trim()).map(ae=>{const H=ae.split(/[;,|]+/).map(kt=>kt.trim());return H.length<3?null:{company_name:H[0],first_name:H[1],last_name:H[2],email:H[3]||null,job_title:H[4]||null}}).filter(Boolean);if(V.length===0){E("Error: No valid contacts found. Format: Company, First, Last, Email");return}E(`Importing ${V.length} contacts...`);const ce=await z.post(`${e}/contacts/bulk`,{contacts:V});E(`Success! Added: ${ce.data.added}, Created Companies: ${ce.data.companies_created}, Skipped: ${ce.data.skipped}`),b(""),setTimeout(()=>{h(!1),E(null),N()},2e3)}catch(C){console.error(C),E("Import Failed.")}}};return a.jsxs("div",{className:"flex flex-col h-full bg-white dark:bg-slate-900 transition-colors",children:[a.jsxs("div",{className:"flex flex-col md:flex-row gap-4 p-4 border-b border-slate-200 dark:border-slate-800 items-center justify-between bg-slate-50 dark:bg-slate-950/50",children:[a.jsxs("div",{className:"flex items-center gap-2 text-slate-700 dark:text-slate-300 font-bold text-lg",children:[a.jsx(Bt,{className:"h-5 w-5"}),a.jsxs("h2",{children:["All Contacts (",s,")"]})]}),a.jsxs("div",{className:"flex flex-1 w-full md:w-auto items-center gap-2 max-w-2xl",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(hr,{className:"absolute left-3 top-2.5 h-4 w-4 text-slate-400"}),a.jsx("input",{type:"text",placeholder:"Search contacts...",className:"w-full pl-10 pr-4 py-2 bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm text-slate-900 dark:text-slate-200 focus:ring-2 focus:ring-blue-500 outline-none",value:c,onChange:C=>{p(C.target.value),u(0)}})]}),a.jsxs("div",{className:"relative flex items-center text-slate-700 dark:text-slate-300",children:[a.jsx(hf,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 pointer-events-none"}),a.jsxs("select",{value:m,onChange:C=>x(C.target.value),className:"pl-8 pr-4 py-2 appearance-none bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm focus:ring-2 focus:ring-blue-500 outline-none",children:[a.jsx("option",{value:"name_asc",children:"Alphabetical"}),a.jsx("option",{value:"created_desc",children:"Newest First"}),a.jsx("option",{value:"updated_desc",children:"Last Modified"})]})]}),a.jsxs("div",{className:"flex items-center bg-slate-200 dark:bg-slate-800 p-1 rounded-md text-slate-700 dark:text-slate-300",children:[a.jsx("button",{onClick:()=>j("grid"),className:X("p-1.5 rounded",w==="grid"&&"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white"),title:"Grid View",children:a.jsx(gf,{className:"h-4 w-4"})}),a.jsx("button",{onClick:()=>j("list"),className:X("p-1.5 rounded",w==="list"&&"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white"),title:"List View",children:a.jsx(yf,{className:"h-4 w-4"})})]}),a.jsxs("button",{onClick:()=>h(!0),className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white text-sm font-bold rounded-md shadow-sm",children:[a.jsx(Sf,{className:"h-4 w-4"})," ",a.jsx("span",{className:"hidden md:inline",children:"Import"})]})]})]}),f&&a.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-white dark:bg-slate-900 rounded-xl shadow-2xl w-full max-w-lg border border-slate-200 dark:border-slate-800 flex flex-col max-h-[90vh]",children:[a.jsxs("div",{className:"p-4 border-b border-slate-200 dark:border-slate-800 flex justify-between items-center",children:[a.jsx("h3",{className:"font-bold text-slate-900 dark:text-white",children:"Bulk Import Contacts"}),a.jsx("button",{onClick:()=>h(!1),className:"text-slate-500 hover:text-red-500",children:a.jsx(ft,{className:"h-5 w-5"})})]}),a.jsxs("div",{className:"p-4 flex-1 overflow-y-auto",children:[a.jsxs("p",{className:"text-sm text-slate-600 dark:text-slate-400 mb-2",children:["Paste CSV data (no header). Format:",a.jsx("br",{}),a.jsx("code",{className:"bg-slate-100 dark:bg-slate-800 px-1 py-0.5 rounded text-xs",children:"Company Name, First Name, Last Name, Email, Job Title"})]}),a.jsx("textarea",{className:"w-full h-48 bg-slate-50 dark:bg-slate-950 border border-slate-300 dark:border-slate-800 rounded p-2 text-xs font-mono text-slate-800 dark:text-slate-200 focus:ring-2 focus:ring-blue-500 outline-none",placeholder:"Acme Corp, John, Doe, john@acme.com, CEO",value:k,onChange:C=>b(C.target.value)}),_&&a.jsx("div",{className:X("mt-2 text-sm font-bold p-2 rounded",_.includes("Success")?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"),children:_})]}),a.jsxs("div",{className:"p-4 border-t border-slate-200 dark:border-slate-800 flex justify-end gap-2",children:[a.jsx("button",{onClick:()=>h(!1),className:"px-4 py-2 text-sm text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white",children:"Cancel"}),a.jsx("button",{onClick:I,className:"px-4 py-2 bg-blue-600 text-white text-sm font-bold rounded hover:bg-blue-500",children:"Run Import"})]})]})}),a.jsxs("div",{className:"flex-1 overflow-auto bg-slate-50 dark:bg-slate-950/30",children:[y&&a.jsx("div",{className:"p-4 text-center text-slate-500",children:"Loading contacts..."}),r.length===0&&!y?a.jsxs("div",{className:"p-12 text-center text-slate-500",children:[a.jsx(Bt,{className:"h-12 w-12 mx-auto mb-4 opacity-20"}),a.jsx("p",{className:"text-lg font-medium",children:"No contacts found"}),a.jsx("p",{className:"text-slate-400 mt-2",children:"Import a list or create one manually to get started."})]}):w==="grid"?a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 p-4",children:r.map(C=>a.jsxs("div",{onClick:()=>n(C.company_id,C.id),className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-lg p-4 hover:shadow-lg transition-all flex flex-col gap-3 group cursor-pointer border-l-4 border-l-slate-400",children:[a.jsxs("div",{className:"font-bold text-slate-900 dark:text-white text-sm",children:[C.title," ",C.first_name," ",C.last_name]}),a.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400",children:C.job_title||"No Title"}),a.jsxs("div",{className:"space-y-2 pt-2 border-t border-slate-100 dark:border-slate-800/50",children:[a.jsxs("div",{onClick:V=>{V.stopPropagation(),t(C.company_id)},className:"flex items-center gap-2 text-xs font-bold text-slate-600 dark:text-slate-400 hover:text-blue-500 dark:hover:text-blue-400 cursor-pointer",children:[a.jsx(Lr,{className:"h-3 w-3"})," ",C.company_name]}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[a.jsx(vf,{className:"h-3 w-3"})," ",C.email||"-"]})]})]},C.id))}):a.jsxs("table",{className:"min-w-full divide-y divide-slate-200 dark:divide-slate-800",children:[a.jsx("thead",{className:"bg-slate-100 dark:bg-slate-950/50",children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Name"}),a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Company"}),a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Email"}),a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Role"}),a.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Status"})]})}),a.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800 bg-white dark:bg-slate-900",children:r.map(C=>a.jsxs("tr",{onClick:()=>n(C.company_id,C.id),className:"hover:bg-slate-50 dark:hover:bg-slate-800/50 cursor-pointer",children:[a.jsxs("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-slate-900 dark:text-white",children:[C.title," ",C.first_name," ",C.last_name]}),a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:a.jsx("div",{onClick:V=>{V.stopPropagation(),t(C.company_id)},className:"font-bold text-slate-600 dark:text-slate-400 hover:text-blue-500 dark:hover:text-blue-400 cursor-pointer",children:C.company_name})}),a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:C.email||"-"}),a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:C.role||"-"}),a.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:C.status||"-"})]},C.id))})]})]}),a.jsxs("div",{className:"p-3 border-t border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 flex justify-between items-center text-xs text-slate-500 dark:text-slate-400",children:[a.jsxs("span",{children:[s," Contacts total"]}),a.jsxs("div",{className:"flex gap-1 items-center",children:[a.jsx("button",{disabled:o===0,onClick:()=>u(C=>C-1),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-30",children:a.jsx(mf,{className:"h-4 w-4"})}),a.jsxs("span",{children:["Page ",o+1]}),a.jsx("button",{disabled:(o+1)*d>=s,onClick:()=>u(C=>C+1),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-30",children:a.jsx(xf,{className:"h-4 w-4"})})]})]})]})}function Xm({isOpen:e,onClose:t,onSuccess:n,apiBase:r}){const[l,s]=T.useState(""),[i,o]=T.useState(!1);if(!e)return null;const u=async()=>{var p,m;const c=l.split(` `).map(x=>x.trim()).filter(x=>x.length>0);if(c.length!==0){o(!0);try{await z.post(`${r}/companies/bulk`,{names:c}),s(""),n(),t()}catch(x){console.error(x);const y=((m=(p=x.response)==null?void 0:p.data)==null?void 0:m.detail)||x.message||"Unknown Error";alert(`Import failed: ${y}`)}finally{o(!1)}}};return a.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-xl w-full max-w-lg shadow-2xl",children:[a.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-slate-800",children:[a.jsxs("h3",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[a.jsx(jf,{className:"h-5 w-5 text-blue-400"}),"Quick Import"]}),a.jsx("button",{onClick:t,className:"text-slate-400 hover:text-white",children:a.jsx(ft,{className:"h-5 w-5"})})]}),a.jsxs("div",{className:"p-4 space-y-4",children:[a.jsx("p",{className:"text-sm text-slate-400",children:"Paste company names below (one per line). Duplicates in the database will be skipped automatically."}),a.jsx("textarea",{className:"w-full h-64 bg-slate-950 border border-slate-700 rounded-lg p-3 text-sm text-slate-200 focus:ring-2 focus:ring-blue-600 outline-none font-mono",placeholder:`Company A Company B Company C...`,value:l,onChange:c=>s(c.target.value)})]}),a.jsxs("div",{className:"p-4 border-t border-slate-800 flex justify-end gap-3",children:[a.jsx("button",{onClick:t,className:"px-4 py-2 text-sm font-medium text-slate-400 hover:text-white",children:"Cancel"}),a.jsx("button",{onClick:u,disabled:i||!l.trim(),className:"px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white rounded-md text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:i?"Importing...":"Import Companies"})]})]})})}function Gm({contacts:e=[],initialContactId:t,onAddContact:n,onEditContact:r}){const[l,s]=T.useState(null),[i,o]=T.useState(!1);T.useEffect(()=>{if(t&&e.length>0){const y=e.find(g=>g.id===t);y&&(s({...y}),o(!0))}},[t,e]);const u={"Operativer Entscheider":"text-blue-400 border-blue-400/30 bg-blue-900/20","Infrastruktur-Verantwortlicher":"text-orange-400 border-orange-400/30 bg-orange-900/20","Wirtschaftlicher Entscheider":"text-green-400 border-green-400/30 bg-green-900/20","Innovations-Treiber":"text-purple-400 border-purple-400/30 bg-purple-900/20"},c={"":"text-slate-600 italic","Soft Denied":"text-slate-400",Bounced:"text-red-500",Redirect:"text-yellow-500",Interested:"text-green-500","Hard denied":"text-red-700",Init:"text-slate-300","1st Step":"text-blue-300","2nd Step":"text-blue-400","Not replied":"text-slate-500"},p=()=>{s({gender:"männlich",title:"",first_name:"",last_name:"",email:"",job_title:"",language:"De",role:"Operativer Entscheider",status:"",is_primary:!1}),o(!0)},m=y=>{s({...y}),o(!0)},x=()=>{l&&(l.id?r&&r(l):n&&n(l)),o(!1),s(null)};return i&&l?a.jsxs("div",{className:"bg-slate-900/50 rounded-lg p-4 border border-slate-700 space-y-4 animate-in fade-in slide-in-from-bottom-2",children:[a.jsxs("div",{className:"flex justify-between items-center border-b border-slate-700 pb-2 mb-2",children:[a.jsx("h3",{className:"text-sm font-bold text-white",children:l.id?"Edit Contact":"New Contact"}),a.jsx("button",{onClick:()=>o(!1),className:"text-slate-400 hover:text-white",children:a.jsx(ft,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Gender / Salutation"}),a.jsxs("select",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.gender,onChange:y=>s({...l,gender:y.target.value}),children:[a.jsx("option",{value:"männlich",children:"Male / Herr"}),a.jsx("option",{value:"weiblich",children:"Female / Frau"})]})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Academic Title"}),a.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.title,placeholder:"e.g. Dr., Prof.",onChange:y=>s({...l,title:y.target.value})})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"First Name"}),a.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.first_name,onChange:y=>s({...l,first_name:y.target.value})})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Last Name"}),a.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.last_name,onChange:y=>s({...l,last_name:y.target.value})})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Email"}),a.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.email,onChange:y=>s({...l,email:y.target.value})})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Job Title (Card)"}),a.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.job_title,onChange:y=>s({...l,job_title:y.target.value})})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Our Role Interpretation"}),a.jsx("select",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.role,onChange:y=>s({...l,role:y.target.value}),children:Object.keys(u).map(y=>a.jsx("option",{value:y,children:y},y))})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Marketing Status"}),a.jsxs("select",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.status,onChange:y=>s({...l,status:y.target.value}),children:[a.jsx("option",{value:"",children:""}),Object.keys(c).filter(y=>y!=="").map(y=>a.jsx("option",{value:y,children:y},y))]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Language"}),a.jsxs("select",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:l.language,onChange:y=>s({...l,language:y.target.value}),children:[a.jsx("option",{value:"De",children:"De"}),a.jsx("option",{value:"En",children:"En"})]})]}),a.jsx("div",{className:"flex items-center pt-5",children:a.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-slate-300 hover:text-white",children:[a.jsx("input",{type:"checkbox",checked:l.is_primary,onChange:y=>s({...l,is_primary:y.target.checked}),className:"rounded border-slate-700 bg-slate-800 text-blue-500 focus:ring-blue-500"}),"Primary Contact"]})})]}),a.jsx("div",{className:"flex gap-2 pt-2",children:a.jsxs("button",{onClick:x,className:"flex-1 bg-blue-600 hover:bg-blue-500 text-white text-sm font-bold py-2 rounded flex items-center justify-center gap-2",children:[a.jsx(kf,{className:"h-4 w-4"})," Save Contact"]})})]}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("h3",{className:"text-sm font-semibold text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[a.jsx(Bt,{className:"h-4 w-4"})," Contacts List"]}),a.jsxs("button",{onClick:p,className:"flex items-center gap-1 px-3 py-1 bg-blue-600/20 text-blue-400 border border-blue-500/30 rounded hover:bg-blue-600 hover:text-white transition-all text-xs font-bold",children:[a.jsx(wf,{className:"h-3.5 w-3.5"})," ADD"]})]}),a.jsx("div",{className:"space-y-3",children:e.length===0?a.jsxs("div",{className:"p-8 rounded-xl border border-dashed border-slate-800 text-center text-slate-600",children:[a.jsx(Bt,{className:"h-8 w-8 mx-auto mb-3 opacity-20"}),a.jsx("p",{className:"text-sm font-medium",children:"No contacts yet."}),a.jsx("p",{className:"text-xs mt-1 opacity-70",children:'Click "ADD" to create the first contact for this account.'})]}):e.map(y=>a.jsxs("div",{className:X("relative bg-slate-800/30 border rounded-lg p-3 transition-all hover:bg-slate-800/50 group cursor-pointer",y.is_primary?"border-blue-500/30 shadow-lg shadow-blue-900/10":"border-slate-800"),onClick:()=>m(y),children:[y.is_primary&&a.jsx("div",{className:"absolute top-2 right-2 text-blue-500",title:"Primary Contact",children:a.jsx(Vm,{className:"h-3 w-3 fill-current"})}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"p-2 bg-slate-900 rounded-full text-slate-400 shrink-0 mt-1",children:a.jsx(Km,{className:"h-4 w-4"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[a.jsxs("span",{className:"text-sm font-bold text-slate-200 truncate",children:[y.title?`${y.title} `:"",y.first_name," ",y.last_name]}),a.jsx("span",{className:"text-[10px] text-slate-500 border border-slate-700 px-1 rounded",children:y.language})]}),a.jsx("div",{className:"text-xs text-slate-400 mb-2 truncate font-medium",children:y.job_title}),a.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:a.jsx("span",{className:X("text-[10px] px-1.5 py-0.5 rounded border font-medium",u[y.role]||"text-slate-400 border-slate-700"),children:y.role})}),a.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-slate-500 font-mono",children:[a.jsxs("div",{className:"flex items-center gap-1 truncate",children:[a.jsx(vf,{className:"h-3 w-3"}),y.email]}),a.jsxs("div",{className:X("flex items-center gap-1 font-bold ml-auto mr-8",c[y.status]),children:[a.jsx(zm,{className:"h-3 w-3"}),y.status||""]})]})]})]})]},y.id))})]})}function Ym({companyId:e,initialContactId:t,onClose:n,apiBase:r}){var Xa,Ga,Ya;const[l,s]=T.useState(null),[i,o]=T.useState(!1),[u,c]=T.useState(!1),[p,m]=T.useState("overview");T.useEffect(()=>{let L;return u&&(L=setInterval(()=>{H(!0)},2e3)),()=>clearInterval(L)},[u,e]),T.useEffect(()=>{m(t?"contacts":"overview")},[t,e]);const[x,y]=T.useState(!1),[g,w]=T.useState(""),[j,d]=T.useState(!1),[f,h]=T.useState(""),[k,b]=T.useState(!1),[_,E]=T.useState(""),[N,I]=T.useState([]),[C,V]=T.useState(!1),[ce,ae]=T.useState(""),H=(L=!1)=>{e&&(L||o(!0),z.get(`${r}/companies/${e}`).then(Ue=>{var St,Za;const ke=Ue.data;if(console.log("FETCHED COMPANY DATA:",ke),s(ke),u){const Cf=(St=ke.enrichment_data)==null?void 0:St.some(xs=>xs.source_type==="wikipedia"),_f=(Za=ke.enrichment_data)==null?void 0:Za.some(xs=>xs.source_type==="ai_analysis");(Cf&&ke.status==="DISCOVERED"||_f&&ke.status==="ENRICHED")&&c(!1)}}).catch(console.error).finally(()=>{L||o(!1)}))};T.useEffect(()=>{H(),y(!1),d(!1),b(!1),V(!1),c(!1),z.get(`${r}/industries`).then(L=>I(L.data)).catch(console.error)},[e]);const kt=async()=>{if(e){c(!0);try{await z.post(`${r}/enrich/discover`,{company_id:e})}catch(L){console.error(L),c(!1)}}},he=async()=>{if(e){c(!0);try{await z.post(`${r}/enrich/analyze`,{company_id:e})}catch(L){console.error(L),c(!1)}}},Nt=()=>{if(!l)return;const L={metadata:{id:l.id,exported_at:new Date().toISOString(),source:"Company Explorer (Robotics Edition)"},company:{name:l.name,website:l.website,status:l.status,industry_ai:l.industry_ai,created_at:l.created_at},enrichment:l.enrichment_data,signals:l.signals},Ue=new Blob([JSON.stringify(L,null,2)],{type:"application/json"}),ke=URL.createObjectURL(Ue),St=document.createElement("a");St.href=ke,St.download=`company-export-${l.id}-${l.name.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.json`,document.body.appendChild(St),St.click(),document.body.removeChild(St),URL.revokeObjectURL(ke)},R=async()=>{if(e){c(!0);try{await z.post(`${r}/companies/${e}/override/wiki?url=${encodeURIComponent(g)}`),y(!1),H()}catch(L){alert("Update failed"),console.error(L)}finally{c(!1)}}},O=async()=>{if(e){c(!0);try{await z.post(`${r}/companies/${e}/override/website?url=${encodeURIComponent(f)}`),d(!1),H()}catch(L){alert("Update failed"),console.error(L)}finally{c(!1)}}},A=async()=>{if(e){c(!0);try{await z.post(`${r}/companies/${e}/override/impressum?url=${encodeURIComponent(_)}`),b(!1),H()}catch(L){alert("Impressum update failed"),console.error(L)}finally{c(!1)}}},$=async()=>{if(e){c(!0);try{await z.put(`${r}/companies/${e}/industry`,{industry_ai:ce}),V(!1),H()}catch(L){alert("Industry update failed"),console.error(L)}finally{c(!1)}}},W=async()=>{if(e){c(!0);try{await z.post(`${r}/companies/${e}/reevaluate-wikipedia`)}catch(L){console.error(L),c(!1)}}},nt=async()=>{var L,Ue;if(console.log("[Inspector] Delete requested for ID:",e),!!e){if(!window.confirm(`Are you sure you want to delete "${l==null?void 0:l.name}"? This action cannot be undone.`)){console.log("[Inspector] Delete cancelled by user");return}try{console.log("[Inspector] Sending DELETE request..."),await z.delete(`${r}/companies/${e}`),console.log("[Inspector] Delete successful"),n(),window.location.reload()}catch(ke){console.error("[Inspector] Delete failed:",ke),alert("Failed to delete company: "+(((Ue=(L=ke.response)==null?void 0:L.data)==null?void 0:Ue.detail)||ke.message))}}},we=async(L,Ue)=>{if(e)try{await z.post(`${r}/enrichment/${e}/${L}/lock?locked=${!Ue}`),H(!0)}catch(ke){console.error("Lock toggle failed",ke)}},jt=async L=>{if(e)try{await z.post(`${r}/contacts`,{...L,company_id:e}),H(!0)}catch(Ue){alert("Failed to add contact"),console.error(Ue)}},ut=async L=>{if(L.id)try{await z.put(`${r}/contacts/${L.id}`,L),H(!0)}catch(Ue){alert("Failed to update contact"),console.error(Ue)}};if(!e)return null;const re=(Xa=l==null?void 0:l.enrichment_data)==null?void 0:Xa.find(L=>L.source_type==="wikipedia"),le=re==null?void 0:re.content,Ef=re==null?void 0:re.is_locked,Ka=re==null?void 0:re.created_at,cn=(Ga=l==null?void 0:l.enrichment_data)==null?void 0:Ga.find(L=>L.source_type==="ai_analysis"),Br=cn==null?void 0:cn.content,qa=cn==null?void 0:cn.created_at,Ke=(Ya=l==null?void 0:l.enrichment_data)==null?void 0:Ya.find(L=>L.source_type==="website_scrape"),ms=Ke==null?void 0:Ke.content,Oe=ms==null?void 0:ms.impressum,Ja=Ke==null?void 0:Ke.created_at;return a.jsx("div",{className:"fixed inset-y-0 right-0 w-full md:w-[550px] bg-white dark:bg-slate-900 border-l border-slate-200 dark:border-slate-800 shadow-2xl transform transition-transform duration-300 ease-in-out z-50 overflow-y-auto",children:i?a.jsx("div",{className:"p-8 text-slate-500",children:"Loading details..."}):l?a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"p-6 border-b border-slate-200 dark:border-slate-800 bg-slate-50/80 dark:bg-slate-950/50 backdrop-blur-sm sticky top-0 z-10",children:[a.jsxs("div",{className:"flex justify-between items-start mb-4",children:[a.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white leading-tight",children:l.name}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:nt,className:"p-1.5 text-slate-500 hover:text-red-600 dark:hover:text-red-500 transition-colors",title:"Delete Company",children:a.jsx(Nf,{className:"h-4 w-4"})}),a.jsx("button",{onClick:Nt,className:"p-1.5 text-slate-500 hover:text-blue-600 dark:hover:text-blue-400 transition-colors",title:"Export JSON",children:a.jsx(Fm,{className:"h-4 w-4"})}),a.jsx("button",{onClick:()=>H(!0),className:"p-1.5 text-slate-500 hover:text-slate-900 dark:hover:text-white transition-colors",title:"Refresh",children:a.jsx(Ki,{className:X("h-4 w-4",(i||u)&&"animate-spin")})}),a.jsx("button",{onClick:n,className:"p-1.5 text-slate-400 hover:text-slate-900 dark:hover:text-white transition-colors",children:a.jsx(ft,{className:"h-6 w-6"})})]})]}),a.jsx("div",{className:"flex flex-wrap gap-2 text-sm items-center",children:j?a.jsxs("div",{className:"flex items-center gap-1 animate-in fade-in zoom-in duration-200",children:[a.jsx("input",{type:"text",value:f,onChange:L=>h(L.target.value),placeholder:"https://...",className:"bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded px-2 py-0.5 text-[10px] text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none w-48",autoFocus:!0}),a.jsx("button",{onClick:O,className:"p-1 bg-green-100 dark:bg-green-900/50 text-green-700 dark:text-green-400 rounded hover:bg-green-200 dark:hover:bg-green-900 transition-colors",children:a.jsx(al,{className:"h-3 w-3"})}),a.jsx("button",{onClick:()=>d(!1),className:"p-1 text-slate-500 hover:text-red-500 transition-colors",children:a.jsx(ft,{className:"h-3 w-3"})})]}):a.jsxs("div",{className:"flex items-center gap-2 group",children:[l.website&&l.website!=="k.A."?a.jsxs("a",{href:l.website.startsWith("http")?l.website:`https://${l.website}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors font-medium",children:[a.jsx(lr,{className:"h-3.5 w-3.5"})," ",new URL(l.website.startsWith("http")?l.website:`https://${l.website}`).hostname.replace("www.","")]}):a.jsx("span",{className:"text-slate-500 italic text-xs",children:"No website"}),a.jsx("button",{onClick:()=>{h(l.website&&l.website!=="k.A."?l.website:""),d(!0)},className:"p-1 text-slate-400 hover:text-slate-900 dark:hover:text-white transition-colors opacity-0 group-hover:opacity-100",title:"Edit Website URL",children:a.jsx(qs,{className:"h-3 w-3"})})]})}),a.jsxs("div",{className:"mt-6 flex border-b border-slate-200 dark:border-slate-800",children:[a.jsx("button",{onClick:()=>m("overview"),className:X("px-4 py-2 text-sm font-medium transition-colors border-b-2",p==="overview"?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200"),children:"Overview"}),a.jsxs("button",{onClick:()=>m("contacts"),className:X("px-4 py-2 text-sm font-medium transition-colors border-b-2 flex items-center gap-2",p==="contacts"?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200"),children:["Contacts",l.contacts&&l.contacts.length>0&&a.jsx("span",{className:"bg-slate-200 dark:bg-slate-800 text-slate-600 dark:text-slate-300 px-1.5 py-0.5 rounded-full text-[10px] min-w-[1.25rem] text-center",children:l.contacts.length})]})]})]}),a.jsxs("div",{className:"p-6 space-y-8 bg-white dark:bg-slate-900",children:[p==="overview"&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex gap-2 mb-6",children:[a.jsxs("button",{onClick:kt,disabled:u,className:"flex-1 flex items-center justify-center gap-2 bg-white dark:bg-slate-800 hover:bg-slate-50 dark:hover:bg-slate-700 disabled:opacity-50 text-slate-700 dark:text-white text-xs font-bold py-2 rounded-md border border-slate-200 dark:border-slate-700 transition-all shadow-sm",children:[a.jsx(hr,{className:"h-3.5 w-3.5"}),u?"Processing...":"DISCOVER"]}),a.jsxs("button",{onClick:he,disabled:u||!l.website||l.website==="k.A.",className:"flex-1 flex items-center justify-center gap-2 bg-blue-600 hover:bg-blue-500 disabled:opacity-50 text-white text-xs font-bold py-2 rounded-md transition-all shadow-lg shadow-blue-900/20",children:[a.jsx(pn,{className:"h-3.5 w-3.5"}),u?"Analyzing...":"ANALYZE POTENTIAL"]})]}),a.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950 rounded-lg p-4 border border-slate-200 dark:border-slate-800 flex flex-col gap-2",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"p-1 bg-white dark:bg-slate-800 rounded text-slate-400",children:a.jsx(Qs,{className:"h-3 w-3"})}),a.jsx("span",{className:"text-[10px] uppercase font-bold text-slate-500 tracking-wider",children:"Official Legal Data"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[Ja&&a.jsxs("div",{className:"text-[10px] text-slate-500 flex items-center gap-1",children:[a.jsx(Ks,{className:"h-3 w-3"})," ",new Date(Ja).toLocaleDateString()]}),Ke&&a.jsx("button",{onClick:()=>we("website_scrape",Ke.is_locked||!1),className:X("p-1 rounded transition-colors",Ke.is_locked?"text-green-600 dark:text-green-400 hover:text-green-700":"text-slate-400 hover:text-slate-900 dark:hover:text-white"),title:Ke.is_locked?"Data Locked (Safe from auto-overwrite)":"Unlocked (Auto-overwrite enabled)",children:Ke.is_locked?a.jsx(_u,{className:"h-3.5 w-3.5"}):a.jsx(Tu,{className:"h-3.5 w-3.5"})}),k?a.jsxs("div",{className:"flex items-center gap-1 animate-in fade-in zoom-in duration-200",children:[a.jsx("button",{onClick:A,className:"p-1 bg-green-100 dark:bg-green-900/50 text-green-600 dark:text-green-400 rounded hover:bg-green-200 dark:hover:bg-green-900 transition-colors",children:a.jsx(al,{className:"h-3 w-3"})}),a.jsx("button",{onClick:()=>b(!1),className:"p-1 text-slate-500 hover:text-red-500 transition-colors",children:a.jsx(ft,{className:"h-3 w-3"})})]}):a.jsx("button",{onClick:()=>{E(""),b(!0)},className:"p-1 text-slate-400 hover:text-slate-900 dark:hover:text-white transition-colors",title:"Set Impressum URL Manually",children:a.jsx(qs,{className:"h-3 w-3"})})]})]}),k&&a.jsx("div",{className:"mb-2 animate-in slide-in-from-top-1 duration-200",children:a.jsx("input",{type:"text",value:_,onChange:L=>E(L.target.value),placeholder:"https://.../impressum",className:"w-full bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-700 rounded px-2 py-1 text-xs text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none",autoFocus:!0})}),Oe?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"text-sm font-medium text-slate-900 dark:text-white",children:Oe.legal_name||"Unknown Legal Name"}),a.jsxs("div",{className:"flex items-start gap-2 text-xs text-slate-500 dark:text-slate-400",children:[a.jsx(Qi,{className:"h-3 w-3 mt-0.5 shrink-0"}),a.jsxs("div",{children:[a.jsx("div",{children:Oe.street}),a.jsxs("div",{children:[Oe.zip," ",Oe.city]})]})]}),(Oe.email||Oe.phone)&&a.jsxs("div",{className:"mt-2 pt-2 border-t border-slate-200 dark:border-slate-900 flex flex-wrap gap-4 text-[10px] text-slate-500 font-mono",children:[Oe.email&&a.jsx("span",{children:Oe.email}),Oe.phone&&a.jsx("span",{children:Oe.phone}),Oe.vat_id&&a.jsxs("span",{className:"text-blue-600 dark:text-blue-400/80",children:["VAT: ",Oe.vat_id]})]})]}):!k&&a.jsx("div",{className:"text-[10px] text-slate-500 italic py-2",children:"No legal data found. Click pencil to provide direct Impressum link."})]}),a.jsx("div",{className:"bg-blue-50/50 dark:bg-blue-900/10 rounded-xl p-5 border border-blue-100 dark:border-blue-900/50 mb-6",children:a.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] text-blue-600 dark:text-blue-400 uppercase font-bold tracking-tight mb-2",children:"Industry Focus"}),C?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("select",{value:ce,onChange:L=>ae(L.target.value),className:"w-full bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded px-2 py-1.5 text-sm text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none",autoFocus:!0,children:[a.jsx("option",{value:"Others",children:"Others"}),N.map(L=>a.jsx("option",{value:L.name,children:L.name},L.id))]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs("button",{onClick:$,className:"flex-1 px-3 py-1.5 bg-blue-600 text-white rounded text-xs font-medium hover:bg-blue-700 transition-colors flex items-center justify-center gap-2",children:[a.jsx(al,{className:"h-3.5 w-3.5"})," Save & Re-Extract"]}),a.jsx("button",{onClick:()=>V(!1),className:"px-3 py-1.5 bg-slate-200 dark:bg-slate-700 text-slate-700 dark:text-slate-300 rounded text-xs font-medium hover:bg-slate-300 dark:hover:bg-slate-600 transition-colors",children:a.jsx(ft,{className:"h-3.5 w-3.5"})})]})]}):a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-2 bg-white dark:bg-slate-800 rounded-lg shadow-sm",children:a.jsx(Qs,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:l.industry_ai||"Not Classified"}),a.jsx("button",{onClick:()=>{ae(l.industry_ai||"Others"),V(!0)},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Change Industry & Re-Extract"})]})]})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight mb-2",children:"Analysis Status"}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-2 bg-white dark:bg-slate-800 rounded-lg shadow-sm",children:a.jsx(pn,{className:"h-5 w-5 text-slate-500"})}),a.jsx("div",{className:X("px-3 py-1 rounded-full text-xs font-bold",l.status==="ENRICHED"?"bg-green-100 text-green-700 border border-green-200":l.status==="DISCOVERED"?"bg-blue-100 text-blue-700 border border-blue-200":"bg-slate-100 text-slate-600 border border-slate-200"),children:l.status})]})]})]})}),Br&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("h3",{className:"text-sm font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[a.jsx(pn,{className:"h-4 w-4"})," AI Strategic Dossier"]}),qa&&a.jsxs("div",{className:"text-[10px] text-slate-500 flex items-center gap-1",children:[a.jsx(Ks,{className:"h-3 w-3"})," ",new Date(qa).toLocaleDateString()]})]}),a.jsxs("div",{className:"bg-white dark:bg-slate-800/30 rounded-xl p-5 border border-slate-200 dark:border-slate-800/50 space-y-4 shadow-sm",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] text-blue-600 dark:text-blue-400 uppercase font-bold tracking-tight mb-1",children:"Business Model"}),a.jsx("p",{className:"text-sm text-slate-700 dark:text-slate-200 leading-relaxed",children:Br.business_model||"No summary available."})]}),Br.infrastructure_evidence&&a.jsxs("div",{className:"pt-4 border-t border-slate-200 dark:border-slate-800/50",children:[a.jsx("div",{className:"text-[10px] text-orange-600 dark:text-orange-400 uppercase font-bold tracking-tight mb-1",children:"Infrastructure Evidence"}),a.jsxs("p",{className:"text-sm text-slate-600 dark:text-slate-300 italic leading-relaxed",children:['"',Br.infrastructure_evidence,'"']})]})]})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("h3",{className:"text-sm font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[a.jsx(lr,{className:"h-4 w-4"})," Company Profile (Wikipedia)"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[Ka&&a.jsxs("div",{className:"text-[10px] text-slate-500 flex items-center gap-1 mr-2",children:[a.jsx(Ks,{className:"h-3 w-3"})," ",new Date(Ka).toLocaleDateString()]}),re&&a.jsx("button",{onClick:()=>we("wikipedia",re.is_locked||!1),className:X("p-1 rounded transition-colors mr-1",re.is_locked?"text-green-600 dark:text-green-400 hover:text-green-700":"text-slate-400 hover:text-slate-900 dark:hover:text-white"),title:re.is_locked?"Wiki Data Locked":"Wiki Data Unlocked",children:re.is_locked?a.jsx(_u,{className:"h-3.5 w-3.5"}):a.jsx(Tu,{className:"h-3.5 w-3.5"})}),a.jsx("button",{onClick:W,disabled:u,className:"p-1 text-slate-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors disabled:opacity-50",title:"Re-run metric extraction from Wikipedia text",children:a.jsx(Ki,{className:X("h-3.5 w-3.5",u&&"animate-spin")})}),x?a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{onClick:R,className:"p-1 bg-green-100 dark:bg-green-900/50 text-green-600 dark:text-green-400 rounded hover:bg-green-200 dark:hover:bg-green-900 transition-colors",title:"Save & Rescan",children:a.jsx(al,{className:"h-3.5 w-3.5"})}),a.jsx("button",{onClick:()=>y(!1),className:"p-1 text-slate-500 hover:text-red-500 transition-colors",title:"Cancel",children:a.jsx(ft,{className:"h-3.5 w-3.5"})})]}):a.jsx("button",{onClick:()=>{w((le==null?void 0:le.url)||""),y(!0)},className:"p-1 text-slate-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors",title:"Edit / Override URL",children:a.jsx(qs,{className:"h-3.5 w-3.5"})})]})]}),x&&a.jsxs("div",{className:"mb-2",children:[a.jsx("input",{type:"text",value:g,onChange:L=>w(L.target.value),placeholder:"Paste Wikipedia URL here...",className:"w-full bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded px-2 py-1 text-sm text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none"}),a.jsx("p",{className:"text-[10px] text-slate-500 mt-1",children:"Paste a valid URL. Saving will trigger a re-scan."})]}),le&&le.url!=="k.A."&&!x?a.jsx("div",{children:a.jsxs("div",{className:"bg-white dark:bg-slate-800/30 rounded-xl p-5 border border-slate-200 dark:border-slate-800/50 relative overflow-hidden shadow-sm",children:[a.jsx("div",{className:"absolute top-0 right-0 p-3 opacity-10",children:a.jsx(lr,{className:"h-16 w-16 text-slate-900 dark:text-white"})}),Ef&&a.jsxs("div",{className:"absolute top-2 right-2 flex items-center gap-1 px-1.5 py-0.5 bg-yellow-100 dark:bg-yellow-900/30 border border-yellow-200 dark:border-yellow-800/50 rounded text-[9px] text-yellow-600 dark:text-yellow-500",children:[a.jsx(qi,{className:"h-2.5 w-2.5"})," Manual Override"]}),a.jsxs("p",{className:"text-sm text-slate-600 dark:text-slate-300 leading-relaxed italic mb-4",children:['"',le.first_paragraph,'"']}),a.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-900 rounded-lg text-blue-500",children:a.jsx(Bt,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Employees"}),a.jsx("div",{className:"text-sm text-slate-700 dark:text-slate-200 font-medium",children:le.mitarbeiter||"k.A."})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-900 rounded-lg text-green-500",children:a.jsx(Im,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Revenue"}),a.jsx("div",{className:"text-sm text-slate-700 dark:text-slate-200 font-medium",children:le.umsatz&&le.umsatz!=="k.A."?`${le.umsatz} Mio. €`:"k.A."})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-900 rounded-lg text-orange-500",children:a.jsx(Qi,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Headquarters"}),a.jsxs("div",{className:"text-sm text-slate-700 dark:text-slate-200 font-medium",children:[le.sitz_stadt,le.sitz_land?`, ${le.sitz_land}`:""]})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-900 rounded-lg text-purple-500",children:a.jsx(Qs,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Wiki Industry"}),a.jsx("div",{className:"text-sm text-slate-700 dark:text-slate-200 font-medium truncate max-w-[150px]",title:le.branche,children:le.branche||"k.A."})]})]})]}),le.categories&&le.categories!=="k.A."&&a.jsxs("div",{className:"mt-6 pt-5 border-t border-slate-200 dark:border-slate-800/50",children:[a.jsxs("div",{className:"flex items-start gap-2 text-xs text-slate-500 mb-2",children:[a.jsx(qi,{className:"h-3 w-3 mt-0.5"})," Categories"]}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:le.categories.split(",").map(L=>a.jsx("span",{className:"px-2 py-0.5 bg-slate-100 dark:bg-slate-900 text-slate-600 dark:text-slate-400 rounded-full text-[10px] border border-slate-200 dark:border-slate-800",children:L.trim()},L))})]}),a.jsx("div",{className:"mt-4 flex justify-end",children:a.jsxs("a",{href:le.url,target:"_blank",className:"text-[10px] text-blue-600 dark:text-blue-500 hover:text-blue-500 dark:hover:text-blue-400 flex items-center gap-1 font-bold",children:["WIKIPEDIA ",a.jsx(Eu,{className:"h-2.5 w-2.5"})]})})]})}):x?null:a.jsxs("div",{className:"p-4 rounded-xl border border-dashed border-slate-200 dark:border-slate-800 text-center text-slate-500 dark:text-slate-600",children:[a.jsx(lr,{className:"h-5 w-5 mx-auto mb-2 opacity-20"}),a.jsx("p",{className:"text-xs",children:"No Wikipedia profile found yet."})]})]}),a.jsxs("div",{children:[a.jsxs("h3",{className:"text-sm font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider mb-3 flex items-center gap-2",children:[a.jsx(pn,{className:"h-4 w-4"})," Quantitative Potential"]}),l.calculated_metric_value!=null||l.standardized_metric_value!=null?a.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950 rounded-lg p-4 border border-slate-200 dark:border-slate-800 space-y-4",children:[l.calculated_metric_value!=null&&a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"p-2 bg-white dark:bg-slate-800 rounded-lg text-blue-500 mt-1",children:a.jsx(Dm,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:l.calculated_metric_name||"Calculated Metric"}),a.jsxs("div",{className:"text-xl text-slate-900 dark:text-white font-bold",children:[l.calculated_metric_value.toLocaleString("de-DE"),a.jsx("span",{className:"text-sm font-medium text-slate-500 ml-1",children:l.calculated_metric_unit})]})]})]}),l.standardized_metric_value!=null&&a.jsxs("div",{className:"flex items-start gap-3 pt-4 border-t border-slate-200 dark:border-slate-800",children:[a.jsx("div",{className:"p-2 bg-white dark:bg-slate-800 rounded-lg text-green-500 mt-1",children:a.jsx(Bm,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:["Standardized Potential (",l.standardized_metric_unit,")"]}),a.jsxs("div",{className:"text-xl text-green-600 dark:text-green-400 font-bold",children:[l.standardized_metric_value.toLocaleString("de-DE"),a.jsx("span",{className:"text-sm font-medium text-slate-500 ml-1",children:l.standardized_metric_unit})]}),a.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Comparable value for potential analysis."})]})]}),l.metric_source&&a.jsxs("div",{className:"flex justify-between items-center text-[10px] text-slate-500 pt-2 border-t border-slate-200 dark:border-slate-800",children:[l.metric_confidence!=null&&a.jsxs("div",{className:"flex items-center gap-1.5",title:l.metric_confidence_reason||"No reason provided",children:[a.jsx("span",{className:"uppercase font-bold tracking-tight text-[9px]",children:"Confidence:"}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:X("h-2 w-2 rounded-full",l.metric_confidence>=.8?"bg-green-500":l.metric_confidence>=.5?"bg-yellow-500":"bg-red-500")}),a.jsxs("span",{className:X("font-medium",l.metric_confidence>=.8?"text-green-700 dark:text-green-400":l.metric_confidence>=.5?"text-yellow-700 dark:text-yellow-400":"text-red-700 dark:text-red-400"),children:[(l.metric_confidence*100).toFixed(0),"%"]})]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(Mm,{className:"h-3 w-3"}),a.jsx("span",{children:"Source:"}),a.jsx("span",{title:l.metric_proof_text||"No proof text available",className:"font-medium text-slate-600 dark:text-slate-400 capitalize cursor-help border-b border-dotted border-slate-400",children:l.metric_source}),l.metric_source_url&&a.jsx("a",{href:l.metric_source_url,target:"_blank",rel:"noopener noreferrer",className:"ml-1 text-blue-600 dark:text-blue-400 hover:underline",children:a.jsx(Eu,{className:"h-3 w-3 inline"})})]})]})]}):a.jsxs("div",{className:"p-4 rounded-xl border border-dashed border-slate-200 dark:border-slate-800 text-center text-slate-500 dark:text-slate-600",children:[a.jsx(pn,{className:"h-5 w-5 mx-auto mb-2 opacity-20"}),a.jsx("p",{className:"text-xs",children:"No quantitative data calculated yet."}),a.jsx("p",{className:"text-xs mt-1",children:'Run "Analyze Potential" to extract metrics.'})]})]}),a.jsxs("div",{className:"pt-6 border-t border-slate-200 dark:border-slate-800 flex items-center justify-between",children:[a.jsxs("div",{className:"text-[10px] text-slate-500 flex items-center gap-2 uppercase font-bold tracking-widest",children:[a.jsx(Am,{className:"h-3 w-3"})," Added: ",new Date(l.created_at).toLocaleDateString()]}),a.jsxs("div",{className:"text-[10px] text-slate-400 dark:text-slate-600 italic",children:["ID: CE-",l.id.toString().padStart(4,"0")]})]})]}),p==="contacts"&&a.jsx(Gm,{contacts:l.contacts,initialContactId:t,onAddContact:jt,onEditContact:ut})," "]})]}):a.jsx("div",{className:"p-8 text-red-400",children:"Failed to load data."})})}function Zm({isOpen:e,onClose:t,apiBase:n}){const[r,l]=T.useState(localStorage.getItem("roboticsSettingsActiveTab")||"robotics"),[s,i]=T.useState([]),[o,u]=T.useState([]),[c,p]=T.useState([]),[m,x]=T.useState(!1),y=async()=>{x(!0);try{const[d,f,h]=await Promise.all([z.get(`${n}/robotics/categories`),z.get(`${n}/industries`),z.get(`${n}/job_roles`)]);i(d.data),u(f.data),p(h.data)}catch(d){console.error("Failed to fetch settings data:",d),alert("Fehler beim Laden der Settings. Siehe Konsole.")}finally{x(!1)}};T.useEffect(()=>{e&&y()},[e]),T.useEffect(()=>{localStorage.setItem("roboticsSettingsActiveTab",r)},[r]);const g=async(d,f,h)=>{x(!0);try{await z.put(`${n}/robotics/categories/${d}`,{description:f,reasoning_guide:h}),y()}catch(k){alert("Update failed"),console.error(k)}finally{x(!1)}},w=async()=>{x(!0);try{await z.post(`${n}/job_roles`,{pattern:"New Pattern",role:"Operativer Entscheider"}),y()}catch(d){alert("Failed to add job role"),console.error(d)}finally{x(!1)}},j=async d=>{x(!0);try{await z.delete(`${n}/job_roles/${d}`),y()}catch(f){alert("Failed to delete job role"),console.error(f)}finally{x(!1)}};return e?a.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm animate-in fade-in duration-200",children:a.jsxs("div",{className:"bg-white dark:bg-slate-900 w-full max-w-4xl max-h-[85vh] rounded-2xl shadow-2xl border border-slate-200 dark:border-slate-800 flex flex-col overflow-hidden",children:[a.jsxs("div",{className:"p-6 border-b border-slate-200 dark:border-slate-800 flex justify-between items-center bg-slate-50 dark:bg-slate-950/50",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"Settings & Classification Logic"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Define how AI evaluates leads and matches roles."})]}),a.jsx("button",{onClick:t,className:"p-2 hover:bg-slate-200 dark:hover:bg-slate-800 rounded-full transition-colors text-slate-500",children:a.jsx(ft,{className:"h-6 w-6"})})]}),a.jsx("div",{className:"flex border-b border-slate-200 dark:border-slate-800 px-6 bg-white dark:bg-slate-900 overflow-x-auto",children:[{id:"robotics",label:"Robotics Potential",icon:pn},{id:"industries",label:"Industry Focus",icon:Qm},{id:"roles",label:"Job Role Mapping",icon:Bt}].map(d=>a.jsxs("button",{onClick:()=>l(d.id),className:X("flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-all whitespace-nowrap",r===d.id?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-300"),children:[a.jsx(d.icon,{className:"h-4 w-4"})," ",d.label]},d.id))}),a.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6 bg-white dark:bg-slate-900",children:[m&&a.jsx("div",{className:"text-center py-12 text-slate-500",children:"Loading..."}),!m&&r==="robotics"&&a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:s.map(d=>a.jsx(ex,{category:d,onSave:g},d.id))},"robotics-content"),!m&&r==="industries"&&a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"flex justify-between items-center",children:a.jsx("h3",{className:"text-sm font-bold text-slate-700 dark:text-slate-300",children:"Industry Verticals (Synced from Notion)"})}),a.jsx("div",{className:"grid grid-cols-1 gap-3",children:o.map(d=>{var f;return a.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-lg p-4 flex flex-col gap-3 group relative overflow-hidden",children:[d.notion_id&&a.jsx("div",{className:"absolute top-0 right-0 bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 text-[9px] font-bold px-2 py-0.5 rounded-bl",children:"SYNCED"}),a.jsxs("div",{className:"flex gap-4 items-start pr-12",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("h4",{className:"font-bold text-slate-900 dark:text-white text-sm",children:d.name}),a.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:d.status_notion&&a.jsx("span",{className:"text-[10px] border border-slate-300 dark:border-slate-700 px-1.5 rounded text-slate-500",children:d.status_notion})})]}),a.jsx("div",{className:"text-right",children:a.jsxs("div",{className:"flex items-center gap-1.5 justify-end",children:[a.jsx("span",{className:X("w-2 h-2 rounded-full",d.is_focus?"bg-green-500":"bg-slate-300 dark:bg-slate-700")}),a.jsx("span",{className:"text-xs text-slate-500",children:d.is_focus?"Focus":"Standard"})]})})]}),a.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-300 italic whitespace-pre-wrap",children:d.description||"No definition"}),a.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-[10px] bg-white dark:bg-slate-900 p-2 rounded border border-slate-200 dark:border-slate-800",children:[a.jsxs("div",{children:[a.jsx("span",{className:"block text-slate-400 font-bold uppercase",children:"Whale >"}),a.jsx("span",{className:"text-slate-700 dark:text-slate-200",children:d.whale_threshold||"-"})]}),a.jsxs("div",{children:[a.jsx("span",{className:"block text-slate-400 font-bold uppercase",children:"Min Req"}),a.jsx("span",{className:"text-slate-700 dark:text-slate-200",children:d.min_requirement||"-"})]}),a.jsxs("div",{children:[a.jsx("span",{className:"block text-slate-400 font-bold uppercase",children:"Unit"}),a.jsx("span",{className:"text-slate-700 dark:text-slate-200 truncate",children:d.scraper_search_term||"-"})]}),a.jsxs("div",{children:[a.jsx("span",{className:"block text-slate-400 font-bold uppercase",children:"Product"}),a.jsx("span",{className:"text-slate-700 dark:text-slate-200 truncate",children:((f=s.find(h=>h.id===d.primary_category_id))==null?void 0:f.name)||"-"})]})]}),d.scraper_keywords&&a.jsxs("div",{className:"text-[10px]",children:[a.jsx("span",{className:"text-slate-400 font-bold uppercase mr-2",children:"Keywords:"}),a.jsx("span",{className:"text-slate-600 dark:text-slate-400 font-mono",children:d.scraper_keywords})]}),d.standardization_logic&&a.jsxs("div",{className:"text-[10px]",children:[a.jsx("span",{className:"text-slate-400 font-bold uppercase mr-2",children:"Standardization:"}),a.jsx("span",{className:"text-slate-600 dark:text-slate-400 font-mono",children:d.standardization_logic})]})]},d.id)})})]},"industries-content"),!m&&r==="roles"&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("h3",{className:"text-sm font-bold text-slate-700 dark:text-slate-300",children:"Job Title Mapping Patterns"}),a.jsxs("button",{onClick:w,className:"flex items-center gap-1 px-3 py-1.5 bg-blue-600 hover:bg-blue-500 text-white text-xs font-bold rounded",children:[a.jsx(wf,{className:"h-3 w-3"})," ADD PATTERN"]})]}),a.jsx("div",{className:"bg-slate-50 dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-lg overflow-hidden",children:a.jsxs("table",{className:"w-full text-left text-xs",children:[a.jsx("thead",{className:"bg-slate-100 dark:bg-slate-900 border-b border-slate-200 dark:border-slate-800 text-slate-500 font-bold uppercase",children:a.jsxs("tr",{children:[a.jsx("th",{className:"p-3",children:"Job Title Pattern (Regex/Text)"}),a.jsx("th",{className:"p-3",children:"Mapped Role"}),a.jsx("th",{className:"p-3 w-10"})]})}),a.jsxs("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800",children:[c.map(d=>a.jsxs("tr",{className:"group",children:[a.jsx("td",{className:"p-2",children:a.jsx("input",{className:"w-full bg-transparent border border-transparent hover:border-slate-300 dark:hover:border-slate-700 rounded px-2 py-1 text-slate-900 dark:text-slate-200 outline-none focus:border-blue-500",defaultValue:d.pattern})}),a.jsx("td",{className:"p-2",children:a.jsxs("select",{className:"w-full bg-transparent border border-transparent hover:border-slate-300 dark:hover:border-slate-700 rounded px-2 py-1 text-slate-900 dark:text-slate-200 outline-none focus:border-blue-500",defaultValue:d.role,children:[a.jsx("option",{children:"Operativer Entscheider"}),a.jsx("option",{children:"Infrastruktur-Verantwortlicher"}),a.jsx("option",{children:"Wirtschaftlicher Entscheider"}),a.jsx("option",{children:"Innovations-Treiber"})]})}),a.jsx("td",{className:"p-2 text-center",children:a.jsx("button",{onClick:()=>j(d.id),className:"text-slate-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx(Nf,{className:"h-4 w-4"})})})]},d.id)),c.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:3,className:"p-8 text-center text-slate-500 italic",children:"No patterns defined yet."})})]})]})})]},"roles-content")]})]})}):null}function ex({category:e,onSave:t}){const[n,r]=T.useState(e.description),[l,s]=T.useState(e.reasoning_guide),[i,o]=T.useState(!1);return T.useEffect(()=>{o(n!==e.description||l!==e.reasoning_guide)},[n,l]),a.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950/50 border border-slate-200 dark:border-slate-800 rounded-xl p-4 flex flex-col gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"p-1.5 bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 rounded",children:a.jsx(qi,{className:"h-4 w-4"})}),a.jsx("span",{className:"font-bold text-slate-900 dark:text-white uppercase tracking-tight text-sm",children:e.name})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase font-bold text-slate-500",children:"Definition for LLM"}),a.jsx("textarea",{className:"w-full bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded p-2 text-xs text-slate-800 dark:text-slate-200 focus:ring-1 focus:ring-blue-500 outline-none h-20",value:n,onChange:u=>r(u.target.value)})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:"text-[10px] uppercase font-bold text-slate-500",children:"Reasoning Guide (Scoring)"}),a.jsx("textarea",{className:"w-full bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded p-2 text-xs text-slate-800 dark:text-slate-200 focus:ring-1 focus:ring-blue-500 outline-none h-20",value:l,onChange:u=>s(u.target.value)})]}),i&&a.jsxs("button",{onClick:()=>t(e.id,n,l),className:"mt-2 bg-blue-600 hover:bg-blue-500 text-white text-[10px] font-bold py-1.5 rounded transition-all animate-in fade-in flex items-center justify-center gap-1",children:[a.jsx(kf,{className:"h-3 w-3"})," SAVE CHANGES"]})]})}const fn="/ce/api";function tx(){const[e,t]=T.useState(0),[n,r]=T.useState(!1),[l,s]=T.useState(!1),[i,o]=T.useState(null),[u,c]=T.useState(null),[p,m]=T.useState(""),[x,y]=T.useState("companies"),[g,w]=T.useState(()=>typeof window<"u"&&window.localStorage&&localStorage.getItem("theme")||"dark");T.useEffect(()=>{g==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",g)},[g]),T.useEffect(()=>{fetch(`${fn}/health`).then(h=>h.json()).then(h=>m(h.version||"")).catch(()=>m("N/A"))},[]);const j=()=>w(h=>h==="dark"?"light":"dark"),d=h=>{o(h),c(null)},f=()=>{o(null),c(null)};return a.jsxs("div",{className:"min-h-screen bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-200 font-sans transition-colors",children:[a.jsx(Xm,{isOpen:n,onClose:()=>r(!1),apiBase:fn,onSuccess:()=>t(h=>h+1)}),a.jsx(Zm,{isOpen:l,onClose:()=>s(!1),apiBase:fn}),a.jsx(Ym,{companyId:i,initialContactId:u,onClose:f,apiBase:fn}),a.jsxs("header",{className:"border-b border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900/50 sticky top-0 z-10 backdrop-blur-md",children:[a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-2 bg-blue-600 rounded-lg",children:a.jsx(Um,{className:"h-6 w-6 text-white"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl font-bold text-slate-900 dark:text-white tracking-tight",children:"Company Explorer"}),a.jsxs("p",{className:"text-xs text-blue-600 dark:text-blue-400 font-medium",children:["ROBOTICS EDITION ",p&&a.jsxs("span",{className:"text-slate-500 dark:text-slate-600 ml-2",children:["v",p]})]})]})]}),a.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[a.jsxs("div",{className:"hidden md:flex bg-slate-100 dark:bg-slate-800 rounded-lg p-1",children:[a.jsxs("button",{onClick:()=>y("companies"),className:X("px-3 py-1.5 rounded-md text-sm font-medium transition-all flex items-center gap-2",x==="companies"?"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-300"),children:[a.jsx(Lr,{className:"h-4 w-4"})," Companies"]}),a.jsxs("button",{onClick:()=>y("contacts"),className:X("px-3 py-1.5 rounded-md text-sm font-medium transition-all flex items-center gap-2",x==="contacts"?"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-300"),children:[a.jsx(Bt,{className:"h-4 w-4"})," Contacts"]})]}),a.jsx("div",{className:"h-6 w-px bg-slate-300 dark:bg-slate-700 mx-2 hidden md:block"}),a.jsx("button",{onClick:j,className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-800 rounded-full transition-colors text-slate-500 dark:text-slate-400",title:"Toggle Theme",children:g==="dark"?a.jsx(Wm,{className:"h-5 w-5"}):a.jsx($m,{className:"h-5 w-5"})}),a.jsx("button",{onClick:()=>s(!0),className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-800 rounded-full transition-colors text-slate-500 dark:text-slate-400",title:"Configure Robotics Logic",children:a.jsx(Hm,{className:"h-5 w-5"})}),a.jsx("button",{onClick:()=>t(h=>h+1),className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-800 rounded-full transition-colors text-slate-500 dark:text-slate-400",title:"Refresh Data",children:a.jsx(Ki,{className:"h-5 w-5"})}),x==="companies"&&a.jsxs("button",{className:"hidden md:flex items-center gap-2 bg-blue-600 hover:bg-blue-500 text-white px-4 py-2 rounded-md font-medium text-sm transition-all shadow-lg shadow-blue-900/20",onClick:()=>r(!0),children:[a.jsx(jf,{className:"h-4 w-4"}),"Import List"]})]})]}),a.jsxs("div",{className:"md:hidden border-t border-slate-200 dark:border-slate-800 flex",children:[a.jsxs("button",{onClick:()=>y("companies"),className:X("flex-1 py-3 text-sm font-medium flex justify-center items-center gap-2 border-b-2",x==="companies"?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500"),children:[a.jsx(Lr,{className:"h-4 w-4"})," Companies"]}),a.jsxs("button",{onClick:()=>y("contacts"),className:X("flex-1 py-3 text-sm font-medium flex justify-center items-center gap-2 border-b-2",x==="contacts"?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500"),children:[a.jsx(Bt,{className:"h-4 w-4"})," Contacts"]})]})]}),a.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 h-[calc(100vh-4rem)]",children:a.jsx("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl overflow-hidden shadow-sm dark:shadow-xl h-full",children:x==="companies"?a.jsx(qm,{refreshKey:e,apiBase:fn,onRowClick:d,onImportClick:()=>r(!0)}):a.jsx(Jm,{apiBase:fn,onCompanyClick:h=>{o(h),y("companies")},onContactClick:(h,k)=>{o(h),c(k)}})})})]})}Js.createRoot(document.getElementById("root")).render(a.jsx(Wf.StrictMode,{children:a.jsx(tx,{})}));