vendor: 4,144 bytes, lines 1-9
1(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const n of l)if(n.type==="childList")for(const i of n.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function a(l){const n={};return l.integrity&&(n.integrity=l.integrity),l.referrerPolicy&&(n.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?n.credentials="include":l.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function r(l){if(l.ep)return;l.ep=!0;const n=a(l);fetch(l.href,n)}})();var pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t1(t){if(t.__esModule)return t;var s=t.default;if(typeof s=="function"){var a=function r(){return this instanceof r?Reflect.construct(s,arguments,this.constructor):s.apply(this,arguments)};a.prototype=s.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var l=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,l.get?l:{enumerable:!0,get:function(){return t[r]}})}),a}var Hf={exports:{}},dm={},Vf={exports:{}},qt={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var mc=Symbol.for("react.element"),s1=Symbol.for("react.portal"),a1=Symbol.for("react.fragment"),r1=Symbol.for("react.strict_mode"),l1=Symbol.for("react.profiler"),n1=Symbol.for("react.provider"),i1=Symbol.for("react.context"),o1=Symbol.for("react.forward_ref"),c1=Symbol.for("react.suspense"),d1=Symbol.for("react.memo"),m1=Symbol.for("react.lazy"),mh=Symbol.iterator;function x1(t){return t===null||typeof t!="object"?null:(t=mh&&t[mh]||t["@@iterator"],typeof t=="function"?t:null)}var Yf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Xf=Object.assign,Kf={};function Vi(t,s,a){this.props=t,this.context=s,this.refs=Kf,this.updater=a||Yf}Vi.prototype.isReactComponent={};Vi.prototype.setState=function(t,s){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,s,"setState")};Vi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Qf(){}Qf.prototype=Vi.prototype;function lu(t,s,a){this.props=t,this.context=s,this.refs=Kf,this.updater=a||Yf}var nu=lu.prototype=new Qf;nu.constructor=lu;Xf(nu,Vi.prototype);nu.isPureReactComponent=!0;var xh=Array.isArray,Zf=Object.prototype.hasOwnProperty,iu={current:null},eg={key:!0,ref:!0,__self:!0,__source:!0};function tg(t,s,a){var r,l={},n=null,i=null;if(s!=null)for(r in s.ref!==void 0&&(i=s.ref),s.key!==void 0&&(n=""+s.key),s)Zf.call(s,r)&&!eg.hasOwnProperty(r)&&(l[r]=s[r]);var c=arguments.length-2;if(c===1)l.children=a;else if(1<c){for(var d=Array(c),x=0;x<c;x++)d[x]=arguments[x+2];l.children=d}if(t&&t.defaultProps)for(r in c=t.defaultProps,c)l[r]===void 0&&(l[r]=c[r]);return{$$typeof:mc,type:t,key:n,ref:i,props:l,_owner:iu.current}}function u1(t,s){return{$$typeof:mc,type:t.type,key:s,ref:t.ref,props:t.props,_owner:t._owner}}function ou(t){return typeof t=="object"&&t!==null&&t.$$typeof===mc}function h1(t){var s={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(a){return s[a]})}var uh=/\/+/g;function Om(t,s){return typeof t=="object"&&t!==null&&t.key!=null?h1(""+t.key):s.toString(36)}function pd(t,s,a,r,l){var n=typeof t;(n==="undefined"||n==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(n){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case mc:case s1:i=!0}}if(i)return i=t,l=l(i),t=r===""?"."+Om(i,0):r,xh(l)?(a="",t!=null&&(a=t.replace(uh,"$&/")+"/"),pd(l,s,a,"",function(x){return x}
vendor: 4,393 bytes, lines 9-17
9)):l!=null&&(ou(l)&&(l=u1(l,a+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(uh,"$&/")+"/")+t)),s.push(l)),1;if(i=0,r=r===""?".":r+":",xh(t))for(var c=0;c<t.length;c++){n=t[c];var d=r+Om(n,c);i+=pd(n,s,a,d,l)}else if(d=x1(t),typeof d=="function")for(t=d.call(t),c=0;!(n=t.next()).done;)n=n.value,d=r+Om(n,c++),i+=pd(n,s,a,d,l);else if(n==="object")throw s=String(t),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.");return i}function Dc(t,s,a){if(t==null)return t;var r=[],l=0;return pd(t,r,"","",function(n){return s.call(a,n,l++)}),r}function p1(t){if(t._status===-1){var s=t._result;s=s(),s.then(function(a){(t._status===0||t._status===-1)&&(t._status=1,t._result=a)},function(a){(t._status===0||t._status===-1)&&(t._status=2,t._result=a)}),t._status===-1&&(t._status=0,t._result=s)}if(t._status===1)return t._result.default;throw t._result}var Pa={current:null},fd={transition:null},f1={ReactCurrentDispatcher:Pa,ReactCurrentBatchConfig:fd,ReactCurrentOwner:iu};function sg(){throw Error("act(...) is not supported in production builds of React.")}qt.Children={map:Dc,forEach:function(t,s,a){Dc(t,function(){s.apply(this,arguments)},a)},count:function(t){var s=0;return Dc(t,function(){s++}),s},toArray:function(t){return Dc(t,function(s){return s})||[]},only:function(t){if(!ou(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};qt.Component=Vi;qt.Fragment=a1;qt.Profiler=l1;qt.PureComponent=lu;qt.StrictMode=r1;qt.Suspense=c1;qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f1;qt.act=sg;qt.cloneElement=function(t,s,a){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Xf({},t.props),l=t.key,n=t.ref,i=t._owner;if(s!=null){if(s.ref!==void 0&&(n=s.ref,i=iu.current),s.key!==void 0&&(l=""+s.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(d in s)Zf.call(s,d)&&!eg.hasOwnProperty(d)&&(r[d]=s[d]===void 0&&c!==void 0?c[d]:s[d])}var d=arguments.length-2;if(d===1)r.children=a;else if(1<d){c=Array(d);for(var x=0;x<d;x++)c[x]=arguments[x+2];r.children=c}return{$$typeof:mc,type:t.type,key:l,ref:n,props:r,_owner:i}};qt.createContext=function(t){return t={$$typeof:i1,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:n1,_context:t},t.Consumer=t};qt.createElement=tg;qt.createFactory=function(t){var s=tg.bind(null,t);return s.type=t,s};qt.createRef=function(){return{current:null}};qt.forwardRef=function(t){return{$$typeof:o1,render:t}};qt.isValidElement=ou;qt.lazy=function(t){return{$$typeof:m1,_payload:{_status:-1,_result:t},_init:p1}};qt.memo=function(t,s){return{$$typeof:d1,type:t,compare:s===void 0?null:s}};qt.startTransition=function(t){var s=fd.transition;fd.transition={};try{t()}finally{fd.transition=s}};qt.unstable_act=sg;qt.useCallback=function(t,s){return Pa.current.useCallback(t,s)};qt.useContext=function(t){return Pa.current.useContext(t)};qt.useDebugValue=function(){};qt.useDeferredValue=function(t){return Pa.current.useDeferredValue(t)};qt.useEffect=function(t,s){return Pa.current.useEffect(t,s)};qt.useId=function(){return Pa.current.useId()};qt.useImperativeHandle=function(t,s,a){return Pa.current.useImperativeHandle(t,s,a)};qt.useInsertionEffect=function(t,s){return Pa.current.useInsertionEffect(t,s)};qt.useLayoutEffect=function(t,s){return Pa.current.useLayoutEffect(t,s)};qt.useMemo=function(t,s){return Pa.current.useMemo(t,s)};qt.useReducer=function(t,s,a){return Pa.current.useReducer(t,s,a)};qt.useRef=function(t){return Pa.current.useRef(t)};qt.useState=function(t){return Pa.current.useState(t)};qt.useSyncExternalStore=function(t,s,a){return Pa.current.useSyncExternalStore(t,s,a)};qt.useTransition=function(){return Pa.current.useTransition()};qt.version="18.3.1";Vf.exports=qt;var o=Vf.exports;/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var g1=o,b1=Symbol.for("react.element"),y1=Symbol.for("react.fragment"),j1=Object.prototype.hasOwnProperty,v1=g1.__SECRET_INT
vendor: 8,837 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,w1={key:!0,ref:!0,__self:!0,__source:!0};function ag(t,s,a){var r,l={},n=null,i=null;a!==void 0&&(n=""+a),s.key!==void 0&&(n=""+s.key),s.ref!==void 0&&(i=s.ref);for(r in s)j1.call(s,r)&&!w1.hasOwnProperty(r)&&(l[r]=s[r]);if(t&&t.defaultProps)for(r in s=t.defaultProps,s)l[r]===void 0&&(l[r]=s[r]);return{$$typeof:b1,type:t,key:n,ref:i,props:l,_owner:v1.current}}dm.Fragment=y1;dm.jsx=ag;dm.jsxs=ag;Hf.exports=dm;var e=Hf.exports,rg={exports:{}},ar={},lg={exports:{}},ng={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function s(Q,_){var M=Q.length;Q.push(_);e:for(;0<M;){var F=M-1>>>1,R=Q[F];if(0<l(R,_))Q[F]=_,Q[M]=R,M=F;else break e}}function a(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var _=Q[0],M=Q.pop();if(M!==_){Q[0]=M;e:for(var F=0,R=Q.length,X=R>>>1;F<X;){var re=2*(F+1)-1,U=Q[re],oe=re+1,ue=Q[oe];if(0>l(U,M))oe<R&&0>l(ue,U)?(Q[F]=ue,Q[oe]=M,F=oe):(Q[F]=U,Q[re]=M,F=re);else if(oe<R&&0>l(ue,M))Q[F]=ue,Q[oe]=M,F=oe;else break e}}return _}function l(Q,_){var M=Q.sortIndex-_.sortIndex;return M!==0?M:Q.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var d=[],x=[],m=1,h=null,f=3,y=!1,g=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(Q){for(var _=a(x);_!==null;){if(_.callback===null)r(x);else if(_.startTime<=Q)r(x),_.sortIndex=_.expirationTime,s(d,_);else break;_=a(x)}}function p(Q){if(w=!1,b(Q),!g)if(a(d)!==null)g=!0,I(E);else{var _=a(x);_!==null&&Z(p,_.startTime-Q)}}function E(Q,_){g=!1,w&&(w=!1,v(k),k=-1),y=!0;var M=f;try{for(b(_),h=a(d);h!==null&&(!(h.expirationTime>_)||Q&&!A());){var F=h.callback;if(typeof F=="function"){h.callback=null,f=h.priorityLevel;var R=F(h.expirationTime<=_);_=t.unstable_now(),typeof R=="function"?h.callback=R:h===a(d)&&r(d),b(_)}else r(d);h=a(d)}if(h!==null)var X=!0;else{var re=a(x);re!==null&&Z(p,re.startTime-_),X=!1}return X}finally{h=null,f=M,y=!1}}var C=!1,S=null,k=-1,J=5,u=-1;function A(){return!(t.unstable_now()-u<J)}function T(){if(S!==null){var Q=t.unstable_now();u=Q;var _=!0;try{_=S(!0,Q)}finally{_?ae():(C=!1,S=null)}}else C=!1}var ae;if(typeof j=="function")ae=function(){j(T)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,z=P.port2;P.port1.onmessage=T,ae=function(){z.postMessage(null)}}else ae=function(){N(T,0)};function I(Q){S=Q,C||(C=!0,ae())}function Z(Q,_){k=N(function(){Q(t.unstable_now())},_)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Q){Q.callback=null},t.unstable_continueExecution=function(){g||y||(g=!0,I(E))},t.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<Q?Math.floor(1e3/Q):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return a(d)},t.unstable_next=function(Q){switch(f){case 1:case 2:case 3:var _=3;break;default:_=f}var M=f;f=_;try{return Q()}finally{f=M}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Q,_){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var M=f;f=Q;try{return _()}finally{f=M}},t.unstable_scheduleCallback=function(Q,_,M){var F=t.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?F+M:F):M=F,Q){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=M+R,Q={id:m++,callback:_,priorityLevel:Q,startTime:M,expirationTime:R,sortIndex:-1},M>F?(Q.sortIndex=M,s(x,Q),a(d)===null&&Q===a(x)&&(w?(v(k),k=-1):w=!0,Z(p,M-F))):(Q.sortIndex=R,s(d,Q),g||y||(g=!0,I(E))),Q},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(Q){var _=f;return function(){var M=f;f=_;try{return Q.apply(this,arguments)}finally{f=M}}}})(ng);lg.exports=ng;var N1=lg.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var k1=o,tr=N1;function Je(t){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+t,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+t+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ig=new Set,Jo={};function Qn(t,s){Fi(t,s),Fi(t+"Capture",s)}function Fi(t,s){for(Jo[t]=s,t=0;t<s.length;t++)ig.add(s[t])}var jl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yx=Object.prototype.hasOwnProperty,_1=/^[: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]*$/,hh={},ph={};function S1(t){return Yx.call(ph,t)?!0:Yx.call(hh,t)?!1:_1.test(t)?ph[t]=!0:(hh[t]=!0,!1)}function C1(t,s,a,r){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return r?!1:a!==null?!a.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function I1(t,s,a,r){if(s===null||typeof s>"u"||C1(t,s,a,r))return!0;if(r)return!1;if(a!==null)switch(a.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function Aa(t,s,a,r,l,n,i){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=a,this.propertyName=t,this.type=s,this.sanitizeURL=n,this.removeEmptyString=i}var fa={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){fa[t]=new Aa(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var s=t[0];fa[s]=new Aa(s,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){fa[t]=new Aa(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){fa[t]=new Aa(t,2,!1,t,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(t){fa[t]=new Aa(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){fa[t]=new Aa(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){fa[t]=new Aa(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){fa[t]=new Aa(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){fa[t]=new Aa(t,5,!1,t.toLowerCase(),null,!1,!1)});var cu=/[\-:]([a-z])/g;function du(t){return t[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
33-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(t){var s=t.replace(cu,du);fa[s]=new Aa(s,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var s=t.replace(cu,du);fa[s]=new Aa(s,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var s=t.replace(cu,du);fa[s]=new Aa(s,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){fa[t]=new Aa(t,1,!1,t.toLowerCase(),null,!1,!1)});fa.xlinkHref=new Aa("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){fa[t]=new Aa(t,1,!1,t.toLowerCase(),null,!0,!0)});function mu(t,s,a,r){var l=fa.hasOwnProperty(s)?fa[s]:null;(l!==null?l.type!==0:r||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(I1(s,a,l,r)&&(a=null),r||l===null?S1(s)&&(a===null?t.removeAttribute(s):t.setAttribute(s,""+a)):l.mustUseProperty?t[l.propertyName]=a===null?l.type===3?!1:"":a:(s=l.attributeName,r=l.attributeNamespace,a===null?t.removeAttribute(s):(l=l.type,a=l===3||l===4&&a===!0?"":""+a,r?t.setAttributeNS(r,s,a):t.setAttribute(s,a))))}var Cl=k1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Rc=Symbol.for("react.element"),hi=Symbol.for("react.portal"),pi=Symbol.for("react.fragment"),xu=Symbol.for("react.strict_mode"),Xx=Symbol.for("react.profiler"),og=Symbol.for("react.provider"),cg=Symbol.for("react.context"),uu=Symbol.for("react.forward_ref"),Kx=Symbol.for("react.suspense"),Qx=Symbol.for("react.suspense_list"),hu=Symbol.for("react.memo"),Xl=Symbol.for("react.lazy"),dg=Symbol.for("react.offscreen"),fh=Symbol.iterator;function lo(t){return t===null||typeof t!="object"?null:(t=fh&&t[fh]||t["@@iterator"],typeof t=="function"?t:null)}var Es=Object.assign,zm;function wo(t){if(zm===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);zm=s&&s[1]||""}return` 34`+zm+t}var $m=!1;function Lm(t,s){if(!t||$m)return"";$m=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(x){var r=x}Reflect.construct(t,[],s)}else{try{s.call()}catch(x){r=x}t.call(s.prototype)}else{try{throw Error()}catch(x){r=x}t()}}catch(x){if(x&&r&&typeof x.stack=="string"){for(var l=x.stack.split(` 35`),n=r.stack.split(` 36`),i=l.length-1,c=n.length-1;1<=i&&0<=c&&l[i]!==n[c];)c--;for(;1<=i&&0<=c;i--,c--)if(l[i]!==n[c]){if(i!==1||c!==1)do if(i--,c--,0>c||l[i]!==n[c]){var d=` 37`+l[i].replace(" at new "," at ");return t.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",t.displayName)),d}while(1<=i&&0<=c);break}}}finally{$m=!1,Error.prepareStackTrace=a}return(t=t?t.displayName||t.name:"")?wo(t):""}function T1(t){switch(t.tag){case 5:return wo(t.type);case 16:return wo("Lazy");case 13:return wo("Suspense");case 19:return wo("SuspenseList");case 0:case 2:case 15:return t=Lm(t.type,!1),t;case 11:return t=Lm(t.type.render,!1),t;case 1:return t=Lm(t.type,!0),t;default:return""}}function Zx(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case pi:return"Fragment";case hi:return"Portal";case Xx:return"Profiler";case xu:return"StrictMode";case Kx:return"Suspense";case Qx:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case cg:return(t.displayName||"Context")+".Consumer";case og:return(t._context.displayName||"Context")+".Provider";case uu:var s=t.render;return t=t.displayName,t||(t=s.displayName||s.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case hu:return s=t.displayName||null,s!==null?s:Zx(t.type)||"Memo";case Xl:s=t._payload,t=t._init;try{return Zx(t(s))}catch{}}return null}function P1(t){var s=t.type;switch(t.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=s.render,t=t.displayName||t.name||"",s.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zx(s);case 8:return s===xu?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function pn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function mg(t){var s=t.type;
vendor: 12,159 bytes, line 37
37return(t=t.nodeName)&&t.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function A1(t){var s=mg(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,s),r=""+t[s];if(!t.hasOwnProperty(s)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,n=a.set;return Object.defineProperty(t,s,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,n.call(this,i)}}),Object.defineProperty(t,s,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){t._valueTracker=null,delete t[s]}}}}function Fc(t){t._valueTracker||(t._valueTracker=A1(t))}function xg(t){if(!t)return!1;var s=t._valueTracker;if(!s)return!0;var a=s.getValue(),r="";return t&&(r=mg(t)?t.checked?"true":"false":t.value),t=r,t!==a?(s.setValue(t),!0):!1}function Ad(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function e0(t,s){var a=s.checked;return Es({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??t._wrapperState.initialChecked})}function gh(t,s){var a=s.defaultValue==null?"":s.defaultValue,r=s.checked!=null?s.checked:s.defaultChecked;a=pn(s.value!=null?s.value:a),t._wrapperState={initialChecked:r,initialValue:a,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function ug(t,s){s=s.checked,s!=null&&mu(t,"checked",s,!1)}function t0(t,s){ug(t,s);var a=pn(s.value),r=s.type;if(a!=null)r==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+a):t.value!==""+a&&(t.value=""+a);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}s.hasOwnProperty("value")?s0(t,s.type,a):s.hasOwnProperty("defaultValue")&&s0(t,s.type,pn(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(t.defaultChecked=!!s.defaultChecked)}function bh(t,s,a){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var r=s.type;if(!(r!=="submit"&&r!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+t._wrapperState.initialValue,a||s===t.value||(t.value=s),t.defaultValue=s}a=t.name,a!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,a!==""&&(t.name=a)}function s0(t,s,a){(s!=="number"||Ad(t.ownerDocument)!==t)&&(a==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+a&&(t.defaultValue=""+a))}var No=Array.isArray;function Ci(t,s,a,r){if(t=t.options,s){s={};for(var l=0;l<a.length;l++)s["$"+a[l]]=!0;for(a=0;a<t.length;a++)l=s.hasOwnProperty("$"+t[a].value),t[a].selected!==l&&(t[a].selected=l),l&&r&&(t[a].defaultSelected=!0)}else{for(a=""+pn(a),s=null,l=0;l<t.length;l++){if(t[l].value===a){t[l].selected=!0,r&&(t[l].defaultSelected=!0);return}s!==null||t[l].disabled||(s=t[l])}s!==null&&(s.selected=!0)}}function a0(t,s){if(s.dangerouslySetInnerHTML!=null)throw Error(Je(91));return Es({},s,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function yh(t,s){var a=s.value;if(a==null){if(a=s.children,s=s.defaultValue,a!=null){if(s!=null)throw Error(Je(92));if(No(a)){if(1<a.length)throw Error(Je(93));a=a[0]}s=a}s==null&&(s=""),a=s}t._wrapperState={initialValue:pn(a)}}function hg(t,s){var a=pn(s.value),r=pn(s.defaultValue);a!=null&&(a=""+a,a!==t.value&&(t.value=a),s.defaultValue==null&&t.defaultValue!==a&&(t.defaultValue=a)),r!=null&&(t.defaultValue=""+r)}function jh(t){var s=t.textContent;s===t._wrapperState.initialValue&&s!==""&&s!==null&&(t.value=s)}function pg(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function r0(t,s){return t==null||t==="http://www.w3.org/1999/xhtml"?pg(s):t==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Oc,fg=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,a,r,l){MSApp.execUnsafeLocalFunction(function(){return t(s,a,r,l)})}:t}(function(t,s){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=s;else{for(Oc=Oc||document.createElement("div"),Oc.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Oc.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;s.firstChild;)t.appendChild(s.firstChild)}});function Wo(t,s){if(s){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=s;return}}t.textContent=s}var Po={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},M1=["Webkit","ms","Moz","O"];Object.keys(Po).forEach(function(t){M1.forEach(function(s){s=s+t.charAt(0).toUpperCase()+t.substring(1),Po[s]=Po[t]})});function gg(t,s,a){return s==null||typeof s=="boolean"||s===""?"":a||typeof s!="number"||s===0||Po.hasOwnProperty(t)&&Po[t]?(""+s).trim():s+"px"}function bg(t,s){t=t.style;for(var a in s)if(s.hasOwnProperty(a)){var r=a.indexOf("--")===0,l=gg(a,s[a],r);a==="float"&&(a="cssFloat"),r?t.setProperty(a,l):t[a]=l}}var E1=Es({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 l0(t,s){if(s){if(E1[t]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(Je(137,t));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(Je(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(Je(61))}if(s.style!=null&&typeof s.style!="object")throw Error(Je(62))}}function n0(t,s){if(t.indexOf("-")===-1)return typeof s.is=="string";switch(t){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 i0=null;function pu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var o0=null,Ii=null,Ti=null;function vh(t){if(t=hc(t)){if(typeof o0!="function")throw Error(Je(280));var s=t.stateNode;s&&(s=pm(s),o0(t.stateNode,t.type,s))}}function yg(t){Ii?Ti?Ti.push(t):Ti=[t]:Ii=t}function jg(){if(Ii){var t=Ii,s=Ti;if(Ti=Ii=null,vh(t),s)for(t=0;t<s.length;t++)vh(s[t])}}function vg(t,s){return t(s)}function wg(){}var Bm=!1;function Ng(t,s,a){if(Bm)return t(s,a);Bm=!0;try{return vg(t,s,a)}finally{Bm=!1,(Ii!==null||Ti!==null)&&(wg(),jg())}}function Ho(t,s){var a=t.stateNode;if(a===null)return null;var r=pm(a);if(r===null)return null;a=r[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(Je(231,s,typeof a));return a}var c0=!1;if(jl)try{var no={};Object.defineProperty(no,"passive",{get:function(){c0=!0}}),window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{c0=!1}function D1(t,s,a,r,l,n,i,c,d){var x=Array.prototype.slice.call(arguments,3);try{s.apply(a,x)}catch(m){this.onError(m)}}var Ao=!1,Md=null,Ed=!1,d0=null,R1={onError:function(t){Ao=!0,Md=t}};function F1(t,s,a,r,l,n,i,c,d){Ao=!1,Md=null,D1.apply(R1,arguments)}function O1(t,s,a,r,l,n,i,c,d){if(F1.apply(this,arguments),Ao){if(Ao){var x=Md;Ao=!1,Md=null}else throw Error(Je(198));Ed||(Ed=!0,d0=x)}}function Zn(t){var s=t,a=t;if(t.alternate)for(;s.return;)s=s.return;else{t=s;do s=t,s.flags&4098&&(a=s.return),t=s.return;while(t)}return s.tag===3?a:null}function kg(t){if(t.tag===13){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function wh(t){if(Zn(t)!==t)throw Error(Je(188))}function z1(t){var s=t.alternate;if(!s){if(s=Zn(t),s===null)throw Error(Je(188));return s!==t?null:t}for(var a=t,r=s;;){var l=a.return;if(l===null)break;var n=l.alternate;if(n===null){if(r=l.return,r!==null){a=r;continue}break}if(l.child===n.child){for(n=l.child;n;){if(n===a)return wh(l),t;if(n===r)return wh(l),s;n=n.sibling}throw Error(Je(188))}if(a.return!==r.return)a=l,r=n;else{for(var i=!1,c=l.child;c;){if(c===a){i=!0,a=l,r=n;break}if(c===r){i=!0,r=l,a=n;break}c=c.sibling}if(!i){for(c=n.child;c;){if(c===a){i=!0,a=n,r=l;break}if(c===r){i=!0,r=n,a=l;break}c=c.sibling}if(!i)throw Error(Je(189))}}if(a.alternate!==r)throw Error(Je(190))}if(a.tag!==3)throw Error(Je(188));return a.stateNode.current===a?t:s}function _g(t){return t=z1(t),t!==null?Sg(t):null}function Sg(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var s=Sg(t);if(s!==null)return s;t=t.sibling}return null}var Cg=tr.unstable_scheduleCallback,Nh=tr.unstable_cancelCallback,$1=tr.unstable_shouldYield,L1=tr.unstable_requestPaint,$s=tr.unstable_now,B1=tr.unstable_getCurrentPriorityLevel,fu=tr.unstable_ImmediatePriority,Ig=tr.unstable_UserBlockingPriority,Dd=tr.unstable_NormalPriority,U1=tr.unstable_LowPriority,Tg=tr.unstable_IdlePriority,mm=null,Zr=null;function q1(t){if(Zr&&typeof Zr.onCommitFiberRoot=="function")try{Zr.onCommitFiberRoot(mm,t,void 0,(t.current.flags&128)===128)}catch{}}var Mr=Math.clz32?Math.clz32:W1,G1=Math.log,J1=Math.LN2;function W1(t){return t>>>=0,t===0?32:31-(G1(t)/J1|0)|0}var zc=64,$c=4194304;function ko(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Rd(t,s){var a=t.pendingLanes;if(a===0)return 0;var r=0,l=t.suspendedLanes,n=t.pingedLanes,i=a&268435455;if(i!==0){var c=i&~l;c!==0?r=ko(c):(n&=i,n!==0&&(r=ko(n)))}else i=a&~l,i!==0?r=ko(i):n!==0&&(r=ko(n));if(r===0)return 0;if(s!==0&&s!==r&&!(s&l)&&(l=r&-r,n=s&-s,l>=n||l===16&&(n&4194240)!==0))return s;if(r&4&&(r|=a&16),s=t.entangledLanes,s!==0)for(t=t.entanglements,s&=r;0<s;)a=31-Mr(s),l=1<<a,r|=t[a],s&=~l;return r}function H1(t,s){switch(t){case 1:case 2:case 4:return s+250;case 8:case 16:case 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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function V1(t,s){for(var a=t.suspendedLanes,r=t.pingedLanes,l=t.expirationTimes,n=t.pendingLanes;0<n;){var i=31-Mr(n),c=1<<i,d=l[i];d===-1?(!(c&a)||c&r)&&(l[i]=H1(c,s)):d<=s&&(t.expiredLanes|=c),n&=~c}}function m0(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Pg(){var t=zc;return zc<<=1,!(zc&4194240)&&(zc=64),t}function Um(t){for(var s=[],a=0;31>a;a++)s.push(t);return s}function xc(t,s,a){t.pendingLanes|=s,s!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,s=31-Mr(s),t[s]=a}function Y1(t,s){var a=t.pendingLanes&~s;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=s,t.mutableReadLanes&=s,t.entangledLanes&=s,s=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<a;){var l=31-Mr(a),n=1<<l;s[l]=0,r[l]=-1,t[l]=-1,a&=~n}}function gu(t,s){var a=t.entangledLanes|=s;for(t=t.entanglements;a;){var r=31-Mr(a),l=1<<r;
vendor: 5,043 bytes, line 37
37l&s|t[r]&s&&(t[r]|=s),a&=~l}}var cs=0;function Ag(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Mg,bu,Eg,Dg,Rg,x0=!1,Lc=[],ln=null,nn=null,on=null,Vo=new Map,Yo=new Map,Ql=[],X1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function kh(t,s){switch(t){case"focusin":case"focusout":ln=null;break;case"dragenter":case"dragleave":nn=null;break;case"mouseover":case"mouseout":on=null;break;case"pointerover":case"pointerout":Vo.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yo.delete(s.pointerId)}}function io(t,s,a,r,l,n){return t===null||t.nativeEvent!==n?(t={blockedOn:s,domEventName:a,eventSystemFlags:r,nativeEvent:n,targetContainers:[l]},s!==null&&(s=hc(s),s!==null&&bu(s)),t):(t.eventSystemFlags|=r,s=t.targetContainers,l!==null&&s.indexOf(l)===-1&&s.push(l),t)}function K1(t,s,a,r,l){switch(s){case"focusin":return ln=io(ln,t,s,a,r,l),!0;case"dragenter":return nn=io(nn,t,s,a,r,l),!0;case"mouseover":return on=io(on,t,s,a,r,l),!0;case"pointerover":var n=l.pointerId;return Vo.set(n,io(Vo.get(n)||null,t,s,a,r,l)),!0;case"gotpointercapture":return n=l.pointerId,Yo.set(n,io(Yo.get(n)||null,t,s,a,r,l)),!0}return!1}function Fg(t){var s=On(t.target);if(s!==null){var a=Zn(s);if(a!==null){if(s=a.tag,s===13){if(s=kg(a),s!==null){t.blockedOn=s,Rg(t.priority,function(){Eg(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function gd(t){if(t.blockedOn!==null)return!1;for(var s=t.targetContainers;0<s.length;){var a=u0(t.domEventName,t.eventSystemFlags,s[0],t.nativeEvent);if(a===null){a=t.nativeEvent;var r=new a.constructor(a.type,a);i0=r,a.target.dispatchEvent(r),i0=null}else return s=hc(a),s!==null&&bu(s),t.blockedOn=a,!1;s.shift()}return!0}function _h(t,s,a){gd(t)&&a.delete(s)}function Q1(){x0=!1,ln!==null&&gd(ln)&&(ln=null),nn!==null&&gd(nn)&&(nn=null),on!==null&&gd(on)&&(on=null),Vo.forEach(_h),Yo.forEach(_h)}function oo(t,s){t.blockedOn===s&&(t.blockedOn=null,x0||(x0=!0,tr.unstable_scheduleCallback(tr.unstable_NormalPriority,Q1)))}function Xo(t){function s(l){return oo(l,t)}if(0<Lc.length){oo(Lc[0],t);for(var a=1;a<Lc.length;a++){var r=Lc[a];r.blockedOn===t&&(r.blockedOn=null)}}for(ln!==null&&oo(ln,t),nn!==null&&oo(nn,t),on!==null&&oo(on,t),Vo.forEach(s),Yo.forEach(s),a=0;a<Ql.length;a++)r=Ql[a],r.blockedOn===t&&(r.blockedOn=null);for(;0<Ql.length&&(a=Ql[0],a.blockedOn===null);)Fg(a),a.blockedOn===null&&Ql.shift()}var Pi=Cl.ReactCurrentBatchConfig,Fd=!0;function Z1(t,s,a,r){var l=cs,n=Pi.transition;Pi.transition=null;try{cs=1,yu(t,s,a,r)}finally{cs=l,Pi.transition=n}}function ej(t,s,a,r){var l=cs,n=Pi.transition;Pi.transition=null;try{cs=4,yu(t,s,a,r)}finally{cs=l,Pi.transition=n}}function yu(t,s,a,r){if(Fd){var l=u0(t,s,a,r);if(l===null)Qm(t,s,r,Od,a),kh(t,r);else if(K1(l,t,s,a,r))r.stopPropagation();else if(kh(t,r),s&4&&-1<X1.indexOf(t)){for(;l!==null;){var n=hc(l);if(n!==null&&Mg(n),n=u0(t,s,a,r),n===null&&Qm(t,s,r,Od,a),n===l)break;l=n}l!==null&&r.stopPropagation()}else Qm(t,s,r,null,a)}}var Od=null;function u0(t,s,a,r){if(Od=null,t=pu(r),t=On(t),t!==null)if(s=Zn(t),s===null)t=null;else if(a=s.tag,a===13){if(t=kg(s),t!==null)return t;t=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;t=null}else s!==t&&(t=null);return Od=t,null}function Og(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(B1()){case fu:return 1;case Ig:return 4;case Dd:case U1:return 16;case Tg:return 536870912;default:return 16}default:return 16}}var tn=null,ju=null,bd=null;function zg(){if(bd)return bd;var t,s=ju,a=s.length,r,l="value"in tn?tn.value:tn.textContent,n=l.length;for(t=0;t<a&&s[t]===l[t];t++);var i=a-t;
vendor: 8,960 bytes, line 37
37for(r=1;r<=i&&s[a-r]===l[n-r];r++);return bd=l.slice(t,1<r?1-r:void 0)}function yd(t){var s=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&s===13&&(t=13)):t=s,t===10&&(t=13),32<=t||t===13?t:0}function Bc(){return!0}function Sh(){return!1}function rr(t){function s(a,r,l,n,i){this._reactName=a,this._targetInst=l,this.type=r,this.nativeEvent=n,this.target=i,this.currentTarget=null;for(var c in t)t.hasOwnProperty(c)&&(a=t[c],this[c]=a?a(n):n[c]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?Bc:Sh,this.isPropagationStopped=Sh,this}return Es(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Bc)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Bc)},persist:function(){},isPersistent:Bc}),s}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vu=rr(Yi),uc=Es({},Yi,{view:0,detail:0}),tj=rr(uc),qm,Gm,co,xm=Es({},uc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==co&&(co&&t.type==="mousemove"?(qm=t.screenX-co.screenX,Gm=t.screenY-co.screenY):Gm=qm=0,co=t),qm)},movementY:function(t){return"movementY"in t?t.movementY:Gm}}),Ch=rr(xm),sj=Es({},xm,{dataTransfer:0}),aj=rr(sj),rj=Es({},uc,{relatedTarget:0}),Jm=rr(rj),lj=Es({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),nj=rr(lj),ij=Es({},Yi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),oj=rr(ij),cj=Es({},Yi,{data:0}),Ih=rr(cj),dj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mj={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uj(t){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(t):(t=xj[t])?!!s[t]:!1}function wu(){return uj}var hj=Es({},uc,{key:function(t){if(t.key){var s=dj[t.key]||t.key;if(s!=="Unidentified")return s}return t.type==="keypress"?(t=yd(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?mj[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wu,charCode:function(t){return t.type==="keypress"?yd(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?yd(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),pj=rr(hj),fj=Es({},xm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=rr(fj),gj=Es({},uc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wu}),bj=rr(gj),yj=Es({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),jj=rr(yj),vj=Es({},xm,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),wj=rr(vj),Nj=[9,13,27,32],Nu=jl&&"CompositionEvent"in window,Mo=null;jl&&"documentMode"in document&&(Mo=document.documentMode);var kj=jl&&"TextEvent"in window&&!Mo,$g=jl&&(!Nu||Mo&&8<Mo&&11>=Mo),Ph=" ",Ah=!1;function Lg(t,s){switch(t){case"keyup":return Nj.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var fi=!1;function _j(t,s){switch(t){case"compositionend":return Bg(s);case"keypress":return s.which!==32?null:(Ah=!0,Ph);case"textInput":return t=s.data,t===Ph&&Ah?null:t;default:return null}}function Sj(t,s){if(fi)return t==="compositionend"||!Nu&&Lg(t,s)?(t=zg(),bd=ju=tn=null,fi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return $g&&s.locale!=="ko"?null:s.data;default:return null}}var Cj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mh(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s==="input"?!!Cj[t.type]:s==="textarea"}function Ug(t,s,a,r){yg(r),s=zd(s,"onChange"),0<s.length&&(a=new vu("onChange","change",null,a,r),t.push({event:a,listeners:s}))}var Eo=null,Ko=null;function Ij(t){Zg(t,0)}function um(t){var s=yi(t);if(xg(s))return t}function Tj(t,s){if(t==="change")return s}var qg=!1;if(jl){var Wm;if(jl){var Hm="oninput"in document;if(!Hm){var Eh=document.createElement("div");Eh.setAttribute("oninput","return;"),Hm=typeof Eh.oninput=="function"}Wm=Hm}else Wm=!1;qg=Wm&&(!document.documentMode||9<document.documentMode)}function Dh(){Eo&&(Eo.detachEvent("onpropertychange",Gg),Ko=Eo=null)}function Gg(t){if(t.propertyName==="value"&&um(Ko)){var s=[];Ug(s,Ko,t,pu(t)),Ng(Ij,s)}}function Pj(t,s,a){t==="focusin"?(Dh(),Eo=s,Ko=a,Eo.attachEvent("onpropertychange",Gg)):t==="focusout"&&Dh()}function Aj(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return um(Ko)}function Mj(t,s){if(t==="click")return um(s)}function Ej(t,s){if(t==="input"||t==="change")return um(s)}function Dj(t,s){return t===s&&(t!==0||1/t===1/s)||t!==t&&s!==s}var Rr=typeof Object.is=="function"?Object.is:Dj;function Qo(t,s){if(Rr(t,s))return!0;if(typeof t!="object"||t===null||typeof s!="object"||s===null)return!1;var a=Object.keys(t),r=Object.keys(s);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var l=a[r];if(!Yx.call(s,l)||!Rr(t[l],s[l]))return!1}return!0}function Rh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Fh(t,s){var a=Rh(t);t=0;for(var r;a;){if(a.nodeType===3){if(r=t+a.textContent.length,t<=s&&r>=s)return{node:a,offset:s-t};t=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Rh(a)}}function Jg(t,s){return t&&s?t===s?!0:t&&t.nodeType===3?!1:s&&s.nodeType===3?Jg(t,s.parentNode):"contains"in t?t.contains(s):t.compareDocumentPosition?!!(t.compareDocumentPosition(s)&16):!1:!1}function Wg(){for(var t=window,s=Ad();s instanceof t.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)t=s.contentWindow;else break;s=Ad(t.document)}return s}function ku(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s&&(s==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||s==="textarea"||t.contentEditable==="true")}function Rj(t){var s=Wg(),a=t.focusedElem,r=t.selectionRange;if(s!==a&&a&&a.ownerDocument&&Jg(a.ownerDocument.documentElement,a)){if(r!==null&&ku(a)){if(s=r.start,t=r.end,t===void 0&&(t=s),"selectionStart"in a)a.selectionStart=s,a.selectionEnd=Math.min(t,a.value.length);else if(t=(s=a.ownerDocument||document)&&s.defaultView||window,t.getSelection){t=t.getSelection();var l=a.textContent.length,n=Math.min(r.start,l);r=r.end===void 0?n:Math.min(r.end,l),!t.extend&&n>r&&(l=r,r=n,n=l),l=Fh(a,n);var i=Fh(a,r);l&&i&&(t.rangeCount!==1||t.anchorNode!==l.node||t.anchorOffset!==l.offset||t.focusNode!==i.node||t.focusOffset!==i.offset)&&(s=s.createRange(),s.setStart(l.node,l.offset),t.removeAllRanges(),n>r?(t.addRange(s),t.extend(i.node,i.offset)):(s.setEnd(i.node,i.offset),t.addRange(s)))}}for(s=[],t=a;t=t.parentNode;)t.nodeType===1&&s.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<s.length;a++)t=s[a],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Fj=jl&&"documentMode"in document&&11>=document.documentMode,gi=null,h0=null,Do=null,p0=!1;function Oh(t,s,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;p0||gi==null||gi!==Ad(r)||(r=gi,"selectionStart"in r&&ku(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),Do&&Qo(Do,r)||(Do=r,r=zd(h0,"onSelect"),0<r.length&&(s=new vu("onSelect","select",null,s,a),t.push({event:s,listeners:r}),s.target=gi)))}function Uc(t,s){var a={};return a[t.toLowerCase()]=s.toLowerCase(),a["Webkit"+t]="webkit"+s,a["Moz"+t]="moz"+s,a}var bi={animationend:Uc("Animation","AnimationEnd"),animationiteration:Uc("Animation","AnimationIteration"),animationstart:Uc("Animation","AnimationStart"),transitionend:Uc("Transition","TransitionEnd")},Vm={},Hg={};jl&&(Hg=document.createElement("div").style,"AnimationEvent"in window||(delete bi.animationend.animation,delete bi.animationiteration.animation,delete bi.animationstart.animation),"TransitionEvent"in window||delete bi.transitionend.transition);function hm(t){if(Vm[t])return Vm[t];if(!bi[t])return t;var s=bi[t],a;for(a in s)if(s.hasOwnProperty(a)&&a in Hg)return Vm[t]=s[a];return t}var Vg=hm("animationend"),Yg=hm("animationiteration"),Xg=hm("animationstart"),Kg=hm("transitionend"),Qg=new Map,zh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function yn(t,s){Qg.set(t,s),Qn(s,[t])}for(var Ym=0;Ym<zh.length;Ym++){var Xm=zh[Ym],Oj=Xm.toLowerCase(),zj=Xm[0].toUpperCase()+Xm.slice(1);yn(Oj,"on"+zj)}yn(Vg,"onAnimationEnd");yn(Yg,"onAnimationIteration");yn(Xg,"onAnimationStart");yn("dblclick","onDoubleClick");yn("focusin","onFocus");yn("focusout","onBlur");yn(Kg,"onTransitionEnd");Fi("onMouseEnter",["mouseout","mouseover"]);Fi("onMouseLeave",["mouseout","mouseover"]);Fi("onPointerEnter",["pointerout","pointerover"]);Fi("onPointerLeave",["pointerout","pointerover"]);Qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _o="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),$j=new Set("cancel close invalid load scroll toggle".split(" ").concat(_o));function $h(t,s,a){var r=t.type||"unknown-event";t.currentTarget=a,O1(r,s,void 0,t),t.currentTarget=null}function Zg(t,s){s=(s&4)!==0;for(var a=0;a<t.length;a++){var r=t[a],l=r.event;r=r.listeners;e:{var n=void 0;if(s)for(var i=r.length-1;0<=i;i--){var c=r[i],d=c.instance,x=c.currentTarget;if(c=c.listener,d!==n&&l.isPropagationStopped())break e;$h(l,c,x),n=d}else for(i=0;i<r.length;i++){if(c=r[i],d=c.instance,x=c.currentTarget,c=c.listener,d!==n&&l.isPropagationStopped())break e;$h(l,c,x),n=d}}}if(Ed)throw t=d0,Ed=!1,d0=null,t}function ks(t,s){var a=s[j0];a===void 0&&(a=s[j0]=new Set);var r=t+"__bubble";a.has(r)||(eb(s,t,2,!1),a.add(r))}function Km(t,s,a){var r=0;s&&(r|=4),eb(a,t,r,s)}var qc="_reactListening"+Math.random().toString(36).slice(2);function Zo(t){if(!t[qc]){t[qc]=!0,ig.forEach(function(a){a!=="selectionchange"&&($j.has(a)||Km(a,!1,t),Km(a,!0,t))});var s=t.nodeType===9?t:t.ownerDocument;s===null||s[qc]||(s[qc]=!0,Km("selectionchange",!1,s))}}function eb(t,s,a,r){switch(Og(s)){case 1:var l=Z1;break;case 4:l=ej;break;default:l=yu}a=l.bind(null,s,a,t),l=void 0,!c0||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(l=!0),r?l!==void 0?t.addEventListener(s,a,{capture:!0,passive:l}):t.addEventListener(s,a,!0):l!==void 0?t.addEventListener(s,a,{passive:l}):t.addEventListener(s,a,!1)}function Qm(t,s,a,r,l){var n=r;if(!(s&1)&&!(s&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var c=r.stateNode.containerInfo;
vendor: 4,410 bytes, line 37
37if(c===l||c.nodeType===8&&c.parentNode===l)break;if(i===4)for(i=r.return;i!==null;){var d=i.tag;if((d===3||d===4)&&(d=i.stateNode.containerInfo,d===l||d.nodeType===8&&d.parentNode===l))return;i=i.return}for(;c!==null;){if(i=On(c),i===null)return;if(d=i.tag,d===5||d===6){r=n=i;continue e}c=c.parentNode}}r=r.return}Ng(function(){var x=n,m=pu(a),h=[];e:{var f=Qg.get(t);if(f!==void 0){var y=vu,g=t;switch(t){case"keypress":if(yd(a)===0)break e;case"keydown":case"keyup":y=pj;break;case"focusin":g="focus",y=Jm;break;case"focusout":g="blur",y=Jm;break;case"beforeblur":case"afterblur":y=Jm;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=aj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=bj;break;case Vg:case Yg:case Xg:y=nj;break;case Kg:y=jj;break;case"scroll":y=tj;break;case"wheel":y=wj;break;case"copy":case"cut":case"paste":y=oj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Th}var w=(s&4)!==0,N=!w&&t==="scroll",v=w?f!==null?f+"Capture":null:f;w=[];for(var j=x,b;j!==null;){b=j;var p=b.stateNode;if(b.tag===5&&p!==null&&(b=p,v!==null&&(p=Ho(j,v),p!=null&&w.push(ec(j,p,b)))),N)break;j=j.return}0<w.length&&(f=new y(f,g,null,a,m),h.push({event:f,listeners:w}))}}if(!(s&7)){e:{if(f=t==="mouseover"||t==="pointerover",y=t==="mouseout"||t==="pointerout",f&&a!==i0&&(g=a.relatedTarget||a.fromElement)&&(On(g)||g[vl]))break e;if((y||f)&&(f=m.window===m?m:(f=m.ownerDocument)?f.defaultView||f.parentWindow:window,y?(g=a.relatedTarget||a.toElement,y=x,g=g?On(g):null,g!==null&&(N=Zn(g),g!==N||g.tag!==5&&g.tag!==6)&&(g=null)):(y=null,g=x),y!==g)){if(w=Ch,p="onMouseLeave",v="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(w=Th,p="onPointerLeave",v="onPointerEnter",j="pointer"),N=y==null?f:yi(y),b=g==null?f:yi(g),f=new w(p,j+"leave",y,a,m),f.target=N,f.relatedTarget=b,p=null,On(m)===x&&(w=new w(v,j+"enter",g,a,m),w.target=b,w.relatedTarget=N,p=w),N=p,y&&g)t:{for(w=y,v=g,j=0,b=w;b;b=ai(b))j++;for(b=0,p=v;p;p=ai(p))b++;for(;0<j-b;)w=ai(w),j--;for(;0<b-j;)v=ai(v),b--;for(;j--;){if(w===v||v!==null&&w===v.alternate)break t;w=ai(w),v=ai(v)}w=null}else w=null;y!==null&&Lh(h,f,y,w,!1),g!==null&&N!==null&&Lh(h,N,g,w,!0)}}e:{if(f=x?yi(x):window,y=f.nodeName&&f.nodeName.toLowerCase(),y==="select"||y==="input"&&f.type==="file")var E=Tj;else if(Mh(f))if(qg)E=Ej;else{E=Aj;var C=Pj}else(y=f.nodeName)&&y.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=Mj);if(E&&(E=E(t,x))){Ug(h,E,a,m);break e}C&&C(t,f,x),t==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&s0(f,"number",f.value)}switch(C=x?yi(x):window,t){case"focusin":(Mh(C)||C.contentEditable==="true")&&(gi=C,h0=x,Do=null);break;case"focusout":Do=h0=gi=null;break;case"mousedown":p0=!0;break;case"contextmenu":case"mouseup":case"dragend":p0=!1,Oh(h,a,m);break;case"selectionchange":if(Fj)break;case"keydown":case"keyup":Oh(h,a,m)}var S;if(Nu)e:{switch(t){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else fi?Lg(t,a)&&(k="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(k="onCompositionStart");k&&($g&&a.locale!=="ko"&&(fi||k!=="onCompositionStart"?k==="onCompositionEnd"&&fi&&(S=zg()):(tn=m,ju="value"in tn?tn.value:tn.textContent,fi=!0)),C=zd(x,k),0<C.length&&(k=new Ih(k,t,null,a,m),h.push({event:k,listeners:C}),S?k.data=S:(S=Bg(a),S!==null&&(k.data=S)))),(S=kj?_j(t,a):Sj(t,a))&&(x=zd(x,"onBeforeInput"),0<x.length&&(m=new Ih("onBeforeInput","beforeinput",null,a,m),h.push({event:m,listeners:x}),m.data=S))}Zg(h,s)})}function ec(t,s,a){return{instance:t,listener:s,currentTarget:a}}function zd(t,s){for(var a=s+"Capture",r=[];t!==null;){var l=t,n=l.stateNode;l.tag===5&&n!==null&&(l=n,n=Ho(t,a),n!=null&&r.unshift(ec(t,n,l)),n=Ho(t,s),n!=null&&r.push(ec(t,n,l))),t=t.return}return r}function ai(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Lh(t,s,a,r,l){for(var n=s._reactName,i=[];a!==null&&a!==r;){var c=a,d=c.alternate,x=c.stateNode;
vendor: 5,365 bytes, lines 37-38
37if(d!==null&&d===r)break;c.tag===5&&x!==null&&(c=x,l?(d=Ho(a,n),d!=null&&i.unshift(ec(a,d,c))):l||(d=Ho(a,n),d!=null&&i.push(ec(a,d,c)))),a=a.return}i.length!==0&&t.push({event:s,listeners:i})}var Lj=/\r\n?/g,Bj=/\u0000|\uFFFD/g;function Bh(t){return(typeof t=="string"?t:""+t).replace(Lj,` 38`).replace(Bj,"")}function Gc(t,s,a){if(s=Bh(s),Bh(t)!==s&&a)throw Error(Je(425))}function $d(){}var f0=null,g0=null;function b0(t,s){return t==="textarea"||t==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var y0=typeof setTimeout=="function"?setTimeout:void 0,Uj=typeof clearTimeout=="function"?clearTimeout:void 0,Uh=typeof Promise=="function"?Promise:void 0,qj=typeof queueMicrotask=="function"?queueMicrotask:typeof Uh<"u"?function(t){return Uh.resolve(null).then(t).catch(Gj)}:y0;function Gj(t){setTimeout(function(){throw t})}function Zm(t,s){var a=s,r=0;do{var l=a.nextSibling;if(t.removeChild(a),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(r===0){t.removeChild(l),Xo(s);return}r--}else a!=="$"&&a!=="$?"&&a!=="$!"||r++;a=l}while(a);Xo(s)}function cn(t){for(;t!=null;t=t.nextSibling){var s=t.nodeType;if(s===1||s===3)break;if(s===8){if(s=t.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return t}function qh(t){t=t.previousSibling;for(var s=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(s===0)return t;s--}else a==="/$"&&s++}t=t.previousSibling}return null}var Xi=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Xi,tc="__reactProps$"+Xi,vl="__reactContainer$"+Xi,j0="__reactEvents$"+Xi,Jj="__reactListeners$"+Xi,Wj="__reactHandles$"+Xi;function On(t){var s=t[Yr];if(s)return s;for(var a=t.parentNode;a;){if(s=a[vl]||a[Yr]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(t=qh(t);t!==null;){if(a=t[Yr])return a;t=qh(t)}return s}t=a,a=t.parentNode}return null}function hc(t){return t=t[Yr]||t[vl],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function yi(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Je(33))}function pm(t){return t[tc]||null}var v0=[],ji=-1;function jn(t){return{current:t}}function Ss(t){0>ji||(t.current=v0[ji],v0[ji]=null,ji--)}function vs(t,s){ji++,v0[ji]=t.current,t.current=s}var fn={},wa=jn(fn),$a=jn(!1),qn=fn;function Oi(t,s){var a=t.type.contextTypes;if(!a)return fn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===s)return r.__reactInternalMemoizedMaskedChildContext;var l={},n;for(n in a)l[n]=s[n];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=l),l}function La(t){return t=t.childContextTypes,t!=null}function Ld(){Ss($a),Ss(wa)}function Gh(t,s,a){if(wa.current!==fn)throw Error(Je(168));vs(wa,s),vs($a,a)}function tb(t,s,a){var r=t.stateNode;if(s=s.childContextTypes,typeof r.getChildContext!="function")return a;r=r.getChildContext();for(var l in r)if(!(l in s))throw Error(Je(108,P1(t)||"Unknown",l));return Es({},a,r)}function Bd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||fn,qn=wa.current,vs(wa,t),vs($a,$a.current),!0}function Jh(t,s,a){var r=t.stateNode;if(!r)throw Error(Je(169));a?(t=tb(t,s,qn),r.__reactInternalMemoizedMergedChildContext=t,Ss($a),Ss(wa),vs(wa,t)):Ss($a),vs($a,a)}var ul=null,fm=!1,ex=!1;function sb(t){ul===null?ul=[t]:ul.push(t)}function Hj(t){fm=!0,sb(t)}function vn(){if(!ex&&ul!==null){ex=!0;var t=0,s=cs;try{var a=ul;for(cs=1;t<a.length;t++){var r=a[t];do r=r(!0);while(r!==null)}ul=null,fm=!1}catch(l){throw ul!==null&&(ul=ul.slice(t+1)),Cg(fu,vn),l}finally{cs=s,ex=!1}}return null}var vi=[],wi=0,Ud=null,qd=0,or=[],cr=0,Gn=null,pl=1,fl="";function Mn(t,s){vi[wi++]=qd,vi[wi++]=Ud,Ud=t,qd=s}function ab(t,s,a){or[cr++]=pl,or[cr++]=fl,or[cr++]=Gn,Gn=t;var r=pl;t=fl;var l=32-Mr(r)-1;r&=~(1<<l),a+=1;var n=32-Mr(s)+l;if(30<n){var i=l-l%5;n=(r&(1<<i)-1).toString(32),r>>=i,l-=i,pl=1<<32-Mr(s)+l|a<<l|r,fl=n+t}else pl=1<<n|a<<l|r,fl=t}function _u(t){t.return!==null&&(Mn(t,1),ab(t,1,0))}function Su(t){for(;t===Ud;)Ud=vi[--wi],vi[wi]=null,qd=vi[--wi],vi[wi]=null;for(;t===Gn;)Gn=or[--cr],or[cr]=null,fl=or[--cr],or[cr]=null,pl=or[--cr],or[cr]=null}var Qa=null,Xa=null,Is=!1,Pr=null;function rb(t,s){var a=dr(5,null,null,0);a.elementType="DELETED",a.stateNode=s,a.return=t,s=t.deletions,s===null?(t.deletions=[a],t.flags|=16):s.push(a)}function Wh(t,s){switch(t.tag){case 5:var a=t.type;return s=s.nodeType!==1||a.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(t.stateNode=s,Qa=t,Xa=cn(s.firstChild),!0):!1;case 6:return s=t.pendingProps===""||s.nodeType!==3?null:s,s!==null?(t.stateNode=s,Qa=t,Xa=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(a=Gn!==null?{id:pl,overflow:fl}:null,t.memoizedState={dehydrated:s,treeContext:a,retryLane:1073741824},a=dr(18,null,null,0),a.stateNode=s,a.return=t,t.child=a,Qa=t,Xa=null,!0):!1;default:return!1}}function w0(t){return(t.mode&1)!==0&&(t.flags&128)===0}function N0(t){if(Is){var s=Xa;if(s){var a=s;if(!Wh(t,s)){if(w0(t))throw Error(Je(418));s=cn(a.nextSibling);var r=Qa;s&&Wh(t,s)?rb(r,a):(t.flags=t.flags&-4097|2,Is=!1,Qa=t)}}else{if(w0(t))throw Error(Je(418));t.flags=t.flags&-4097|2,Is=!1,Qa=t}}}function Hh(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Qa=t}
vendor: 4,401 bytes, line 38
38function Jc(t){if(t!==Qa)return!1;if(!Is)return Hh(t),Is=!0,!1;var s;if((s=t.tag!==3)&&!(s=t.tag!==5)&&(s=t.type,s=s!=="head"&&s!=="body"&&!b0(t.type,t.memoizedProps)),s&&(s=Xa)){if(w0(t))throw lb(),Error(Je(418));for(;s;)rb(t,s),s=cn(s.nextSibling)}if(Hh(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Je(317));e:{for(t=t.nextSibling,s=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"){if(s===0){Xa=cn(t.nextSibling);break e}s--}else a!=="$"&&a!=="$!"&&a!=="$?"||s++}t=t.nextSibling}Xa=null}}else Xa=Qa?cn(t.stateNode.nextSibling):null;return!0}function lb(){for(var t=Xa;t;)t=cn(t.nextSibling)}function zi(){Xa=Qa=null,Is=!1}function Cu(t){Pr===null?Pr=[t]:Pr.push(t)}var Vj=Cl.ReactCurrentBatchConfig;function mo(t,s,a){if(t=a.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(Je(309));var r=a.stateNode}if(!r)throw Error(Je(147,t));var l=r,n=""+t;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===n?s.ref:(s=function(i){var c=l.refs;i===null?delete c[n]:c[n]=i},s._stringRef=n,s)}if(typeof t!="string")throw Error(Je(284));if(!a._owner)throw Error(Je(290,t))}return t}function Wc(t,s){throw t=Object.prototype.toString.call(s),Error(Je(31,t==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":t))}function Vh(t){var s=t._init;return s(t._payload)}function nb(t){function s(v,j){if(t){var b=v.deletions;b===null?(v.deletions=[j],v.flags|=16):b.push(j)}}function a(v,j){if(!t)return null;for(;j!==null;)s(v,j),j=j.sibling;return null}function r(v,j){for(v=new Map;j!==null;)j.key!==null?v.set(j.key,j):v.set(j.index,j),j=j.sibling;return v}function l(v,j){return v=un(v,j),v.index=0,v.sibling=null,v}function n(v,j,b){return v.index=b,t?(b=v.alternate,b!==null?(b=b.index,b<j?(v.flags|=2,j):b):(v.flags|=2,j)):(v.flags|=1048576,j)}function i(v){return t&&v.alternate===null&&(v.flags|=2),v}function c(v,j,b,p){return j===null||j.tag!==6?(j=ix(b,v.mode,p),j.return=v,j):(j=l(j,b),j.return=v,j)}function d(v,j,b,p){var E=b.type;return E===pi?m(v,j,b.props.children,p,b.key):j!==null&&(j.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xl&&Vh(E)===j.type)?(p=l(j,b.props),p.ref=mo(v,j,b),p.return=v,p):(p=Sd(b.type,b.key,b.props,null,v.mode,p),p.ref=mo(v,j,b),p.return=v,p)}function x(v,j,b,p){return j===null||j.tag!==4||j.stateNode.containerInfo!==b.containerInfo||j.stateNode.implementation!==b.implementation?(j=ox(b,v.mode,p),j.return=v,j):(j=l(j,b.children||[]),j.return=v,j)}function m(v,j,b,p,E){return j===null||j.tag!==7?(j=Bn(b,v.mode,p,E),j.return=v,j):(j=l(j,b),j.return=v,j)}function h(v,j,b){if(typeof j=="string"&&j!==""||typeof j=="number")return j=ix(""+j,v.mode,b),j.return=v,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Rc:return b=Sd(j.type,j.key,j.props,null,v.mode,b),b.ref=mo(v,null,j),b.return=v,b;case hi:return j=ox(j,v.mode,b),j.return=v,j;case Xl:var p=j._init;return h(v,p(j._payload),b)}if(No(j)||lo(j))return j=Bn(j,v.mode,b,null),j.return=v,j;Wc(v,j)}return null}function f(v,j,b,p){var E=j!==null?j.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return E!==null?null:c(v,j,""+b,p);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Rc:return b.key===E?d(v,j,b,p):null;case hi:return b.key===E?x(v,j,b,p):null;case Xl:return E=b._init,f(v,j,E(b._payload),p)}if(No(b)||lo(b))return E!==null?null:m(v,j,b,p,null);Wc(v,b)}return null}function y(v,j,b,p,E){if(typeof p=="string"&&p!==""||typeof p=="number")return v=v.get(b)||null,c(j,v,""+p,E);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Rc:return v=v.get(p.key===null?b:p.key)||null,d(j,v,p,E);case hi:return v=v.get(p.key===null?b:p.key)||null,x(j,v,p,E);case Xl:var C=p._init;return y(v,j,b,C(p._payload),E)}if(No(p)||lo(p))return v=v.get(b)||null,m(j,v,p,E,null);Wc(j,p)}return null}function g(v,j,b,p){for(var E=null,C=null,S=j,k=j=0,J=null;S!==null&&k<b.length;k++){S.index>k?(J=S,S=null):J=S.sibling;var u=f(v,S,b[k],p);if(u===null){S===null&&(S=J);break}t&&S&&u.alternate===null&&s(v,S),j=n(u,j,k),C===null?E=u:C.sibling=u,C=u,S=J}if(k===b.length)return a(v,S),Is&&Mn(v,k),E;if(S===null){for(;k<b.length;k++)S=h(v,b[k],p),S!==null&&(j=n(S,j,k),C===null?E=S:C.sibling=S,C=S);return Is&&Mn(v,k),E}for(S=r(v,S);k<b.length;k++)J=y(S,v,k,b[k],p),J!==null&&(t&&J.alternate!==null&&S.delete(J.key===null?k:J.key),j=n(J,j,k),
vendor: 2,092 bytes, line 38
38C===null?E=J:C.sibling=J,C=J);return t&&S.forEach(function(A){return s(v,A)}),Is&&Mn(v,k),E}function w(v,j,b,p){var E=lo(b);if(typeof E!="function")throw Error(Je(150));if(b=E.call(b),b==null)throw Error(Je(151));for(var C=E=null,S=j,k=j=0,J=null,u=b.next();S!==null&&!u.done;k++,u=b.next()){S.index>k?(J=S,S=null):J=S.sibling;var A=f(v,S,u.value,p);if(A===null){S===null&&(S=J);break}t&&S&&A.alternate===null&&s(v,S),j=n(A,j,k),C===null?E=A:C.sibling=A,C=A,S=J}if(u.done)return a(v,S),Is&&Mn(v,k),E;if(S===null){for(;!u.done;k++,u=b.next())u=h(v,u.value,p),u!==null&&(j=n(u,j,k),C===null?E=u:C.sibling=u,C=u);return Is&&Mn(v,k),E}for(S=r(v,S);!u.done;k++,u=b.next())u=y(S,v,k,u.value,p),u!==null&&(t&&u.alternate!==null&&S.delete(u.key===null?k:u.key),j=n(u,j,k),C===null?E=u:C.sibling=u,C=u);return t&&S.forEach(function(T){return s(v,T)}),Is&&Mn(v,k),E}function N(v,j,b,p){if(typeof b=="object"&&b!==null&&b.type===pi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Rc:e:{for(var E=b.key,C=j;C!==null;){if(C.key===E){if(E=b.type,E===pi){if(C.tag===7){a(v,C.sibling),j=l(C,b.props.children),j.return=v,v=j;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Xl&&Vh(E)===C.type){a(v,C.sibling),j=l(C,b.props),j.ref=mo(v,C,b),j.return=v,v=j;break e}a(v,C);break}else s(v,C);C=C.sibling}b.type===pi?(j=Bn(b.props.children,v.mode,p,b.key),j.return=v,v=j):(p=Sd(b.type,b.key,b.props,null,v.mode,p),p.ref=mo(v,j,b),p.return=v,v=p)}return i(v);case hi:e:{for(C=b.key;j!==null;){if(j.key===C)if(j.tag===4&&j.stateNode.containerInfo===b.containerInfo&&j.stateNode.implementation===b.implementation){a(v,j.sibling),j=l(j,b.children||[]),j.return=v,v=j;break e}else{a(v,j);break}else s(v,j);j=j.sibling}j=ox(b,v.mode,p),j.return=v,v=j}return i(v);case Xl:return C=b._init,N(v,j,C(b._payload),p)}if(No(b))return g(v,j,b,p);if(lo(b))return w(v,j,b,p);Wc(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,j!==null&&j.tag===6?(a(v,j.sibling),j=l(j,b),j.return=v,v=j):(a(v,j),j=ix(b,v.mode,p),j.return=v,v=j),i(v)):a(v,j
vendor: 4,206 bytes, line 38
38)}return N}var $i=nb(!0),ib=nb(!1),Gd=jn(null),Jd=null,Ni=null,Iu=null;function Tu(){Iu=Ni=Jd=null}function Pu(t){var s=Gd.current;Ss(Gd),t._currentValue=s}function k0(t,s,a){for(;t!==null;){var r=t.alternate;if((t.childLanes&s)!==s?(t.childLanes|=s,r!==null&&(r.childLanes|=s)):r!==null&&(r.childLanes&s)!==s&&(r.childLanes|=s),t===a)break;t=t.return}}function Ai(t,s){Jd=t,Iu=Ni=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&s&&(za=!0),t.firstContext=null)}function fr(t){var s=t._currentValue;if(Iu!==t)if(t={context:t,memoizedValue:s,next:null},Ni===null){if(Jd===null)throw Error(Je(308));Ni=t,Jd.dependencies={lanes:0,firstContext:t}}else Ni=Ni.next=t;return s}var zn=null;function Au(t){zn===null?zn=[t]:zn.push(t)}function ob(t,s,a,r){var l=s.interleaved;return l===null?(a.next=a,Au(s)):(a.next=l.next,l.next=a),s.interleaved=a,wl(t,r)}function wl(t,s){t.lanes|=s;var a=t.alternate;for(a!==null&&(a.lanes|=s),a=t,t=t.return;t!==null;)t.childLanes|=s,a=t.alternate,a!==null&&(a.childLanes|=s),a=t,t=t.return;return a.tag===3?a.stateNode:null}var Kl=!1;function Mu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cb(t,s){t=t.updateQueue,s.updateQueue===t&&(s.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function bl(t,s){return{eventTime:t,lane:s,tag:0,payload:null,callback:null,next:null}}function dn(t,s,a){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,es&2){var l=r.pending;return l===null?s.next=s:(s.next=l.next,l.next=s),r.pending=s,wl(t,a)}return l=r.interleaved,l===null?(s.next=s,Au(r)):(s.next=l.next,l.next=s),r.interleaved=s,wl(t,a)}function jd(t,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194240)!==0)){var r=s.lanes;r&=t.pendingLanes,a|=r,s.lanes=a,gu(t,a)}}function Yh(t,s){var a=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var l=null,n=null;if(a=a.firstBaseUpdate,a!==null){do{var i={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};n===null?l=n=i:n=n.next=i,a=a.next}while(a!==null);n===null?l=n=s:n=n.next=s}else l=n=s;a={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:n,shared:r.shared,effects:r.effects},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=s:t.next=s,a.lastBaseUpdate=s}function Wd(t,s,a,r){var l=t.updateQueue;Kl=!1;var n=l.firstBaseUpdate,i=l.lastBaseUpdate,c=l.shared.pending;if(c!==null){l.shared.pending=null;var d=c,x=d.next;d.next=null,i===null?n=x:i.next=x,i=d;var m=t.alternate;m!==null&&(m=m.updateQueue,c=m.lastBaseUpdate,c!==i&&(c===null?m.firstBaseUpdate=x:c.next=x,m.lastBaseUpdate=d))}if(n!==null){var h=l.baseState;i=0,m=x=d=null,c=n;do{var f=c.lane,y=c.eventTime;if((r&f)===f){m!==null&&(m=m.next={eventTime:y,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var g=t,w=c;switch(f=s,y=a,w.tag){case 1:if(g=w.payload,typeof g=="function"){h=g.call(y,h,f);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=w.payload,f=typeof g=="function"?g.call(y,h,f):g,f==null)break e;h=Es({},h,f);break e;case 2:Kl=!0}}c.callback!==null&&c.lane!==0&&(t.flags|=64,f=l.effects,f===null?l.effects=[c]:f.push(c))}else y={eventTime:y,lane:f,tag:c.tag,payload:c.payload,callback:c.callback,next:null},m===null?(x=m=y,d=h):m=m.next=y,i|=f;if(c=c.next,c===null){if(c=l.shared.pending,c===null)break;f=c,c=f.next,f.next=null,l.lastBaseUpdate=f,l.shared.pending=null}}while(!0);if(m===null&&(d=h),l.baseState=d,l.firstBaseUpdate=x,l.lastBaseUpdate=m,s=l.shared.interleaved,s!==null){l=s;do i|=l.lane,l=l.next;while(l!==s)}else n===null&&(l.shared.lanes=0);Wn|=i,t.lanes=i,t.memoizedState=h}}function Xh(t,s,a){if(t=s.effects,s.effects=null,t!==null)for(s=0;s<t.length;s++){var r=t[s],l=r.callback;if(l!==null){if(r.callback=null,r=a,typeof l!="function")throw Error(Je(191,l));l.call(r)}}}var pc={},el=jn(pc),sc=jn(pc),ac=jn(pc);function $n(t){if(t===pc)throw Error(Je(174));return t}function Eu(t,s){switch(vs(ac,s),vs(sc,t),vs(el,pc),t=s.nodeType,t){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:r
vendor: 6,001 bytes, line 38
380(null,"");break;default:t=t===8?s.parentNode:s,s=t.namespaceURI||null,t=t.tagName,s=r0(s,t)}Ss(el),vs(el,s)}function Li(){Ss(el),Ss(sc),Ss(ac)}function db(t){$n(ac.current);var s=$n(el.current),a=r0(s,t.type);s!==a&&(vs(sc,t),vs(el,a))}function Du(t){sc.current===t&&(Ss(el),Ss(sc))}var Ps=jn(0);function Hd(t){for(var s=t;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if(s.flags&128)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var tx=[];function Ru(){for(var t=0;t<tx.length;t++)tx[t]._workInProgressVersionPrimary=null;tx.length=0}var vd=Cl.ReactCurrentDispatcher,sx=Cl.ReactCurrentBatchConfig,Jn=0,Ms=null,ea=null,na=null,Vd=!1,Ro=!1,rc=0,Yj=0;function ga(){throw Error(Je(321))}function Fu(t,s){if(s===null)return!1;for(var a=0;a<s.length&&a<t.length;a++)if(!Rr(t[a],s[a]))return!1;return!0}function Ou(t,s,a,r,l,n){if(Jn=n,Ms=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,vd.current=t===null||t.memoizedState===null?Zj:ev,t=a(r,l),Ro){n=0;do{if(Ro=!1,rc=0,25<=n)throw Error(Je(301));n+=1,na=ea=null,s.updateQueue=null,vd.current=tv,t=a(r,l)}while(Ro)}if(vd.current=Yd,s=ea!==null&&ea.next!==null,Jn=0,na=ea=Ms=null,Vd=!1,s)throw Error(Je(300));return t}function zu(){var t=rc!==0;return rc=0,t}function Hr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return na===null?Ms.memoizedState=na=t:na=na.next=t,na}function gr(){if(ea===null){var t=Ms.alternate;t=t!==null?t.memoizedState:null}else t=ea.next;var s=na===null?Ms.memoizedState:na.next;if(s!==null)na=s,ea=t;else{if(t===null)throw Error(Je(310));ea=t,t={memoizedState:ea.memoizedState,baseState:ea.baseState,baseQueue:ea.baseQueue,queue:ea.queue,next:null},na===null?Ms.memoizedState=na=t:na=na.next=t}return na}function lc(t,s){return typeof s=="function"?s(t):s}function ax(t){var s=gr(),a=s.queue;if(a===null)throw Error(Je(311));a.lastRenderedReducer=t;var r=ea,l=r.baseQueue,n=a.pending;if(n!==null){if(l!==null){var i=l.next;l.next=n.next,n.next=i}r.baseQueue=l=n,a.pending=null}if(l!==null){n=l.next,r=r.baseState;var c=i=null,d=null,x=n;do{var m=x.lane;if((Jn&m)===m)d!==null&&(d=d.next={lane:0,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),r=x.hasEagerState?x.eagerState:t(r,x.action);else{var h={lane:m,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null};d===null?(c=d=h,i=r):d=d.next=h,Ms.lanes|=m,Wn|=m}x=x.next}while(x!==null&&x!==n);d===null?i=r:d.next=c,Rr(r,s.memoizedState)||(za=!0),s.memoizedState=r,s.baseState=i,s.baseQueue=d,a.lastRenderedState=r}if(t=a.interleaved,t!==null){l=t;do n=l.lane,Ms.lanes|=n,Wn|=n,l=l.next;while(l!==t)}else l===null&&(a.lanes=0);return[s.memoizedState,a.dispatch]}function rx(t){var s=gr(),a=s.queue;if(a===null)throw Error(Je(311));a.lastRenderedReducer=t;var r=a.dispatch,l=a.pending,n=s.memoizedState;if(l!==null){a.pending=null;var i=l=l.next;do n=t(n,i.action),i=i.next;while(i!==l);Rr(n,s.memoizedState)||(za=!0),s.memoizedState=n,s.baseQueue===null&&(s.baseState=n),a.lastRenderedState=n}return[n,r]}function mb(){}function xb(t,s){var a=Ms,r=gr(),l=s(),n=!Rr(r.memoizedState,l);if(n&&(r.memoizedState=l,za=!0),r=r.queue,$u(pb.bind(null,a,r,t),[t]),r.getSnapshot!==s||n||na!==null&&na.memoizedState.tag&1){if(a.flags|=2048,nc(9,hb.bind(null,a,r,l,s),void 0,null),oa===null)throw Error(Je(349));Jn&30||ub(a,s,l)}return l}function ub(t,s,a){t.flags|=16384,t={getSnapshot:s,value:a},s=Ms.updateQueue,s===null?(s={lastEffect:null,stores:null},Ms.updateQueue=s,s.stores=[t]):(a=s.stores,a===null?s.stores=[t]:a.push(t))}function hb(t,s,a,r){s.value=a,s.getSnapshot=r,fb(s)&&gb(t)}function pb(t,s,a){return a(function(){fb(s)&&gb(t)})}function fb(t){var s=t.getSnapshot;t=t.value;try{var a=s();return!Rr(t,a)}catch{return!0}}function gb(t){var s=wl(t,1);s!==null&&Er(s,t,1,-1)}function Kh(t){var s=Hr();return typeof t=="function"&&(t=t()),s.memoizedState=s.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lc,lastRenderedState:t},s.queue=t,t=t.dispatch=Qj.bind(null,Ms,t),[s.memoizedState,t]}function nc(t,s,a,r){return t={tag:t,create:s,destroy:a,deps:r,next:null},s=Ms.updateQueue,s===null?(s={lastEffect:null,stores:null},Ms.updateQueue=s,s.lastEffect=t.next=t):(a=s.lastEffect,a===null?s.lastEffect=t.next=t:(r=a.next,a.next=t,t.next=r,s.lastEffect=t)),t}function bb(){return gr().memoizedState}function wd(t,s,a,r){var l=Hr();Ms.flags|=t,l.memoizedState=nc(1|s,a,void 0,r===void 0?null:r)}function gm(t,s,a,r){var l=gr();r=r===void 0?null:r;var n=void 0;if(ea!==null){var i=ea.memoizedState;if(n=i.destroy,r!==null&&Fu(r,i.deps)){l.memoizedState=nc(s,a,n,r);return}}Ms.flags|=t,l.memoizedState=nc(1|s,a,n,r)}function Qh(t,s){return wd(8390656,8,t,s)}function $u(t,s){return gm(2048,8,t,s)}function yb(t,s){return gm(4,2,t,s)}function jb(t,s){return gm(4,4,t,s)}function vb(t,s){if(typeof s=="function")return t=t(),s(t),function(){s(null)};if(s!=null)return t=t(),s.current=t,function(){s.current=null}}function wb(t,s,a){return a=a!=null?a.concat([t]):null,gm(4,4,vb.bind(null,s,t),a)}function Lu(){}function Nb(t,s){var a=gr();s=s===void 0?null:s;var r=a.memoizedState;return r!==null&&s!==null&&Fu(s,r[1])?r[0]:(a.memoizedState=[t,s],t)}function kb(t,s){var a=gr();s=s===void 0?null:s;var r=a.memoizedState;return r!==null&&s!==null&&Fu(s,r[1])?r[0]:(t=t(),a.memoizedState=[t,s],t)}function _b(t,s,a){return Jn&21?(Rr(a,s)||(a=Pg(),Ms.lanes|=a,Wn|=a,t.baseState=!0),s):(t.baseState&&(t.baseState=!1,za=!0),t.memoizedState=a)}function Xj(t,s){var a=cs;cs=a!==0&&4>a?a:4,t(!0);var r=sx.transition;sx.transition={};try{t(!1),s()}finally{cs=a,sx.transition=r}}function Sb(){return gr().memoizedState}function Kj(t,s,a){var r=xn(t);
vendor: 9,158 bytes, lines 38-40
38if(a={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null},Cb(t))Ib(s,a);else if(a=ob(t,s,a,r),a!==null){var l=Ca();Er(a,t,r,l),Tb(a,s,r)}}function Qj(t,s,a){var r=xn(t),l={lane:r,action:a,hasEagerState:!1,eagerState:null,next:null};if(Cb(t))Ib(s,l);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=s.lastRenderedReducer,n!==null))try{var i=s.lastRenderedState,c=n(i,a);if(l.hasEagerState=!0,l.eagerState=c,Rr(c,i)){var d=s.interleaved;d===null?(l.next=l,Au(s)):(l.next=d.next,d.next=l),s.interleaved=l;return}}catch{}finally{}a=ob(t,s,l,r),a!==null&&(l=Ca(),Er(a,t,r,l),Tb(a,s,r))}}function Cb(t){var s=t.alternate;return t===Ms||s!==null&&s===Ms}function Ib(t,s){Ro=Vd=!0;var a=t.pending;a===null?s.next=s:(s.next=a.next,a.next=s),t.pending=s}function Tb(t,s,a){if(a&4194240){var r=s.lanes;r&=t.pendingLanes,a|=r,s.lanes=a,gu(t,a)}}var Yd={readContext:fr,useCallback:ga,useContext:ga,useEffect:ga,useImperativeHandle:ga,useInsertionEffect:ga,useLayoutEffect:ga,useMemo:ga,useReducer:ga,useRef:ga,useState:ga,useDebugValue:ga,useDeferredValue:ga,useTransition:ga,useMutableSource:ga,useSyncExternalStore:ga,useId:ga,unstable_isNewReconciler:!1},Zj={readContext:fr,useCallback:function(t,s){return Hr().memoizedState=[t,s===void 0?null:s],t},useContext:fr,useEffect:Qh,useImperativeHandle:function(t,s,a){return a=a!=null?a.concat([t]):null,wd(4194308,4,vb.bind(null,s,t),a)},useLayoutEffect:function(t,s){return wd(4194308,4,t,s)},useInsertionEffect:function(t,s){return wd(4,2,t,s)},useMemo:function(t,s){var a=Hr();return s=s===void 0?null:s,t=t(),a.memoizedState=[t,s],t},useReducer:function(t,s,a){var r=Hr();return s=a!==void 0?a(s):s,r.memoizedState=r.baseState=s,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:s},r.queue=t,t=t.dispatch=Kj.bind(null,Ms,t),[r.memoizedState,t]},useRef:function(t){var s=Hr();return t={current:t},s.memoizedState=t},useState:Kh,useDebugValue:Lu,useDeferredValue:function(t){return Hr().memoizedState=t},useTransition:function(){var t=Kh(!1),s=t[0];return t=Xj.bind(null,t[1]),Hr().memoizedState=t,[s,t]},useMutableSource:function(){},useSyncExternalStore:function(t,s,a){var r=Ms,l=Hr();if(Is){if(a===void 0)throw Error(Je(407));a=a()}else{if(a=s(),oa===null)throw Error(Je(349));Jn&30||ub(r,s,a)}l.memoizedState=a;var n={value:a,getSnapshot:s};return l.queue=n,Qh(pb.bind(null,r,n,t),[t]),r.flags|=2048,nc(9,hb.bind(null,r,n,a,s),void 0,null),a},useId:function(){var t=Hr(),s=oa.identifierPrefix;if(Is){var a=fl,r=pl;a=(r&~(1<<32-Mr(r)-1)).toString(32)+a,s=":"+s+"R"+a,a=rc++,0<a&&(s+="H"+a.toString(32)),s+=":"}else a=Yj++,s=":"+s+"r"+a.toString(32)+":";return t.memoizedState=s},unstable_isNewReconciler:!1},ev={readContext:fr,useCallback:Nb,useContext:fr,useEffect:$u,useImperativeHandle:wb,useInsertionEffect:yb,useLayoutEffect:jb,useMemo:kb,useReducer:ax,useRef:bb,useState:function(){return ax(lc)},useDebugValue:Lu,useDeferredValue:function(t){var s=gr();return _b(s,ea.memoizedState,t)},useTransition:function(){var t=ax(lc)[0],s=gr().memoizedState;return[t,s]},useMutableSource:mb,useSyncExternalStore:xb,useId:Sb,unstable_isNewReconciler:!1},tv={readContext:fr,useCallback:Nb,useContext:fr,useEffect:$u,useImperativeHandle:wb,useInsertionEffect:yb,useLayoutEffect:jb,useMemo:kb,useReducer:rx,useRef:bb,useState:function(){return rx(lc)},useDebugValue:Lu,useDeferredValue:function(t){var s=gr();return ea===null?s.memoizedState=t:_b(s,ea.memoizedState,t)},useTransition:function(){var t=rx(lc)[0],s=gr().memoizedState;return[t,s]},useMutableSource:mb,useSyncExternalStore:xb,useId:Sb,unstable_isNewReconciler:!1};function Cr(t,s){if(t&&t.defaultProps){s=Es({},s),t=t.defaultProps;for(var a in t)s[a]===void 0&&(s[a]=t[a]);return s}return s}function _0(t,s,a,r){s=t.memoizedState,a=a(r,s),a=a==null?s:Es({},s,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var bm={isMounted:function(t){return(t=t._reactInternals)?Zn(t)===t:!1},enqueueSetState:function(t,s,a){t=t._reactInternals;var r=Ca(),l=xn(t),n=bl(r,l);n.payload=s,a!=null&&(n.callback=a),s=dn(t,n,l),s!==null&&(Er(s,t,l,r),jd(s,t,l))},enqueueReplaceState:function(t,s,a){t=t._reactInternals;var r=Ca(),l=xn(t),n=bl(r,l);n.tag=1,n.payload=s,a!=null&&(n.callback=a),s=dn(t,n,l),s!==null&&(Er(s,t,l,r),jd(s,t,l))},enqueueForceUpdate:function(t,s){t=t._reactInternals;var a=Ca(),r=xn(t),l=bl(a,r);l.tag=2,s!=null&&(l.callback=s),s=dn(t,l,r),s!==null&&(Er(s,t,r,a),jd(s,t,r))}};function Zh(t,s,a,r,l,n,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,n,i):s.prototype&&s.prototype.isPureReactComponent?!Qo(a,r)||!Qo(l,n):!0}function Pb(t,s,a){var r=!1,l=fn,n=s.contextType;return typeof n=="object"&&n!==null?n=fr(n):(l=La(s)?qn:wa.current,r=s.contextTypes,n=(r=r!=null)?Oi(t,l):fn),s=new s(a,n),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=bm,t.stateNode=s,s._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=l,t.__reactInternalMemoizedMaskedChildContext=n),s}function ep(t,s,a,r){t=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,r),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,r),s.state!==t&&bm.enqueueReplaceState(s,s.state,null)}function S0(t,s,a,r){var l=t.stateNode;l.props=a,l.state=t.memoizedState,l.refs={},Mu(t);var n=s.contextType;typeof n=="object"&&n!==null?l.context=fr(n):(n=La(s)?qn:wa.current,l.context=Oi(t,n)),l.state=t.memoizedState,n=s.getDerivedStateFromProps,typeof n=="function"&&(_0(t,s,n,a),l.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(s=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),s!==l.state&&bm.enqueueReplaceState(l,l.state,null),Wd(t,a,l,r),l.state=t.memoizedState),typeof l.componentDidMount=="function"&&(t.flags|=4194308)}function Bi(t,s){try{var a="",r=s;do a+=T1(r),r=r.return;while(r);var l=a}catch(n){l=` 39Error generating stack: `+n.message+` 40`+n.stack}return{value:t,source:s,stack:l,digest:null}}function lx(t,s,a){return{value:t,source:null,stack:a??null,digest:s??null}}function C0(t,s){try{console.error(s.value)}catch(a){setTimeout(function(){throw a})}}var sv=typeof WeakMap=="function"?WeakMap:Map;function Ab(t,s,a){a=bl(-1,a),a.tag=3,a.payload={element:null};var r=s.value;return a.callback=function(){Kd||(Kd=!0,O0=r),C0(t,s)},a}function Mb(t,s,a){a=bl(-1,a),a.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var l=s.value;a.payload=function(){return r(l)},a.callback=function(){C0(t,s)}}var n=t.stateNode;return n!==null&&typeof n.componentDidCatch=="function"&&(a.callback=function(){C0(t,s),typeof r!="function"&&(mn===null?mn=new Set([this]):mn.add(this));var i=s.stack;this.componentDidCatch(s.value,{componentStack:i!==null?i:""})}),a}function tp(t,s,a){var r=t.pingCache;if(r===null){r=t.pingCache=new sv;var l=new Set;r.set(s,l)}else l=r.get(s),l===void 0&&(l=new Set,r.set(s,l));l.has(a)||(l.add(a),t=fv.bind(null,t,s,a),s.then(t,t))}function sp(t){do{var s;if((s=t.tag===13)&&(s=t.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return t;t=t.return}while(t!==null);return null}function ap(t,s,a,r,l){return t.mode&1?(t.flags|=65536,t.lanes=l,t):(t===s?t.flags|=65536:(t.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(s=bl(-1,1),s.tag=2,dn(a,s,1))),a.lanes|=1),t)}var av=Cl.ReactCurrentOwner,za=!1;function Sa(t,s,a,r){s.child=t===null?ib(s,null,a,r):$i(s,t.child,a,r)}function rp(t,s,a,r,l){a=a.render;var n=s.ref;return Ai(s,l),r=Ou(t,s,a,r,n,l),a=zu(),t!==null&&!za?(s.updateQueue=t.updateQueue,s.flags&=-2053,t.lanes&=~l,Nl(t,s,l)):(Is&&a&&_u(s),s.flags|=1,Sa(t,s,r,l),s.child)}function lp(t,s,a,r,l){if(t===null){var n=a.type;return typeof n=="function"&&!Vu(n)&&n.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(s.tag=15,s.type=n,Eb(t,s,n,r,l)):(t=Sd(a.type,null,r,s,s.mode,l),t.ref=s.ref,t.return=s,s.child=t)}if(n=t.child,!(t.lanes&l)){var i=n.memoizedProps;if(a=a.compare,a=a!==null?a:Qo,a(i,r)&&t.ref===s.ref)return Nl(t,s,l)}return s.flags|=1,t=un(n,r),t.ref=s.ref,t.return=s,s.child=t}function Eb(t,s,a,r,l){if(t!==null){var n=t.memoizedProps;if(Qo(n,r)&&t.ref===s.ref)if(za=!1,s.pendingProps=r=n,(t.lanes&l)!==0)t.flags&131072&&(za=!0);else return s.lanes=t.lanes,Nl(t,s,l)}return I0(t,s,a,r,l)}function Db(t,s,a){var r=s.pendingProps,l=r.children,n=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(s.mode&1))s.memoizedState={baseLanes:0,cachePool:null,transitions:null},vs(_i,Va),Va|=a;else{if(!(a&1073741824))return t=n!==null?n.baseLanes|a:a,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:t,cachePool:null,transitions:null},s.updateQueue=null,vs(_i,Va),Va|=t,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=n!==null?n.baseLanes:a,vs(_i,Va),Va|=r}else n!==null?(r=n.baseLanes|a,s.memoizedState=null):r=a,vs(_i,Va),Va|=r;
vendor: 4,628 bytes, line 40
40return Sa(t,s,l,a),s.child}function Rb(t,s){var a=s.ref;(t===null&&a!==null||t!==null&&t.ref!==a)&&(s.flags|=512,s.flags|=2097152)}function I0(t,s,a,r,l){var n=La(a)?qn:wa.current;return n=Oi(s,n),Ai(s,l),a=Ou(t,s,a,r,n,l),r=zu(),t!==null&&!za?(s.updateQueue=t.updateQueue,s.flags&=-2053,t.lanes&=~l,Nl(t,s,l)):(Is&&r&&_u(s),s.flags|=1,Sa(t,s,a,l),s.child)}function np(t,s,a,r,l){if(La(a)){var n=!0;Bd(s)}else n=!1;if(Ai(s,l),s.stateNode===null)Nd(t,s),Pb(s,a,r),S0(s,a,r,l),r=!0;else if(t===null){var i=s.stateNode,c=s.memoizedProps;i.props=c;var d=i.context,x=a.contextType;typeof x=="object"&&x!==null?x=fr(x):(x=La(a)?qn:wa.current,x=Oi(s,x));var m=a.getDerivedStateFromProps,h=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==r||d!==x)&&ep(s,i,r,x),Kl=!1;var f=s.memoizedState;i.state=f,Wd(s,r,i,l),d=s.memoizedState,c!==r||f!==d||$a.current||Kl?(typeof m=="function"&&(_0(s,a,m,r),d=s.memoizedState),(c=Kl||Zh(s,a,c,r,f,d,x))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(s.flags|=4194308)):(typeof i.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=r,s.memoizedState=d),i.props=r,i.state=d,i.context=x,r=c):(typeof i.componentDidMount=="function"&&(s.flags|=4194308),r=!1)}else{i=s.stateNode,cb(t,s),c=s.memoizedProps,x=s.type===s.elementType?c:Cr(s.type,c),i.props=x,h=s.pendingProps,f=i.context,d=a.contextType,typeof d=="object"&&d!==null?d=fr(d):(d=La(a)?qn:wa.current,d=Oi(s,d));var y=a.getDerivedStateFromProps;(m=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==h||f!==d)&&ep(s,i,r,d),Kl=!1,f=s.memoizedState,i.state=f,Wd(s,r,i,l);var g=s.memoizedState;c!==h||f!==g||$a.current||Kl?(typeof y=="function"&&(_0(s,a,y,r),g=s.memoizedState),(x=Kl||Zh(s,a,x,r,f,g,d)||!1)?(m||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,g,d),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,g,d)),typeof i.componentDidUpdate=="function"&&(s.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===t.memoizedProps&&f===t.memoizedState||(s.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===t.memoizedProps&&f===t.memoizedState||(s.flags|=1024),s.memoizedProps=r,s.memoizedState=g),i.props=r,i.state=g,i.context=d,r=x):(typeof i.componentDidUpdate!="function"||c===t.memoizedProps&&f===t.memoizedState||(s.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===t.memoizedProps&&f===t.memoizedState||(s.flags|=1024),r=!1)}return T0(t,s,a,r,n,l)}function T0(t,s,a,r,l,n){Rb(t,s);var i=(s.flags&128)!==0;if(!r&&!i)return l&&Jh(s,a,!1),Nl(t,s,n);r=s.stateNode,av.current=s;var c=i&&typeof a.getDerivedStateFromError!="function"?null:r.render();return s.flags|=1,t!==null&&i?(s.child=$i(s,t.child,null,n),s.child=$i(s,null,c,n)):Sa(t,s,c,n),s.memoizedState=r.state,l&&Jh(s,a,!0),s.child}function Fb(t){var s=t.stateNode;s.pendingContext?Gh(t,s.pendingContext,s.pendingContext!==s.context):s.context&&Gh(t,s.context,!1),Eu(t,s.containerInfo)}function ip(t,s,a,r,l){return zi(),Cu(l),s.flags|=256,Sa(t,s,a,r),s.child}var P0={dehydrated:null,treeContext:null,retryLane:0};function A0(t){return{baseLanes:t,cachePool:null,transitions:null}}function Ob(t,s,a){var r=s.pendingProps,l=Ps.current,n=!1,i=(s.flags&128)!==0,c;if((c=i)||(c=t!==null&&t.memoizedState===null?!1:(l&2)!==0),c?(n=!0,s.flags&=-129):(t===null||t.memoizedState!==null)&&(l|=1),vs(Ps,l&1),t===null)return N0(s),t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(s.mode&1?t.data==="$!"?s.lanes=8:s.lanes=1073741824:s.lanes=1,null):(i=r.children,t=r.fallback,n?(r=s.mode,n=s.child,i={mode:"hidden",children:i},!(r&1)&&n!==null?(n.childLanes=0,n.pendingProps=i):n=vm(i,r,0,null),t=Bn(t,r,a,null),n.return=s,t.return=s,n.sibling=t,s.child=n,s.child.memoizedState=A0(a),s.memoizedState=P0,t):Bu(s,i));if(l=t.memoizedState,l!==null&&(c=l.dehydrated,c!==null))return rv(t,s,i,r,c,l,a);if(n){n=r.fallback,i=s.mode,l=t.child,c=l.sibling;var d={mode:"hidden",children:r.children};return!(i&1)&&s.child!==l?(r=s.child,r.childLanes=0,r.pendingProps=d,s.deleti
vendor: 5,666 bytes, line 40
40ons=null):(r=un(l,d),r.subtreeFlags=l.subtreeFlags&14680064),c!==null?n=un(c,n):(n=Bn(n,i,a,null),n.flags|=2),n.return=s,r.return=s,r.sibling=n,s.child=r,r=n,n=s.child,i=t.child.memoizedState,i=i===null?A0(a):{baseLanes:i.baseLanes|a,cachePool:null,transitions:i.transitions},n.memoizedState=i,n.childLanes=t.childLanes&~a,s.memoizedState=P0,r}return n=t.child,t=n.sibling,r=un(n,{mode:"visible",children:r.children}),!(s.mode&1)&&(r.lanes=a),r.return=s,r.sibling=null,t!==null&&(a=s.deletions,a===null?(s.deletions=[t],s.flags|=16):a.push(t)),s.child=r,s.memoizedState=null,r}function Bu(t,s){return s=vm({mode:"visible",children:s},t.mode,0,null),s.return=t,t.child=s}function Hc(t,s,a,r){return r!==null&&Cu(r),$i(s,t.child,null,a),t=Bu(s,s.pendingProps.children),t.flags|=2,s.memoizedState=null,t}function rv(t,s,a,r,l,n,i){if(a)return s.flags&256?(s.flags&=-257,r=lx(Error(Je(422))),Hc(t,s,i,r)):s.memoizedState!==null?(s.child=t.child,s.flags|=128,null):(n=r.fallback,l=s.mode,r=vm({mode:"visible",children:r.children},l,0,null),n=Bn(n,l,i,null),n.flags|=2,r.return=s,n.return=s,r.sibling=n,s.child=r,s.mode&1&&$i(s,t.child,null,i),s.child.memoizedState=A0(i),s.memoizedState=P0,n);if(!(s.mode&1))return Hc(t,s,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var c=r.dgst;return r=c,n=Error(Je(419)),r=lx(n,r,void 0),Hc(t,s,i,r)}if(c=(i&t.childLanes)!==0,za||c){if(r=oa,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==n.retryLane&&(n.retryLane=l,wl(t,l),Er(r,t,l,-1))}return Hu(),r=lx(Error(Je(421))),Hc(t,s,i,r)}return l.data==="$?"?(s.flags|=128,s.child=t.child,s=gv.bind(null,t),l._reactRetry=s,null):(t=n.treeContext,Xa=cn(l.nextSibling),Qa=s,Is=!0,Pr=null,t!==null&&(or[cr++]=pl,or[cr++]=fl,or[cr++]=Gn,pl=t.id,fl=t.overflow,Gn=s),s=Bu(s,r.children),s.flags|=4096,s)}function op(t,s,a){t.lanes|=s;var r=t.alternate;r!==null&&(r.lanes|=s),k0(t.return,s,a)}function nx(t,s,a,r,l){var n=t.memoizedState;n===null?t.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:l}:(n.isBackwards=s,n.rendering=null,n.renderingStartTime=0,n.last=r,n.tail=a,n.tailMode=l)}function zb(t,s,a){var r=s.pendingProps,l=r.revealOrder,n=r.tail;if(Sa(t,s,r.children,a),r=Ps.current,r&2)r=r&1|2,s.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=s.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&op(t,a,s);else if(t.tag===19)op(t,a,s);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===s)break e;for(;t.sibling===null;){if(t.return===null||t.return===s)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(vs(Ps,r),!(s.mode&1))s.memoizedState=null;else switch(l){case"forwards":for(a=s.child,l=null;a!==null;)t=a.alternate,t!==null&&Hd(t)===null&&(l=a),a=a.sibling;a=l,a===null?(l=s.child,s.child=null):(l=a.sibling,a.sibling=null),nx(s,!1,l,a,n);break;case"backwards":for(a=null,l=s.child,s.child=null;l!==null;){if(t=l.alternate,t!==null&&Hd(t)===null){s.child=l;break}t=l.sibling,l.sibling=a,a=l,l=t}nx(s,!0,a,null,n);break;case"together":nx(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Nd(t,s){!(s.mode&1)&&t!==null&&(t.alternate=null,s.alternate=null,s.flags|=2)}function Nl(t,s,a){if(t!==null&&(s.dependencies=t.dependencies),Wn|=s.lanes,!(a&s.childLanes))return null;if(t!==null&&s.child!==t.child)throw Error(Je(153));if(s.child!==null){for(t=s.child,a=un(t,t.pendingProps),s.child=a,a.return=s;t.sibling!==null;)t=t.sibling,a=a.sibling=un(t,t.pendingProps),a.return=s;a.sibling=null}return s.child}function lv(t,s,a){switch(s.tag){case 3:Fb(s),zi();break;case 5:db(s);break;case 1:La(s.type)&&Bd(s);break;case 4:Eu(s,s.stateNode.containerInfo);break;case 10:var r=s.type._context,l=s.memoizedProps.value;vs(Gd,r._currentValue),r._currentValue=l;break;case 13:if(r=s.memoizedState,r!==null)return r.dehydrated!==null?(vs(Ps,Ps.current&1),s.flags|=128,null):a&s.child.childLanes?Ob(t,s,a):(vs(Ps,Ps.current&1),t=Nl(t,s,a),t!==null?t.sibling:null);vs(Ps,Ps.current&1);break;case 19:if(r=(a&s.childLanes)!==0,t.flags&128){if(r)return zb(t,s,a);s.flags|=128}if(l=s.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),vs(Ps,Ps.current),r)break;return null;case 22:case 23:return s.lanes=0,Db(t,s,a)}return Nl(t,s,a)}var $b,M0,Lb,Bb;$b=function(t,s){for(var a=s.child;a!==null;){if(a.tag===5||a.tag===6)t.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return;a=a.return}a.sibling.return=a.return,a=a.sibling}};M0=function(){};Lb=function(t,s,a,r){var l=t.memoizedProps;if(l!==r){t=s.stateNode,$n(el.current);var n=null;switch(a){case"input":l=e0(t,l),r=e0(t,r),n=[];break;case"select":l=Es({},l,{value:void 0}),r=Es({},r,{value:void 0}),n=[];break;case"textarea":l=a0(t,l),r=a0(t,r),n=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=$d)}l0(a,r);var i;a=null;for(x in l)if(!r.hasOwnProperty(x)&&l.hasOwnProperty(x)&&l[x]!=null)if(x==="style"){var c=l[x];for(i in c)c.hasOwnProperty(i)&&(a||(a={}),a[i]="")}else x!=="dangerouslySetInnerHTML"&&x!=="children"&&x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(Jo.hasOwnProperty(x)?n||(n=[]):(n=n||[]).push(x,null));for(x in r){var d=r[x];
vendor: 3,009 bytes, line 40
40if(c=l!=null?l[x]:void 0,r.hasOwnProperty(x)&&d!==c&&(d!=null||c!=null))if(x==="style")if(c){for(i in c)!c.hasOwnProperty(i)||d&&d.hasOwnProperty(i)||(a||(a={}),a[i]="");for(i in d)d.hasOwnProperty(i)&&c[i]!==d[i]&&(a||(a={}),a[i]=d[i])}else a||(n||(n=[]),n.push(x,a)),a=d;else x==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,c=c?c.__html:void 0,d!=null&&c!==d&&(n=n||[]).push(x,d)):x==="children"?typeof d!="string"&&typeof d!="number"||(n=n||[]).push(x,""+d):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&(Jo.hasOwnProperty(x)?(d!=null&&x==="onScroll"&&ks("scroll",t),n||c===d||(n=[])):(n=n||[]).push(x,d))}a&&(n=n||[]).push("style",a);var x=n;(s.updateQueue=x)&&(s.flags|=4)}};Bb=function(t,s,a,r){a!==r&&(s.flags|=4)};function xo(t,s){if(!Is)switch(t.tailMode){case"hidden":s=t.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?s||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function ba(t){var s=t.alternate!==null&&t.alternate.child===t.child,a=0,r=0;if(s)for(var l=t.child;l!==null;)a|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=t,l=l.sibling;else for(l=t.child;l!==null;)a|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=t,l=l.sibling;return t.subtreeFlags|=r,t.childLanes=a,s}function nv(t,s,a){var r=s.pendingProps;switch(Su(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ba(s),null;case 1:return La(s.type)&&Ld(),ba(s),null;case 3:return r=s.stateNode,Li(),Ss($a),Ss(wa),Ru(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Jc(s)?s.flags|=4:t===null||t.memoizedState.isDehydrated&&!(s.flags&256)||(s.flags|=1024,Pr!==null&&(L0(Pr),Pr=null))),M0(t,s),ba(s),null;case 5:Du(s);var l=$n(ac.current);if(a=s.type,t!==null&&s.stateNode!=null)Lb(t,s,a,r,l),t.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!r){if(s.stateNode===null)throw Error(Je(166));return ba(s),null}if(t=$n(el.current),Jc(s)){r=s.stateNode,a=s.type;var n=s.memoizedProps;switch(r[Yr]=s,r[tc]=n,t=(s.mode&1)!==0,a){case"dialog":ks("cancel",r),ks("close",r);break;case"iframe":case"object":case"embed":ks("load",r);break;case"video":case"audio":for(l=0;l<_o.length;l++)ks(_o[l],r);break;case"source":ks("error",r);break;case"img":case"image":case"link":ks("error",r),ks("load",r);break;case"details":ks("toggle",r);break;case"input":gh(r,n),ks("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!n.multiple},ks("invalid",r);break;case"textarea":yh(r,n),ks("invalid",r)}l0(a,n),l=null;for(var i in n)if(n.hasOwnProperty(i)){var c=n[i];i==="children"?typeof c=="string"?r.textContent!==c&&(n.suppressHydrationWarning!==!0&&Gc(r.textContent,c,t),l=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(n.suppressHydrationWarning!==!0&&Gc(r.textContent,c,t),l=["children",""+c
vendor: 29,812 bytes, line 40
40]):Jo.hasOwnProperty(i)&&c!=null&&i==="onScroll"&&ks("scroll",r)}switch(a){case"input":Fc(r),bh(r,n,!0);break;case"textarea":Fc(r),jh(r);break;case"select":case"option":break;default:typeof n.onClick=="function"&&(r.onclick=$d)}r=l,s.updateQueue=r,r!==null&&(s.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=pg(a)),t==="http://www.w3.org/1999/xhtml"?a==="script"?(t=i.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=i.createElement(a,{is:r.is}):(t=i.createElement(a),a==="select"&&(i=t,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):t=i.createElementNS(t,a),t[Yr]=s,t[tc]=r,$b(t,s,!1,!1),s.stateNode=t;e:{switch(i=n0(a,r),a){case"dialog":ks("cancel",t),ks("close",t),l=r;break;case"iframe":case"object":case"embed":ks("load",t),l=r;break;case"video":case"audio":for(l=0;l<_o.length;l++)ks(_o[l],t);l=r;break;case"source":ks("error",t),l=r;break;case"img":case"image":case"link":ks("error",t),ks("load",t),l=r;break;case"details":ks("toggle",t),l=r;break;case"input":gh(t,r),l=e0(t,r),ks("invalid",t);break;case"option":l=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},l=Es({},r,{value:void 0}),ks("invalid",t);break;case"textarea":yh(t,r),l=a0(t,r),ks("invalid",t);break;default:l=r}l0(a,l),c=l;for(n in c)if(c.hasOwnProperty(n)){var d=c[n];n==="style"?bg(t,d):n==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,d!=null&&fg(t,d)):n==="children"?typeof d=="string"?(a!=="textarea"||d!=="")&&Wo(t,d):typeof d=="number"&&Wo(t,""+d):n!=="suppressContentEditableWarning"&&n!=="suppressHydrationWarning"&&n!=="autoFocus"&&(Jo.hasOwnProperty(n)?d!=null&&n==="onScroll"&&ks("scroll",t):d!=null&&mu(t,n,d,i))}switch(a){case"input":Fc(t),bh(t,r,!1);break;case"textarea":Fc(t),jh(t);break;case"option":r.value!=null&&t.setAttribute("value",""+pn(r.value));break;case"select":t.multiple=!!r.multiple,n=r.value,n!=null?Ci(t,!!r.multiple,n,!1):r.defaultValue!=null&&Ci(t,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(t.onclick=$d)}switch(a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return ba(s),null;case 6:if(t&&s.stateNode!=null)Bb(t,s,t.memoizedProps,r);else{if(typeof r!="string"&&s.stateNode===null)throw Error(Je(166));if(a=$n(ac.current),$n(el.current),Jc(s)){if(r=s.stateNode,a=s.memoizedProps,r[Yr]=s,(n=r.nodeValue!==a)&&(t=Qa,t!==null))switch(t.tag){case 3:Gc(r.nodeValue,a,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Gc(r.nodeValue,a,(t.mode&1)!==0)}n&&(s.flags|=4)}else r=(a.nodeType===9?a:a.ownerDocument).createTextNode(r),r[Yr]=s,s.stateNode=r}return ba(s),null;case 13:if(Ss(Ps),r=s.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Is&&Xa!==null&&s.mode&1&&!(s.flags&128))lb(),zi(),s.flags|=98560,n=!1;else if(n=Jc(s),r!==null&&r.dehydrated!==null){if(t===null){if(!n)throw Error(Je(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(Je(317));n[Yr]=s}else zi(),!(s.flags&128)&&(s.memoizedState=null),s.flags|=4;ba(s),n=!1}else Pr!==null&&(L0(Pr),Pr=null),n=!0;if(!n)return s.flags&65536?s:null}return s.flags&128?(s.lanes=a,s):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(s.child.flags|=8192,s.mode&1&&(t===null||Ps.current&1?ta===0&&(ta=3):Hu())),s.updateQueue!==null&&(s.flags|=4),ba(s),null);case 4:return Li(),M0(t,s),t===null&&Zo(s.stateNode.containerInfo),ba(s),null;case 10:return Pu(s.type._context),ba(s),null;case 17:return La(s.type)&&Ld(),ba(s),null;case 19:if(Ss(Ps),n=s.memoizedState,n===null)return ba(s),null;if(r=(s.flags&128)!==0,i=n.rendering,i===null)if(r)xo(n,!1);else{if(ta!==0||t!==null&&t.flags&128)for(t=s.child;t!==null;){if(i=Hd(t),i!==null){for(s.flags|=128,xo(n,!1),r=i.updateQueue,r!==null&&(s.updateQueue=r,s.flags|=4),s.subtreeFlags=0,r=a,a=s.child;a!==null;)n=a,t=r,n.flags&=14680066,i=n.alternate,i===null?(n.childLanes=0,n.lanes=t,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,t=i.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),a=a.sibling;return vs(Ps,Ps.current&1|2),s.child}t=t.sibling}n.tail!==null&&$s()>Ui&&(s.flags|=128,r=!0,xo(n,!1),s.lanes=4194304)}else{if(!r)if(t=Hd(i),t!==null){if(s.flags|=128,r=!0,a=t.updateQueue,a!==null&&(s.updateQueue=a,s.flags|=4),xo(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!Is)return ba(s),null}else 2*$s()-n.renderingStartTime>Ui&&a!==1073741824&&(s.flags|=128,r=!0,xo(n,!1),s.lanes=4194304);n.isBackwards?(i.sibling=s.child,s.child=i):(a=n.last,a!==null?a.sibling=i:s.child=i,n.last=i)}return n.tail!==null?(s=n.tail,n.rendering=s,n.tail=s.sibling,n.renderingStartTime=$s(),s.sibling=null,a=Ps.current,vs(Ps,r?a&1|2:a&1),s):(ba(s),null);case 22:case 23:return Wu(),r=s.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(s.flags|=8192),r&&s.mode&1?Va&1073741824&&(ba(s),s.subtreeFlags&6&&(s.flags|=8192)):ba(s),null;case 24:return null;case 25:return null}throw Error(Je(156,s.tag))}function iv(t,s){switch(Su(s),s.tag){case 1:return La(s.type)&&Ld(),t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 3:return Li(),Ss($a),Ss(wa),Ru(),t=s.flags,t&65536&&!(t&128)?(s.flags=t&-65537|128,s):null;case 5:return Du(s),null;case 13:if(Ss(Ps),t=s.memoizedState,t!==null&&t.dehydrated!==null){if(s.alternate===null)throw Error(Je(340));zi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 19:return Ss(Ps),null;case 4:return Li(),null;case 10:return Pu(s.type._context),null;case 22:case 23:return Wu(),null;case 24:return null;default:return null}}var Vc=!1,va=!1,ov=typeof WeakSet=="function"?WeakSet:Set,ut=null;function ki(t,s){var a=t.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(r){Rs(t,s,r)}else a.current=null}function E0(t,s,a){try{a()}catch(r){Rs(t,s,r)}}var cp=!1;function cv(t,s){if(f0=Fd,t=Wg(),ku(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var l=r.anchorOffset,n=r.focusNode;r=r.focusOffset;try{a.nodeType,n.nodeType}catch{a=null;break e}var i=0,c=-1,d=-1,x=0,m=0,h=t,f=null;t:for(;;){for(var y;h!==a||l!==0&&h.nodeType!==3||(c=i+l),h!==n||r!==0&&h.nodeType!==3||(d=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(y=h.firstChild)!==null;)f=h,h=y;for(;;){if(h===t)break t;if(f===a&&++x===l&&(c=i),f===n&&++m===r&&(d=i),(y=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=y}a=c===-1||d===-1?null:{start:c,end:d}}else a=null}a=a||{start:0,end:0}}else a=null;for(g0={focusedElem:t,selectionRange:a},Fd=!1,ut=s;ut!==null;)if(s=ut,t=s.child,(s.subtreeFlags&1028)!==0&&t!==null)t.return=s,ut=t;else for(;ut!==null;){s=ut;try{var g=s.alternate;if(s.flags&1024)switch(s.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var w=g.memoizedProps,N=g.memoizedState,v=s.stateNode,j=v.getSnapshotBeforeUpdate(s.elementType===s.type?w:Cr(s.type,w),N);v.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var b=s.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Je(163))}}catch(p){Rs(s,s.return,p)}if(t=s.sibling,t!==null){t.return=s.return,ut=t;break}ut=s.return}return g=cp,cp=!1,g}function Fo(t,s,a){var r=s.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&t)===t){var n=l.destroy;l.destroy=void 0,n!==void 0&&E0(s,a,n)}l=l.next}while(l!==r)}}function ym(t,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var a=s=s.next;do{if((a.tag&t)===t){var r=a.create;a.destroy=r()}a=a.next}while(a!==s)}}function D0(t){var s=t.ref;if(s!==null){var a=t.stateNode;switch(t.tag){case 5:t=a;break;default:t=a}typeof s=="function"?s(t):s.current=t}}function Ub(t){var s=t.alternate;s!==null&&(t.alternate=null,Ub(s)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(s=t.stateNode,s!==null&&(delete s[Yr],delete s[tc],delete s[j0],delete s[Jj],delete s[Wj])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function qb(t){return t.tag===5||t.tag===3||t.tag===4}function dp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function R0(t,s,a){var r=t.tag;if(r===5||r===6)t=t.stateNode,s?a.nodeType===8?a.parentNode.insertBefore(t,s):a.insertBefore(t,s):(a.nodeType===8?(s=a.parentNode,s.insertBefore(t,a)):(s=a,s.appendChild(t)),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=$d));else if(r!==4&&(t=t.child,t!==null))for(R0(t,s,a),t=t.sibling;t!==null;)R0(t,s,a),t=t.sibling}function F0(t,s,a){var r=t.tag;if(r===5||r===6)t=t.stateNode,s?a.insertBefore(t,s):a.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(F0(t,s,a),t=t.sibling;t!==null;)F0(t,s,a),t=t.sibling}var ha=null,Ir=!1;function Jl(t,s,a){for(a=a.child;a!==null;)Gb(t,s,a),a=a.sibling}function Gb(t,s,a){if(Zr&&typeof Zr.onCommitFiberUnmount=="function")try{Zr.onCommitFiberUnmount(mm,a)}catch{}switch(a.tag){case 5:va||ki(a,s);case 6:var r=ha,l=Ir;ha=null,Jl(t,s,a),ha=r,Ir=l,ha!==null&&(Ir?(t=ha,a=a.stateNode,t.nodeType===8?t.parentNode.removeChild(a):t.removeChild(a)):ha.removeChild(a.stateNode));break;case 18:ha!==null&&(Ir?(t=ha,a=a.stateNode,t.nodeType===8?Zm(t.parentNode,a):t.nodeType===1&&Zm(t,a),Xo(t)):Zm(ha,a.stateNode));break;case 4:r=ha,l=Ir,ha=a.stateNode.containerInfo,Ir=!0,Jl(t,s,a),ha=r,Ir=l;break;case 0:case 11:case 14:case 15:if(!va&&(r=a.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var n=l,i=n.destroy;n=n.tag,i!==void 0&&(n&2||n&4)&&E0(a,s,i),l=l.next}while(l!==r)}Jl(t,s,a);break;case 1:if(!va&&(ki(a,s),r=a.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=a.memoizedProps,r.state=a.memoizedState,r.componentWillUnmount()}catch(c){Rs(a,s,c)}Jl(t,s,a);break;case 21:Jl(t,s,a);break;case 22:a.mode&1?(va=(r=va)||a.memoizedState!==null,Jl(t,s,a),va=r):Jl(t,s,a);break;default:Jl(t,s,a)}}function mp(t){var s=t.updateQueue;if(s!==null){t.updateQueue=null;var a=t.stateNode;a===null&&(a=t.stateNode=new ov),s.forEach(function(r){var l=bv.bind(null,t,r);a.has(r)||(a.add(r),r.then(l,l))})}}function _r(t,s){var a=s.deletions;if(a!==null)for(var r=0;r<a.length;r++){var l=a[r];try{var n=t,i=s,c=i;e:for(;c!==null;){switch(c.tag){case 5:ha=c.stateNode,Ir=!1;break e;case 3:ha=c.stateNode.containerInfo,Ir=!0;break e;case 4:ha=c.stateNode.containerInfo,Ir=!0;break e}c=c.return}if(ha===null)throw Error(Je(160));Gb(n,i,l),ha=null,Ir=!1;var d=l.alternate;d!==null&&(d.return=null),l.return=null}catch(x){Rs(l,s,x)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Jb(s,t),s=s.sibling}function Jb(t,s){var a=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(_r(s,t),Jr(t),r&4){try{Fo(3,t,t.return),ym(3,t)}catch(w){Rs(t,t.return,w)}try{Fo(5,t,t.return)}catch(w){Rs(t,t.return,w)}}break;case 1:_r(s,t),Jr(t),r&512&&a!==null&&ki(a,a.return);break;case 5:if(_r(s,t),Jr(t),r&512&&a!==null&&ki(a,a.return),t.flags&32){var l=t.stateNode;try{Wo(l,"")}catch(w){Rs(t,t.return,w)}}if(r&4&&(l=t.stateNode,l!=null)){var n=t.memoizedProps,i=a!==null?a.memoizedProps:n,c=t.type,d=t.updateQueue;if(t.updateQueue=null,d!==null)try{c==="input"&&n.type==="radio"&&n.name!=null&&ug(l,n),n0(c,i);var x=n0(c,n);for(i=0;i<d.length;i+=2){var m=d[i],h=d[i+1];m==="style"?bg(l,h):m==="dangerouslySetInnerHTML"?fg(l,h):m==="children"?Wo(l,h):mu(l,m,h,x)}switch(c){case"input":t0(l,n);break;case"textarea":hg(l,n);break;case"select":var f=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!n.multiple;var y=n.value;y!=null?Ci(l,!!n.multiple,y,!1):f!==!!n.multiple&&(n.defaultValue!=null?Ci(l,!!n.multiple,n.defaultValue,!0):Ci(l,!!n.multiple,n.multiple?[]:"",!1))}l[tc]=n}catch(w){Rs(t,t.return,w)}}break;case 6:if(_r(s,t),Jr(t),r&4){if(t.stateNode===null)throw Error(Je(162));l=t.stateNode,n=t.memoizedProps;try{l.nodeValue=n}catch(w){Rs(t,t.return,w)}}break;case 3:if(_r(s,t),Jr(t),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Xo(s.containerInfo)}catch(w){Rs(t,t.return,w)}break;case 4:_r(s,t),Jr(t);break;case 13:_r(s,t),Jr(t),l=t.child,l.flags&8192&&(n=l.memoizedState!==null,l.stateNode.isHidden=n,!n||l.alternate!==null&&l.alternate.memoizedState!==null||(Gu=$s())),r&4&&mp(t);break;case 22:if(m=a!==null&&a.memoizedState!==null,t.mode&1?(va=(x=va)||m,_r(s,t),va=x):_r(s,t),Jr(t),r&8192){if(x=t.memoizedState!==null,(t.stateNode.isHidden=x)&&!m&&t.mode&1)for(ut=t,m=t.child;m!==null;){for(h=ut=m;ut!==null;){switch(f=ut,y=f.child,f.tag){case 0:case 11:case 14:case 15:Fo(4,f,f.return);break;case 1:ki(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,a=f.return;try{s=r,g.props=s.memoizedProps,g.state=s.memoizedState,g.componentWillUnmount()}catch(w){Rs(r,a,w)}}break;case 5:ki(f,f.return);break;case 22:if(f.memoizedState!==null){up(h);continue}}y!==null?(y.return=f,ut=y):up(h)}m=m.sibling}e:for(m=null,h=t;;){if(h.tag===5){if(m===null){m=h;try{l=h.stateNode,x?(n=l.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"):(c=h.stateNode,d=h.memoizedProps.style,i=d!=null&&d.hasOwnProperty("display")?d.display:null,c.style.display=gg("display",i))}catch(w){Rs(t,t.return,w)}}}else if(h.tag===6){if(m===null)try{h.stateNode.nodeValue=x?"":h.memoizedProps}catch(w){Rs(t,t.return,w)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;m===h&&(m=null),h=h.return}m===h&&(m=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:_r(s,t),Jr(t),r&4&&mp(t);break;case 21:break;default:_r(s,t),Jr(t)}}function Jr(t){var s=t.flags;if(s&2){try{e:{for(var a=t.return;a!==null;){if(qb(a)){var r=a;break e}a=a.return}throw Error(Je(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Wo(l,""),r.flags&=-33);var n=dp(t);F0(t,n,l);break;case 3:case 4:var i=r.stateNode.containerInfo,c=dp(t);R0(t,c,i);break;default:throw Error(Je(161))}}catch(d){Rs(t,t.return,d)}t.flags&=-3}s&4096&&(t.flags&=-4097)}function dv(t,s,a){ut=t,Wb(t)}function Wb(t,s,a){for(var r=(t.mode&1)!==0;ut!==null;){var l=ut,n=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||Vc;if(!i){var c=l.alternate,d=c!==null&&c.memoizedState!==null||va;c=Vc;var x=va;if(Vc=i,(va=d)&&!x)for(ut=l;ut!==null;)i=ut,d=i.child,i.tag===22&&i.memoizedState!==null?hp(l):d!==null?(d.return=i,ut=d):hp(l);for(;n!==null;)ut=n,Wb(n),n=n.sibling;ut=l,Vc=c,va=x}xp(t)}else l.subtreeFlags&8772&&n!==null?(n.return=l,ut=n):xp(t)}}function xp(t){for(;ut!==null;){var s=ut;if(s.flags&8772){var a=s.alternate;try{if(s.flags&8772)switch(s.tag){case 0:case 11:case 15:va||ym(5,s);break;case 1:var r=s.stateNode;if(s.flags&4&&!va)if(a===null)r.componentDidMount();else{var l=s.elementType===s.type?a.memoizedProps:Cr(s.type,a.memoizedProps);r.componentDidUpdate(l,a.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var n=s.updateQueue;n!==null&&Xh(s,n,r);break;case 3:var i=s.updateQueue;if(i!==null){if(a=null,s.child!==null)switch(s.child.tag){case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}Xh(s,i,a)}break;case 5:var c=s.stateNode;if(a===null&&s.flags&4){a=c;var d=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":d.autoFocus&&a.focus();break;case"img":d.src&&(a.src=d.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var x=s.alternate;if(x!==null){var m=x.memoizedState;if(m!==null){var h=m.dehydrated;h!==null&&Xo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Je(163))}va||s.flags&512&&D0(s)}catch(f){Rs(s,s.return,f)}}if(s===t){ut=null;break}if(a=s.sibling,a!==null){a.return=s.return,ut=a;break}ut=s.return}}function up(t){for(;ut!==null;){var s=ut;if(s===t){ut=null;break}var a=s.sibling;if(a!==null){a.return=s.return,ut=a;break}ut=s.return}}function hp(t){for(;ut!==null;){var s=ut;try{switch(s.tag){case 0:case 11:case 15:var a=s.return;try{ym(4,s)}catch(d){Rs(s,a,d)}break;case 1:var r=s.stateNode;if(typeof r.componentDidMount=="function"){var l=s.return;try{r.componentDidMount()}catch(d){Rs(s,l,d)}}var n=s.return;try{D0(s)}catch(d){Rs(s,n,d)}break;case 5:var i=s.return;try{D0(s)}catch(d){Rs(s,i,d)}}}catch(d){Rs(s,s.return,d)}if(s===t){ut=null;break}var c=s.sibling;if(c!==null){c.return=s.return,ut=c;break}ut=s.return}}var mv=Math.ceil,Xd=Cl.ReactCurrentDispatcher,Uu=Cl.ReactCurrentOwner,mr=Cl.ReactCurrentBatchConfig,es=0,oa=null,Js=null,pa=0,Va=0,_i=jn(0),ta=0,ic=null,Wn=0,jm=0,qu=0,Oo=null,Fa=null,Gu=0,Ui=1/0,ml=null,Kd=!1,O0=null,mn=null,Yc=!1,sn=null,Qd=0,zo=0,z0=null,kd=-1,_d=0;function Ca(){return es&6?$s():kd!==-1?kd:kd=$s()}function xn(t){return t.mode&1?es&2&&pa!==0?pa&-pa:Vj.transition!==null?(_d===0&&(_d=Pg()),_d):(t=cs,t!==0||(t=window.event,t=t===void 0?16:Og(t.type)),t):1}function Er(t,s,a,r){if(50<zo)throw zo=0,z0=null,Error(Je(185));xc(t,a,r),(!(es&2)||t!==oa)&&(t===oa&&(!(es&2)&&(jm|=a),ta===4&&Zl(t,pa)),Ba(t,r),a===1&&es===0&&!(s.mode&1)&&(Ui=$s()+500,fm&&vn()))}function Ba(t,s){var a=t.callbackNode;V1(t,s);var r=Rd(t,t===oa?pa:0);if(r===0)a!==null&&Nh(a),t.callbackNode=null,t.callbackPriority=0;else if(s=r&-r,t.callbackPriority!==s){if(a!=null&&Nh(a),s===1)t.tag===0?Hj(pp.bind(null,t)):sb(pp.bind(null,t)),qj(function(){!(es&6)&&vn()}),a=null;else{switch(Ag(r)){case 1:a=fu;break;case 4:a=Ig;break;case 16:a=Dd;break;case 536870912:a=Tg;break;default:a=Dd}a=ey(a,Hb.bind(null,t))}t.callbackPriority=s,t.callbackNode=a}}function Hb(t,s){if(kd=-1,_d=0,es&6)throw Error(Je(327));var a=t.callbackNode;if(Mi()&&t.callbackNode!==a)return null;var r=Rd(t,t===oa?pa:0);if(r===0)return null;if(r&30||r&t.expiredLanes||s)s=Zd(t,r);else{s=r;var l=es;es|=2;var n=Yb();(oa!==t||pa!==s)&&(ml=null,Ui=$s()+500,Ln(t,s));do try{hv();break}catch(c){Vb(t,c)}while(!0);Tu(),Xd.current=n,es=l,Js!==null?s=0:(oa=null,pa=0,s=ta)}if(s!==0){if(s===2&&(l=m0(t),l!==0&&(r=l,s=$0(t,l))),s===1)throw a=ic,Ln(t,0),Zl(t,r),Ba(t,$s()),a;if(s===6)Zl(t,r);else{if(l=t.current.alternate,!(r&30)&&!xv(l)&&(s=Zd(t,r),s===2&&(n=m0(t),n!==0&&(r=n,s=$0(t,n))),s===1))throw a=ic,Ln(t,0),Zl(t,r),Ba(t,$s()),a;switch(t.finishedWork=l,t.finishedLanes=r,s){case 0:case 1:throw Error(Je(345));case 2:En(t,Fa,ml);break;case 3:if(Zl(t,r),(r&130023424)===r&&(s=Gu+500-$s(),10<s)){if(Rd(t,0)!==0)break;if(l=t.suspendedLanes,(l&r)!==r){Ca(),t.pingedLanes|=t.suspendedLanes&l;break}t.timeoutHandle=y0(En.bind(null,t,Fa,ml),s);break}En(t,Fa,ml);break;case 4:if(Zl(t,r),(r&4194240)===r)break;for(s=t.eventTimes,l=-1;0<r;){var i=31-Mr(r);n=1<<i,i=s[i],i>l&&(l=i),r&=~n}if(r=l,r=$s()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*mv(r/1960))-r,10<r){t.timeoutHandle=y0(En.bind(null,t,Fa,ml),r);break}En(t,Fa,ml);break;case 5:En(t,Fa,ml);break;default:throw Error(Je(329))}}}return Ba(t,$s()),t.callbackNode===a?Hb.bind(null,t):null}function $0(t,s){var a=Oo;return t.current.memoizedState.isDehydrated&&(Ln(t,s).flags|=256),t=Zd(t,s),t!==2&&(s=Fa,Fa=a,s!==null&&L0(s)),t}function L0(t){Fa===null?Fa=t:Fa.push.apply(Fa,t)}function xv(t){for(var s=t;;){if(s.flags&16384){var a=s.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var r=0;r<a.length;r++){var l=a[r],n=l.getSnapshot;l=l.value;try{if(!Rr(n(),l))return!1}catch{return!1}}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Zl(t,s){for(s&=~qu,s&=~jm,t.suspendedLanes|=s,t.pingedLanes&=~s,t=t.expirationTimes;0<s;){var a=31-Mr(s),r=1<<a;t[a]=-1,s&=~r}}function pp(t){if(es&6)throw Error(Je(327));Mi();var s=Rd(t,0);if(!(s&1))return Ba(t,$s()),null;var a=Zd(t,s);if(t.tag!==0&&a===2){var r=m0(t);r!==0&&(s=r,a=$0(t,r))}if(a===1)throw a=ic,Ln(t,0),Zl(t,s),Ba(t,$s()),a;if(a===6)throw Error(Je(345));return t.finishedWork=t.current.alternate,t.finishedLanes=s,En(t,Fa,ml),Ba(t,$s()),null}function Ju(t,s){var a=es;es|=1;try{return t(s)}finally{es=a,es===0&&(Ui=$s()+500,fm&&vn())}}function Hn(t){sn!==null&&sn.tag===0&&!(es&6)&&Mi();var s=es;es|=1;var a=mr.transition,r=cs;try{if(mr.transition=null,cs=1,t)return t()}finally{cs=r,mr.transition=a,es=s,!(es&6)&&vn()}}function Wu(){Va=_i.current,Ss(_i)}function Ln(t,s){t.finishedWork=null,t.finishedLanes=0;var a=t.timeoutHandle;if(a!==-1&&(t.timeoutHandle=-1,Uj(a)),Js!==null)for(a=Js.return;a!==null;){var r=a;switch(Su(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ld();break;case 3:Li(),Ss($a),Ss(wa),Ru();break;case 5:Du(r);break;case 4:Li();break;case 13:Ss(Ps);break;case 19:Ss(Ps);break;case 10:Pu(r.type._context);break;case 22:case 23:Wu()}a=a.return}if(oa=t,Js=t=un(t.current,null),pa=Va=s,ta=0,ic=null,qu=jm=Wn=0,Fa=Oo=null,zn!==null){for(s=0;s<zn.length;s++)if(a=zn[s],r=a.interleaved,r!==null){a.interleaved=null;var l=r.next,n=a.pending;if(n!==null){var i=n.next;n.next=l,r.next=i}a.pending=r}zn=null}return t}function Vb(t,s){do{var a=Js;try{if(Tu(),vd.current=Yd,Vd){for(var r=Ms.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Vd=!1}if(Jn=0,na=ea=Ms=null,Ro=!1,rc=0,Uu.current=null,a===null||a.return===null){ta=1,ic=s,Js=null;break}e:{var n=t,i=a.return,c=a,d=s;if(s=pa,c.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){var x=d,m=c,h=m.tag;if(!(m.mode&1)&&(h===0||h===11||h===15)){var f=m.alternate;f?(m.updateQueue=f.updateQueue,m.memoizedState=f.memoizedState,m.lanes=f.lanes):(m.updateQueue=null,m.memoizedState=null)}var y=sp(i);if(y!==null){y.flags&=-257,ap(y,i,c,n,s),y.mode&1&&tp(n,x,s),s=y,d=x;var g=s.updateQueue;if(g===null){var w=new Set;w.add(d),s.updateQueue=w}else g.add(d);break e}else{if(!(s&1)){tp(n,x,s),Hu();break e}d=Error(Je(426))}}else if(Is&&c.mode&1){var N=sp(i);if(N!==null){!(N.flags&65536)&&(N.flags|=256),ap(N,i,c,n,s),Cu(Bi(d,c));break e}}n=d=Bi(d,c),ta!==4&&(ta=2),Oo===null?Oo=[n]:Oo.push(n),n=i;do{switch(n.tag){case 3:n.flags|=65536,s&=-s,n.lanes|=s;var v=Ab(n,d,s);Yh(n,v);break e;case 1:c=d;var j=n.type,b=n.stateNode;if(!(n.flags&128)&&(typeof j.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(mn===null||!mn.has(b)))){n.flags|=65536,s&=-s,n.lanes|=s;var p=Mb(n,c,s);Yh(n,p);break e}}n=n.return}while(n!==null)}Kb(a)}catch(E){s=E,Js===a&&a!==null&&(Js=a=a.return);continue}break}while(!0)}function Yb(){var t=Xd.current;return Xd.current=Yd,t===null?Yd:t}function Hu(){(ta===0||ta===3||ta===2)&&(ta=4),oa===null||!(Wn&268435455)&&!(jm&268435455)||Zl(oa,pa)}function Zd(t,s){var a=es;es|=2;var r=Yb();(oa!==t||pa!==s)&&(ml=null,Ln(t,s));do try{uv();break}catch(l){Vb(t,l)}while(!0);if(Tu(),es=a,Xd.current=r,Js!==null)throw Error(Je(261));return oa=null,pa=0,ta}function uv(){for(;Js!==null;)Xb(Js)}function hv(){for(;Js!==null&&!$1();)Xb(Js)}function Xb(t){var s=Zb(t.alternate,t,Va);t.memoizedProps=t.pendingProps,s===null?Kb(t):Js=s,Uu.current=null}function Kb(t){var s=t;do{var a=s.alternate;if(t=s.return,s.flags&32768){if(a=iv(a,s),a!==null){a.flags&=32767,Js=a;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ta=6,Js=null;return}}else if(a=nv(a,s,Va),a!==null){Js=a;return}if(s=s.sibling,s!==null){Js=s;return}Js=s=t}while(s!==null);ta===0&&(ta=5)}function En(t,s,a){var r=cs,l=mr.transition;try{mr.transition=null,cs=1,pv(t,s,a,r)}finally{mr.transition=l,cs=r}return null}function pv(t,s,a,r){do Mi();while(sn!==null);if(es&6)throw Error(Je(327));a=t.finishedWork;var l=t.finishedLanes;if(a===null)return null;if(t.finishedWork=null,t.finishedLanes=0,a===t.current)throw Error(Je(177));t.callbackNode=null,t.callbackPriority=0;var n=a.lanes|a.childLanes;if(Y1(t,n),t===oa&&(Js=oa=null,pa=0),!(a.subtreeFlags&2064)&&!(a.flags&2064)||Yc||(Yc=!0,ey(Dd,function(){return Mi(),null})),n=(a.flags&15990)!==0,a.subtreeFlags&15990||n){n=mr.transition,mr.transition=null;var i=cs;cs=1;var c=es;es|=4,Uu.current=null,cv(t,a),Jb(a,t),Rj(g0),Fd=!!f0,g0=f0=null,t.current=a,dv(a),L1(),es=c,cs=i,mr.transition=n}else t.current=a;if(Yc&&(Yc=!1,sn=t,Qd=l),n=t.pendingLanes,n===0&&(mn=null),q1(a.stateNode),Ba(t,$s()),s!==null)for(r=t.onRecoverableError,a=0;a<s.length;a++)l=s[a],r(l.value,{componentStack:l.stack,digest:l.digest});if(Kd)throw Kd=!1,t=O0,O0=null,t;return Qd&1&&t.tag!==0&&Mi(),n=t.pendingLanes,n&1?t===z0?zo++:(zo=0,z0=t):zo=0,vn(),null}function Mi(){if(sn!==null){var t=Ag(Qd),s=mr.transition,a=cs;try{if(mr.transition=null,cs=16>t?16:t,sn===null)var r=!1;else{if(t=sn,sn=null,Qd=0,es&6)throw Error(Je(331));var l=es;for(es|=4,ut=t.current;ut!==null;){var n=ut,i=n.child;if(ut.flags&16){var c=n.deletions;if(c!==null){for(var d=0;d<c.length;d++){var x=c[d];for(ut=x;ut!==null;){var m=ut;switch(m.tag){case 0:case 11:case 15:Fo(8,m,n)}var h=m.child;if(h!==null)h.return=m,ut=h;else for(;ut!==null;){m=ut;var f=m.sibling,y=m.return;if(Ub(m),m===x){ut=null;break}if(f!==null){f.return=y,ut=f;break}ut=y}}}var g=n.alternate;if(g!==null){var w=g.child;if(w!==null){g.child=null;do{var N=w.sibling;w.sibling=null,w=N}while(w!==null)}}ut=n}}if(n.subtreeFlags&2064&&i!==null)i.return=n,ut=i;else e:for(;ut!==null;){if(n=ut,n.flags&2048)switch(n.tag){case 0:case 11:case 15:Fo(9,n,n.return)}var v=n.sibling;if(v!==null){v.return=n.return,ut=v;break e}ut=n.return}}var j=t.current;for(ut=j;ut!==null;){i=ut;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,ut=b;else e:for(i=j;ut!==null;){if(c=ut,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:ym(9,c)}}catch(E){Rs(c,c.return,E)}if(c===i){ut=null;break e}var p=c.sibling;if(p!==null){p.return=c.return,ut=p;break e}ut=c.return}}if(es=l,vn(),Zr&&typeof Zr.onPostCommitFiberRoot=="function")try{Zr.onPostCommitFiberRoot(mm,t)}catch{}r=!0}return r}finally{cs=a,mr.transition=s}}return!1}function fp(t,s,a){s=Bi(a,s),s=Ab(t,s,1),t=dn(t,s,1),s=Ca(),t!==null&&(xc(t,1,s),Ba(t,s))}function Rs(t,s,a){if(t.tag===3)fp(t,t,a);else for(;s!==null;){if(s.tag===3){fp(s,t,a);break}else if(s.tag===1){var r=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(mn===null||!mn.has(r))){t=Bi(a,t),t=Mb(s,t,1),s=dn(s,t,1),t=Ca(),s!==null&&(xc(s,1,t),Ba(s,t));break}}s=s.return}}function fv(t,s,a){var r=t.pingCache;r!==null&&r.delete(s),s=Ca(),t.pingedLanes|=t.suspendedLanes&a,oa===t&&(pa&a)===a&&(ta===4||ta===3&&(pa&130023424)===pa&&500>$s()-Gu?Ln(t,0):qu|=a),Ba(t,s)}function Qb(t,s){s===0&&(t.mode&1?(s=$c,$c<<=1,!($c&130023424)&&($c=4194304)):s=1);var a=Ca();t=wl(t,s),t!==null&&(xc(t,s,a),Ba(t,a))}function gv(t){var s=t.memoizedState,a=0;s!==null&&(a=s.retryLane),Qb(t,a)}function bv(t,s){var a=0;switch(t.tag){case 13:var r=t.stateNode,l=t.memoizedState;l!==null&&(a=l.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Je(314))}r!==null&&r.delete(s),Qb(t,a)}var Zb;Zb=function(t,s,a){if(t!==null)if(t.memoizedProps!==s.pendingProps||$a.current)za=!0;else{if(!(t.lanes&a)&&!(s.flags&128))return za=!1,lv(t,s,a);za=!!(t.flags&131072)}else za=!1,Is&&s.flags&1048576&&ab(s,qd,s.index);switch(s.lanes=0,s.tag){case 2:var r=s.type;Nd(t,s),t=s.pendingProps;var l=Oi(s,wa.current);Ai(s,a),l=Ou(null,s,r,t,l,a);var n=zu();return s.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,La(r)?(n=!0,Bd(s)):n=!1,s.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Mu(s),l.updater=bm,s.stateNode=l,l._reactInternals=s,S0(s,r,t,a),s=T0(null,s,r,!0,n,a)):(s.tag=0,Is&&n&&_u(s),Sa(null,s,l,a),s=s.child),s;case 16:r=s.elementType;e:{switch(Nd(t,s),t=s.pendingProps,l=r._init,r=l(r._payload),s.type=r,l=s.tag=jv(r),t=Cr(r,t),l){case 0:s=I0(null,s,r,t,a);break e;case 1:s=np(null,s,r,t,a);break e;case 11:s=rp(null,s,r,t,a);break e;case 14:s=lp(null,s,r,Cr(r.type,t),a);break e}throw Error(Je(306,r,""))}return s;case 0:return r=s.type,l=s.pendingProps,l=s.elementType===r?l:Cr(r,l),I0(t,s,r,l,a);case 1:return r=s.type,l=s.pendingProps,l=s.elementType===r?l:Cr(r,l),np(t,s,r,l,a);case 3:e:{if(Fb(s),t===null)throw Error(Je(387));r=s.pendingProps,n=s.memoizedState,l=n.element,cb(t,s),Wd(s,r,null,a);var i=s.memoizedState;if(r=i.element,n.isDehydrated)if(n={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},s.updateQueue.baseState=n,s.memoizedState=n,s.flags&256){l=Bi(Error(Je(423)),s),s=ip(t,s,r,a,l);break e}else if(r!==l){l=Bi(Error(Je(424)),s),s=ip(t,s,r,a,l);break e}else for(Xa=cn(s.stateNode.containerInfo.firstChild),Qa=s,Is=!0,Pr=null,a=ib(s,null,r,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(zi(),r===l){s=Nl(t,s,a);break e}Sa(t,s,r,a)}s=s.child}return s;case 5:return db(s),t===null&&N0(s),r=s.type,l=s.pendingProps,n=t!==null?t.memoizedProps:null,i=l.children,b0(r,l)?i=null:n!==null&&b0(r,n)&&(s.flags|=32),Rb(t,s),Sa(t,s,i,a),s.child;case 6:return t===null&&N0(s),null;case 13:return Ob(t,s,a);case 4:return Eu(s,s.stateNode.containerInfo),r=s.pendingProps,t===null?s.child=$i(s,null,r,a):Sa(t,s,r,a),s.child;case 11:return r=s.type,l=s.pendingProps,l=s.elementType===r?l:Cr(r,l),rp(t,s,r,l,a);
vendor: 11,649 bytes, line 40
40case 7:return Sa(t,s,s.pendingProps,a),s.child;case 8:return Sa(t,s,s.pendingProps.children,a),s.child;case 12:return Sa(t,s,s.pendingProps.children,a),s.child;case 10:e:{if(r=s.type._context,l=s.pendingProps,n=s.memoizedProps,i=l.value,vs(Gd,r._currentValue),r._currentValue=i,n!==null)if(Rr(n.value,i)){if(n.children===l.children&&!$a.current){s=Nl(t,s,a);break e}}else for(n=s.child,n!==null&&(n.return=s);n!==null;){var c=n.dependencies;if(c!==null){i=n.child;for(var d=c.firstContext;d!==null;){if(d.context===r){if(n.tag===1){d=bl(-1,a&-a),d.tag=2;var x=n.updateQueue;if(x!==null){x=x.shared;var m=x.pending;m===null?d.next=d:(d.next=m.next,m.next=d),x.pending=d}}n.lanes|=a,d=n.alternate,d!==null&&(d.lanes|=a),k0(n.return,a,s),c.lanes|=a;break}d=d.next}}else if(n.tag===10)i=n.type===s.type?null:n.child;else if(n.tag===18){if(i=n.return,i===null)throw Error(Je(341));i.lanes|=a,c=i.alternate,c!==null&&(c.lanes|=a),k0(i,a,s),i=n.sibling}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===s){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}Sa(t,s,l.children,a),s=s.child}return s;case 9:return l=s.type,r=s.pendingProps.children,Ai(s,a),l=fr(l),r=r(l),s.flags|=1,Sa(t,s,r,a),s.child;case 14:return r=s.type,l=Cr(r,s.pendingProps),l=Cr(r.type,l),lp(t,s,r,l,a);case 15:return Eb(t,s,s.type,s.pendingProps,a);case 17:return r=s.type,l=s.pendingProps,l=s.elementType===r?l:Cr(r,l),Nd(t,s),s.tag=1,La(r)?(t=!0,Bd(s)):t=!1,Ai(s,a),Pb(s,r,l),S0(s,r,l,a),T0(null,s,r,!0,t,a);case 19:return zb(t,s,a);case 22:return Db(t,s,a)}throw Error(Je(156,s.tag))};function ey(t,s){return Cg(t,s)}function yv(t,s,a,r){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,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 dr(t,s,a,r){return new yv(t,s,a,r)}function Vu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function jv(t){if(typeof t=="function")return Vu(t)?1:0;if(t!=null){if(t=t.$$typeof,t===uu)return 11;if(t===hu)return 14}return 2}function un(t,s){var a=t.alternate;return a===null?(a=dr(t.tag,s,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=s,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&14680064,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,s=t.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a}function Sd(t,s,a,r,l,n){var i=2;if(r=t,typeof t=="function")Vu(t)&&(i=1);else if(typeof t=="string")i=5;else e:switch(t){case pi:return Bn(a.children,l,n,s);case xu:i=8,l|=8;break;case Xx:return t=dr(12,a,s,l|2),t.elementType=Xx,t.lanes=n,t;case Kx:return t=dr(13,a,s,l),t.elementType=Kx,t.lanes=n,t;case Qx:return t=dr(19,a,s,l),t.elementType=Qx,t.lanes=n,t;case dg:return vm(a,l,n,s);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case og:i=10;break e;case cg:i=9;break e;case uu:i=11;break e;case hu:i=14;break e;case Xl:i=16,r=null;break e}throw Error(Je(130,t==null?t:typeof t,""))}return s=dr(i,a,s,l),s.elementType=t,s.type=r,s.lanes=n,s}function Bn(t,s,a,r){return t=dr(7,t,r,s),t.lanes=a,t}function vm(t,s,a,r){return t=dr(22,t,r,s),t.elementType=dg,t.lanes=a,t.stateNode={isHidden:!1},t}function ix(t,s,a){return t=dr(6,t,null,s),t.lanes=a,t}function ox(t,s,a){return s=dr(4,t.children!==null?t.children:[],t.key,s),s.lanes=a,s.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},s}function vv(t,s,a,r,l){this.tag=s,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Um(0),this.expirationTimes=Um(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Um(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Yu(t,s,a,r,l,n,i,c,d){return t=new vv(t,s,a,c,d),s===1?(s=1,n===!0&&(s|=8)):s=0,n=dr(3,null,null,s),t.current=n,n.stateNode=t,n.memoizedState={element:r,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mu(n),t}function wv(t,s,a){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:hi,key:r==null?null:""+r,children:t,containerInfo:s,implementation:a}}function ty(t){if(!t)return fn;t=t._reactInternals;e:{if(Zn(t)!==t||t.tag!==1)throw Error(Je(170));var s=t;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(La(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(Je(171))}if(t.tag===1){var a=t.type;if(La(a))return tb(t,a,s)}return s}function sy(t,s,a,r,l,n,i,c,d){return t=Yu(a,r,!0,t,l,n,i,c,d),t.context=ty(null),a=t.current,r=Ca(),l=xn(a),n=bl(r,l),n.callback=s??null,dn(a,n,l),t.current.lanes=l,xc(t,l,r),Ba(t,r),t}function wm(t,s,a,r){var l=s.current,n=Ca(),i=xn(l);return a=ty(a),s.context===null?s.context=a:s.pendingContext=a,s=bl(n,i),s.payload={element:t},r=r===void 0?null:r,r!==null&&(s.callback=r),t=dn(l,s,i),t!==null&&(Er(t,l,i,n),jd(t,l,i)),i}function em(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function gp(t,s){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<s?a:s}}function Xu(t,s){gp(t,s),(t=t.alternate)&&gp(t,s)}function Nv(){return null}var ay=typeof reportError=="function"?reportError:function(t){console.error(t)};function Ku(t){this._internalRoot=t}Nm.prototype.render=Ku.prototype.render=function(t){var s=this._internalRoot;if(s===null)throw Error(Je(409));wm(t,s,null,null)};Nm.prototype.unmount=Ku.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var s=t.containerInfo;Hn(function(){wm(null,t,null,null)}),s[vl]=null}};function Nm(t){this._internalRoot=t}Nm.prototype.unstable_scheduleHydration=function(t){if(t){var s=Dg();t={blockedOn:null,target:t,priority:s};for(var a=0;a<Ql.length&&s!==0&&s<Ql[a].priority;a++);Ql.splice(a,0,t),a===0&&Fg(t)}};function Qu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function km(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function bp(){}function kv(t,s,a,r,l){if(l){if(typeof r=="function"){var n=r;r=function(){var x=em(i);n.call(x)}}var i=sy(s,r,t,0,null,!1,!1,"",bp);return t._reactRootContainer=i,t[vl]=i.current,Zo(t.nodeType===8?t.parentNode:t),Hn(),i}for(;l=t.lastChild;)t.removeChild(l);if(typeof r=="function"){var c=r;r=function(){var x=em(d);c.call(x)}}var d=Yu(t,0,!1,null,null,!1,!1,"",bp);return t._reactRootContainer=d,t[vl]=d.current,Zo(t.nodeType===8?t.parentNode:t),Hn(function(){wm(s,d,a,r)}),d}function _m(t,s,a,r,l){var n=a._reactRootContainer;if(n){var i=n;if(typeof l=="function"){var c=l;l=function(){var d=em(i);c.call(d)}}wm(s,i,t,l)}else i=kv(a,s,t,l,r);return em(i)}Mg=function(t){switch(t.tag){case 3:var s=t.stateNode;if(s.current.memoizedState.isDehydrated){var a=ko(s.pendingLanes);a!==0&&(gu(s,a|1),Ba(s,$s()),!(es&6)&&(Ui=$s()+500,vn()))}break;case 13:Hn(function(){var r=wl(t,1);if(r!==null){var l=Ca();Er(r,t,1,l)}}),Xu(t,1)}};bu=function(t){if(t.tag===13){var s=wl(t,134217728);if(s!==null){var a=Ca();Er(s,t,134217728,a)}Xu(t,134217728)}};Eg=function(t){if(t.tag===13){var s=xn(t),a=wl(t,s);if(a!==null){var r=Ca();Er(a,t,s,r)}Xu(t,s)}};Dg=function(){return cs};Rg=function(t,s){var a=cs;try{return cs=t,s()}finally{cs=a}};o0=function(t,s,a){switch(s){case"input":if(t0(t,a),s=a.name,a.type==="radio"&&s!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<a.length;s++){var r=a[s];if(r!==t&&r.form===t.form){var l=pm(r);if(!l)throw Error(Je(90));xg(r),t0(r,l)}}}break;case"textarea":hg(t,a);break;case"select":s=a.value,s!=null&&Ci(t,!!a.multiple,s,!1)}};vg=Ju;wg=Hn;var _v={usingClientEntryPoint:!1,Events:[hc,yi,pm,yg,jg,Ju]},uo={findFiberByHostInstance:On,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Sv={bundleType:uo.bundleType,version:uo.version,rendererPackageName:uo.rendererPackageName,rendererConfig:uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Cl.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=_g(t),t===null?null:t.stateNode},findFiberByHostInstance:uo.findFiberByHostInstance||Nv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xc.isDisabled&&Xc.supportsFiber)try{mm=Xc.inject(Sv),Zr=Xc}catch{}}ar.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_v;ar.createPortal=function(t,s){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qu(s))throw Error(Je(200));return wv(t,s,null,a)};ar.createRoot=function(t,s){if(!Qu(t))throw Error(Je(299));var a=!1,r="",l=ay;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(r=s.identifierPrefix),s.onRecoverableError!==void 0&&(l=s.onRecoverableError)),s=Yu(t,1,!1,null,null,a,!1,r,l),t[vl]=s.current,Zo(t.nodeType===8?t.parentNode:t),new Ku(s)};ar.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var s=t._reactInternals;if(s===void 0)throw typeof t.render=="function"?Error(Je(188)):(t=Object.keys(t).join(","),Error(Je(268,t)));return t=_g(s),t=t===null?null:t.stateNode,t};ar.flushSync=function(t){return Hn(t)};ar.hydrate=function(t,s,a){if(!km(s))throw Error(Je(200));return _m(null,t,s,!0,a)};ar.hydrateRoot=function(t,s,a){if(!Qu(t))throw Error(Je(405));var r=a!=null&&a.hydratedSources||null,l=!1,n="",i=ay;if(a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onRecoverableError!==void 0&&(i=a.onRecoverableError)),s=sy(s,null,t,1,a??null,l,!1,n,i),t[vl]=s.current,Zo(t),r)for(t=0;t<r.length;t++)a=r[t],l=a._getVersion,l=l(a._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[a,l]:s.mutableSourceEagerHydrationData.push(a,l);return new Nm(s)};ar.render=function(t,s,a){if(!km(s))throw Error(Je(200));return _m(null,t,s,!1,a)};ar.unmountComponentAtNode=function(t){if(!km(t))throw Error(Je(40));return t._reactRootContainer?(Hn(function(){_m(null,null,t,!1,function(){t._reactRootContainer=null,t[vl]=null})}),!0):!1};ar.unstable_batchedUpdates=Ju;ar.unstable_renderSubtreeIntoContainer=function(t,s,a,r){if(!km(a))throw Error(Je(200));if(t==null||t._reactInternals===void 0)throw Error(Je(38));return _m(t,s,a,!1,r)};ar.version="18.3.1-next-f1338f8080-20240426";function ry(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ry)}catch(t){console.error(t)}}ry(),rg.exports=ar;
40var gl=rg.exports,ly,yp=gl;ly=yp.createRoot,yp.hydrateRoot;const Cv="modulepreload",Iv=function(t){return"/"+t},jp={},_s=function(s,a,r){let l=Promise.resolve();if(a&&a.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));l=Promise.allSettled(a.map(d=>{if(d=Iv(d),d in jp)return;jp[d]=!0;const x=d.endsWith(".css"),m=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const h=document.createElement("link");if(h.rel=x?"stylesheet":Cv,x||(h.as="script"),h.crossOrigin="",h.href=d,c&&h.setAttribute("nonce",c),document.head.appendChild(h),x)return new Promise((f,y)=>{h.addEventListener("load",f),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${d}`)))})}))}function n(i){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=i,window.dispatchEvent(c),!c.defaultPrevented)throw i}return l.then(i=>{for(const c of i||[])c.status==="rejected"&&n(c.reason);return s().catch(n)})};/** 41 * @license lucide-react v0.344.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */var Tv={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"};/** 46 * @license lucide-react v0.344.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */const Pv=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ye=(t,s)=>{const a=o.forwardRef(({color:r="currentColor",size:l=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:c="",children:d,...x},m)=>o.createElement("svg",{ref:m,...Tv,width:l,height:l,stroke:r,strokeWidth:i?Number(n)*24/Number(l):n,className:["lucide",`lucide-${Pv(t)}`,c].join(" "),...x},[...s.map(([h,f])=>o.createElement(h,f)),...Array.isArray(d)?d:[d]]));return a.displayName=`${t}`,a};/** 51 * @license lucide-react v0.344.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const ja=ye("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/** 56 * @license lucide-react v0.344.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const nt=ye("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 61 * @license lucide-react v0.344.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const Fs=ye("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 66 * @license lucide-react v0.344.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const Av=ye("ArrowDownCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]]);/** 71 * @license lucide-react v0.344.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const oc=ye("ArrowDownLeft",[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]]);/** 76 * @license lucide-react v0.344.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const Sm=ye("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 81 * @license lucide-react v0.344.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const xr=ye("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 86 * @license lucide-react v0.344.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const Yt=ye("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 91 * @license lucide-react v0.344.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const Mv=ye("ArrowUpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/** 96 * @license lucide-react v0.344.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const ci=ye("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** 101 * @license lucide-react v0.344.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const an=ye("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 106 * @license lucide-react v0.344.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const Cm=ye("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 111 * @license lucide-react v0.344.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const qs=ye("Award",[["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}],["path",{d:"M15.477 12.89 17 22l-5-3-5 3 1.523-9.11",key:"em7aur"}]]);/** 116 * @license lucide-react v0.344.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const kl=ye("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 121 * @license lucide-react v0.344.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const Ka=ye("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** 126 * @license lucide-react v0.344.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const Ev=ye("Banknote",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]]);/** 131 * @license lucide-react v0.344.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const Ia=ye("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 136 * @license lucide-react v0.344.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const Dv=ye("BellOff",[["path",{d:"M8.7 3A6 6 0 0 1 18 8a21.3 21.3 0 0 0 .6 5",key:"o7mx20"}],["path",{d:"M17 17H3s3-2 3-9a4.67 4.67 0 0 1 .3-1.7",key:"16f1lm"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 141 * @license lucide-react v0.344.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const gn=ye("Bitcoin",[["path",{d:"M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727",key:"yr8idg"}]]);/** 146 * @license lucide-react v0.344.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const Im=ye("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** 151 * @license lucide-react v0.344.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const Rv=ye("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"}]]);/** 156 * @license lucide-react v0.344.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const sa=ye("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
160],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 161 * @license lucide-react v0.344.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const Ds=ye("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 166 * @license lucide-react v0.344.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const Fv=ye("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 171 * @license lucide-react v0.344.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const hl=ye("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 176 * @license lucide-react v0.344.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const ne=ye("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 181 * @license lucide-react v0.344.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const Lt=ye("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 186 * @license lucide-react v0.344.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const is=ye("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 191 * @license lucide-react v0.344.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const Ua=ye("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 196 * @license lucide-react v0.344.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const ra=ye("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 201 * @license lucide-react v0.344.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const Un=ye("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 206 * @license lucide-react v0.344.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const Ov=ye("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/** 211 * @license lucide-react v0.344.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const zv=ye("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/** 216 * @license lucide-react v0.344.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const Ze=ye("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 221 * @license lucide-react v0.344.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const vp=ye("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** 226 * @license lucide-react v0.344.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const Ht=ye("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 231 * @license lucide-react v0.344.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree.
235 */const Nt=ye("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 236 * @license lucide-react v0.344.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const Ta=ye("Crown",[["path",{d:"m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14",key:"zkxr6b"}]]);/** 241 * @license lucide-react v0.344.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const $v=ye("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"}]]);/** 246 * @license lucide-react v0.344.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const Jt=ye("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"}]]);/** 251 * @license lucide-react v0.344.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const _l=ye("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"}]]);/** 256 * @license lucide-react v0.344.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const Lv=ye("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/** 261 * @license lucide-react v0.344.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const Gs=ye("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 266 * @license lucide-react v0.344.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const ur=ye("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** 271 * @license lucide-react v0.344.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const Ct=ye("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 276 * @license lucide-react v0.344.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const Vn=ye("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/** 281 * @license lucide-react v0.344.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const B0=ye("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/** 286 * @license lucide-react v0.344.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const ei=ye("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 291 * @license lucide-react v0.344.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const Bv=ye("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/** 296 * @license lucide-react v0.344.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const Yn=ye("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 301 * @license lucide-react v0.344.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const Uv=ye("Fingerprint",[["path",{d:"M2 12C2 6.5 6.5 2 12 2a10 10 0 0 1 8 4",key:"1jc9o5"}
305],["path",{d:"M5 19.5C5.5 18 6 15 6 12c0-.7.12-1.37.34-2",key:"1mxgy1"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2c0 .47 0 1.17-.02 2",key:"1fgabc"}]]);/** 306 * @license lucide-react v0.344.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const ny=ye("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/** 311 * @license lucide-react v0.344.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const wp=ye("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** 316 * @license lucide-react v0.344.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const Xn=ye("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/** 321 * @license lucide-react v0.344.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const qv=ye("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** 326 * @license lucide-react v0.344.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const rs=ye("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 331 * @license lucide-react v0.344.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const iy=ye("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/** 336 * @license lucide-react v0.344.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const wt=ye("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"}]]);/** 341 * @license lucide-react v0.344.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const Gv=ye("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** 346 * @license lucide-react v0.344.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const Jv=ye("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** 351 * @license lucide-react v0.344.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const fc=ye("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}
355]]);/** 356 * @license lucide-react v0.344.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const Kn=ye("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 361 * @license lucide-react v0.344.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const ia=ye("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 366 * @license lucide-react v0.344.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const oy=ye("HelpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 371 * @license lucide-react v0.344.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const qi=ye("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 376 * @license lucide-react v0.344.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const cy=ye("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/** 381 * @license lucide-react v0.344.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const Zu=ye("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/** 386 * @license lucide-react v0.344.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const tm=ye("ImagePlus",[["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"31hg93"}],["line",{x1:"16",x2:"22",y1:"5",y2:"5",key:"ez7e4s"}],["line",{x1:"19",x2:"19",y1:"2",y2:"8",key:"1gkr8c"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 391 * @license lucide-react v0.344.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const sm=ye("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 396 * @license lucide-react v0.344.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const eh=ye("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** 401 * @license lucide-react v0.344.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const hr=ye("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 406 * @license lucide-react v0.344.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const Za=ye("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 411 * @license lucide-react v0.344.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const Dr=ye("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/** 416 * @license lucide-react v0.344.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const Gi=ye("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/** 421 * @license lucide-react v0.344.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const Os=ye("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 426 * @license lucide-react v0.344.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree.
430 */const Wv=ye("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"}]]);/** 431 * @license lucide-react v0.344.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const dy=ye("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"}]]);/** 436 * @license lucide-react v0.344.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const Hv=ye("LineChart",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/** 441 * @license lucide-react v0.344.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const cc=ye("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 446 * @license lucide-react v0.344.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const hn=ye("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 451 * @license lucide-react v0.344.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const th=ye("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 456 * @license lucide-react v0.344.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const Ne=ye("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 461 * @license lucide-react v0.344.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const am=ye("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]);/** 466 * @license lucide-react v0.344.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const $t=ye("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"}]]);/** 471 * @license lucide-react v0.344.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const Vv=ye("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 476 * @license lucide-react v0.344.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const U0=ye("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 481 * @license lucide-react v0.344.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const gs=ye("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"}]]);/** 486 * @license lucide-react v0.344.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const Fr=ye("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"}]]);/** 491 * @license lucide-react v0.344.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const Ei=ye("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** 496 * @license lucide-react v0.344.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const Yv=ye("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 501 * @license lucide-react v0.344.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const Ls=ye("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 506 * @license lucide-react v0.344.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const rm=ye("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 511 * @license lucide-react v0.344.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const Kc=ye("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 516 * @license lucide-react v0.344.0 - ISC 517 * 518 * This source code is licensed under the ISC license. 519 * See the LICENSE file in the root directory of this source tree. 520 */const Si=ye("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 521 * @license lucide-react v0.344.0 - ISC 522 * 523 * This source code is licensed under the ISC license. 524 * See the LICENSE file in the root directory of this source tree. 525 */const my=ye("MousePointer",[["path",{d:"m3 3 7.07 16.97 2.51-7.39 7.39-2.51L3 3z",key:"y2ucgo"}],["path",{d:"m13 13 6 6",key:"1nhxnf"}]]);/** 526 * @license lucide-react v0.344.0 - ISC 527 * 528 * This source code is licensed under the ISC license. 529 * See the LICENSE file in the root directory of this source tree. 530 */const Xv=ye("Move",[["polyline",{points:"5 9 2 12 5 15",key:"1r5uj5"}],["polyline",{points:"9 5 12 2 15 5",key:"5v383o"}],["polyline",{points:"15 19 12 22 9 19",key:"g7qi8m"}],["polyline",{points:"19 9 22 12 19 15",key:"tpp73q"}],["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}]]);/** 531 * @license lucide-react v0.344.0 - ISC 532 * 533 * This source code is licensed under the ISC license. 534 * See the LICENSE file in the root directory of this source tree. 535 */const $o=ye("Music2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);/** 536 * @license lucide-react v0.344.0 - ISC 537 * 538 * This source code is licensed under the ISC license. 539 * See the LICENSE file in the root directory of this source tree. 540 */const Kv=ye("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 541 * @license lucide-react v0.344.0 - ISC 542 * 543 * This source code is licensed under the ISC license. 544 * See the LICENSE file in the root directory of this source tree. 545 */const Qv=ye("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** 546 * @license lucide-react v0.344.0 - ISC 547 * 548 * This source code is licensed under the ISC license. 549 * See the LICENSE file in the root directory of this source tree. 550 */const us=ye("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** 551 * @license lucide-react v0.344.0 - ISC 552 * 553 * This source code is licensed under the ISC license. 554 * See the LICENSE file in the root directory of this source tree. 555 */const Lo=ye("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/** 556 * @license lucide-react v0.344.0 - ISC 557 * 558 * This source code is licensed under the ISC license. 559 * See the LICENSE file in the root directory of this source tree. 560 */const xy=ye("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/** 561 * @license lucide-react v0.344.0 - ISC 562 * 563 * This source code is licensed under the ISC license. 564 * See the LICENSE file in the root directory of this source tree. 565 */const lm=ye("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"}]]);/** 566 * @license lucide-react v0.344.0 - ISC 567 * 568 * This source code is licensed under the ISC license. 569 * See the LICENSE file in the root directory of this source tree. 570 */const Cd=ye("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);/** 571 * @license lucide-react v0.344.0 - ISC 572 * 573 * This source code is licensed under the ISC license. 574 * See the LICENSE file in the root directory of this source tree. 575 */const Ji=ye("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 576 * @license lucide-react v0.344.0 - ISC 577 * 578 * This source code is licensed under the ISC license. 579 * See the LICENSE file in the root directory of this source tree. 580 */const zs=ye("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** 581 * @license lucide-react v0.344.0 - ISC 582 * 583 * This source code is licensed under the ISC license. 584 * See the LICENSE file in the root directory of this source tree. 585 */const ns=ye("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 586 * @license lucide-react v0.344.0 - ISC 587 * 588 * This source code is licensed under the ISC license. 589 * See the LICENSE file in the root directory of this source tree. 590 */const Zv=ye("Podcast",[["circle",{cx:"12",cy:"11",r:"1",key:"1gvufo"}],["path",{d:"M11 17a1 1 0 0 1 2 0c0 .5-.34 3-.5 4.5a.5.5 0 0 1-1 0c-.16-1.5-.5-4-.5-4.5Z",key:"1n5fvv"}],["path",{d:"M8 14a5 5 0 1 1 8 0",key:"fc81rn"}],["path",{d:"M17 18.5a9 9 0 1 0-10 0",key:"jqtxkf"}]]);/** 591 * @license lucide-react v0.344.0 - ISC 592 * 593 * This source code is licensed under the ISC license. 594 * See the LICENSE file in the root directory of this source tree. 595 */const ew=ye("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 596 * @license lucide-react v0.344.0 - ISC 597 * 598 * This source code is licensed under the ISC license. 599 * See the LICENSE file in the root directory of this source tree. 600 */const tw=ye("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** 601 * @license lucide-react v0.344.0 - ISC 602 * 603 * This source code is licensed under the ISC license. 604 * See the LICENSE file in the root directory of this source tree. 605 */const uy=ye("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** 606 * @license lucide-react v0.344.0 - ISC 607 * 608 * This source code is licensed under the ISC license. 609 * See the LICENSE file in the root directory of this source tree. 610 */const Ve=ye("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"}]]);/** 611 * @license lucide-react v0.344.0 - ISC 612 * 613 * This source code is licensed under the ISC license. 614 * See the LICENSE file in the root directory of this source tree. 615 */const sw=ye("Repeat2",[["path",{d:"m2 9 3-3 3 3",key:"1ltn5i"}],["path",{d:"M13 18H7a2 2 0 0 1-2-2V6",key:"1r6tfw"}],["path",{d:"m22 15-3 3-3-3",key:"4rnwn2"}],["path",{d:"M11 6h6a2 2 0 0 1 2 2v10",key:"2f72bc"}]]);/** 616 * @license lucide-react v0.344.0 - ISC 617 * 618 * This source code is licensed under the ISC license. 619 * See the LICENSE file in the root directory of this source tree. 620 */const aw=ye("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** 621 * @license lucide-react v0.344.0 - ISC 622 * 623 * This source code is licensed under the ISC license. 624 * See the LICENSE file in the root directory of this source tree. 625 */const Or=ye("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3
625kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/** 626 * @license lucide-react v0.344.0 - ISC 627 * 628 * This source code is licensed under the ISC license. 629 * See the LICENSE file in the root directory of this source tree. 630 */const hy=ye("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 631 * @license lucide-react v0.344.0 - ISC 632 * 633 * This source code is licensed under the ISC license. 634 * See the LICENSE file in the root directory of this source tree. 635 */const rw=ye("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** 636 * @license lucide-react v0.344.0 - ISC 637 * 638 * This source code is licensed under the ISC license. 639 * See the LICENSE file in the root directory of this source tree. 640 */const Cs=ye("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"}]]);/** 641 * @license lucide-react v0.344.0 - ISC 642 * 643 * This source code is licensed under the ISC license. 644 * See the LICENSE file in the root directory of this source tree. 645 */const ws=ye("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 646 * @license lucide-react v0.344.0 - ISC 647 * 648 * This source code is licensed under the ISC license. 649 * See the LICENSE file in the root directory of this source tree. 650 */const As=ye("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** 651 * @license lucide-react v0.344.0 - ISC 652 * 653 * This source code is licensed under the ISC license. 654 * See the LICENSE file in the root directory of this source tree. 655 */const er=ye("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** 656 * @license lucide-react v0.344.0 - ISC 657 * 658 * This source code is licensed under the ISC license. 659 * See the LICENSE file in the root directory of this source tree. 660 */const lw=ye("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** 661 * @license lucide-react v0.344.0 - ISC 662 * 663 * This source code is licensed under the ISC license. 664 * See the LICENSE file in the root directory of this source tree. 665 */const tl=ye("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"}]]);/** 666 * @license lucide-react v0.344.0 - ISC 667 * 668 * This source code is licensed under the ISC license. 669 * See the LICENSE file in the root directory of this source tree. 670 */const Ki=ye("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 671 * @license lucide-react v0.344.0 - ISC 672 * 673 * This source code is licensed under the ISC license. 674 * See the LICENSE file in the root directory of this source tree. 675 */const sh=ye("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
675y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** 676 * @license lucide-react v0.344.0 - ISC 677 * 678 * This source code is licensed under the ISC license. 679 * See the LICENSE file in the root directory of this source tree. 680 */const Sl=ye("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 681 * @license lucide-react v0.344.0 - ISC 682 * 683 * This source code is licensed under the ISC license. 684 * See the LICENSE file in the root directory of this source tree. 685 */const cx=ye("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/** 686 * @license lucide-react v0.344.0 - ISC 687 * 688 * This source code is licensed under the ISC license. 689 * See the LICENSE file in the root directory of this source tree. 690 */const py=ye("ShieldX",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);/** 691 * @license lucide-react v0.344.0 - ISC 692 * 693 * This source code is licensed under the ISC license. 694 * See the LICENSE file in the root directory of this source tree. 695 */const lt=ye("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 696 * @license lucide-react v0.344.0 - ISC 697 * 698 * This source code is licensed under the ISC license. 699 * See the LICENSE file in the root directory of this source tree. 700 */const ah=ye("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 701 * @license lucide-react v0.344.0 - ISC 702 * 703 * This source code is licensed under the ISC license. 704 * See the LICENSE file in the root directory of this source tree. 705 */const Ws=ye("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** 706 * @license lucide-react v0.344.0 - ISC 707 * 708 * This source code is licensed under the ISC license. 709 * See the LICENSE file in the root directory of this source tree. 710 */const Id=ye("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 711 * @license lucide-react v0.344.0 - ISC 712 * 713 * This source code is licensed under the ISC license. 714 * See the LICENSE file in the root directory of this source tree. 715 */const Vt=ye("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/** 716 * @license lucide-react v0.344.0 - ISC 717 * 718 * This source code is licensed under the ISC license. 719 * See the LICENSE file in the root directory of this source tree. 720 */const Zt=ye("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"}]]);/** 721 * @license lucide-react v0.344.0 - ISC 722 * 723 * This source code is licensed under the ISC license. 724 * See the LICENSE file in the root directory of this source tree. 725 */const Td=ye("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2v0a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12v0a2 2 0 0 1-2-2V7",key:"jon5kx"}]]);/** 726 * @license lucide-react v0.344.0 - ISC 727 * 728 * This source code is licensed under the ISC license. 729 * See the LICENSE file in the root directory of this source tree. 730 */const dx=ye("Tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);/** 731 * @license lucide-react v0.344.0 - ISC 732 * 733 * This source code is licensed under the ISC license. 734 * See the LICENSE file in the root directory of this source tree.
735 */const bn=ye("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 736 * @license lucide-react v0.344.0 - ISC 737 * 738 * This source code is licensed under the ISC license. 739 * See the LICENSE file in the root directory of this source tree. 740 */const sr=ye("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"}]]);/** 741 * @license lucide-react v0.344.0 - ISC 742 * 743 * This source code is licensed under the ISC license. 744 * See the LICENSE file in the root directory of this source tree. 745 */const nw=ye("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z",key:"y3tblf"}]]);/** 746 * @license lucide-react v0.344.0 - ISC 747 * 748 * This source code is licensed under the ISC license. 749 * See the LICENSE file in the root directory of this source tree. 750 */const Ar=ye("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** 751 * @license lucide-react v0.344.0 - ISC 752 * 753 * This source code is licensed under the ISC license. 754 * See the LICENSE file in the root directory of this source tree. 755 */const Kr=ye("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/** 756 * @license lucide-react v0.344.0 - ISC 757 * 758 * This source code is licensed under the ISC license. 759 * See the LICENSE file in the root directory of this source tree. 760 */const Qr=ye("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]);/** 761 * @license lucide-react v0.344.0 - ISC 762 * 763 * This source code is licensed under the ISC license. 764 * See the LICENSE file in the root directory of this source tree. 765 */const xs=ye("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"}]]);/** 766 * @license lucide-react v0.344.0 - ISC 767 * 768 * This source code is licensed under the ISC license. 769 * See the LICENSE file in the root directory of this source tree. 770 */const tt=ye("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 771 * @license lucide-react v0.344.0 - ISC 772 * 773 * This source code is licensed under the ISC license. 774 * See the LICENSE file in the root directory of this source tree. 775 */const iw=ye("Tv",[["rect",{width:"20",height:"15",x:"2",y:"7",rx:"2",ry:"2",key:"10ag99"}],["polyline",{points:"17 2 12 7 7 2",key:"11pgbg"}]]);/** 776 * @license lucide-react v0.344.0 - ISC 777 * 778 * This source code is licensed under the ISC license. 779 * See the LICENSE file in the root directory of this source tree. 780 */const ow=ye("Twitch",[["path",{d:"M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7",key:"c0yzno"}]]);/** 781 * @license lucide-react v0.344.0 - ISC 782 * 783 * This source code is licensed under the ISC license. 784 * See the LICENSE file in the root directory of this source tree. 785 */const yl=ye("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/** 786 * @license lucide-react v0.344.0 - ISC 787 * 788 * This source code is licensed under the ISC license. 789 * See the LICENSE file in the root directory of this source tree. 790 */const Np=ye("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/** 791 * @license lucide-react v0.344.0 - ISC 792 * 793 * This source code is licensed under the ISC license. 794 * See the LICENSE file in the root directory of this source tree.
795 */const cw=ye("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"}]]);/** 796 * @license lucide-react v0.344.0 - ISC 797 * 798 * This source code is licensed under the ISC license. 799 * See the LICENSE file in the root directory of this source tree. 800 */const Xr=ye("UserCheck",[["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"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** 801 * @license lucide-react v0.344.0 - ISC 802 * 803 * This source code is licensed under the ISC license. 804 * See the LICENSE file in the root directory of this source tree. 805 */const dw=ye("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** 806 * @license lucide-react v0.344.0 - ISC 807 * 808 * This source code is licensed under the ISC license. 809 * See the LICENSE file in the root directory of this source tree. 810 */const di=ye("UserX",[["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"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/** 811 * @license lucide-react v0.344.0 - ISC 812 * 813 * This source code is licensed under the ISC license. 814 * See the LICENSE file in the root directory of this source tree. 815 */const ls=ye("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"}]]);/** 816 * @license lucide-react v0.344.0 - ISC 817 * 818 * This source code is licensed under the ISC license. 819 * See the LICENSE file in the root directory of this source tree. 820 */const mt=ye("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"}]]);/** 821 * @license lucide-react v0.344.0 - ISC 822 * 823 * This source code is licensed under the ISC license. 824 * See the LICENSE file in the root directory of this source tree. 825 */const Di=ye("Video",[["path",{d:"m22 8-6 4 6 4V8Z",key:"50v9me"}],["rect",{width:"14",height:"12",x:"2",y:"6",rx:"2",ry:"2",key:"1rqjg6"}]]);/** 826 * @license lucide-react v0.344.0 - ISC 827 * 828 * This source code is licensed under the ISC license. 829 * See the LICENSE file in the root directory of this source tree. 830 */const kt=ye("Wallet",[["path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4",key:"195gfw"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5",key:"195n9w"}],["path",{d:"M18 12a2 2 0 0 0 0 4h4v-4Z",key:"vllfpd"}]]);/** 831 * @license lucide-react v0.344.0 - ISC 832 * 833 * This source code is licensed under the ISC license. 834 * See the LICENSE file in the root directory of this source tree. 835 */const Wi=ye("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** 836 * @license lucide-react v0.344.0 - ISC 837 * 838 * This source code is licensed under the ISC license. 839 * See the LICENSE file in the root directory of this source tree. 840 */const st=ye("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 841 * @license lucide-react v0.344.0 - ISC 842 * 843 * This source code is licensed under the ISC license. 844 * See the LICENSE file in the root directory of this source tree. 845 */const ht=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 846 * @license lucide-react v0.344.0 - ISC 847 * 848 * This source code is licensed under the ISC license. 849 * See the LICENSE file in the root directory of this source tree. 850 */const Qi=ye("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.5
8505 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/** 851 * @license lucide-react v0.344.0 - ISC 852 * 853 * This source code is licensed under the ISC license. 854 * See the LICENSE file in the root directory of this source tree. 855 */const rt=ye("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);/** 856 * @license lucide-react v0.344.0 - ISC 857 * 858 * This source code is licensed under the ISC license. 859 * See the LICENSE file in the root directory of this source tree. 860 */const q0=ye("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),fy=o.createContext(null);function Vs(){const t=o.useContext(fy);if(!t)throw new Error("useModal must be used within a ModalProvider");return t}const mw={info:{icon:hr,bg:"bg-blue-50",color:"text-blue-600"},success:{icon:hl,bg:"bg-emerald-50",color:"text-emerald-600"},warning:{icon:Fs,bg:"bg-amber-50",color:"text-amber-600"},error:{icon:st,bg:"bg-red-50",color:"text-red-600"}},xw={info:"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500",success:"bg-emerald-600 hover:bg-emerald-700 focus:ring-emerald-500",warning:"bg-amber-600 hover:bg-amber-700 focus:ring-amber-500",error:"bg-red-600 hover:bg-red-700 focus:ring-red-500"};function uw({config:t,onClose:s}){const a=o.useRef(null),r=o.useRef(null),{icon:l,bg:n,color:i}=mw[t.type];return o.useEffect(()=>{var d;(d=r.current)==null||d.focus();const c=x=>{x.key==="Escape"&&s(!1)};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[s]),e.jsxs("div",{ref:a,className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",onClick:c=>{c.target===a.current&&s(!1)},children:[e.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm animate-fadeIn"}),e.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl w-full max-w-md animate-modalIn overflow-hidden",children:[e.jsx("button",{onClick:()=>s(!1),className:"absolute top-3 right-3 p-1.5 rounded-lg text-slate-400 hover:text-slate-600 hover:bg-slate-100 transition-colors z-10",children:e.jsx(ht,{className:"w-4 h-4"})}),e.jsx("div",{className:"p-5 md:p-6",children:e.jsxs("div",{className:"flex items-start gap-3.5",children:[e.jsx("div",{className:`flex-shrink-0 w-10 h-10 rounded-xl ${n} flex items-center justify-center`,children:e.jsx(l,{className:`w-5 h-5 ${i}`})}),e.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[e.jsx("h3",{className:"text-base font-semibold text-slate-900 leading-tight",children:t.title}),e.jsx("p",{className:"mt-1.5 text-sm text-slate-600 leading-relaxed whitespace-pre-line break-words",children:t.message})]})]})}),e.jsxs("div",{className:"flex items-center justify-end gap-2.5 px-5 md:px-6 pb-5 md:pb-6",children:[t.showCancel&&e.jsx("button",{onClick:()=>s(!1),className:"px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-300 rounded-xl hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-slate-400 transition-colors",children:t.cancelText||"Cancel"}),e.jsx("button",{ref:r,onClick:()=>s(!0),className:`px-5 py-2 text-sm font-semibold text-white rounded-xl focus:outline-none focus:ring-2 focus:ring-offset-1 transition-colors ${xw[t.type]}`,children:t.confirmText||"OK"})]})]})]})}function hw({children:t}){const[s,a]=o.useState(null),r=o.useRef(null),l=o.useCallback(c=>{var d;a(null),(d=r.current)==null||d.call(r,c),r.current=null},[]),n=o.useCallback((c,d)=>new Promise(x=>{r.current=()=>x();const m=(d==null?void 0:d.type)||pw(c);a({type:m,title:(d==null?void 0:d.title)||fw(m),message:c,showCancel:!1})}),[]),i=o.useCallback((c,d)=>new Promise(x=>{r.current=x;const m=(d==null?void 0:d.type)||"warning";a({type:m,title:(d==null?void 0:d.title)||"Confirm",message:c,confirmText:(d==null?void 0:d.confirmText)||"Confirm",cancelText:(d==null?void 0:d.cancelText)||"Cancel",showCancel:!0})}),[]);return e.jsxs(fy.Provider,{value:{showAlert:n,showConfirm:i},children:[t,s&&e.jsx(uw,{config:s,onClose:l})]})}function pw(t){const s=t.toLowerCase();return s.includes("success")||s.includes("approved")||s.includes("confirmed")||s.includes("submitted")?"success":s.includes("error")||s.includes("failed")||s.includes("invalid")||s.includes("not found")||s.includes("not authorized")?"error":s.includes("sure")||s.includes("delete")||s.includes("cancel")||s.includes("expired")?"warning":"info"}function fw(t){switch(t){case"success":return"Success";case"error":return"Error";case"warning":return"Warning";default:return"Notice"}}const gw=t=>{let s;return t?s=t:typeof fetch>"u"?s=(...a)=>_s(async()=>{const{default:r}=await Promise.resolve().then(()=>Zi);return{default:r}},void 0).then(({default:r})=>r(...a)):s=fetch,(...a)=>s(...a)};
860class rh extends Error{constructor(s,a="FunctionsError",r){super(s),this.name=a,this.context=r}}class bw extends rh{constructor(s){super("Failed to send a request to the Edge Function","FunctionsFetchError",s)}}class kp extends rh{constructor(s){super("Relay Error invoking the Edge Function","FunctionsRelayError",s)}}class _p extends rh{constructor(s){super("Edge Function returned a non-2xx status code","FunctionsHttpError",s)}}var G0;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(G0||(G0={}));var yw=function(t,s,a,r){function l(n){return n instanceof a?n:new a(function(i){i(n)})}return new(a||(a=Promise))(function(n,i){function c(m){try{x(r.next(m))}catch(h){i(h)}}function d(m){try{x(r.throw(m))}catch(h){i(h)}}function x(m){m.done?n(m.value):l(m.value).then(c,d)}x((r=r.apply(t,s||[])).next())})};class jw{constructor(s,{headers:a={},customFetch:r,region:l=G0.Any}={}){this.url=s,this.headers=a,this.region=l,this.fetch=gw(r)}setAuth(s){this.headers.Authorization=`Bearer ${s}`}invoke(s,a={}){var r;return yw(this,void 0,void 0,function*(){try{const{headers:l,method:n,body:i}=a;let c={},{region:d}=a;d||(d=this.region);const x=new URL(`${this.url}/${s}`);d&&d!=="any"&&(c["x-region"]=d,x.searchParams.set("forceFunctionRegion",d));let m;i&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)&&(typeof Blob<"u"&&i instanceof Blob||i instanceof ArrayBuffer?(c["Content-Type"]="application/octet-stream",m=i):typeof i=="string"?(c["Content-Type"]="text/plain",m=i):typeof FormData<"u"&&i instanceof FormData?m=i:(c["Content-Type"]="application/json",m=JSON.stringify(i)));const h=yield this.fetch(x.toString(),{method:n||"POST",headers:Object.assign(Object.assign(Object.assign({},c),this.headers),l),body:m}).catch(w=>{throw new bw(w)}),f=h.headers.get("x-relay-error");if(f&&f==="true")throw new kp(h);if(!h.ok)throw new _p(h);let y=((r=h.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),g;return y==="application/json"?g=yield h.json():y==="application/octet-stream"?g=yield h.blob():y==="text/event-stream"?g=h:y==="multipart/form-data"?g=yield h.formData():g=yield h.text(),{data:g,error:null,response:h}}catch(l){return{data:null,error:l,response:l instanceof _p||l instanceof kp?l.context:void 0}}})}}var Oa={},lh={},Tm={},gc={},Pm={},Am={},vw=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Hi=vw();const ww=Hi.fetch,gy=Hi.fetch.bind(Hi),by=Hi.Headers,Nw=Hi.Request,kw=Hi.Response,Zi=Object.freeze(Object.defineProperty({__proto__:null,Headers:by,Request:Nw,Response:kw,default:gy,fetch:ww},Symbol.toStringTag,{value:"Module"})),_w=t1(Zi);var Mm={};Object.defineProperty(Mm,"__esModule",{value:!0});let Sw=class extends Error{constructor(s){super(s.message),this.name="PostgrestError",this.details=s.details,this.hint=s.hint,this.co
860de=s.code}};Mm.default=Sw;var yy=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Am,"__esModule",{value:!0});const Cw=yy(_w),Iw=yy(Mm);let Tw=class{constructor(s){var a,r;this.shouldThrowOnError=!1,this.method=s.method,this.url=s.url,this.headers=new Headers(s.headers),this.schema=s.schema,this.body=s.body,this.shouldThrowOnError=(a=s.shouldThrowOnError)!==null&&a!==void 0?a:!1,this.signal=s.signal,this.isMaybeSingle=(r=s.isMaybeSingle)!==null&&r!==void 0?r:!1,s.fetch?this.fetch=s.fetch:typeof fetch>"u"?this.fetch=Cw.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(s,a){return this.headers=new Headers(this.headers),this.headers.set(s,a),this}then(s,a){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let l=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async n=>{var i,c,d,x;let m=null,h=null,f=null,y=n.status,g=n.statusText;if(n.ok){if(this.method!=="HEAD"){const j=await n.text();j===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((i=this.headers.get("Accept"))===null||i===void 0)&&i.includes("application/vnd.pgrst.plan+text"))?h=j:h=JSON.parse(j))}const N=(c=this.headers.get("Prefer"))===null||c===void 0?void 0:c.match(/count=(exact|planned|estimated)/),v=(d=n.headers.get("content-range"))===null||d===void 0?void 0:d.split("/");N&&v&&v.length>1&&(f=parseInt(v[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(h)&&(h.length>1?(m={code:"PGRST116",details:`Results contain ${h.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},h=null,f=null,y=406,g="Not Acceptable"):h.length===1?h=h[0]:h=null)}else{const N=await n.text();try{m=JSON.parse(N),Array.isArray(m)&&n.status===404&&(h=[],m=null,y=200,g="OK")}catch{n.status===404&&N===""?(y=204,g="No Content"):m={message:N}}if(m&&this.isMaybeSingle&&(!((x=m==null?void 0:m.details)===null||x===void 0)&&x.includes("0 rows"))&&(m=null,y=200,g="OK"),m&&this.shouldThrowOnError)throw new Iw.default(m)}return{error:m,data:h,count:f,status:y,statusText:g}});return this.shouldThrowOnError||(l=l.catch(n=>{var i,c,d;return{error:{message:`${(i=n==null?void 0:n.name)!==null&&i!==void 0?i:"FetchError"}: ${n==null?void 0:n.message}`,details:`${(c=n==null?void 0:n.stack)!==null&&c!==void 0?c:""}`,hint:"",code:`${(d=n==null?void 0:n.code)!==null&&d!==void 0?d:""}`},data:null,count:null,status:0,statusText:""}})),l.then(s,a)}returns(){return this}overrideTypes(){return this}};Am.default=Tw;var Pw=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pm,"__esModule",{value:!0});const Aw=Pw(Am);let Mw=class extends Aw.default{select(s){let a=!1;const r=(s??"*").split("").map(l=>/\s/.test(l)&&!a?"":(l==='"'&&(a=!a),l)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(s,{ascending:a=!0,nullsFirst:r,foreignTable:l,referencedTable:n=l}={}){const i=n?`${n}.order`:"order",c=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${c?`${c},`:""}${s}.${a?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(s,{foreignTable:a,referencedTable:r=a}={}){const l=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(l,`${s}`),this}range(s,a,{foreignTable:r,referencedTable:l=r}={}){const n=typeof l>"u"?"offset":`${l}.offset`,i=typeof l>"u"?"limit":`${l}.limit`;return this.url.searchParams.set(n,`${s}`),this.url.searchParams.set(i,`${a-s+1}`),this}abortSignal(s){return this.signal=s,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
860explain({analyze:s=!1,verbose:a=!1,settings:r=!1,buffers:l=!1,wal:n=!1,format:i="text"}={}){var c;const d=[s?"analyze":null,a?"verbose":null,r?"settings":null,l?"buffers":null,n?"wal":null].filter(Boolean).join("|"),x=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${x}"; options=${d};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(s){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${s}`),this}};Pm.default=Mw;var Ew=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gc,"__esModule",{value:!0});const Dw=Ew(Pm);let Rw=class extends Dw.default{eq(s,a){return this.url.searchParams.append(s,`eq.${a}`),this}neq(s,a){return this.url.searchParams.append(s,`neq.${a}`),this}gt(s,a){return this.url.searchParams.append(s,`gt.${a}`),this}gte(s,a){return this.url.searchParams.append(s,`gte.${a}`),this}lt(s,a){return this.url.searchParams.append(s,`lt.${a}`),this}lte(s,a){return this.url.searchParams.append(s,`lte.${a}`),this}like(s,a){return this.url.searchParams.append(s,`like.${a}`),this}likeAllOf(s,a){return this.url.searchParams.append(s,`like(all).{${a.join(",")}}`),this}likeAnyOf(s,a){return this.url.searchParams.append(s,`like(any).{${a.join(",")}}`),this}ilike(s,a){return this.url.searchParams.append(s,`ilike.${a}`),this}ilikeAllOf(s,a){return this.url.searchParams.append(s,`ilike(all).{${a.join(",")}}`),this}ilikeAnyOf(s,a){return this.url.searchParams.append(s,`ilike(any).{${a.join(",")}}`),this}is(s,a){return this.url.searchParams.append(s,`is.${a}`),this}in(s,a){const r=Array.from(new Set(a)).map(l=>typeof l=="string"&&new RegExp("[,()]").test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(s,`in.(${r})`),this}contains(s,a){return typeof a=="string"?this.url.searchParams.append(s,`cs.${a}`):Array.isArray(a)?this.url.searchParams.append(s,`cs.{${a.join(",")}}`):this.url.searchParams.append(s,`cs.${JSON.stringify(a)}`),this}containedBy(s,a){return typeof a=="string"?this.url.searchParams.append(s,`cd.${a}`):Array.isArray(a)?this.url.searchParams.append(s,`cd.{${a.join(",")}}`):this.url.searchParams.append(s,`cd.${JSON.stringify(a)}`),this}rangeGt(s,a){return this.url.searchParams.append(s,`sr.${a}`),this}rangeGte(s,a){return this.url.searchParams.append(s,`nxl.${a}`),this}rangeLt(s,a){return this.url.searchParams.append(s,`sl.${a}`),this}rangeLte(s,a){return this.url.searchParams.append(s,`nxr.${a}`),this}rangeAdjacent(s,a){return this.url.searchParams.append(s,`adj.${a}`),this}overlaps(s,a){return typeof a=="string"?this.url.searchParams.append(s,`ov.${a}`):this.url.searchParams.append(s,`ov.{${a.join(",")}}`),this}textSearch(s,a,{config:r,type:l}={}){let n="";l==="plain"?n="pl":l==="phrase"?n="ph":l==="websearch"&&(n="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(s,`${n}fts${i}.${a}`),this}match(s){return Object.entries(s).forEach(([a,r])=>{this.url.searchParams.append(a,`eq.${r}`)}),this}not(s,a,r){return this.url.searchParams.append(s,`not.${a}.${r}`),this}or(s,{foreignTable:a,referencedTable:r=a}={}){const l=r?`${r}.or`:"or";return this.url.searchParams.append(l,`(${s})`),this}filter(s,a,r){return this.url.searchParams.append(s,`${a}.${r}`),this}};gc.default=Rw;var Fw=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tm,"__esModule",{value:!0});const ho=Fw(gc);let Ow=class{constructor(s,{headers:a={},schema:r,fetch:l}){this.url=s,this.headers=new Headers(a),this.schema=r,this.fetch=l}select(s,{head:a=!1,count:r}={}){const l=a?"HEAD":"GET";let n=!1;const i=(s??"*").split("").map(c=>/\s/.test(c)&&!n?"":(c==='"'&&(n=!n),c)).join("");return this.url.searchParams.set("select",i),r&&this.headers.append("Prefer",`count=${r}`),new ho.default({method:l,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(s,{count:a,defaultToNull:r=!0}={}){var l;const n="POST";if(a&&this.headers.append("Prefer",`count=${a}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const i=s.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(i.length>0){const c=[...new Set(i)].map(d=>`"${d}"`);this.url.searchParams.set("columns",c.join(","))}}return new ho.default({method:n,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch})}upsert(s,{onConflict:a,ignoreDuplicates:r=!1,count:l,defaultToNull:n=!0}={}){var i;const c="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),a!==void 0&&this.url.searchParams.set("on_conflict",a),l&&this.headers.append("Prefer",`count=${l}`),n||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const d=s.reduce((x,m)=>x.concat(Object.keys(m)),[]);if(d.length>0){const x=[...new Set(d)].map(m=>`"${m}"`);this.url.searchParams.set("columns",x.join(","))}}return new ho.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}update(s,{count:a}={}){var r;const l="PATCH";return a&&this.headers.append("Prefer",`count=${a}`),new ho.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:s}={}){var a;const r="DELETE";return s&&this.headers.append("Prefer",`count=${s}`),new ho.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}};Tm.default=Ow;var jy=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lh,"__esModule",{value:!0});const zw=jy(Tm),$w=jy(gc);let Lw=class vy{constructor(s,{headers:a={},schema:r,fetch:l}={}){this.url=s,this.headers=new Headers(a),this.schemaName=r,this.fetch=l}from(s){const a=new URL(`${this.url}/${s}`);return new zw.default(a,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(s){return new vy(this.url,{headers:this.headers,schema:s,fetch:this.fetch})}rpc(s,a={},{head:r=!1,get:l=!1,count:n}={}){var i;let c;const d=new URL(`${this.url}/rpc/${s}`);let x;r||l?(c=r?"HEAD":"GET",Object.entries(a).filter(([h,f])=>f!==void 0).map(([h,f])=>[h,Array.isArray(f)?`{${f.join(",")}}`:`${f}
860`]).forEach(([h,f])=>{d.searchParams.append(h,f)})):(c="POST",x=a);const m=new Headers(this.headers);return n&&m.set("Prefer",`count=${n}`),new $w.default({method:c,url:d,headers:m,schema:this.schemaName,body:x,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}};lh.default=Lw;var eo=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oa,"__esModule",{value:!0});Oa.PostgrestError=Oa.PostgrestBuilder=Oa.PostgrestTransformBuilder=Oa.PostgrestFilterBuilder=Oa.PostgrestQueryBuilder=Oa.PostgrestClient=void 0;const wy=eo(lh);Oa.PostgrestClient=wy.default;const Ny=eo(Tm);Oa.PostgrestQueryBuilder=Ny.default;const ky=eo(gc);Oa.PostgrestFilterBuilder=ky.default;const _y=eo(Pm);Oa.PostgrestTransformBuilder=_y.default;const Sy=eo(Am);Oa.PostgrestBuilder=Sy.default;const Cy=eo(Mm);Oa.PostgrestError=Cy.default;var Bw=Oa.default={PostgrestClient:wy.default,PostgrestQueryBuilder:Ny.default,PostgrestFilterBuilder:ky.default,PostgrestTransformBuilder:_y.default,PostgrestBuilder:Sy.default,PostgrestError:Cy.default};const{PostgrestClient:Uw,PostgrestQueryBuilder:tk,PostgrestFilterBuilder:sk,PostgrestTransformBuilder:ak,PostgrestBuilder:rk,PostgrestError:lk}=Bw;class qw{static detectEnvironment(){var s;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((s=navigator.userAgent)===null||s===void 0)&&s.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const a=process.versions;if(a&&a.node){const r=a.node,l=parseInt(r.replace(/^v/,"").split(".")[0]);return l>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${l} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${l} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 861import ws from "ws" 862new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const s=this.detectEnvironment();if(s.constructor)return s.constructor;let a=s.error||"WebSocket not supported in this environment.";throw s.workaround&&(a+=` 863 864Suggested solution: ${s.workaround}`),new Error(a)}static createWebSocket(s,a){const r=this.getWebSocketConstructor();return new r(s,a)}static isWebSocketSupported(){try{const s=this.detectEnvironment();return s.type==="native"||s.type==="ws"}catch{return!1}}}const Gw="2.15.5",Jw=`realtime-js/${Gw}`,Ww="1.0.0",J0=1e4,Hw=1e3,Vw=100;var Bo;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Bo||(Bo={}));var Qs;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Qs||(Qs={}));var Tr;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Tr||(Tr={}));var W0;(function(t){t.websocket="websocket"})(W0||(W0={}));var Fn;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(Fn||(Fn={}));class Yw{constructor(){this.HEADER_LENGTH=1}decode(s,a){return s.constructor===ArrayBuffer?a(this._binaryDecode(s)):a(typeof s=="string"?JSON.parse(s):{})}_binaryDecode(s){const a=new DataView(s),r=new TextDecoder;return this._decodeBroadcast(s,a,r)}_decodeBroadcast(s,a,r){const l=a.getUint8(1),n=a.getUint8(2);let i=this.HEADER_LENGTH+2;const c=r.decode(s.slice(i,i+l));i=i+l;const d=r.decode(s.slice(i,i+n));i=i+n;const x=JSON.parse(r.decode(s.slice(i,s.byteLength)));return{ref:null,topic:c,event:d,payload:x}}}class Iy{constructor(s,a){this.callback=s,this.timerCalc=a,this.timer=void 0,this.tries=0,this.callback=s,this.timerCalc=a}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var js;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.t
864srange="tsrange",t.tstzrange="tstzrange"})(js||(js={}));const Sp=(t,s,a={})=>{var r;const l=(r=a.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(s).reduce((n,i)=>(n[i]=Xw(i,t,s,l),n),{})},Xw=(t,s,a,r)=>{const l=s.find(c=>c.name===t),n=l==null?void 0:l.type,i=a[t];return n&&!r.includes(n)?Ty(n,i):H0(i)},Ty=(t,s)=>{if(t.charAt(0)==="_"){const a=t.slice(1,t.length);return e2(s,a)}switch(t){case js.bool:return Kw(s);case js.float4:case js.float8:case js.int2:case js.int4:case js.int8:case js.numeric:case js.oid:return Qw(s);case js.json:case js.jsonb:return Zw(s);case js.timestamp:return t2(s);case js.abstime:case js.date:case js.daterange:case js.int4range:case js.int8range:case js.money:case js.reltime:case js.text:case js.time:case js.timestamptz:case js.timetz:case js.tsrange:case js.tstzrange:return H0(s);default:return H0(s)}},H0=t=>t,Kw=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},Qw=t=>{if(typeof t=="string"){const s=parseFloat(t);if(!Number.isNaN(s))return s}return t},Zw=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(s){return console.log(`JSON parse error: ${s}`),t}return t},e2=(t,s)=>{if(typeof t!="string")return t;const a=t.length-1,r=t[a];if(t[0]==="{"&&r==="}"){let n;const i=t.slice(1,a);try{n=JSON.parse("["+i+"]")}catch{n=i?i.split(","):[]}return n.map(c=>Ty(s,c))}return t},t2=t=>typeof t=="string"?t.replace(" ","T"):t,Py=t=>{let s=t;return s=s.replace(/^ws/i,"http"),s=s.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),s.replace(/\/+$/,"")+"/api/broadcast"};class mx{constructor(s,a,r={},l=J0){this.channel=s,this.event=a,this.payload=r,this.timeout=l,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(s){this.timeout=s,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(s){this.payload=Object.assign(Object.assign({},this.payload),s)}receive(s,a){var r;return this._hasReceived(s)&&a((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:s,callback:a}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const s=a=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=a,this._matchReceive(a)};this.channel._on(this.refEvent,{},s),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(s,a){this.refEvent&&this.channel._trigger(this.refEvent,{status:s,response:a})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:s,response:a}){this.recHooks.filter(r=>r.status===s).forEach(r=>r.callback(a))}_hasReceived(s){return this.receivedResp&&this.receivedResp.status===s}}var Cp;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Cp||(Cp={}));class Uo{constructor(s,a){this.channel=s,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(a==null?void 0:a.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},l=>{const{onJoin:n,onLeave:i,onSync:c}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Uo.syncState(this.state,l,n,i),this.pendingDiffs.forEach(d=>{this.state=Uo.syncDiff(this.state,d,n,i)}),this.pendingDiffs=[],c()}),this.channel._on(r.diff,{},l=>{const{onJoin:n,onLeave:i,onSync:c}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Uo.syncDiff(this.state,l,n,i),c())}),this.onJoin((l,n,i)=>{this.channel._trigger("presence",{event:"join",key:l,currentPresences:n,newPresences:i})}),this.onLeave((l,n,i)=>{this.channel._trigger("presence",{event:"leave",key:l,currentPresences:n,leftPresences:i}
864)}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(s,a,r,l){const n=this.cloneDeep(s),i=this.transformState(a),c={},d={};return this.map(n,(x,m)=>{i[x]||(d[x]=m)}),this.map(i,(x,m)=>{const h=n[x];if(h){const f=m.map(N=>N.presence_ref),y=h.map(N=>N.presence_ref),g=m.filter(N=>y.indexOf(N.presence_ref)<0),w=h.filter(N=>f.indexOf(N.presence_ref)<0);g.length>0&&(c[x]=g),w.length>0&&(d[x]=w)}else c[x]=m}),this.syncDiff(n,{joins:c,leaves:d},r,l)}static syncDiff(s,a,r,l){const{joins:n,leaves:i}={joins:this.transformState(a.joins),leaves:this.transformState(a.leaves)};return r||(r=()=>{}),l||(l=()=>{}),this.map(n,(c,d)=>{var x;const m=(x=s[c])!==null&&x!==void 0?x:[];if(s[c]=this.cloneDeep(d),m.length>0){const h=s[c].map(y=>y.presence_ref),f=m.filter(y=>h.indexOf(y.presence_ref)<0);s[c].unshift(...f)}r(c,m,d)}),this.map(i,(c,d)=>{let x=s[c];if(!x)return;const m=d.map(h=>h.presence_ref);x=x.filter(h=>m.indexOf(h.presence_ref)<0),s[c]=x,l(c,x,d),x.length===0&&delete s[c]}),s}static map(s,a){return Object.getOwnPropertyNames(s).map(r=>a(r,s[r]))}static transformState(s){return s=this.cloneDeep(s),Object.getOwnPropertyNames(s).reduce((a,r)=>{const l=s[r];return"metas"in l?a[r]=l.metas.map(n=>(n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n)):a[r]=l,a},{})}static cloneDeep(s){return JSON.parse(JSON.stringify(s))}onJoin(s){this.caller.onJoin=s}onLeave(s){this.caller.onLeave=s}onSync(s){this.caller.onSync=s}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Ip;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Ip||(Ip={}));var qo;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(qo||(qo={}));var xl;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(xl||(xl={}));class nh{constructor(s,a={config:{}},r){this.topic=s,this.params=a,this.socket=r,this.bindings={},this.state=Qs.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=s.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},a.config),this.timeout=this.socket.timeout,this.joinPush=new mx(this,Tr.join,this.params,this.timeout),this.rejoinTimer=new Iy(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Qs.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(l=>l.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Qs.closed,this.socket._remove(this)}),this._onError(l=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,l),this.state=Qs.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Qs.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",l=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,l),this.state=Qs.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Tr.reply,{},(l,n)=>{this._trigger(this._replyEventName(n),l)}),this.presence=new Uo(this),this.broadcastEndpointURL=Py(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(s,a=this.timeout){var r,l,n;if(this.socket.isConnected()||this.socket.connect(),this.state==Qs.closed){const{config:{broadcast:i,presence:c,private:d}}=this.params,x=(l=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(y=>y.filter))!==null&&l!==void 0?l:[],m=!!this.bindings[qo.PRESENCE]&&this.bindings[qo.PRESENCE].length>0||((n=this.params.config.presence)===null||n===void 0?void 0:n.enabled)===!0,h={},f={broadcast:i,presence:Object.assign(Object.assign({},c),{enabled:m}),postgres_changes:x,private:d};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(y=>s==null?void 0:s(xl.CHANNEL_ERROR,y)),this._onClose(()=>s==null?void 0:s(xl.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this.joinedOnce=!0,this._rejoin(a),this.joinPush.receive("ok",async({postgres_changes:y})=>{var g;if(this.socket.setAuth(),y===void 0){s==null||s(xl.SUBSCRIBED);return}else{const w=this.bindings.postgres_changes,N=(g=w==null?void 0:w.length)!==null&&g!==void 0?g:0,v=[];for(let j=0;j<N;j++){const b=w[j],{filter:{event:p,schema:E,table:C,filter:S}}=b,k=y&&y[j];if(k&&k.event===p&&k.schema===E&&k.table===C&&k.filter===S)v.push(Object.assign(Object.assign({},b),{id:k.id}));else{this.unsubscribe(),this.state=Qs.errored,s==null||s(xl.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,s&&s(xl.SUBSCRIBED);return}}).receive("error",y=>{this.state=Qs.errored,s==null||s(xl.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(y).join(", ")||"error")))}).receive("timeout",()=>{s==null||s(xl.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(s,a={}){return await this.send({type:"presence",event:"track",payload:s},a.timeout||this.timeout)}async untrack(s={}){return await this.send({type:"presence",event:"untrack"},s)}on(s,a,r){return this.state===Qs.joined&&s===qo.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(s,a,r)}async send(s,a={}){var r,l;if(!this._canPush()&&s.type==="broadcast"){const{event:n,payload:i}=s,d={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:i,private:this.private}]})};try{const x=await this._fetchWithTimeout(this.broadcastEndpointURL,d,(r=a.timeout)!==null&&r!==void 0?r:this.timeout);return await((l=x.body)===null||l===void 0?void 0:l.cancel()),x.ok?"ok":"error"}catch(x){return x.name==="AbortError"?"timed out":"error"}}else return new Promise(n=>{var i,c,d;const x=this._push(s.type,s,a.timeout||this.timeout);s.type==="broadcast"&&!(!((d=(c=(i=this.params)===null||i===void 0?void 0:i.config)===null||c===void 0?void 0:c.broadcast)===null||d===void 0)&&d.ack)&&n("ok"),x.receive("ok",()=>n("ok")),x.receive("error",()=>n("error")),x.receive("timeout",()=>n("timed out"))})}updateJoinPayload(s){this.joinPush.updatePayload(s)}unsubscribe(s=this.timeout){this.state=Qs.leaving;const a=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Tr.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(l=>{r=new mx(this,Tr.leave,{},s),r.receive("ok",()=>{a(),l("ok")}).receive("timeout",()=>{a(),l("timed out")}).receive("error",()=>{l("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(s=>s.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Qs.closed,this.bindings={}}async _fetchWithTimeout(s,a,r){const l=new AbortController,n=setTimeout(()=>l.abort(),r),i=await this.socket.fetch(s,Object.assign(Object.assign({},a),{signal:l.signal}));return clearTimeout(n),i}_push(s,a,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${s}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let l=new mx(this,s,a,r);return this._canPush()?l.send():this._addToPushBuffer(l),l}_addToPushBuffer(s){if(s.startTimeout(),this.pushBuffer.push(s),this.pushBuffer.length>Vw){const a=this.pushBuffer.shift();a&&(a.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload))}}_onMessage(s,a,r){return a}_isMember(s){return this.topic===s}_joinRef(){return this.joinPush.ref}_trigger(s,a,r){var l,n;const i=s.toLocaleLowerCase(),{close:c,error:d,leave:x,join:m}=Tr;if(r&&[c,d,x,m].indexOf(i)>=0&&r!==this._joinRef())return;let f=this._onMessage(i,a,r);if(a&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(l=this.bindings.postgres_changes)===null||l===void 0||l.filter(y=>{var g,w,N;return((g=y.filter)===null||g===void 0?void 0:g.event)==="*"||((N=(w=y.filter)===null||w===void 0?void 0:w.event)===null||N===void 0?void 0:N.toLocaleLowerCase())===i}).map(y=>y.callback(f,r)):(n=this.bindings[i])===null||n===void 0||n.filter(y=>{var g,w,N,v,j,b;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in y){const p=y.id,E=(g=y.filter)===null||g===void 0?void 0:g.event;return p&&((w=a.ids)===null||w===void 0?void 0:w.includes(p))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((N=a.data)===null||N===void 0?void 0:N.type.toLocaleLowerCase()))}else{const p=(j=(v=y==null?void 0:y.filter)===null||v===void 0?void 0:v.event)===null||j===void 0?void 0:j.toLocaleLowerCase();return p==="*"||p===((b=a==null?void 0:a.event)===null||b===void 0?void 0:b.toLocaleLowerCase())}else return y.type.toLocaleLowerCase()===i}).map(y=>{if(typeof f=="object"&&"ids"in f){const g=f.data,{schema:w,table:N,commit_timestamp:v,type:j,errors:b}=g;f=Object.assign(Object.assign({},{schema:w,table:N,commit_timestamp:v,eventType:j,new:{},old:{},errors:b}),this._getPayloadRecords(g))}y.callback(f,r)}
864)}_isClosed(){return this.state===Qs.closed}_isJoined(){return this.state===Qs.joined}_isJoining(){return this.state===Qs.joining}_isLeaving(){return this.state===Qs.leaving}_replyEventName(s){return`chan_reply_${s}`}_on(s,a,r){const l=s.toLocaleLowerCase(),n={type:l,filter:a,callback:r};return this.bindings[l]?this.bindings[l].push(n):this.bindings[l]=[n],this}_off(s,a){const r=s.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(l=>{var n;return!(((n=l.type)===null||n===void 0?void 0:n.toLocaleLowerCase())===r&&nh.isEqual(l.filter,a))})),this}static isEqual(s,a){if(Object.keys(s).length!==Object.keys(a).length)return!1;for(const r in s)if(s[r]!==a[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(s){this._on(Tr.close,{},s)}_onError(s){this._on(Tr.error,{},a=>s(a))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(s=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Qs.joining,this.joinPush.resend(s))}_getPayloadRecords(s){const a={new:{},old:{}};return(s.type==="INSERT"||s.type==="UPDATE")&&(a.new=Sp(s.columns,s.record)),(s.type==="UPDATE"||s.type==="DELETE")&&(a.old=Sp(s.columns,s.old_record)),a}}const xx=()=>{},Qc={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},s2=[1e3,2e3,5e3,1e4],a2=1e4,r2=` 865 addEventListener("message", (e) => { 866 if (e.data.event === "start") { 867 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 868 } 869 });`;class l2{constructor(s,a){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=J0,this.transport=null,this.heartbeatIntervalMs=Qc.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=xx,this.ref=0,this.reconnectTimer=null,this.logger=xx,this.conn=null,this.sendBuffer=[],this.serializer=new Yw,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=l=>{let n;return l?n=l:typeof fetch>"u"?n=(...i)=>_s(async()=>{const{default:c}=await Promise.resolve().then(()=>Zi);return{default:c}},void 0).then(({default:c})=>c(...i)).catch(c=>{throw new Error(`Failed to load @supabase/node-fetch: ${c.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):n=fetch,(...i)=>n(...i)},!(!((r=a==null?void 0:a.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=a.params.apikey,this.endPoint=`${s}/${W0.websocket}`,this.httpEndpoint=Py(s),this._initializeOptions(a),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(a==null?void 0:a.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=qw.createWebSocket(this.endpointURL())}catch(s){this._setConnectionState("disconnected");const a=s.message;throw a.includes("Node.js")?new Error(`${a} 870 871To use Realtime in Node.js, you need to provide a WebSocket implementation: 872 873Option 1: Use Node.js 22+ which has native WebSocket support 874Option 2: Install and provide the "ws" package: 875 876 npm install ws 877 878 import ws from "ws" 879 const client = new RealtimeClient(url, { 880 ...options, 881 transport: ws 882 })`):new Error(`WebSocket not available: ${a}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:Ww}))}disconnect(s,a){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},s?this.conn.close(s,a??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(s){const a=await s.unsubscribe();return this.channels.length===0&&this.disconnect(),a}async removeAllChannels(){const s=await Promise.all(this.channels.map(a=>a.unsubscribe()));return this.channels=[],this.disconnect(),s}log(s,a,r){this.logger(s,a,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Bo.connecting:return Fn.Connecting;case Bo.open:return Fn.Open;case Bo.closing:return Fn.Closing;default:return Fn.Closed}}isConnected(){return this.connectionState()===Fn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}
882channel(s,a={config:{}}){const r=`realtime:${s}`,l=this.getChannels().find(n=>n.topic===r);if(l)return l;{const n=new nh(`realtime:${s}`,a,this);return this.channels.push(n),n}}push(s){const{topic:a,event:r,payload:l,ref:n}=s,i=()=>{this.encode(s,c=>{var d;(d=this.conn)===null||d===void 0||d.send(c)})};this.log("push",`${a} ${r} (${n})`,l),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(s=null){this._authPromise=this._performAuth(s);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var s;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(a){this.log("error","error in heartbeat callback",a)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(a){this.log("error","error in heartbeat callback",a)}this._wasManualDisconnect=!1,(s=this.conn)===null||s===void 0||s.close(Hw,"heartbeat timeout"),setTimeout(()=>{var a;this.isConnected()||(a=this.reconnectTimer)===null||a===void 0||a.scheduleTimeout()},Qc.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(a){this.log("error","error in heartbeat callback",a)}this._setAuthSafely("heartbeat")}onHeartbeat(s){this.heartbeatCallback=s}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(s=>s()),this.sendBuffer=[])}_makeRef(){let s=this.ref+1;return s===this.ref?this.ref=0:this.ref=s,this.ref.toString()}_leaveOpenTopic(s){let a=this.channels.find(r=>r.topic===s&&(r._isJoined()||r._isJoining()));a&&(this.log("transport",`leaving duplicate topic "${s}"`),a.unsubscribe())}_remove(s){this.channels=this.channels.filter(a=>a.topic!==s.topic)}_onConnMessage(s){this.decode(s.data,a=>{if(a.topic==="phoenix"&&a.event==="phx_reply")try{this.heartbeatCallback(a.payload.status==="ok"?"ok":"error")}catch(x){this.log("error","error in heartbeat callback",x)}a.ref&&a.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:l,payload:n,ref:i}=a,c=i?`(${i})`:"",d=n.status||"";this.log("receive",`${d} ${r} ${l} ${c}`.trim(),n),this.channels.filter(x=>x._isMember(r)).forEach(x=>x._trigger(l,n,i)),this._triggerStateCallbacks("message",a)})}_clearTimer(s){var a;s==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):s==="reconnect"&&((a=this.reconnectTimer)===null||a===void 0||a.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=s=>this._onConnError(s),this.conn.onmessage=s=>this._onConnMessage(s),this.conn.onclose=s=>this._onConnClose(s))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(s=>s.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const s=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(s),this.workerRef.onerror=a=>{this.log("worker","worker error",a.message),this.workerRef.terminate()},this.workerRef.onmessage=a=>{a.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(s){var a;this._setConnectionState("disconnected"),this.log("transport","close",s
882),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(a=this.reconnectTimer)===null||a===void 0||a.scheduleTimeout(),this._triggerStateCallbacks("close",s)}_onConnError(s){this._setConnectionState("disconnected"),this.log("transport",`${s}`),this._triggerChanError(),this._triggerStateCallbacks("error",s)}_triggerChanError(){this.channels.forEach(s=>s._trigger(Tr.error))}_appendParams(s,a){if(Object.keys(a).length===0)return s;const r=s.match(/\?/)?"&":"?",l=new URLSearchParams(a);return`${s}${r}${l}`}_workerObjectUrl(s){let a;if(s)a=s;else{const r=new Blob([r2],{type:"application/javascript"});a=URL.createObjectURL(r)}return a}_setConnectionState(s,a=!1){this._connectionState=s,s==="connecting"?this._wasManualDisconnect=!1:s==="disconnecting"&&(this._wasManualDisconnect=a)}async _performAuth(s=null){let a;s?a=s:this.accessToken?a=await this.accessToken():a=this.accessTokenValue,this.accessTokenValue!=a&&(this.accessTokenValue=a,this.channels.forEach(r=>{const l={access_token:a,version:Jw};a&&r.updateJoinPayload(l),r.joinedOnce&&r._isJoined()&&r._push(Tr.access_token,{access_token:a})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(s="general"){this.setAuth().catch(a=>{this.log("error",`error setting auth in ${s}`,a)})}_triggerStateCallbacks(s,a){try{this.stateChangeCallbacks[s].forEach(r=>{try{r(a)}catch(l){this.log("error",`error in ${s} callback`,l)}})}catch(r){this.log("error",`error triggering ${s} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new Iy(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Qc.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(s){var a,r,l,n,i,c,d,x,m;if(this.transport=(a=s==null?void 0:s.transport)!==null&&a!==void 0?a:null,this.timeout=(r=s==null?void 0:s.timeout)!==null&&r!==void 0?r:J0,this.heartbeatIntervalMs=(l=s==null?void 0:s.heartbeatIntervalMs)!==null&&l!==void 0?l:Qc.HEARTBEAT_INTERVAL,this.worker=(n=s==null?void 0:s.worker)!==null&&n!==void 0?n:!1,this.accessToken=(i=s==null?void 0:s.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(c=s==null?void 0:s.heartbeatCallback)!==null&&c!==void 0?c:xx,s!=null&&s.params&&(this.params=s.params),s!=null&&s.logger&&(this.logger=s.logger),(s!=null&&s.logLevel||s!=null&&s.log_level)&&(this.logLevel=s.logLevel||s.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(d=s==null?void 0:s.reconnectAfterMs)!==null&&d!==void 0?d:h=>s2[h-1]||a2,this.encode=(x=s==null?void 0:s.encode)!==null&&x!==void 0?x:(h,f)=>f(JSON.stringify(h)),this.decode=(m=s==null?void 0:s.decode)!==null&&m!==void 0?m:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=s==null?void 0:s.workerUrl}}}class ih extends Error{constructor(s){super(s),this.__isStorageError=!0,this.name="StorageError"}}function Zs(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class n2 extends ih{constructor(s,a,r){super(s),this.name="StorageApiError",this.status=a,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class V0 extends ih{constructor(s,a){super(s),this.name="StorageUnknownError",this.originalError=a}}var i2=function(t,s,a,r){function l(n){return n instanceof a?n:new a(function(i){i(n)})}return new(a||(a=Promise))(function(n,i){function c(m){try{x(r.next(m))}catch(h){i(h)}}function d(m){try{x(r.throw(m))}catch(h){i(h)}}function x(m){m.done?n(m.value):l(m.value).then(c,d)}x((r=r.apply(t,s||[])).next())})};const Ay=t=>{let s;return t?s=t:typeof fetch>"u"?s=(...a)=>_s(async()=>{const{default:r}=await Promise.resolve().then(()=>Zi);return{default:r}},void 0).then(({default:r})=>r(...a)):s=fetch,(...a)=>s(...a)},o2=()=>i2(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield _s(()=>Promise.resolve().then(()=>Zi),void 0)).Response:Response}),Y0=t=>{if(Array.isArray(t))return t.map(a=>Y0(a));if(typeof t=="function"||t!==Object(t))return t;const s={};return Object.entries(t).forEach(([a,r])=>{const l=a.replace(/([-_][a-z])/gi,n=>n.toUpperCase().replace(/[-_]/g,""));s[l]=Y0(r)}),s},c2=t=>{if(typeof t!="object"||t===null)return!1;const s=Object.getPrototypeOf(t);
882return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};var ti=function(t,s,a,r){function l(n){return n instanceof a?n:new a(function(i){i(n)})}return new(a||(a=Promise))(function(n,i){function c(m){try{x(r.next(m))}catch(h){i(h)}}function d(m){try{x(r.throw(m))}catch(h){i(h)}}function x(m){m.done?n(m.value):l(m.value).then(c,d)}x((r=r.apply(t,s||[])).next())})};const ux=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),d2=(t,s,a)=>ti(void 0,void 0,void 0,function*(){const r=yield o2();t instanceof r&&!(a!=null&&a.noResolveJson)?t.json().then(l=>{const n=t.status||500,i=(l==null?void 0:l.statusCode)||n+"";s(new n2(ux(l),n,i))}).catch(l=>{s(new V0(ux(l),l))}):s(new V0(ux(t),t))}),m2=(t,s,a,r)=>{const l={method:t,headers:(s==null?void 0:s.headers)||{}};return t==="GET"||!r?l:(c2(r)?(l.headers=Object.assign({"Content-Type":"application/json"},s==null?void 0:s.headers),l.body=JSON.stringify(r)):l.body=r,s!=null&&s.duplex&&(l.duplex=s.duplex),Object.assign(Object.assign({},l),a))};function bc(t,s,a,r,l,n){return ti(this,void 0,void 0,function*(){return new Promise((i,c)=>{t(a,m2(s,r,l,n)).then(d=>{if(!d.ok)throw d;return r!=null&&r.noResolveJson?d:d.json()}).then(d=>i(d)).catch(d=>d2(d,c,r))})})}function nm(t,s,a,r){return ti(this,void 0,void 0,function*(){return bc(t,"GET",s,a,r)})}function Vr(t,s,a,r,l){return ti(this,void 0,void 0,function*(){return bc(t,"POST",s,r,l,a)})}function X0(t,s,a,r,l){return ti(this,void 0,void 0,function*(){return bc(t,"PUT",s,r,l,a)})}function x2(t,s,a,r){return ti(this,void 0,void 0,function*(){return bc(t,"HEAD",s,Object.assign(Object.assign({},a),{noResolveJson:!0}),r)})}function My(t,s,a,r,l){return ti(this,void 0,void 0,function*(){return bc(t,"DELETE",s,r,l,a)})}var _a=function(t,s,a,r){function l(n){return n instanceof a?n:new a(function(i){i(n)})}return new(a||(a=Promise))(function(n,i){function c(m){try{x(r.next(m))}catch(h){i(h)}}function d(m){try{x(r.throw(m))}catch(h){i(h)}}function x(m){m.done?n(m.value):l(m.value).then(c,d)}x((r=r.apply(t,s||[])).next())})};const u2={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Tp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class h2{constructor(s,a={},r,l){this.shouldThrowOnError=!1,this.url=s,this.headers=a,this.bucketId=r,this.fetch=Ay(l)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(s,a,r,l){return _a(this,void 0,void 0,function*(){try{let n;const i=Object.assign(Object.assign({},Tp),l);let c=Object.assign(Object.assign({},this.headers),s==="POST"&&{"x-upsert":String(i.upsert)});const d=i.metadata;typeof Blob<"u"&&r instanceof Blob?(n=new FormData,n.append("cacheControl",i.cacheControl),d&&n.append("metadata",this.encodeMetadata(d)),n.append("",r)):typeof FormData<"u"&&r instanceof FormData?(n=r,n.append("cacheControl",i.cacheControl),d&&n.append("metadata",this.encodeMetadata(d))):(n=r,c["cache-control"]=`max-age=${i.cacheControl}`,c["content-type"]=i.contentType,d&&(c["x-metadata"]=this.toBase64(this.encodeMetadata(d)))),l!=null&&l.headers&&(c=Object.assign(Object.assign({},c),l.headers));const x=this._removeEmptyFolders(a),m=this._getFinalPath(x),h=yield(s=="PUT"?X0:Vr)(this.fetch,`${this.url}/object/${m}`,n,Object.assign({headers:c},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{data:{path:x,id:h.Id,fullPath:h.Key},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Zs(n))return{data:null,error:n};throw n}})}upload(s,a,r){return _a(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",s,a,r)})}uploadToSignedUrl(s,a,r,l){return _a(this,void 0,void 0,function*(){const n=this._removeEmptyFolders(s),i=this._getFinalPath(n),c=new URL(this.url+`/object/upload/sign/${i}`);c.searchParams.set("token",a);try{let d;const x=Object.assign({upsert:Tp.upsert},l),m=Object.assign(Object.assign({},this.headers),{"x-upsert":String(x.upsert)});typeof Blob<"u"&&r instanceof Blob?(d=new FormData,d.append("cacheControl",x.cacheControl),d.append("",r)):typeof FormData<"u"&&r instanceof FormData?(d=r,d.append("cacheControl",x.cacheControl)):(d=r,m["cache-control"]=`max-age=${x.cacheControl}`,m["content-type"]=x.contentType);const h=yield X0(this.fetch,c.toString(),d,{headers:m});return{data:{path:n,fullPath:h.Key},error:null}}catch(d){if(this.shouldThrowOnError)throw d;if(Zs(d))return{data:null,error:d};throw d}})}createSignedUploadUrl(s,a){return _a(this,void 0,void 0,function*(){try{let r=this._getFinalPath(s);const l=Object.assign({},this.headers);a!=null&&a.upsert&&(l["x-upsert"]="true");const n=yield Vr(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:l}),i=new URL(this.url+n.url),c=i.searchParams.get("token");if(!c)throw new ih("No token returned by API");return{data:{signedUrl:i.toString(),path:s,token:c},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Zs(r))return{data:null,error:r};throw r}})}update(s,a,r){return _a(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",s,a,r)})}move(s,a,r){return _a(this,void 0,void 0,function*(){try{return{data:yield Vr(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:s,destinationKey:a,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(Zs(l))return{data:null,error:l};throw l}})}copy(s,a,r){return _a(this,void 0,void 0,function*(){try{return{data:{path:(yield Vr(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:s,destinationKey:a,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(Zs(l))return{data:null,error:l};throw l}})}createSignedUrl(s,a,r){return _a(this,void 0,void 0,function*(){try{let l=this._getFinalPath(s),n=yield Vr(this.fetch,`${this.url}/object/sign/${l}
882`,Object.assign({expiresIn:a},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return n={signedUrl:encodeURI(`${this.url}${n.signedURL}${i}`)},{data:n,error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(Zs(l))return{data:null,error:l};throw l}})}createSignedUrls(s,a,r){return _a(this,void 0,void 0,function*(){try{const l=yield Vr(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:a,paths:s},{headers:this.headers}),n=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:l.map(i=>Object.assign(Object.assign({},i),{signedUrl:i.signedURL?encodeURI(`${this.url}${i.signedURL}${n}`):null})),error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(Zs(l))return{data:null,error:l};throw l}})}download(s,a){return _a(this,void 0,void 0,function*(){const l=typeof(a==null?void 0:a.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((a==null?void 0:a.transform)||{}),i=n?`?${n}`:"";try{const c=this._getFinalPath(s);return{data:yield(yield nm(this.fetch,`${this.url}/${l}/${c}${i}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(c){if(this.shouldThrowOnError)throw c;if(Zs(c))return{data:null,error:c};throw c}})}info(s){return _a(this,void 0,void 0,function*(){const a=this._getFinalPath(s);try{const r=yield nm(this.fetch,`${this.url}/object/info/${a}`,{headers:this.headers});return{data:Y0(r),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Zs(r))return{data:null,error:r};throw r}})}exists(s){return _a(this,void 0,void 0,function*(){const a=this._getFinalPath(s);try{return yield x2(this.fetch,`${this.url}/object/${a}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Zs(r)&&r instanceof V0){const l=r.originalError;if([400,404].includes(l==null?void 0:l.status))return{data:!1,error:r}}throw r}})}getPublicUrl(s,a){const r=this._getFinalPath(s),l=[],n=a!=null&&a.download?`download=${a.download===!0?"":a.download}`:"";n!==""&&l.push(n);const c=typeof(a==null?void 0:a.transform)<"u"?"render/image":"object",d=this.transformOptsToQueryString((a==null?void 0:a.transform)||{});d!==""&&l.push(d);let x=l.join("&");return x!==""&&(x=`?${x}`),{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${r}${x}`)}}}remove(s){return _a(this,void 0,void 0,function*(){try{return{data:yield My(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:s},{headers:this.headers}),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Zs(a))return{data:null,error:a};throw a}})}list(s,a,r){return _a(this,void 0,void 0,function*(){try{const l=Object.assign(Object.assign(Object.assign({},u2),a),{prefix:s||""});return{data:yield Vr(this.fetch,`${this.url}/object/list/${this.bucketId}`,l,{headers:this.headers},r),error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(Zs(l))return{data:null,error:l};throw l}})}listV2(s,a){return _a(this,void 0,void 0,function*(){try{const r=Object.assign({},s);return{data:yield Vr(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},a),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Zs(r))return{data:null,error:r};throw r}})}encodeMetadata(s){return JSON.stringify(s)}toBase64(s){return typeof Buffer<"u"?Buffer.from(s).toString("base64"):btoa(s)}_getFinalPath(s){return`${this.bucketId}/${s.replace(/^\/+/,"")}`}_removeEmptyFolders(s){return s.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(s){const a=[];return s.width&&a.push(`width=${s.width}`),s.height&&a.push(`height=${s.height}`),s.resize&&a.push(`resize=${s.resize}`),s.format&&a.push(`format=${s.format}`),s.quality&&a.push(`quality=${s.quality}`),a.join("&")}}const p2="2.12.1",f2={"X-Client-Info":`storage-js/${p2}`};var ri=function(t,s,a,r){function l(n){return n instanceof a?n:new a(function(i){i(n)})}return new(a||(a=Promise))(function(n,i){function c(m){try{x(r.next(m))}catch(h){i(h)}}function d(m){try{x(r.throw(m))}catch(h){i(h)}}function x(m){m.done?n(m.value):l(m.value).then(c,d)}x((r=r.apply(t,s||[])).next())})};class g2{constructor(s,a={},r,l){this.shouldThrowOnError=!1;const n=new URL(s);l!=null&&l.useNewHostname&&/supabase\.(co|in|red)$/.test(n.hostname)&&!n.hostname.includes("storage.supabase.")&&(n.hostname=n.hostname.replace("supabase.","storage.supabase.")),this.url=n.href,this.headers=Object.assign(Object.assign({},f2),a),this.fetch=Ay(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(){return ri(this,void 0,void 0,function*(){try{return{data:yield nm(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Zs(s))return{data:null,error:s};throw s}})}getBucket(s){return ri(this,void 0,void 0,function*(){try{return{data:yield nm(this.fetch,`${this.url}/bucket/${s}`,{headers:this.headers}),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Zs(a))return{data:null,error:a};throw a}})}createBucket(s,a={public:!1}){return ri(this,void 0,void 0,function*(){try{return{data:yield Vr(this.fetch,`${this.url}/bucket`,{id:s,name:s,type:a.type,public:a.public,file_size_limit:a.fileSizeLimit,allowed_mime_types:a.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Zs(r))return{data:null,error:r};throw r}})}updateBucket(s,a){return ri(this,void 0,void 0,function*(){try{return{data:yield X0(this.fetch,`${this.url}/bucket/${s}`,{id:s,name:s,public:a.public,file_size_limit:a.fileSizeLimit,allowed_mime_types:a.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Zs(r))return{data:null,error:r};throw r}})}emptyBucket(s){return ri(this,void 0,void 0,function*(){try{return{data:yield Vr(this.fetch,`${this.url}/bucket/${s}/empty`,{},{headers:this.headers}),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Zs(a))return{data:null,error:a};throw a}})}deleteBucket(s){return ri(this,void 0,void 0,function*(){try{return{data:yield My(this.fetch,`${this.url}/bucket/${s}`,{},{headers:this.headers}),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Zs(a))return{data:null,error:a};throw a}})}}class b2 extends g2{constructor(s,a={},r,l){super(s,a,r,l)}from(s){return new h2(this.url,this.headers,s,this.fetch)}}const y2="2.57.4";let So="";typeof Deno<"u"?So="deno":typeof document<"u"?So="web":typeof navigator<"u"&&navigator.product==="ReactNative"?So="react-native":So="node";const j2={"X-Client-Info":`supabase-js-${So}/${y2}`},v2={headers:j2},w2={schema:"public"},N2={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},k2={};var _2=function(t,s,a,r){function l(n){return n instanceof a?n:new a(function(i){i(n)})}return new(a||(a=Promise))(function(n,i){function c(m){try{x(r.next(m))}catch(h){i(h)}}function d(m){try{x(r.throw(m))}catch(h){i(h)}}function x(m){m.done?n(m.value):l(m.value).then(c,d)}x((r=r.apply(t,s||[])).next())})};const S2=t=>{let s;return t?s=t:typeof fetch>"u"?s=gy:s=fetch,(...a)=>s(...a)},C2=()=>typeof Headers>"u"?by:Headers,I2=(t,s,a)=>{const r=S2(a),l=C2();return(n,i)=>_2(void 0,void 0,void 0,function*(){var c;const d=(c=yield s())!==null&&c!==void 0?c:t;let x=new l(i==null?void 0:i.headers);return x.has("apikey")||x.set("apikey",t),x.has("Authorization")||x.set("Authorization",`Bearer ${d}`),r(n,Object.assign(Object.assign({},i),{headers:x}))})};var T2=function(t,s,a,r){function l(n){return n instanceof a?n:new a(function(i){i(n)})}return new(a||(a=Promise))(function(n,i){function c(m){try{x(r.next(m))}catch(h){i(h)}}function d(m){try{x(r.throw(m))}catch(h){i(h)}}function x(m){m.done?n(m.value):l(m.value).then(c,d)}x((r=r.apply(t,s||[])).next())})};function P2(t){return t.endsWith("/")?t:t+"/"}function A2(t,s){var a,r;const{db:l,auth:n,realtime:i,global:c}=t,{db:d,auth:x,realtime:m,global:h}=s,f={db:Object.assign(Object.assign({},d),l),auth:Object.assign(Object.assign({},x),n),realtime:Object.assign(Object.assign({},m),i),storage:{},global:Object.assign(Object.assign(Object.assign({},h),c),{headers:Object.assign(Object.assign({},(a=h==null?void 0:h.headers)!==null&&a!==void 0?a:{}),(r=c==null?void 0:c.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>T2(this,void 0,void 0,function*(){return""})};return t.accessToken?f.accessToken=t.accessToken:delete f.accessToken,f}function M2(t){const s=t==null?void 0:t.trim();if(!s)throw new Error("supabaseUrl is required.");
882if(!s.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(P2(s))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const Ey="2.71.1",mi=30*1e3,K0=3,hx=K0*mi,E2="http://localhost:9999",D2="supabase.auth.token",R2={"X-Client-Info":`gotrue-js/${Ey}`},Q0="X-Supabase-Api-Version",Dy={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},F2=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,O2=10*60*1e3;class oh extends Error{constructor(s,a,r){super(s),this.__isAuthError=!0,this.name="AuthError",this.status=a,this.code=r}}function Ot(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class z2 extends oh{constructor(s,a,r){super(s,a,r),this.name="AuthApiError",this.status=a,this.code=r}}function $2(t){return Ot(t)&&t.name==="AuthApiError"}class Ry extends oh{constructor(s,a){super(s),this.name="AuthUnknownError",this.originalError=a}}class wn extends oh{constructor(s,a,r,l){super(s,r,l),this.name=a,this.status=r}}class Yl extends wn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function L2(t){return Ot(t)&&t.name==="AuthSessionMissingError"}class Zc extends wn{constructor(){super("Auth session or user missing","AuthInvalidToken
882ResponseError",500,void 0)}}class ed extends wn{constructor(s){super(s,"AuthInvalidCredentialsError",400,void 0)}}class td extends wn{constructor(s,a=null){super(s,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=a}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function B2(t){return Ot(t)&&t.name==="AuthImplicitGrantRedirectError"}class Pp extends wn{constructor(s,a=null){super(s,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=a}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Z0 extends wn{constructor(s,a){super(s,"AuthRetryableFetchError",a,void 0)}}function px(t){return Ot(t)&&t.name==="AuthRetryableFetchError"}class Ap extends wn{constructor(s,a,r){super(s,"AuthWeakPasswordError",a,"weak_password"),this.reasons=r}}class eu extends wn{constructor(s){super(s,"AuthInvalidJwtError",400,"invalid_jwt")}}const im="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Mp=` 883\r=`.split(""),U2=(()=>{const t=new Array(128);for(let s=0;s<t.length;s+=1)t[s]=-1;for(let s=0;s<Mp.length;s+=1)t[Mp[s].charCodeAt(0)]=-2;for(let s=0;s<im.length;s+=1)t[im[s].charCodeAt(0)]=s;return t})();function Ep(t,s,a){if(t!==null)for(s.queue=s.queue<<8|t,s.queuedBits+=8;s.queuedBits>=6;){const r=s.queue>>s.queuedBits-6&63;a(im[r]),s.queuedBits-=6}else if(s.queuedBits>0)for(s.queue=s.queue<<6-s.queuedBits,s.queuedBits=6;s.queuedBits>=6;){const r=s.queue>>s.queuedBits-6&63;a(im[r]),s.queuedBits-=6}}function Fy(t,s,a){const r=U2[t];if(r>-1)for(s.queue=s.queue<<6|r,s.queuedBits+=6;s.queuedBits>=8;)a(s.queue>>s.queuedBits-8&255),s.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Dp(t){const s=[],a=i=>{s.push(String.fromCodePoint(i))},r={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},n=i=>{J2(i,r,a)};for(let i=0;i<t.length;i+=1)Fy(t.charCodeAt(i),l,n);return s.join("")}function q2(t,s){if(t<=127){s(t);return}else if(t<=2047){s(192|t>>6),s(128|t&63);return}else if(t<=65535){s(224|t>>12),s(128|t>>6&63),s(128|t&63);return}else if(t<=1114111){s(240|t>>18),s(128|t>>12&63),s(128|t>>6&63),s(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function G2(t,s){for(let a=0;a<t.length;a+=1){let r=t.charCodeAt(a);if(r>55295&&r<=56319){const l=(r-55296)*1024&65535;r=(t.charCodeAt(a+1)-56320&65535|l)+65536,a+=1}q2(r,s)}}function J2(t,s,a){if(s.utf8seq===0){if(t<=127){a(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){s.utf8seq=r;break}if(s.utf8seq===2)s.codepoint=t&31;else if(s.utf8seq===3)s.codepoint=t&15;else if(s.utf8seq===4)s.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");s.utf8seq-=1}else if(s.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");s.codepoint=s.codepoint<<6|t&63,s.utf8seq-=1,s.utf8seq===0&&a(s.codepoint)}}function W2(t){const s=[],a={queue:0,queuedBits:0},r=l=>{s.push(l)};for(let l=0;l<t.length;l+=1)Fy(t.charCodeAt(l),a,r);return new Uint8Array(s)}function H2(t){const s=[];return G2(t,a=>s.push(a)),new Uint8Array(s)}function V2(t){const s=[],a={queue:0,queuedBits:0},r=l=>{s.push(l)};return t.forEach(l=>Ep(l,a,r)),Ep(null,a,r),s.join("")}function Y2(t){return Math.round(Date.now()/1e3)+t}function X2(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const s=Math.random()*16|0;return(t=="x"?s:s&3|8).toString(16)})}const Sr=()=>typeof window<"u"&&typeof document<"u",Pn={tested:!1,writable:!1},Oy=()=>{if(!Sr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Pn.tested)return Pn.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Pn.tested=!0,Pn.writable=!0}catch{Pn.tested=!0,Pn.writable=!1}return Pn.writable};function K2(t){const s={},a=new URL(t);if(a.hash&&a.hash[0]==="#")try{new URLSearchParams(a.hash.substring(1)).forEach((l,n)=>{s[n]=l})}catch{}return a.searchParams.forEach((r,l)=>{s[l]=r}),s}const zy=t=>{let s;return t?s=t:typeof fetch>"u"?s=(...a)=>_s(async()=>{const{default:r}=await Promise.resolve().then(()=>Zi);return{default:r}},void 0).then(({default:r})=>r(...a)):s=fetch,(...a)=>s(...a)},Q2=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",xi=async(t,s,a)=>{await t.setItem(s,JSON.stringify(a))},An=async(t,s)=>{const a=await t.getItem(s);if(!a)return null;try{return JSON.parse(a)}catch{return a}},Wl=async(t,s)=>{await t.removeItem(s)};class Em{constructor(){this.promise=new Em.promiseConstructor((s,a)=>{this.resolve=s,this.reject=a})}}Em.promiseConstructor=Promise;function fx(t){const s=t.split(".");if(s.length!==3)throw new eu("Invalid JWT structure");for(let r=0;r<s.length;r++)if(!F2.test(s[r]))throw new eu("JWT not in base64url format");return{header:JSON.parse(Dp(s[0])),payload:JSON.parse(Dp(s[1])),signature:W2(s[2]),raw:{header:s[0],payload:s[1]}}}async function Z2(t){return await new Promise(s=>{setTimeout(()=>s(null),t)})}function eN(t,s){return new Promise((r,l)=>{(async()=>{for(let n=0;n<1/0;n++)try{const i=await t(n);if(!s(n,null,i)){r(i);return}}catch(i){if(!s(n,i)){l(i);return}}})()})}function tN(t){return("0"+t.toString(16)).substr(-2)}function sN(){const s=new Uint32Array(56);if(typeof crypto>"u"){const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=a.length;let l="";for(let n=0;n<56;n++)l+=a.charAt(Math.floor(Math.random()*r));return l}return crypto.getRandomValues(s),Array.from(s,tN).join("")}async function aN(t){const a=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",a),l=new Uint8Array(r);return Array.from(l).map(n=>String.fromCharCode(n)).join("")}async function rN(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code
883challenge method will default to use plain instead of sha256."),t;const a=await aN(t);return btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function li(t,s,a=!1){const r=sN();let l=r;a&&(l+="/PASSWORD_RECOVERY"),await xi(t,`${s}-code-verifier`,l);const n=await rN(r);return[n,r===n?"plain":"s256"]}const lN=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function nN(t){const s=t.headers.get(Q0);if(!s||!s.match(lN))return null;try{return new Date(`${s}T00:00:00.0Z`)}catch{return null}}function iN(t){if(!t)throw new Error("Missing exp claim");const s=Math.floor(Date.now()/1e3);if(t<=s)throw new Error("JWT has expired")}function oN(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const cN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ni(t){if(!cN.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function gx(){const t={};return new Proxy(t,{get:(s,a)=>{if(a==="__isUserNotAvailableProxy")return!0;if(typeof a=="symbol"){const r=a.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${a}" property of the session object is not supported. Please use getUser() instead.`)},set:(s,a)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${a}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(s,a)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${a}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Rp(t){return JSON.parse(JSON.stringify(t))}var dN=function(t,s){var a={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&s.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(t);l<r.length;l++)s.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(t,r[l])&&(a[r[l]]=t[r[l]]);return a};const Dn=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),mN=[502,503,504];async function Fp(t){var s;if(!Q2(t))throw new Z0(Dn(t),0);if(mN.includes(t.status))throw new Z0(Dn(t),t.status);let a;try{a=await t.json()}catch(n){throw new Ry(Dn(n),n)}let r;const l=nN(t);if(l&&l.getTime()>=Dy["2024-01-01"].timestamp&&typeof a=="object"&&a&&typeof a.code=="string"?r=a.code:typeof a=="object"&&a&&typeof a.error_code=="string"&&(r=a.error_code),r){if(r==="weak_password")throw new Ap(Dn(a),t.status,((s=a.weak_password)===null||s===void 0?void 0:s.reasons)||[]);if(r==="session_not_found")throw new Yl}else if(typeof a=="object"&&a&&typeof a.weak_password=="object"&&a.weak_password&&Array.isArray(a.weak_password.reasons)&&a.weak_password.reasons.length&&a.weak_password.reasons.reduce((n,i)=>n&&typeof i=="string",!0))throw new Ap(Dn(a),t.status,a.weak_password.reasons);throw new z2(Dn(a),t.status||500,r)}const xN=(t,s,a,r)=>{const l={method:t,headers:(s==null?void 0:s.headers)||{}};return t==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},s==null?void 0:s.headers),l.body=JSON.stringify(r),Object.assign(Object.assign({},l),a))};async function Ut(t,s,a,r){var l;const n=Object.assign({},r==null?void 0:r.headers);n[Q0]||(n[Q0]=Dy["2024-01-01"].name),r!=null&&r.jwt&&(n.Authorization=`Bearer ${r.jwt}`);const i=(l=r==null?void 0:r.query)!==null&&l!==void 0?l:{};r!=null&&r.redirectTo&&(i.redirect_to=r.redirectTo);const c=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",d=await uN(t,s,a+c,{headers:n,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(d):{data:Object.assign({},d),error:null}}async function uN(t,s,a,r,l,n){const i=xN(s,r,l,n);let c;try{c=await t(a,Object.assign({},i))}catch(d){throw console.error(d),new Z0(Dn(d),0)}if(c.ok||await Fp(c),r!=null&&r.noResolveJson)return c;try{return await c.json()}catch(d){await Fp(d)}}function dl(t){var s;let a=null;gN(t)&&(a=Object.assign({},t),t.expires_at||(a.expires_at=Y2(t.expires_in)));const r=(s=t.user)!==null&&s!==void 0?s:t;return{data:{session:a,user:r},error:null}}function Op(t){const s=dl(t);return!s.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((a,r)=>a&&typeof r=="string",!0)&&(s.data.weak_password=t.weak_password),s}function en(t){var s;return{data:{user:(s=t.user)!==null&&s!==void 0?s:t},error:null}}function hN(t){return{data:t,error:null}}function pN(t){const{action_link:s,email_otp:a,hashed_token:r,redirect_to:l,verification_type:n}=t,i=dN(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),c={action_link:s,email_otp:a,hashed_token:r,redirect_to:l,verification_type:n},d=Object.assign({},i);return{data:{properties:c,user:d},error:null}}function fN(t){return t}function gN(t){return t.access_token&&t.refresh_token&&t.expires_in}const bx=["global","local","others"];var bN=function(t,s){var a={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&s.indexOf(r)<0&&(a[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(t);l<r.length;l++)s.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(t,r[l])&&(a[r[l]]=t[r[l]]);return a};class yN{constructor({url:s="",headers:a={},fetch:r}){this.url=s,this.headers=a,this.fetch=zy(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(s,a=bx[0]){if(bx.indexOf(a)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${bx.join(", ")}`);try{return await Ut(this.fetch,"POST",`${this.url}/logout?scope=${a}`,{headers:this.headers,jwt:s,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Ot(r))return{data:null,error:r};throw r}}async inviteUserByEmail(s,a={}){try{return await Ut(this.fetch,"POST",`${this.url}/invite`,{body:{email:s,data:a.data},headers:this.headers,redirectTo:a.redirectTo,xform:en})}catch(r){if(Ot(r))return{data:{user:null},error:r};throw r}}async generateLink(s){try{const{options:a}=s,r=bN(s,["options"]),l=Object.assign(Object.assign({},r),a);return"newEmail"in r&&(l.new_email=r==null?void 0:r.newEmail,delete l.newEmail),await Ut(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:pN,redirectTo:a==null?void 0:a.redirectTo})}catch(a){if(Ot(a))return{data:{properties:null,user:null},error:a};throw a}}async createUser(s){try{return await Ut(this.fetch,"POST",`${this.url}/admin/users`,{body:s,headers:this.headers,xform:en})}catch(a){if(Ot(a))return{data:{user:null},error:a};throw a}}async listUsers(s){var a,r,l,n,i,c,d;try{const x={nextPage:null,lastPage:0,total:0},m=await Ut(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(a=s==null?void 0:s.page)===null||a===void 0?void 0:a.toString())!==null&&r!==void 0?r:"",per_page:(n=(l=s==null?void 0:s.perPage)===null||l===void 0?void 0:l.toString())!==null&&n!==void 0?n:""},xform:fN});if(m.error)throw m.error;const h=await m.json(),f=(i=m.headers.get("x-total-count"))!==null&&i!==void 0?i:0,y=(d=(c=m.headers.get("link"))===null||c===void 0?void 0:c.split(","))!==null&&d!==void 0?d:[];return y.length>0&&(y.forEach(g=>{const w=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),N=JSON.parse(g.split(";")[1].split("=")[1]);x[`${N}Page`]=w}),x.total=parseInt(f)),{data:Object.assign(Object.assign({},h),x),error:null}}
883catch(x){if(Ot(x))return{data:{users:[]},error:x};throw x}}async getUserById(s){ni(s);try{return await Ut(this.fetch,"GET",`${this.url}/admin/users/${s}`,{headers:this.headers,xform:en})}catch(a){if(Ot(a))return{data:{user:null},error:a};throw a}}async updateUserById(s,a){ni(s);try{return await Ut(this.fetch,"PUT",`${this.url}/admin/users/${s}`,{body:a,headers:this.headers,xform:en})}catch(r){if(Ot(r))return{data:{user:null},error:r};throw r}}async deleteUser(s,a=!1){ni(s);try{return await Ut(this.fetch,"DELETE",`${this.url}/admin/users/${s}`,{headers:this.headers,body:{should_soft_delete:a},xform:en})}catch(r){if(Ot(r))return{data:{user:null},error:r};throw r}}async _listFactors(s){ni(s.userId);try{const{data:a,error:r}=await Ut(this.fetch,"GET",`${this.url}/admin/users/${s.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:a,error:r}}catch(a){if(Ot(a))return{data:null,error:a};throw a}}async _deleteFactor(s){ni(s.userId),ni(s.id);try{return{data:await Ut(this.fetch,"DELETE",`${this.url}/admin/users/${s.userId}/factors/${s.id}`,{headers:this.headers}),error:null}}catch(a){if(Ot(a))return{data:null,error:a};throw a}}}function zp(t={}){return{getItem:s=>t[s]||null,setItem:(s,a)=>{t[s]=a},removeItem:s=>{delete t[s]}}}function jN(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const ii={debug:!!(globalThis&&Oy()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class $y extends Error{constructor(s){super(s),this.isAcquireTimeout=!0}}class vN extends $y{}async function wN(t,s,a){ii.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,s);const r=new globalThis.AbortController;return s>0&&setTimeout(()=>{r.abort(),ii.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},s),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,s===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async l=>{if(l){ii.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,l.name);try{return await a()}finally{ii.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,l.name)}}else{if(s===0)throw ii.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new vN(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(ii.debug)try{const n=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(n,null," "))}catch(n){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",n)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await a()}}))}jN();const NN={url:E2,storageKey:D2,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:R2,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function $p(t,s,a){return await a()}const oi={};class dc{constructor(s){var a,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=dc.nextInstanceID,dc.nextInstanceID+=1,this.instanceID>0&&Sr()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const l=Object.assign(Object.assign({},NN),s);if(this.logDebugMessages=!!l.debug,typeof l.debug=="function"&&(this.logger=l.debug),this.persistSession=l.persistSession,this.storageKey=l.storageKey,this.autoRefreshToken=l.autoRefreshToken,this.admin=new yN({url:l.url,headers:l.headers,fetch:l.fetch}),this.url=l.url,this.headers=l.headers,this.fetch=zy(l.fetch),this.lock=l.lock||$p,this.detectSessionInUrl=l.detectSessionInUrl,this.flowType=l.flowType,this.hasCustomAuthorizationHeader=l.hasCu
883stomAuthorizationHeader,l.lock?this.lock=l.lock:Sr()&&(!((a=globalThis==null?void 0:globalThis.navigator)===null||a===void 0)&&a.locks)?this.lock=wN:this.lock=$p,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(l.storage?this.storage=l.storage:Oy()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=zp(this.memoryStorage)),l.userStorage&&(this.userStorage=l.userStorage)):(this.memoryStorage={},this.storage=zp(this.memoryStorage)),Sr()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(n){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",n)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async n=>{this._debug("received broadcast notification from other tab or client",n),await this._notifyAllSubscribers(n.data.event,n.data.session,!1)})}this.initialize()}get jwks(){var s,a;return(a=(s=oi[this.storageKey])===null||s===void 0?void 0:s.jwks)!==null&&a!==void 0?a:{keys:[]}}set jwks(s){oi[this.storageKey]=Object.assign(Object.assign({},oi[this.storageKey]),{jwks:s})}get jwks_cached_at(){var s,a;return(a=(s=oi[this.storageKey])===null||s===void 0?void 0:s.cachedAt)!==null&&a!==void 0?a:Number.MIN_SAFE_INTEGER}set jwks_cached_at(s){oi[this.storageKey]=Object.assign(Object.assign({},oi[this.storageKey]),{cachedAt:s})}_debug(...s){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${Ey}) ${new Date().toISOString()}`,...s),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var s;try{const a=K2(window.location.href);let r="none";if(this._isImplicitGrantCallback(a)?r="implicit":await this._isPKCECallback(a)&&(r="pkce"),Sr()&&this.detectSessionInUrl&&r!=="none"){const{data:l,error:n}=await this._getSessionFromURL(a,r);if(n){if(this._debug("#_initialize()","error detecting session from URL",n),B2(n)){const d=(s=n.details)===null||s===void 0?void 0:s.code;if(d==="identity_already_exists"||d==="identity_not_found"||d==="single_identity_not_deletable")return{error:n}}return await this._removeSession(),{error:n}}const{session:i,redirectType:c}=l;return this._debug("#_initialize()","detected session in URL",i,"redirect type",c),await this._saveSession(i),setTimeout(async()=>{c==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(a){return Ot(a)?{error:a}:{error:new Ry("Unexpected error during initialization",a)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(s){var a,r,l;try{const n=await Ut(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(a=s==null?void 0:s.options)===null||a===void 0?void 0:a.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(l=s==null?void 0:s.options)===null||l===void 0?void 0:l.captchaToken}},xform:dl}),{data:i,error:c}=n;if(c||!i)return{data:{user:null,session:null},error:c};const d=i.session,x=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",d)),{data:{user:x,session:d},error:null}}catch(n){if(Ot(n))return{data:{user:null,session:null},error:n};throw n}}async signUp(s){var a,r,l;try{let n;if("email"in s){const{email:m,password:h,options:f}=s;let y=null,g=null;this.flowType==="pkce"&&([y,g]=await li(this.storage,this.storageKey)),n=await Ut(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:m,password:h,data:(a=f==null?void 0:f.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:y,code_challenge_method:g},xform:dl})}else if("phone"in s){const{phone:m,password:h,options:f}=s;n=await Ut(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:m,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(l=f==null?void 0:f.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:dl})}else throw new ed("You must provide either an email or phone number and a password");const{data:i,error:c}=n;if(c||!i)return{data:{user:null,session:null},error:c};const d=i.session,x=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",d)),{data:{user:x,session:d},error:null}}catch(n){if(Ot(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithPassword(s){try{let a;if("email"in s){const{email:n,password:i,options:c}=s;a=await Ut(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:i,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken}},xform:Op})}else if("phone"in s){const{phone:n,password:i,options:c}=s;a=await Ut(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:i,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken}},xform:Op})}else throw new ed("You must provide either an email or phone number and a password");const{data:r,error:l}=a;return l?{data:{user:null,session:null},error:l}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Zc}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:l})}catch(a){if(Ot(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithOAuth(s){var a,r,l,n;return await this._handleProviderSignIn(s.provider,{redirectTo:(a=s.options)===null||a===void 0?void 0:a.redirectTo,scopes:(r=s.options)===null||r===void 0?void 0:r.scopes,queryParams:(l=s.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(n=s.options)===null||n===void 0?void 0:n.skipBrowserRedirect})}async exchangeCodeForSession(s){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(s))}async signInWithWeb3(s){const{chain:a}=s;if(a==="solana")return await this.signInWithSolana(s);throw new Error(`@supabase/auth-js: Unsupported chain "${a}"`)}async signInWithSolana(s){var a,r,l,n,i,c,d,x,m,h,f,y;let g,w;if("message"in s)g=s.message,w=s.signature;else{const{chain:N,wallet:v,statement:j,options:b}=s;let p;if(Sr())if(typeof v=="object")p=v;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))p=C.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");p=v}const E=new URL((a=b==null?void 0:b.url)!==null&&a!==void 0?a:window.location.href);if("signIn"in p&&p.signIn){const C=await p.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),j?{statement:j}:null));let S;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")S=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)S=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S&&"signature"in S&&(typeof S.signedMessage=="string"||S.signedMessage instanceof Uint8Array)&&S.signature instanceof Uint8Array)g=typeof S.signedMessage=="string"?S.signedMessage:new TextDecoder().decode(S.signedMessage),w=S.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in p)||typeof p.signMessage!="function"||!("publicKey"in p)||typeof p!="object"||!p.publicKey||!("toBase58"in p.publicKey)||typeof p.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${E.host} wants you to sign in with your Solana account:`,p.publicKey.toBase58(),...j?["",j,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(l=(r=b==null?void 0:b.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((n=b==null?void 0:b.signInWithSolana)===null||n===void 0)&&n.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((i=b==null?void 0:b.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((c=b==null?void 0:b.signInWithSolana)===null||c===void 0)&&c.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((d=b==null?void 0:b.signInWithSolana)===null||d===void 0)&&d.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((x=b==null?void 0:b.signInWithSolana)===null||x===void 0)&&x.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((h=(m=b==null?void 0:b.signInWithSolana)===null||m===void 0?void 0:m.resources)===null||h===void 0)&&h.length?["Resources",...b.signInWithSolana.resources.map(S=>`- ${S}`)]:[]].join(` 884`);const C=await p.signMessage(new TextEncoder().encode(g),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");w=C}}try{const{data:N,error:v}=await Ut(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:V2(w)},!((f=s.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(y=s.options)===null||y===void 0?void 0:y.captchaToken}}:null),xform:dl});if(v)throw v;return!N||!N.session||!N.user?{data:{user:null,session:null},error:new Zc}:(N.session&&(await this._saveSession(N.session),await this._notifyAllSubscribers("SIGNED_IN",N.session)),{data:Object.assign({},N),error:v})}catch(N){if(Ot(N))return{data:{user:null,session:null},error:N};throw N}}async _exchangeCodeForSession(s){const a=await An(this.storage,`${this.storageKey}-code-verifier`),[r,l]=(a??"").split("/");try{const{data:n,error:i}=await Ut(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:s,code_verifier:r},xform:dl});if(await Wl(this.storage,`${this.storageKey}-code-verifier`),i)throw i;return!n||!n.session||!n.user?{data:{user:null,session:null,redirectType:null},error:new Zc}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign(Object.assign({},n),{redirectType:l??null}),error:i})}catch(n){if(Ot(n))return{data:{user:null,session:null,redirectType:null},error:n};throw n}}async signInWithIdToken(s){try{const{options:a,provider:r,token:l,access_token:n,nonce:i}=s,c=await Ut(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:l,access_token:n,nonce:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:dl}),{data:d,error:x}=c;return x?{data:{user:null,session:null},error:x}:!d||!d.session||!d.user?{data:{user:null,session:null},error:new Zc}:(d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",d.session)),{data:d,error:x})}catch(a){if(Ot(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithOtp(s){var a,r,l,n,i;try{if("email"in s){const{email:c,options:d}=s;let x=null,m=null;this.flowType==="pkce"&&([x,m]=await li(this.storage,this.storageKey));const{error:h}=await Ut(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:c,data:(a=d==null?void 0:d.data)!==null&&a!==void 0?a:{},create_user:(r=d==null?void 0:d.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:x,code_challenge_method:m},redirectTo:d==null?void 0:d.emailRedirectTo});return{data:{user:null,session:null},error:h}}if("phone"in s){const{phone:c,options:d}=s,{data:x,error:m}=await Ut(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:c,data:(l=d==null?void 0:d.data)!==null&&l!==void 0?l:{},create_user:(n=d==null?void 0:d.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},channel:(i=d==null?void 0:d.channel)!==null&&i!==void 0?i:"sms"}});return{data:{user:null,session:null,messageId:x==null?void 0:x.message_id},error:m}}throw new ed("You must provide either an email or phone number.")}catch(c){if(Ot(c))return{data:{user:null,session:null},error:c};throw c}}async verifyOtp(s){var a,r;
884try{let l,n;"options"in s&&(l=(a=s.options)===null||a===void 0?void 0:a.redirectTo,n=(r=s.options)===null||r===void 0?void 0:r.captchaToken);const{data:i,error:c}=await Ut(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},s),{gotrue_meta_security:{captcha_token:n}}),redirectTo:l,xform:dl});if(c)throw c;if(!i)throw new Error("An error occurred on token verification.");const d=i.session,x=i.user;return d!=null&&d.access_token&&(await this._saveSession(d),await this._notifyAllSubscribers(s.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",d)),{data:{user:x,session:d},error:null}}catch(l){if(Ot(l))return{data:{user:null,session:null},error:l};throw l}}async signInWithSSO(s){var a,r,l;try{let n=null,i=null;return this.flowType==="pkce"&&([n,i]=await li(this.storage,this.storageKey)),await Ut(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in s?{provider_id:s.providerId}:null),"domain"in s?{domain:s.domain}:null),{redirect_to:(r=(a=s.options)===null||a===void 0?void 0:a.redirectTo)!==null&&r!==void 0?r:void 0}),!((l=s==null?void 0:s.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:s.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:n,code_challenge_method:i}),headers:this.headers,xform:hN})}catch(n){if(Ot(n))return{data:null,error:n};throw n}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async s=>{const{data:{session:a},error:r}=s;if(r)throw r;if(!a)throw new Yl;const{error:l}=await Ut(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:a.access_token});return{data:{user:null,session:null},error:l}})}catch(s){if(Ot(s))return{data:{user:null,session:null},error:s};throw s}}async resend(s){try{const a=`${this.url}/resend`;if("email"in s){const{email:r,type:l,options:n}=s,{error:i}=await Ut(this.fetch,"POST",a,{headers:this.headers,body:{email:r,type:l,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},redirectTo:n==null?void 0:n.emailRedirectTo});return{data:{user:null,session:null},error:i}}else if("phone"in s){const{phone:r,type:l,options:n}=s,{data:i,error:c}=await Ut(this.fetch,"POST",a,{headers:this.headers,body:{phone:r,type:l,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}}});return{data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:c}}throw new ed("You must provide either an email or phone number and a type")}catch(a){if(Ot(a))return{data:{user:null,session:null},error:a};throw a}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async a=>a))}async _acquireLock(s,a){this._debug("#_acquireLock","begin",s);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await r,await a()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,s,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=a();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(s){this._debug("#_useSession","begin");try{const a=await this.__loadSession();return await s(a)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let s=null;const a=await An(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",a),a!==null&&(this._isValidSession(a)?s=a:(this._debug("#getSession()","session from storage is not val
884id"),await this._removeSession())),!s)return{data:{session:null},error:null};const r=s.expires_at?s.expires_at*1e3-Date.now()<hx:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",s.expires_at),!r){if(this.userStorage){const i=await An(this.userStorage,this.storageKey+"-user");i!=null&&i.user?s.user=i.user:s.user=gx()}if(this.storage.isServer&&s.user){let i=this.suppressGetSessionWarning;s=new Proxy(s,{get:(d,x,m)=>(!i&&x==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),i=!0,this.suppressGetSessionWarning=!0),Reflect.get(d,x,m))})}return{data:{session:s},error:null}}const{session:l,error:n}=await this._callRefreshToken(s.refresh_token);return n?{data:{session:null},error:n}:{data:{session:l},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(s){return s?await this._getUser(s):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(s){try{return s?await Ut(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:s,xform:en}):await this._useSession(async a=>{var r,l,n;const{data:i,error:c}=a;if(c)throw c;return!(!((r=i.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Yl}:await Ut(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(n=(l=i.session)===null||l===void 0?void 0:l.access_token)!==null&&n!==void 0?n:void 0,xform:en})})}catch(a){if(Ot(a))return L2(a)&&(await this._removeSession(),await Wl(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:a};throw a}}async updateUser(s,a={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(s,a))}async _updateUser(s,a={}){try{return await this._useSession(async r=>{const{data:l,error:n}=r;if(n)throw n;if(!l.session)throw new Yl;const i=l.session;let c=null,d=null;this.flowType==="pkce"&&s.email!=null&&([c,d]=await li(this.storage,this.storageKey));const{data:x,error:m}=await Ut(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:a==null?void 0:a.emailRedirectTo,body:Object.assign(Object.assign({},s),{code_challenge:c,code_challenge_method:d}),jwt:i.access_token,xform:en});if(m)throw m;return i.user=x.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),{data:{user:i.user},error:null}})}catch(r){if(Ot(r))return{data:{user:null},error:r};throw r}}async setSession(s){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(s))}async _setSession(s){try{if(!s.access_token||!s.refresh_token)throw new Yl;const a=Date.now()/1e3;let r=a,l=!0,n=null;const{payload:i}=fx(s.access_token);if(i.exp&&(r=i.exp,l=r<=a),l){const{session:c,error:d}=await this._callRefreshToken(s.refresh_token);if(d)return{data:{user:null,session:null},error:d};if(!c)return{data:{user:null,session:null},error:null};n=c}else{const{data:c,error:d}=await this._getUser(s.access_token);if(d)throw d;n={access_token:s.access_token,refresh_token:s.refresh_token,user:c.user,token_type:"bearer",expires_in:r-a,expires_at:r},await this._saveSession(n),await this._notifyAllSubscribers("SIGNED_IN",n)}return{data:{user:n.user,session:n},error:null}}catch(a){if(Ot(a))return{data:{session:null,user:null},error:a};throw a}}async refreshSession(s){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(s))}async _refreshSession(s){try{return await this._useSession(async a=>{var r;if(!s){const{data:i,error:c}=a;if(c)throw c;s=(r=i.session)!==null&&r!==void 0?r:void 0}if(!(s!=null&&s.refresh_token))throw new Yl;const{session:l,error:n}=await this._callRefreshToken(s.refresh_token);return n?{data:{user:null,session:null},error:n}:l?{data:{user:l.user,session:l},error:null}:{data:{user:null,session:null},error:null}})}catch(a){if(Ot(a))return{data:{user:null,session:null},error:a};throw a}}async _getSessionFromURL(s,a){try{if(!Sr())throw new td("No browser detected.");
884if(s.error||s.error_description||s.error_code)throw new td(s.error_description||"Error in URL with unspecified error_description",{error:s.error||"unspecified_error",code:s.error_code||"unspecified_code"});switch(a){case"implicit":if(this.flowType==="pkce")throw new Pp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new td("Not a valid implicit grant flow url.");break;default:}if(a==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!s.code)throw new Pp("No code detected.");const{data:j,error:b}=await this._exchangeCodeForSession(s.code);if(b)throw b;const p=new URL(window.location.href);return p.searchParams.delete("code"),window.history.replaceState(window.history.state,"",p.toString()),{data:{session:j.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:l,access_token:n,refresh_token:i,expires_in:c,expires_at:d,token_type:x}=s;if(!n||!c||!i||!x)throw new td("No session defined in URL");const m=Math.round(Date.now()/1e3),h=parseInt(c);let f=m+h;d&&(f=parseInt(d));const y=f-m;y*1e3<=mi&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${h}s`);const g=f-h;m-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,f,m):m-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,f,m);const{data:w,error:N}=await this._getUser(n);if(N)throw N;const v={provider_token:r,provider_refresh_token:l,access_token:n,expires_in:h,expires_at:f,refresh_token:i,token_type:x,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:v,redirectType:s.type},error:null}}catch(r){if(Ot(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(s){return!!(s.access_token||s.error_description)}async _isPKCECallback(s){const a=await An(this.storage,`${this.storageKey}-code-verifier`);return!!(s.code&&a)}async signOut(s={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(s))}async _signOut({scope:s}={scope:"global"}){return await this._useSession(async a=>{var r;const{data:l,error:n}=a;if(n)return{error:n};const i=(r=l.session)===null||r===void 0?void 0:r.access_token;if(i){const{error:c}=await this.admin.signOut(i,s);if(c&&!($2(c)&&(c.status===404||c.status===401||c.status===403)))return{error:c}}return s!=="others"&&(await this._removeSession(),await Wl(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(s){const a=X2(),r={id:a,callback:s,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",a),this.stateChangeEmitters.delete(a)}};return this._debug("#onAuthStateChange()","registered callback with id",a),this.stateChangeEmitters.set(a,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(a)})))(),{data:{subscription:r}}}async _emitInitialSession(s){return await this._useSession(async a=>{var r,l;try{const{data:{session:n},error:i}=a;if(i)throw i;await((r=this.stateChangeEmitters.get(s))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",n)),this._debug("INITIAL_SESSION","callback id",s,"session",n)}catch(n){await((l=this.stateChangeEmitters.get(s))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",s,"error",n),console.error(n)}})}async resetPasswordForEmail(s,a={}){let r=null,l=null;this.flowType==="pkce"&&([r,l]=await li(this.storage,this.storageKey,!0));try{return await Ut(this.fetch,"POST",`${this.url}/recover`,{body:{email:s,code_challenge:r,code_challenge_method:l,gotrue_meta_security:{captcha_token:a.captchaToken}},headers:this.headers,redirectTo:a.redirectTo})}catch(n){if(Ot(n))return{data:null,error:n};throw n}}async getUserIdentities(){var s;try{const{data:a,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(s=a.user.identities)!==null&&s!==void 0?s:[]},error:null}}catch(a){if(Ot(a))return{data:null,error:a};throw a}}async linkIdentity(s){var a;try{const{data:r,error:l}=await this._useSession(async n=>{var i,c,d,x,m;const{data:h,error:f}=n;if(f)throw f;const y=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,s.provider,{redirectTo:(i=s.options)===null||i===void 0?void 0:i.redirectTo,scopes:(c=s.options)===null||c===void 0?void 0:c.scopes,queryParams:(d=s.options)===null||d===void 0?void 0:d.queryParams,skipBrowserRedirect:!0});return await Ut(this.fetch,"GET",y,{headers:this.headers,jwt:(m=(x=h.session)===null||x===void 0?void 0:x.access_token)!==null&&m!==void 0?m:void 0})});if(l)throw l;return Sr()&&!(!((a=s.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:s.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(Ot(r))return{data:{provider:s.provider,url:null},error:r};throw r}}async unlinkIdentity(s){try{return await this._useSession(async a=>{var r,l;const{data:n,error:i}=a;if(i)throw i;
884return await Ut(this.fetch,"DELETE",`${this.url}/user/identities/${s.identity_id}`,{headers:this.headers,jwt:(l=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&l!==void 0?l:void 0})})}catch(a){if(Ot(a))return{data:null,error:a};throw a}}async _refreshAccessToken(s){const a=`#_refreshAccessToken(${s.substring(0,5)}...)`;this._debug(a,"begin");try{const r=Date.now();return await eN(async l=>(l>0&&await Z2(200*Math.pow(2,l-1)),this._debug(a,"refreshing attempt",l),await Ut(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:s},headers:this.headers,xform:dl})),(l,n)=>{const i=200*Math.pow(2,l);return n&&px(n)&&Date.now()+i-r<mi})}catch(r){if(this._debug(a,"error",r),Ot(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(a,"end")}}_isValidSession(s){return typeof s=="object"&&s!==null&&"access_token"in s&&"refresh_token"in s&&"expires_at"in s}async _handleProviderSignIn(s,a){const r=await this._getUrlForProvider(`${this.url}/authorize`,s,{redirectTo:a.redirectTo,scopes:a.scopes,queryParams:a.queryParams});return this._debug("#_handleProviderSignIn()","provider",s,"options",a,"url",r),Sr()&&!a.skipBrowserRedirect&&window.location.assign(r),{data:{provider:s,url:r},error:null}}async _recoverAndRefresh(){var s,a;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const l=await An(this.storage,this.storageKey);if(l&&this.userStorage){let i=await An(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:l.user},await xi(this.userStorage,this.storageKey+"-user",i)),l.user=(s=i==null?void 0:i.user)!==null&&s!==void 0?s:gx()}else if(l&&!l.user&&!l.user){const i=await An(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(l.user=i.user,await Wl(this.storage,this.storageKey+"-user"),await xi(this.storage,this.storageKey,l)):l.user=gx()}if(this._debug(r,"session from storage",l),!this._isValidSession(l)){this._debug(r,"session is not valid"),l!==null&&await this._removeSession();return}const n=((a=l.expires_at)!==null&&a!==void 0?a:1/0)*1e3-Date.now()<hx;if(this._debug(r,`session has${n?"":" not"} expired with margin of ${hx}s`),n){if(this.autoRefreshToken&&l.refresh_token){const{error:i}=await this._callRefreshToken(l.refresh_token);i&&(console.error(i),px(i)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:c}=await this._getUser(l.access_token);!c&&(i!=null&&i.user)?(l.user=i.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(r,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(r,"error",l),console.error(l);return}finally{this._debug(r,"end")}}async _callRefreshToken(s){var a,r;if(!s)throw new Yl;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l=`#_callRefreshToken(${s.substring(0,5)}...)`;this._debug(l,"begin");try{this.refreshingDeferred=new Em;const{data:n,error:i}=await this._refreshAccessToken(s);if(i)throw i;if(!n.session)throw new Yl;await this._saveSession(n.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",n.session);const c={session:n.session,error:null};return this.refreshingDeferred.resolve(c),c}catch(n){if(this._debug(l,"error",n),Ot(n)){const i={session:null,error:n};return px(n)||await this._removeSession(),(a=this.refreshingDeferred)===null||a===void 0||a.resolve(i),i}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(n),n}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(s,a,r=!0){const l=`#_notifyAllSubscribers(${s})`;this._debug(l,"begin",a,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:s,session:a});const n=[],i=Array.from(this.stateChangeEmitters.values()).map(async c=>{try{await c.callback(s,a)}catch(d){n.push(d)}});if(await Promise.all(i),n.length>0){for(let c=0;c<n.length;c+=1)console.error(n[c]);throw n[0]}}finally{this._debug(l,"end")}}async _saveSession(s){this._debug("#_saveSession()",s),this.suppressGetSessionWarning=!0;const a=Object.assign({},s),r=a.user&&a.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&a.user&&await xi(this.userStorage,this.storageKey+"-user",{user:a.user});const l=Object.assign({},a);delete l.user;const n=Rp(l);await xi(this.storage,this.storageKey,n)}else{const l=Rp(a);await xi(this.storage,this.storageKey,l)}}async _removeSession(){this._debug("#_removeSession()"),await Wl(this.storage,this.storageKey),await Wl(this.storage,this.storageKey+"-code-verifier"),await Wl(this.storage,this.storageKey+"-user"),this.userStorage&&await Wl(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const s=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{s&&Sr()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",s)}
884catch(a){console.error("removing visibilitychange callback failed",a)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const s=setInterval(()=>this._autoRefreshTokenTick(),mi);this.autoRefreshTicker=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const s=this.autoRefreshTicker;this.autoRefreshTicker=null,s&&clearInterval(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const s=Date.now();try{return await this._useSession(async a=>{const{data:{session:r}}=a;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((r.expires_at*1e3-s)/mi);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${mi}ms, refresh threshold is ${K0} ticks`),l<=K0&&await this._callRefreshToken(r.refresh_token)})}catch(a){console.error("Auto refresh tick failed with error. This is likely a transient error.",a)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(s){if(s.isAcquireTimeout||s instanceof $y)this._debug("auto refresh token tick lock not available");else throw s}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Sr()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(s){console.error("_handleVisibilityChange",s)}}async _onVisibilityChanged(s){const a=`#_onVisibilityChanged(${s})`;this._debug(a,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),s||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(a,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(s,a,r){const l=[`provider=${encodeURIComponent(a)}`];if(r!=null&&r.redirectTo&&l.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&l.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[n,i]=await li(this.storage,this.storageKey),c=new URLSearchParams({code_challenge:`${encodeURIComponent(n)}`,code_challenge_method:`${encodeURIComponent(i)}`});l.push(c.toString())}if(r!=null&&r.queryParams){const n=new URLSearchParams(r.queryParams);l.push(n.toString())}return r!=null&&r.skipBrowserRedirect&&l.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${s}?${l.join("&")}`}async _unenroll(s){try{return await this._useSession(async a=>{var r;const{data:l,error:n}=a;return n?{data:null,error:n}:await Ut(this.fetch,"DELETE",`${this.url}/factors/${s.factorId}`,{headers:this.headers,jwt:(r=l==null?void 0:l.session)===null||r===void 0?void 0:r.access_token})})}catch(a){if(Ot(a))return{data:null,error:a};throw a}}async _enroll(s){try{return await this._useSession(async a=>{var r,l;const{data:n,error:i}=a;if(i)return{data:null,error:i};const c=Object.assign({friendly_name:s.friendlyName,factor_type:s.factorType},s.factorType==="phone"?{phone:s.phone}:{issuer:s.issuer}),{data:d,error:x}=await Ut(this.fetch,"POST",`${this.url}/factors`,{body:c,headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token});return x?{data:null,error:x}:(s.factorType==="totp"&&(!((l=d==null?void 0:d.totp)===null||l===void 0)&&l.qr_code)&&(d.totp.qr_code=`data:image/svg+xml;utf-8,${d.totp.qr_code}`),{data:d,error:null})})}catch(a){if(Ot(a))return{data:null,error:a};throw a}}async _verify(s){return this._acquireLock(-1,async()=>{try{return await this._useSession(async a=>{var r;const{data:l,error:n}=a;if(n)return{data:null,error:n};const{data:i,error:c}=await Ut(this.fetch,"POST",`${this.url}/factors/${s.factorId}/verify`,{body:{code:s.code,challenge_id:s.challengeId},headers:this.headers,jwt:(r=l==null?void 0:l.session)===null||r===void 0?void 0:r.access_token});return c?{data:null,error:c}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+i.expires_in},i)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",i),{data:i,error:c})})}catch(a){if(Ot(a))return{data:null,error:a};throw a}})}async _challenge(s){return this._acquireLock(-1,async()=>{try{return await this._useSession(async a=>{var r;const{data:l,error:n}=a;return n?{data:null,error:n}:await Ut(this.fetch,"POST",`${this.url}/factors/${s.factorId}/challenge`,{body:{channel:s.channel},headers:this.headers,jwt:(r=l==null?void 0:l.session)===null||r===void 0?void 0:r.access_token})})}catch(a){if(Ot(a))return{data:null,error:a};throw a}})}async _challengeAndVerify(s){const{data:a,error:r}=await this._challenge({factorId:s.factorId});return r?{data:null,error:r}:await this._verify({factorId:s.factorId,challengeId:a.id,code:s.code})}async _listFactors(){const{data:{user:s},error:a}=await this.getUser();if(a)return{data:null,error:a};const r=(s==null?void 0:s.factors)||[],l=r.filter(i=>i.factor_type==="totp"&&i.status==="verified"),n=r.filter(i=>i.factor_type==="phone"&&i.status==="verified");return{data:{all:r,totp:l,phone:n},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async s=>{var a,r;const{data:{session:l},error:n}=s;if(n)return{data:null,error:n};if(!l)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=fx(l.access_token);let c=null;i.aal&&(c=i.aal);let d=c;((r=(a=l.user.factors)===null||a===void 0?void 0:a.filter(h=>h.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(d="aal2");const m=i.amr||[];return{data:{currentLevel:c,nextLevel:d,currentAuthenticationMethods:m},error:null}}))}async fetchJwk(s,a={keys:[]}){let r=a.keys.find(c=>c.kid===s);if(r)return r;const l=Date.now();if(r=this.jwks.keys.find(c=>c.kid===s),r&&this.jwks_cached_at+O2>l)return r;const{data:n,error:i}=await Ut(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!n.keys||n.keys.length===0||(this.jwks=n,this.jwks_cached_at=l,r=n.keys.find(c=>c.kid===s),!r)?null:r}async getClaims(s,a={}){try{let r=s;if(!r){const{data:y,error:g}
884=await this.getSession();if(g||!y.session)return{data:null,error:g};r=y.session.access_token}const{header:l,payload:n,signature:i,raw:{header:c,payload:d}}=fx(r);a!=null&&a.allowExpired||iN(n.exp);const x=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,a!=null&&a.keys?{keys:a.keys}:a==null?void 0:a.jwks);if(!x){const{error:y}=await this.getUser(r);if(y)throw y;return{data:{claims:n,header:l,signature:i},error:null}}const m=oN(l.alg),h=await crypto.subtle.importKey("jwk",x,m,!0,["verify"]);if(!await crypto.subtle.verify(m,h,i,H2(`${c}.${d}`)))throw new eu("Invalid JWT signature");return{data:{claims:n,header:l,signature:i},error:null}}catch(r){if(Ot(r))return{data:null,error:r};throw r}}}dc.nextInstanceID=0;const kN=dc;class _N extends kN{constructor(s){super(s)}}var SN=function(t,s,a,r){function l(n){return n instanceof a?n:new a(function(i){i(n)})}return new(a||(a=Promise))(function(n,i){function c(m){try{x(r.next(m))}catch(h){i(h)}}function d(m){try{x(r.throw(m))}catch(h){i(h)}}function x(m){m.done?n(m.value):l(m.value).then(c,d)}x((r=r.apply(t,s||[])).next())})};class CN{constructor(s,a,r){var l,n,i;this.supabaseUrl=s,this.supabaseKey=a;const c=M2(s);if(!a)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const d=`sb-${c.hostname.split(".")[0]}-auth-token`,x={db:w2,realtime:k2,auth:Object.assign(Object.assign({},N2),{storageKey:d}),global:v2},m=A2(r??{},x);this.storageKey=(l=m.auth.storageKey)!==null&&l!==void 0?l:"",this.headers=(n=m.global.headers)!==null&&n!==void 0?n:{},m.accessToken?(this.accessToken=m.accessToken,this.auth=new Proxy({},{get:(h,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((i=m.auth)!==null&&i!==void 0?i:{},this.headers,m.global.fetch),this.fetch=I2(a,this._getAccessToken.bind(this),m.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},m.realtime)),this.rest=new Uw(new URL("rest/v1",c).href,{headers:this.headers,schema:m.db.schema,fetch:this.fetch}),this.storage=new b2(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),m.accessToken||this._listenForAuthEvents()}get functions(){return new jw(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(s){return this.rest.from(s)}schema(s){return this.rest.schema(s)}rpc(s,a={},r={}){return this.rest.rpc(s,a,r)}channel(s,a={config:{}}){return this.realtime.channel(s,a)}getChannels(){return this.realtime.getChannels()}removeChannel(s){return this.realtime.removeChannel(s)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var s,a;return SN(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(a=(s=r.session)===null||s===void 0?void 0:s.access_token)!==null&&a!==void 0?a:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:s,persistSession:a,detectSessionInUrl:r,storage:l,userStorage:n,storageKey:i,flowType:c,lock:d,debug:x},m,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new _N({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),m),storageKey:i,autoRefreshToken:s,persistSession:a,detectSessionInUrl:r,storage:l,userStorage:n,flowType:c,lock:d,debug:x,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(y=>y.toLowerCase()==="authorization")})}_initRealtimeClient(s){return new l2(this.realtimeUrl.href,Object.assign(Object.assign({},s),{params:Object.assign({apikey:this.supabaseKey},s==null?void 0:s.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((a,r)=>{this._handleTokenChanged(a,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(s,a,r){(s==="TOKEN_REFRESHED"||s==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:s==="SIGNED_OUT"&&(this.realtime.setAuth(),a=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const IN=(t,s,a)=>new CN(t,s,a);function TN(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const s=t.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=18:!1}TN()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
884ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const PN="https://kdqsajuhvcmxsnttdetg.supabase.co",AN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",yx={},MN={getItem:t=>{try{return localStorage.getItem(t)}catch{return yx[t]??null}},setItem:(t,s)=>{try{localStorage.setItem(t,s)}catch{yx[t]=s}},removeItem:t=>{try{localStorage.removeItem(t)}catch{delete yx[t]}}},Ye=IN(PN,AN,{auth:{storage:MN,persistSession:!0,autoRefreshToken:!0}}),rn=Object.freeze(Object.defineProperty({__proto__:null,supabase:Ye},Symbol.toStringTag,{value:"Module"}));function Lp(t){try{return localStorage.getItem(t)}catch{return null}}function tu(t){try{localStorage.removeItem(t)}catch{}}function EN(t,s){try{localStorage.setItem(t,JSON.stringify(s))}catch{}}function DN({cart:t,onSuccess:s,onError:a,customerName:r="",customerEmail:l="",hideCustomerFields:n=!1}
884){const[i,c]=o.useState(null),[d,x]=o.useState(r),[m,h]=o.useState(l),[f,y]=o.useState(!0),[g,w]=o.useState(!1),N=o.useRef(!1),v=o.useRef(null),j=o.useRef({name:r,email:l}),b="https://kdqsajuhvcmxsnttdetg.supabase.co",p=void 0,E=t.reduce((k,J)=>k+J.price,0).toFixed(2),C=async(k,J,u=3e4)=>{const A=new AbortController,T=setTimeout(()=>A.abort(),u);try{const ae=await fetch(k,{...J,signal:A.signal});return clearTimeout(T),ae}catch(ae){throw clearTimeout(T),ae instanceof Error&&ae.name==="AbortError"?new Error("Request timed out. Please check your internet connection and try again."):ae}};o.useEffect(()=>{j.current={name:d,email:m}},[d,m]);const S=o.useCallback(()=>{if(!(!window.paypal||N.current||!document.getElementById("paypal-button-container"))){N.current=!0;try{window.paypal.Buttons({style:{layout:"vertical",color:"blue",shape:"rect",label:"pay",height:48},createOrder:async()=>{const J=j.current;c(null);const u=await C(`${b}/functions/v1/create_order`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerName:J.name||"Guest",customerEmail:J.email,cart:t})},3e4),A=await u.json();if(!u.ok)throw new Error(A.error||"Failed to create order");return A.orderID},onApprove:async J=>{try{c(null);const u=await C(`${b}/functions/v1/capture_order`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderID:J.orderID})},3e4),A=await u.json();if(!u.ok){const T=A.paypal_error||A.error||"Payment failed",ae=A.debug_id?` (Debug ID: ${A.debug_id})`:"";throw new Error(T+ae)}if(A.success&&A.status==="COMPLETED")s(A.captureId,A.orderNumber);else throw new Error("Payment was not completed")}catch(u){const A=u instanceof Error?u.message:"Payment capture failed";c(A),a==null||a(A)}},onCancel:()=>{c("Payment was cancelled. You can try again.")},onError:J=>{console.error("PayPal error:",J),c("An error occurred during payment. Please try again."),a==null||a("An error occurred during payment.")}}).render("#paypal-button-container")}catch{N.current=!1,c("Unable to initialize payment system. Please refresh the page.")}}},[t,b,s,a]);return o.useEffect(()=>{if(window.paypal){w(!0),y(!1);return}try{if(!p){c("PayPal configuration missing"),y(!1);return}const k=document.querySelector('script[src*="paypal.com/sdk/js"]');if(k){window.paypal?(w(!0),y(!1)):k.addEventListener("load",()=>{w(!0),y(!1)});return}const J=document.createElement("script");J.src=`https://www.paypal.com/sdk/js?client-id=${p}&components=buttons¤cy=USD&intent=capture`,J.async=!0,J.onload=()=>{w(!0),y(!1)},J.onerror=()=>{c("Unable to load PayPal. Please refresh the page."),y(!1)},document.body.appendChild(J)}catch{c("Unable to initialize payment system."),y(!1)}},[p]),o.useEffect(()=>{g&&window.paypal&&!N.current&&S()},[g,m,S]),e.jsxs("div",{className:"max-w-md mx-auto p-6 bg-white rounded-2xl shadow-lg",ref:v,children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:"PayPal Checkout"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Secure online payment processed via PayPal Checkout"})]}),e.jsx("div",{className:"mb-6 p-4 bg-slate-50 rounded-xl",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600 font-medium",children:"Total Amount:"}),e.jsxs("span",{className:"text-2xl font-bold text-slate-900",children:["$",E," USD"]})]})}),i&&e.jsxs("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-xl flex items-start gap-2",children:[e.jsx(nt,{className:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-red-700 text-sm",children:i})]}),f?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(Ne,{className:"w-8 h-8 text-blue-600 animate-spin"}),e.jsx("span",{className:"ml-3 text-slate-600",children:"Loading PayPal..."})]}):e.jsx("div",{id:"paypal-button-container",className:"min-h-[48px]"}),e.jsxs("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-xl",children:[e.jsx("p",{className:"text-sm text-blue-900 font-medium mb-2",children:"PayPal Checkout (Digital Services)"}),e.jsxs("ul",{className:"text-xs text-blue-800 space-y-1",children:[e.jsx("li",{children:"⢠Secure online payment via PayPal Checkout"}),e.jsx("li",{children:"⢠Pay with credit card, debit card, or PayPal account"}),e.jsx("li",{children:"⢠Your payment information is encrypted and secure"}),e.jsx("li",{children:"⢠Digital service purchase - instant delivery"})]})]}),e.jsx("p",{className:"text-xs text-slate-500 text-center mt-4",children:"Payments are processed via PayPal Checkout for digital services. By completing this payment, you agree to our terms and conditions."})]})}function RN(){const{showAlert:t}
884=Vs(),[s,a]=o.useState([{platform:"Instagram",service_type:"Followers",quantity:1e3,price:4.49}]),[r,l]=o.useState(!1),n=()=>{a([...s,{platform:"TikTok",service_type:"Likes",quantity:500,price:7.99}])},i=x=>{a(s.filter((m,h)=>h!==x))},c=x=>{t(`Payment successful! Capture ID: ${x}`,{type:"success"}),a([]),l(!1)},d=x=>{console.error("Payment error:",x)};return r?e.jsxs("div",{className:"min-h-screen bg-gray-50 py-12 px-4",children:[e.jsx("div",{className:"max-w-4xl mx-auto mb-6",children:e.jsx("button",{onClick:()=>l(!1),className:"text-blue-600 hover:text-blue-700 font-medium",children:"â Back to Cart"})}),e.jsx(DN,{cart:s,onSuccess:c,onError:d})]}):e.jsx("div",{className:"min-h-screen bg-gray-50 py-12 px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-8 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx(Ws,{className:"w-8 h-8 text-blue-600"}),e.jsx("h1",{className:"text-3xl font-bold text-gray-800",children:"PayPal Card Fields Demo"})]}),e.jsxs("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded",children:[e.jsx("h3",{className:"font-semibold text-blue-900 mb-2",children:"Integration Features:"}),e.jsxs("ul",{className:"space-y-1 text-sm text-blue-800",children:[e.jsx("li",{children:"â PayPal Card Fields (NO redirect, NO popup)"}),e.jsx("li",{children:"â Backend amount verification (anti-tampering)"}),e.jsx("li",{children:"â Single-use orders (security)"}),e.jsx("li",{children:"â Strict capture verification"}),e.jsx("li",{children:"â No payer.name sent from backend (Card Fields collects it)"})]})]}),s.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("p",{className:"text-gray-500 mb-4",children:"Your cart is empty"}),e.jsx("button",{onClick:n,className:"bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700",children:"Add Sample Item"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-4 mb-6",children:s.map((x,m)=>e.jsxs("div",{className:"flex items-center justify-between p-4 border border-gray-200 rounded-lg",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("h3",{className:"font-semibold text-gray-800",children:[x.platform," ",x.service_type]}),e.jsxs("p",{className:"text-sm text-gray-600",children:["Quantity: ",x.quantity.toLocaleString("en-US")]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"text-lg font-bold text-gray-800",children:["$",x.price]}),e.jsx("button",{onClick:()=>i(m),className:"text-red-500 hover:text-red-700",children:e.jsx(xs,{className:"w-5 h-5"})})]})]},m))}),e.jsx("div",{className:"border-t border-gray-200 pt-4 mb-6",children:e.jsxs("div",{className:"flex justify-between items-center text-xl font-bold",children:[e.jsx("span",{children:"Total:"}),e.jsxs("span",{className:"text-green-600",children:["$",s.reduce((x,m)=>x+m.price,0).toFixed(2)," USD"]})]})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("button",{onClick:n,className:"flex-1 bg-gray-200 text-gray-700 px-6 py-3 rounded-lg font-semibold hover:bg-gray-300",children:"Add Another Item"}),e.jsx("button",{onClick:()=>l(!0),className:"flex-1 bg-blue-600 text-white px-6 py-3 rounded-lg font-semibold hover:bg-blue-700",children:"Proceed to Checkout"})]})]})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-8",children:[e.jsx("h2",{className:"text-xl font-bold text-gray-800 mb-4",children:"Technical Implementation"}),e.jsxs("div",{className:"space-y-4 text-sm text-gray-700",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-2",children:"Backend (Edge Functions):"}),e.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[e.jsxs("li",{children:[e.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"create_order"})," - Creates PayPal order, recalculates amount from cart"]}),e.jsxs("li",{children:[e.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"capture_order"})," - Verifies and captures payment with strict checks"]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-2",children:"Security Features:"}),e.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[e.jsx("li",{children:"Backend recalculates all amounts (frontend cannot tamper)"}),e.jsx("li",{children:"Orders are single-use only (prevents replay attacks)"}),e.jsx("li",{children:"Amount verification before capture (prevents amount mismatch)"}),e.jsx("li",{children:"Currency verification (USD only)"}),e.jsx("li",{children:"Status verification (APPROVED â COMPLETED)"})]})]})]})]})]})})}let Pd=[];function FN(t){return Pd.push(t),()=>{Pd=Pd.filter(s=>s!==t)}}function Bp(){Pd.forEach(t=>t())}async function Ly(){try{const t=localStorage.getItem("adminSession");if(!t)return!1;const s=JSON.parse(t);if(!s.refresh_token)return!1;const{data:a,error:r}=await Ye.auth.setSession({access_token:s.access_token,refresh_token:s.refresh_token});return!r&&a.session?(localStorage.setItem("adminSession",JSON.stringify({access_token:a.session.access_token,refresh_token:a.session.refresh_token})),!0):!1}catch{return!1}}async function Up(){if(!localStorage.getItem("adminSession"))return!1;try{const{data:{session:s}}=await Ye.auth.getSession();if(s)return localStorage.setItem("adminSession",JSON.stringify({access_token:s.access_token,refresh_token:s.refresh_token})),!0}catch{}return Ly()}async function qp(){const t={"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},{data:{session:s}}=await Ye.auth.getSession();if(s!=null&&s.access_token)return localStorage.setItem("adminSession",JSON.stringify({access_token:s.access_token,refresh_token:s.refresh_token})),t.Authorization=`Bearer ${s.access_token}`,t;const a=localStorage.getItem("adminSession");if(a)try{const l=JSON.parse(a);if(l.access_token)return t.Authorization=`Bearer ${l.access_token}`,t}catch{}const r=localStorage.getItem("adminToken");return r&&(t.Authorization=`Bearer ${r}`),t}async function We(t,s={}){const a=await qp(),r=await fetch(t,{...s,headers:{...a,...s.headers||{}}});if(r.status===401||r.status===403){if(await Ly()){const n=await qp(),i=await fetch(t,{...s,headers:{...n,...s.headers||{}}});return(i.status===401||i.status===403)&&Bp(),i}Bp()}return r}function ON(){const[t,s]=o.useState([]),[a,r]=o.useState(!0),[l,n]=o.useState(null),[i,c]=o.useState(new Set),[d,x]=o.use
884State(null),[m,h]=o.useState(""),[f,y]=o.useState(""),[g,w]=o.useState(""),[N,v]=o.useState(""),[j,b]=o.useState(!1);o.useEffect(()=>{C(),p()},[]);const p=async()=>{const P="https://kdqsajuhvcmxsnttdetg.supabase.co";try{const[z,I,Z,Q]=await Promise.all([We(`${P}/functions/v1/get_environment_value?key=whatsapp_phone`),We(`${P}/functions/v1/get_environment_value?key=whatsapp_phone_tr`),We(`${P}/functions/v1/get_environment_value?key=whatsapp_message`),We(`${P}/functions/v1/get_environment_value?key=whatsapp_message_tr`)]);if(z.ok){const _=await z.json();h(_.value||"")}if(I.ok){const _=await I.json();y(_.value||"")}if(Z.ok){const _=await Z.json();w(_.value||"")}if(Q.ok){const _=await Q.json();v(_.value||"")}}catch{}},E=async()=>{b(!0);const P="https://kdqsajuhvcmxsnttdetg.supabase.co";try{await Promise.all([We(`${P}/functions/v1/update_environment_setting`,{method:"POST",body:JSON.stringify({key:"whatsapp_phone",value:m})}),We(`${P}/functions/v1/update_environment_setting`,{method:"POST",body:JSON.stringify({key:"whatsapp_phone_tr",value:f})}),We(`${P}/functions/v1/update_environment_setting`,{method:"POST",body:JSON.stringify({key:"whatsapp_message",value:g})}),We(`${P}/functions/v1/update_environment_setting`,{method:"POST",body:JSON.stringify({key:"whatsapp_message_tr",value:N})})]),A("success","WhatsApp settings saved successfully")}catch{A("error","Failed to save WhatsApp numbers")}finally{b(!1)}},C=async()=>{try{r(!0);const z=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_environment_settings");if(!z.ok)throw new Error("Failed to fetch settings");const I=await z.json();s(I.settings||[])}catch(P){console.error("Error loading settings:",P),A("error","Failed to load environment settings")}finally{r(!1)}},S=P=>{n({key:P.key,value:P.is_secret?"":P.value})},k=async()=>{if(l)try{if(!(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_environment_setting",{method:"POST",body:JSON.stringify({key:l.key,value:l.value})})).ok)throw new Error("Failed to update setting");A("success","Setting updated successfully"),n(null),await C()}catch(P){console.error("Error updating setting:",P),A("error","Failed to update setting")}},J=()=>{n(null)},u=P=>{c(z=>{const I=new Set(z);return I.has(P)?I.delete(P):I.add(P),I})},A=(P,z)=>{x({type:P,text:z}),setTimeout(()=>x(null),5e3)},T=P=>{const z={payment:"bg-green-100 text-green-700",api:"bg-blue-100 text-blue-700",system:"bg-slate-100 text-slate-700",database:"bg-purple-100 text-purple-700",notification:"bg-orange-100 text-orange-700",general:"bg-gray-100 text-gray-700"};return z[P]||z.general},ae=t.reduce((P,z)=>(P[z.category]||(P[z.category]=[]),P[z.category].push(z),P),{});return a?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(Ve,{className:"w-8 h-8 text-blue-600 animate-spin"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Environment Settings"}),e.jsx("p",{className:"text-slate-600 mt-1",children:"Manage API keys, secrets, and configuration values"})]}),e.jsxs("button",{onClick:C,className:"flex items-center space-x-2 px-4 py-2 bg-white border border-slate-300 rounded-lg hover:bg-slate-50 transition-colors",children:[e.jsx(Ve,{className:"w-4 h-4"}),e.jsx("span",{children:"Refresh"})]})]}),d&&e.jsxs("div",{className:`p-4 rounded-lg flex items-center space-x-3 ${d.type==="success"?"bg-green-50 border border-green-200":"bg-red-50 border border-red-200"}`,children:[d.type==="success"?e.jsx(ne,{className:"w-5 h-5 text-green-600"}):e.jsx(nt,{className:"w-5 h-5 text-red-600"}),e.jsx("span",{className:d.type==="success"?"text-green-800":"text-red-800",children:d.text})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsxs("div",{className:"bg-slate-50 px-6 py-3 border-b border-slate-200 flex items-center gap-2",children:[e.jsx(Ls,{className:"w-4 h-4 text-green-600"}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"WhatsApp Numbers"})]}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:["Global WhatsApp Number",e.jsx("span",{className:"ml-2 text-xs font-normal text-slate-500",children:"Shown to all visitors worldwide"})]}),e.jsx("input",{type:"text",value:m,onChange:P=>h(P.target.value),placeholder:"+447424750508",className:"w-full px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none font-mono text-sm"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:["Turkey WhatsApp Number",e.jsx("span",{className:"ml-2 text-xs font-normal text-slate-500",children:"Shown only to visitors from Turkey (TR). Leave empty to use global number."})]}),e.jsx("input",{type:"text",value:f,onChange:P=>y(P.target.value),placeholder:"+905xxxxxxxxx",className:"w-full px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none font-mono text-sm"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:["Global Opening Message",e.jsx("span",{className:"ml-2 text-xs font-normal text-slate-500",children:"Optional message for visitors worldwide"})]}),e.jsx("textarea",{value:g,onChange:P=>w(P.target.value),placeholder:"Hello, I would like to get information.",rows:3,className:"w-full px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none text-sm resize-y"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:["Turkey Opening Message",e.jsx("span",{className:"ml-2 text-xs font-normal text-slate-500",children:"Optional message for visitors from Turkey"})]}),e.jsx("textarea",{value:N,onChange:P=>v(P.target.value),placeholder:"Merhaba, bilgi almak istiyorum.",rows:3,className:"w-full px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none text-sm resize-y"})]}),e.jsxs("button",{onClick:E,disabled:j,className:"flex items-center gap-2 px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50",children:[e.jsx(Cs,{className:"w-4 h-4"}),j?"Saving...":"Save WhatsApp Settings"]})]})]}),Object.keys(ae).length===0?e.jsxs("div",{className:"bg-white rounded-xl p-8 text-center border border-slate-200",children:[e.jsx(Dr,{className:"w-12 h-12 text-slate-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"No Environment Settings"}),e.jsx("p",{className:"text-slate-600",children:"Environment settings will appear here once configured"})]}):Object.entries(ae).map(([P,z])=>e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsx("div",{className:"bg-slate-50 px-6 py-3 border-b border-slate-200",children:e.jsx("h3",{className:"font-semibold text-slate-900 capitalize",children:P})}),e.jsx("div",{className:"divide-y divide-slate-200",children:z.map(I=>e.jsx("div",{className:"p-6",children:e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[e.jsx("span",{className:"font-mono font-medium text-slate-900",children:I.key}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${T(I.category)}`,children:I.category}),I.is_secret&&e.jsx("span",{className:"text-xs px-2 py-1 rounded bg-red-100 text-red-700",children:"Secret"})]}),I.description&&e.jsx("p",{className:"text-sm text-slate-600 mb-3",children:I.description}),(l==null?void 0:l.key)===I.key?e.jsxs("div",{className:"space-y-3",children:[e.jsx("input",{type:"text",value:l.value,onChange:Z=>n({...l,value:Z.target.value}),placeholder:I.is_secret?"Enter new value...":"",className:"w-full px-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none font-mono text-sm"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsxs("button",{onClick:k,className:"flex items-center space-x-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:[e.jsx(Cs,{className:"w-4 h-4"}),e.jsx("span",{children:"Save"})]}),e.jsxs("button",{onClick:J,className:"flex items-center space-x-2 px-4 py-2 bg-slate-200 text-slate-700 rounded-lg hover:bg-slate-300 transition-colors",children:[e.jsx(ht,{className:"w-4 h-4"}),e.jsx("span",{children:"Cancel"})]})]})]}):e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"flex-1 font-mono text-sm bg-slate-50 px-4 py-2 rounded-lg border border-slate-200",children:i.has(I.key)?e.jsx("span",{className:"text-slate-900",children:I.value}):e.jsx("span",{className:"text-slate-400",children:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢"})}),e.jsx("button",{onClick:()=>u(I.key),className:"p-2 text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",title:i.has(I.key)?"Hide":"Show",children:i.has(I.key)?e.jsx(ur,{className:"w-4 h-4"}):e.jsx(Ct,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>S(I),className:"px-4 py-2 text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",children:"Edit"})]}),I.updated_at&&e.jsxs("p",{className:"text-xs text-slate-500 mt-2",children:["Last updated: ",new Date(I.updated_at).toLocaleStr
884ing()]})]})})},I.id))})]},P)),e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4",children:e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx(nt,{className:"w-5 h-5 text-blue-600 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-semibold text-blue-900 mb-1",children:"Security Notice"}),e.jsx("p",{className:"text-sm text-blue-800",children:"Changes to environment settings take effect immediately. Secret values are encrypted and only accessible to authenticated admins. All changes are logged for audit purposes."})]})]})})]})}const By={USD:"en-US",GBP:"en-GB",EUR:"de-DE",TRY:"tr-TR"};function pt(t,s){const a="USD",r=Math.abs(t);let l=2;return r>0&&r<.01&&(l=4,r<1e-4&&(l=6)),t.toLocaleString(By[a],{style:"currency",currency:a,minimumFractionDigits:2,maximumFractionDigits:l})}function om(t,s){const a="USD";return t.toLocaleString(By[a],{style:"currency",currency:a,minimumFractionDigits:4,maximumFractionDigits:4})}function Ya(t){return t.toLocaleString("en-US")}function Uy({orderId:t,onClose:s,onRefresh:a,onViewUserDetail:r}){var he,D;
884const[l,n]=o.useState(null),[i,c]=o.useState(!0),[d,x]=o.useState(!1),[m,h]=o.useState(null),[f,y]=o.useState(!1),[g,w]=o.useState(""),[N,v]=o.useState(""),[j,b]=o.useState(""),[p,E]=o.useState(!1),[C,S]=o.useState(""),[k,J]=o.useState(""),[u,A]=o.useState(!1),[T,ae]=o.useState(""),[P,z]=o.useState(""),[I,Z]=o.useState([]),[Q,_]=o.useState(""),[M,F]=o.useState(!1),[R,X]=o.useState([]),[re,U]=o.useState(""),[oe,ue]=o.useState(!1),[K,q]=o.useState(!1);o.useEffect(()=>{se()},[t]);const je=async()=>{F(!0);try{const{data:O,error:fe}=await Ye.from("providers").select("id, name, is_active").eq("is_active",!0).order("name");!fe&&O&&Z(O)}catch(O){console.error("Error loading providers:",O)}finally{F(!1)}},we=async O=>{if(!Q){h({type:"error",text:"Please select a provider first"});return}ue(!0),q(!0);try{const W=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_provider_services?providerId=${Q}&search=${encodeURIComponent(O)}`),_e=await W.json();if(!W.ok)throw new Error(_e.error||"Failed to fetch services");X(_e.services||[])}catch(fe){console.error("Error searching services:",fe),h({type:"error",text:fe.message})}finally{ue(!1)}},se=async()=>{var O;c(!0);try{const W=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_order_detail?orderId=${t}`);if(!W.ok)throw new Error("Failed to fetch order detail");const _e=await W.json();n(_e.order),_e.order.service_id&&w(_e.order.service_id.toString()),_e.order.price&&S(_e.order.price.toString()),v(_e.order.link||_e.order.username||""),b(((O=_e.order.quantity)==null?void 0:O.toString())||"")}catch(fe){console.error("Error loading order detail:",fe),h({type:"error",text:"Failed to load order details"})}finally{c(!1)}},Se=async()=>{if(l){x(!0),h(null);try{const fe=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_refresh_order_status",{method:"POST",body:JSON.stringify({orderId:l.id})}),W=await fe.json();if(!fe.ok)throw new Error(W.error||"Failed to refresh status");h({type:"success",text:"Order status refreshed successfully"}),await se(),a()}catch(O){h({type:"error",text:O.message})}finally{x(!1)}}},$=async()=>{if(!l||!g){h({type:"error",text:"Please enter a service ID"});return}if(!N.trim()){h({type:"error",text:"Please enter a target link/username"});return}const O=parseInt(j);if(!O||O<=0){h({type:"error",text:"Please enter a valid quantity"});return}x(!0),h(null);try{const W=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manual_start_order",{method:"POST",body:JSON.stringify({orderId:l.id,serviceId:parseInt(g),link:N.trim(),quantity:O,providerId:Q||void 0,allowRefunded:!!l.refunded_at})}),_e=await W.json();if(!W.ok)throw new Error(_e.error||"Failed to start order");h({type:"success",text:`Order submitted successfully! Provider Order ID: ${_e.providerOrderId}`}),y(!1),await se(),a()}catch(fe){h({type:"error",text:fe.message})}finally{x(!1)}},ie=async()=>{if(!l||!k.trim()){h({type:"error",text:"Please enter refund reason"});return}const O=parseFloat(C||"0");if(isNaN(O)||O<0){h({type:"error",text:"Invalid refund amount"});return}if(O>l.price){h({type:"error",text:"Refund amount cannot exceed order price"});return}x(!0),h(null);try{const _e=await(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_refund_order",{method:"POST",body:JSON.stringify({orderId:l.id,refundAmount:O,refundReason:k.trim()})})).json();if(!_e.success)throw new Error(_e.message||"Failed to refund order");h({type:"success",text:"Order refunded successfully. Amount credited to customer wallet."}),E(!1),J(""),await se(),a()}catch(fe){h({type:"error",text:fe.message})}finally{x(!1)}},be=async()=>{if(!l||!T){h({type:"error",text:"Please select a status"});return}x(!0),h(null);try{const fe=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_update_order_status",{method:"POST",body:JSON.stringify({orderId:l.id,status:T,note:P.trim()||void 0})}),W=await fe.json();if(!fe.ok)throw new Error(W.error||"Failed to update status");h({type:"success",text:W.message}),A(!1),ae(""),z(""),await se(),a()}catch(O){h({type:"error",text:O.message})}finally{x(!1)}},Pe=O=>{navigator.clipboard.writeText(O),h({type:"success",text:"Copied to clipboard"}),setTimeout(()=>h(null),2e3)},de=O=>
884O?new Date(O).toLocaleString("tr-TR",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"N/A",H=O=>`$${O.toFixed(2)}`,me=O=>({completed:ne,processing:Ze,pending:nt,cancelled:st,failed:st})[O==null?void 0:O.toLowerCase()]||nt,ee=O=>({completed:"text-green-600",processing:"text-blue-600",pending:"text-yellow-600",cancelled:"text-red-600",failed:"text-red-600"})[O==null?void 0:O.toLowerCase()]||"text-slate-600";if(i)return e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[1400]",children:e.jsx("div",{className:"bg-white rounded-xl p-8",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"})})});if(!l)return null;const Ae=me(l.status);return e.jsxs("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-end sm:items-center justify-center z-[1400] sm:p-4",children:[e.jsxs("div",{className:"bg-white rounded-t-2xl sm:rounded-xl shadow-2xl w-full sm:max-w-4xl h-[95vh] sm:h-auto sm:max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"flex-shrink-0 bg-white border-b border-slate-200 px-4 sm:px-6 py-3 sm:py-4 flex items-center justify-between rounded-t-2xl sm:rounded-t-xl",children:[e.jsx("h2",{className:"text-lg sm:text-2xl font-bold text-slate-900",children:"Order Details"}),e.jsx("button",{onClick:s,className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5 sm:w-6 sm:h-6"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[m&&e.jsx("div",{className:`mx-4 sm:mx-6 mt-3 sm:mt-4 p-3 sm:p-4 rounded-lg text-sm ${m.type==="success"?"bg-green-50 text-green-800":"bg-red-50 text-red-800"}`,children:m.text}),e.jsxs("div",{className:"p-4 sm:p-6",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-slate-100 rounded-xl p-4 sm:p-6 mb-4 sm:mb-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3 sm:gap-4 mb-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"text-base sm:text-2xl font-bold text-slate-900 break-all",children:l.reseller_order_id?l.reseller_order_id.slice(0,8):`#${l.order_number}`}),e.jsx("button",{onClick:()=>Pe(l.reseller_order_id||l.order_number),className:"text-slate-400 hover:text-slate-600 flex-shrink-0",children:e.jsx(Ht,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 flex-wrap",children:[e.jsx(Ae,{className:`w-4 h-4 sm:w-5 sm:h-5 ${ee(l.status)}`}),e.jsx("span",{className:`text-sm sm:text-lg font-semibold ${ee(l.status)}`,children:l.status.toUpperCase()}),l.refunded_at&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 sm:px-3 py-0.5 sm:py-1 bg-red-100 text-red-800 text-xs font-semibold rounded-full",children:[e.jsx(Ka,{className:"w-3 h-3"}),"REFUNDED"]})]})]}),e.jsxs("div",{className:"sm:text-right flex-shrink-0",children:[e.jsx("div",{className:"text-2xl sm:text-3xl font-bold text-slate-900",children:H(l.price)}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-600 mt-0.5 sm:mt-1",children:l.payment_method}),l.refunded_at&&e.jsxs("div",{className:"text-xs sm:text-sm text-red-600 font-semibold mt-0.5 sm:mt-1",children:["Refunded: ",H(l.refund_amount)]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-4 text-xs sm:text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 text-slate-600",children:[e.jsx(Ds,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 flex-shrink-0"}),e.jsxs("span",{className:"truncate",children:["Created: ",de(l.created_at)]})]}),l.completed_at&&e.jsxs("div",{className:"flex items-center gap-2 text-slate-600",children:[e.jsx(ne,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 flex-shrink-0"}),e.jsxs("span",{className:"truncate",children:["Completed: ",de(l.completed_at)]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6 mb-4 sm:mb-6",children:[e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 sm:p-5",children:[e.jsxs("h4",{className:"font-semibold text-slate-900 mb-3 sm:mb-4 flex items-center gap-2 text-sm sm:text-base",children:[e.jsx(ls,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),"Customer Information"]}),e.jsxs("div",{className:"space-y-2.5 sm:space-y-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500 mb-0.5 sm:mb-1",children:"Name"}),r&&(l.user_id||(he=l.users)!=null&&he.id)?e.jsx("button",{type:"button",onClick:()=>r(l.user_id||l.users.id),className:"font-medium text-blue-600 hover:text-blue-800 hover:underline transition-colors text-left cursor-pointer select-none text-sm sm:text-base",children:l.users.full_name}):e.jsx("div",{className:"font-medium text-slate-900 text-sm sm:text-base",children:l.users.full_name})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500 mb-0.5 sm:mb-1",children:"Email"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs sm:text-sm text-slate-700 break-all min-w-0",children:l.users.email}),e.jsx("button",{onClick:()=>Pe(l.users.email),className:"text-slate-400 hover:text-slate-600 flex-shrink-0",children:e.jsx(Ht,{className:"w-3 h-3"})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500 mb-0.5 sm:mb-1",children:"Current Balance"}),e.jsx("div",{className:"font-semibold text-green-600 text-sm sm:text-base",children:H(l.users.balance)})]})]})]}),e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 sm:p-5",children:[e.jsxs("h4",{className:"font-semibold text-slate-900 mb-3 sm:mb-4 flex items-center gap-2 text-sm sm:text-base",children:[e.jsx(us,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),"Service Details"]}
884),e.jsxs("div",{className:"space-y-2.5 sm:space-y-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500 mb-0.5 sm:mb-1",children:"Platform"}),e.jsx("div",{className:"font-medium text-slate-900 text-sm sm:text-base",children:l.platform})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500 mb-0.5 sm:mb-1",children:"Service Type"}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-700",children:l.service_type})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500 mb-0.5 sm:mb-1",children:"Quantity"}),e.jsx("div",{className:"font-semibold text-slate-900 text-sm sm:text-base",children:l.quantity.toLocaleString("en-US")})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500 mb-0.5 sm:mb-1",children:"Target"}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-xs sm:text-sm text-slate-700 break-all min-w-0",children:l.link||l.username}),e.jsx("button",{onClick:()=>Pe(l.link||l.username),className:"text-slate-400 hover:text-slate-600 flex-shrink-0 mt-0.5",children:e.jsx(Ht,{className:"w-3 h-3"})})]})]})]})]})]}),e.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 sm:p-5 mb-4 sm:mb-6",children:[e.jsxs("h4",{className:"font-semibold text-slate-900 mb-3 sm:mb-4 flex items-center gap-2 text-sm sm:text-base",children:[e.jsx(er,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),"API Provider Status"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[l.provider_name&&e.jsxs("div",{className:"col-span-2",children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"Provider"}),e.jsx("div",{className:"text-xs sm:text-sm font-semibold text-slate-900",children:l.provider_name})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"Service ID"}),e.jsx("div",{className:"font-mono text-xs sm:text-sm text-slate-900",children:l.service_id||"Not set"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"Provider Order ID"}),l.provider_order_id?e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"font-mono text-xs sm:text-sm text-slate-900 break-all min-w-0",children:l.provider_order_id}),e.jsx("button",{onClick:()=>Pe(l.provider_order_id),className:"text-slate-400 hover:text-slate-600 flex-shrink-0",children:e.jsx(Ht,{className:"w-3 h-3"})})]}):e.jsx("span",{className:"text-xs sm:text-sm text-slate-500",children:"Not submitted yet"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"API Status"}),e.jsx("span",{className:`inline-flex px-2 py-0.5 sm:py-1 text-xs font-semibold rounded ${l.provider_status==="completed"?"bg-green-100 text-green-800":l.provider_status==="processing"||l.provider_status==="in progress"?"bg-blue-100 text-blue-800":l.provider_status==="pending"?"bg-yellow-100 text-yellow-800":"bg-slate-100 text-slate-800"}`,children:l.provider_status||"N/A"})]}),l.start_count!==null&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"Start Count"}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-900",children:l.start_count})]}),l.remains!==null&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"Remains"}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-900",children:l.remains})]})]}),l.api_error&&e.jsx("div",{className:"mt-3 sm:mt-4 p-2.5 sm:p-3 bg-red-50 border border-red-200 rounded-lg",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(nt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-red-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs font-semibold text-red-800 mb-0.5 sm:mb-1",children:"API Error"}),e.jsx("div",{className:"text-xs sm:text-sm text-red-700 break-all",children:l.api_error})]})]})})]}),l.refunded_at&&e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 sm:p-5 mb-4 sm:mb-6",children:[e.jsxs("h4",{className:"font-semibold text-slate-900 mb-3 sm:mb-4 flex items-center gap-2 text-sm sm:text-base",children:[e.jsx(Ka,{className:"w-4 h-4 sm:w-5 sm:h-5 text-red-600"}),"Refund Details"]}
884),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"Refund Amount"}),e.jsx("div",{className:"font-bold text-red-600 text-base sm:text-lg",children:H(l.refund_amount)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"Refunded At"}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-900",children:de(l.refunded_at)})]})]}),l.refund_reason&&e.jsxs("div",{className:"mt-3 sm:mt-4",children:[e.jsx("div",{className:"text-xs text-slate-600 mb-0.5 sm:mb-1",children:"Refund Reason"}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-900 bg-white p-2.5 sm:p-3 rounded-lg border border-red-200",children:l.refund_reason})]}),e.jsx("div",{className:"mt-3 sm:mt-4 p-2.5 sm:p-3 bg-white rounded-lg border border-red-200",children:e.jsxs("p",{className:"text-xs text-slate-600",children:[e.jsx("strong",{children:"Note:"})," Refund amount has been credited to customer wallet balance. Customer can use this balance for future orders."]})}),e.jsxs("div",{className:"mt-4 pt-4 border-t border-red-200",children:[e.jsx("p",{className:"text-xs text-slate-600 mb-2",children:"Manually resubmit this refunded order to a chosen provider and service ID. The refund record stays intact for audit purposes."}),e.jsxs("button",{onClick:()=>{y(!0),je()},disabled:d,className:"flex items-center justify-center gap-2 w-full sm:w-auto px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50 text-sm sm:text-base",children:[e.jsx(zs,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Resubmit to Provider"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4 pb-4 sm:pb-0",children:[!l.refunded_at&&e.jsxs("button",{onClick:()=>{ae(l.status),z(l.customer_note||""),A(!0)},disabled:d,className:"flex items-center justify-center gap-2 px-4 py-2.5 sm:py-3 bg-amber-600 text-white rounded-lg hover:bg-amber-700 transition-colors disabled:opacity-50 text-sm sm:text-base",children:[e.jsx(Nt,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Change Status Manually"]}),!l.refunded_at&&e.jsxs("button",{onClick:()=>{y(!0),je()},disabled:d,className:"flex items-center justify-center gap-2 px-4 py-2.5 sm:py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50 text-sm sm:text-base",children:[e.jsx(zs,{className:"w-4 h-4 sm:w-5 sm:h-5"}),l.provider_order_id?"Resend to Provider":"Start Order Manually"]}),l.provider_order_id&&!l.refunded_at&&e.jsxs("button",{onClick:Se,disabled:d,className:"flex items-center justify-center gap-2 px-4 py-2.5 sm:py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50 text-sm sm:text-base",children:[e.jsx(Ve,{className:`w-4 h-4 sm:w-5 sm:h-5 ${d?"animate-spin":""}`}),"Refresh Status from API"]}),!l.refunded_at&&e.jsxs("button",{onClick:()=>E(!0),disabled:d,className:"flex items-center justify-center gap-2 px-4 py-2.5 sm:py-3 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50 text-sm sm:text-base",children:[e.jsx(Ka,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Cancel & Refund Order"]})]})]})]})]}),f&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-end sm:items-center justify-center z-[1410] sm:p-4",children:e.jsxs("div",{className:"bg-white rounded-t-xl sm:rounded-xl w-full sm:max-w-md max-h-[90vh] sm:max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"p-4 sm:p-6 border-b border-slate-200 flex-shrink-0",children:[e.jsx("h3",{className:"text-base sm:text-xl font-bold text-slate-900",children:l!=null&&l.refunded_at?"Resubmit Refunded Order":l!=null&&l.provider_order_id?"Resend Order to Provider":"Start Order Manually"}),(l==null?void 0:l.refunded_at)&&e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This order was refunded. The refund record will be preserved; only a new provider submission is created."})]}),e.jsxs("div",{className:"p-4 sm:p-6 overflow-y-auto flex-1",children:[(l==null?void 0:l.provider_order_id)&&e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mb-4",children:e.jsxs("p",{className:"text-xs text-blue-800",children:[e.jsx("strong",{children:"Current Provider Order ID:"})," ",l.provider_order_id,e.jsx("br",{}),e.jsx("strong",{children:"Current Status:"})," ",l.provider_status||"N/A"]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Provider ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("select",{value:Q,onChange:O=>{_(O.target.value),X([]),q(!1),U("")},disabled:M,className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white text-sm",children:[e.jsx("option",{value:"",children:"Select a provider"}),I.map(O=>e.jsx("option",{value:O.id,children:O.name},O.id))]}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:M?"Loading providers...":"Select the API provider for this order"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Service ID ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"number",value:g,onChange:O=>w(O.target.value),placeholder:"Enter API service ID",className:"flex-1 px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"}),e.jsx("button",{type:"button",onClick:()=>we((l==null?void 0:l.service_type)||"instagram"),disabled:!Q||oe,className:"px-3 py-2 bg-slate-100 border border-slate-300 rounded-lg hover:bg-slate-200 transition-colors disabled:opacity-50",title:"Search services",children:oe?e.jsx(Ne,{className:"w-4 h-4 sm:w-5 sm:h-5 animate-spin"}):e.jsx(ws,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"text",value:re,onChange:O=>U(O.target.value),placeholder:"Search services...",className:"flex-1 px-3 py-2 text-sm border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",onKeyDown:O=>O.key==="Enter"&&we(re)}),e.jsx("button",{type:"button",onClick:()=>we(re),disabled:!Q||oe||!re.trim(),className:"px-3 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50 text-sm",children:"Search"})]})}),K&&e.jsx("div",{className:"mt-2 max-h-32 overflow-y-auto border border-slate-200 rounded-lg bg-white",children:oe?e.jsxs("div",{className:"p-4 text-center text-slate-500",children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin mx-auto mb-2"}),"Loading services..."]}):R.length===0?e.jsx("div",{className:"p-4 text-center text-slate-500 text-sm",children:"No services found. Try a different search term."}):e.jsx("div",{className:"divide-y divide-slate-100",children:R.map(O=>e.jsxs("button",{type:"button",onClick:()=>{w(O.service.toString()),q(!1)},className:"w-full px-3 py-2 text-left hover:bg-blue-50 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs font-bold text-blue-600",children:["ID: ",O.service]}),e.jsxs("span",{className:"text-xs text-slate-500",children:["$",O.rate,"/1K"]})]}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-700 truncate",children:O.name}),e.jsx("div",{className:"text-xs text-slate-400",children:O.category})]},O.service))})}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Select provider first, then search for services"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Target Link / Username ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:N,onChange:O=>v(O.target.value),placeholder:"https://instagram.com/p/... or @username",className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Original: ",(l==null?void 0:l.link)||(l==null?void 0:l.username)||"N/A"]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Quantity ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"number",value:j,onChange:O=>b(O.target.value),placeholder:"Enter quantity",min:"1",className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Original: ",l!=null&&l.quantity?Ya(l.quantity):"N/A"]})]}),e.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-3",children:e.jsxs("p",{className:"text-xs text-yellow-800",children:[e.jsx("strong",{children:"Note:"})," Select a provider and modify the target, service ID, and quantity before submitting.",(l==null?void 0:l.provider_order_id)&&" This will create a NEW order at the selected provider."]})})]})]}),e.jsx("div",{className:"p-4 sm:p-6 border-t border-slate-200 flex-shrink-0",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{y(!1),_(""),X([]),q(!1),U("")},className:"flex-1 px-4 py-2.5 border border-slate-300 rounded-lg hover:bg-slate-50 transition-colors text-sm",children:"Cancel"}
884),e.jsx("button",{onClick:$,disabled:d||!Q||!g||!N.trim()||!j,className:"flex-1 px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50 text-sm",children:d?"Submitting...":l!=null&&l.provider_order_id?"Resend Order":"Start Order"})]})})]})}),p&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-end sm:items-center justify-center z-[1410] sm:p-4",children:e.jsx("div",{className:"bg-white rounded-t-xl sm:rounded-xl w-full sm:max-w-md max-h-[90vh] overflow-y-auto",children:e.jsxs("div",{className:"p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:e.jsx(Ka,{className:"w-5 h-5 sm:w-6 sm:h-6 text-red-600"})}),e.jsx("h3",{className:"text-base sm:text-xl font-bold text-slate-900",children:"Cancel & Refund Order"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-3",children:e.jsxs("p",{className:"text-xs text-yellow-800",children:[e.jsx("strong",{children:"Warning:"})," This will mark the order as refunded and credit the refund amount to the customer's wallet balance. This action cannot be undone."]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Refund Amount"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500",children:"$"}),e.jsx("input",{type:"number",step:"0.01",min:"0",max:(l==null?void 0:l.price)||0,value:C,onChange:O=>S(O.target.value),placeholder:"0.00",className:"w-full pl-7 pr-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-red-500 focus:border-transparent text-sm"})]}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Maximum: $",l==null?void 0:l.price.toFixed(2)," (order total). Enter 0 for cancellation without refund."]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Refund Reason ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("textarea",{value:k,onChange:O=>J(O.target.value),placeholder:"Explain why this order is being refunded...",rows:3,className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-red-500 focus:border-transparent resize-none text-sm"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This will be visible to the customer in their order history"})]}),e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:e.jsxs("p",{className:"text-xs text-blue-800",children:[e.jsx("strong",{children:"Note:"})," The refund will be credited to the customer's wallet balance. NO payment gateway reversal will occur. The customer can use this balance for future orders."]})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{E(!1),J("")},disabled:d,className:"flex-1 px-4 py-2.5 border border-slate-300 rounded-lg hover:bg-slate-50 transition-colors disabled:opacity-50 text-sm",children:"Cancel"}),e.jsx("button",{onClick:ie,disabled:d||!k.trim(),className:"flex-1 px-4 py-2.5 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50 font-semibold text-sm",children:d?"Processing...":"Confirm Refund"})]})]})]})})}),u&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-end sm:items-center justify-center z-[1410] sm:p-4",children:e.jsx("div",{className:"bg-white rounded-t-xl sm:rounded-xl w-full sm:max-w-md max-h-[90vh] overflow-y-auto",children:e.jsxs("div",{className:"p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 bg-amber-100 rounded-lg",children:e.jsx(Nt,{className:"w-5 h-5 sm:w-6 sm:h-6 text-amber-600"})}),e.jsx("h3",{className:"text-base sm:text-xl font-bold text-slate-900",children:"Change Order Status"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-slate-50 border border-slate-200 rounded-lg p-3",children:e.jsxs("p",{className:"text-xs text-slate-600",children:[e.jsx("strong",{children:"Order:"})," ",l!=null&&l.reseller_order_id?l.reseller_order_id.slice(0,8):`#${l==null?void 0:l.order_number}`,e.jsx("br",{}),e.jsx("strong",{children:"Current Status:"})," ",(D=l==null?void 0:l.status)==null?void 0:D.toUpperCase()]})}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["New Status ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("select",{value:T,onChange:O=>ae(O.target.value),className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-transparent bg-white text-sm",children:[e.jsx("option",{value:"",children:"Select status"}),e.jsx("option",{value:"pending",children:"Pending"}),e.jsx("option",{value:"paid",children:"Paid"}),e.jsx("option",{value:"processing",children:"Processing / In Progress"}),e.jsx("option",{value:"completed",children:"Completed"}),e.jsx("option",{value:"partial",children:"Partial"}),e.jsx("option",{value:"canceled",children:"Canceled"}),e.jsx("option",{value:"failed",children:"Failed"}),e.jsx("option",{value:"refunded",children:"Refunded"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Customer Note ",l!=null&&l.customer_note?"(Existing note shown below)":"(Optional)"]}),(l==null?void 0:l.customer_note)&&e.jsxs("div",{className:"mb-2 p-2 bg-blue-50 border border-blue-200 rounded-lg",children:[e.jsx("p",{className:"text-xs text-blue-600 font-medium mb-1",children:"Current Note:"}),e.jsx("p",{className:"text-xs sm:text-sm text-blue-800",children:l.customer_note})]}),e.jsx("textarea",{value:P,onChange:O=>z(O.target.value),placeholder:"Add or update the customer note...",rows:3,className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-transparent resize-none text-sm"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This note will be visible to the customer in their dashboard."})]}),e.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-3",children:e.jsxs("p",{className:"text-xs text-yellow-800",children:[e.jsx("strong",{children:"Warning:"})," This will manually override both the order status and API status. Use this for orders that need manual intervention."]})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{A(!1),ae(""),z("")},disabled:d,className:"flex-1 px-4 py-2.5 border border-slate-300 rounded-lg hover:bg-slate-50 transition-colors disabled:opacity-50 text-sm",children:"Cancel"}),e.jsx("button",{onClick:be,disabled:d||!T||T===(l==null?void 0:l.status),className:"flex-1 px-4 py-2.5 bg-amber-600 text-white rounded-lg hover:bg-amber-700 transition-colors disabled:opacity-50 font-semibold text-sm",children:d?"Updating...":"Update Status"})]})]})]})})})]})}const zN={TR:"Turkiye",US:"ABD",GB:"Ingiltere",DE:"Almanya",FR:"Fransa",NL:"Hollanda",IT:"Italya",ES:"Ispanya",RU:"Rusya",SA:"Suudi Arabistan",AE:"BAE",IN:"Hindistan",BR:"Brezilya",CA:"Kanada",AU:"Avustralya",Unknown:"Bilinmiyor"},Gp=t=>{if(!t||t==="Unknown")return"";const s=t.toUpperCase().split("").map(a=>
884127397+a.charCodeAt(0));return String.fromCodePoint(...s)},Jp=t=>zN[t]||t;function to({userId:t,onClose:s,onRefresh:a}){const[r,l]=o.useState(null),[n,i]=o.useState(null),[c,d]=o.useState([]),[x,m]=o.useState([]),[h,f]=o.useState(!0),[y,g]=o.useState(!1),[w,N]=o.useState(""),[v,j]=o.useState("overview"),[b,p]=o.useState(!1),[E,C]=o.useState(""),[S,k]=o.useState(""),[J,u]=o.useState(!1),[A,T]=o.useState("credit"),[ae,P]=o.useState(""),[z,I]=o.useState(""),[Z,Q]=o.useState(!1),[_,M]=o.useState("credit"),[F,R]=o.useState(""),[X,re]=o.useState(""),[U,oe]=o.useState(!1),[ue,K]=o.useState(""),[q,je]=o.useState(!1),[we,se]=o.useState(!1),[Se,$]=o.useState(!1),[ie,be]=o.useState(""),[Pe,de]=o.useState(!1),[H,me]=o.useState(null),[ee,Ae]=o.useState(!1),[he,D]=o.useState(null),[O,fe]=o.useState(!1);o.useEffect(()=>{W()},[t]),o.useEffect(()=>{const pe=dt=>{dt.key==="Escape"&&!b&&!J&&!U&&!Z&&s()};return window.addEventListener("keydown",pe),()=>window.removeEventListener("keydown",pe)},[s,b,J,U,Z]);const W=async()=>{f(!0),g(!1),N("");try{const pe="https://kdqsajuhvcmxsnttdetg.supabase.co",ot={Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},Mt=fetch(`${pe}/functions/v1/get_user_detail?userId=${t}`,{method:"GET",headers:ot}).then(async Ce=>{const Ee=await Ce.text();if(!Ee||Ee.trim().length===0)return N("Empty response from server"),null;let Oe;try{Oe=JSON.parse(Ee)}catch{return N("Invalid JSON from server"),null}return Oe.success?Oe.data?Oe.data:(N("No data returned from server"),null):(N(`Backend error: ${Oe.message||Oe.error}`),null)}).catch(Ce=>(N(`Network error: ${Ce.message}`),null)),hs=fetch(`${pe}/functions/v1/get_user_orders?userId=${t}`,{method:"GET",headers:ot}).then(async Ce=>{var Dt;const Ee=await Ce.text();if(!Ee||Ee.trim().length===0)return{orders:[]};let Oe;try{Oe=JSON.parse(Ee)}catch{return{orders:[]}}return{orders:((Dt=Oe.data)==null?void 0:Dt.orders)||Oe.orders||[]}}).catch(()=>({orders:[]})),[B,V]=await Promise.all([Mt,hs]);B?(l(B.user),i(B.stats),m(B.recentTransactions||[]),g(!1),N("")):(g(!0),w||N("Failed to load user information from server")),d(V.orders||[])}catch(pe){g(!0),N(pe instanceof Error?pe.message:"Unexpected error occurred")}finally{f(!1)}},_e=async()=>{if(!E||E.length<6){me({type:"error",text:"Password must be at least 6 characters"});return}se(!0),me(null);try{const dt=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_update_user_password",{method:"POST",body:JSON.stringify({userId:t,newPassword:E,adminNote:S})});let ot;try{ot=await dt.json()}catch{throw new Error("Invalid response from server")}if(!ot.success)throw new Error(ot.message||ot.error||"Failed to update password");me({type:"success",text:ot.message||"Password updated successfully"}),p(!1),C(""),k("")}catch(pe){me({type:"error",text:pe.message})}finally{se(!1)}},Re=async()=>{$(!0),me(null),be(""),de(!1);try{const ot=await(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_send_password_reset",{method:"POST",body:JSON.stringify({userId:t})})).json();if(!ot.success)throw new Error(ot.error||"Failed to generate reset link");be(ot.resetLink),me({type:"success",text:`Reset link generated for ${ot.email}`})}catch(pe){me({type:"error",text:pe.message})}finally{$(!1)}},ve=()=>{navigator.clipboard.writeText(ie),de(!0),setTimeout(()=>de(!1),2e3)},Te=async()=>{const pe=parseFloat(ae);if(isNaN(pe)||pe<=0){me({type:"error",text:"Please enter a valid amount"});return}if(!z.trim()){me({type:"error",text:"Description is required"});return}se(!0),me(null);try{const ot=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_adjust_wallet_balance",{method:"POST",body:JSON.stringify({userId:t,amount:pe,action:A,description:z})});let Mt;try{Mt=await ot.json()}catch{throw new Error("Invalid response from server")}if(!Mt.success)throw new Error(Mt.message||Mt.error||"Failed to adjust balance");me({type:"success",text:Mt.message||`Balance ${A==="credit"?"added":"deducted"} successfully`}),u(!1),P(""),I(""),W(),a()}catch(dt){me({type:"error",text:dt.message})}finally{se(!1)}},ze=async()=>{const pe=parseFloat(F);if(isNaN(pe)||pe<=0){me({type:"error",text:"Please enter a valid amount"});return}if(!X.trim()){me({type:"error",text:"Description is required"});return}se(!0),me(null);try{const ot=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_adjust_game_balance",{method:"POST",body:JSON.stringify({userId:t,amount:pe,action:_,description:X})});let Mt;
884try{Mt=await ot.json()}catch{throw new Error("Invalid response from server")}if(!Mt.success)throw new Error(Mt.message||Mt.error||"Failed to adjust game balance");me({type:"success",text:Mt.message||`Game balance ${_==="credit"?"added":"deducted"} successfully`}),Q(!1),R(""),re(""),W(),a()}catch(dt){me({type:"error",text:dt.message})}finally{se(!1)}},it=async pe=>{se(!0),me(null);try{const ot=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_ban_user",{method:"POST",body:JSON.stringify({user_id:t,action:pe,reason:ue||void 0,block_ip:q})});let Mt;try{Mt=await ot.json()}catch{throw new Error("Invalid response from server")}if(!Mt.success)throw new Error(Mt.error||`Failed to ${pe} user`);me({type:"success",text:Mt.message||`User ${pe==="ban"?"banned":"unbanned"} successfully`}),oe(!1),K(""),je(!1),W(),a()}catch(dt){me({type:"error",text:dt.message})}finally{se(!1)}},ke=async()=>{fe(!0),me(null);try{const pe="https://kdqsajuhvcmxsnttdetg.supabase.co",ot=await(await We(`${pe}/functions/v1/admin_create_impersonation_token`,{method:"POST",body:JSON.stringify({user_id:t})})).json();if(!ot.success||!ot.token)throw new Error(ot.error||"Failed to create impersonation token");const hs=await(await We(`${pe}/functions/v1/verify_impersonation_token`,{method:"POST",body:JSON.stringify({token:ot.token})})).json();if(!hs.success||!hs.magic_link)throw new Error(hs.error||"Failed to verify impersonation token");localStorage.setItem("isImpersonating","true"),window.open(hs.magic_link,"_blank"),me({type:"success",text:"Login link opened in new tab"})}catch(pe){me({type:"error",text:pe.message||"Failed to impersonate user"})}finally{fe(!1)}},Xe=()=>{navigator.clipboard.writeText(t),Ae(!0),setTimeout(()=>Ae(!1),2e3)},ce=pe=>pe?new Date(pe).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"N/A",Le=pe=>pe?new Date(pe).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"N/A",Fe=pe=>`$${pe.toFixed(2)}`,Me=pe=>{switch(pe.toLowerCase()){case"completed":return"bg-green-100 text-green-800";case"processing":case"in_progress":case"pending":return"bg-blue-100 text-blue-800";case"partial":return"bg-yellow-100 text-yellow-800";case"cancelled":case"canceled":return"bg-orange-100 text-orange-800";case"failed":case"refunded":return"bg-red-100 text-red-800";default:return"bg-slate-100 text-slate-800"}},ft=()=>e.jsxs("div",{className:"animate-pulse space-y-4 sm:space-y-6",children:[e.jsx("div",{className:"h-32 sm:h-40 bg-gradient-to-br from-slate-100 to-slate-200 rounded-xl"}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:gap-4",children:[e.jsx("div",{className:"h-24 sm:h-28 bg-slate-200 rounded-xl"}),e.jsx("div",{className:"h-24 sm:h-28 bg-slate-200 rounded-xl"}),e.jsx("div",{className:"h-24 sm:h-28 bg-slate-200 rounded-xl"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[e.jsx("div",{className:"h-11 sm:h-12 bg-slate-200 rounded-lg"}),e.jsx("div",{className:"h-11 sm:h-12 bg-slate-200 rounded-lg"}),e.jsx("div",{className:"h-11 sm:h-12 bg-slate-200 rounded-lg"}),e.jsx("div",{className:"h-11 sm:h-12 bg-slate-200 rounded-lg"})]})]});return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 bg-black/60 z-[1300] transition-opacity backdrop-blur-sm",onClick:s}),e.jsxs("div",{className:"fixed inset-0 sm:inset-auto sm:top-0 sm:right-0 sm:h-full sm:w-[550px] md:w-[700px] lg:w-[850px] bg-white shadow-2xl z-[1301] transform transition-transform overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"sticky top-0 bg-gradient-to-r from-slate-900 to-slate-800 text-white px-4 sm:px-6 py-3 sm:py-4 flex items-center justify-between z-10 shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 bg-white/20 backdrop-blur rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(ls,{className:"w-4 h-4 sm:w-6 sm:h-6"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-base sm:text-xl font-bold truncate",children:"User Detail Panel"}),e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-300 truncate",children:"Complete user information & management"})]})]}),e.jsx("button",{onClick:s,className:"p-1.5 sm:p-2 hover:bg-white/10 rounded-lg transition-colors flex-shrink-0",children:e.jsx(ht,{className:"w-5 h-5 sm:w-6 sm:h-6"})})]}),H&&e.jsxs("div",{className:`mx-3 sm:mx-6 mt-3 sm:mt-4 p-2.5 sm:p-3 rounded-lg flex items-center gap-2 text-sm ${H.type==="success"?"bg-green-50 text-green-800 border border-green-200":"bg-red-50 text-red-800 border border-red-200"}`,children:[H.type==="success"?e.jsx(ne,{className:"w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0"}):e.jsx(nt,{className:"w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0"}),e.jsx("span",{className:"font-medium",children:H.text})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3 sm:p-6",children:h?e.jsx(ft,{}):y||!r?e.jsxs("div",{className:"text-center py-12 sm:py-16",children:[e.jsx(nt,{className:"w-16 h-16 sm:w-20 sm:h-20 text-red-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-900 text-lg sm:text-xl font-bold mb-2",children:"Failed to load user data"}),e.jsx("p",{className:"text-slate-600 text-sm mb-2",children:"Unable to fetch user information from server"}),w&&e.jsx("div",{className:"max-w-md mx-auto mb-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("p",{className:"text-red-800 text-xs font-mono",children:w})}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsxs("button",{onClick:W,className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium text-sm",children:[e.jsx(Ve,{className:"w-4 h-4"}),"Retry"]}),e.jsx("button",{onClick:s,className:"inline-flex items-center gap-2 px-4 py-2 bg-slate-200 text-slate-800 rounded-lg hover:bg-slate-300 transition-colors font-medium text-sm",children:"Close"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-600 via-blue-700 to-cyan-700 rounded-xl p-4 sm:p-6 mb-4 sm:mb-6 text-white shadow-xl",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 sm:block",children:[e.jsx("div",{className:"w-14 h-14 sm:w-20 sm:h-20 bg-white/20 backdrop-blur rounded-full flex items-center justify-center text-xl sm:text-3xl font-bold border-2 sm:border-4 border-white/30 flex-shrink-0",children:r.full_name.charAt(0).toUpperCase()}),e.jsxs("div",{className:"sm:hidden flex-1 min-w-0",children:[e.jsx("h3",{className:"text-lg font-bold truncate",children:r.full_name}),e.jsxs("div",{className:"flex items-center gap-1.5 opacity-90",children:[e.jsx(gs,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{className:"text-xs truncate",children:r.email}),r.emailVerified&&e.jsx("span",{className:"px-1.5 py-0.5 bg-green-500/90 text-white text-[10px] font-semibold rounded-full flex-shrink-0",children:"Verified"})]}),r.cardholder_name&&e.jsxs("div",{className:"flex items-center gap-1.5 opacity-90 mt-0.5",children:[e.jsx(Nt,{className:"w-3 h-3 flex-shrink-0"}),e.jsx("span",{className:"text-[11px] truncate font-semibold",children:r.cardholder_name})]})]}),e.jsx("span",{className:`sm:hidden inline-block px-2.5 py-1 rounded-full text-xs font-bold flex-shrink-0 ${r.status==="active"?"bg-green-500 text-white":"bg-red-500 text-white"}`,children:r.status.toUpperCase()})]}),e.jsxs("div",{className:"hidden sm:block flex-1 min-w-0",children:[e.jsx("h3",{className:"text-2xl font-bold mb-2 truncate",children:r.full_name}),e.jsxs("div",{className:"flex items-center gap-2 mb-2 opacity-90",children:[e.jsx(gs,{className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{className:"text-sm truncate",children:r.email}),r.emailVerified&&e.jsx("span",{className:"px-2 py-0.5 bg-green-500/90 text-white text-xs font-semibold rounded-full flex-shrink-0",children:"Verified"})]}),r.cardholder_name&&e.jsxs("div",{className:"flex items-center gap-2 mb-2 opacity-90",children:[e.jsx(Nt,{className:"w-4 h-4 flex-shrink-0"}),e.jsxs("span",{className:"text-sm truncate",children:["Kart Sahibi: ",e.jsx("span",{className:"font-semibold",children:r.cardholder_name})]})]}),r.country&&e.jsxs("div",{className:"flex items-center gap-2 mb-2 opacity-90",children:[e.jsx(wt,{className:"w-4 h-4 flex-shrink-0"}),e.jsxs("span",{className:"text-sm",children:[Gp(r.country)," ",Jp(r.country)]})]}),e.jsxs("button",{onClick:Xe,className:"flex items-center gap-1.5 text-sm opacity-75 hover:opacity-100 transition-opacity bg-white/10 px-2 py-1 rounded",children:[e.jsxs("span",{className:"font-mono text-xs",children:["ID: ",t.slice(0,8),"...",t.slice(-4)]}),ee?e.jsx(ne,{className:"w-3 h-3"}):e.jsx(Ht,{className:"w-3 h-3"})]})]}),e.jsxs("div",{className:"hidden sm:block text-right flex-shrink-0",children:[e.jsx("span",{className:`inline-block px-3 py-1.5 rounded-full text-sm font-bold ${r.status==="active"?"bg-green-500 text-white":"bg-red-500 text-white"}`,children:r.status.toUpperCase()}),e.jsxs("div",{className:"mt-2 text-xs opacity-75",children:[e.jsxs("div",{className:"flex items-center gap-1 justify-end mb-1",children:[e.jsx(Ds,{className:"w-3 h-3"}),e.jsx("span",{children:Le(r.created_at)})]}),r.lastSignIn&&e.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[e.jsx(Ze,{className:"w-3 h-3"}),e.jsxs("span",{children:["Last: ",Le(r.lastSignIn)]})]})]})]})]}),e.jsxs("div",{className:"sm:hidden mt-3 flex flex-wrap items-center gap-2 text-xs opacity-90",children:[r.country&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(wt,{className:"w-3 h-3"}),Gp(r.country)," ",Jp(r.country)]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-3 h-3"}),Le(r.created_at)]}),e.jsxs("button",{onClick:Xe,className:"flex items-center gap-1 bg-white/10 px-2 py-0.5 rounded",children:[e.jsxs("span",{className:"font-mono text-[10px]",children:["ID: ",t.slice(0,6),"...",t.slice(-4)]}),ee?e.jsx(ne,{className:"w-3 h-3"}):e.jsx(Ht,{className:"w-3 h-3"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:gap-4 mb-4 sm:mb-6",children:[e.jsxs("div",{className:"bg-gradient-to-br from-green-50 to-emerald-50 rounded-xl p-4 sm:p-5 border-2 border-green-200 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-green-700",children:[e.jsx(kt,{className:"w-4 h-4 sm:w-5 sm:h-5"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold",children:"Wallet Balance"})]}),e.jsx("div",{className:"text-2xl sm:text-3xl font-bold text-green-700",children:Fe((r.balance||0)+(r.refund_balance||0))})]}),(r.refund_balance||0)>0&&e.jsxs("div",{className:"mt-2 pt-2 border-t border-green-200 flex justify-between text-xs",children:[e.jsxs("span",{className:"text-green-600",children:["Regular: ",Fe(r.balance||0)]}),e.jsxs("span",{className:"text-amber-600",children:["Refund: ",Fe(r.refund_balance||0)]})]})]}),e.jsx("div",{className:"bg-gradient-to-br from-amber-50 to-yellow-50 rounded-xl p-4 sm:p-5 border-2 border-amber-200 shadow-sm",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-amber-700",children:[e.jsx(Xn,{className:"w-4 h-4 sm:w-5 sm:h-5"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold",children:"Oyun Bakiyesi"})]}),e.jsx("div",{className:"text-2xl sm:text-3xl font-bold text-amber-700",children:Fe(r.gift_balance||0)})]})}),e.jsx("div",{className:"bg-gradient-to-br from-blue-50 to-sky-50 rounded-xl p-4 sm:p-5 border-2 border-blue-200 shadow-sm",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-blue-700 mb-1",children:[e.jsx(Jt,{className:"w-4 h-4 sm:w-5 sm:h-5"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold",children:"Total Spending"})]}),e.jsxs("div",{className:"text-xs text-blue-600 font-medium",children:["Avg: ",Fe((n==null?void 0:n.averageOrderValue)||0)," per order"]}
884)]}),e.jsx("div",{className:"text-2xl sm:text-3xl font-bold text-blue-700",children:Fe((n==null?void 0:n.totalSpending)||0)})]})}),e.jsx("div",{className:"bg-gradient-to-br from-purple-50 to-violet-50 rounded-xl p-4 sm:p-5 border-2 border-purple-200 shadow-sm",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-purple-700 mb-1",children:[e.jsx(Ws,{className:"w-4 h-4 sm:w-5 sm:h-5"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold",children:"Total Orders"})]}),e.jsxs("div",{className:"flex gap-2 text-xs font-medium",children:[e.jsxs("span",{className:"text-green-600",children:[(n==null?void 0:n.successfulOrders)||0," done"]}),e.jsxs("span",{className:"text-red-600",children:[(n==null?void 0:n.failedOrders)||0," failed"]})]})]}),e.jsx("div",{className:"text-2xl sm:text-3xl font-bold text-purple-700",children:(n==null?void 0:n.orderCount)||0})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3 mb-4 sm:mb-6",children:[e.jsxs("button",{onClick:()=>p(!0),className:"flex items-center justify-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-3 bg-slate-900 text-white rounded-lg hover:bg-slate-800 transition-all hover:shadow-lg font-medium text-xs sm:text-sm",children:[e.jsx(Dr,{className:"w-4 h-4 sm:w-5 sm:h-5"}),e.jsx("span",{className:"hidden xs:inline",children:"Reset"})," Password"]}),e.jsxs("button",{onClick:()=>{T("credit"),u(!0)},className:"flex items-center justify-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-all hover:shadow-lg font-medium text-xs sm:text-sm",children:[e.jsx(ns,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Add Balance"]}),e.jsxs("button",{onClick:()=>{T("debit"),u(!0)},className:"flex items-center justify-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-3 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-all hover:shadow-lg font-medium text-xs sm:text-sm",children:[e.jsx(Kc,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Deduct Balance"]}),e.jsxs("button",{onClick:()=>{M("credit"),Q(!0)},className:"flex items-center justify-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-3 bg-amber-600 text-white rounded-lg hover:bg-amber-700 transition-all hover:shadow-lg font-medium text-xs sm:text-sm",children:[e.jsx(ns,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Oyun Bakiyesi +"]}),e.jsxs("button",{onClick:()=>{M("debit"),Q(!0)},className:"flex items-center justify-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-3 bg-amber-800 text-white rounded-lg hover:bg-amber-900 transition-all hover:shadow-lg font-medium text-xs sm:text-sm",children:[e.jsx(Kc,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Oyun Bakiyesi -"]}),r.status==="active"?e.jsxs("button",{onClick:()=>oe(!0),className:"flex items-center justify-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-3 bg-orange-600 text-white rounded-lg hover:bg-orange-700 transition-all hover:shadow-lg font-medium text-xs sm:text-sm",children:[e.jsx(Ka,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Ban User"]}):e.jsxs("button",{onClick:()=>it("unban"),disabled:we,className:"flex items-center justify-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2.5 sm:py-3 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 transition-all hover:shadow-lg font-medium disabled:opacity-50 text-xs sm:text-sm",children:[e.jsx(Xr,{className:"w-4 h-4 sm:w-5 sm:h-5"}),we?"...":"Unban User"]})]}),e.jsx("button",{onClick:ke,disabled:O,className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-blue-600 to-cyan-600 text-white rounded-lg hover:from-blue-700 hover:to-cyan-700 transition-all hover:shadow-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed text-sm mb-4",children:O?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),"Creating Session..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Vv,{className:"w-5 h-5"}),"Login as User",e.jsx(Gs,{className:"w-4 h-4 ml-1 opacity-70"})]})}),e.jsx("div",{className:"border-b border-slate-200 mb-4 sm:mb-6 overflow-x-auto -mx-3 px-3 sm:mx-0 sm:px-0",children:e.jsx("div",{className:"flex gap-1 min-w-max",children:[{id:"overview",label:"Overview",icon:tt},{id:"orders",label:`Orders (${c.length})`,icon:us},{id:"transactions",label:"Transactions",icon:ja}].map(pe=>e.jsxs("button",{onClick:()=>j(pe.id),className:`pb-2.5 sm:pb-3 px-3 sm:px-4 font-medium transition-all border-b-2 flex items-center gap-1.5 sm:gap-2 text-sm sm:text-base whitespace-nowrap ${v===pe.id?"text-blue-600 border-blue-600":"text-slate-600 border-transparent hover:text-slate-900 hover:border-slate-300"}`,children:[e.jsx(pe.icon,{className:"w-4 h-4"}),pe.label]},pe.id))})}
884),v==="overview"&&e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold text-slate-900 mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(tt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),"Quick Statistics"]}),e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:gap-4",children:[{label:"Successful",value:(n==null?void 0:n.successfulOrders)||0,color:"text-green-600"},{label:"Failed",value:(n==null?void 0:n.failedOrders)||0,color:"text-red-600"},{label:"Canceled",value:(n==null?void 0:n.canceledOrders)||0,color:"text-orange-600"},{label:"Avg Value",value:Fe((n==null?void 0:n.averageOrderValue)||0),color:"text-blue-600"}].map((pe,dt)=>e.jsxs("div",{className:"p-3 sm:p-4 bg-slate-50 rounded-lg border border-slate-200",children:[e.jsx("div",{className:"text-xs sm:text-sm text-slate-600 mb-1 font-medium",children:pe.label}),e.jsx("div",{className:`text-lg sm:text-2xl font-bold ${pe.color}`,children:pe.value})]},dt))})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold text-slate-900 mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(ja,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),"Recent Wallet Activity"]}),x.length===0?e.jsxs("div",{className:"text-center py-8 sm:py-12 bg-slate-50 rounded-lg border-2 border-dashed border-slate-200",children:[e.jsx(kt,{className:"w-10 h-10 sm:w-12 sm:h-12 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-600 font-medium text-sm sm:text-base",children:"No transactions yet"})]}):e.jsx("div",{className:"space-y-2",children:x.slice(0,5).map(pe=>e.jsxs("div",{className:"flex items-center justify-between p-3 sm:p-4 bg-white rounded-lg border border-slate-200 hover:border-blue-300 transition-all gap-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-semibold text-slate-900 text-sm sm:text-base truncate",children:pe.transaction_type.replace("_"," ").toUpperCase()}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-600 truncate",children:pe.description||"No description"}),e.jsx("div",{className:"text-[10px] sm:text-xs text-slate-500 mt-1",children:ce(pe.created_at)})]}),e.jsxs("div",{className:`text-base sm:text-xl font-bold flex-shrink-0 ${parseFloat(pe.amount.toString())>=0?"text-green-600":"text-red-600"}`,children:[parseFloat(pe.amount.toString())>=0?"+":"",Fe(Math.abs(parseFloat(pe.amount.toString())))]})]},pe.id))})]})]}),v==="orders"&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold text-slate-900 mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(us,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),"Order History"]}),c.length===0?e.jsxs("div",{className:"text-center py-12 sm:py-16 bg-slate-50 rounded-lg border-2 border-dashed border-slate-200",children:[e.jsx(Ws,{className:"w-12 h-12 sm:w-16 sm:h-16 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-600 font-medium text-sm sm:text-lg",children:"No orders placed yet"})]}):e.jsx("div",{className:"space-y-3",children:c.map(pe=>e.jsxs("div",{onClick:()=>D(pe.id),className:"border-2 border-slate-200 rounded-lg p-3 sm:p-4 hover:border-blue-300 hover:shadow-md transition-all bg-white cursor-pointer active:bg-blue-50",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2 sm:mb-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:gap-2",children:[e.jsx("span",{className:"font-bold text-slate-900 text-sm sm:text-base",children:pe.reseller_order_id?pe.reseller_order_id.slice(0,8):pe.payment_source==="smm_panel"?pe.id.slice(0,8):`#${pe.order_number}`}),e.jsx("span",{className:`px-2 py-0.5 text-[10px] sm:text-xs font-bold rounded-full ${Me(pe.status)}`,children:pe.status.toUpperCase()}),pe.payment_source&&(()=>{const ot={wallet:{label:"WALLET",className:"bg-emerald-100 text-emerald-700"},paypal:{label:"PAYPAL",className:"bg-blue-100 text-blue-700"},stripe:{label:"STRIPE",className:"bg-slate-200 text-slate-700"},bank_transfer:{label:"BANK TRANSFER",className:"bg-teal-100 text-teal-700"},gift_balance:{label:"GIFT BALANCE",className:"bg-gradient-to-r from-pink-500 to-rose-500 text-white"},reseller:{label:"RESELLER",className:"bg-amber-100 text-amber-700"},link_payment:{label:"LINK PAYMENT",className:"bg-cyan-100 text-cyan-700"},crypto:{label:"CRYPTO",className:"bg-orange-100 text-orange-700"}}[pe.payment_source]||{label:pe.payment_source.toUpperCase().replace(/_/g," "),className:"bg-slate-100 text-slate-600"};return e.jsx("span",{className:`px-2 py-0.5 text-[10px] sm:text-xs font-bold rounded-full ${ot.className}`,children:ot.label})})()]}),e.jsx("div",{className:"text-base sm:text-xl font-bold text-slate-900 flex-shrink-0",children:Fe(pe.price)})]}),e.jsxs("div",{className:"space-y-1.5 sm:space-y-2 text-xs sm:text-sm",children:[e.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[e.jsxs("span",{className:"text-slate-600",children:[e.jsx("span",{className:"font-medium",children:"Service:"})," ",e.jsxs("span",{className:"text-slate-900",children:[pe.platform," - ",pe.service_type]})]}),e.jsxs("span",{className:"text-slate-600",children:[e.jsx("span",{className:"font-medium",children:"Qty:"})," ",e.jsx("span",{className:"text-slate-900",children:pe.quantity.toLocaleStr
884ing("en-US")})]})]}),e.jsxs("div",{className:"text-slate-600 truncate",children:[e.jsx("span",{className:"font-medium",children:"Target:"})," ",e.jsx("span",{className:"text-slate-900",children:pe.username||pe.link})]}),e.jsx("div",{className:"text-slate-500 text-[10px] sm:text-xs",children:ce(pe.created_at)}),pe.api_error&&e.jsxs("div",{className:"p-2 bg-red-50 rounded border border-red-200 text-red-700 text-[10px] sm:text-xs truncate",children:["Error: ",pe.api_error]})]})]},pe.id))})]}),v==="transactions"&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold text-slate-900 mb-3 sm:mb-4 flex items-center gap-2",children:[e.jsx(kt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),"All Wallet Transactions"]}),x.length===0?e.jsxs("div",{className:"text-center py-12 sm:py-16 bg-slate-50 rounded-lg border-2 border-dashed border-slate-200",children:[e.jsx(ja,{className:"w-12 h-12 sm:w-16 sm:h-16 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-600 font-medium text-sm sm:text-lg",children:"No transactions recorded"})]}):e.jsx("div",{className:"space-y-2",children:x.map(pe=>{const dt=pe.transaction_type==="deposit",ot=pe.transaction_type==="admin_credit"||pe.transaction_type==="refund",Mt=pe.transaction_type==="admin_debit"||pe.transaction_type==="purchase",hs=parseFloat(pe.amount.toString())>=0,B=()=>pe.payment_method==="paypal"?e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-blue-100 flex items-center justify-center flex-shrink-0",children:e.jsx("span",{className:"text-blue-700 font-bold text-xs sm:text-sm",children:"PP"})}
884):pe.payment_method==="stripe"?e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-purple-100 flex items-center justify-center flex-shrink-0",children:e.jsx(Nt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-purple-600"})}):pe.payment_method==="crypto"?e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-orange-100 flex items-center justify-center flex-shrink-0",children:e.jsx(gn,{className:"w-4 h-4 sm:w-5 sm:h-5 text-orange-600"})}):ot?e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-green-100 flex items-center justify-center flex-shrink-0",children:e.jsx(Av,{className:"w-4 h-4 sm:w-5 sm:h-5 text-green-600"})}):Mt?e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-red-100 flex items-center justify-center flex-shrink-0",children:e.jsx(Mv,{className:"w-4 h-4 sm:w-5 sm:h-5 text-red-600"})}):e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-full bg-slate-100 flex items-center justify-center flex-shrink-0",children:e.jsx(kt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-slate-600"})}),V=()=>dt?pe.payment_method==="paypal"?"PayPal Deposit":pe.payment_method==="str
884ipe"?"Card Deposit":pe.payment_method==="crypto"?"Crypto Deposit":"Wallet Deposit":pe.transaction_type.replace(/_/g," ").toUpperCase(),Ce=()=>{if(!pe.payment_method)return null;const Ee={paypal:"bg-blue-100 text-blue-700",stripe:"bg-purple-100 text-purple-700",crypto:"bg-orange-100 text-orange-700",wallet:"bg-slate-100 text-slate-700",balance:"bg-green-100 text-green-700"};return e.jsx("span",{className:`text-[10px] sm:text-xs px-2 py-0.5 rounded-full font-medium ${Ee[pe.payment_method]||"bg-slate-100 text-slate-700"}`,children:pe.payment_method.toUpperCase()})};return e.jsxs("div",{className:`flex items-center gap-3 p-3 sm:p-4 bg-white rounded-lg border-2 transition-all ${dt?"border-blue-200 hover:border-blue-400":"border-slate-200 hover:border-blue-300"}`,children:[B(),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"font-semibold text-slate-900 text-sm sm:text-base",children:V()}),Ce()]}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-600 mt-1 truncate",children:pe.description||(dt?"Wallet balance deposit":"No description")}),e.jsxs("div",{className:"flex items-center gap-3 mt-1.5 sm:mt-2 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ze,{className:"w-3 h-3 text-slate-400"}),e.jsx("span",{className:"text-[10px] sm:text-xs text-slate-500",children:ce(pe.created_at)})]}),pe.balance_after!==void 0&&pe.balance_after!==null&&e.jsxs("span",{className:"text-[10px] sm:text-xs text-slate-500",children:["Balance: ",Fe(pe.balance_after)]}),pe.paypal_order_id&&e.jsxs("span",{className:"text-[10px] text-slate-400 font-mono",children:["#",pe.paypal_order_id.slice(-8)]}),pe.stripe_payment_intent_id&&e.jsxs("span",{className:"text-[10px] text-slate-400 font-mono",children:["#",pe.stripe_payment_intent_id.slice(-8)]})]})]}),e.jsxs("div",{className:`text-base sm:text-xl font-bold flex-shrink-0 ${hs?"text-green-600":"text-red-600"}`,children:[hs?"+":"",Fe(Math.abs(parseFloat(pe.amount.toString())))]})]},pe.id)})})]})]})})]}),b&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1310] p-4",children:e.jsxs("div",{className:"bg-white rounded-xl p-4 sm:p-6 max-w-md w-full shadow-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("h3",{className:"text-lg sm:text-xl font-bold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(lt,{className:"w-5 h-5 sm:w-6 sm:h-6 text-blue-600"}),"Reset User Password"]}),e.jsxs("div",{className:"mb-5 p-4 bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200 rounded-xl",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(cc,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"text-sm font-bold text-blue-800",children:"Send Password Reset Link"})]}),e.jsx("p",{className:"text-xs text-blue-600 mb-3",children:"Generate a secure reset link to share with the user."}),e.jsx("button",{onClick:Re,disabled:Se,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-all disabled:opacity-50 font-medium text-sm",children:Se?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"})," Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(As,{className:"w-4 h-4"})," Generate Reset Link"]})}),ie&&e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-white border border-blue-200 rounded-lg p-2",children:[e.jsx("input",{type:"text",readOnly:!0,value:ie,className:"flex-1 text-xs text-slate-600 bg-transparent outline-none truncate"}),e.jsx("button",{onClick:ve,className:`flex-shrink-0 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${Pe?"bg-green-100 text-green-700":"bg-blue-100 text-blue-700 hover:bg-blue-200"}`,children:Pe?e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ne,{className:"w-3 h-3"})," Copied"]}):e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ht,{className:"w-3 h-3"})," Copy"]})})]}),e.jsxs("p",{className:"text-xs text-green-600 font-medium flex items-center gap-1",children:[e.jsx(ne,{className:"w-3 h-3"})," Link ready - send this to the user"]})]})]}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t border-slate-200"})}),e.jsx("div",{className:"relative flex justify-center text-xs",children:e.jsx("span",{className:"bg-white px-3 text-slate-400 font-medium",children:"OR set password manually"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"New Password"}),e.jsx("input",{type:"text",value:E,onChange:pe=>C(pe.target.value),placeholder:"Enter new password (min 6 characters)",className:"w-full px-3 py-2 border-2 border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Admin Note (optional)"}),e.jsx("textarea",{value:S,onChange:pe=>k(pe.target.value),placeholder:"Reason for password reset",rows:3,className:"w-full px-3 py-2 border-2 border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{onClick:()=>{p(!1),be(""),de(!1)},className:"flex-1 px-4 py-2.5 border-2 border-slate-300 rounded-lg hover:bg-slate-50 transition-colors font-medium text-sm",children:"Cancel"}),e.jsx("button",{onClick:_e,disabled:we,className:"flex-1 px-4 py-2.5 bg-slate-900 text-white rounded-lg hover:bg-slate-800 transition-colors disabled:opacity-50 font-medium text-sm",children:we?"Updating...":"Set Password"})]})]})]})}),J&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1310] p-4",children:e.jsxs("div",{className:"bg-white rounded-xl p-4 sm:p-6 max-w-md w-full shadow-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("h3",{className:"text-lg sm:text-xl font-bold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(kt,{className:"w-5 h-5 sm:w-6 sm:h-6 text-blue-600"}),A==="credit"?"Add":"Deduct"," Balance"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>T("credit"),className:`flex-1 px-3 sm:px-4 py-2 sm:py-2.5 rounded-lg font-semibold transition-all text-sm ${A==="credit"?"bg-green-600 text-white shadow-lg":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:[e.jsx(ns,{className:"w-4 h-4 inline mr-1"}),"Add"]}),e.jsxs("button",{onClick:()=>T("debit"),className:`flex-1 px-3 sm:px-4 py-2 sm:py-2.5 rounded-lg font-semibold transition-all text-sm ${A==="debit"?"bg-red-600 text-white shadow-lg":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:[e.jsx(Kc,{className:"w-4 h-4 inline mr-1"}),"Deduct"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Amount (USD)"}),e.jsx("input",{type:"number",step:"0.01",min:"0",value:ae,onChange:pe=>P(pe.target.value),placeholder:"0.00",className:"w-full px-3 py-2 border-2 border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Description (required)"}),e.jsx("textarea",{value:z,onChange:pe=>I(pe.target.value),placeholder:"Reason for balance adjustment",rows:3,className:"w-full px-3 py-2 border-2 border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{onClick:()=>u(!1),className:"flex-1 px-4 py-2.5 border-2 border-slate-300 rounded-lg hover:bg-slate-50 transition-colors font-medium text-sm",children:"Cancel"}),e.jsx("button",{onClick:Te,disabled:we,className:`flex-1 px-4 py-2.5 text-white rounded-lg transition-colors disabled:opacity-50 font-medium text-sm ${A==="credit"?"bg-green-600 hover:bg-green-700":"bg-red-600 hover:bg-red-700"}`,children:we?"Processing...":A==="credit"?"Add":"Deduct"})]})]})]})}),Z&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1310] p-4",children:e.jsxs("div",{className:"bg-white rounded-xl p-4 sm:p-6 max-w-md w-full shadow-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("h3",{className:"text-lg sm:text-xl font-bold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Xn,{className:"w-5 h-5 sm:w-6 sm:h-6 text-amber-600"}),_==="credit"?"Add":"Deduct"," Oyun Bakiyesi"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>M("credit"),className:`flex-1 px-3 sm:px-4 py-2 sm:py-2.5 rounded-lg font-semibold transition-all text-sm ${_==="credit"?"bg-amber-600 text-white shadow-lg":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:[e.jsx(ns,{className:"w-4 h-4 inline mr-1"}),"Add"]}),e.jsxs("button",{onClick:()=>M("debit"),className:`flex-1 px-3 sm:px-4 py-2 sm:py-2.5 rounded-lg font-semibold transition-all text-sm ${_==="debit"?"bg-red-600 text-white shadow-lg":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:[e.jsx(Kc,{className:"w-4 h-4 inline mr-1"}),"Deduct"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Amount (USD)"}),e.jsx("input",{type:"number",step:"0.01",min:"0",value:F,onChange:pe=>R(pe.target.value),placeholder:"0.00",className:"w-full px-3 py-2 border-2 border-slate-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Description (required)"}),e.jsx("textarea",{value:X,onChange:pe=>re(pe.target.value),placeholder:"Reason for game balance adjustment",rows:3,className:"w-full px-3 py-2 border-2 border-slate-300 rounded-lg focus:ring-2 focus:ring-amber-500 focus:border-amber-500 text-sm"})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{onClick:()=>Q(!1),className:"flex-1 px-4 py-2.5 border-2 border-slate-300 rounded-lg hover:bg-slate-50 transition-colors font-medium text-sm",children:"Cancel"}),e.jsx("button",{onClick:ze,disabled:we,className:`flex-1 px-4 py-2.5 text-white rounded-lg transition-colors disabled:opacity-50 font-medium text-sm ${_==="credit"?"bg-amber-600 hover:bg-amber-700":"bg-red-600 hover:bg-red-700"}`,children:we?"Processing...":_==="credit"?"Add":"Deduct"})]})]})]})}),U&&r&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1310] p-4",children:e.jsxs("div",{className:"bg-white rounded-xl p-4 sm:p-6 max-w-md w-full shadow-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("h3",{className:"text-lg sm:text-xl font-bold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Ka,{className:"w-5 h-5 sm:w-6 sm:h-6 text-orange-600"}),"Ban User"]}
884),e.jsx("div",{className:"mb-4 p-3 bg-orange-50 border border-orange-200 rounded-lg",children:e.jsxs("p",{className:"text-sm text-orange-800",children:["You are about to ban ",e.jsx("strong",{className:"break-all",children:r.full_name}),"."]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Ban Reason (optional)"}),e.jsx("textarea",{value:ue,onChange:pe=>K(pe.target.value),placeholder:"Enter reason for banning this user",rows:3,className:"w-full px-3 py-2 border-2 border-slate-300 rounded-lg focus:ring-2 focus:ring-orange-500 focus:border-orange-500 text-sm"})]}),r.registration_ip&&e.jsx("div",{className:"p-3 bg-slate-50 border border-slate-200 rounded-lg",children:e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:q,onChange:pe=>je(pe.target.checked),className:"mt-1 w-4 h-4 sm:w-5 sm:h-5 rounded border-slate-300 text-orange-600 focus:ring-orange-500"}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"font-semibold text-slate-900 flex items-center gap-2 text-sm",children:[e.jsx(wt,{className:"w-4 h-4 text-slate-500 flex-shrink-0"}),"Block IP Address"]}),e.jsx("code",{className:"text-xs bg-slate-200 px-2 py-0.5 rounded mt-1 inline-block font-mono break-all",children:r.registration_ip})]})]})}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{onClick:()=>{oe(!1),K(""),je(!1)},className:"flex-1 px-4 py-2.5 border-2 border-slate-300 rounded-lg hover:bg-slate-50 transition-colors font-medium text-sm",children:"Cancel"}),e.jsx("button",{onClick:()=>it("ban"),disabled:we,className:"flex-1 px-4 py-2.5 bg-orange-600 text-white rounded-lg hover:bg-orange-700 transition-colors disabled:opacity-50 font-medium text-sm",children:we?"Processing...":"Ban User"})]})]})]})}),he&&e.jsx(Uy,{orderId:he,onClose:()=>D(null),onRefresh:W})]})}const $N={AF:"Afganistan",AL:"Arnavutluk",DZ:"Cezayir",AD:"Andorra",AO:"Angola",AR:"Arjantin",AM:"Ermenistan",AU:"Avustralya",AT:"Avusturya",AZ:"Azerbaycan",BS:"Bahamalar",BH:"Bahreyn",BD:"Banglades",BB:"Barbados",BY:"Belarus",BE:"Belcika",BZ:"Belize",BJ:"Benin",BT:"Butan",BO:"Bolivya",BA:"Bosna Hersek",BW:"Botsvana",BR:"Brezilya",BN:"Brunei",BG:"Bulgaristan",KH:"Kamboçya",CM:"Kamerun",CA:"Kanada",CL:"Sili",CN:"Cin",CO:"Kolombiya",CR:"Kosta Rika",HR:"Hirvatistan",CU:"Kuba",CY:"Kibris",CZ:"Cekya",DK:"Danimarka",DO:"Dominik Cumhuriyeti",EC:"Ekvador",EG:"Misir",SV:"El Salvador",EE:"Estonya",ET:"Etiyopya",FI:"Finlandiya",FR:"Fransa",GE:"Gurcistan",DE:"Almanya",GH:"Gana",GR:"Yunanistan",GT:"Guatemala",HN:"Honduras",HK:"Hong Kong",HU:"Macaristan",IS:"Izlanda",IN:"Hindistan",ID:"Endonezya",IR:"Iran",IQ:"Irak",IE:"Irlanda",IL:"Israil",IT:"Italya",JM:"Jamaika",JP:"Japonya",JO:"Urdun",KZ:"Kazakistan",KE:"Kenya",KW:"Kuveyt",KG:"Kirgizistan",LA:"Laos",LV:"Letonya",LB:"Lubnan",LY:"Libya",LT:"Litvanya",LU:"Luksemburg",MO:"Makao",MK:"Kuzey Makedonya",MG:"Madagaskar",MY:"Malezya",MV:"Maldivler",MT:"Malta",MX:"Meksika",MD:"Moldova",MC:"Monako",MN:"Mogolistan",ME:"Karadag",MA:"Fas",MZ:"Mozambik",MM:"Myanmar",NA:"Namibya",NP:"Nepal",NL:"Hollanda",NZ:"Yeni Zelanda",NI:"Nikaragua",NG:"Nijerya",NO:"Norvec",OM:"Umman",PK:"Pakistan",PA:"Panama",PY:"Paraguay",PE:"Peru",PH:"Filipinler",PL:"Polonya",PT:"Portekiz",PR:"Porto Riko",QA:"Katar",RO:"Romanya",RU:"Rusya",SA:"Suudi Arabistan",SN:"Senegal",RS:"Sirbistan",SG:"Singapur",SK:"Slovakya",SI:"Slovenya",ZA:"Guney Afrika",KR:"Guney Kore",ES:"Ispanya",LK:"Sri Lanka",SE:"Isvec",CH:"Isvicre",SY:"Suriye",TW:"Tayvan",TJ:"Tacikistan",TZ:"Tanzanya",TH:"Tayland",TN:"Tunus",TR:"Turkiye",TM:"Turkmenistan",UG:"Uganda",UA:"Ukrayna",AE:"BAE",GB:"Ingiltere",US:"ABD",UY:"Uruguay",UZ:"Ozbekistan",VE:"Venezuela",VN:"Vietnam",YE:"Yemen",ZM:"Zambiya",ZW:"Zimbabve",XK:"Kosova"},Wp=t=>!t||t==="UNKNOWN"||t==="XX"?"-":$N[t.toUpperCase()]||t,Hp=t=>{if(!t||t==="UNKNOWN"||t==="XX")return"";const s=t.toUpperCase();if(s.length!==2)return"";const a=[...s].map(r=>127462+r.charCodeAt(0)-65);return String.fromCodePoint(...a)},Vp=t=>{if(!t)return{label:"Direct",color:"bg-slate-100 text-slate-600"};let s="";try{s=new URL(t).hostname.replace("www.","").toLowerCase()}catch{s=t.toLowerCase()}const a=r=>r.some(l=>s===l||s.endsWith("."+l));return a(["google.com","google.co","google.com.tr"])||s.includes("google.android")?{label:"Google",color:"bg-blue-50 text-blue-700"}:a(["instagram.com","l.instagram.com"])?{label:"Instagram",color:"bg-pink-50 text-pink-700"}:a(["tiktok.com"])?{label:"TikTok",color:"bg-slate-100 text-slate-800"}:a(["youtube.com","youtu.be"])?{label:"YouTube",color:"bg-red-50 text-red-700"}:a(["twitter.com","x.com","t.co"])?{label:"X / Twitter",color:"bg-sky-50 text-sky-700"}:a(["facebook.com","fb.com","l.facebook.com","fb.me"])?{label:"Facebook",color:"bg-blue-50 text-blue-800"}:a(["duckduckgo.com"])?{label:"DuckDuckGo",color:"bg-orange-50 text-orange-700"}
884:a(["bing.com"])?{label:"Bing",color:"bg-teal-50 text-teal-700"}:{label:s||t.slice(0,30),color:"bg-amber-50 text-amber-700"}};function LN(){const[t,s]=o.useState([]),[a,r]=o.useState(!0),[l,n]=o.useState(""),[i,c]=o.useState("created_at"),[d,x]=o.useState("desc"),[m,h]=o.useState(1),[f,y]=o.useState(1),[g,w]=o.useState(0),N=20,[v,j]=o.useState(null),[b,p]=o.useState(!1),[E,C]=o.useState(!1);o.useEffect(()=>{S()},[l,i,d,m]);const S=async()=>{r(!0);try{const P="https://kdqsajuhvcmxsnttdetg.supabase.co",z="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",I=new URLSearchParams({search:l,sortBy:i,sortOrder:d,page:m.toString(),pageSize:N.toString()}),Z=await fetch(`${P}/functions/v1/get_users_list?${I}`,{headers:{Authorization:`Bearer ${z}`,"Content-Type":"application/json"}});if(!Z.ok)throw new Error("Failed to fetch users");const Q=await Z.json();s(Q.users||[]),w(Q.total||0),y(Q.totalPages||1)}catch(P){console.error("[UserManagement] Error loading users:",P)}finally{r(!1)}},k=P=>{i===P?x(d==="asc"?"desc":"asc"):(c(P),x("desc")),C(!1)},J=P=>{const z=new Date(P),I=z.toLocaleDateString("tr-TR",{year:"numeric",month:"short",day:"numeric"}),Z=z.toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"});return`${I} ${Z}`},u=P=>`$${P.toFixed(2)}`,A=P=>{j(P),p(!0)},T=()=>{p(!1),j(null)},ae=()=>({full_name:"Name",email:"Email",balance:"Balance",created_at:"Date"})[i]||"Date";return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 sm:p-2.5 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl shadow-lg flex-shrink-0",children:e.jsx(mt,{className:"w-5 h-5 sm:w-6 sm:h-6 text-white"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold text-slate-900",children:"User Management"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Manage all registered users"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm bg-blue-50 px-3 py-2 rounded-lg self-start sm:self-auto",children:[e.jsx(mt,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"text-slate-600",children:"Total:"}),e.jsx("span",{className:"font-bold text-blue-700",children:g.toLocaleString()})]})]}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 shadow-sm p-3 sm:p-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 sm:w-5 sm:h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search by name or email...",value:l,onChange:P=>{n(P.target.value),h(1)},className:"w-full pl-9 sm:pl-10 pr-4 py-2 sm:py-2.5 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm sm:text-base"})]}),e.jsxs("div",{className:"relative sm:hidden",children:[e.jsxs("button",{onClick:()=>C(!E),className:"w-full flex items-center justify-between gap-2 px-4 py-2 border border-slate-300 rounded-lg bg-white text-sm",children:[e.jsxs("span",{className:"text-slate-600",children:["Sort by: ",e.jsx("span",{className:"font-medium text-slate-900",children:ae()})]}),e.jsx(is,{className:`w-4 h-4 text-slate-400 transition-transform ${E?"rotate-180":""}`})]}),E&&e.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-lg z-10",children:[{key:"full_name",label:"Name"},{key:"email",label:"Email"},{key:"balance",label:"Balance"},{key:"created_at",label:"Date"}].map(P=>e.jsxs("button",{onClick:()=>k(P.key),className:`w-full text-left px-4 py-2.5 text-sm hover:bg-slate-50 first:rounded-t-lg last:rounded-b-lg ${i===P.key?"bg-blue-50 text-blue-700 font-medium":"text-slate-700"}`,children:[P.label," ",i===P.key&&(d==="asc"?"(A-Z)":"(Z-A)")]},P.key))})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden",children:a?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):t.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(mt,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-600",children:"No users found"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-6 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:e.jsxs("button",{onClick:()=>k("full_name"),className:"flex items-center gap-1 hover:text-slate-900",children:["Name",e.jsx(ci,{className:"w-4 h-4"})]})}),e.jsx("th",{className:"text-left px-6 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:e.jsxs("button",{onClick:()=>k("email"),className:"flex items-center gap-1 hover:text-slate-900",children:["Email",e.jsx(ci,{className:"w-4 h-4"})]})}),e.jsx("th",{className:"text-left px-6 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:e.jsxs("button",{onClick:()=>k("balance"),className:"flex items-center gap-1 hover:text-slate-900",children:["Balance",e.jsx(ci,{className:"w-4 h-4"})]})}),e.jsx("th",{className:"text-left px-6 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"Total Spending"}),e.jsx("th",{className:"text-left px-6 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"Source"}),e.jsx("th",{className:"text-left px-6 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"Country"}),e.jsx("th",{className:"text-left px-6 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:e.jsxs("button",{onClick:()=>k("created_at"),className:"flex items-center gap-1 hover:text-slate-900",children:["Registered",e.jsx(ci,{className:"w-4 h-4"})]})}),e.jsx("th",{className:"text-left px-6 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:e.jsxs("button",{onClick:()=>k("status"),className:"flex items-center gap-1 hover:text-slate-900",children:["Status",e.jsx(ci,{className:"w-4 h-4"})]})})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200",children:t.map(P=>e.jsxs("tr",{onClick:()=>A(P.id),className:"hover:bg-blue-50 transition-colors cursor-pointer",children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"font-medium text-slate-900",children:P.full_name})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"text-sm text-slate-600",children:P.email})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"font-semibold text-green-600",children:u(P.balance)})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"text-sm text-slate-900",children:[u(P.totalSpending),e.jsxs("span",{className:"text-slate-500 ml-1",children:["(",P.orderCount," orders)"]}
884)]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:(()=>{const z=Vp(P.first_referrer);return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full ${z.color}`,title:P.first_referrer||"Direct",children:[e.jsx(wt,{className:"w-3 h-3"}),z.label]})})()}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"flex items-center gap-1.5 text-sm text-slate-700",children:P.country_code&&P.country_code!=="UNKNOWN"&&P.country_code!=="XX"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-base leading-none",children:Hp(P.country_code)}),e.jsx("span",{children:Wp(P.country_code)})]}):e.jsx("span",{className:"text-slate-400",children:"-"})})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"text-sm text-slate-600",children:J(P.created_at)})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${P.status==="active"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:P.status})})]},P.id))})]})}),e.jsx("div",{className:"lg:hidden divide-y divide-slate-200",children:t.map(P=>e.jsxs("div",{onClick:()=>A(P.id),className:"p-4 hover:bg-blue-50 transition-colors cursor-pointer active:bg-blue-100",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{className:"font-semibold text-slate-900 truncate",children:P.full_name}),e.jsx("span",{className:`flex-shrink-0 inline-flex px-2 py-0.5 text-[10px] font-semibold rounded-full ${P.status==="active"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:P.status})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-500",children:[e.jsx(gs,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{className:"text-sm truncate",children:P.email})]})]}),e.jsxs("div",{className:"text-right flex-shrink-0",children:[e.jsx("div",{className:"text-lg font-bold text-green-600",children:u(P.balance)}),e.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Balance"})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-slate-50 rounded-lg px-3 py-2",children:[e.jsx(ah,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Spending"}),e.jsxs("div",{className:"text-sm font-medium text-slate-900 whitespace-nowrap",children:[u(P.totalSpending),e.jsxs("span",{className:"text-slate-400 text-xs ml-1",children:["(",P.orderCount,")"]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 bg-slate-50 rounded-lg px-3 py-2",children:[e.jsx(Ds,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Registered"}),e.jsx("div",{className:"text-sm font-medium text-slate-900 whitespace-nowrap",children:J(P.created_at)})]})]}),e.jsxs("div",{className:"flex items-center gap-2 bg-slate-50 rounded-lg px-3 py-2",children:[e.jsx(wt,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Source"}),e.jsx("div",{className:"text-sm font-medium text-slate-900 whitespace-nowrap",children:Vp(P.first_referrer).label})]})]}),P.country_code&&P.country_code!=="UNKNOWN"&&P.country_code!=="XX"&&e.jsxs("div",{className:"flex items-center gap-2 bg-slate-50 rounded-lg px-3 py-2",children:[e.jsx(Fr,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Country"}),e.jsxs("div",{className:"text-sm font-medium text-slate-900 whitespace-nowrap",children:[Hp(P.country_code)," ",Wp(P.country_code)]})]})]})]})]},P.id))}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 px-4 sm:px-6 py-3 sm:py-4 border-t border-slate-200 bg-slate-50",children:[e.jsxs("div",{className:"text-xs sm:text-sm text-slate-600 order-2 sm:order-1",children:[e.jsx("span",{className:"hidden sm:inline",children:"Showing "}),(m-1)*N+1,"-",Math.min(m*N,g),e.jsx("span",{className:"hidden sm:inline",children:" of"}),e.jsx("span",{className:"sm:hidden",children:"/"})," ",g,e.jsx("span",{className:"hidden sm:inline",children:" users"})]}
884),e.jsxs("div",{className:"flex items-center gap-2 order-1 sm:order-2",children:[e.jsx("button",{onClick:()=>h(P=>Math.max(1,P-1)),disabled:m===1,className:"p-2 rounded-lg border border-slate-300 hover:bg-white disabled:opacity-50 disabled:cursor-not-allowed transition-colors bg-white",children:e.jsx(Ua,{className:"w-4 h-4 sm:w-5 sm:h-5"})}),e.jsxs("span",{className:"text-xs sm:text-sm text-slate-700 font-medium px-2 sm:px-3 min-w-[80px] sm:min-w-[100px] text-center",children:[m," / ",f]}),e.jsx("button",{onClick:()=>h(P=>Math.min(f,P+1)),disabled:m===f,className:"p-2 rounded-lg border border-slate-300 hover:bg-white disabled:opacity-50 disabled:cursor-not-allowed transition-colors bg-white",children:e.jsx(ra,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]})]})]})}),b&&v&&e.jsx(to,{userId:v,onClose:T,onRefresh:S})]})}const Yp=t=>{if(!t||t==="UNKNOWN"||t==="XX")return"";const s=t.toUpperCase();if(s.length!==2)return"";const a=[...s].map(r=>127462+r.charCodeAt(0)-65);return String.fromCodePoint(...a)},BN=t=>{if(!t||t==="UNKNOWN"||t==="XX")return"";try{return new Intl.DisplayNames(["en"],{type:"region"}).of(t.toUpperCase())||t.toUpperCase()}catch{return t.toUpperCase()}},Xp=t=>{if(!t)return{label:"Direct",color:"bg-slate-100 text-slate-600"};let s="";try{s=new URL(t).hostname.replace("www.","").toLowerCase()}catch{s=t.toLowerCase()}const a=r=>r.some(l=>s===l||s.endsWith("."+l));return a(["google.com","google.co","google.com.tr"])||s.includes("google.android")?{label:"Google",color:"bg-blue-50 text-blue-700"}:a(["instagram.com","l.instagram.com"])?{label:"Instagram",color:"bg-pink-50 text-pink-700"}:a(["tiktok.com"])?{label:"TikTok",color:"bg-slate-100 text-slate-800"}:a(["youtube.com","youtu.be"])?{label:"YouTube",color:"bg-red-50 text-red-700"}:a(["twitter.com","x.com","t.co"])?{label:"X / Twitter",color:"bg-sky-50 text-sky-700"}:a(["facebook.com","fb.com","l.facebook.com","fb.me"])?{label:"Facebook",color:"bg-blue-50 text-blue-800"}:a(["duckduckgo.com"])?{label:"DuckDuckGo",color:"bg-orange-50 text-orange-700"}:a(["bing.com"])?{label:"Bing",color:"bg-teal-50 text-teal-700"}:{label:s||t.slice(0,30),color:"bg-amber-50 text-amber-700"}},Kp=60*1e3;function UN({onViewOrder:t}){const{showAlert:s}=Vs(),[a,r]=o.useState([]),[l,n]=o.useState(!0),[i,c]=o.useState(null),[d,x]=o.use
884State(""),[m,h]=o.useState(""),[f,y]=o.useState(""),[g,w]=o.useState(""),[N,v]=o.useState("paid"),[j,b]=o.useState("created_at"),[p,E]=o.useState("desc"),[C,S]=o.useState(1),[k,J]=o.useState(1),[u,A]=o.useState(0),[T,ae]=o.useState(!1),[P,z]=o.useState(!1),[I,Z]=o.useState(!1),[Q,_]=o.useState(null),[M,F]=o.useState(Kp/1e3),[R,X]=o.useState(20),[re,U]=o.useState(""),[oe,ue]=o.useState(null),K=o.useRef(null),q=[20,50,100,500],je=o.useCallback(async(W=!1)=>{W||z(!0);try{(await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/batch_refresh_order_status",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({limit:50})})).json()).success&&(_(new Date),F(Kp/1e3),se(!0))}catch(_e){console.error("[ORDER MANAGEMENT] Failed to refresh statuses:",_e)}finally{W||z(!1)}},[]);o.useCallback(async()=>{Z(!0);try{const ve=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/retry_pending_orders",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({limit:20})})).json();ve.success?(s(`Retried ${ve.total} orders: ${ve.succeeded} succeeded, ${ve.failed} failed`,{type:"info"}),se(!0)):s(ve.error||"Failed to retry orders",{type:"error"})}catch(W){console.error("[ORDER MANAGEMENT] Failed to retry pending orders:",W),s("Failed to retry pending orders",{type:"error"})}finally{Z(!1)}},[]);const we=o.useCallback(()=>{const Re=60-new Date().getSeconds();return Re<=0?60:Re},[]);o.useEffect(()=>(F(we()),K.current=setInterval(()=>{F(W=>W<=1?(se(!0),we()):W-1)},1e3),()=>{K.current&&clearInterval(K.current)}),[we]),o.useEffect(()=>{se()},[d,m,f,g,N,j,p,C,R]),o.useEffect(()=>{const W=Ye.channel("order-management-live").on("postgres_changes",{event:"UPDATE",schema:"public",table:"orders"},_e=>{const Re=_e.new;Re!=null&&Re.id&&r(ve=>{const Te=ve.findIndex(it=>it.id===Re.id);if(Te===-1)return ve;const ze=ve.slice();return ze[Te]={...ze[Te],...Re},ze})}).on("postgres_changes",{event:"INSERT",schema:"public",table:"orders"},()=>{se(!0)}).subscribe();return()=>{Ye.removeChannel(W)}},[]);const se=async(W=!1)=>{W||n(!0),c(null);try{const _e="https://kdqsajuhvcmxsnttdetg.supabase.co",Re="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",ve=new URLSearchParams({search:d,platform:m,status:f,apiStatus:g,paymentStatus:N,sortBy:j,sortOrder:p,page:C.toString(),pageSize:R.toString()}),Te=await fetch(`${_e}/functions/v1/get_orders_list?${ve}`,{headers:{Authorization:`Bearer ${Re}`,"Content-Type":"application/json"}}),ze=Te.headers.get("content-type");if(!ze||!ze.includes("application/json")){c("INVALID_RESPONSE_FROM_SERVER"),r([]),A(0),J(1);return}let it;try{it=await Te.json()}catch{c("JSON_PARSE_FAILED"),r([]),A(0),J(1);return}if(!it.success){c(it.error||"UNKNOWN_ERROR"),r([]),A(0),J(1);return}r(it.orders||[]),A(it.total||0),J(it.totalPages||1),c(null)}catch(_e){const Re=_e instanceof Error?_e.message:"NETWORK_ERROR";c(Re),r([]),A(0),J(1)}finally{n(!1)}},Se=(W,_e)=>{t(W)},$=async(W,_e,Re)=>{if(Re.stopPropagation(),!!confirm(`Are you sure you want to delete order #${_e}? This action cannot be undone.`)){ue(W);try{const ze=await(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_delete_order",{method:"POST",body:JSON.stringify({orderId:W})})).json();ze.success?(s(`Order #${_e} deleted successfully`,{type:"info"}),r(it=>it.filter(ke=>ke.id!==W)),A(it=>it-1)):s(ze.error||"Failed to delete order",{type:"error"})}catch{s("Failed to delete order",{type:"error"})}finally{ue(null)}}},ie=(W,_e)=>{_e.stopPropagation(),navigator.clipboard.writeText(W)},be=W=>
884new Date(W).toLocaleString("tr-TR",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Pe=W=>`$${W.toFixed(2)}`,de=W=>{const _e={completed:{bg:"bg-green-100",text:"text-green-800",icon:ne},processing:{bg:"bg-blue-100",text:"text-blue-800",icon:Ze},pending:{bg:"bg-yellow-100",text:"text-yellow-800",icon:nt},paid:{bg:"bg-yellow-100",text:"text-yellow-800",icon:ne},partial:{bg:"bg-orange-100",text:"text-orange-800",icon:nt},canceled:{bg:"bg-red-100",text:"text-red-800",icon:st},cancelled:{bg:"bg-red-100",text:"text-red-800",icon:st},failed:{bg:"bg-red-100",text:"text-red-800",icon:st},refunded:{bg:"bg-purple-100",text:"text-purple-800",icon:st},created:{bg:"bg-slate-100",text:"text-slate-800",icon:Ze}},Re=_e[W==null?void 0:W.toLowerCase()]||_e.pending,ve=Re.icon;return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 text-xs font-semibold rounded-full ${Re.bg} ${Re.text}`,children:[e.jsx(ve,{className:"w-3 h-3"}),W]})},H=W=>{if(!W)return e.jsx("span",{className:"text-xs text-slate-400",children:"N/A"});const Re={completed:{bg:"bg-green-50",text:"text-green-700"},"in progress":{bg:"bg-blue-50",text:"text-blue-700"},in_progress:{bg:"bg-blue-50",text:"text-blue-700"},processing:{bg:"bg-blue-50",text:"text-blue-700"},pending:{bg:"bg-yellow-50",text:"text-yellow-700"},partial:{bg:"bg-orange-50",text:"text-orange-700"},canceled:{bg:"bg-red-50",text:"text-red-700"},cancelled:{bg:"bg-red-50",text:"text-red-700"},failed:{bg:"bg-red-50",text:"text-red-700"}}[W==null?void 0:W.toLowerCase()]||{bg:"bg-slate-50",text:"text-slate-700"};return e.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-medium rounded ${Re.bg} ${Re.text}`,children:W})},me=W=>{const _e=Math.floor(W/60),Re=W%60;return`${_e}:${Re.toString().padStart(2,"0")}`},ee=W=>{j===W?E(_e=>_e==="asc"?"desc":"asc"):(b(W),E("desc")),S(1)},Ae=({column:W})=>j!==W?e.jsx(ci,{className:"w-3 h-3 text-slate-300"}):p==="asc"?e.jsx(Cm,{className:"w-3 h-3 text-blue-600"}):e.jsx(Sm,{className:"w-3 h-3 text-blue-600"}),he=W=>{X(W),S(1)},D=()=>{const W=parseInt(re,10);W>=1&&W<=k&&(S(W),U(""))},O=W=>{var Re,ve,Te,ze,it,ke;return W.payment_status==="completed"?{success:!0,label:"Paid"}:W.payment_status==="pending"?{success:!1,label:"Pending"}:W.payment_status==="failed"?{success:!1,label:"Failed"}:W.provider_order_id?{success:!0,label:"Paid"}:["paid","completed","processing","partial","in_progress","queued","refunded"].includes((Re=W.status)==null?void 0:Re.toLowerCase())?{success:!0,label:"Paid"}:((ve=W.status)==null?void 0:ve.toLowerCase())==="created"||((Te=W.status)==null?void 0:Te.toLowerCase())==="pending"?{success:!1,label:"Pending"}:((ze=W.status)==null?void 0:ze.toLowerCase())==="failed"||((it=W.status)==null?void 0:it.toLowerCase())==="cancelled"||((ke=W.status)==null?void 0:ke.toLowerCase())==="canceled"?{success:!1,label:"Failed"}:{success:!1,label:"Pending"}},fe=W=>{switch(W==null?void 0:W.toLowerCase()){case"card":return Nt;case"wallet":return kt;case"crypto":return gn;default:return Jt}};return e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(Ws,{className:"w-7 h-7 sm:w-8 sm:h-8 text-blue-600 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-3xl font-bold text-slate-900",children:"Order Management"}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-600 mt-0.5",children:"Manage and track all orders"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-4 flex-wrap",children:[e.jsxs("button",{onClick:async()=>{await je(!0),se()},disabled:l||P,className:"inline-flex items-center gap-2 px-3 sm:px-4 py-2 bg-blue-600 text-white text-sm rounded-xl hover:bg-blue-700 transition-colors disabled:opacity-50",title:"Sync statuses from provider and reload orders",children:[e.jsx(Ve,{className:`w-4 h-4 ${l||P?"animate-spin":""}`}),"Reload"]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 px-3 sm:px-4 py-2 bg-slate-50 rounded-xl border border-slate-200",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),e.jsx("span",{className:"text-xs text-slate-500 hidden sm:inline",children:"Server Cron"})]}),e.jsx("div",{className:"h-4 w-px bg-slate-300"}),e.jsx("span",{className:"text-xs font-mono text-slate-600",children:me(M)}),e.jsx("button",{onClick:()=>je(!1),disabled:P,className:"p-1 sm:p-1.5 hover:bg-amber-100 rounded-lg transition-colors disabled:opacity-50",title:"Manually trigger batch refresh now",children:e.jsx(rt,{className:`w-4 h-4 text-amber-600 ${P?"animate-pulse":""}`})})]}),e.jsxs("div",{className:"text-xs sm:text-sm text-slate-600",children:["Total: ",e.jsx("span",{className:"font-semibold text-slate-900",children:u})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 shadow-sm mb-4 p-4",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search by Order ID, email...",value:d,onChange:W=>{x(W.target.value),S(1),W.target.value.trim()&&v("")},className:"w-full pl-10 pr-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("button",{onClick:()=>ae(!T),className:`px-4 py-2 rounded-lg border transition-colors flex items-center gap-2 ${T?"bg-blue-50 border-blue-300 text-blue-700":"bg-white border-slate-300 text-slate-700 hover:bg-slate-50"}`,children:[e.jsx(Yn,{className:"w-5 h-5"}),"Filters"]})]}),T&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-3 mt-4 pt-4 border-t border-slate-200",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Platform"}),e.jsxs("select",{value:m,onChange:W=>{h(W.target.value),S(1)},className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[e.jsx("option",{value:"",children:"All Platforms"}),e.jsx("option",{value:"Instagram",children:"Instagram"}),e.jsx("option",{value:"TikTok",children:"TikTok"}),e.jsx("option",{value:"YouTube",children:"YouTube"}),e.jsx("option",{value:"Twitter",children:"Twitter"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Payment Status"}),e.jsxs("select",{value:N,onChange:W=>{v(W.target.value),S(1)},className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[e.jsx("option",{value:"",children:"All Payment Status"}),e.jsx("option",{value:"paid",children:"Paid (Success)"}),e.jsx("option",{value:"pending",children:"Pending"}),e.jsx("option",{value:"failed",children:"Failed"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"System Status"}),e.jsxs("select",{value:f,onChange:W=>{y(W.target.value),S(1)},className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[e.jsx("option",{value:"",children:"All Status"}),e.jsx("option",{value:"pending",children:"Pending"}),e.jsx("option",{value:"paid",children:"Paid"}),e.jsx("option",{value:"processing",children:"Processing"}),e.jsx("option",{value:"in_progress",children:"In Progress"}),e.jsx("option",{value:"queued",children:"Queued"}),e.jsx("option",{value:"completed",children:"Completed"}),e.jsx("option",{value:"refunded",children:"Refunded"}),e.jsx("option",{value:"cancelled",children:"Cancelled"}),e.jsx("option",{value:"failed",children:"Failed"}),e.jsx("option",{value:"payment_failed",children:"Payment Failed"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"API Status"}),e.jsxs("select",{value:g,onChange:W=>{w(W.target.value),S(1)},className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[e.jsx("option",{value:"",children:"All API Status"}),e.jsx("option",{value:"pending",children:"Pending"}),e.jsx("option",{value:"processing",children:"Processing"}),e.jsx("option",{value:"in progress",children:"In Progress"}),e.jsx("option",{value:"completed",children:"Completed"}),e.jsx("option",{value:"partial",children:"Partial"}),e.jsx("option",{value:"cancelled",children:"Cancelled"})]})]})]})]}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden",children:l?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):i?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[e.jsx("div",{className:"bg-red-50 rounded-full p-4 mb-4",children:e.jsx(Fs,{className:"w-12 h-12 text-red-600"})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"Failed to Load Orders"}),e.jsxs("p",{className:"text-sm text-slate-600 mb-4 text-center max-w-md",children:[i==="INVALID_RESPONSE_FROM_SERVER"&&"The server returned an invali
884d response (non-JSON). Please try again.",i==="JSON_PARSE_FAILED"&&"Failed to parse server response. The data may be corrupted.",i==="NETWORK_ERROR"&&"Network error occurred. Please check your connection.",i==="UNKNOWN_ERROR"&&"An unknown error occurred. Please try again.",i==="DATABASE_ERROR"&&"Database error occurred. Please contact support if this persists.",!["INVALID_RESPONSE_FROM_SERVER","JSON_PARSE_FAILED","NETWORK_ERROR","UNKNOWN_ERROR","DATABASE_ERROR"].includes(i)&&i]}),e.jsxs("button",{onClick:()=>se(),className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:[e.jsx(Ve,{className:"w-4 h-4"}),"Retry"]})]}):a.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(Ws,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-600 text-lg font-medium mb-1",children:"No orders found"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Try adjusting your filters or search query"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"Order ID"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"User"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"Service"}),e.jsx("th",{onClick:()=>ee("quantity"),className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider cursor-pointer hover:text-blue-600 select-none",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["Quantity ",e.jsx(Ae,{column:"quantity"})]})}),e.jsx("th",{onClick:()=>ee("price"),className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider cursor-pointer hover:text-blue-600 select-none",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["Amount ",e.jsx(Ae,{column:"price"})]})}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"Payment"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"Source"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"Country"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider",children:"API Status"}),e.jsx("th",{onClick:()=>ee("status"),className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider cursor-pointer hover:text-blue-600 select-none",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["Status ",e.jsx(Ae,{column:"status"})]})}),e.jsx("th",{onClick:()=>ee("created_at"),className:"text-left px-4 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider cursor-pointer hover:text-blue-600 select-none",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:["Created ",e.jsx(Ae,{column:"created_at"})]})}),e.jsx("th",{className:"text-center px-2 py-3 text-xs font-medium text-slate-600 uppercase tracking-wider w-12"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200",children:a.map(W=>{var _e,Re,ve,Te;return e.jsxs("tr",{onClick:()=>Se(W.id,W.order_number),className:"hover:bg-blue-50 transition-colors cursor-pointer",children:[e.jsxs("td",{className:"px-4 py-3 whitespace-nowrap",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"font-mono text-sm text-slate-900",children:["#",W.order_number]}),e.jsx("button",{onClick:ze=>ie(W.order_number,ze),className:"text-slate-400 hover:text-slate-600",children:e.jsx(Ht,{className:"w-3 h-3"})})]}),W.provider_order_id&&e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[e.jsxs("span",{className:"text-xs text-slate-500",children:["API: ",W.provider_order_id]}),e.jsx("button",{onClick:ze=>ie(W.provider_order_id,ze),className:"text-slate-400 hover:text-slate-600",children:e.jsx(Ht,{className:"w-3 h-3"})})]})]}),e.jsxs("td",{className:"px-4 py-3 whitespace-nowrap",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-slate-900 font-medium",children:W.cardholder_name||((_e=W.user)==null?void 0:_e.full_name)||((Re=W.email)==null?void 0:Re.split("@")[0])||"Guest"}),((ve=W.user)==null?void 0:ve.status)==="banned"&&e.jsx("span",{className:"px-1.5 py-0.5 text-[10px] font-semibold bg-red-100 text-red-700 rounded",children:"BANNED"})]}),e.jsx("div",{className:"text-xs text-slate-500",children:((Te=W.user)==null?void 0:Te.email)||W.email||"N/A"})]}),e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("div",{className:"text-sm text-slate-900 font-medium",children:W.platform}),e.jsx("div",{className:"text-xs text-slate-600",children:W.service_type})]}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:e.jsx("span",{className:"text-sm text-slate-900 font-medium",children:W.quantity.toLocaleStr
884ing("en-US")})}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:e.jsx("span",{className:"text-sm font-semibold text-green-600",children:Pe(W.price)})}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:(()=>{const ze=O(W),it=fe(W.payment_method);return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded-lg text-xs font-medium ${ze.success?"bg-green-50 text-green-700 border border-green-200":ze.label==="Pending"?"bg-yellow-50 text-yellow-700 border border-yellow-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[ze.success?e.jsx(ne,{className:"w-3 h-3"}):ze.label==="Pending"?e.jsx(Ze,{className:"w-3 h-3"}):e.jsx(st,{className:"w-3 h-3"}),ze.label]}),e.jsxs("span",{className:"text-xs px-2 py-1 rounded bg-slate-100 text-slate-600 flex items-center gap-1",children:[e.jsx(it,{className:"w-3 h-3"}),W.payment_method]})]})})()}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:(()=>{const ze=Xp(W.first_referrer);return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full ${ze.color}`,children:[e.jsx(wt,{className:"w-3 h-3"}),ze.label]})})()}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:W.country_code&&W.country_code!=="UNKNOWN"?e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-xs font-medium rounded-full bg-slate-50 text-slate-700 border border-slate-200",children:[e.jsx("span",{className:"text-sm leading-none",children:Yp(W.country_code)}),BN(W.country_code)]}):e.jsx("span",{className:"text-xs text-slate-400",children:"-"})}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:H(W.provider_status)}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:de(W.status)}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",children:e.jsx("div",{className:"text-xs text-slate-600",children:be(W.created_at)})}),e.jsx("td",{className:"px-2 py-3 whitespace-nowrap text-center",children:e.jsx("button",{onClick:ze=>$(W.id,W.order_number,ze),disabled:oe===W.id,className:"p-1.5 rounded-lg text-slate-400 hover:text-red-600 hover:bg-red-50 transition-colors disabled:opacity-50",title:"Delete order",children:e.jsx(xs,{className:`w-4 h-4 ${oe===W.id?"animate-spin":""}`})})})]},W.id)})})]})}),e.jsx("div",{className:"lg:hidden divide-y divide-slate-200",children:a.map(W=>{var ve,Te,ze,it;const _e=O(W),Re=fe(W.payment_method);return e.jsxs("div",{onClick:()=>Se(W.id,W.order_number),className:"p-4 hover:bg-blue-50 transition-colors cursor-pointer",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsxs("span",{className:"font-mono text-sm text-slate-900 font-medium",children:["#",W.order_number]}),e.jsx("button",{onClick:ke=>ie(W.order_number,ke),className:"text-slate-400 hover:text-slate-600 p-1",children:e.jsx(Ht,{className:"w-3 h-3"})})]}),W.provider_order_id&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("span",{className:"text-xs text-slate-500",children:["API: ",W.provider_order_id]}),e.jsx("button",{onClick:ke=>ie(W.provider_order_id,ke),className:"text-slate-400 hover:text-slate-600 p-1",children:e.jsx(Ht,{className:"w-3 h-3"})})]})]}),e.jsx("span",{className:"text-base font-bold text-green-600 whitespace-nowrap",children:Pe(W.price)})]}),e.jsxs("div",{className:"flex items-center gap-2 mb-3 text-sm",children:[e.jsx("span",{className:"text-slate-900 font-medium truncate",children:W.cardholder_name||((ve=W.user)==null?void 0:ve.full_name)||((Te=W.email)==null?void 0:Te.split("@")[0])||"Guest"}),((ze=W.user)==null?void 0:ze.status)==="banned"&&e.jsx("span",{className:"px-1.5 py-0.5 text-[10px] font-semibold bg-red-100 text-red-700 rounded",children:"BANNED"}),e.jsx("span",{className:"text-slate-400",children:"-"}),e.jsx("span",{className:"text-slate-500 truncate",children:((it=W.user)==null?void 0:it.email)||W.email||"N/A"})]}),e.jsxs("div",{className:"flex items-center gap-2 mb-3 text-sm",children:[e.jsx("span",{className:"text-slate-700 font-medium",children:W.platform}),e.jsx("span",{className:"text-slate-400",children:"/"}),e.jsx("span",{className:"text-slate-600",children:W.service_type}),e.jsx("span",{className:"text-slate-400",children:"-"}),e.jsx("span",{className:"text-slate-900 font-medium",children:W.quantity.toLocaleStr
884ing("en-US")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[de(W.status),H(W.provider_status),e.jsxs("div",{className:`flex items-center gap-1 px-2 py-1 rounded-lg text-xs font-medium ${_e.success?"bg-green-50 text-green-700 border border-green-200":_e.label==="Pending"?"bg-yellow-50 text-yellow-700 border border-yellow-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[_e.success?e.jsx(ne,{className:"w-3 h-3"}):_e.label==="Pending"?e.jsx(Ze,{className:"w-3 h-3"}):e.jsx(st,{className:"w-3 h-3"}),_e.label]}),e.jsxs("span",{className:"text-xs px-2 py-1 rounded bg-slate-100 text-slate-600 flex items-center gap-1",children:[e.jsx(Re,{className:"w-3 h-3"}),W.payment_method]}),(()=>{const ke=Xp(W.first_referrer);return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full ${ke.color}`,children:[e.jsx(wt,{className:"w-3 h-3"}),ke.label]})})(),W.country_code&&W.country_code!=="UNKNOWN"&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full bg-slate-50 text-slate-700 border border-slate-200",children:[e.jsx("span",{className:"text-sm leading-none",children:Yp(W.country_code)}),W.country_code.toUpperCase()]}),e.jsx("span",{className:"text-xs text-slate-500 ml-auto",children:be(W.created_at)}),e.jsx("button",{onClick:ke=>$(W.id,W.order_number,ke),disabled:oe===W.id,className:"p-1.5 rounded-lg text-slate-400 hover:text-red-600 hover:bg-red-50 transition-colors disabled:opacity-50 ml-1",title:"Delete order",children:e.jsx(xs,{className:`w-4 h-4 ${oe===W.id?"animate-spin":""}`})})]})]},W.id)})}),e.jsx("div",{className:"border-t border-slate-200 bg-slate-50/80",children:e.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 sm:px-6 sm:py-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 w-full sm:w-auto",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-slate-500 whitespace-nowrap",children:"Sayfa basina:"}),e.jsx("div",{className:"inline-flex rounded-lg border border-slate-200 bg-white overflow-hidden",children:q.map(W=>e.jsx("button",{onClick:()=>he(W),className:`px-2.5 py-1.5 text-xs font-medium transition-colors ${R===W?"bg-blue-600 text-white":"text-slate-600 hover:bg-slate-100"}`,children:W},W))})]}),e.jsx("div",{className:"hidden sm:block h-4 w-px bg-slate-200"}),e.jsxs("span",{className:"hidden sm:inline text-xs text-slate-500",children:[e.jsx("span",{className:"font-semibold text-slate-700",children:(C-1)*R+1})," - ",e.jsx("span",{className:"font-semibold text-slate-700",children:Math.min(C*R,u)})," / ",e.jsx("span",{className:"font-semibold text-slate-700",children:u.toLocaleString()})," sonuc"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[e.jsx("button",{onClick:()=>S(1),disabled:C===1,className:"p-1.5 sm:p-2 rounded-lg border border-slate-200 bg-white hover:bg-slate-50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",title:"Ilk sayfa",children:e.jsx(Ov,{className:"w-4 h-4 text-slate-600"})}),e.jsx("button",{onClick:()=>S(W=>Math.max(1,W-1)),disabled:C===1,className:"p-1.5 sm:p-2 rounded-lg border border-slate-200 bg-white hover:bg-slate-50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",title:"Onceki sayfa",children:e.jsx(Ua,{className:"w-4 h-4 text-slate-600"})}),e.jsxs("div",{className:"flex items-center gap-1.5 px-2",children:[e.jsx("span",{className:"text-xs text-slate-500",children:"Sayfa"}),e.jsx("input",{type:"text",inputMode:"numeric",value:re||C,onChange:W=>U(W.target.value.replace(/\D/g,"")),onKeyDown:W=>{W.key==="Enter"&&D()},onBlur:()=>{re&&D()},onFocus:W=>{W.target.select(),U(C.toString())},className:"w-12 sm:w-14 text-center text-xs font-semibold text-slate-700 border border-slate-200 rounded-lg py-1.5 focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"}),e.jsxs("span",{className:"text-xs text-slate-500",children:["/ ",k.toLocaleStr
884ing()]})]}),e.jsx("button",{onClick:()=>S(W=>Math.min(k,W+1)),disabled:C===k,className:"p-1.5 sm:p-2 rounded-lg border border-slate-200 bg-white hover:bg-slate-50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",title:"Sonraki sayfa",children:e.jsx(ra,{className:"w-4 h-4 text-slate-600"})}),e.jsx("button",{onClick:()=>S(k),disabled:C===k,className:"p-1.5 sm:p-2 rounded-lg border border-slate-200 bg-white hover:bg-slate-50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",title:"Son sayfa",children:e.jsx(zv,{className:"w-4 h-4 text-slate-600"})})]})]}),e.jsxs("div",{className:"sm:hidden text-center text-xs text-slate-500",children:[e.jsxs("span",{className:"font-semibold text-slate-700",children:[(C-1)*R+1,"-",Math.min(C*R,u)]})," / ",e.jsx("span",{className:"font-semibold text-slate-700",children:u.toLocaleString()})," sonuc"]})]})})]})})]})}const jx={general:"General",billing:"Billing",technical:"Technical",order:"Order Issue"},vx={low:"Low",medium:"Medium",high:"High",urgent:"Urgent"};function Qp(t){const s=[],a=t.split(` 885`);return a.forEach((r,l)=>{const n=/\*\*(.+?)\*\*|\*(.+?)\*/g;let i=0,c;const d=[];let x=0;for(;(c=n.exec(r))!==null;)c.index>i&&d.push(r.substring(i,c.index)),d.push(e.jsx("strong",{className:"font-semibold",children:c[1]||c[2]},`bold-${l}-${x++}`)),i=c.index+c[0].length;i<r.length&&d.push(r.substring(i)),d.length===0&&d.push(""),s.push(e.jsxs("span",{children:[d,l<a.length-1&&e.jsx("br",{})]},`line-${l}`))}),s}function qN({onMessagesRead:t}){const{showConfirm:s}=Vs(),[a,r]=o.useState([]),[l,n]=o.useState({total:0,open:0,in_progress:0,resolved:0,closed:0}
885),[i,c]=o.useState(null),[d,x]=o.useState([]),[m,h]=o.useState(!0),[f,y]=o.useState(!1),[g,w]=o.useState(""),[N,v]=o.useState("all"),[j,b]=o.useState(""),[p,E]=o.useState(!1),C=o.useRef(null),[S,k]=o.useState(!1),[J,u]=o.useState([]),[A,T]=o.useState(""),[ae,P]=o.useState(null),[z,I]=o.useState(""),[Z,Q]=o.useState(""),[_,M]=o.useState("general"),[F,R]=o.useState("medium"),[X,re]=o.useState(!1),[U,oe]=o.useState(!1),[ue,K]=o.useState(null),[q,je]=o.useState(""),[we,se]=o.useState(!1),[Se,$]=o.useState(null),[ie,be]=o.useState(null),[Pe,de]=o.useState(null),[H,me]=o.useState(!1),[ee,Ae]=o.useState(null),he=o.useRef(null),D=o.useRef(null);o.useEffect(()=>{O()},[N]),o.useEffect(()=>{var V;(V=C.current)==null||V.scrollIntoView({behavior:"smooth"})},[d]);const O=async()=>{h(!0);try{const V="https://kdqsajuhvcmxsnttdetg.supabase.co",Ce="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ee=N==="all"?`${V}/functions/v1/get_all_tickets`:`${V}/functions/v1/get_all_tickets?status=${N}`,Oe=await fetch(Ee,{headers:{Authorization:`Bearer ${Ce}`,"Content-Type":"application/json"}});if(Oe.ok){const xt=await Oe.json();r(xt.tickets||[]),n(xt.stats||{total:0,open:0,in_progress:0,resolved:0,closed:0})}}catch(V){console.error("Error fetching tickets:",V)}finally{h(!1)}},fe=async V=>{try{const Oe=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_ticket_messages?ticketId=${V}&isAdmin=true`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(Oe.ok){const xt=await Oe.json();x(xt.messages||[]),t==null||t()}}catch(Ce){console.error("Error fetching messages:",Ce)}},W=V=>{var Ee;const Ce=(Ee=V.clipboardData)==null?void 0:Ee.items;if(Ce){for(let Oe=0;Oe<Ce.length;Oe++)if(Ce[Oe].type.indexOf("image")!==-1){V.preventDefault();const xt=Ce[Oe].getAsFile();if(xt){const Dt=URL.createObjectURL(xt);de({file:xt,preview:Dt})}break}}},_e=V=>{var Ee;const Ce=(Ee=V.target.files)==null?void 0:Ee[0];if(Ce&&Ce.type.startsWith("image/")){const Oe=URL.createObjectURL(Ce);de({file:Ce,preview:Oe})}he.current&&(he.current.value="")},Re=()=>{Pe&&(URL.revokeObjectURL(Pe.preview),de(null))},ve=async V=>{try{const Ce="https://kdqsajuhvcmxsnttdetg.supabase.co",Ee="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Oe=V.name.split(".").pop()||"png",xt=`support_${Date.now()}_${Math.random().toString(36).substring(7)}.${Oe}`,Dt=new FormData;Dt.append("file",V),Dt.append("fileName",xt);const ts=await fetch(`${Ce}/functions/v1/upload_support_attachment`,{method:"POST",headers:{Authorization:`Bearer ${Ee}`},body:Dt});if(ts.ok)return(await ts.json()).url;const bs=await ts.text();return console.error("Upload failed:",ts.status,bs),null}catch(Ce){return console.error("Error uploading image:",Ce),null}},Te=async()=>{if(!(!g.trim()&&!Pe||!i)){y(!0),me(!!Pe);try{const V="https://kdqsajuhvcmxsnttdetg.supabase.co",Ce="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc";let Ee=[];if(Pe){const Dt=await ve(Pe.file);Dt&&Ee.push({type:"image",url:Dt,name:Pe.file.name})}const Oe=g.trim()||(Ee.length>0?"[Image]":"");(await fetch(`${V}/functions/v1/send_support_message`,{method:"POST",headers:{Authorization:`Bearer ${Ce}`,"Content-Type":"application/json"},body:JSON.stringify({ticketId:i.id,message:Oe,isAdmin:!0,attachments:Ee.length>0?Ee:void 0})})).ok&&(w(""),Re(),D.current&&(D.current.style.height="auto"),await fe(i.id),await O())}catch(V){console.error("Error sending message:",V)}finally{y(!1),me(!1)}}},ze=async(V,Ce)=>{try{(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_ticket_status",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({ticketId:V,status:Ce})})).ok&&(await O(),(i==null?void 0:i.id)===V&&c({...i,status:Ce}),E(!1))}catch(Ee){console.error("Error updating status:",Ee)}},it=async V=>{c(V),await fe(V.id)},ke=async V=>{if(q.trim()){se(!0);try{(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/edit_support_message",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({messageId:V,newMessage:q})})).ok&&(K(null),je(""),i&&await fe(i.id))}catch(Ce){console.error("Error editing message:",Ce)}finally{se(!1)}}},Xe=async V=>{if(await s("Are you sure you want to delete this message?",{title:"Delete Message",type:"warning"})){$(V);try{(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/delete_support_message",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({messageId:V})})).ok&&i&&(await fe(i.id),await O())}catch(Ee){console.error("Error deleting message:",Ee)}finally{$(null)}}},ce=V=>{K(V.id),je(V.message)},Le=()=>{K(null),je("")},Fe=async V=>{if(!V||V.length<2){u([]);return}oe(!0);try{const Oe=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_users_list?search=${encodeURIComponent(V)}&limit=10`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(Oe.ok){const xt=await Oe.json();u(xt.users||[])}}catch(Ce){console.error("Error fetching customers:",Ce)}finally{oe(!1)}};o.useEffect(()=>{const V=setTimeout(()=>{A&&Fe(A)},300);return()=>clearTimeout(V)},[A]);const Me=async()=>
885{if(!(!ae||!z.trim()||!Z.trim())){re(!0);try{(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_create_support_ticket",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({userId:ae.id,subject:z,message:Z,category:_,priority:F})})).ok&&(k(!1),ft(),await O())}catch(V){console.error("Error creating ticket:",V)}finally{re(!1)}}},ft=()=>{P(null),T(""),I(""),Q(""),M("general"),R("medium"),u([])},pe=V=>{switch(V){case"open":return e.jsx(nt,{className:"w-4 h-4 text-blue-500"});case"in_progress":return e.jsx(Ze,{className:"w-4 h-4 text-amber-500"});case"resolved":return e.jsx(ne,{className:"w-4 h-4 text-emerald-500"});case"closed":return e.jsx(ne,{className:"w-4 h-4 text-slate-400"});default:return e.jsx(nt,{className:"w-4 h-4 text-slate-400"})}},dt=V=>{switch(V){case"open":return"bg-blue-100 text-blue-700 border-blue-200";case"in_progress":return"bg-amber-100 text-amber-700 border-amber-200";case"resolved":return"bg-emerald-100 text-emerald-700 border-emerald-200";case"closed":return"bg-slate-100 text-slate-600 border-slate-200";default:return"bg-slate-100 text-slate-600 border-slate-200"}},ot=V=>{switch(V){case"urgent":return"bg-red-100 text-red-700";case"high":return"bg-orange-100 text-orange-700";case"medium":return"bg-yellow-100 text-yellow-700";case"low":return"bg-slate-100 text-slate-600";default:return"bg-slate-100 text-slate-600"}},Mt=a.filter(V=>{if(!j)return!0;const Ce=j.toLowerCase();return V.subject.toLowerCase().includes(Ce)||V.user_email.toLowerCase().includes(Ce)||V.user_name.toLowerCase().includes(Ce)}),hs=i!==null,B=()=>{c(null),E(!1)};return e.jsxs("div",{children:[e.jsx("div",{className:`lg:hidden ${hs?"block":"hidden"}`,children:i&&e.jsxs("div",{className:"flex flex-col h-[calc(100vh-80px)] -mx-4 sm:-mx-6 -mt-4 sm:-mt-6 bg-white",children:[e.jsxs("div",{className:"flex-shrink-0 border-b border-slate-200 bg-white safe-top",children:[e.jsxs("div",{className:"flex items-center gap-3 px-3 py-3",children:[e.jsx("button",{onClick:B,className:"p-2 -ml-1 hover:bg-slate-100 rounded-xl transition-colors active:bg-slate-200",children:e.jsx(xr,{className:"w-5 h-5 text-slate-700"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-semibold text-slate-900 text-sm truncate",children:i.subject}),e.jsxs("button",{onClick:()=>be(i.user_id),className:"text-xs text-slate-500 truncate block hover:text-blue-600 transition-colors",children:[i.user_name," - ",i.user_email]})]}),e.jsx("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:e.jsx("span",{className:`text-[10px] px-2 py-1 rounded-full font-medium ${ot(i.priority)}`,children:vx[i.priority]})})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 pb-2.5 overflow-x-auto",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>E(!p),className:`flex items-center gap-1 text-xs px-2.5 py-1 rounded-full border font-medium whitespace-nowrap ${dt(i.status)}`,children:[i.status.replace("_"," "),e.jsx(is,{className:"w-3 h-3"})]}),p&&e.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-lg z-20 py-1 min-w-[140px]",children:["open","in_progress","resolved","closed"].map(V=>e.jsx("button",{onClick:()=>ze(i.id,V),className:"w-full text-left px-3 py-2.5 text-sm hover:bg-slate-50 transition-colors capitalize active:bg-slate-100",children:V.replace("_"," ")},V))})]}),e.jsxs("span",{className:"text-xs text-slate-500 flex items-center gap-1 whitespace-nowrap",children:[e.jsx(bn,{className:"w-3 h-3"}),jx[i.category]]})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-3 bg-slate-50/50",children:[d.map(V=>e.jsx("div",{className:`flex ${V.is_admin?"justify-end":"justify-start"}`,children:e.jsx("div",{className:`max-w-[88%] ${V.is_admin?"group":""}`,children:ue===V.id?e.jsxs("div",{className:"bg-white border-2 border-blue-400 rounded-2xl p-3 shadow-lg",children:[e.jsx("textarea",{value:q,onChange:Ce=>je(Ce.target.value),className:"w-full px-3 py-2 bg-slate-50 border border-slate-200 rounded-lg focus:border-blue-500 focus:outline-none text-sm resize-none",rows:3}),e.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[e.jsx("button",{onClick:Le,disabled:we,className:"px-3 py-1.5 text-sm text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:()=>ke(V.id),disabled:we||!q.trim(),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:bg-slate-400",children:[we?e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Lt,{className:"w-3.5 h-3.5"}),"Save"]})]})]}):e.jsxs("div",{className:"relative",children:[V.is_admin&&e.jsxs("div",{className:"absolute -top-2 right-0 opacity-0 group-hover:opacity-100 transition-opacity flex gap-1 z-10",children:[e.jsx("button",{onClick:()=>ce(V),className:"p-1.5 bg-white border border-slate-200 rounded-lg shadow-sm hover:bg-slate-50",title:"Edit",children:e.jsx(lm,{className:"w-3.5 h-3.5 text-slate-600"})}),e.jsx("button",{onClick:()=>Xe(V.id),disabled:Se===V.id,className:"p-1.5 bg-white border border-red-200 rounded-lg shadow-sm hover:bg-red-50",title:"Delete",children:Se
885===V.id?e.jsx(Ne,{className:"w-3.5 h-3.5 text-red-500 animate-spin"}):e.jsx(xs,{className:"w-3.5 h-3.5 text-red-500"})})]}),e.jsxs("div",{className:`rounded-2xl px-3.5 py-2.5 ${V.is_admin?"bg-gradient-to-br from-blue-600 to-cyan-500 text-white rounded-br-md":"bg-white text-slate-900 rounded-bl-md shadow-sm border border-slate-100"}`,children:[V.attachments&&V.attachments.length>0&&e.jsx("div",{className:"mb-2 space-y-2",children:V.attachments.map((Ce,Ee)=>Ce.type==="image"&&e.jsxs("button",{onClick:()=>Ae(Ce.url),className:"relative group/img block max-w-[180px] rounded-lg overflow-hidden border-2 border-white/20 hover:border-white/40 transition-colors",children:[e.jsx("img",{src:Ce.url,alt:Ce.name||"Image",className:"w-full h-auto object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover/img:bg-black/30 transition-colors flex items-center justify-center",children:e.jsx(q0,{className:"w-5 h-5 text-white opacity-0 group-hover/img:opacity-100 transition-opacity"})})]},Ee))}),V.message&&V.message!=="[Image]"&&e.jsx("p",{className:"text-sm break-words leading-relaxed",children:Qp(V.message)}),e.jsxs("p",{className:`text-[10px] mt-1 ${V.is_admin?"text-white/60":"text-slate-400"}`,children:[!V.is_admin&&e.jsx("span",{className:"font-medium",children:"Customer - "}),new Date(V.created_at).toLocaleString()]})]})]})})},V.id)),e.jsx("div",{ref:C})]}),e.jsxs("div",{className:"flex-shrink-0 border-t border-slate-200 bg-white px-3 py-2.5 safe-bottom",children:[Pe&&e.jsxs("div",{className:"mb-2 relative inline-block",children:[e.jsx("img",{src:Pe.preview,alt:"Pending",className:"max-h-24 rounded-lg border-2 border-blue-300"}),e.jsx("button",{onClick:Re,className:"absolute -top-2 -right-2 p-1 bg-red-500 text-white rounded-full hover:bg-red-600",children:e.jsx(ht,{className:"w-3 h-3"})}),H&&e.jsx("div",{className:"absolute inset-0 bg-black/50 rounded-lg flex items-center justify-center",children:e.jsx(Ne,{className:"w-5 h-5 text-white animate-spin"})})]}),e.jsxs("div",{className:"flex items-end gap-2",children:[e.jsx("input",{type:"file",ref:he,onChange:_e,accept:"image/*",className:"hidden"}),e.jsx("button",{onClick:()=>{var V;return(V=he.current)==null?void 0:V.click()},className:"flex-shrink-0 p-2.5 bg-slate-100 hover:bg-slate-200 text-slate-600 rounded-xl transition-colors active:bg-slate-300",title:"Attach image",children:e.jsx(tm,{className:"w-5 h-5"})}),e.jsx("textarea",{ref:D,value:g,onChange:V=>w(V.target.value),onKeyDown:V=>{V.key==="Enter"&&!V.shiftKey&&(V.preventDefault(),Te())},onPaste:W,placeholder:"Type your reply... (Shift+Enter for new line)",rows:1,onInput:V=>{const Ce=V.target;Ce.style.height="auto",Ce.style.height=Math.min(Ce.scrollHeight,120)+"px"},className:"flex-1 min-w-0 px-3.5 py-2.5 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm resize-none overflow-y-auto",style:{maxHeight:"120px"}}),e.jsx("button",{onClick:Te,disabled:f||!g.trim()&&!Pe,className:"flex-shrink-0 p-2.5 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 disabled:from-slate-400 disabled:to-slate-500 text-white rounded-xl transition-all active:scale-95 self-end",children:f?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(As,{className:"w-5 h-5"})})]})]})]})}),e.jsxs("div",{className:`${hs?"hidden lg:block":"block"}`,children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-slate-900",children:"Support Tickets"}),e.jsx("p",{className:"text-slate-600 text-sm mt-0.5",children:"Manage customer support requests"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>k(!0),className:"flex items-center gap-2 px-3.5 py-2 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 text-white rounded-lg transition-colors text-sm font-medium",children:[e.jsx(ns,{className:"w-4 h-4"}),e.jsx("span",{children:"New Ticket"})]}),e.jsxs("button",{onClick:O,className:"flex items-center gap-2 px-3.5 py-2 bg-slate-100 hover:bg-slate-200 rounded-lg transition-colors text-sm font-medium text-slate-700",children:[e.jsx(Ve,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Refresh"})]})]})]}),e.jsx("div",{className:"flex gap-2 mb-5 overflow-x-auto pb-1 -mx-1 px-1 scrollbar-hide",children:[{key:"all",label:"All",count:l.total,activeClass:"bg-slate-900 text-white border-slate-900",hoverClass:"hover:border-slate-300"},{key:"open",label:"Open",count:l.open,activeClass:"bg-blue-600 text-white border-blue-600",hoverClass:"hover:border-blue-300"},{key:"in_progress",label:"In Progress",count:l.in_progress,activeClass:"bg-amber-500 text-white border-amber-500",hoverClass:"hover:border-amber-300"},{key:"resolved",label:"Resolved",count:l.resolved,activeClass:"bg-emerald-600 text-white border-emerald-600",hoverClass:"hover:border-emerald-300"},{key:"closed",label:"Closed",count:l.closed,activeClass:"bg-slate-600 text-white border-slate-600",hoverClass:"hover:border-slate-400"}
885].map(V=>e.jsxs("button",{onClick:()=>v(V.key),className:`flex-shrink-0 px-4 py-2.5 rounded-xl border transition-all text-center min-w-[80px] ${N===V.key?V.activeClass:`bg-white border-slate-200 ${V.hoverClass}`}`,children:[e.jsx("div",{className:"text-lg sm:text-2xl font-bold leading-tight",children:V.count}),e.jsx("div",{className:"text-[11px] sm:text-xs opacity-70 whitespace-nowrap",children:V.label})]},V.key))}),e.jsxs("div",{className:"relative mb-5",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",value:j,onChange:V=>b(V.target.value),placeholder:"Search by subject, email, or name...",className:"w-full pl-9 pr-4 py-2.5 bg-white border border-slate-200 rounded-xl focus:border-blue-500 focus:outline-none transition text-sm"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-slate-200 bg-slate-50",children:e.jsxs("h3",{className:"font-semibold text-slate-900 text-sm",children:["Tickets (",Mt.length,")"]})}),e.jsx("div",{className:"max-h-[500px] lg:max-h-[600px] overflow-y-auto",children:m?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[e.jsx(Ne,{className:"w-8 h-8 text-blue-600 animate-spin mb-3"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Loading tickets..."})]}):Mt.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(eh,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-sm text-slate-500",children:"No tickets found"})]}):e.jsx("div",{className:"divide-y divide-slate-100",children:Mt.map(V=>e.jsxs("button",{onClick:()=>it(V),className:`w-full text-left px-4 py-3.5 hover:bg-slate-50 transition-colors active:bg-slate-100 ${(i==null?void 0:i.id)===V.id?"bg-blue-50 border-l-4 border-l-blue-600":""}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[pe(V.status),e.jsx("h4",{className:"font-medium text-slate-900 text-sm truncate",children:V.subject}),V.unread_count>0&&e.jsx("span",{className:"flex-shrink-0 w-5 h-5 bg-red-500 text-white text-[10px] font-bold rounded-full flex items-center justify-center",children:V.unread_count})]}),e.jsx("span",{className:`flex-shrink-0 text-[10px] px-2 py-0.5 rounded-full font-medium ${ot(V.priority)}`,children:vx[V.priority]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-500 mb-1.5",children:[e.jsx(ls,{className:"w-3 h-3 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:V.user_name}),e.jsx("span",{className:"text-slate-300 hidden sm:inline",children:"|"}),e.jsx(gs,{className:"w-3 h-3 flex-shrink-0 hidden sm:block"}),e.jsx("span",{className:"truncate hidden sm:inline",children:V.user_email})]}),V.last_message&&e.jsxs("p",{className:"text-xs text-slate-400 line-clamp-1 mb-1.5",children:[V.last_message.is_admin?"You: ":"",V.last_message.message]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full border font-medium ${dt(V.status)}`,children:V.status.replace("_"," ")}),e.jsx("span",{className:"text-[10px] text-slate-400",children:jx[V.category]}),e.jsx("span",{className:"text-[10px] text-slate-400",children:new Date(V.updated_at).toLocaleDateString()})]})]},V.id))})})]}),e.jsx("div",{className:"hidden lg:flex bg-white rounded-xl border border-slate-200 overflow-hidden flex-col",children:i?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border-b border-slate-200 bg-slate-50",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:i.subject}),e.jsx("button",{onClick:()=>c(null),className:"p-1 hover:bg-slate-200 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-4 h-4 text-slate-500"})})]}),e.jsxs("button",{onClick:()=>
885be(i.user_id),className:"flex items-center gap-2 text-sm text-slate-600 mb-3 hover:text-blue-600 transition-colors group",children:[e.jsx(ls,{className:"w-4 h-4"}),e.jsx("span",{className:"group-hover:underline",children:i.user_name}),e.jsx("span",{className:"text-slate-300",children:"|"}),e.jsx(gs,{className:"w-4 h-4"}),e.jsx("span",{className:"group-hover:underline",children:i.user_email})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>E(!p),className:`flex items-center gap-1 text-xs px-3 py-1.5 rounded-full border font-medium ${dt(i.status)}`,children:[i.status.replace("_"," "),e.jsx(is,{className:"w-3 h-3"})]}),p&&e.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white border border-slate-200 rounded-lg shadow-lg z-10 py-1 min-w-[140px]",children:["open","in_progress","resolved","closed"].map(V=>e.jsx("button",{onClick:()=>ze(i.id,V),className:"w-full text-left px-3 py-2 text-sm hover:bg-slate-50 transition-colors capitalize",children:V.replace("_"," ")},V))})]}),e.jsx("span",{className:`text-xs px-2.5 py-1 rounded-full ${ot(i.priority)}`,children:vx[i.priority]}),e.jsxs("span",{className:"text-xs text-slate-500 flex items-center gap-1",children:[e.jsx(bn,{className:"w-3 h-3"}),jx[i.category]]})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 max-h-[350px]",children:[d.map(V=>e.jsx("div",{className:`flex ${V.is_admin?"justify-end":"justify-start"}`,children:e.jsx("div",{className:`max-w-[85%] ${V.is_admin?"group":""}`,children:ue===V.id?e.jsxs("div",{className:"bg-white border-2 border-blue-400 rounded-2xl p-3 shadow-lg",children:[e.jsx("textarea",{value:q,onChange:Ce=>je(Ce.target.value),className:"w-full px-3 py-2 bg-slate-50 border border-slate-200 rounded-lg focus:border-blue-500 focus:outline-none text-sm resize-none",rows:3}),e.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[e.jsx("button",{onClick:Le,disabled:we,className:"px-3 py-1.5 text-sm text-slate-600 hover:bg-slate-100 rounded-lg transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:()=>ke(V.id),disabled:we||!q.trim(),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:bg-slate-400",children:[we?e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Lt,{className:"w-3.5 h-3.5"}),"Save"]})]})]}):e.jsxs("div",{className:"relative",children:[V.is_admin&&e.jsxs("div",{className:"absolute -top-2 right-0 opacity-0 group-hover:opacity-100 transition-opacity flex gap-1 z-10",children:[e.jsx("button",{onClick:()=>ce(V),className:"p-1.5 bg-white border border-slate-200 rounded-lg shadow-sm hover:bg-slate-50 transition-colors",title:"Edit message",children:e.jsx(lm,{className:"w-3.5 h-3.5 text-slate-600"})}),e.jsx("button",{onClick:()=>Xe(V.id),disabled:Se===V.id,className:"p-1.5 bg-white border border-red-200 rounded-lg shadow-sm hover:bg-red-50 transition-colors",title:"Delete message",children:Se===V.id?e.jsx(Ne,{className:"w-3.5 h-3.5 text-red-500 animate-spin"}):e.jsx(xs,{className:"w-3.5 h-3.5 text-red-500"})})]}),e.jsxs("div",{className:`rounded-2xl px-4 py-3 ${V.is_admin?"bg-gradient-to-br from-blue-600 to-cyan-500 text-white rounded-br-md":"bg-slate-100 text-slate-900 rounded-bl-md"}`,children:[V.attachments&&V.attachments.length>0&&e.jsx("div",{className:"mb-2 space-y-2",children:V.attachments.map((Ce,Ee)=>Ce.type==="image"&&e.jsxs("button",{onClick:()=>Ae(Ce.url),className:"relative group/img block max-w-[200px] rounded-lg overflow-hidden border-2 border-white/20 hover:border-white/40 transition-colors",children:[e.jsx("img",{src:Ce.url,alt:Ce.name||"Image",className:"w-full h-auto object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover/img:bg-black/30 transition-colors flex items-center justify-center",children:e.jsx(q0,{className:"w-6 h-6 text-white opacity-0 group-hover/img:opacity-100 transition-opacity"})})]},Ee))}),V.message&&V.message!=="[Image]"&&e.jsx("p",{className:"text-sm break-words",children:Qp(V.message)}),e.jsxs("p",{className:`text-xs mt-1.5 ${V.is_admin?"text-white/70":"text-slate-400"}`,children:[!V.is_admin&&e.jsx("span",{className:"font-medium",children:"Customer - "}
885),new Date(V.created_at).toLocaleString()]})]})]})})},V.id)),e.jsx("div",{ref:C})]}),e.jsxs("div",{className:"p-4 border-t border-slate-200 bg-white",children:[Pe&&e.jsxs("div",{className:"mb-3 relative inline-block",children:[e.jsx("img",{src:Pe.preview,alt:"Pending",className:"max-h-32 rounded-lg border-2 border-blue-300"}),e.jsx("button",{onClick:Re,className:"absolute -top-2 -right-2 p-1 bg-red-500 text-white rounded-full hover:bg-red-600 transition-colors",children:e.jsx(ht,{className:"w-3 h-3"})}),H&&e.jsx("div",{className:"absolute inset-0 bg-black/50 rounded-lg flex items-center justify-center",children:e.jsx(Ne,{className:"w-6 h-6 text-white animate-spin"})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"file",ref:he,onChange:_e,accept:"image/*",className:"hidden"}),e.jsx("button",{onClick:()=>{var V;return(V=he.current)==null?void 0:V.click()},className:"px-3 py-3 bg-slate-100 hover:bg-slate-200 text-slate-600 rounded-xl transition-colors",title:"Attach image",children:e.jsx(tm,{className:"w-5 h-5"})}),e.jsx("textarea",{ref:D,value:g,onChange:V=>w(V.target.value),onKeyDown:V=>{V.key==="Enter"&&!V.shiftKey&&(V.preventDefault(),Te())},onPaste:W,placeholder:"Type your reply... (Shift+Enter for new line, **bold**)",rows:1,onInput:V=>{const Ce=V.target;Ce.style.height="auto",Ce.style.height=Math.min(Ce.scrollHeight,150)+"px"},className:"flex-1 px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm resize-none overflow-y-auto",style:{maxHeight:"150px"}}),e.jsx("button",{onClick:Te,disabled:f||!g.trim()&&!Pe,className:"px-4 py-3 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 disabled:from-slate-400 disabled:to-slate-500 text-white rounded-xl transition-all self-end",children:f?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(As,{className:"w-5 h-5"})})]})]})]}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-8 text-center",children:[e.jsx("div",{className:"p-4 rounded-2xl bg-slate-100 mb-4",children:e.jsx(Ls,{className:"w-10 h-10 text-slate-400"})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"Select a Ticket"}),e.jsx("p",{className:"text-sm text-slate-500 max-w-xs",children:"Choose a ticket from the list to view the conversation and respond."})]})})]})]}),S&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"p-6 border-b border-slate-200",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900",children:"Create Support Ticket"}),e.jsx("button",{onClick:()=>{k(!1),ft()},className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-slate-500"})})]}),e.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Start a conversation with a customer"})]}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Select Customer"}),ae?e.jsxs("div",{className:"flex items-center justify-between p-3 bg-blue-50 border border-blue-200 rounded-xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center",children:e.jsx(ls,{className:"w-5 h-5 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:ae.full_name}),e.jsx("p",{className:"text-sm text-slate-500",children:ae.email})]})]}),e.jsx("button",{onClick:()=>{P(null),T("")},className:"p-1 hover:bg-blue-100 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-4 h-4 text-blue-600"})})]}):e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",value:A,onChange:V=>T(V.target.value),placeholder:"Search by name or email...",className:"w-full pl-10 pr-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition"}),U&&e.jsx(Ne,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400 animate-spin"}),J.length>0&&e.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white border border-slate-200 rounded-xl shadow-lg z-10 max-h-48 overflow-y-auto",children:J.map(V=>e.jsxs("button",{onClick:()=>{P(V),T(""),u([])},className:"w-full text-left px-4 py-3 hover:bg-slate-50 transition-colors flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-slate-100 rounded-full flex items-center justify-center",children:e.jsx(ls,{className:"w-4 h-4 text-slate-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900 text-sm",children:V.full_name}),e.jsx("p",{className:"text-xs text-slate-500",children:V.email})]})]},V.id))})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Subject"}),e.jsx("input",{type:"text",value:z,onChange:V=>I(V.target.value),placeholder:"Enter ticket subject...",className:"w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Category"}
885),e.jsxs("select",{value:_,onChange:V=>M(V.target.value),className:"w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition",children:[e.jsx("option",{value:"general",children:"General"}),e.jsx("option",{value:"billing",children:"Billing"}),e.jsx("option",{value:"technical",children:"Technical"}),e.jsx("option",{value:"order",children:"Order Issue"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Priority"}),e.jsxs("select",{value:F,onChange:V=>R(V.target.value),className:"w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition",children:[e.jsx("option",{value:"low",children:"Low"}),e.jsx("option",{value:"medium",children:"Medium"}),e.jsx("option",{value:"high",children:"High"}),e.jsx("option",{value:"urgent",children:"Urgent"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Message"}),e.jsx("textarea",{value:Z,onChange:V=>Q(V.target.value),placeholder:"Write your message to the customer...",rows:4,className:"w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition resize-none"})]})]}),e.jsxs("div",{className:"p-6 border-t border-slate-200 flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>{k(!1),ft()},className:"px-4 py-2.5 text-slate-700 hover:bg-slate-100 rounded-xl transition-colors font-medium",children:"Cancel"}),e.jsx("button",{onClick:Me,disabled:X||!ae||!z.trim()||!Z.trim(),className:"flex items-center gap-2 px-6 py-2.5 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 disabled:from-slate-400 disabled:to-slate-500 text-white rounded-xl transition-all font-medium",children:X?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"}),e.jsx("span",{children:"Creating..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(As,{className:"w-4 h-4"}),e.jsx("span",{children:"Create & Send"})]})})]})]})}),ie&&e.jsx(to,{userId:ie,onClose:()=>be(null),onRefresh:O}),ee&&e.jsxs("div",{className:"fixed inset-0 bg-black/90 z-[60] flex items-center justify-center p-4",onClick:()=>Ae(null),children:[e.jsx("button",{onClick:()=>Ae(null),className:"absolute top-4 right-4 p-2 bg-white/10 hover:bg-white/20 rounded-full transition-colors",children:e.jsx(ht,{className:"w-6 h-6 text-white"})}),e.jsx("img",{src:ee,alt:"Full size",className:"max-w-full max-h-full object-contain rounded-lg",onClick:V=>V.stopPropagation()})]})]})}const GN={info:{icon:hr,color:"blue",label:"Info"},warning:{icon:nt,color:"amber",label:"Warning"},success:{icon:ne,color:"emerald",label:"Success"},error:{icon:st,color:"red",label:"Error"}};function JN(){const{showConfirm:t}=Vs(),[s,a]=o.useState([]),[r,l]=o.useState(!0),[n,i]=o.useState(!1),[c,d]=o.useState(null),[x,m]=o.useState(!1),[h,f]=o.useState(null),[y,g]=o.useState({title:"",content:"",type:"info",priority:0,starts_at:new Date().toISOString().slice(0,16),expires_at:""});o.useEffect(()=>{w()},[]);const w=async()=>{l(!0);try{const J=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_announcements",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({action:"list"})});if(J.ok){const u=await J.json();a(u.announcements||[])}}catch(S){console.error("Error fetching announcements:",S)}finally{l(!1)}},N=async()=>{if(!(!y.title||!y.content)){m(!0);try{const S="https://kdqsajuhvcmxsnttdetg.supabase.co",k="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",J={action:c?"update":"create",...c&&{id:c.id},title:y.title,content:y.content,type:y.type,priority:y.priority,starts_at:new Date(y.starts_at).toISOString(),expires_at:y.expires_at?new Date(y.expires_at).toISOString():null};(await fetch(`${S}/functions/v1/admin_manage_announcements`,{method:"POST",headers:{Authorization:`Bearer ${k}`,"Content-Type":"application/json"},body:JSON.stringify(J)})).ok&&(i(!1),b(),w())}catch(S){console.error("Error saving announcement:",S)}finally{m(!1)}}},v=async S=>{try{(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_announcements",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({action:"update",id:S.id,is_active:!S.is_active})})).ok&&w()}catch(k){console.error("Error toggling announcement:",k)}},j=async S=>{if(await t("Are you sure you want to delete this announcement?",{title:"Delete Announcement",type:"warning"})){f(S);try{(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_announcements",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({action:"delete",id:S})})).ok&&w()}catch(J){console.error("Error deleting announcement:",J)}finally{f(null)}}},b=()=>
885{g({title:"",content:"",type:"info",priority:0,starts_at:new Date().toISOString().slice(0,16),expires_at:""}),d(null)},p=S=>{var k;d(S),g({title:S.title,content:S.content,type:S.type,priority:S.priority,starts_at:S.starts_at.slice(0,16),expires_at:((k=S.expires_at)==null?void 0:k.slice(0,16))||""}),i(!0)},E=S=>new Date(S).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}),C=S=>{if(!S.is_active)return!1;const k=new Date,J=new Date(S.starts_at),u=S.expires_at?new Date(S.expires_at):null;return k>=J&&(!u||k<u)};return r?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-blue-600"})}):e.jsxs("div",{className:"space-y-4 md:space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 md:p-3 bg-gradient-to-br from-amber-500 to-orange-600 rounded-xl shadow-lg shadow-orange-500/20 shrink-0",children:e.jsx(Ei,{className:"w-5 h-5 md:w-6 md:h-6 text-white"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-lg md:text-xl font-bold text-slate-900",children:"Announcements"}),e.jsx("p",{className:"text-xs md:text-sm text-slate-500",children:"Broadcast messages to all users"})]})]}),e.jsxs("button",{onClick:()=>{b(),i(!0)},className:"flex items-center justify-center gap-2 px-4 py-2.5 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 text-white rounded-xl font-medium transition-all shadow-lg shadow-blue-500/25 text-sm shrink-0",children:[e.jsx(ns,{className:"w-5 h-5"}),"New Announcement"]})]}),e.jsx("div",{className:"grid gap-3 md:gap-4",children:s.length===0?e.jsxs("div",{className:"text-center py-12 md:py-16 bg-slate-50 rounded-2xl border border-slate-200",children:[e.jsx(Ei,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-500 font-medium",children:"No announcements yet"}),e.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Create your first announcement to notify all users"})]}):s.map(S=>{const k=GN[S.type],J=k.icon,u=C(S);return e.jsx("div",{className:`bg-white rounded-xl md:rounded-2xl border transition-all hover:shadow-lg ${u?"border-green-200 shadow-md":"border-slate-200"}`,children:e.jsx("div",{className:"p-3.5 md:p-5",children:e.jsxs("div",{className:"flex items-start gap-3 md:gap-4",children:[e.jsx("div",{className:`p-2.5 md:p-3 rounded-xl shrink-0 bg-${k.color}-100`,children:e.jsx(J,{className:`w-4 h-4 md:w-5 md:h-5 text-${k.color}-600`})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 md:gap-2 mb-1",children:[e.jsx("h3",{className:"font-semibold text-slate-900 text-sm md:text-base truncate",children:S.title}),u&&e.jsxs("span",{className:"px-2 py-0.5 bg-green-100 text-green-700 text-[10px] md:text-xs font-medium rounded-full flex items-center gap-1 shrink-0",children:[e.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Live"]}),!S.is_active&&e.jsx("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-500 text-[10px] md:text-xs font-medium rounded-full shrink-0",children:"Disabled"})]}),e.jsx("p",{className:"text-slate-600 text-xs md:text-sm line-clamp-2",children:S.content})]}),e.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2 shrink-0",children:[e.jsx("button",{onClick:()=>v(S),className:`p-1.5 md:p-2 rounded-lg transition-colors ${S.is_active?"bg-green-100 text-green-600 hover:bg-green-200":"bg-slate-100 text-slate-400 hover:bg-slate-200"}`,title:S.is_active?"Disable":"Enable",children:S.is_active?e.jsx(Ct,{className:"w-3.5 h-3.5 md:w-4 md:h-4"}):e.jsx(ur,{className:"w-3.5 h-3.5 md:w-4 md:h-4"})}),e.jsx("button",{onClick:()=>p(S),className:"p-1.5 md:p-2 bg-blue-100 text-blue-600 hover:bg-blue-200 rounded-lg transition-colors",children:e.jsx(lm,{className:"w-3.5 h-3.5 md:w-4 md:h-4"})}),e.jsx("button",{onClick:()=>j(S.id),disabled:h===S.id,className:"p-1.5 md:p-2 bg-red-100 text-red-600 hover:bg-red-200 rounded-lg transition-colors disabled:opacity-50",children:h===S.id?e.jsx(Ne,{className:"w-3.5 h-3.5 md:w-4 md:h-4 animate-spin"}):e.jsx(xs,{className:"w-3.5 h-3.5 md:w-4 md:h-4"})})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5 mt-3 text-[11px] md:text-xs text-slate-500",children:[e.jsx("span",{className:`px-2 py-0.5 md:py-1 rounded-lg bg-${k.color}-50 text-${k.color}-600 font-medium`,children:k.label}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-3 h-3 md:w-3.5 md:h-3.5"}),E(S.starts_at)]}),S.expires_at&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ze,{className:"w-3 h-3 md:w-3.5 md:h-3.5"}),"Exp: ",E(S.expires_at)]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(mt,{className:"w-3 h-3 md:w-3.5 md:h-3.5"}),S.read_count," read"]}),e.jsxs("span",{className:"text-slate-400",children:["Pri: ",S.priority]})]})]})]})})},S.id)})}),n&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-end sm:items-center justify-center z-50 sm:p-4",children:e.jsxs("div",{className:"bg-white rounded-t-2xl sm:rounded-2xl shadow-2xl w-full sm:max-w-lg max-h-[92vh] sm:max-h-[90vh] overflow-hidden flex flex-col",children:[e.jsx("div",{className:"p-4 md:p-6 border-b border-slate-200 shrink-0",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-base md:text-lg font-bold text-slate-900",children:c?"Edit Announcement":"New Announcement"}),e.jsx("button",{onClick:()=>{i(!1),b()},className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-slate-500"})})]})}),e.jsxs("div",{className:"p-4 md:p-6 space-y-4 overflow-y-auto flex-1",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Title"}),e.jsx("input",{type:"text",value:y.title,onChange:S=>g({...y,title:S.target.value}),placeholder:"Announcement title...",className:"w-full px-3.5 py-2.5 md:px-4 md:py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm md:text-base"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Content"}),e.jsx("textarea",{value:y.content,onChange:S=>g({...y,content:S.target.value}),placeholder:"Write your announcement message...",rows:4,className:"w-full px-3.5 py-2.5 md:px-4 md:py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition resize-none text-sm md:text-base"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 md:gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Type"}
885),e.jsxs("select",{value:y.type,onChange:S=>g({...y,type:S.target.value}),className:"w-full px-3.5 py-2.5 md:px-4 md:py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm md:text-base",children:[e.jsx("option",{value:"info",children:"Info"}),e.jsx("option",{value:"warning",children:"Warning"}),e.jsx("option",{value:"success",children:"Success"}),e.jsx("option",{value:"error",children:"Error"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Priority"}),e.jsx("input",{type:"number",value:y.priority,onChange:S=>g({...y,priority:parseInt(S.target.value)||0}),min:"0",max:"100",className:"w-full px-3.5 py-2.5 md:px-4 md:py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm md:text-base"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 md:gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Starts At"}),e.jsx("input",{type:"datetime-local",value:y.starts_at,onChange:S=>g({...y,starts_at:S.target.value}),className:"w-full px-3.5 py-2.5 md:px-4 md:py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm md:text-base"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:"Expires At (Optional)"}),e.jsx("input",{type:"datetime-local",value:y.expires_at,onChange:S=>g({...y,expires_at:S.target.value}),className:"w-full px-3.5 py-2.5 md:px-4 md:py-3 bg-slate-50 border border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm md:text-base"})]})]})]}),e.jsxs("div",{className:"p-4 md:p-6 border-t border-slate-200 flex justify-end gap-3 shrink-0",children:[e.jsx("button",{onClick:()=>{i(!1),b()},className:"px-4 py-2.5 text-slate-700 hover:bg-slate-100 rounded-xl transition-colors font-medium text-sm",children:"Cancel"}),e.jsx("button",{onClick:N,disabled:x||!y.title||!y.content,className:"flex items-center gap-2 px-5 md:px-6 py-2.5 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 disabled:from-slate-400 disabled:to-slate-500 text-white rounded-xl transition-all font-medium text-sm",children:x?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"}),e.jsx("span",{children:"Saving..."})]}):e.jsx("span",{children:c?"Update":"Create"})})]})]})})]})}function WN(){const{showAlert:t,showConfirm:s}=Vs(),[a,r]=o.useState([]),[l,n]=o.useState(!0),[i,c]=o.useState(!1),[d,x]=o.use
885State(null),[m,h]=o.useState({display_name:"",crypto_type:"USDT",network:"TRC20",wallet_address:"",qr_code_url:"",is_active:!0});o.useEffect(()=>{f()},[]);const f=async()=>{n(!0);try{const p=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_get_crypto_wallets");if(p.ok){const E=await p.json();r(E.wallets||[])}else{const E=await p.json().catch(()=>({}));console.error("Error response:",E)}}catch(p){console.error("Error fetching wallets:",p)}finally{n(!1)}},y=async p=>{p.preventDefault();try{const E=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_crypto_wallet",{method:"POST",body:JSON.stringify({action:d?"update":"create",wallet_id:d==null?void 0:d.id,...m})});if(E.ok)await f(),c(!1),x(null),h({display_name:"",crypto_type:"USDT",network:"TRC20",wallet_address:"",qr_code_url:"",is_active:!0});else{const C=await E.json().catch(()=>({error:"Unknown error"}));t(`Error: ${C.error||"Failed to save wallet"}`,{type:"error"})}}catch(E){console.error("Error managing wallet:",E),t("Error: "+(E instanceof Error?E.message:"Unknown error"),{type:"error"})}},g=async p=>{try{await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_crypto_wallet",{method:"POST",body:JSON.stringify({action:"update",wallet_id:p.id,is_active:!p.is_active})}),await f()}catch(E){console.error("Error toggling wallet:",E)}},w=async p=>{if(await s("Are you sure you want to delete this wallet?",{title:"Delete Wallet",type:"warning"}))try{await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_crypto_wallet",{method:"POST",body:JSON.stringify({action:"delete",wallet_id:p})}),await f()}catch(C){console.error("Error deleting wallet:",C)}},N=async(p,E)=>{const C=E==="up"?p-1:p+1;if(C<0||C>=a.length)return;const S=[...a];[S[p],S[C]]=[S[C],S[p]];const k=S.map((J,u)=>({id:J.id,sort_order:u+1}));r(S);try{await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_crypto_wallet",{method:"POST",body:JSON.stringify({action:"reorder",orders:k})})}catch(J){console.error("Error reordering wallets:",J),await f()}},v=p=>{x(p),h({display_name:p.display_name,crypto_type:p.crypto_type,network:p.network,wallet_address:p.wallet_address,qr_code_url:p.qr_code_url||"",is_active:p.is_active}),c(!0)},j=["USDT","USDC","BTC","ETH","BNB","TRX"],b={USDT:["TRC20","ERC20","BEP20"],USDC:["ERC20","BEP20","Polygon","Solana"],BTC:["Bitcoin"],ETH:["ERC20"],BNB:["BEP20"],TRX:["TRC20"]};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-3 bg-gradient-to-br from-green-500 to-emerald-600 rounded-2xl",children:e.jsx(kt,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Crypto Wallets"}),e.jsx("p",{className:"text-slate-600",children:"Manage cryptocurrency payment wallets"})]})]}),e.jsxs("button",{onClick:()=>{x(null),h({display_name:"",crypto_type:"USDT",network:"TRC20",wallet_address:"",qr_code_url:"",is_active:!0}),c(!0)},className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-700 text-white rounded-xl hover:from-blue-700 hover:to-blue-800 transition-all shadow-lg hover:shadow-xl",children:[e.jsx(ns,{className:"w-5 h-5"}),"Add Wallet"]})]}),l?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"w-8 h-8 border-4 border-blue-600 border-t-transparent rounded-full animate-spin"})}):a.length===0?e.jsxs("div",{className:"bg-white rounded-2xl p-12 text-center border border-slate-200",children:[e.jsx(kt,{className:"w-16 h-16 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-600 font-medium",children:"No crypto wallets configured"}),e.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Add your first wallet to start accepting crypto payments"})]}):e.jsx("div",{className:"space-y-3",children:a.map((p,E)=>e.jsx("div",{className:`bg-white rounded-2xl p-5 border-2 transition-all ${p.is_active?"border-green-200 hover:border-green-300":"border-slate-200 opacity-60"}`,children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex flex-col items-center gap-1 flex-shrink-0",children:[e.jsx("button",{onClick:()=>N(E,"up"),disabled:E===0,className:"p-1.5 rounded-lg hover:bg-slate-100 disabled:opacity-20 disabled:cursor-not-allowed transition-colors text-slate-500 hover:text-slate-700",title:"Move up",children:e.jsx(Cm,{className:"w-4 h-4"})}),e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-lg bg-slate-100 text-xs font-bold text-slate-500",children:E+1}),e.jsx("button",{onClick:()=>N(E,"down"),disabled:E===a.length-1,className:"p-1.5 rounded-lg hover:bg-slate-100 disabled:opacity-20 disabled:cursor-not-allowed transition-colors text-slate-500 hover:text-slate-700",title:"Move down",children:e.jsx(Sm,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center ${p.is_active?"bg-green-100":"bg-slate-100"}`,children:e.jsx(kt,{className:`w-5 h-5 ${p.is_active?"text-green-600":"text-slate-400"}`})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900",children:p.display_name}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-700 text-xs font-medium rounded",children:p.crypto_type}),e.jsx("span",{className:"px-2 py-0.5 bg-teal-100 text-teal-700 text-xs font-medium rounded",children:p.network})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>g(p),className:`p-2 rounded-lg transition-colors ${p.is_active?"bg-green-100 text-green-600 hover:bg-green-200":"bg-slate-100 text-slate-400 hover:bg-slate-200"}`,title:p.is_active?"Deactivate":"Activate",children:p.is_active?e.jsx(tw,{className:"w-4 h-4"}):e.jsx(ew,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>v(p),className:"p-2 bg-blue-100 text-blue-600 rounded-lg hover:bg-blue-200 transition-colors",children:e.jsx(xy,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>w(p.id),className:"p-2 bg-red-100 text-red-600 rounded-lg hover:bg-red-200 transition-colors",children:e.jsx(xs,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Wallet Address"}),e.jsx("p",{className:"text-sm font-mono bg-slate-50 p-2 rounded-lg break-all text-slate-700",children:p.wallet_address})]}),p.qr_code_url&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"QR Code URL"}),e.jsx("p",{className:"text-sm font-mono bg-slate-50 p-2 rounded-lg break-all text-slate-700",children:p.qr_code_url})]})]})]})]})},p.id))}),i&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:[e.jsx("div",{className:"p-6 border-b border-slate-200",children:e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:d?"Edit Wallet":"Add New Wallet"})}),e.jsxs("form",{onSubmit:y,className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Display Name"}
885),e.jsx("input",{type:"text",value:m.display_name,onChange:p=>h({...m,display_name:p.target.value}),placeholder:"e.g., USDT (TRC20) Wallet",className:"w-full px-4 py-2 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent",required:!0})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Crypto Type"}),e.jsx("select",{value:m.crypto_type,onChange:p=>{var E;return h({...m,crypto_type:p.target.value,network:((E=b[p.target.value])==null?void 0:E[0])||""})},className:"w-full px-4 py-2 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent",required:!0,children:j.map(p=>e.jsx("option",{value:p,children:p},p))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Network"}),e.jsx("select",{value:m.network,onChange:p=>h({...m,network:p.target.value}),className:"w-full px-4 py-2 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent",required:!0,children:(b[m.crypto_type]||[]).map(p=>e.jsx("option",{value:p,children:p},p))})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Wallet Address"}),e.jsx("input",{type:"text",value:m.wallet_address,onChange:p=>h({...m,wallet_address:p.target.value}),placeholder:"Enter wallet address",className:"w-full px-4 py-2 border border-slate-300 rounded-xl font-mono focus:ring-2 focus:ring-blue-500 focus:border-transparent",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"QR Code URL (Optional)"}),e.jsx("input",{type:"text",value:m.qr_code_url,onChange:p=>h({...m,qr_code_url:p.target.value}),placeholder:"https://example.com/qr-code.png",className:"w-full px-4 py-2 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"checkbox",id:"is_active",checked:m.is_active,onChange:p=>h({...m,is_active:p.target.checked}),className:"w-4 h-4 text-blue-600 border-slate-300 rounded focus:ring-blue-500"}),e.jsx("label",{htmlFor:"is_active",className:"text-sm font-medium text-slate-700",children:"Active (Available for customer payments)"})]}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsxs("button",{type:"button",onClick:()=>{c(!1),x(null)},className:"flex-1 px-4 py-2 border-2 border-slate-300 text-slate-700 font-medium rounded-xl hover:bg-slate-50 transition-colors flex items-center justify-center gap-2",children:[e.jsx(ht,{className:"w-5 h-5"}),"Cancel"]}),e.jsxs("button",{type:"submit",className:"flex-1 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-700 text-white font-medium rounded-xl hover:from-blue-700 hover:to-blue-800 transition-all shadow-lg flex items-center justify-center gap-2",children:[e.jsx(Lt,{className:"w-5 h-5"}),d?"Update":"Create"]})]})]})]})})]})}function HN(){var z,I,Z,Q;const{showAlert:t}=Vs(),[s,a]=o.useState([]),[r,l]=o.useState(!0),[n,i]=o.useState("submitted"),[c,d]=o.useState(null),[x,m]=o.useState(!1),[h,f]=o.useState(""),[y,g]=o.useState(""),[w,N]=o.useState(""),[v,j]=o.useState(!1),[b,p]=o.use
885State(!1),[E,C]=o.useState(!1);o.useEffect(()=>{S();const _=setInterval(S,15e3);return()=>clearInterval(_)},[n]);const S=async()=>{try{const _=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_get_crypto_payments?status=${n}`);if(_.ok){const M=await _.json();a(M.payments||[])}}catch(_){console.error("Error fetching payments:",_)}finally{l(!1)}},k=async()=>{if(c){m(!0);try{const _=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_approve_crypto_payment",{method:"POST",body:JSON.stringify({payment_id:c.id,tx_hash:h||void 0,admin_notes:y||void 0})}),M=await _.json();_.ok&&M.success?(await S(),j(!1),d(null),f(""),g(""),M.wallet_deposit?t(M.message||"Wallet deposit confirmed! Balance has been updated.",{type:"success"}):M.order_started?t(`Payment approved! Order sent to provider. 886Provider Order ID: ${M.provider_order_id}`,{type:"success"}):t("Payment approved! Order is being processed.",{type:"success"})):t(M.error||"Error approving payment",{type:"error"})}catch(_){console.error("Error approving payment:",_),t("Error approving payment",{type:"error"})}finally{m(!1)}}},J=async()=>{if(!c||!w.trim()){t("Please enter a rejection reason",{type:"warning"});return}m(!0);try{(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_reject_crypto_payment",{method:"POST",body:JSON.stringify({payment_id:c.id,rejection_reason:w})})).ok?(await S(),p(!1),d(null),N("")):t("Error rejecting payment",{type:"error"})}catch(_){console.error("Error rejecting payment:",_),t("Error rejecting payment",{type:"error"})}finally{m(!1)}},u=(_,M)=>{if(M&&(_==="pending"||_==="submitted"))return{bg:"bg-slate-100",text:"text-slate-600",border:"border-slate-300",icon:Ar,label:"EXPIRED"};switch(_){case"submitted":return{bg:"bg-orange-100",text:"text-orange-700",border:"border-orange-300",icon:As,label:"AWAITING APPROVAL"};case"pending":return{bg:"bg-yellow-100",text:"text-yellow-700",border:"border-yellow-300",icon:Ze,label:"PENDING"};case"confirmed":return{bg:"bg-green-100",text:"text-green-700",border:"border-green-300",icon:ne,label:"CONFIRMED"};case"rejected":return{bg:"bg-red-100",text:"text-red-700",border:"border-red-300",icon:st,label:"REJECTED"};default:return{bg:"bg-slate-100",text:"text-slate-600",border:"border-slate-300",icon:Fs,label:_.toUpperCase()}}},A=_=>new Date(_)<new Date,T=_=>new Date(_).toLocaleString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}),ae=_=>{const M=Date.now()-new Date(_).getTime(),F=Math.floor(M/6e4);if(F<60)return`${F}m ago`;const R=Math.floor(F/60);return R<24?`${R}h ago`:`${Math.floor(R/24)}d ago`},P=s.filter(_=>_.status==="submitted"||_.status==="pending"&&!A(_.expires_at)).length;return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 sm:p-3 bg-gradient-to-br from-emerald-500 to-teal-600 rounded-xl sm:rounded-2xl shadow-lg flex-shrink-0",children:e.jsx(kt,{className:"w-5 h-5 sm:w-6 sm:h-6 text-white"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-slate-900",children:"Crypto Payments"}),e.jsx("p",{className:"text-sm text-slate-600 truncate",children:"Review and approve cryptocurrency payments"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[P>0&&e.jsxs("div",{className:"px-3 py-1.5 sm:px-4 sm:py-2 bg-orange-100 text-orange-700 rounded-lg sm:rounded-xl font-semibold flex items-center gap-1.5 sm:gap-2 text-sm",children:[e.jsx(Fs,{className:"w-4 h-4 sm:w-5 sm:h-5"}),e.jsx("span",{children:P}),e.jsx("span",{className:"hidden sm:inline",children:"Awaiting Approval"})]}),e.jsx("button",{onClick:()=>{l(!0),S()},className:"p-2.5 sm:p-3 bg-white border-2 border-slate-200 rounded-xl hover:border-blue-300 transition-colors flex-shrink-0",children:e.jsx(Ve,{className:`w-4 h-4 sm:w-5 sm:h-5 text-slate-600 ${r?"animate-spin":""}`})})]})]}),e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 -mx-4 px-4 sm:mx-0 sm:px-0",children:["submitted","pending","confirmed","rejected","all"].map(_=>e.jsx("button",{onClick:()=>i(_),className:`px-3 sm:px-4 py-1.5 sm:py-2 rounded-lg sm:rounded-xl font-medium transition-all whitespace-nowrap text-sm sm:text-base flex-shrink-0 ${n===_?_==="submitted"?"bg-orange-600 text-white shadow-lg":"bg-blue-600 text-white shadow-lg":"bg-white text-slate-600 border-2 border-slate-200 hover:border-blue-300"}`,children:_==="submitted"?"Awaiting Approval":_.charAt(0).toUpperCase()+_.slice(1)},_))}),r?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"w-10 h-10 border-4 border-blue-600 border-t-transparent roun
886ded-full animate-spin"})}):s.length===0?e.jsxs("div",{className:"bg-white rounded-xl sm:rounded-2xl p-8 sm:p-12 text-center border border-slate-200",children:[e.jsx(kt,{className:"w-12 h-12 sm:w-16 sm:h-16 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-600 font-medium text-base sm:text-lg",children:"No payments found"}),e.jsx("p",{className:"text-slate-400 mt-1 text-sm",children:"Payments will appear here when customers submit crypto payments"})]}):e.jsx("div",{className:"grid gap-4",children:s.map(_=>{var re,U,oe;const M=A(_.expires_at),F=u(_.status,M),R=F.icon,X=_.status==="submitted"||_.status==="pending";return e.jsxs("div",{className:`bg-white rounded-xl sm:rounded-2xl border-2 transition-all overflow-hidden ${X?"border-orange-300 shadow-lg shadow-orange-100":"border-slate-200 hover:border-slate-300"}`,children:[X&&e.jsx("div",{className:"bg-gradient-to-r from-orange-500 to-amber-500 px-3 sm:px-6 py-2",children:e.jsxs("div",{className:"flex items-center justify-between text-white gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 min-w-0",children:[e.jsx(As,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 flex-shrink-0"}),e.jsx("span",{className:"font-semibold text-xs sm:text-sm truncate",children:"Customer claims payment completed"})]}),_.submitted_at&&e.jsx("span",{className:"text-xs sm:text-sm opacity-90 flex-shrink-0",children:ae(_.submitted_at)})]})}),e.jsxs("div",{className:"p-4 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4 mb-4",children:[e.jsxs("div",{className:"flex items-start gap-3 sm:gap-4 min-w-0",children:[e.jsx("div",{className:"w-10 h-10 sm:w-14 sm:h-14 bg-gradient-to-br from-blue-500 to-cyan-600 rounded-xl sm:rounded-2xl flex items-center justify-center shadow-lg flex-shrink-0",children:e.jsx(kt,{className:"w-5 h-5 sm:w-7 sm:h-7 text-white"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:gap-2 mb-1.5",children:[e.jsx("span",{className:"px-2 sm:px-3 py-0.5 sm:py-1 bg-blue-100 text-blue-700 text-xs sm:text-sm font-bold rounded-md sm:rounded-lg",children:_.crypto_type}),e.jsx("span",{className:"px-2 sm:px-3 py-0.5 sm:py-1 bg-slate-100 text-slate-700 text-xs sm:text-sm font-medium rounded-md sm:rounded-lg",children:_.network}),e.jsxs("span",{className:`px-2 sm:px-3 py-0.5 sm:py-1 text-[10px] sm:text-xs font-bold rounded-md sm:rounded-lg flex items-center gap-1 ${F.bg} ${F.text} border ${F.border}`,children:[e.jsx(R,{className:"w-3 h-3"}),e.jsx("span",{className:"hidden xs:inline",children:F.label})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 text-slate-600 flex-wrap",children:[e.jsx(ls,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 flex-shrink-0"}),e.jsx("span",{className:"font-medium text-sm sm:text-base truncate max-w-[120px] sm:max-w-none",children:((re=_.user)==null?void 0:re.full_name)||"Unknown"}),e.jsx("span",{className:"text-slate-400 hidden sm:inline",children:"|"}),e.jsx("span",{className:"text-xs sm:text-sm truncate max-w-[150px] sm:max-w-none",children:((U=_.user)==null?void 0:U.email)||"No email"})]})]})]}),e.jsxs("div",{className:"text-left sm:text-right flex-shrink-0 pl-13 sm:pl-0",children:[e.jsxs("p",{className:"text-2xl sm:text-3xl font-bold text-slate-900",children:["$",Number(_.amount).toFixed(2)]}),e.jsxs("p",{className:"text-xs sm:text-sm text-slate-500 font-medium",children:[_.crypto_amount," ",_.crypto_type]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-2 sm:gap-4 mb-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-lg sm:rounded-xl p-2.5 sm:p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 text-slate-500 mb-0.5 sm:mb-1",children:[e.jsx(Ds,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),e.jsx("span",{className:"text-[10px] sm:text-xs font-medium",children:"Created"})]}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-slate-800",children:T(_.created_at)})]}),_.submitted_at&&e.jsxs("div",{className:"bg-orange-50 rounded-lg sm:rounded-xl p-2.5 sm:p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 text-orange-600 mb-0.5 sm:mb-1",children:[e.jsx(As,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),e.jsx("span",{className:"text-[10px] sm:text-xs font-medium",children:"Submitted"})]}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-orange-800",children:T(_.submitted_at)})]}),e.jsxs("div",{className:`rounded-lg sm:rounded-xl p-2.5 sm:p-3 ${M?"bg-red-50":"bg-slate-50"} ${_.submitted_at?"":"col-span-2 sm:col-span-1"}`,children:[e.jsxs("div",{className:`flex items-center gap-1.5 sm:gap-2 mb-0.5 sm:mb-1 ${M?"text-red-500":"text-slate-500"}`,children:[e.jsx(Ze,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),e.jsx("span",{className:"text-[10px] sm:text-xs font-medium",children:"Expires"})]}),e.jsx("p",{className:`text-xs sm:text-sm font-semibold ${M?"text-red-700":"text-slate-800"}`,children:T(_.expires_at)})]})]}),_.platform==="wallet_deposit"?e.jsxs("div",{className:"bg-gradient-to-r from-emerald-50 to-teal-50 rounded-lg sm:rounded-xl p-3 sm:p-4 mb-4 border border-emerald-200",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[e.jsx(kt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-emerald-600"}),e.jsx("span",{className:"text-sm sm:text-base font-bold text-emerald-700",children:"Wallet Deposit"}),e.jsx("span",{className:"ml-auto px-2.5 py-1 bg-emerald-100 text-emerald-700 text-[10px] sm:text-xs font-bold rounded-lg border border-emerald-200",children:"BALANCE TOP-UP"})]}),e.jsxs("p",{className:"text-xs text-emerald-600 mt-1.5 ml-6",children:["Customer wants to add $",Number(_.amount).toFixed(2)," to their wallet balance via crypto"]})]}):_.platform&&e.jsxs("div",{className:"bg-gradient-to-r from-blue-50 to-cyan-50 rounded-lg sm:rounded-xl p-3 sm:p-4 mb-4 border border-blue-200",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 mb-2 sm:mb-3",children:[e.jsx(us,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-blue-600"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold text-blue-700",children:"Order Details"})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 sm:gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-500 font-medium uppercase",children:"Platform"}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-slate-800",children:_.platform})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-500 font-medium uppercase",children:"Service"}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-slate-800",children:_.service_type})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-500 font-medium uppercase",children:"Quantity"}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-slate-800",children:(oe=_.quantity)==null?void 0:oe.toLocaleStr
886ing("en-US")})]}),e.jsxs("div",{className:"col-span-2 sm:col-span-1",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-500 font-medium uppercase",children:"Target"}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-slate-800 truncate",title:_.link||_.username,children:_.link||_.username})]})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-lg sm:rounded-xl p-3 sm:p-4 mb-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1 font-medium",children:"Wallet Address"}),e.jsx("p",{className:"font-mono text-[11px] sm:text-sm text-slate-800 break-all select-all",children:_.wallet_address})]}),_.order_id&&e.jsxs("div",{className:"bg-blue-50 rounded-lg sm:rounded-xl p-2.5 sm:p-3 mb-4 border border-blue-200",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-600 font-medium",children:"Associated Order ID"}),e.jsx("p",{className:"font-mono text-xs sm:text-sm text-blue-800 break-all",children:_.order_id})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 sm:gap-3",children:[e.jsxs("button",{onClick:()=>{d(_),C(!0)},className:"px-3 sm:px-4 py-2 sm:py-2.5 bg-slate-100 text-slate-700 font-medium rounded-lg sm:rounded-xl hover:bg-slate-200 transition-colors flex items-center justify-center gap-2 text-sm",children:[e.jsx(Ct,{className:"w-4 h-4"}),"Details"]}),X&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>{d(_),p(!0)},disabled:x,className:"flex-1 py-2.5 sm:py-3 bg-red-100 text-red-700 font-semibold rounded-lg sm:rounded-xl hover:bg-red-200 transition-colors disabled:opacity-50 flex items-center justify-center gap-2 text-sm sm:text-base",children:[e.jsx(ht,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Reject"]}),e.jsxs("button",{onClick:()=>{d(_),j(!0)},disabled:x,className:"flex-1 py-2.5 sm:py-3 bg-gradient-to-r from-green-600 to-emerald-600 text-white font-semibold rounded-lg sm:rounded-xl hover:from-green-700 hover:to-emerald-700 transition-all shadow-lg disabled:opacity-50 flex items-center justify-center gap-2 text-sm sm:text-base",children:[e.jsx(Lt,{className:"w-4 h-4 sm:w-5 sm:h-5"}),e.jsx("span",{className:"hidden xs:inline",children:"Approve"})," Payment"]})]}),_.status==="confirmed"&&e.jsxs("div",{className:"flex-1 py-2.5 sm:py-3 bg-green-100 text-green-700 font-semibold rounded-lg sm:rounded-xl flex items-center justify-center gap-2 text-sm",children:[e.jsx(ne,{className:"w-4 h-4 sm:w-5 sm:h-5"}),e.jsx("span",{children:"Payment Confirmed"}),_.confirmed_at&&e.jsxs("span",{className:"text-xs opacity-75 hidden sm:inline",children:["- ",T(_.confirmed_at)]})]}),_.status==="rejected"&&e.jsxs("div",{className:"flex-1 py-2.5 sm:py-3 bg-red-100 text-red-700 font-semibold rounded-lg sm:rounded-xl flex items-center justify-center gap-2 text-sm",children:[e.jsx(st,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Payment Rejected"]})]})]})]},_.id)})}),v&&c&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-xl sm:rounded-2xl w-full max-w-lg max-h-[90vh] flex flex-col overflow-hidden",children:[e.jsx("div",{className:"p-4 sm:p-6 border-b border-slate-200 flex-shrink-0",children:e.jsx("h3",{className:"text-lg sm:text-xl font-bold text-slate-900",children:"Approve Crypto Payment"})}),e.jsxs("div",{className:"p-4 sm:p-6 overflow-y-auto flex-1",children:[e.jsxs("div",{className:"bg-green-50 rounded-xl p-3 sm:p-4 mb-4 border border-green-200",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-green-700 font-medium text-sm sm:text-base",children:"Payment Amount"}),e.jsxs("span",{className:"text-xl sm:text-2xl font-bold text-green-800",children:["$",Number(c.amount).toFixed(2)]})]}),e.jsxs("p",{className:"text-xs sm:text-sm text-green-600",children:[c.crypto_amount," ",c.crypto_type," (",c.network,")"]})]}),e.jsxs("div",{className:"space-y-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Transaction Hash (Optional)"}),e.jsx("input",{type:"text",value:h,onChange:_=>f(_.target.value),placeholder:"Enter blockchain transaction hash...",className:"w-full px-3 sm:px-4 py-2 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:outline-none font-mono text-xs sm:text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Admin Notes (Optional)"}),e.jsx("textarea",{value:y,onChange:_=>g(_.target.value),placeholder:"Add any notes about this payment...",rows:2,className:"w-full px-3 sm:px-4 py-2 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:outline-none resize-none text-sm"})]})]}),c.platform==="wallet_deposit"?e.jsxs("div",{className:"bg-emerald-50 rounded-xl p-3 sm:p-4 border border-emerald-200",children:[e.jsxs("div",{className:"flex items-center gap-2 text-emerald-700 mb-1",children:[e.jsx(kt,{className:"w-4 h-4"}),e.jsx("span",{className:"font-semibold text-sm",children:"Wallet Balance Deposit"})]}),e.jsxs("p",{className:"text-xs sm:text-sm text-emerald-600",children:["When approved, ",e.jsxs("b",{children:["$",Number(c.amount).toFixed(2)]})," will be added to the customer's wallet balance."]})]}):c.order_id?e.jsxs("div",{className:"bg-blue-50 rounded-xl p-3 sm:p-4 border border-blue-200",children:[e.jsxs("div",{className:"flex items-center gap-2 text-blue-700 mb-1",children:[e.jsx(As,{className:"w-4 h-4"}),e.jsx("span",{className:"font-semibold text-sm",children:"Direct Order Processing"})]}),e.jsx("p",{className:"text-xs sm:text-sm text-blue-600",children:"When approved, the order will be marked as paid and sent directly to the provider. No balance will be added to the customer's wallet."})]}):null]}),e.jsx("div",{className:"p-4 sm:p-6 border-t border-slate-200 flex-shrink-0",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{j(!1),f(""),g("")},disabled:x,className:"flex-1 py-2.5 sm:py-3 border-2 border-slate-300 text-slate-700 font-medium rounded-xl hover:bg-slate-50 transition-colors disabled:opacity-50 text-sm sm:text-base",children:"Cancel"}),e.jsx("button",{onClick:k,disabled:x,className:"flex-1 py-2.5 sm:py-3 bg-gradient-to-r from-green-600 to-emerald-600 text-white font-semibold rounded-xl hover:from-green-700 hover:to-emerald-700 transition-all shadow-lg disabled:opacity-50 flex items-center justify-center gap-2 text-sm sm:text-base",children:x?e.jsx("div",{className:"w-5 h-5 border-2 border-white border-t-transparent roun
886ded-full animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(Lt,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Confirm Approval"]})})]})})]})}),b&&c&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-xl sm:rounded-2xl w-full max-w-lg max-h-[90vh] flex flex-col overflow-hidden",children:[e.jsx("div",{className:"p-4 sm:p-6 border-b border-slate-200 flex-shrink-0",children:e.jsx("h3",{className:"text-lg sm:text-xl font-bold text-slate-900",children:"Reject Crypto Payment"})}),e.jsxs("div",{className:"p-4 sm:p-6 overflow-y-auto flex-1",children:[e.jsx("div",{className:"bg-red-50 rounded-xl p-3 sm:p-4 mb-4 border border-red-200",children:e.jsxs("p",{className:"text-red-700 text-sm sm:text-base",children:["You are about to reject a payment of ",e.jsxs("strong",{children:["$",Number(c.amount).toFixed(2)]})," from"," ",e.jsx("strong",{children:((z=c.user)==null?void 0:z.full_name)||"Unknown"})]})}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:["Rejection Reason ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("textarea",{value:w,onChange:_=>N(_.target.value),placeholder:"Enter the reason for rejection...",rows:3,className:"w-full px-3 sm:px-4 py-2 border-2 border-slate-200 rounded-xl focus:border-red-500 focus:outline-none resize-none text-sm"})]})]}),e.jsx("div",{className:"p-4 sm:p-6 border-t border-slate-200 flex-shrink-0",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{p(!1),N("")},disabled:x,className:"flex-1 py-2.5 sm:py-3 border-2 border-slate-300 text-slate-700 font-medium rounded-xl hover:bg-slate-50 transition-colors disabled:opacity-50 text-sm sm:text-base",children:"Cancel"}),e.jsx("button",{onClick:J,disabled:x||!w.trim(),className:"flex-1 py-2.5 sm:py-3 bg-red-600 text-white font-semibold rounded-xl hover:bg-red-700 transition-colors disabled:opacity-50 flex items-center justify-center gap-2 text-sm sm:text-base",children:x?e.jsx("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(ht,{className:"w-4 h-4 sm:w-5 sm:h-5"}),"Reject Payment"]})})]})})]})}),E&&c&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-xl sm:rounded-2xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 sm:p-6 border-b border-slate-200 flex-shrink-0",children:[e.jsx("h3",{className:"text-lg sm:text-xl font-bold text-slate-900",children:"Payment Details"}),e.jsx("button",{onClick:()=>C(!1),className:"p-2 hover:bg-slate-100 rounded-xl transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-slate-500"})})]}),e.jsx("div",{className:"p-4 sm:p-6 overflow-y-auto flex-1",children:e.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Payment ID"}),e.jsx("p",{className:"font-mono text-xs sm:text-sm text-slate-800 break-all",children:c.id})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Status"}),e.jsx("p",{className:"font-semibold text-sm sm:text-base text-slate-800",children:c.status.toUpperCase()})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Customer"}),e.jsx("p",{className:"font-semibold text-sm sm:text-base text-slate-800",children:((I=c.user)==null?void 0:I.full_name)||"Unknown"}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-600",children:((Z=c.user)==null?void 0:Z.email)||"No email"}),e.jsxs("p",{className:"text-xs sm:text-sm text-slate-500 mt-1",children:["Current Balance: $",(((Q=c.user)==null?void 0:Q.balance)||0).toFixed(2)]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[e.jsxs("div",{className:"bg-blue-50 rounded-xl p-3 sm:p-4 border border-blue-200",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-600 mb-1",children:"Amount (USD)"}),e.jsxs("p",{className:"text-xl sm:text-2xl font-bold text-blue-800",children:["$",Number(c.amount).toFixed(2)]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Crypto Amount"}),e.jsxs("p",{className:"text-lg sm:text-xl font-bold text-slate-800",children:[c.crypto_amount," ",c.crypto_type]})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Wallet Address"}),e.jsx("p",{className:"font-mono text-xs sm:text-sm text-slate-800 break-all select-all",children:c.wallet_address})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Network"}),e.jsx("p",{className:"font-semibold text-sm sm:text-base text-slate-800",children:c.network})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Crypto Type"}),e.jsx("p",{className:"font-semibold text-sm sm:text-base text-slate-800",children:c.crypto_type})]})]}),c.platform&&e.jsxs("div",{className:"bg-gradient-to-r from-blue-50 to-cyan-50 rounded-xl p-3 sm:p-4 border border-blue-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 sm:mb-3",children:[e.jsx(us,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold text-blue-700",children:"Order Details"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-500 font-medium",children:"Platform"}),e.jsx("p",{className:"font-semibold text-sm sm:text-base text-slate-800",children:c.platform})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-500 font-medium",children:"Service Type"}),e.jsx("p",{className:"font-semibold text-sm sm:text-base text-slate-800",children:c.service_type})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-500 font-medium",children:"Quantity"}),e.jsx("p",{className:"font-semibold text-sm sm:text-base text-slate-800",children:c.quantity?Ya(c.quantity):"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-blue-500 font-medium",children:"Target"}),e.jsx("p",{className:"font-semibold text-sm sm:text-base text-slate-800 break-all",children:c.link||c.username})]})]})]}),c.tx_hash&&e.jsxs("div",{className:"bg-green-50 rounded-xl p-3 sm:p-4 border border-green-200",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-green-600 mb-1",children:"Transaction Hash"}),e.jsx("p",{className:"font-mono text-xs sm:text-sm text-green-800 break-all",children:c.tx_hash})]}),c.admin_notes&&e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Admin Notes"}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-800",children:c.admin_notes})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-500 mb-1",children:"Created At"}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-slate-800",children:T(c.created_at)})]}),c.submitted_at&&e.jsxs("div",{className:"bg-orange-50 rounded-xl p-3 sm:p-4 border border-orange-200",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-orange-600 mb-1",children:"Submitted At"}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-orange-800",children:T(c.submitted_at)})]}),c.confirmed_at&&e.jsxs("div",{className:"bg-green-50 rounded-xl p-3 sm:p-4 border border-green-200",children:[e.jsx("p",{className:"text-[10px] sm:text-xs text-green-600 mb-1",children:"Confirmed At"}),e.jsx("p",{className:"text-xs sm:text-sm font-semibold text-green-800",children:T(c.confirmed_at)})]})]})]})}),e.jsx("div",{className:"p-4 sm:p-6 border-t border-slate-200 flex-shrink-0",children:e.jsx("button",{onClick:()=>C(!1),className:"w-full py-2.5 sm:py-3 bg-slate-100 text-slate-700 font-medium rounded-xl hover:bg-slate-200 transition-colors text-sm sm:text-base",children:"Close"})})]})})]})}function VN({onViewUser:t}){var be,Pe,de,H,me,ee,Ae,he,D;
886const[s,a]=o.useState([]),[r,l]=o.useState(!0),[n,i]=o.useState("pending"),[c,d]=o.useState(null),[x,m]=o.useState(!1),[h,f]=o.useState(!1),[y,g]=o.useState(null),[w,N]=o.useState(""),[v,j]=o.useState("none"),[b,p]=o.useState(""),[E,C]=o.useState(""),[S,k]=o.useState(""),[J,u]=o.useState(""),[A,T]=o.useState(""),[ae,P]=o.useState([]),[z,I]=o.useState(""),[Z,Q]=o.useState(!1),[_,M]=o.useState([]),[F,R]=o.useState(""),[X,re]=o.useState(!1),[U,oe]=o.useState(!1);o.useEffect(()=>{ue()},[]);const ue=async()=>{l(!0),C("");try{const fe=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_refill_requests"),W=await fe.json();if(!fe.ok)throw new Error(W.error||"Failed to fetch refill requests");a(W.refill_requests||[])}catch(O){console.error("Error fetching refill requests:",O),C(O instanceof Error?O.message:"Failed to fetch")}finally{l(!1)}},K=async()=>{Q(!0);try{const fe=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_providers"),W=await fe.json();fe.ok&&W.providers&&P(W.providers.filter(_e=>_e.is_active))}catch(O){console.error("Error fetching providers:",O)}finally{Q(!1)}},q=async O=>{if(!z){p("Please select a provider first");return}re(!0),oe(!0);try{const _e=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_provider_services?providerId=${z}&search=${encodeURIComponent(O)}`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}}),Re=await _e.json();if(!_e.ok)throw new Error(Re.error||"Failed to fetch services");M(Re.services||[])}catch(fe){console.error("Error searching services:",fe),p(fe.message)}finally{re(!1)}},je=async()=>{if(!y)return;const O=S||y.claimed_drop_amount;if(!O||O<1){p("Please enter a valid quantity");return}if(!z){p("Please select a provider");return}if(!J||J.trim()===""){p("Please enter a service ID");return}d(y.id),p("");try{const W=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/process_refill_request",{method:"POST",body:JSON.stringify({refill_request_id:y.id,action:"approve",quantity:O,service_id:J.trim(),provider_id:z,custom_link:A.trim()})}),_e=await W.json();if(!W.ok)throw new Error(_e.error||"Failed to approve refill request");await ue(),m(!1),g(null),k(""),u(""),T(""),I(""),M([]),R(""),oe(!1)}catch(fe){console.error("Error approving refill:",fe),p(fe instanceof Error?fe.message:"Failed to approve refill")}finally{d(null)}},we=async()=>{if(!y)return;d(y.id),p("");let O="reject";v==="48h"?O="reject_and_block_48h":v==="permanent"&&(O="reject_and_block");try{const W=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/process_refill_request",{method:"POST",body:JSON.stringify({refill_request_id:y.id,action:O,admin_notes:w||"Request rejected by admin"})}),_e=await W.json();if(!W.ok)throw new Error(_e.error||"Failed to reject refill request");await ue(),f(!1),g(null),N(""),j("none")}catch(fe){console.error("Error rejecting refill:",fe),p(fe instanceof Error?fe.message:"Failed to reject refill")}finally{d(null)}},se=O=>{switch(O){case"completed":return"bg-emerald-100 text-emerald-700 border-emerald-200";case"processing":return"bg-blue-100 text-blue-700 border-blue-200";
886case"pending":return"bg-amber-100 text-amber-700 border-amber-200";case"rejected":return"bg-red-100 text-red-700 border-red-200";default:return"bg-slate-100 text-slate-700 border-slate-200"}},Se=O=>{switch(O){case"completed":return e.jsx(ne,{className:"w-4 h-4"});case"processing":return e.jsx(Ve,{className:"w-4 h-4 animate-spin"});case"pending":return e.jsx(Ze,{className:"w-4 h-4"});case"rejected":return e.jsx(st,{className:"w-4 h-4"});default:return e.jsx(nt,{className:"w-4 h-4"})}},$=n==="all"?s:s.filter(O=>O.status===n),ie={total:s.length,pending:s.filter(O=>O.status==="pending").length,processing:s.filter(O=>O.status==="processing").length,completed:s.filter(O=>O.status==="completed").length,rejected:s.filter(O=>O.status==="rejected").length};return r?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 border-4 border-slate-200 border-t-blue-600 rounded-full animate-spin mx-auto mb-4"}),e.jsx("p",{className:"text-slate-500",children:"Loading refill requests..."})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-4",children:[e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-slate-100",children:e.jsx(us,{className:"w-5 h-5 text-slate-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Total"}),e.jsx("p",{className:"text-xl font-bold text-slate-900",children:ie.total})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-amber-100",children:e.jsx(Ze,{className:"w-5 h-5 text-amber-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Pending"}),e.jsx("p",{className:"text-xl font-bold text-amber-600",children:ie.pending})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-blue-100",children:e.jsx(Ve,{className:"w-5 h-5 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Processing"}),e.jsx("p",{className:"text-xl font-bold text-blue-600",children:ie.processing})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-emerald-100",children:e.jsx(ne,{className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Completed"}),e.jsx("p",{className:"text-xl font-bold text-emerald-600",children:ie.completed})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-red-100",children:e.jsx(st,{className:"w-5 h-5 text-red-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Rejected"}),e.jsx("p",{className:"text-xl font-bold text-red-600",children:ie.rejected})]})]})})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-slate-200 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ve,{className:"w-5 h-5 text-amber-600"}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Refill Requests"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Manage customer refill requests"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:n,onChange:O=>i(O.target.value),className:"appearance-none pl-3 pr-8 py-2 bg-slate-50 border border-slate-200 rounded-lg text-sm font-medium text-slate-700 focus:outline-none focus:border-blue-400",children:[e.jsx("option",{value:"pending",children:"Pending"}),e.jsx("option",{value:"all",children:"All Status"}),e.jsx("option",{value:"processing",children:"Processing"}),e.jsx("option",{value:"completed",children:"Completed"}),e.jsx("option",{value:"rejected",children:"Rejected"})]}),e.jsx(is,{className:"w-4 h-4 text-slate-400 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"})]}),e.jsx("button",{onClick:ue,className:"p-2 rounded-lg bg-slate-100 hover:bg-slate-200 transition-colors",children:e.jsx(Ve,{className:"w-4 h-4 text-slate-600"})})]})]}),$.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("div",{className:"inline-flex p-4 rounded-2xl bg-slate-100 mb-4",children:e.jsx(Ve,{className:"w-8 h-8 text-slate-400"})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-1",children:"No refill requests"}),e.jsx("p",{className:"text-sm text-slate-500",children:n==="all"?"No refill requests have been submitted yet.":`No ${n} refill requests found.`})]}):e.jsx("div",{className:"divide-y divide-slate-100",children:$.map(O=>{var fe,W,_e,Re,ve,Te,ze,it,ke,Xe,ce,Le,Fe,Me;return e.jsx("div",{className:"p-4 hover:bg-slate-50 transition-colors",children:e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold border ${se(O.status)}`,children:[Se(O.status),O.status.toUpperCase()]}),e.jsx("span",{className:"text-xs text-slate-500",children:new Date(O.requested_at).toLocaleStr
886ing("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}),e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-bold bg-orange-100 text-orange-700 border border-orange-200",children:[e.jsx(Ve,{className:"w-3 h-3"}),"Refill #",O.refill_sequence??1," / ",O.refill_count_for_order??1]}),(O.approved_count_for_order??0)>0&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-bold bg-emerald-100 text-emerald-700 border border-emerald-200",children:[e.jsx(ne,{className:"w-3 h-3"}),O.approved_count_for_order,"x Sent to Provider"]}),(O.rejected_count_for_order??0)>0&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-bold bg-red-100 text-red-700 border border-red-200",children:[e.jsx(st,{className:"w-3 h-3"}),O.rejected_count_for_order,"x Rejected"]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 mb-3 border border-slate-200",children:[e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Platform"}),e.jsx("p",{className:"text-sm font-semibold text-slate-900 capitalize",children:((fe=O.orders)==null?void 0:fe.platform)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Service"}),e.jsx("p",{className:"text-sm font-semibold text-slate-900",children:((W=O.orders)==null?void 0:W.service_name)||((_e=O.orders)==null?void 0:_e.service_type)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Username"}),e.jsxs("p",{className:"text-sm font-semibold text-blue-600",children:["@",((Re=O.orders)==null?void 0:Re.username)||"N/A"]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Quantity"}),e.jsx("p",{className:"text-sm font-bold text-slate-900",children:((Te=(ve=O.orders)==null?void 0:ve.quantity)==null?void 0:Te.toLocaleString("en-US"))||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Price"}),e.jsxs("p",{className:"text-sm font-bold text-emerald-600",children:["$",Number(((ze=O.orders)==null?void 0:ze.price)||0).toFixed(2)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Customer"}),e.jsx("button",{onClick:ft=>{ft.stopPropagation(),t==null||t(O.user_id)},className:"text-sm font-medium text-blue-600 hover:text-blue-800 hover:underline truncate text-left transition-colors",children:((it=O.users)==null?void 0:it.full_name)||((ke=O.users)==null?void 0:ke.email)||"Unknown"})]})]}),((Xe=O.orders)==null?void 0:Xe.link)&&(()=>{var Mt,hs;const ft=O.orders.link,pe=(hs=(Mt=O.orders)==null?void 0:Mt.platform)==null?void 0:hs.toLowerCase(),dt=ft.replace(/^@/,"").trim();let ot=ft;return ft.startsWith("http")||(pe==="tiktok"?ot=`https://www.tiktok.com/@${dt}`:pe==="instagram"?ot=`https://www.instagram.com/${dt}`:pe==="youtube"?ot=`https://www.youtube.com/@${dt}`:pe==="twitter"||pe==="x"?ot=`https://x.com/${dt}`:pe==="facebook"&&(ot=`https://www.facebook.com/${dt}`)),e.jsxs("div",{className:"mt-3 pt-3 border-t border-slate-200",children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Target Link"}),e.jsxs("a",{href:ot,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:text-blue-700 font-medium break-all flex items-center gap-1",children:[e.jsx(Gs,{className:"w-3.5 h-3.5 flex-shrink-0"}),ot]})]})})()]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-3",children:[e.jsxs("div",{className:"bg-blue-50 rounded-lg p-3 border border-blue-200",children:[e.jsx("p",{className:"text-xs text-blue-600 mb-1",children:"Start Count"}),e.jsx("p",{className:"text-lg font-bold text-blue-700",children:O.start_count.toLocaleString("en-US")})]}),e.jsxs("div",{className:"bg-amber-50 rounded-lg p-3 border border-amber-200",children:[e.jsx("p",{className:"text-xs text-amber-600 mb-1",children:"Claimed Drop"}),e.jsx("p",{className:"text-lg font-bold text-amber-700",children:O.claimed_drop_amount.toLocaleStr
886ing("en-US")})]}),e.jsxs("div",{className:"bg-slate-100 rounded-lg p-3 border border-slate-200",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Order Number"}),e.jsx("p",{className:"text-sm font-bold text-slate-800",children:((ce=O.orders)==null?void 0:ce.order_number)||"N/A"})]}),e.jsxs("div",{className:"bg-slate-100 rounded-lg p-3 border border-slate-200",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"API Order ID"}),e.jsx("p",{className:"text-sm font-bold text-slate-800",children:((Le=O.orders)==null?void 0:Le.provider_order_id)||"N/A"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-slate-500",children:[((Fe=O.orders)==null?void 0:Fe.service_id)&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-emerald-50 text-emerald-700 rounded-lg border border-emerald-200 font-semibold",children:["Service ID: #",O.orders.service_id]}),((Me=O.orders)==null?void 0:Me.provider_name)&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-blue-50 text-blue-700 rounded-lg border border-blue-200 font-semibold",children:["Provider: ",O.orders.provider_name]})]}),O.new_provider_order_id&&e.jsxs("div",{className:"mt-2 inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-emerald-50 border border-emerald-200",children:[e.jsx(ne,{className:"w-3.5 h-3.5 text-emerald-600"}),e.jsxs("span",{className:"text-xs font-medium text-emerald-700",children:["New Provider Order: ",O.new_provider_order_id]})]}),O.admin_notes&&O.status==="rejected"&&e.jsx("div",{className:"mt-2 p-2 rounded-lg bg-red-50 border border-red-200",children:e.jsxs("p",{className:"text-xs text-red-700",children:[e.jsx("span",{className:"font-semibold",children:"Rejection Reason:"})," ",O.admin_notes]})})]}),O.status==="pending"&&e.jsxs("div",{className:"flex items-center gap-2 lg:flex-shrink-0",children:[e.jsxs("button",{onClick:()=>{var ft;g(O),k(O.claimed_drop_amount),u(""),I(""),M([]),R(""),oe(!1),T(((ft=O.orders)==null?void 0:ft.link)||""),m(!0),p(""),K()},disabled:c===O.id,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-lg text-sm font-semibold transition-all shadow-md hover:shadow-lg disabled:opacity-50",children:[e.jsx(As,{className:"w-4 h-4"}),"Approve & Resend"]}),e.jsxs("button",{onClick:()=>{g(O),f(!0),N(""),j("none"),p("")},disabled:c===O.id,className:"flex items-center gap-2 px-4 py-2 bg-slate-100 hover:bg-red-100 text-slate-700 hover:text-red-700 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",children:[e.jsx(st,{className:"w-4 h-4"}),"Reject"]})]})]})},O.id)})})]}),x&&y&&e.jsx("div",{className:"fixed inset-0 z-50 bg-slate-900/80 backdrop-blur-sm flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-md max-h-[90vh] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-emerald-500 to-teal-500 px-4 sm:px-6 py-4 sm:py-5 flex-shrink-0 relative",children:[e.jsx("button",{onClick:()=>{m(!1),g(null),p("")},className:"absolute top-3 right-3 p-2 rounded-xl bg-white/20 hover:bg-white/30 text-white transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 sm:p-2.5 rounded-xl bg-white/20",children:e.jsx(As,{className:"w-5 h-5 sm:w-6 sm:h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg sm:text-xl font-bold text-white",children:"Approve & Resend"}),e.jsx("p",{className:"text-xs sm:text-sm text-white/80",children:"Send refill order to provider"})]})]})]}),e.jsxs("div",{className:"p-4 sm:p-6 overflow-y-auto flex-1",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 sm:p-4 mb-4 border border-slate-200",children:[e.jsx("h3",{className:"text-sm font-semibold text-slate-900 mb-2 sm:mb-3",children:"Order Details"}),e.jsxs("div",{className:"space-y-1.5 sm:space-y-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Service:"}),e.jsx("span",{className:"font-medium text-slate-900 text-right max-w-[60%] truncate",children:((be=y.orders)==null?void 0:be.service_name)||((Pe=y.orders)==null?void 0:Pe.service_type)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Start Count:"}),e.jsx("span",{className:"font-bold text-blue-600",children:y.start_count.toLocaleStr
886ing("en-US")})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Claimed Drop:"}),e.jsx("span",{className:"font-bold text-amber-600",children:y.claimed_drop_amount.toLocaleString("en-US")})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Customer:"}),e.jsx("button",{onClick:()=>{t==null||t(y.user_id)},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline text-right max-w-[60%] truncate transition-colors",children:((de=y.users)==null?void 0:de.full_name)||((H=y.users)==null?void 0:H.email)})]})]})]}),(((me=y.orders)==null?void 0:me.provider_name)||((ee=y.orders)==null?void 0:ee.service_id))&&e.jsxs("div",{className:"bg-blue-50 rounded-xl p-3 sm:p-4 mb-4 border border-blue-200",children:[e.jsx("h3",{className:"text-sm font-semibold text-blue-900 mb-2 sm:mb-3",children:"Original Provider Info"}),e.jsxs("div",{className:"space-y-1.5 sm:space-y-2 text-sm",children:[((Ae=y.orders)==null?void 0:Ae.provider_name)&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-blue-600",children:"Provider:"}),e.jsx("span",{className:"font-bold text-blue-900",children:y.orders.provider_name})]}),((he=y.orders)==null?void 0:he.service_id)&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-blue-600",children:"Service ID:"}),e.jsxs("span",{className:"font-bold text-blue-900",children:["#",y.orders.service_id]})]}),((D=y.orders)==null?void 0:D.provider_order_id)&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-blue-600",children:"API Order ID:"}),e.jsx("span",{className:"font-bold text-blue-900",children:y.orders.provider_order_id})]})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsxs("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:["Link / Username ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:A,onChange:O=>T(O.target.value),className:"w-full px-3 sm:px-4 py-2.5 sm:py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-emerald-500 focus:border-transparent outline-none text-sm",placeholder:"Enter link or username"}),e.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:"Edit if needed before sending to provider"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Refill Quantity"}),e.jsx("input",{type:"number",value:S,onChange:O=>k(O.target.value===""?"":parseInt(O.target.value)),min:1,className:"w-full px-3 sm:px-4 py-2.5 sm:py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-emerald-500 focus:border-transparent outline-none text-base sm:text-lg font-semibold",placeholder:"Enter quantity to refill"}),e.jsxs("p",{className:"mt-1.5 text-xs text-slate-500",children:["Customer claimed: ",e.jsx("span",{className:"font-semibold text-amber-600",children:y.claimed_drop_amount.toLocaleString("en-US")})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsxs("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:["Provider ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:z,onChange:O=>{I(O.target.value),M([]),oe(!1)},disabled:Z,className:"w-full px-3 sm:px-4 py-2.5 sm:py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-emerald-500 focus:border-transparent outline-none appearance-none bg-white",children:[e.jsx("option",{value:"",children:"Select a provider"}),ae.map(O=>e.jsx("option",{value:O.id,children:O.name},O.id))]}),e.jsx(is,{className:"w-5 h-5 text-slate-400 absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none"})]}),e.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:"Select the API provider for this order"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsxs("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:["Service ID ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:J,onChange:O=>u(O.target.value),className:"w-full px-3 sm:px-4 py-2.5 sm:py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-emerald-500 focus:border-transparent outline-none",placeholder:"Enter service ID"}),e.jsxs("div",{className:"mt-2 sm:mt-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"text",value:F,onChange:O=>R(O.target.value),placeholder:"Search: instagram followers, tiktok...",className:"flex-1 px-3 py-2 text-sm border border-slate-300 rounded-xl focus:ring-2 focus:ring-emerald-500 focus:border-transparent outline-none",onKeyDown:O=>O.key==="Enter"&&q(F)}),e.jsx("button",{type:"button",onClick:()=>q(F),disabled:!z||X||!F.trim(),className:"px-3 sm:px-4 py-2 bg-emerald-600 text-white rounded-xl hover:bg-emerald-700 transition-colors disabled:opacity-50 text-sm font-medium",children:X?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):"Search"})]}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Select provider first, then search for services"})]}),U&&e.jsx("div",{className:"mt-2 max-h-32 overflow-y-auto border border-slate-200 rounded-xl bg-white",children:X?e.jsxs("div",{className:"p-3 text-center text-slate-500",children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin mx-auto mb-2"}),"Loading services..."]}):_.length===0?e.jsx("div",{className:"p-3 text-center text-slate-500 text-sm",children:"No services found. Try a different search term."}):e.jsx("div",{className:"divide-y divide-slate-100",children:_.map(O=>e.jsxs("button",{type:"button",onClick:()=>{u(O.service.toString()),oe(!1)},className:"w-full px-3 py-2 text-left hover:bg-emerald-50 transition-colors",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("span",{className:"text-xs font-semibold text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded",children:["#",O.service]}),e.jsxs("span",{className:"text-xs text-slate-500",children:["$",O.rate,"/1000"]})]}),e.jsx("p",{className:"text-sm text-slate-700 mt-1 line-clamp-2",children:O.name}),e.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["Min: ",O.min," | Max: ",O.max]})]},O.service))})})]}),e.jsx("div",{className:"bg-emerald-50 border border-emerald-200 rounded-xl p-3 sm:p-4",children:e.jsxs("p",{className:"text-sm text-emerald-700",children:[e.jsx("span",{className:"font-semibold",children:"Action:"})," A new order for ",e.jsx("span",{className:"font-bold",children:(S||0).toLocaleStr
886ing("en-US")})," will be sent to the provider for this link."]})}),b&&e.jsx("div",{className:"mt-4 p-3 rounded-xl bg-red-50 border border-red-200",children:e.jsxs("p",{className:"text-sm text-red-600 flex items-center gap-2",children:[e.jsx(nt,{className:"w-4 h-4"}),b]})})]}),e.jsx("div",{className:"p-4 sm:p-6 border-t border-slate-200 flex-shrink-0 bg-white",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{m(!1),g(null),p("")},className:"flex-1 py-2.5 sm:py-3 px-4 bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-xl font-semibold transition-colors",children:"Cancel"}),e.jsx("button",{onClick:je,disabled:c===y.id,className:"flex-1 py-2.5 sm:py-3 px-4 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-xl font-semibold transition-all flex items-center justify-center gap-2 disabled:opacity-50",children:c===y.id?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),"Processing..."]}):e.jsxs(e.Fragment,{children:[e.jsx(As,{className:"w-5 h-5"}),"Confirm & Send"]})})]})})]})}),h&&y&&e.jsx("div",{className:"fixed inset-0 z-50 bg-slate-900/80 backdrop-blur-sm flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-md overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-red-500 to-rose-500 px-6 py-5",children:[e.jsx("button",{onClick:()=>{f(!1),g(null),N(""),j("none"),p("")},className:"absolute top-4 right-4 p-2 rounded-xl bg-white/20 hover:bg-white/30 text-white transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-white/20",children:e.jsx(st,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Reject Request"}),e.jsx("p",{className:"text-sm text-white/80",children:"Decline this refill request"})]})]})]}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Rejection Reason (Optional)"}),e.jsx("textarea",{value:w,onChange:O=>N(O.target.value),placeholder:"Enter reason for rejection...",rows:3,className:"w-full px-4 py-3 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-red-400 focus:bg-white focus:outline-none transition resize-none"})]}),e.jsxs("div",{className:"mb-5 space-y-2.5",children:[e.jsx("p",{className:"text-sm font-semibold text-slate-700",children:"Lock Options"}),e.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-xl border-2 cursor-pointer transition-all ${v==="none"?"border-slate-300 bg-slate-50":"border-slate-200 hover:border-slate-300"}`,children:[e.jsx("input",{type:"radio",name:"blockType",checked:v==="none",onChange:()=>j("none"),className:"mt-0.5 w-4 h-4 text-slate-600 focus:ring-slate-400"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-semibold text-slate-700",children:"No lock"}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Just reject this request. The customer can submit a new refill after 24 hours."})]})]}),e.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-xl border-2 cursor-pointer transition-all ${v==="48h"?"border-amber-400 bg-amber-50":"border-slate-200 hover:border-amber-300"}`,children:[e.jsx("input",{type:"radio",name:"blockType",checked:v==="48h",onChange:()=>j("48h"),className:"mt-0.5 w-4 h-4 text-amber-500 focus:ring-amber-400"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ar,{className:"w-4 h-4 text-amber-600"}),e.jsx("span",{className:"text-sm font-semibold text-amber-700",children:"Lock for 48 hours"})]}),e.jsx("p",{className:"text-xs text-amber-600/80 mt-0.5",children:"Block refill requests for 48 hours. After that, the customer can request a refill again."})]})]}),e.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-xl border-2 cursor-pointer transition-all ${v==="permanent"?"border-red-400 bg-red-50":"border-slate-200 hover:border-red-300"}`,children:[e.jsx("input",{type:"radio",name:"blockType",checked:v==="permanent",onChange:()=>j("permanent"),className:"mt-0.5 w-4 h-4 text-red-500 focus:ring-red-400"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($t,{className:"w-4 h-4 text-red-600"}),e.jsx("span",{className:"text-sm font-semibold text-red-700",children:"Permanently lock"})]}),e.jsx("p",{className:"text-xs text-red-600/80 mt-0.5",children:"Permanently block refill requests for this order. The customer will never be able to request a refill again."})]})]})]}),v!=="none"&&!w&&e.jsx("div",{className:"mb-4 p-3 rounded-xl bg-amber-50 border border-amber-200",children:e.jsxs("p",{className:"text-xs text-amber-700 flex items-center gap-2",children:[e.jsx(nt,{className:"w-4 h-4 flex-shrink-0"}),"Please enter a reason -- it will be shown to the customer as a label on their order."]})}),b&&e.jsx("div",{className:"mb-4 p-3 rounded-xl bg-red-50 border border-red-200",children:e.jsxs("p",{className:"text-sm text-red-600 flex items-center gap-2",children:[e.jsx(nt,{className:"w-4 h-4"}),b]})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{f(!1),g(null),N(""),j("none"),p("")},className:"flex-1 py-3 px-4 bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-xl font-semibold transition-colors",children:"Cancel"}),e.jsx("button",{onClick:we,disabled:c===y.id||v!=="none"&&!w.trim(),className:"flex-1 py-3 px-4 bg-gradient-to-r from-red-500 to-rose-500 hover:from-red-600 hover:to-rose-600 text-white rounded-xl font-semibold transition-all flex items-center justify-center gap-2 disabled:opacity-50",children:c===y.id?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),"Processing..."]}):e.jsxs(e.Fragment,{children:[v==="permanent"?e.jsx($t,{className:"w-5 h-5"}):v==="48h"?e.jsx(Ar,{className:"w-5 h-5"}):e.jsx(st,{className:"w-5 h-5"}),v==="permanent"?"Reject & Block":v==="48h"?"Reject & Lock 48h":"Reject Request"]})})]})]})]})})]})}const sd=[{value:"Instagram",label:"Instagram",color:"#E4405F",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"
886currentColor",children:e.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"})})},{value:"TikTok",label:"TikTok",color:"#000000",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z"})})},{value:"Twitter",label:"X (Twitter)",color:"#000000",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})},{value:"Facebook",label:"Facebook",color:"#1877F2",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})},{value:"YouTube",label:"YouTube",color:"#FF0000",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})},{value:"LinkedIn",label:"LinkedIn",color:"#0A66C2",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})},{value:"Pinterest",label:"Pinterest",color:"#E60023",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738.098.119.112.224.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z"})})}
886,{value:"Snapchat",label:"Snapchat",color:"#FFFC00",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12.206.793c.99 0 4.347.276 5.93 3.821.529 1.193.403 3.219.299 4.847l-.003.06c-.012.18-.022.345-.03.51.075.045.203.09.401.09.3-.016.659-.12 1.033-.301.165-.088.344-.104.464-.104.182 0 .359.029.509.09.45.149.734.479.734.838.015.449-.39.839-1.213 1.168-.089.029-.209.075-.344.119-.45.135-1.139.36-1.333.81-.09.224-.061.524.12.868l.015.015c.06.136 1.526 3.475 4.791 4.014.255.044.435.27.42.509 0 .075-.015.149-.045.225-.24.569-1.273.988-3.146 1.271-.059.091-.12.375-.164.57-.029.179-.074.36-.134.553-.076.271-.27.405-.555.405h-.03c-.135 0-.313-.031-.538-.074-.36-.075-.765-.135-1.273-.135-.3 0-.599.015-.913.074-.6.104-1.123.464-1.723.884-.853.599-1.826 1.288-3.294 1.288-.06 0-.119-.015-.18-.015h-.149c-1.468 0-2.427-.675-3.279-1.288-.599-.42-1.107-.779-1.707-.884-.314-.045-.629-.074-.928-.074-.54 0-.958.089-1.272.149-.211.043-.391.074-.54.074-.374 0-.523-.224-.583-.42-.061-.192-.09-.389-.135-.567-.046-.181-.105-.494-.166-.57-1.918-.222-2.95-.642-3.189-1.226-.031-.063-.052-.12-.063-.18-.016-.12.119-.315.405-.405 3.266-.539 4.731-3.879 4.791-4.014l.016-.03c.18-.345.224-.645.119-.869-.195-.434-.884-.658-1.332-.809-.121-.029-.24-.074-.346-.119-1.107-.435-1.257-.93-1.197-1.273.09-.479.674-.793 1.168-.793.146 0 .27.029.383.074.42.194.789.3 1.104.3.234 0 .384-.06.465-.105l-.046-.569c-.098-1.626-.225-3.651.307-4.837C7.392 1.077 10.739.807 11.727.807l.419-.015h.06z"})})},{value:"WhatsApp",label:"WhatsApp",color:"#25D366",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})},{value:"Telegram",label:"Telegram",color:"#26A5E4",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})})},{value:"Discord",label:"Discord",color:"#5865F2",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18
8861.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})},{value:"Reddit",label:"Reddit",color:"#FF4500",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})})},{value:"Twitch",label:"Twitch",color:"#9146FF",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z"})})},{value:"Spotify",label:"Spotify",color:"#1DB954",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})})},{value:"SoundCloud",label:"SoundCloud",color:"#FF5500",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1.175 12.225c-.051 0-.094.046-.101.1l-.233 2.154.233 2.105c.007.058.05.098.101.098.05 0 .09-.04.099-.098l.255-2.105-.27-2.154c-.009-.06-.052-.1-.1-.1m-.899.828c-.06 0-.091.037-.104.094L0 14.479l.165 1.308c.014.057.045.094.09.094.052 0 .089-.037.104-.094l.21-1.308-.21-1.334c-.016-.057-.053-.091-.09-.091m1.83-1.229c-.06 0-.12.037-.12.1l-.21 2.563.225 2.458c0 .06.045.103.105.103.074 0 .12-.043.12-.103l.24-2.458-.24-2.563c0-.06-.06-.1-.12-.1m.945-.089c-.075 0-.135.06-.15.135l-.193 2.64.21 2.544c.016.077.075.138.149.138.075 0 .135-.061.15-.138l.24-2.544-.24-2.64c-.015-.074-.074-.135-.165-.135m.93-.33c-.09 0-.166.075-.18.165l-.18 2.97.195 2.595c.015.09.09.15.18.15s.165-.06.18-.15l.21-2.595-.21-2.97c-.015-.09-.09-.165-.195-.165m.96-.344c-.105 0-.195.09-.21.195l-.165 3.24.18 2.625c.015.105.09.18.195.18.12 0 .21-.075.21-.18l.195-2.625-.195-3.24c0-.105-.09-.195-.21-.195m1.018-.242c-.12 0-.225.105-.225.225l-.15 3.405.165 2.64c0 .12.09.225.21.225.135 0 .225-.105.225-.225l.165-2.64-.165-3.405c0-.12-.09-.225-.225-.225m.96-.152c-.135 0-.24.105-.255.24l-.135 3.495.15 2.655c.015.135.12.24.255.24.12 0 .24-.105.255-.24l.15-2.655-.15-3.495c-.015-.135-.12-.24-.255-.24m1.02-.091c-.15 0-.27.12-.285.27l-.12 3.525.135 2.67c.015.149.12.27.27.27.165 0 .285-.12.285-.27l.135-2.67-.15-3.525c0-.15-.135-.27-.285-.27m2.04.091c-.165 0-.3.135-.315.3l-.09 3.42.105 2.685c.015.165.135.3.3.3.18 0 .314-.135.314-.3l.12-2.685-.12-3.42c-.015-.165-.135-.3-.3-.3m.96-.091c-.18 0-.315.135-.33.315l-.075 3.435.09 2.7c.015.18.135.315.33.315.165 0 .315-.135.315-.315l.105-2.7-.09-3.435c-.015-.18-.15-.315-.345-.315m1.065-.061c-.195 0-.36.15-.36.36l-.06 3.435.075 2.7c0 .21.165.36.36.36.195 0 .375-.15.375-.36l.09-2.7-.09-3.435c0-.21-.18-.36-.39-.36m1.02-.03c-.21 0-.39.165-.405.375l-.045 3.405.06 2.7c.015.21.18.375.39.375.21 0 .39-.165.405-.375l.075-2.7-.075-3.405c-.015-.21-.195-.375-.405-.375m1.995.015c-.195 0-.375.18-.405.405l-.03 3.345.045 2.685c.03.21.21.39.405.39.21 0 .375-.18.405-.39l.06-2.685-.06-3.345c-.03-.225-.195-.405-.42-.405m1.02-.03c-.225 0-.405.195-.42.42l-.015 3.33.03 2.67c.015.225.21.405.42.405.225 0 .405-.18.435-.405l.045-2.67-.045-3.33c-.03-.225-.21-.42-.45-.42m7.095 1.086c-.475 0-.918.105-1.32.3-.27-3.045-2.805-5.445-5.91-5.445-.75 0-1.485.15-2.145.42-.27.105-.345.225-.36.435v10.71c.015.225.18.405.405.435l9.33.015c1.56 0 2.835-1.275 2.835-2.835.015-1.575-1.26-2.835-2.835-2.835"})})},{value:"Vimeo",label:"Vimeo",color:"#1AB7EA",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"
886currentColor",children:e.jsx("path",{d:"M23.977 6.416c-.105 2.338-1.739 5.543-4.894 9.609-3.268 4.247-6.026 6.37-8.29 6.37-1.409 0-2.578-1.294-3.553-3.881L5.322 11.4C4.603 8.816 3.834 7.522 3.01 7.522c-.179 0-.806.378-1.881 1.132L0 7.197c1.185-1.044 2.351-2.084 3.501-3.128C5.08 2.701 6.266 1.984 7.055 1.91c1.867-.18 3.016 1.1 3.447 3.838.465 2.953.789 4.789.971 5.507.539 2.45 1.131 3.674 1.776 3.674.502 0 1.256-.796 2.265-2.385 1.004-1.589 1.54-2.797 1.612-3.628.144-1.371-.395-2.061-1.614-2.061-.574 0-1.167.121-1.777.391 1.186-3.868 3.434-5.757 6.762-5.637 2.473.06 3.628 1.664 3.493 4.797l-.013.01z"})})},{value:"Tumblr",label:"Tumblr",color:"#36465D",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M14.563 24c-5.093 0-7.031-3.756-7.031-6.411V9.747H5.116V6.648c3.63-1.313 4.512-4.596 4.71-6.469C9.84.051 9.941 0 9.999 0h3.517v6.114h4.801v3.633h-4.82v7.47c.016 1.001.375 2.371 2.207 2.371h.09c.631-.02 1.486-.205 1.936-.419l1.156 3.425c-.436.636-2.4 1.374-4.156 1.404h-.178l-.006.002z"})})},{value:"Flickr",label:"Flickr",color:"#0063DC",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M0 12c0 3.074 2.494 5.564 5.565 5.564 3.075 0 5.569-2.49 5.569-5.564S8.641 6.436 5.565 6.436C2.495 6.436 0 8.926 0 12zm12.866 0c0 3.074 2.493 5.564 5.567 5.564C21.496 17.564 24 15.074 24 12s-2.492-5.564-5.564-5.564c-3.075 0-5.57 2.49-5.57 5.564z"})})},{value:"Dribbble",label:"Dribbble",color:"#EA4C89",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.395-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.428 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z"})})},{value:"Behance",label:"Behance",color:"#1769FF",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M6.938 4.503c.702 0 1.34.06 1.92.188.577.13 1.07.33 1.485.61.41.28.733.65.96 1.12.225.47.34 1.05.34 1.73 0 .74-.17 1.36-.507 1.86-.338.5-.837.9-1.502 1.22.906.26 1.576.72 2.022 1.37.448.66.665 1.45.665 2.36 0 .75-.13 1.39-.41 1.93-.28.55-.67 1-1.16 1.35-.48.348-1.05.6-1.67.767-.61.165-1.252.254-1.91.254H0V4.51h6.938v-.007zM6.545 9.66c.56 0 1.01-.13 1.36-.38.348-.256.518-.658.518-1.2 0-.3-.05-.553-.158-.756-.108-.2-.256-.358-.442-.478-.186-.12-.402-.2-.652-.244-.25-.043-.517-.065-.8-.065h-3.59v3.12h3.765zm.18 5.33c.314 0 .612-.03.893-.092.282-.06.53-.163.747-.3.215-.143.39-.33.517-.573.128-.24.193-.554.193-.928 0-.74-.218-1.27-.65-1.59-.434-.32-.994-.48-1.68-.48H2.78v3.96h3.946zm8.66-7.62h5.87v1.1h-5.87V7.37zm3.27 9.93c.63 0 1.14-.16 1.52-.48.387-.32.61-.73.67-1.24h2.27c-.15 1.2-.63 2.1-1.42 2.7-.79.61-1.79.91-3 .91-.61 0-1.17-.09-1.69-.27-.52-.19-.97-.47-1.34-.83-.38-.38-.67-.83-.88-1.38-.2-.55-.3-1.17-.3-1.88v-.26c0-.7.1-1.32.31-1.87.2-.55.49-1.01.87-1.39.37-.38.82-.67 1.34-.87.52-.2 1.09-.3 1.71-.3.7 0 1.31.12 1.83.36.52.24.95.57 1.29.99.34.42.6.9.77 1.46.16.56.25 1.15.25 1.79v.7h-5.93c.02.71.24 1.29.65 1.73.42.44.97.66 1.67.66zm-.16-6.05c-.56 0-1.02.15-1.37.46-.35.3-.58.73-.69 1.28h4.06c-.07-.51-.27-.93-.58-1.25-.31-.32-.78-.49-1.42-.49z"})})},{value:"Medium",label:"Medium",color:"#000000",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M13.54 12a6.8 6.8 0 01-6.77 6.82A6.8 6.8 0 010 12a6.8 6.8 0 016.77-6.82A6.8 6.8 0 0113.54 12zM20.96 12c0 3.54-1.51 6.42-3.38 6.42-1.87 0-3.39-2.88-3.39-6.42s1.52-6.42 3.39-6.42 3.38 2.88 3.38 6.42M24 12c0 3.17-.53 5.75-1.19 5.75-.66 0-1.19-2.58-1.19-5.75s.53-5.75 1.19-5.75C23.47 6.25 24 8.83 24 12z"})})},{value:"Quora",label:"Quora",color:"#B92B27",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"
886currentColor",children:e.jsx("path",{d:"M12.738 20.713c-.666-1.422-1.596-2.845-3.205-2.845-.474 0-.893.077-1.248.263l-.637-1.076c.736-.632 1.875-1.054 3.29-1.054 2.158 0 3.482 1.026 4.536 2.59.404-1.087.631-2.418.631-3.918 0-4.932-2.035-9.097-6.114-9.097-4.023 0-6.114 4.165-6.114 9.097 0 4.876 2.091 9.012 6.114 9.012.776 0 1.48-.139 2.097-.413a31.95 31.95 0 01.65-.559zm3.262 1.551c-.846-.893-1.608-2.041-2.338-3.262-1.128.633-2.56 1.002-4.166 1.002C4.236 20.004.023 15.638.023 10.673.023 5.665 4.236 1.32 9.496 1.32c5.317 0 9.474 4.345 9.474 9.353 0 2.096-.493 3.983-1.404 5.485.956 1.326 2.048 2.335 3.469 2.335.622 0 1.026-.198 1.37-.448l.67 1.3c-.537.532-1.423 1.072-2.65 1.072-1.533 0-2.683-.532-3.425-1.153z"})})},{value:"WeChat",label:"WeChat",color:"#07C160",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 01.213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 00.167-.054l1.903-1.114a.864.864 0 01.717-.098 10.16 10.16 0 002.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 01-1.162 1.178A1.17 1.17 0 014.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 01-1.162 1.178 1.17 1.17 0 01-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 01.598.082l1.584.926a.272.272 0 00.14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 01-.023-.156.49.49 0 01.201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.006-.27-.02-.406-.032zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 01-.969.983.976.976 0 01-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 01-.969.983.976.976 0 01-.969-.983c0-.542.434-.982.969-.982z"})})},{value:"Line",label:"LINE",color:"#00C300",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.349 0 .63.285.63.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314"})})},{value:"Viber",label:"Viber",color:"#7360F2",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.398.002C9.473.028 5.331.344 3.014 2.467 1.294 4.187.635 6.633.5 9.686.364 12.74.327 18.399 5.94 19.976h.005l-.005 2.28s-.037.921.573 1.108c.736.227 1.168-.476 1.871-1.232.386-.415.918-.988 1.319-1.441 3.632.307 6.423-.395 6.74-.506.732-.257 4.87-.77 5.543-6.275.698-5.686-.335-9.283-2.171-10.904-.553-.494-2.768-2.098-8.418-2.098zm.142 1.881h.039c4.655 0 7.136 1.205 7.679 1.945 1.497 1.32 2.199 4.421 1.622 9.064-.534 4.377-3.64 4.856-4.242 5.068-.263.092-2.685.698-5.7.504 0 0-2.26 2.727-2.963 3.431-.113.112-.248.156-.339.138-.128-.024-.163-.149-.162-.332l.017-3.725c-4.593-1.284-4.328-6.049-4.217-8.561.11-2.512.635-4.554 2.067-5.972 1.889-1.73 5.52-1.561 6.199-1.561zm.167 2.342c-.115.001-.235.096-.231.234.004.137.105.231.24.231 1.453.049 2.675.499 3.627 1.328.949.851 1.475 1.969 1.563 3.317.009.136.098.231.231.231.017 0 .037-.002.056-.006.145-.024.225-.124.215-.267-.098-1.505-.716-2.757-1.789-3.723-1.029-.929-2.384-1.456-4.031-1.537-.028-.006-.054-.008-.081-.008zm-2.771.932c-.16-.007-.33.026-.502.091-.369.142-.682.36-1.003.532-.292.166-.486.42-.571.769-.059.259-.046.521.052.774.194.503.461.966.715 1.432.418.763.93 1.463 1.521 2.104.83.9 1.792 1.643 2.821 2.298.406.258.824.497 1.261.696.556.254 1.066.58 1.686.692.324.059.625-.007.889-.182.266-.175.454-.439.635-.692.254-.354.341-.754.04-1.103-.314-.368-.667-.
886699-1.024-1.023-.381-.346-.82-.328-1.203.029-.203.188-.392.392-.586.59-.175.18-.381.209-.595.094-.303-.165-.621-.309-.895-.514-.615-.459-1.159-.992-1.632-1.597-.219-.279-.418-.574-.572-.896-.091-.192-.075-.381.102-.539.177-.157.357-.31.521-.48.377-.391.382-.843.015-1.259-.217-.246-.435-.493-.66-.732-.296-.316-.59-.635-.898-.938-.193-.19-.432-.26-.68-.27-.045-.002-.091-.002-.137 0zm2.657.904c-.115.003-.22.105-.217.243.004.135.1.22.236.217.944-.002 1.72.298 2.327.897.606.598.923 1.477.954 2.277.007.135.099.225.234.225.019 0 .039-.003.058-.008.139-.033.214-.14.207-.279-.034-.919-.406-1.859-1.1-2.543-.695-.684-1.554-1.022-2.632-1.025a.169.169 0 00-.067-.004zm-.089 1.573c-.125-.003-.236.094-.241.238-.006.136.095.232.23.243.473.057.846.265 1.108.617.262.352.36.7.35 1.103-.003.135.088.232.223.239.018.001.035 0 .052-.004.128-.025.213-.122.215-.255.015-.523-.117-1.009-.48-1.493-.363-.485-.824-.728-1.405-.681-.016-.003-.033-.006-.052-.007z"})})},{value:"VK",label:"VKontakte",color:"#0077FF",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M15.684 0H8.316C1.592 0 0 1.592 0 8.316v7.368C0 22.408 1.592 24 8.316 24h7.368C22.408 24 24 22.408 24 15.684V8.316C24 1.592 22.391 0 15.684 0zm3.692 17.123h-1.744c-.66 0-.862-.525-2.049-1.714-1.033-1.01-1.49-1.135-1.744-1.135-.356 0-.458.102-.458.593v1.575c0 .424-.135.678-1.253.678-1.846 0-3.896-1.118-5.335-3.202C4.624 10.857 4.03 8.57 4.03 8.096c0-.254.102-.491.593-.491h1.744c.44 0 .61.203.78.677.863 2.49 2.303 4.675 2.896 4.675.22 0 .322-.102.322-.66V9.721c-.068-1.186-.695-1.287-.695-1.71 0-.203.17-.407.44-.407h2.744c.373 0 .508.203.508.643v3.473c0 .372.17.508.271.508.22 0 .407-.136.813-.542 1.27-1.422 2.18-3.608 2.18-3.608.119-.254.322-.491.763-.491h1.744c.525 0 .644.27.525.643-.22 1.017-2.354 4.031-2.354 4.031-.186.305-.254.44 0 .78.186.254.796.779 1.203 1.253.745.847 1.32 1.558 1.473 2.049.17.49-.085.744-.576.744z"})})},{value:"Weibo",label:"Weibo",color:"#E6162D",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M10.098 20.323c-3.977.391-7.414-1.406-7.672-4.02-.259-2.609 2.759-5.047 6.74-5.441 3.979-.394 7.413 1.404 7.671 4.018.259 2.6-2.759 5.049-6.739 5.443zM9.05 17.219c-.384.616-1.208.884-1.829.593-.612-.285-.793-.971-.405-1.593.384-.62 1.208-.888 1.83-.602.627.291.813.977.404 1.602zm1.27-1.627c-.141.237-.449.353-.689.253-.236-.09-.313-.361-.177-.586.138-.227.436-.346.672-.24.239.09.315.36.194.573zm.176-2.719c-1.893-.493-4.033.45-4.857 2.118-.836 1.704-.026 3.591 1.886 4.21 1.983.64 4.318-.341 5.132-2.179.8-1.793-.201-3.642-2.161-4.149zm7.563-1.224c-.346-.105-.581-.18-.402-.649.389-1.024.432-1.903.008-2.533-.793-1.18-2.96-1.116-5.451-.
886034 0 0-.783.344-.583-.281.388-1.236.327-2.272-.279-2.873-.873-.866-3.175-.082-5.14 1.751C4.6 8.691 3.6 10.491 3.6 12.09c0 3.112 3.999 5.003 7.909 5.003 5.128 0 8.538-2.977 8.538-5.339-.009-1.438-.918-2.258-1.968-2.505zm3.307-5.049c-1.027-1.138-2.541-1.767-4.265-1.784l-.278.015c-.203.021-.363.174-.392.375-.031.201.076.395.26.473l.185.062c1.165.404 2.074 1.119 2.695 2.12.472.756.646 1.539.579 2.32-.014.183.085.357.249.445.16.084.359.07.498-.046l.139-.115c.961-.851 1.281-2.256.642-3.549l-.312-.316z"})})},{value:"Clubhouse",label:"Clubhouse",color:"#F3E5C7",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.777 14.24c-2.049 0-3.727-1.612-3.727-3.58V9.015c0-1.968 1.678-3.58 3.727-3.58h.446c2.05 0 3.727 1.612 3.727 3.58v1.645c0 1.968-1.678 3.58-3.727 3.58h-.446zm3.17-6.283V4.65c0-.955-.813-1.74-1.81-1.74h-2.27c-.998 0-1.811.785-1.811 1.74v3.307l5.892-2.297v2.297zM6.19 10.66c0 2.934 2.474 5.335 5.487 5.335h.646c3.013 0 5.487-2.4 5.487-5.335V5.326c0-2.934-2.474-5.335-5.487-5.335h-.646c-3.013 0-5.487 2.401-5.487 5.335v5.335zm-.97 7.015c-.486 0-.885.37-.885.825v1.19c0 1.82 1.545 3.31 3.435 3.31h8.46c1.89 0 3.435-1.49 3.435-3.31v-1.19c0-.454-.4-.825-.886-.825H5.22z"})})},{value:"Patreon",label:"Patreon",color:"#FF424D",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M0 .48v23.04h4.22V.48zm15.385 0c-4.764 0-8.641 3.88-8.641 8.65 0 4.755 3.877 8.623 8.641 8.623 4.75 0 8.615-3.868 8.615-8.623C24 4.36 20.136.48 15.385.48z"})})},{value:"OnlyFans",label:"OnlyFans",color:"#00AFF0",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 4.32c4.253 0 7.68 3.442 7.68 7.68 0 4.238-3.427 7.68-7.68 7.68-4.253 0-7.68-3.442-7.68-7.68 0-4.238 3.427-7.68 7.68-7.68zm0 2.16c-3.056 0-5.52 2.48-5.52 5.52 0 3.04 2.464 5.52 5.52 5.52 3.056 0 5.52-2.48 5.52-5.52 0-3.04-2.464-5.52-5.52-5.52zm0 1.68c2.129 0 3.84 1.728 3.84 3.84 0 2.112-1.711 3.84-3.84 3.84-2.129 0-3.84-1.728-3.84-3.84 0-2.112 1.711-3.84 3.84-3.84z"})})},{value:"Shopify",label:"Shopify",color:"#95BF47",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M15.337 23.979l7.216-1.561s-2.604-17.613-2.625-17.73c-.018-.116-.114-.192-.211-.192s-1.929-.136-1.929-.136-.756-.755-1.062-1.062c-.305-.306-.731-.321-.945-.252l-.672.218c-.391-1.156-1.093-2.212-2.33-2.212-.035 0-.07.001-.104.003-.391-.516-.876-.744-1.291-.744-3.19 0-4.72 3.989-5.198 6.019-.479.156-1.082.352-1.648.537-.551.186-.825.278-1.276.431C4.156 7.502 1.187 19.879 1.187 19.879l11.178 1.947 2.972 2.153zm-1.967-14.254c0 .009-.01.02-.029.03-.502.166-.991.328-1.459.484.284-1.084.824-2.172 1.485-2.882-.246.611-.453 1.489-.453 2.368h.456zm-1.104-3.455c.98 0 1.513.235 1.9.544-.899.944-1.363 2.415-1.606 3.541-.878.288-1.681.551-2.329.766.455-2.1 1.482-4.851 4.035-4.851zm-.688-1.306c.171 0 .323.03.465.09-.977.458-2.013 1.614-2.456 3.925-.483.159-.954.314-1.389.457.566-1.943 1.839-4.472 3.38-4.472zm1.405 8.028c0-.038-.002-.082-.006-.128-.019-.164-.064-.299-.13-.395-.066-.097-.143-.165-.23-.204-.167-.074-.336-.074-.439-.021-.103.053-.205.153-.307.313-.047.074-.093.162-.138.26-.108.233-.181.521-.181.852 0 .038.002.082.006.128.019.164.064.299.13.395.066.097.143.165.23.204.167.074.336.074.439.021.103-.053.205-.153.307-.313.047-.074.093-.162.138-.26.108-.233.181-.521.181-.852z"})})},{value:"Etsy",label:"Etsy",color:"#F56400",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8.559 4.381c0-.591.03-.946.538-.946H14.1c2.08 0 2.618.24 3.046 1.946l.329 1.315h.926V1.196h-.836c0 .45-.09.6-.598.6H5.364v.925l1.076.09c.925.075 1.076.39 1.076 1.35v11.67c0 .96-.15 1.29-1.076 1.365l-1.076.075v.93h9.646c2.17 0 2.784-.18 3.166-1.8l.66-2.8h-.96l-.48 1.695c-.39 1.425-.975 1.8-2.55 1.8h-4.14c-.96 0-1.076-.33-1.076-.96v-5.61c0-.18 0-.285.21-.285h2.994c1.545 0 1.74.45 1.74 1.8v.765h.93V7.6h-.93v.78c0 1.334-.18 1.784-1.74 1.784H9.008c-.256 0-.256-.09-.256-.3l.003-5.484z"})})},{value:"Amazon",label:"Amazon",color:"#FF9900",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"
886currentColor",children:e.jsx("path",{d:"M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.118c.138-.053.209-.02.209.097a.39.39 0 01-.118.209c-.343.318-1.065.732-2.169 1.24-1.103.51-2.334.898-3.69 1.167a17.58 17.58 0 01-3.626.405c-1.403 0-2.804-.148-4.2-.44a16.8 16.8 0 01-3.776-1.21 13.09 13.09 0 01-2.996-1.897c-.227-.19-.33-.3-.296-.331h-.014zm6.096-4.635c0 .862.237 1.618.71 2.27.473.65 1.09 1.13 1.853 1.443.733.3 1.707.46 2.921.483 2.032 0 3.478-.306 4.338-.92.86-.614 1.29-1.38 1.29-2.296 0-.684-.208-1.246-.625-1.686-.417-.44-1.037-.74-1.86-.897-.517-.097-1.415-.21-2.693-.34a42.273 42.273 0 01-1.94-.26c-.62-.1-1.037-.241-1.252-.42-.213-.181-.32-.432-.32-.75 0-.39.178-.697.532-.92.354-.225.86-.336 1.516-.336.722 0 1.294.155 1.715.466.422.311.63.698.625 1.162h4.206c-.036-1.2-.537-2.155-1.505-2.87-.968-.713-2.26-1.07-3.876-1.07-1.51 0-2.735.347-3.676 1.04-.94.693-1.41 1.64-1.41 2.84 0 .827.244 1.5.734 2.02.49.518 1.13.886 1.92 1.1.79.216 1.886.407 3.29.574.74.095 1.27.182 1.586.264.318.08.56.189.725.323.165.135.247.322.247.562 0 .356-.18.627-.537.812-.356.185-.895.278-1.617.278-.98 0-1.722-.178-2.228-.535-.505-.355-.773-.82-.805-1.39l-4.186.016zm11.233 5.24c-.093-.063-.14-.14-.14-.233 0-.153.14-.306.428-.457l.286-.137c1.168-.546 2.1-1.2 2.795-1.96l.21-.232c.097-.111.15-.156.16-.135.055.07-.02.247-.221.53-.49.688-1.065 1.258-1.725 1.708l-.137.09c-.32.222-.568.378-.744.465-.176.087-.33.131-.465.131-.127 0-.273-.04-.384-.12h-.063v.35z"})})},{value:"eBay",label:"eBay",color:"#E53238",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M5.869 9.613c-2.627 0-4.237 1.189-4.237 3.16 0 1.647 1.193 2.644 3.182 2.644 1.436 0 2.474-.63 2.975-1.6v1.431h1.992v-5.166c0-2.087-1.345-3.312-3.78-3.312-2.22 0-3.712 1.11-3.939 2.908h1.992c.22-.77.824-1.215 1.914-1.215 1.133 0 1.815.524 1.815 1.393v.64l-2.69.117h.776zm1.914 1.663c0 1.002-.88 1.68-2.23 1.68-1.037 0-1.638-.47-1.638-1.232 0-.726.56-1.15 1.607-1.206l2.261-.117v.875zm5.283-4.49v8.462h2.024v-3.47c0-1.416.847-2.243 2.152-2.243 1.17 0 1.803.66 1.803 1.898v3.815h2.024v-4.109c0-1.898-1.095-3.059-2.912-3.059-1.324 0-2.35.616-2.93 1.709v-3.003h-2.161zm8.816 3.77c-.067 2.307 1.544 4.101 4.118 4.101 2.56 0 4.118-1.697 4.118-4.337v-.295h-4.152v1.59h2.147c-.05 1.064-.916 1.833-2.08 1.833-1.417 0-2.179-1.095-2.179-2.859 0-1.77.762-2.864 2.179-2.864.97 0 1.693.493 1.96 1.298h1.99c-.268-1.797-1.797-2.909-3.95-2.909-2.553 0-4.15 1.798-4.15 4.31v.132z"})})},{value:"Alibaba",label:"Alibaba",color:"#FF6A00",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M13.478 4.608c-.627-.18-.988-.69-.816-1.332.186-.654.79-.988 1.44-.808.638.186.992.71.81 1.349-.175.615-.785.958-1.434.791zm-4.62 2.59c-.28.096-.512.107-.747-.078-.248-.195-.267-.5-.13-.76.43-.835.87-1.665 1.318-2.49.194-.36.526-.506.89-.384.38.127.555.455.45.9-.07.294-.227.562-.392.808-.443.67-.914 1.32-1.389 2.003zm3.314 3.02c-1.064-.183-1.976-.61-2.748-1.29-.772-.68-1.317-1.49-1.578-2.48-.197-.747.176-1.395.897-1.549.642-.137 1.217.209 1.445.85.295.833.834 1.485 1.575 1.96.53.34 1.108.536 1.73.59.808.07 1.335.586 1.255 1.277-.07.617-.588 1.025-1.323.918-.424-.064-.837-.134-1.254-.277zm2.166 4.314c.27.046.54.098.81.13 1.178.137 2.36.18 3.54.024.45-.06.907-.133 1.35-.248.35-.09.653.056.787.368.14.328.018.666-.313.836-.246.127-.513.218-.783.285-1.203.303-2.418.32-3.64.123-.34-.055-.674-.14-1.007-.232-.414-.115-.608-.454-.49-.86.107-.37.43-.53.86-.44.296.054.596.065.885.013zm-.42-2.22c.307-.024.616-.024.924-.024.892 0 1.785.025 2.67.157.38.056.747.185 1.114.296.295.09.458.346.435.64-.025.31-.227.53-.526.57-.135.02-.276.013-.414-.007-.68-.097-1.364-.196-2.044-.28-.785-.098-1.575-.116-2.365-.06-.313.023-.612-.055-.788-.345-.187-.308-.08-.69.233-.886.212-.132.46-.175.76-.062zm-10.59-1.25c.247.118.38.324.406.596.026.275-.066.508-.282.686-.57.47-1.195.846-1.918 1.052-.67.19-1.346.23-2.024.034-.417-.12-.65-.445-.593-.84.053-.367.345-.61.743-.597.103.003.206.02.31.032.522.06 1.05.04 1.56-.106.404-.116.768-.308 1.086-.572.177-.148.382-.214.614-.214.036-.026.064-.044.098-.07z"})})},{value:"Threads",label:"Threads",color:"#000000",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"
886currentColor",children:e.jsx("path",{d:"M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.96-.065-1.182.408-2.256 1.332-3.023.88-.73 2.087-1.146 3.4-1.174 1.236-.026 2.347.175 3.332.601.022-.541.012-1.045-.028-1.51-.087-1.016-.388-1.767-.896-2.234-.556-.51-1.405-.786-2.533-.82l-.062-.004c-.91 0-1.995.246-2.74.673l-1.02-1.758c1.1-.63 2.533-1.031 3.91-1.031l.09.002c1.64.05 2.94.5 3.865 1.34.98.888 1.48 2.161 1.486 3.785 0 .07-.001.14-.003.21 1.063.58 1.883 1.394 2.396 2.378.676 1.297.92 2.963.687 4.685-.336 2.479-1.434 4.467-3.267 5.916-1.73 1.368-4.023 2.09-6.825 2.144zM10.08 13.369c-.904.033-1.63.274-2.104.7-.506.452-.744 1.073-.71 1.849.031.706.357 1.331 1.042 1.69.59.31 1.386.461 2.24.416 1.118-.06 1.967-.457 2.525-1.181.443-.574.75-1.36.916-2.344-.98-.398-2.024-.54-2.918-.54-.331 0-.661.02-.991.06v-.65z"})})},{value:"Bluesky",label:"Bluesky",color:"#0085FF",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 01-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8z"})})},{value:"Mastodon",label:"Mastodon",color:"#6364FF",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 00.023-.043v-1.809a.052.052 0 00-.02-.041.053.053 0 00-.046-.01 20.282 20.282 0 01-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 01-.319-1.433.053.053 0 01.066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z"})})},{value:"Kick",label:"Kick",color:"#53FC18",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1.333 0v24h21.334V0zm6.203 5.25h1.911v4.969h1.172V8.977h1.64v-1.59h1.915v1.59h-.638v2.882h.638v2.55h-1.915v-1.69H10.62v1.69h-1.64v1.341h-1.91v-1.342H5.796V5.25zm12.668 4.969v2.882h-1.276v-2.882zm0 2.882h1.275v2.549h-1.275z"})})},{value:"Rumble",label:"Rumble",color:"#85C742",svg:e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M7.622 10.468c-.594.012-.992.398-1.062.879-.055.374.118.726.42.926.373.246.8.244 1.18.046.34-.177.538-.534.517-.892-.015-.255-.135-.503-.363-.681-.198-.154-.454-.28-.692-.278zm5.476 1.026c-1.054-.03-2.108-.012-3.162-.012-.02.013-.05.022-.059.043-.029.07-.083.139-.078.205.02.271.097.542.263.754.343.441.8.603 1.305.656.665.069 1.329.063 1.985-.07.405-.083.791-.247 1.1-.52.41-.363.58-.839.575-1.381-.004-.469-.116-.906-.386-1.29-.383-.543-.95-.762-1.581-.86-.378-.058-.77-.042-1.15-.043-.547 0-1.093.01-1.64.02-.01.001-.02.013-.046.03.016.318.014.636.055.947.061.464.28.87.644 1.178.331.28.724.394 1.143.413.411.019.82.009 1.23.003.134-.002.317-.045.382.01.067.058.071.231.058.347-.048.414-.373.599-.773.605-.29.004-.58.009-.87.009-.324 0-.648.008-.972-.003-.343-.012-.65-.14-.855-.436-.113-.162-.164-.351-.168-.605zm4.93-1.21c-.08.008-.114.009-.147.015a.844.844 0 00-.717.7c-.039.196-.042.403.001.6.078.36.354.588.7.655.088.017.179.019.268.028.007.001.014.008.032.02l-.202.742-.074.27c-.11.404-.218.807-.33 1.21-.056.203-.137.264-.349.269-.201.005-.403.001-.615.001v.693h3.068c.004-.044.011-.081.01-.118-.003-.193-.01-.386-.013-.58 0-.033.012-.074-.005-.097-.098-.14-.082-.287-.044-.442.076-.306.139-.616.2-.926l.14-.66c.09-.421.176-.843.267-1.276h-1.09c-.121.454-.243.914-.366 1.375l-.207.77c-.083.302-.168.603-.25.905-.013.05-.017.1-.027.163l-.17-.002c-.008-.077-.02-.146-.021-.215-.005-.21.006-.422-.02-.63
886-.071-.558-.47-.897-1.036-.87zm-11.68.218c-.03.002-.07.003-.109.007-.47.051-.773.322-.889.764a1.66 1.66 0 00-.046.4c0 .42.001.842 0 1.263 0 .092.02.139.12.161.35.077.696.17 1.042.26.225.06.329-.007.367-.237.013-.075.02-.15.02-.226.003-.58.002-1.159.003-1.738 0-.07.003-.14.014-.208.047-.289-.094-.443-.377-.45-.048-.002-.097.002-.145.004zm5.987 1.056c.218.002.436-.002.653.002.245.005.422.149.464.345.065.31-.103.553-.403.577-.26.021-.524.014-.786.014-.21 0-.273-.061-.273-.262 0-.2-.002-.4.001-.6.003-.069.046-.074.102-.075.08-.002.161-.001.242-.001z"})})},{value:"Users",label:"Generic (Users)",color:"#64748B",lucide:mt},{value:"Heart",label:"Generic (Heart)",color:"#EF4444",lucide:ia},{value:"Eye",label:"Generic (Eye)",color:"#3B82F6",lucide:Ct},{value:"MessageCircle",label:"Generic (Message)",color:"#10B981",lucide:Ls},{value:"Share2",label:"Generic (Share)",color:"#8B5CF6",lucide:Ki},{value:"Repeat",label:"Generic (Repeat)",color:"#F59E0B",lucide:aw},{value:"Star",label:"Generic (Star)",color:"#FBBF24",lucide:Zt},{value:"Globe",label:"Generic (Globe)",color:"#06B6D4",lucide:wt},{value:"Tv",label:"Generic (TV)",color:"#6366F1",lucide:iw},{value:"Radio",label:"Generic (Radio)",color:"#EC4899",lucide:uy},{value:"Headphones",label:"Generic (Audio)",color:"#14B8A6",lucide:Kn},{value:"Camera",label:"Generic (Camera)",color:"#F97316",lucide:Fv},{value:"Video",label:"Generic (Video)",color:"#EF4444",lucide:Di},{value:"Music",label:"Generic (Music)",color:"#8B5CF6",lucide:Kv},{value:"Gamepad2",label:"Generic (Gaming)",color:"#10B981",lucide:Xn},{value:"ShoppingBag",label:"Generic (Shopping)",color:"#F59E0B",lucide:ah},{value:"Briefcase",label:"Generic (Business)",color:"#3B82F6",lucide:Rv},{value:"GraduationCap",label:"Generic (Education)",color:"#6366F1",lucide:Gv},{value:"Newspaper",label:"Generic (News)",color:"#64748B",lucide:Qv},{value:"Podcast",label:"Generic (Podcast)",color:"#8B5CF6",lucide:Zv}],YN=["low","medium","high","premium"];function XN(){var he;const{showAlert:t,showConfirm:s}=Vs(),[a,r]=o.useState("packages"),[l,n]=o.useState([]),[i,c]=o.useState([]),[d,x]=o.use
886State([]),[m,h]=o.useState([]),[f,y]=o.useState(!0),[g,w]=o.useState(!1),[N,v]=o.useState(""),[j,b]=o.useState(""),[p,E]=o.useState(""),[C,S]=o.useState(new Set),[k,J]=o.useState(new Set),[u,A]=o.useState(null),[T,ae]=o.useState(null),[P,z]=o.useState(null),[I,Z]=o.useState(!1),[Q,_]=o.useState(!1),[M,F]=o.useState(!1),[R,X]=o.useState(null),[re,U]=o.useState(!1),[oe,ue]=o.useState(null),[K,q]=o.useState(!1),je=async D=>{if(!oe||oe.id!==D.id)return;const O=oe.value.trim(),fe=O===""?null:Number(O);if(O!==""&&(fe===null||Number.isNaN(fe)||fe<0)){t("Gecerli bir fiyat girin",{type:"warning"});return}const W=oe.field==="price"?D.price:D.original_price;if(fe===W||O===""&&W===null){ue(null);return}q(!0);try{const _e={...D,[oe.field]:fe};await se("package",_e)&&ue(null)}finally{q(!1)}};o.useEffect(()=>{we()},[]);const we=async()=>{y(!0);try{const[D,O,fe,W]=await Promise.all([Ye.from("platforms").select("*").order("sort_order"),Ye.from("service_categories").select("*, platforms(name, slug)").order("sort_order"),Ye.from("packages").select("*, service_categories(id, name, slug, platforms(id, name, slug)), providers(id, name)").order("sort_order"),Ye.from("providers").select("id, name, api_url, is_active").order("name")]);D.error&&console.error("Platforms error:",D.error),O.error&&console.error("Categories error:",O.error),fe.error&&console.error("Packages error:",fe.error),W.error&&console.error("Providers error:",W.error),n(D.data||[]),c(O.data||[]),x(fe.data||[]),h(W.data||[])}catch(D){console.error("[PackageManagement] Error fetching data:",D)}finally{y(!1)}},se=async(D,O)=>{w(!0);try{const W=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_packages",{method:"POST",body:JSON.stringify({type:D,data:O})}),_e=await W.json();if(!W.ok)throw new Error(_e.error||"Failed to save");return await we(),!0}catch(fe){return t(fe instanceof Error?fe.message:"Failed to save",{type:"error"}),!1}finally{w(!1)}},Se=async(D,O)=>{try{const W=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_packages",{method:"DELETE",body:JSON.stringify({type:D,id:O})}),_e=await W.json();if(!W.ok)throw new Error(_e.error||"Failed to delete");return await we(),!0}catch(fe){return t(fe instanceof Error?fe.message:"Failed to delete",{type:"error"}),!1}},$=async(D,O)=>{await s("Are you sure you want to delete this item?",{title:"Delete Item",type:"warning"})&&await Se(D,O)},ie=async()=>{if(!(u!=null&&u.name)||!(u!=null&&u.slug)){t("Name and slug are required",{type:"warning"});return}await se("platform",u)&&(Z(!1),A(null))},be=async()=>{if(!(T!=null&&T.name)||!(T!=null&&T.slug)||!(T!=null&&T.platform_id)){t("Name, slug, and platform are required",{type:"warning"});return}await se("category",T)&&(_(!1),ae(null))},Pe=async()=>{if(!(P!=null&&P.category_id)||!(P!=null&&P.quantity)||!(P!=null&&P.price)){t("Category, quantity, and price are required",{type:"warning"});return}await se("package",P)&&(F(!1),z(null))},de=async()=>{if(!R)return;const D=R.provider_id==="__EMPTY__";if(!D&&!R.provider_id&&!R.provider_service_id){t("Saglayici veya servis ID girin",{type:"warning"});return}U(!0);try{const O=D?null:m.find(Re=>Re.id===R.provider_id),W=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_packages",{method:"POST",body:JSON.stringify({type:"bulk_assign_provider",data:{category_id:R.category_id,provider_id:D?null:R.provider_id||null,provider_service_id:D?null:R.provider_service_id?Number(R.provider_service_id):null,provider_name:D?null:(O==null?void 0:O.name)||null,clear_provider:D}})}),_e=await W.json();if(!W.ok)throw new Error(_e.error||"Failed");t(`${_e.updated} paket guncellendi`,{type:"success"}),X(null),await we()}catch(O){t(O instanceof Error?O.message:"Failed",{type:"error"})}finally{U(!1)}},H=async D=>{const O={category_id:D.category_id,quantity:D.quantity,delivery_quantity:D.delivery_quantity,price:D.price,original_price:D.original_price,price_try:D.price_try,original_price_try:D.original_price_try,provider_service_id:D.provider_service_id,provider_id:D.provider_id,is_best_seller:!1,badge_text:D.badge_text,features:D.features,is_active:D.is_active,min_quantity:D.min_quantity,max_quantity:D.max_quantity,delivery_time:D.delivery_time,quality:D.quality,refill_days:D.refill_days,refill_eligible:D.refill_eligible,sort_order:D.sort_order+1,link_payment_enabled:D.link_payment_enabled,link_payment_url:D.link_payment_url};await se("package",O)},me=D=>{const O=sd.find(fe=>fe.value===D);return O?O.lucide?O.lucide:({className:fe})=>e.jsx("span",{className:fe,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:O.svg}):us},Ae=d.filter(D=>{var _e,Re,ve,Te,ze;const O=N===""||((_e=D.platform)==null?void 0:_e.toLowerCase().includes(N.toLowerCase()))||((Re=D.service_type)==null?void 0:Re.toLowerCase().includes(N.toLowerCase()))||D.quantity.toString().includes(N)||((ve=D.provider_service_id)==null?void 0:ve.toString().includes(N)),fe=j===""||((ze=(Te=D.service_categories)==null?void 0:Te.platforms)==null?void 0:ze.id)===j,W=p===""||D.category_id===p;return O&&fe&&W}).reduce((D,O)=>{var _e,Re;const fe=((Re=(_e=O.service_categories)==null?void 0:_e.platforms)==null?void 0:Re.id)||"unknown",W=O.category_id||"unknown";return D[fe]||(D[fe]={}),D[fe][W]||(D[fe][W]=[]),D[fe][W].push(O),D},{});return f?e.jsx("div",{className:"flex items-center justify-center h-96",children:e.jsx("div",{className:"w-12 h-12 border-4 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-2xl font-bold text-white flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-xl bg-gradient-to-br from-cyan-500 to-blue-600",children:e.jsx(us,{className:"w-6 h-6 text-white"})}),"Package Management"]}),e.jsx("p",{className:"text-slate-400 mt-1",children:"Manage platforms, services, and packages"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs("button",{onClick:()=>{A({is_active:!0,sort_order:l.length}),Z(!0)},className:"px-4 py-2 bg-gradient-to-r from-emerald-500 to-teal-600 text-white rounded-lg font-medium hover:opacity-90 transition-opacity flex items-center gap-2",children:[e.jsx(ns,{className:"w-4 h-4"}),"Platform"]}),e.jsxs("button",{onClick:()=>{ae({is_active:!0,sort_order:0,requires_profile_verification:!0}
886),_(!0)},className:"px-4 py-2 bg-gradient-to-r from-blue-500 to-indigo-600 text-white rounded-lg font-medium hover:opacity-90 transition-opacity flex items-center gap-2",children:[e.jsx(ns,{className:"w-4 h-4"}),"Category"]}),e.jsxs("button",{onClick:()=>{z({is_active:!0,sort_order:0,quality:"high",delivery_time:"0-24 hours",min_quantity:1,refill_days:0,price_try:null,original_price_try:null}),F(!0)},className:"px-4 py-2 bg-gradient-to-r from-cyan-500 to-blue-600 text-white rounded-lg font-medium hover:opacity-90 transition-opacity flex items-center gap-2",children:[e.jsx(ns,{className:"w-4 h-4"}),"Package"]})]})]}),e.jsx("div",{className:"flex gap-2 border-b border-slate-700",children:[{id:"packages",label:"Packages",icon:Jv,count:d.length},{id:"categories",label:"Categories",icon:Os,count:i.length},{id:"platforms",label:"Platforms",icon:lw,count:l.length}].map(D=>e.jsxs("button",{onClick:()=>r(D.id),className:`flex items-center gap-2 px-4 py-3 font-medium transition-colors border-b-2 -mb-px ${a===D.id?"text-cyan-400 border-cyan-400":"text-slate-400 border-transparent hover:text-slate-300"}`,children:[e.jsx(D.icon,{className:"w-4 h-4"}),D.label,e.jsx("span",{className:`px-2 py-0.5 text-xs rounded-full ${a===D.id?"bg-cyan-500/20 text-cyan-400":"bg-slate-700 text-slate-400"}`,children:D.count})]},D.id))}),a==="packages"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search packages...",value:N,onChange:D=>v(D.target.value),className:"w-full pl-10 pr-4 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-cyan-500"})]}),e.jsxs("select",{value:j,onChange:D=>{b(D.target.value),E("")},className:"px-4 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-cyan-500",children:[e.jsx("option",{value:"",children:"All Platforms"}),l.map(D=>e.jsx("option",{value:D.id,children:D.name},D.id))]}),e.jsxs("select",{value:p,onChange:D=>E(D.target.value),className:"px-4 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-cyan-500",children:[e.jsx("option",{value:"",children:"All Categories"}),i.filter(D=>!j||D.platform_id===j).map(D=>{var O;return e.jsxs("option",{value:D.id,children:[(O=D.platforms)==null?void 0:O.name," - ",D.name]},D.id)})]})]}),e.jsx("div",{className:"space-y-4",children:Object.entries(Ae).map(([D,O])=>{const fe=l.find(Re=>Re.id===D);if(!fe)return null;const W=C.has(D),_e=me(fe.icon);return e.jsxs("div",{className:"bg-slate-800/50 rounded-xl border border-slate-700 overflow-hidden",children:[e.jsxs("button",{onClick:()=>{const Re=new Set(C);W?Re.delete(D):Re.add(D),S(Re)},className:"w-full px-4 py-3 flex items-center justify-between hover:bg-slate-700/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg",style:{background:`linear-gradient(to right, ${fe.color_from}, ${fe.color_to})`},children:e.jsx(_e,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("h3",{className:"font-semibold text-white",children:fe.name}),e.jsxs("p",{className:"text-xs text-slate-400",children:[Object.values(O).flat().length," packages"]})]})]}),W?e.jsx(is,{className:"w-5 h-5 text-slate-400"}):e.jsx(ra,{className:"w-5 h-5 text-slate-400"})]}),W&&e.jsx("div",{className:"border-t border-slate-700",children:Object.entries(O).map(([Re,ve])=>{const Te=i.find(ke=>ke.id===Re);if(!Te)return null;const ze=k.has(Re),it=me(Te.icon);return e.jsxs("div",{className:"border-b border-slate-700/50 last:border-0",children:[e.jsxs("div",{className:"w-full px-6 py-2.5 flex items-center justify-between hover:bg-slate-700/30 transition-colors",children:[e.jsxs("button",{onClick:()=>{const ke=new Set(k);ze?ke.delete(Re):ke.add(Re),J(ke)},className:"flex items-center gap-2 flex-1 text-left",children:[e.jsx(it,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{className:"font-medium text-slate-300",children:Te.name}),e.jsxs("span",{className:"px-2 py-0.5 text-xs bg-slate-700 text-slate-400 rounded",children:[ve.length," packages"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:ke=>{var ce;ke.stopPropagation();const Xe=ve.find(Le=>Le.provider_id||Le.provider_service_id);X({category_id:Re,category_name:`${fe.name} - ${Te.name}`,provider_id:(Xe==null?void 0:Xe.provider_id)||"",provider_service_id:((ce=Xe==null?void 0:Xe.provider_service_id)==null?void 0:ce.toString())||""})},className:"px-2.5 py-1 text-xs bg-cyan-500/20 text-cyan-400 hover:bg-cyan-500/30 rounded transition-colors flex items-center gap-1",title:"Toplu Saglayici/Servis ID",children:[e.jsx(rt,{className:"w-3.5 h-3.5"}),"Toplu ID"]}),e.jsxs("button",{onClick:async ke=>{ke.stopPropagation();const Xe=!Te.hide_pending_progress;try{const{error:ce}=await Ye.from("service_categories").update({hide_pending_progress:Xe}).eq("id",Re);if(ce)throw ce;
886c(Le=>Le.map(Fe=>Fe.id===Re?{...Fe,hide_pending_progress:Xe}:Fe))}catch(ce){console.error("Toggle hide_pending_progress error:",ce)}},className:`px-2.5 py-1 text-xs rounded transition-colors flex items-center gap-1.5 ${Te.hide_pending_progress?"bg-amber-500/20 text-amber-400 hover:bg-amber-500/30":"bg-slate-500/20 text-slate-400 hover:bg-slate-500/30"}`,title:Te.hide_pending_progress?"Pending ilerleme gizleme: AÃIK":"Pending ilerleme gizleme: KAPALI",children:[e.jsx("div",{className:`w-7 h-4 rounded-full relative transition-colors ${Te.hide_pending_progress?"bg-amber-500":"bg-slate-600"}`,children:e.jsx("div",{className:`absolute top-0.5 w-3 h-3 rounded-full bg-white transition-all ${Te.hide_pending_progress?"left-3.5":"left-0.5"}`})}),e.jsx("span",{className:"text-[10px]",children:"Pending Gizle"})]}),ze?e.jsx(is,{className:"w-4 h-4 text-slate-500"}):e.jsx(ra,{className:"w-4 h-4 text-slate-500"})]})]}),ze&&e.jsxs("div",{className:"px-3 sm:px-6 pb-4",children:[e.jsx("div",{className:"hidden lg:block overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-xs text-slate-500 uppercase",children:[e.jsx("th",{className:"pb-2 font-medium",children:"Qty"}),e.jsx("th",{className:"pb-2 font-medium",children:"Price"}),e.jsx("th",{className:"pb-2 font-medium",children:"Original"}),e.jsx("th",{className:"pb-2 font-medium text-red-400",children:"TR âº"}),e.jsx("th",{className:"pb-2 font-medium",children:"API ID"}),e.jsx("th",{className:"pb-2 font-medium",children:"Delivery"}),e.jsx("th",{className:"pb-2 font-medium",children:"Quality"}),e.jsx("th",{className:"pb-2 font-medium",children:"Refill"}),e.jsx("th",{className:"pb-2 font-medium",children:"Status"}),e.jsx("th",{className:"pb-2 font-medium text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"text-sm",children:ve.sort((ke,Xe)=>ke.sort_order-Xe.sort_order).map(ke=>e.jsxs("tr",{className:"border-t border-slate-700/30",children:[e.jsxs("td",{className:"py-2 text-white font-medium",children:[ke.quantity.toLocaleString(),ke.is_best_seller&&e.jsx(Zt,{className:"w-3 h-3 text-yellow-400 inline ml-1"})]}),e.jsx("td",{className:"py-2",children:oe&&oe.id===ke.id&&oe.field==="price"?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-emerald-400 text-sm",children:"$"}),e.jsx("input",{type:"number",step:"0.01",min:"0",autoFocus:!0,value:oe.value,onChange:Xe=>ue({...oe,value:Xe.target.value}),onBlur:()=>je(ke),onKeyDown:Xe=>{Xe.key==="Enter"&&je(ke),Xe.key==="Escape"&&ue(null)},disabled:K,className:"w-20 px-2 py-0.5 bg-slate-900 border border-cyan-500 rounded text-emerald-400 text-sm focus:outline-none"})]}):e.jsxs("button",{onClick:()=>{var Xe;return ue({id:ke.id,field:"price",value:((Xe=ke.price)==null?void 0:Xe.toString())||""})},className:"text-emerald-400 font-medium hover:bg-slate-700/50 px-2 py-0.5 rounded transition-colors",title:"Fiyati duzenle",children:["$",ke.price]})}),e.jsx("td",{className:"py-2",children:oe&&oe.id===ke.id&&oe.field==="original_price"?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-slate-500 text-sm",children:"$"}),e.jsx("input",{type:"number",step:"0.01",min:"0",autoFocus:!0,value:oe.value,onChange:Xe=>ue({...oe,value:Xe.target.value}),onBlur:()=>je(ke),onKeyDown:Xe=>{Xe.key==="Enter"&&je(ke),Xe.key==="Escape"&&ue(null)},disabled:K,placeholder:"bos",className:"w-20 px-2 py-0.5 bg-slate-900 border border-cyan-500 rounded text-slate-300 text-sm focus:outline-none"})]}):e.jsx("button",{onClick:()=>{var Xe;return ue({id:ke.id,field:"original_price",value:((Xe=ke.original_price)==null?void 0:Xe.toString())||""})},className:"text-slate-500 line-through hover:text-slate-300 hover:no-underline hover:bg-slate-700/50 px-2 py-0.5 rounded transition-colors",title:"Original fiyati duzenle",children:ke.original_price?`$${ke.original_price}`:"-"})}),e.jsx("td",{className:"py-2",children:ke.price_try?e.jsxs("span",{className:"text-red-400 font-medium",title:"Turkiye ozel fiyat",children:["âº",ke.price_try]}):e.jsx("span",{className:"text-slate-600",children:"-"})}),e.jsx("td",{className:"py-2",children:e.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-mono ${ke.provider_service_id?"bg-cyan-500/20 text-cyan-400":"bg-slate-700 text-slate-500"}`,children:ke.provider_service_id||"N/A"})}),e.jsx("td",{className:"py-2 text-slate-400",children:ke.delivery_time}),e.jsx("td",{className:"py-2",children:e.jsx("span",{className:`px-2 py-0.5 rounded text-xs capitalize ${ke.quality==="premium"?"bg-purple-500/20 text-purple-400":ke.quality==="high"?"bg-emerald-500/20 text-emerald-400":ke.quality==="medium"?"bg-yellow-500/20 text-yellow-400":"bg-slate-500/20 text-slate-400"}`,children:ke.quality})}),e.jsx("td",{className:"py-2 text-slate-400",children:ke.refill_days>0?`${ke.refill_days}d`:"-"}),e.jsx("td",{className:"py-2",children:ke.is_active?e.jsx("span",{className:"px-2 py-0.5 bg-emerald-500/20 text-emerald-400 rounded text-xs",children:"Active"}):e.jsx("span",{className:"px-2 py-0.5 bg-red-500/20 text-red-400 rounded text-xs",children:"Inactive"})}),e.jsxs("td",{className:"py-2 text-right",children:[e.jsx("label",{className:"inline-flex items-center mr-2 cursor-pointer",title:"Telafi Aktif",children:e.jsx("input",{type:"checkbox",checked:ke.refill_eligible,onChange:async Xe=>{const ce=Xe.target.checked;try{await se("package",{...ke,refill_eligible:ce})}catch{}},className:"w-3.5 h-3.5 rounded border-slate-600 bg-slate-900 text-orange-500 cursor-pointer"})}),e.jsx("button",{onClick:()=>H(ke),className:"p-1 text-slate-400 hover:text-emerald-400 transition-colors",title:"Cogalt",children:e.jsx(Ht,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>{z(ke),F(!0)},className:"p-1 text-slate-400 hover:text-cyan-400 transition-colors ml-1",title:"Duzenle",children:e.jsx(Nt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>$("package",ke.id),className:"p-1 text-slate-400 hover:text-red-400 transition-colors ml-1",title:"Sil",children:e.jsx(xs,{className:"w-4 h-4"})})]})]},ke.id))})]})}
886),e.jsx("div",{className:"lg:hidden space-y-3",children:ve.sort((ke,Xe)=>ke.sort_order-Xe.sort_order).map(ke=>e.jsxs("div",{className:"bg-slate-700/30 rounded-lg p-3 border border-slate-600/50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-white font-bold text-lg",children:ke.quantity.toLocaleString()}),ke.is_best_seller&&e.jsx(Zt,{className:"w-4 h-4 text-yellow-400"}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs capitalize ${ke.quality==="premium"?"bg-purple-500/20 text-purple-400":ke.quality==="high"?"bg-emerald-500/20 text-emerald-400":ke.quality==="medium"?"bg-yellow-500/20 text-yellow-400":"bg-slate-500/20 text-slate-400"}`,children:ke.quality}),ke.is_active?e.jsx("span",{className:"px-2 py-0.5 bg-emerald-500/20 text-emerald-400 rounded text-xs",children:"Active"}):e.jsx("span",{className:"px-2 py-0.5 bg-red-500/20 text-red-400 rounded text-xs",children:"Inactive"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("label",{className:"inline-flex items-center cursor-pointer p-2",title:"Telafi Aktif",children:e.jsx("input",{type:"checkbox",checked:ke.refill_eligible,onChange:async Xe=>{const ce=Xe.target.checked;try{await se("package",{...ke,refill_eligible:ce})}catch{}},className:"w-3.5 h-3.5 rounded border-slate-600 bg-slate-900 text-orange-500 cursor-pointer"})}),e.jsx("button",{onClick:()=>H(ke),className:"p-2 text-slate-400 hover:text-emerald-400 hover:bg-slate-600/50 rounded-lg transition-colors",title:"Cogalt",children:e.jsx(Ht,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>{z(ke),F(!0)},className:"p-2 text-slate-400 hover:text-cyan-400 hover:bg-slate-600/50 rounded-lg transition-colors",title:"Duzenle",children:e.jsx(Nt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>$("package",ke.id),className:"p-2 text-slate-400 hover:text-red-400 hover:bg-slate-600/50 rounded-lg transition-colors",title:"Sil",children:e.jsx(xs,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Fiyat:"}),oe&&oe.id===ke.id&&oe.field==="price"?e.jsx("input",{type:"number",step:"0.01",min:"0",autoFocus:!0,value:oe.value,onChange:Xe=>ue({...oe,value:Xe.target.value}),onBlur:()=>je(ke),onKeyDown:Xe=>{Xe.key==="Enter"&&je(ke),Xe.key==="Escape"&&ue(null)},disabled:K,className:"w-20 px-2 py-0.5 bg-slate-900 border border-cyan-500 rounded text-emerald-400 text-sm text-right focus:outline-none"}):e.jsxs("button",{onClick:()=>{var Xe;return ue({id:ke.id,field:"price",value:((Xe=ke.price)==null?void 0:Xe.toString())||""})},className:"text-emerald-400 font-semibold hover:bg-slate-700/50 px-2 py-0.5 rounded",children:["$",ke.price]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Eski:"}),oe&&oe.id===ke.id&&oe.field==="original_price"?e.jsx("input",{type:"number",step:"0.01",min:"0",autoFocus:!0,value:oe.value,onChange:Xe=>ue({...oe,value:Xe.target.value}),onBlur:()=>je(ke),onKeyDown:Xe=>{Xe.key==="Enter"&&je(ke),Xe.key==="Escape"&&ue(null)},disabled:K,placeholder:"bos",className:"w-20 px-2 py-0.5 bg-slate-900 border border-cyan-500 rounded text-slate-300 text-sm text-right focus:outline-none"}):e.jsx("button",{onClick:()=>{var Xe;return ue({id:ke.id,field:"original_price",value:((Xe=ke.original_price)==null?void 0:Xe.toString())||""})},className:"text-slate-500 line-through hover:text-slate-300 hover:no-underline hover:bg-slate-700/50 px-2 py-0.5 rounded",children:ke.original_price?`$${ke.original_price}`:"-"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-red-400",children:"TR âº:"}),e.jsx("span",{className:ke.price_try?"text-red-400 font-medium":"text-slate-600",children:ke.price_try?`âº${ke.price_try}${ke.original_price_try?` (Eski: âº${ke.original_price_try})`:""}`:"-"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"API ID:"}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-mono ${ke.provider_service_id?"bg-cyan-500/20 text-cyan-400":"bg-slate-700 text-slate-500"}`,children:ke.provider_service_id||"N/A"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Teslimat:"}),e.jsx("span",{className:"text-slate-400",children:ke.delivery_time})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Refill:"}),e.jsx("span",{className:"text-slate-400",children:ke.refill_days>0?`${ke.refill_days} gun`:"-"})]})]})]},ke.id))})]})]},Re)})})]},D)})})]}
886),a==="categories"&&e.jsx("div",{className:"grid gap-4",children:l.map(D=>{const O=i.filter(W=>W.platform_id===D.id),fe=me(D.icon);return e.jsxs("div",{className:"bg-slate-800/50 rounded-xl border border-slate-700 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 flex items-center gap-3 border-b border-slate-700",children:[e.jsx("div",{className:"p-2 rounded-lg",style:{background:`linear-gradient(to right, ${D.color_from}, ${D.color_to})`},children:e.jsx(fe,{className:"w-5 h-5 text-white"})}),e.jsx("h3",{className:"font-semibold text-white",children:D.name}),e.jsxs("span",{className:"px-2 py-0.5 text-xs bg-slate-700 text-slate-400 rounded",children:[O.length," categories"]})]}),e.jsx("div",{className:"p-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:O.sort((W,_e)=>W.sort_order-_e.sort_order).map(W=>{const _e=me(W.icon);return e.jsxs("div",{className:"p-4 bg-slate-900/50 rounded-lg border border-slate-700",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_e,{className:"w-5 h-5 text-cyan-400"}),e.jsx("h4",{className:"font-medium text-white",children:W.name})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>{ae(W),_(!0)},className:"p-1 text-slate-400 hover:text-cyan-400",children:e.jsx(Nt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>$("category",W.id),className:"p-1 text-slate-400 hover:text-red-400",children:e.jsx(xs,{className:"w-4 h-4"})})]})]}),e.jsx("p",{className:"text-sm text-slate-400 mb-3",children:W.description||"No description"}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[W.requires_profile_verification&&e.jsx("span",{className:"px-2 py-1 bg-blue-500/20 text-blue-400 rounded",children:"Profile"}),W.requires_post_verification&&e.jsx("span",{className:"px-2 py-1 bg-purple-500/20 text-purple-400 rounded",children:"Post"}),W.video_only&&e.jsx("span",{className:"px-2 py-1 bg-pink-500/20 text-pink-400 rounded",children:"Video Only"}),e.jsx("span",{className:`px-2 py-1 rounded ${W.is_active?"bg-emerald-500/20 text-emerald-400":"bg-red-500/20 text-red-400"}`,children:W.is_active?"Active":"Inactive"})]})]},W.id)})})]},D.id)})}),a==="platforms"&&e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:l.sort((D,O)=>D.sort_order-O.sort_order).map(D=>{const O=me(D.icon),fe=i.filter(_e=>_e.platform_id===D.id),W=d.filter(_e=>{var Re,ve;return((ve=(Re=_e.service_categories)==null?void 0:Re.platforms)==null?void 0:ve.id)===D.id});return e.jsxs("div",{className:"bg-slate-800/50 rounded-xl border border-slate-700 overflow-hidden",children:[e.jsx("div",{className:"p-4",style:{background:`linear-gradient(135deg, ${D.color_from}20, ${D.color_to}20)`},children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-3 rounded-xl",style:{background:`linear-gradient(to right, ${D.color_from}, ${D.color_to})`},children:e.jsx(O,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-white text-lg",children:D.name}),e.jsxs("p",{className:"text-sm text-slate-400",children:["/",D.slug]})]})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>{A(D),Z(!0)},className:"p-1.5 text-slate-400 hover:text-cyan-400 bg-slate-800/50 rounded",children:e.jsx(Nt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>$("platform",D.id),className:"p-1.5 text-slate-400 hover:text-red-400 bg-slate-800/50 rounded",children:e.jsx(xs,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsx("p",{className:"text-sm text-slate-400",children:D.description||"No description"}),e.jsxs("div",{className:"flex gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-slate-500",children:"Categories:"}),e.jsx("span",{className:"ml-1 text-white font-medium",children:fe.length})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-slate-500",children:"Packages:"}),e.jsx("span",{className:"ml-1 text-white font-medium",children:W.length})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:`px-2 py-1 rounded text-xs ${D.is_active?"bg-emerald-500/20 text-emerald-400":"bg-red-500/20 text-red-400"}`,children:D.is_active?"Active":"Inactive"}),e.jsx("span",{className:`px-2 py-1 rounded text-xs ${D.allow_guest_purchase?"bg-cyan-500/20 text-cyan-400":"bg-orange-500/20 text-orange-400"}`,children:D.allow_guest_purchase?"Misafir Alim Acik":"Uyelik Zorunlu"}),e.jsxs("span",{className:"px-2 py-1 bg-slate-700 text-slate-400 rounded text-xs",children:["Order: ",D.sort_order]})]})]})]},D.id)})}),R&&e.jsx(ad,{title:"Toplu Saglayici ve Servis ID",onClose:()=>X(null),children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-3 bg-slate-900/60 border border-slate-700 rounded-lg",children:[e.jsx("p",{className:"text-xs text-slate-400 mb-1",children:"Kategori"}),e.jsx("p",{className:"text-sm text-white font-medium",children:R.category_name}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Bu kategorideki butun paketlere asagidaki saglayici ve servis ID uygulanacak."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Saglayici"}),e.jsxs("select",{value:R.provider_id,onChange:D=>X({...R,provider_id:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",children:[e.jsx("option",{value:"",children:"Degistirme"}
886),e.jsx("option",{value:"__EMPTY__",children:"BOÅ (SaÄlayıcı Yok)"}),m.filter(D=>D.is_active).map(D=>e.jsx("option",{value:D.id,children:D.name},D.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Servis ID (API ID)"}),e.jsx("input",{type:"number",value:R.provider_service_id,onChange:D=>X({...R,provider_service_id:D.target.value}),placeholder:"Ornek: 18732",className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Bos birakirsaniz servis ID degismez."})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx("button",{onClick:()=>X(null),className:"px-4 py-2 bg-slate-700 hover:bg-slate-600 text-white rounded-lg transition-colors",children:"Iptal"}),e.jsx("button",{onClick:de,disabled:re,className:"px-4 py-2 bg-gradient-to-r from-cyan-500 to-blue-600 hover:opacity-90 text-white rounded-lg font-medium transition-opacity flex items-center gap-2 disabled:opacity-50",children:re?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Uygulaniyor..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Cs,{className:"w-4 h-4"}),"Toplu Uygula"]})})]})]})}),I&&e.jsx(ad,{title:u!=null&&u.id?"Edit Platform":"Add Platform",onClose:()=>{Z(!1),A(null)},children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Name *"}),e.jsx("input",{type:"text",value:(u==null?void 0:u.name)||"",onChange:D=>A({...u,name:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Instagram"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Slug *"}),e.jsx("input",{type:"text",value:(u==null?void 0:u.slug)||"",onChange:D=>A({...u,slug:D.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"instagram"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-2",children:"Platform Icon"}),e.jsx("div",{className:"bg-slate-900 border border-slate-700 rounded-lg p-3 max-h-64 overflow-y-auto",children:e.jsx("div",{className:"grid grid-cols-6 sm:grid-cols-8 gap-2",children:sd.map(D=>{const O=(u==null?void 0:u.icon)===D.value;return e.jsxs("button",{type:"button",onClick:()=>{A({...u,icon:D.value,color_from:D.color,color_to:D.color})},className:`group relative p-2 rounded-lg transition-all duration-200 ${O?"bg-cyan-500/20 ring-2 ring-cyan-500":"hover:bg-slate-700/50"}`,title:D.label,children:[e.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center transition-transform group-hover:scale-110",style:{backgroundColor:D.color+"20"},children:D.lucide?e.jsx(D.lucide,{className:"w-5 h-5",style:{color:D.color}}):e.jsx("span",{className:"w-5 h-5",style:{color:D.color},children:D.svg})}),O&&e.jsx("div",{className:"absolute -top-1 -right-1 w-4 h-4 bg-cyan-500 rounded-full flex items-center justify-center",children:e.jsx(Lt,{className:"w-3 h-3 text-white"})})]},D.value)})})}),(u==null?void 0:u.icon)&&e.jsxs("div",{className:"mt-2 flex items-center gap-2 text-sm text-slate-400",children:[e.jsx("span",{children:"Selected:"}),e.jsx("span",{className:"font-medium text-white",children:((he=sd.find(D=>D.value===u.icon))==null?void 0:he.label)||u.icon})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Sort Order"}),e.jsx("input",{type:"number",value:(u==null?void 0:u.sort_order)||0,onChange:D=>A({...u,sort_order:parseInt(D.target.value)}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Color From"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"color",value:(u==null?void 0:u.color_from)||"#3b82f6",onChange:D=>A({...u,color_from:D.target.value}),className:"w-12 h-10 rounded cursor-pointer"}),e.jsx("input",{type:"text",value:(u==null?void 0:u.color_from)||"#3b82f6",onChange:D=>A({...u,color_from:D.target.value}),className:"flex-1 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white font-mono text-sm"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Color To"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"color",value:(u==null?void 0:u.color_to)||"#8b5cf6",onChange:D=>A({...u,color_to:D.target.value}),className:"w-12 h-10 rounded cursor-pointer"}),e.jsx("input",{type:"text",value:(u==null?void 0:u.color_to)||"#8b5cf6",onChange:D=>A({...u,color_to:D.target.value}),className:"flex-1 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white font-mono text-sm"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Description"}),e.jsx("textarea",{value:(u==null?void 0:u.description)||"",onChange:D=>A({...u,description:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",rows:2})]}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>A({...u,is_active:!(u!=null&&u.is_active)}),className:`p-1 rounded ${u!=null&&u.is_active?"text-emerald-400":"text-slate-500"}`,children:u!=null&&u.is_active?e.jsx(Qr,{className:"w-8 h-8"}):e.jsx(Kr,{className:"w-8 h-8"})}),e.jsx("span",{className:"text-sm text-slate-300",children:"Active"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>A({...u,allow_guest_purchase:!(u!=null&&u.allow_guest_purchase)}),className:`p-1 rounded ${(u==null?void 0:u.allow_guest_purchase)!==!1?"text-cyan-400":"text-slate-500"}`,children:(u==null?void 0:u.allow_guest_purchase)!==!1?e.jsx(Qr,{className:"w-8 h-8"}):e.jsx(Kr,{className:"w-8 h-8"})}),e.jsx("span",{className:"text-sm text-slate-300",children:"Misafir Alim"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>A({...u,link_payment_enabled:!(u!=null&&u.link_payment_enabled)}),className:`p-1 rounded ${u!=null&&u.link_payment_enabled?"text-amber-400":"text-slate-500"}`,children:u!=null&&u.link_payment_enabled?e.jsx(Qr,{className:"w-8 h-8"}):e.jsx(Kr,{className:"w-8 h-8"})}),e.jsx("span",{className:"text-sm text-slate-300",children:"Link Payment"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-700",children:[e.jsx("button",{onClick:()=>{Z(!1),A(null)},className:"px-4 py-2 text-slate-400 hover:text-white",children:"Cancel"}),e.jsxs("button",{onClick:ie,disabled:g,className:"px-4 py-2 bg-cyan-500 text-white rounded-lg hover:bg-cyan-600 disabled:opacity-50 flex items-center gap-2",children:[g?e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save"]})]})]})}),Q&&e.jsx(ad,{title:T!=null&&T.id?"Edit Category":"Add Category",onClose:()=>{_(!1),ae(null)},children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Platform *"}),e.jsxs("select",{value:(T==null?void 0:T.platform_id)||"",onChange:D=>ae({...T,platform_id:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",children:[e.jsx("option",{value:"",children:"Select Platform"}),l.map(D=>e.jsx("option",{value:D.id,children:D.name},D.id))]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Name *"}),e.jsx("input",{type:"text",value:(T==null?void 0:T.name)||"",onChange:D=>ae({...T,name:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Followers"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Slug *"}),e.jsx("input",{type:"text",value:(T==null?void 0:T.slug)||"",onChange:D=>ae({...T,slug:D.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"followers"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-2",children:"Category Icon"}),e.jsx("div",{className:"bg-slate-900 border border-slate-700 rounded-lg p-3 max-h-48 overflow-y-auto",children:e.jsx("div",{className:"grid grid-cols-6 sm:grid-cols-8 gap-2",children:sd.map(D=>{const O=(T==null?void 0:T.icon)===D.value;return e.jsxs("button",{type:"button",onClick:()=>ae({...T,icon:D.value}),className:`group relative p-2 rounded-lg transition-all duration-200 ${O?"bg-cyan-500/20 ring-2 ring-cyan-500":"hover:bg-slate-700/50"}`,title:D.label,children:[e.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center transition-transform group-hover:scale-110",style:{backgroundColor:D.color+"20"},children:D.lucide?e.jsx(D.lucide,{className:"w-4 h-4",style:{color:D.color}}):e.jsx("span",{className:"w-4 h-4",style:{color:D.color},children:D.svg})}),O&&e.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-cyan-500 rounded-full flex items-center justify-center",children:e.jsx(Lt,{className:"w-2 h-2 text-white"})})]},D.value)})})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Sort Order"}),e.jsx("input",{type:"number",value:(T==null?void 0:T.sort_order)||0,onChange:D=>ae({...T,sort_order:parseInt(D.target.value)}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Description"}),e.jsx("textarea",{value:(T==null?void 0:T.description)||"",onChange:D=>ae({...T,description:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",rows:2})]}),e.jsxs("div",{className:"p-4 bg-slate-900/50 rounded-xl border border-slate-700 space-y-4",children:[e.jsx("h4",{className:"text-sm font-semibold text-cyan-400",children:"Input Settings (Link Type)"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Input Type"}),e.jsxs("select",{value:(T==null?void 0:T.input_type)||"profile_link",onChange:D=>ae({...T,input_type:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",children:[e.jsx("option",{value:"profile_link",children:"Profile Link (e.g., instagram.com/username)"}),e.jsx("option",{value:"post_link",children:"Post Link (e.g., instagram.com/p/...)"}),e.jsx("option",{value:"video_link",children:"Video Link (e.g., tiktok.com/.../video/...)"}),e.jsx("option",{value:"channel_link",children:"Channel Link (e.g., youtube.com/channel/...)"}),e.jsx("option",{value:"username",children:"Username Only"})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Determines what type of link customers need to enter when ordering"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Input Label"}),e.jsx("input",{type:"text",value:(T==null?void 0:T.input_label)||"",onChange:D=>ae({...T,input_label:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"e.g., Channel URL"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Input Placeholder"}),e.jsx("input",{type:"text",value:(T==null?void 0:T.input_placeholder)||"",onChange:D=>ae({...T,input_placeholder:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"e.g., Enter your channel URL"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:(T==null?void 0:T.requires_profile_verification)||!1,onChange:D=>ae({...T,requires_profile_verification:D.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-cyan-500"}),e.jsx("span",{className:"text-sm text-slate-300",children:"Requires Profile Verification"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:(T==null?void 0:T.requires_post_verification)||!1,onChange:D=>ae({...T,requires_post_verification:D.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-cyan-500"}),e.jsx("span",{className:"text-sm text-slate-300",children:"Requires Post Verification"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:(T==null?void 0:T.video_only)||!1,onChange:D=>ae({...T,video_only:D.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-cyan-500"}),e.jsx("span",{className:"text-sm text-slate-300",children:"Video Only"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:(T==null?void 0:T.is_active)||!1,onChange:D=>ae({...T,is_active:D.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-cyan-500"}),e.jsx("span",{className:"text-sm text-slate-300",children:"Active"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-700",children:[e.jsx("button",{onClick:()=>{_(!1),ae(null)},className:"px-4 py-2 text-slate-400 hover:text-white",children:"Cancel"}),e.jsxs("button",{onClick:be,disabled:g,className:"px-4 py-2 bg-cyan-500 text-white rounded-lg hover:bg-cyan-600 disabled:opacity-50 flex items-center gap-2",children:[g?e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save"]})]})]})}),M&&e.jsx(ad,{title:P!=null&&P.id?"Edit Package":"Add Package",onClose:()=>{F(!1),z(null)},children:e.jsxs("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto pr-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Category *"}),e.jsxs("select",{value:(P==null?void 0:P.category_id)||"",onChange:D=>z({...P,category_id:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",children:[e.jsx("option",{value:"",children:"Select Category"}),l.map(D=>e.jsx("optgroup",{label:D.name,children:i.filter(O=>O.platform_id===D.id).map(O=>e.jsx("option",{value:O.id,children:O.name},O.id))},D.id))]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Display Quantity *"}),e.jsx("input",{type:"number",value:(P==null?void 0:P.quantity)||"",onChange:D=>z({...P,quantity:parseInt(D.target.value)}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"1000"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Shown to customers"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Delivery Quantity"}),e.jsx("input",{type:"number",value:(P==null?void 0:P.delivery_quantity)||"",onChange:D=>z({...P,delivery_quantity:parseInt(D.target.value)||null}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Same as display"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Actual quantity sent to provider (leave empty for same)"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{classNa
886me:"block text-sm font-medium text-slate-300 mb-1",children:"Price ($) *"}),e.jsx("input",{type:"text",inputMode:"decimal",value:(P==null?void 0:P.price)||"",onChange:D=>{const O=D.target.value.replace(",",".");z({...P,price:parseFloat(O)||0})},className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"9.99"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Original Price"}),e.jsx("input",{type:"text",inputMode:"decimal",value:(P==null?void 0:P.original_price)||"",onChange:D=>{const O=D.target.value.replace(",",".");z({...P,original_price:parseFloat(O)||null})},className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"12.99"})]})]}),e.jsxs("div",{className:"p-4 bg-red-500/10 border border-red-500/30 rounded-lg",children:[e.jsxs("h4",{className:"font-medium text-red-400 mb-3 flex items-center gap-2",children:[e.jsx(Fr,{className:"w-4 h-4"}),"Turkiye Fiyatlari"]}),e.jsx("p",{className:"text-xs text-slate-500 mb-3",children:"Bu alana fiyat girilirse, Turkiye IP'li kullanicilar icin bu fiyatlar gecerli olur. Bos birakilirsa guncel doviz kuru ile otomatik cevrim yapilir."}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"TL Fiyat"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 text-sm",children:"âº"}),e.jsx("input",{type:"text",inputMode:"decimal",value:(P==null?void 0:P.price_try)??"",onChange:D=>{const O=D.target.value.replace(",",".");z({...P,price_try:O===""?null:parseFloat(O)||null})},className:"w-full pl-8 pr-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Ornek: 250"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"TL Eski Fiyat (Ustu Cizili)"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 text-sm",children:"âº"}),e.jsx("input",{type:"text",inputMode:"decimal",value:(P==null?void 0:P.original_price_try)??"",onChange:D=>{const O=D.target.value.replace(",",".");z({...P,original_price_try:O===""?null:parseFloat(O)||null})},className:"w-full pl-8 pr-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Ornek: 350"})]})]})]})]}),e.jsxs("div",{className:"p-4 bg-cyan-500/10 border border-cyan-500/30 rounded-lg",children:[e.jsxs("h4",{className:"font-medium text-cyan-400 mb-3 flex items-center gap-2",children:[e.jsx(rt,{className:"w-4 h-4"}),"API Provider Settings"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Provider"}),e.jsxs("select",{value:(P==null?void 0:P.provider_id)||"",onChange:D=>{const O=m.find(fe=>fe.id===D.target.value);z({...P,provider_id:D.target.value||null,provider_name:(O==null?void 0:O.name)||"default"})},className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",children:[e.jsx("option",{value:"",children:"Select Provider"}),m.filter(D=>D.is_active).map(D=>e.jsx("option",{value:D.id,children:D.name},D.id))]}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Select a provider from your configured providers"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Provider Service ID"}),e.jsx("input",{type:"number",value:(P==null?void 0:P.provider_service_id)||"",onChange:D=>z({...P,provider_service_id:parseInt(D.target.value)||null}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white font-mono",placeholder:"711"}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"The service ID from the provider's API"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Delivery Time"}),e.jsx("input",{type:"text",value:(P==null?void 0:P.delivery_time)||"0-24 hours",onChange:D=>z({...P,delivery_time:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"0-24 hours"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Quality"}),e.jsx("select",{value:(P==null?void 0:P.quality)||"high",onChange:D=>z({...P,quality:D.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",children:YN.map(D=>e.jsx("option",{value:D,className:"capitalize",children:D},D))})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Min Quantity"}),e.jsx("input",{type:"number",value:(P==null?void 0:P.min_quantity)||1,onChange:D=>z({...P,min_quantity:parseInt(D.target.value)}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Max Quantity"}),e.jsx("input",{type:"number",value:(P==null?void 0:P.max_quantity)||"",onChange:D=>z({...P,max_quantity:parseInt(D.target.value)||null}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"No limit"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Refill Days"}),e.jsx("input",{type:"number",value:(P==null?void 0:P.refill_days)||0,onChange:D=>z({...P,refill_days:parseInt(D.target.value)}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Sort Order"}),e.jsx("input",{type:"number",value:(P==null?void 0:P.sort_order)||0,onChange:D=>z({...P,sort_order:parseInt(D.target.value)}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:(P==null?void 0:P.is_best_seller)||!1,onChange:D=>z({...P,is_best_seller:D.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-cyan-500"}),e.jsxs("span",{className:"text-sm text-slate-300 flex items-center gap-1",children:[e.jsx(Zt,{className:"w-4 h-4 text-yellow-400"}),"Best Seller"]})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:(P==null?void 0:P.is_active)||!1,onChange:D=>z({...P,is_active:D.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-cyan-500"}),e.jsx("span",{className:"text-sm text-slate-300",children:"Active"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:(P==null?void 0:P.refill_eligible)||!1,onChange:D=>z({...P,refill_eligible:D.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-orange-500"}),e.jsx("span",{className:"text-sm text-slate-300",children:"Telafi Aktif"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Badge Text (Etiket)"}),e.jsx("input",{type:"text",value:(P==null?void 0:P.badge_text)||"",onChange:D=>z({...P,badge_text:D.target.value||null}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Best Value, Most Popular, Recommended..."}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Bu metin paket kartinda etiket olarak gosterilir (opsiyonel)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-2",children:"Package Features (Ozellikler)"}),e.jsxs("div",{className:"space-y-2",children:[((P==null?void 0:P.features)||[]).map((D,O)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:D,onChange:fe=>{const W=[...(P==null?void 0:P.features)||[]];W[O]=fe.target.value,z({...P,features:W})},className:"flex-1 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white text-sm",placeholder:"Life Time Guarantee, Premium Followers, 24/7 Support..."}),e.jsx("button",{type:"button",onClick:()=>{const fe=((P==null?void 0:P.features)||[]).filter((W,_e)=>_e!==O);z({...P,features:fe})},className:"p-2 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded-lg transition-colors",children:e.jsx(xs,{className:"w-4 h-4"})})]},O)),e.jsxs("button",{type:"button",onClick:()=>{const D=[...(P==null?void 0:P.features)||[],""];z({...P,features:D})},className:"flex items-center gap-2 px-3 py-2 text-sm text-cyan-400 hover:text-cyan-300 hover:bg-cyan-500/10 rounded-lg transition-colors",children:[e.jsx(ns,{className:"w-4 h-4"}),"Add Feature"]})]}),e.jsx("p",{className:"mt-2 text-xs text-slate-500",children:"Musterilere gosterilecek ozellikler: Life Time Guarantee, Premium Followers, 24/7 Support, Refund Guarantee vb."})]}),e.jsxs("div",{className:"p-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[e.jsxs("h4",{className:"font-medium text-amber-400 mb-3 flex items-center gap-2",children:[e.jsx(hn,{className:"w-4 h-4"}),"Link ile Odeme"]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer mb-3",children:[e.jsx("div",{onClick:()=>z({...P,link_payment_enabled:!(P!=null&&P.link_payment_enabled)}),className:`relative w-11 h-6 rounded-full transition-colors ${P!=null&&P.link_payment_enabled?"bg-amber-500":"bg-slate-700"}
886`,children:e.jsx("div",{className:`absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full transition-transform ${P!=null&&P.link_payment_enabled?"translate-x-5":""}`})}),e.jsx("span",{className:"text-sm text-slate-300",children:"Link ile odeme aktif"})]}),(P==null?void 0:P.link_payment_enabled)&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Odeme Linki *"}),e.jsxs("div",{className:"relative",children:[e.jsx(Gs,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500"}),e.jsx("input",{type:"url",value:(P==null?void 0:P.link_payment_url)||"",onChange:D=>z({...P,link_payment_url:D.target.value}),className:"w-full pl-10 pr-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"https://example.com/payment-link"})]}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Kullanici dogrulamadan sonra bu linke yonlendirilir. Odeme admin tarafindan manuel onaylanir."})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-700",children:[e.jsx("button",{onClick:()=>{F(!1),z(null)},className:"px-4 py-2 text-slate-400 hover:text-white",children:"Cancel"}),e.jsxs("button",{onClick:Pe,disabled:g,className:"px-4 py-2 bg-cyan-500 text-white rounded-lg hover:bg-cyan-600 disabled:opacity-50 flex items-center gap-2",children:[g?e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save"]})]})]})})]})}function ad({title:t,children:s,onClose:a}){return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/70 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-slate-800 rounded-2xl border border-slate-700 w-full max-w-2xl shadow-2xl",children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-700",children:[e.jsx("h3",{className:"text-lg font-semibold text-white",children:t}),e.jsx("button",{onClick:a,className:"p-1 text-slate-400 hover:text-white",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"p-6",children:s})]})})}const rd=3*60*1e3;function KN(){const{showAlert:t,showConfirm:s}=Vs(),[a,r]=o.useState([]),[l,n]=o.useState(!0),[i,c]=o.useState(!1),[d,x]=o.use
886State(!1),[m,h]=o.useState(null),[f,y]=o.useState(new Set),[g,w]=o.useState(null),[N,v]=o.useState(null),[j,b]=o.useState({}),[p,E]=o.useState(!1),[C,S]=o.useState(rd/1e3),k=o.useRef(null),J=o.useRef(null),u=o.useCallback(async(M,F=!1)=>{F||b(R=>({...R,[M.id]:{...R[M.id],loading:!0,error:null}}));try{const R=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/check_provider_status",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({providerId:M.id})}),X=await R.json();return R.ok&&X.success?(b(re=>({...re,[M.id]:{balance:X.balance,currency:X.currency||"USD",lastChecked:new Date,loading:!1,error:null}})),{success:!0,balance:X.balance}):(b(re=>({...re,[M.id]:{...re[M.id],loading:!1,error:X.error||"Connection failed",lastChecked:new Date}})),{success:!1,error:X.error})}catch{const X="Network error";return b(re=>({...re,[M.id]:{...re[M.id],loading:!1,error:X,lastChecked:new Date}})),{success:!1,error:X}}},[]),A=o.useCallback(async(M=!1)=>{M||E(!0);const F=a.filter(R=>R.is_active);await Promise.all(F.map(R=>u(R,M))),M||E(!1),S(rd/1e3)},[a,u]);o.useEffect(()=>{T()},[]),o.useEffect(()=>{a.length>0&&A(!0)},[a]),o.useEffect(()=>{if(a.length!==0)return k.current=setInterval(()=>{A(!0)},rd),J.current=setInterval(()=>{S(M=>M<=1?rd/1e3:M-1)},1e3),()=>{k.current&&clearInterval(k.current),J.current&&clearInterval(J.current)}},[a,A]);const T=async()=>{n(!0);try{const M=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_providers");if(M.ok){const F=await M.json();r(F.providers||[])}else{const F=await M.json().catch(()=>({}));console.error("[ProviderManagement] Error response:",F)}}catch(M){console.error("[ProviderManagement] Error fetching providers:",M)}finally{n(!1)}},ae=async()=>{if(!(m!=null&&m.name)||!(m!=null&&m.api_url)||!(m!=null&&m.api_key)){t("Name, API URL, and API Key are required",{type:"warning"});return}c(!0);try{const M=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/manage_provider",{method:"POST",body:JSON.stringify({action:m.id?"update":"create",provider_id:m.id,name:m.name,api_url:m.api_url,api_key:m.api_key,is_active:m.is_active??!0})});if(!M.ok){const F=await M.json().catch(()=>({}));throw new Error(F.error||"Failed to save provider")}await T(),x(!1),h(null)}catch(M){console.error("[ProviderManagement] Error saving provider:",M),t(M instanceof Error?M.message:"Failed to save provider",{type:"error"})}finally{c(!1)}},P=async(M,F)=>{if(await s(`Are you sure you want to delete provider "${F}"? This action cannot be undone.`,{title:"Delete Provider",type:"warning"}))try{const X=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/manage_provider",{method:"POST",body:JSON.stringify({action:"delete",provider_id:M})});if(!X.ok){const re=await X.json().catch(()=>({}));throw new Error(re.error||"Failed to delete provider")}await T()}catch(X){console.error("[ProviderManagement] Error deleting provider:",X),t(X instanceof Error?X.message:"Failed to delete provider.",{type:"error"})}},z=M=>{const F=new Set(f);F.has(M)?F.delete(M):F.add(M),y(F)},I=async M=>{w(M.id),v(null);const F=await u(M,!1);F.success?v({providerId:M.id,success:!0,message:`Connection successful! Balance: $${F.balance||"N/A"}`}):v({providerId:M.id,success:!1,message:F.error||"Connection failed"}),w(null)},Z=M=>{const F=Math.floor(M/60),R=M%60;return`${F}:${R.toString().padStart(2,"0")}`},Q=M=>{if(!M)return"Never";const R=Math.floor((new Date().getTime()-M.getTime())/1e3);return R<60?`${R}s ago`:R<3600?`${Math.floor(R/60)}m ago`:M.toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"})},_=M=>M.length<=8?"********":M.substring(0,4)+"****"+M.substring(M.length-4);return l?e.jsx("div",{className:"flex items-center justify-center h-96",children:e.jsx(Ve,{className:"w-8 h-8 text-cyan-500 animate-spin"})}):e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex items-start sm:items-center justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h2",{className:"text-lg sm:text-2xl font-bold text-white flex items-center gap-2 sm:gap-3",children:[e.jsx("div",{className:"p-1.5 sm:p-2 rounded-lg sm:rounded-xl bg-gradient-to-br from-orange-500 to-red-600 shrink-0",children:e.jsx(er,{className:"w-5 h-5 sm:w-6 sm:h-6 text-white"})}),e.jsx("span",{className:"truncate",children:"Provider Management"})]}),e.jsx("p",{className:"text-slate-400 mt-0.5 sm:mt-1 text-xs sm:text-sm",children:"Manage API providers for order fulfillment"})]}),e.jsxs("button",{onClick:()=>{h({is_active:!0}),x(!0)},className:"px-3 sm:px-4 py-2 bg-gradient-to-r from-orange-500 to-red-600 text-white rounded-lg font-medium hover:opacity-90 transition-opacity flex items-center gap-1.5 sm:gap-2 text-sm sm:text-base shrink-0",children:[e.jsx(ns,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Add Provider"}),e.jsx("span",{className:"sm:hidden",children:"Add"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 px-3 sm:px-4 py-2 bg-slate-800/50 rounded-xl border border-slate-700 self-start",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[e.jsx("div",{className:`w-2 h-2 rounded-full shrink-0 ${p?"bg-cyan-500 animate-pulse":"bg-emerald-500"}`}),e.jsx("span",{className:"text-xs text-slate-400 whitespace-nowrap",children:"Auto-refresh"})]}),e.jsx("div",{className:"h-4 w-px bg-slate-600"}),e.jsx("span",{className:"text-xs font-mono text-slate-300",children:Z(C)}),e.jsx("button",{onClick:()=>A(!1),disabled:p,className:"p-1.5 hover:bg-slate-700 rounded-lg transition-colors disabled:opacity-50",title:"Refresh all providers now",children:e.jsx(rt,{className:`w-4 h-4 text-cyan-400 ${p?"animate-pulse":""}`})})]})]}),a.length===0?e.jsxs("div",{className:"bg-slate-800/50 rounded-xl border border-slate-700 p-8 sm:p-12 text-center",children:[e.jsx(er,{className:"w-12 h-12 sm:w-16 sm:h-16 text-slate-600 mx-auto mb-3 sm:mb-4"}),e.jsx("h3",{className:"text-lg sm:text-xl font-semibold text-white mb-2",children:"No Providers"}),e.jsx("p",{className:"text-slate-400 mb-4 sm:mb-6 text-sm sm:text-base",children:"Add your first API provider to start fulfilling orders"}),e.jsxs("button",{onClick:()=>{h({is_active:!0}),x(!0)},className:"px-4 py-2 bg-gradient-to-r from-orange-500 to-red-600 text-white rounded-lg font-medium hover:opacity-90 transition-opacity inline-flex items-center gap-2",children:[e.jsx(ns,{className:"w-4 h-4"}),"Add Provider"]})]}):e.jsx("div",{className:"grid gap-3 sm:gap-4",children:a.map(M=>{const F=j[M.id];return e.jsxs("div",{className:"bg-slate-800/50 rounded-xl border border-slate-700 overflow-hidden",children:[e.jsx("div",{className:"p-3 sm:p-5",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex items-start gap-3 sm:gap-4 min-w-0 flex-1",children:[e.jsx("div",{className:`p-2.5 sm:p-3 rounded-xl shrink-0 ${M.is_active?"bg-emerald-500/20":"bg-slate-700"}`,children:e.jsx(er,{className:`w-5 h-5 sm:w-6 sm:h-6 ${M.is_active?"text-emerald-400":"text-slate-400"}`})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 flex-wrap",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold text-white",children:M.name}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium shrink-0 ${M.is_active?"bg-emerald-500/20 text-emerald-400":"bg-red-500/20 text-red-400"}`,children:M.is_active?"Active":"Inactive"})]}),e.jsxs("div",{className:"mt-2 space-y-1.5",children:[e.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[e.jsx(wt,{className:"w-4 h-4 text-slate-500 shrink-0 mt-0.5"}),e.jsx("span",{className:"text-slate-400 shrink-0",children:"API URL:"}),e.jsx("code",{className:"px-2 py-0.5 bg-slate-900 rounded text-cyan-400 text-xs font-mono break-all",children:M.api_url})]}),e.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[e.jsx(Dr,{className:"w-4 h-4 text-slate-500 shrink-0 mt-0.5"}),e.jsx("span",{className:"text-slate-400 shrink-0",children:"API Key:"}),e.jsx("code",{className:"px-2 py-0.5 bg-slate-900 rounded text-amber-400 text-xs font-mono break-all",children:f.has(M.id)?M.api_key:_(M.api_key)}),e.jsx("button",{onClick:()=>z(M.id),className:"p-1 text-slate-400 hover:text-white transition-colors shrink-0",children:f.has(M.id)?e.jsx(ur,{className:"w-4 h-4"}):e.jsx(Ct,{className:"w-4 h-4"})})]})]}),N&&N.providerId===M.id&&e.jsxs("div",{className:`mt-3 px-3 py-2 rounded-lg text-sm flex items-center gap-2 ${N.success?"bg-emerald-500/20 text-emerald-400":"bg-red-500/20 text-red-400"}`,children:[N.success?e.jsx(Lt,{className:"w-4 h-4 shrink-0"}):e.jsx(nt,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"break-all",children:N.message})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between sm:justify-end gap-3 sm:gap-4 pl-10 sm:pl-0",children:[e.jsxs("div",{className:"text-left sm:text-right",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:justify-end",children:[e.jsx(kt,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{className:"text-xs text-slate-400",children:"Balance"})]}),F!=null&&F.loading?e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(Ve,{className:"w-4 h-4 text-cyan-400 animate-spin"}),e.jsx("span",{className:"text-sm text-slate-400",children:"Loading..."})]}):F!=null&&F.error?e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[e.jsx(nt,{className:"w-4 h-4 text-red-400"}),e.jsx("span",{className:"text-sm text-red-400",children:"Error"})]}):F!=null&&F.balance?e.jsxs("span",{className:"text-xl sm:text-2xl font-bold text-emerald-400",children:["$",parseFloat(F.balance).toFixed(2)]}):e.jsx("span",{className:"text-lg text-slate-500",children:"--"}),(F==null?void 0:F.lastChecked)&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-500 mt-1 sm:justify-end",children:[e.jsx(Ze,{className:"w-3 h-3"}),Q(F.lastChecked)]})]}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[e.jsxs("button",{onClick:()=>
886I(M),disabled:g===M.id||(F==null?void 0:F.loading),className:"px-2.5 sm:px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-slate-300 rounded-lg text-sm font-medium transition-colors flex items-center gap-1.5 sm:gap-2 disabled:opacity-50",children:[g===M.id||F!=null&&F.loading?e.jsx(Ve,{className:"w-4 h-4 animate-spin"}):e.jsx(rt,{className:"w-4 h-4"}),"Test"]}),e.jsx("button",{onClick:()=>{h(M),x(!0)},className:"p-1.5 sm:p-2 text-slate-400 hover:text-cyan-400 transition-colors",children:e.jsx(Nt,{className:"w-4 h-4 sm:w-5 sm:h-5"})}),e.jsx("button",{onClick:()=>P(M.id,M.name),className:"p-1.5 sm:p-2 text-slate-400 hover:text-red-400 transition-colors",children:e.jsx(xs,{className:"w-4 h-4 sm:w-5 sm:h-5"})})]})]})]})}),e.jsxs("div",{className:"px-3 sm:px-5 py-2 sm:py-3 bg-slate-900/50 border-t border-slate-700 flex items-center justify-between text-xs text-slate-500",children:[e.jsxs("span",{children:["Created: ",new Date(M.created_at).toLocaleDateString()]}),e.jsxs("span",{children:["Updated: ",new Date(M.updated_at).toLocaleDateString()]})]})]},M.id)})}),d&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center sm:p-4 bg-black/70 backdrop-blur-sm",children:e.jsxs("div",{className:"bg-slate-800 rounded-t-2xl sm:rounded-2xl border border-slate-700 w-full sm:max-w-lg shadow-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-slate-700 sticky top-0 bg-slate-800 z-10",children:[e.jsx("h3",{className:"text-base sm:text-lg font-semibold text-white",children:m!=null&&m.id?"Edit Provider":"Add Provider"}),e.jsx("button",{onClick:()=>{x(!1),h(null)},className:"p-1 text-slate-400 hover:text-white",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-4 sm:p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Provider Name *"}),e.jsx("input",{type:"text",value:(m==null?void 0:m.name)||"",onChange:M=>h({...m,name:M.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-cyan-500",placeholder:"e.g., SMMPanel, JustAnotherPanel"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"API URL *"}),e.jsx("input",{type:"url",value:(m==null?void 0:m.api_url)||"",onChange:M=>h({...m,api_url:M.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 font-mono text-sm",placeholder:"https://api.provider.com/v2"}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"The base API endpoint URL (without trailing slash)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"API Key *"}),e.jsx("input",{type:"password",value:(m==null?void 0:m.api_key)||"",onChange:M=>h({...m,api_key:M.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 font-mono text-sm",placeholder:"Your API key",autoComplete:"off"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:(m==null?void 0:m.is_active)??!0,onChange:M=>h({...m,is_active:M.target.checked}),className:"sr-only peer"}),e.jsx("div",{className:"w-11 h-6 bg-slate-700 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-cyan-500 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-cyan-500"})]}),e.jsx("span",{className:"text-sm text-slate-300",children:"Active"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-700",children:[e.jsx("button",{onClick:()=>{x(!1),h(null)},className:"px-4 py-2 text-slate-400 hover:text-white transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:ae,disabled:i,className:"px-4 py-2 bg-cyan-500 text-white rounded-lg hover:bg-cyan-600 disabled:opacity-50 flex items-center gap-2 transition-colors",children:[i?e.jsx(Ve,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save"]})]})]})]})})]})}const Go=[{key:"dashboard",label:"Dashboard",description:"View dashboard statistics"},{key:"users",label:"Users",description:"Manage user accounts"},{key:"orders",label:"Orders",description:"Manage orders"},{key:"packages",label:"Packages",description:"Manage service packages"},{key:"providers",label:"Providers",description:"Manage API providers"},{key:"support",label:"Support",description:"Handle support tickets"},{key:"announcements",label:"Announcements",description:"Manage announcements"},{key:"crypto_wallets",label:"Crypto Wallets",description:"Manage crypto wallets"},{key:"crypto_payments",label:"Crypto Payments",description:"Process crypto payments"},{key:"refills",label:"Refills",description:"Handle refill requests"}
886,{key:"lucky_spin",label:"Lucky Spin",description:"View lucky spin stats"},{key:"environment",label:"Environment",description:"Manage environment settings"},{key:"admin_management",label:"Admin Management",description:"Manage admin users"}],cm=[{value:"super_admin",label:"Super Admin",icon:Ta,color:"text-amber-500",bg:"bg-amber-50",border:"border-amber-200"},{value:"admin",label:"Admin",icon:Sl,color:"text-blue-500",bg:"bg-blue-50",border:"border-blue-200"},{value:"moderator",label:"Moderator",icon:dw,color:"text-emerald-500",bg:"bg-emerald-50",border:"border-emerald-200"},{value:"support",label:"Support",icon:Kn,color:"text-cyan-500",bg:"bg-cyan-50",border:"border-cyan-200"},{value:"viewer",label:"Viewer",icon:Ct,color:"text-slate-500",bg:"bg-slate-50",border:"border-slate-200"}];function QN(t){return cm.find(s=>s.value===t)||cm[4]}function ld(t){const s={};switch(Go.forEach(a=>s[a.key]=!1),s.dashboard=!0,t){case"super_admin":Go.forEach(a=>s[a.key]=!0);break;case"admin":Object.assign(s,{users:!0,orders:!0,packages:!0,providers:!0,support:!0,announcements:!0,crypto_wallets:!0,crypto_payments:!0,refills:!0,lucky_spin:!0,environment:!0});break;case"moderator":Object.assign(s,{users:!0,orders:!0,support:!0,refills:!0});break;case"support":Object.assign(s,{support:!0});break}return s}function ZN(){const[t,s]=o.useState([]),[a,r]=o.useState(!0),[l,n]=o.useState(!1),[i,c]=o.useState(!1),[d,x]=o.use
886State(null),[m,h]=o.useState(null),[f,y]=o.useState(null),[g,w]=o.useState(""),[N,v]=o.useState("all"),[j,b]=o.useState({username:"",email:"",fullName:"",password:"",role:"viewer",permissions:ld("viewer"),notes:"",isActive:!0}),[p,E]=o.useState(!1);o.useEffect(()=>{C()},[]);const C=async()=>{r(!0);try{const I=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_admin_users");if(!I.ok)throw new Error("Failed to fetch admin users");const Z=await I.json();s(Z.adminUsers||[])}catch(z){console.error("Error loading admin users:",z),y({type:"error",text:"Failed to load admin users"})}finally{r(!1)}},S=z=>{b(I=>({...I,role:z,permissions:ld(z)}))},k=z=>{b(I=>({...I,permissions:{...I.permissions,[z]:!I.permissions[z]}}))},J=()=>{x(null),b({username:"",email:"",fullName:"",password:"",role:"viewer",permissions:ld("viewer"),notes:"",isActive:!0}),c(!0)},u=z=>{x(z),b({username:z.username,email:z.email,fullName:z.full_name||"",password:"",role:z.role||"viewer",permissions:z.permissions||ld(z.role||"viewer"),notes:z.notes||"",isActive:z.is_active!==!1}),c(!0)},A=async z=>{z.preventDefault(),n(!0),y(null);try{const I="https://kdqsajuhvcmxsnttdetg.supabase.co";if(d){const Z=await We(`${I}/functions/v1/update_admin_user`,{method:"POST",body:JSON.stringify({adminUserId:d.id,username:j.username,email:j.email,fullName:j.fullName,role:j.role,permissions:j.permissions,isActive:j.isActive,notes:j.notes,newPassword:j.password||void 0})}),Q=await Z.json();if(!Z.ok)throw new Error(Q.error||"Failed to update admin user");y({type:"success",text:"Admin user updated successfully"})}else{if(!j.password){y({type:"error",text:"Password is required for new admin users"}),n(!1);return}const Z=await We(`${I}/functions/v1/create_admin_user`,{method:"POST",body:JSON.stringify({username:j.username,password:j.password,email:j.email,fullName:j.fullName,role:j.role,permissions:j.permissions,notes:j.notes})}),Q=await Z.json();if(!Z.ok)throw new Error(Q.error||"Failed to create admin user");y({type:"success",text:"Admin user created successfully"})}c(!1),C()}catch(I){y({type:"error",text:I.message})}finally{n(!1)}},T=async z=>{n(!0),y(null);try{const Z=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/delete_admin_user",{method:"POST",body:JSON.stringify({adminUserId:z})}),Q=await Z.json();if(!Z.ok)throw new Error(Q.error||"Failed to delete admin user");y({type:"success",text:"Admin user deleted successfully"}),h(null),C()}catch(I){y({type:"error",text:I.message})}finally{n(!1)}},ae=t.filter(z=>{var Q,_,M;const I=g===""||((Q=z.username)==null?void 0:Q.toLowerCase().includes(g.toLowerCase()))||((_=z.email)==null?void 0:_.toLowerCase().includes(g.toLowerCase()))||((M=z.full_name)==null?void 0:M.toLowerCase().includes(g.toLowerCase())),Z=N==="all"||z.role===N;return I&&Z}),P=z=>z?new Date(z).toLocaleDateString("tr-TR",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"Never";return e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Admin Users"}),e.jsx("p",{className:"text-slate-600 mt-1",children:"Manage admin panel access and permissions"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:C,disabled:a,className:"flex items-center gap-2 px-4 py-2 bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-xl transition-colors",children:[e.jsx(Ve,{className:`w-4 h-4 ${a?"animate-spin":""}`}),"Refresh"]}),e.jsxs("button",{onClick:J,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-600 to-cyan-600 hover:from-blue-700 hover:to-cyan-700 text-white rounded-xl transition-all shadow-lg shadow-blue-200",children:[e.jsx(ns,{className:"w-4 h-4"}),"Add Admin"]})]})]}),f&&e.jsxs("div",{className:`mb-6 p-4 rounded-xl flex items-center gap-3 ${f.type==="success"?"bg-emerald-50 text-emerald-800 border border-emerald-200":"bg-red-50 text-red-800 border border-red-200"}`,children:[f.type==="success"?e.jsx(Lt,{className:"w-5 h-5"}):e.jsx(Fs,{className:"w-5 h-5"}),f.text,e.jsx("button",{onClick:()=>y(null),className:"ml-auto",children:e.jsx(ht,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-sm overflow-hidden",children:[e.jsx("div",{className:"p-4 border-b border-slate-200 bg-slate-50",children:e.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search by name, email or username...",value:g,onChange:z=>w(z.target.value),className:"w-full pl-10 pr-4 py-2.5 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Yn,{className:"w-5 h-5 text-slate-400"}),e.jsxs("select",{value:N,onChange:z=>v(z.target.value),className:"px-4 py-2.5 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none bg-white",children:[e.jsx("option",{value:"all",children:"All Roles"}),cm.map(z=>e.jsx("option",{value:z.value,children:z.label},z.value))]})]})]})}),a?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(Ve,{className:"w-8 h-8 text-blue-600 animate-spin"})}):ae.length===0?e.jsxs("div",{className:"text-center py-20",children:[e.jsx(mt,{className:"w-16 h-16 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-500",children:"No admin users found"})]}):e.jsx("div",{className:"divide-y divide-slate-100",children:ae.map(z=>{const I=QN(z.role),Z=I.icon;return e.jsxs("div",{className:"p-5 hover:bg-slate-50 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:`w-12 h-12 rounded-xl ${I.bg} ${I.border} border flex items-center justify-center`,children:e.jsx(Z,{className:`w-6 h-6 ${I.color}`})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:z.full_name||z.username}),e.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-medium ${I.bg} ${I.color} ${I.border} border`,children:[e.jsx(Z,{className:"w-3 h-3"}),I.label]}),!z.is_active&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-medium bg-red-50 text-red-600 border border-red-200",children:[e.jsx($t,{className:"w-3 h-3"}),"Inactive"]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ls,{className:"w-4 h-4"}),"@",z.username]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(gs,{className:"w-4 h-4"}),z.email]})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[Object.entries(z.permissions||{}).filter(([Q,_])=>_).slice(0,5).map(([Q])=>{var _;return e.jsx("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-600 text-xs rounded-md",children:((_=Go.find(M=>M.key===Q))==null?void 0:_.label)||Q},Q)}),Object.values(z.permissions||{}
886).filter(Boolean).length>5&&e.jsxs("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-600 text-xs rounded-md",children:["+",Object.values(z.permissions||{}).filter(Boolean).length-5," more"]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>u(z),className:"p-2 hover:bg-blue-50 text-blue-600 rounded-lg transition-colors",title:"Edit",children:e.jsx(xy,{className:"w-5 h-5"})}),e.jsx("button",{onClick:()=>h(z.id),className:"p-2 hover:bg-red-50 text-red-600 rounded-lg transition-colors",title:"Delete",children:e.jsx(xs,{className:"w-5 h-5"})})]})]}),e.jsxs("div",{className:"mt-3 pt-3 border-t border-slate-100 flex items-center gap-6 text-xs text-slate-500",children:[e.jsxs("span",{children:["Created: ",P(z.created_at)]}),e.jsxs("span",{children:["Last Login: ",P(z.last_login_at)]}),z.notes&&e.jsxs("span",{className:"text-slate-600",children:["Note: ",z.notes]})]})]},z.id)})})]}),i&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1200] p-4 overflow-y-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-white border-b border-slate-200 px-6 py-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-gradient-to-br from-blue-600 to-cyan-600 rounded-xl",children:e.jsx(lt,{className:"w-5 h-5 text-white"})}),e.jsx("h2",{className:"text-xl font-bold text-slate-900",children:d?"Edit Admin User":"Create Admin User"})]}),e.jsx("button",{onClick:()=>c(!1),className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("form",{onSubmit:A,className:"p-6 space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Full Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:j.fullName,onChange:z=>b(I=>({...I,fullName:z.target.value})),placeholder:"John Doe",required:!0,className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Username ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:j.username,onChange:z=>b(I=>({...I,username:z.target.value})),placeholder:"johndoe",required:!0,className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Email ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(gs,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"email",value:j.email,onChange:z=>b(I=>({...I,email:z.target.value})),placeholder:"[email protected]",required:!0,className:"w-full pl-10 pr-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:["Password ",!d&&e.jsx("span",{className:"text-red-500",children:"*"}),d&&e.jsx("span",{className:"text-slate-400 text-xs ml-1",children:"(leave empty to keep)"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(Dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:p?"text":"password",value:j.password,onChange:z=>b(I=>({...I,password:z.target.value})),placeholder:d?"Enter new password":"Create password",required:!d,className:"w-full pl-10 pr-12 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none"}),e.jsx("button",{type:"button",onClick:()=>E(!p),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600",children:p?e.jsx(ur,{className:"w-5 h-5"}):e.jsx(Ct,{className:"w-5 h-5"})})]})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-3",children:["Role ",e.jsx("span",{className:"text-red-500",children:"*"})]}
886),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2",children:cm.map(z=>{const I=z.icon,Z=j.role===z.value;return e.jsxs("button",{type:"button",onClick:()=>S(z.value),className:`p-3 rounded-xl border-2 transition-all text-center ${Z?`${z.bg} ${z.border} ${z.color}`:"border-slate-200 hover:border-slate-300 text-slate-600"}`,children:[e.jsx(I,{className:`w-5 h-5 mx-auto mb-1 ${Z?z.color:""}`}),e.jsx("span",{className:"text-xs font-medium",children:z.label})]},z.value)})})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700",children:"Permissions"}),e.jsxs("span",{className:"text-xs text-slate-500",children:[Object.values(j.permissions).filter(Boolean).length," of ",Go.length," enabled"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2 max-h-48 overflow-y-auto p-3 bg-slate-50 rounded-xl border border-slate-200",children:Go.map(z=>e.jsxs("button",{type:"button",onClick:()=>k(z.key),className:`flex items-center gap-2 px-3 py-2 rounded-lg text-left transition-all ${j.permissions[z.key]?"bg-emerald-50 text-emerald-700 border border-emerald-200":"bg-white text-slate-600 border border-slate-200 hover:border-slate-300"}`,children:[j.permissions[z.key]?e.jsx(Qr,{className:"w-5 h-5 text-emerald-500 flex-shrink-0"}):e.jsx(Kr,{className:"w-5 h-5 text-slate-400 flex-shrink-0"}),e.jsx("span",{className:"text-xs font-medium truncate",children:z.label})]},z.key))})]}),d&&e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl border border-slate-200",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[j.isActive?e.jsx(cw,{className:"w-5 h-5 text-emerald-500"}):e.jsx($t,{className:"w-5 h-5 text-red-500"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-slate-700",children:"Account Status"}),e.jsx("div",{className:"text-xs text-slate-500",children:j.isActive?"User can access admin panel":"User is blocked from accessing"})]})]}),e.jsx("button",{type:"button",onClick:()=>b(z=>({...z,isActive:!z.isActive})),className:`relative w-12 h-6 rounded-full transition-colors ${j.isActive?"bg-emerald-500":"bg-slate-300"}`,children:e.jsx("div",{className:`absolute top-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform ${j.isActive?"left-6":"left-0.5"}`})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Notes"}),e.jsx("textarea",{value:j.notes,onChange:z=>b(I=>({...I,notes:z.target.value})),placeholder:"Optional notes about this admin user...",rows:2,className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none resize-none"})]}),e.jsxs("div",{className:"flex gap-3 pt-4 border-t border-slate-200",children:[e.jsx("button",{type:"button",onClick:()=>c(!1),className:"flex-1 px-4 py-3 border border-slate-300 rounded-xl hover:bg-slate-50 transition-colors font-medium",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:l,className:"flex-1 px-4 py-3 bg-gradient-to-r from-blue-600 to-cyan-600 hover:from-blue-700 hover:to-cyan-700 text-white rounded-xl transition-all font-medium disabled:opacity-50 flex items-center justify-center gap-2",children:l?e.jsx(Ve,{className:"w-5 h-5 animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(Lt,{className:"w-5 h-5"}),d?"Update Admin":"Create Admin"]})})]})]})]})}),m&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1300] p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-md p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-3 bg-red-100 rounded-xl",children:e.jsx(Fs,{className:"w-6 h-6 text-red-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"Delete Admin User"})]}),e.jsx("p",{className:"text-slate-600 mb-6",children:"Are you sure you want to delete this admin user? This action cannot be undone and will also remove their authentication credentials."}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>h(null),disabled:l,className:"flex-1 px-4 py-3 border border-slate-300 rounded-xl hover:bg-slate-50 transition-colors font-medium",children:"Cancel"}),e.jsx("button",{onClick:()=>T(m),disabled:l,className:"flex-1 px-4 py-3 bg-red-600 hover:bg-red-700 text-white rounded-xl transition-colors font-medium disabled:opacity-50 flex items-center justify-center gap-2",children:l?e.jsx(Ve,{className:"w-5 h-5 animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(xs,{className:"w-5 h-5"}),"Delete"]})})]})]})})]})}function e5(){const{showConfirm:t}
886=Vs(),[s,a]=o.useState("overview"),[r,l]=o.useState(!0),[n,i]=o.useState(!1),[c,d]=o.useState(null),[x,m]=o.useState([]),[h,f]=o.useState({}),[y,g]=o.useState([]),[w,N]=o.useState(1),[v,j]=o.useState(1),[b,p]=o.useState([]),[E,C]=o.useState(1),[S,k]=o.useState(1),[J,u]=o.useState(!1),[A,T]=o.useState(null),[ae,P]=o.useState(null),z=o.useCallback(async(q,je)=>(await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/${q}`,{method:"POST",body:je?JSON.stringify(je):void 0})).json(),[]),I=o.useCallback(async()=>{try{const q=await z("admin_get_mystery_box_stats");if(q.error)throw new Error(q.error);d(q),m(q.rewards||[]),f(q.settings||{})}catch(q){T(q.message)}},[z]),Z=o.useCallback(async q=>{try{const je=await z("admin_get_mystery_box_logs",{page:q,limit:20});if(je.error)throw new Error(je.error);g(je.logs||[]),j(je.total_pages||1)}catch(je){T(je.message)}},[z]),Q=o.useCallback(async q=>{try{const je=await z("admin_manage_mystery_box_abuse",{action:"list",page:q,limit:20,show_resolved:J});if(je.error)throw new Error(je.error);p(je.flags||[]),k(je.total_pages||1)}catch(je){T(je.message)}},[z,J]);o.useEffect(()=>{(async()=>{l(!0),await I(),l(!1)})()},[I]),o.useEffect(()=>{s==="logs"&&Z(w)},[s,w,Z]),o.useEffect(()=>{s==="abuse"&&Q(E)},[s,E,J,Q]);const _=async()=>{i(!0),T(null);try{const je=x.filter(se=>se.is_active).reduce((se,Se)=>se+Se.probability,0);if(Math.abs(je-100)>.01)throw new Error(`Active rewards probabilities must sum to 100% (current: ${je.toFixed(2)}%)`);const we=await z("admin_manage_mystery_box_rewards",{action:"bulk_update",rewards:x.map((se,Se)=>({...se,sort_order:Se}))});if(we.error)throw new Error(we.error);P("Rewards saved successfully"),await I()}catch(q){T(q.message)}finally{i(!1)}},M=async()=>{i(!0),T(null);try{const q=await z("admin_manage_mystery_box_settings",{action:"bulk_update",settings:h});if(q.error)throw new Error(q.error);P("Settings saved successfully"),await I()}catch(q){T(q.message)}finally{i(!1)}},F=()=>{const q={id:`new-${Date.now()}`,amount:.5,probability:0,label:"$0.50",sort_order:x.length,is_active:!0};m([...x,q])},R=q=>{m(x.filter((je,we)=>we!==q))},X=(q,je,we)=>{const se=[...x];se[q]={...se[q],[je]:we},je==="amount"&&(se[q].label=`$${parseFloat(we).toFixed(2)}`),m(se)},re=async(q,je)=>{try{const we=await z("admin_manage_mystery_box_abuse",{action:"resolve",flag_id:q,admin_notes:je});if(we.error)throw new Error(we.error);P("Flag resolved"),await Q(E),await I()}catch(we){T(we.message)}},U=async(q,je)=>{if(await t("Are you sure you want to ban this user?",{title:"Ban User",type:"warning"}))try{const se=await z("admin_manage_mystery_box_abuse",{action:"ban_user",user_id:q,flag_id:je});if(se.error)throw new Error(se.error);P("User banned successfully"),await Q(E)}catch(se){T(se.message)}},oe=()=>{const q=[["ID","User Email","Amount Won","Country","IP Address","Date"].join(","),...y.map(Se=>[Se.id,Se.user_email,Se.amount_won,Se.country||"Unknown",Se.ip_address,new Date(Se.created_at).toISOString()].join(","))].join(` 887`),je=new Blob([q],{type:"text/csv"}),we=URL.createObjectURL(je),se=document.createElement("a");se.href=we,se.download=`mystery-box-logs-${new Date().toISOString().split("T")[0]}.csv`,se.click()},ue=x.filter(q=>q.is_active).reduce((q,je)=>q+je.probability,0),K=x.filter(q=>q.is_active).reduce((q,je)=>q+je.amount*je.probability/100,0);return r?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"w-8 h-8 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"space-y-6",children:[A&&e.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-xl text-red-600 flex items-center justify-between",children:[e.jsx("span",{children:A}),e.jsx("button",{onClick:()=>T(null),children:e.jsx(ht,{className:"w-4 h-4"})})]}),ae&&e.jsxs("div",{className:"p-4 bg-emerald-50 border border-emerald-200 rounded-xl text-emerald-600 flex items-center justify-between",children:[e.jsx("span",{children:ae}),e.jsx("button",{onClick:()=>P(null),children:e.jsx(ht,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"flex items-center gap-2 border-b border-slate-200 pb-4 overflow-x-auto",children:[{id:"overview",label:"Overview",icon:tt},{id:"rewards",label:"Rewards",icon:rs},{id:"settings",label:"Settings",icon:tl},{id:"logs",label:"Logs",icon:qi},{id:"abuse",label:"Abuse Detection",icon:lt,badge:c==null?void 0:c.abuse.unresolved}].map(q=>e.jsxs("button",{onClick:()=>a(q.id),className:`flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors whitespace-nowrap ${s===q.id?"bg-cyan-500 text-white":"text-slate-600 hover:bg-slate-100"}`,children:[e.jsx(q.icon,{className:"w-4 h-4"}),q.label,q.badge&&q.badge>0&&e.jsx("span",{className:"px-1.5 py-0.5 bg-red-500 text-white text-xs rounded-full",children:q.badge})]},q.id))}),s==="overview"&&c&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsx(nd,{icon:rs,label:"Total Opens",value:c.overview.total_opens.toLocaleStr
887ing(),color:"cyan"}),e.jsx(nd,{icon:Jt,label:"Total Distributed",value:pt(c.overview.total_distributed),color:"emerald"}),e.jsx(nd,{icon:mt,label:"Unique Users",value:c.overview.unique_users.toLocaleString(),color:"blue"}),e.jsx(nd,{icon:sr,label:"Avg Reward",value:pt(c.overview.average_reward),color:"amber"})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-6",children:[e.jsxs("h3",{className:"font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Ze,{className:"w-5 h-5 text-cyan-500"}),"Today's Activity"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Opens"}),e.jsx("span",{className:"font-semibold text-slate-900",children:c.today.opens})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Distributed"}),e.jsx("span",{className:"font-semibold text-emerald-600",children:pt(c.today.distributed)})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("span",{className:"text-slate-600",children:"Budget Used"}),e.jsxs("span",{className:"font-semibold text-slate-900",children:[pt(c.today.budget_used)," / ",pt(c.today.budget_limit)]})]}),e.jsx("div",{className:"h-2 bg-slate-100 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-cyan-500 to-emerald-500 rounded-full transition-all",style:{width:`${Math.min(100,c.today.budget_used/c.today.budget_limit*100)}%`}})})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-6",children:[e.jsxs("h3",{className:"font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(tt,{className:"w-5 h-5 text-emerald-500"}),"This Week"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Opens"}),e.jsx("span",{className:"font-semibold text-slate-900",children:c.week.opens})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Distributed"}),e.jsx("span",{className:"font-semibold text-emerald-600",children:pt(c.week.distributed)})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Expected Value"}),e.jsx("span",{className:"font-semibold text-amber-600",children:pt(c.overview.expected_value)})]})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-6",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Reward Distribution"}),e.jsx("div",{className:"space-y-3",children:c.rewards.map(q=>e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-20 text-right font-semibold text-emerald-600",children:q.label}),e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"h-6 bg-slate-100 rounded-full overflow-hidden relative",children:[e.jsx("div",{className:"h-full bg-gradient-to-r from-cyan-500 to-emerald-500 rounded-full",style:{width:`${q.actual_percentage||0}%`}}),e.jsx("div",{className:"absolute top-0 h-full border-r-2 border-amber-500",style:{left:`${q.probability}%`},title:`Target: ${q.probability}%`})]})}),e.jsxs("div",{className:"w-32 text-sm text-slate-600",children:[q.actual_count||0," (",q.actual_percentage||"0","%)"]})]},q.id))}),e.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"Yellow line indicates target probability. Bar shows actual distribution."})]})]}),s==="rewards"&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:`px-3 py-1.5 rounded-lg text-sm font-medium ${Math.abs(ue-100)<.01?"bg-emerald-100 text-emerald-700":"bg-red-100 text-red-700"}`,children:["Total: ",ue.toFixed(2),"%"]}),e.jsxs("div",{className:"px-3 py-1.5 bg-amber-100 text-amber-700 rounded-lg text-sm font-medium",children:["EV: ",pt(K)]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:F,className:"flex items-center gap-2 px-4 py-2 bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg transition-colors",children:[e.jsx(ns,{className:"w-4 h-4"}),"Add Reward"]}),e.jsxs("button",{onClick:_,disabled:n||Math.abs(ue-100)>.01,className:"flex items-center gap-2 px-4 py-2 bg-cyan-500 hover:bg-cyan-600 disabled:bg-slate-300 text-white rounded-lg transition-colors",children:[n?e.jsx(Ve,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Rewards"]})]})]}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"Amount"}),e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"Label"}),e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"Probability"}),e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"Status"}),e.jsx("th",{className:"text-right px-4 py-3 text-sm font-semibold text-slate-600",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:x.map((q,je)=>e.jsxs("tr",{className:"hover:bg-slate-50",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-slate-400",children:"$"}),e.jsx("input",{type:"number",step:"0.01",min:"0",value:q.amount,onChange:we=>X(je,"amount",parseFloat(we.target.value)||0),className:"w-20 px-2 py-1 border border-slate-200 rounded-lg focus:ring-2 focus:ring-cyan-500 focus:border-transparent"})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"text",value:q.label,onChange:we=>X(je,"label",we.target.value),className:"w-24 px-2 py-1 border border-slate-200 rounded-lg focus:ring-2 focus:ring-cyan-500 focus:border-transparent"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"number",step:"0.01",min:"0",max:"100",value:q.probability,onChange:we=>X(je,"probability",parseFloat(we.target.value)||0),className:"w-20 px-2 py-1 border border-slate-200 rounded-lg focus:ring-2 focus:ring-cyan-500 focus:border-transparent"}),e.jsx("span",{className:"text-slate-400",children:"%"})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("button",{onClick:()=>X(je,"is_active",!q.is_active),className:`flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium transition-colors ${q.is_active?"bg-emerald-100 text-emerald-700 hover:bg-emerald-200":"bg-slate-100 text-slate-500 hover:bg-slate-200"}`,children:[q.is_active?e.jsx(Ct,{className:"w-3.5 h-3.5"}):e.jsx(ur,{className:"w-3.5 h-3.5"}),q.is_active?"Active":"Inactive"]})}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{onClick:()=>R(je),className:"p-2 text-red-500 hover:bg-red-50 rounded-lg transition-colors",children:e.jsx(xs,{className:"w-4 h-4"})})})]},q.id))})]})})]}),s==="settings"&&e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-center justify-end",children:e.jsxs("button",{onClick:M,disabled:n,className:"flex items-center gap-2 px-4 py-2 bg-cyan-500 hover:bg-cyan-600 disabled:bg-slate-300 text-white rounded-lg transition-colors",children:[n?e.jsx(Ve,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Settings"]})}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs(po,{title:"Feature Controls",children:[e.jsx(wx,{label:"Enable Mystery Box",description:"Turn the feature on or off",value:h.feature_enabled==="true",onCh
887ange:q=>f({...h,feature_enabled:q?"true":"false"})}),e.jsx(wx,{label:"Maintenance Mode",description:"Show maintenance message",value:h.maintenance_mode==="true",onChange:q=>f({...h,maintenance_mode:q?"true":"false"})})]}),e.jsxs(po,{title:"Usage Limits",children:[e.jsx(Wr,{label:"Cooldown Hours",description:"Hours between opens",type:"number",value:h.cooldown_hours||"24",onChange:q=>f({...h,cooldown_hours:q})}),e.jsx(Wr,{label:"Max Opens Per User Daily",description:"Limit per user per day",type:"number",value:h.max_opens_per_user_daily||"1",onChange:q=>f({...h,max_opens_per_user_daily:q})}),e.jsx(Wr,{label:"Max Opens Per IP Daily",description:"Limit per IP per day",type:"number",value:h.max_opens_per_ip_daily||"3",onChange:q=>f({...h,max_opens_per_ip_daily:q})})]}),e.jsxs(po,{title:"Budget Controls",children:[e.jsx(Wr,{label:"Daily Budget Limit",description:"Max game balance per day",type:"number",value:h.daily_budget_limit||"1000",onChange:q=>f({...h,daily_budget_limit:q}),prefix:"$"}),e.jsx(Wr,{label:"Lifetime Game Cap",description:"Max game balance per user (0
887= no limit)",type:"number",value:h.lifetime_gift_cap||"0",onChange:q=>f({...h,lifetime_gift_cap:q}),prefix:"$"})]}),e.jsxs(po,{title:"Eligibility",children:[e.jsx(Wr,{label:"Min Account Age (Days)",description:"Required account age",type:"number",value:h.min_account_age_days||"0",onChange:q=>f({...h,min_account_age_days:q})}),e.jsx(wx,{label:"Require Email Verified",description:"Only verified emails",value:h.require_email_verified==="true",onChange:q=>f({...h,require_email_verified:q?"true":"false"})})]}),e.jsxs(po,{title:"UI Text",className:"md:col-span-2",children:[e.jsx(Wr,{label:"CTA Button Text",value:h.cta_button_text||"Open Mystery Box",onChange:q=>f({...h,cta_button_text:q})}),e.jsx(Wr,{label:"Reward Reveal Text",value:h.reward_reveal_text||"Congratulations! You won",onChange:q=>f({...h,reward_reveal_text:q})}),e.jsx(Wr,{label:"Success Notification",value:h.success_notification_text||"Game Balance added to your wallet!",onChange:q=>f({...h,success_notification_text:q})}),e.jsx(Wr,{label:"Disclaimer Text",value:h.disclaimer_text||"Game Balance has no cash value and cannot be withdrawn.",onChange:q=>f({...h,disclaimer_text:q})})]})]})]}),s==="logs"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"Transaction Logs"}),e.jsxs("button",{onClick:oe,className:"flex items-center gap-2 px-4 py-2 bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg transition-colors",children:[e.jsx(_l,{className:"w-4 h-4"}),"Export CSV"]})]}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[900px]",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"User"}),e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"Amount"}),e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"Country"}),e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"IP Address"}),e.jsx("th",{className:"text-left px-4 py-3 text-sm font-semibold text-slate-600",children:"Date"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:y.map(q=>e.jsxs("tr",{className:"hover:bg-slate-50",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:q.user_name}),e.jsx("p",{className:"text-sm text-slate-500",children:q.user_email})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"font-semibold text-emerald-600",children:pt(q.amount_won)})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"px-2 py-1 bg-slate-100 text-slate-700 rounded text-sm font-medium",children:q.country||"Unknown"})}),e.jsx("td",{className:"px-4 py-3 text-slate-600 font-mono text-sm",children:q.ip_address}),e.jsx("td",{className:"px-4 py-3 text-slate-600 text-sm",children:new Date(q.created_at).toLocaleString()})]},q.id))})]})}),v>1&&e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("button",{onClick:()=>N(q=>Math.max(1,q-1)),disabled:w===1,className:"px-3 py-1.5 bg-slate-100 hover:bg-slate-200 disabled:opacity-50 rounded-lg transition-colors",children:e.jsx(Un,{className:"w-4 h-4 rotate-90"})}),e.jsxs("span",{className:"text-sm text-slate-600",children:["Page ",w," of ",v]}),e.jsx("button",{onClick:()=>N(q=>Math.min(v,q+1)),disabled:w===v,className:"px-3 py-1.5 bg-slate-100 hover:bg-slate-200 disabled:opacity-50 rounded-lg transition-colors",children:e.jsx(is,{className:"w-4 h-4 rotate-90"})})]})]}),s==="abuse"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"Abuse Detection"}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:J,onChange:q=>{u(q.target.checked),C(1)},className:"rounded border-slate-300 text-cyan-500 focus:ring-cyan-500"}),e.jsx("span",{className:"text-sm text-slate-600",children:"Show resolved"})]})]}),b.length===0?e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-8 text-center",children:[e.jsx(lt,{className:"w-12 h-12 text-emerald-500 mx-auto mb-3"}),e.jsxs("p",{className:"text-slate-600",children:["No ",J?"":"unresolved ","abuse flags"]})]}):e.jsx("div",{className:"space-y-4",children:b.map(q=>e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`p-2 rounded-lg ${q.is_resolved?"bg-slate-100":"bg-red-100"}`,children:e.jsx(Fs,{className:`w-5 h-5 ${q.is_resolved?"text-slate-500":"text-red-500"}`})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-slate-900",children:q.user_name}),e.jsx("p",{className:"text-sm text-slate-500",children:q.user_email})]})]}),e.jsx("span",{className:`px-2.5 py-1 rounded-full text-xs font-medium ${q.is_resolved?"bg-slate-100 text-slate-600":"bg-red-100 text-red-600"}`,children:q.flag_type.replace(/_/g," ")})]}),e.jsx("div",{className:"bg-slate-50 rounded-lg p-3 mb-3 text-sm",children:e.jsx("pre",{className:"text-slate-600 whitespace-pre-wrap",children:JSON.stringify(q.details,null,2)})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-xs text-slate-500",children:new Date(q.created_at).toLocaleStr
887ing()}),!q.is_resolved&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>re(q.id),className:"flex items-center gap-1.5 px-3 py-1.5 bg-emerald-100 hover:bg-emerald-200 text-emerald-700 rounded-lg text-sm transition-colors",children:[e.jsx(Lt,{className:"w-4 h-4"}),"Resolve"]}),e.jsxs("button",{onClick:()=>U(q.user_id,q.id),className:"flex items-center gap-1.5 px-3 py-1.5 bg-red-100 hover:bg-red-200 text-red-700 rounded-lg text-sm transition-colors",children:[e.jsx(Ka,{className:"w-4 h-4"}),"Ban User"]})]})]})]},q.id))}),S>1&&e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("button",{onClick:()=>C(q=>Math.max(1,q-1)),disabled:E===1,className:"px-3 py-1.5 bg-slate-100 hover:bg-slate-200 disabled:opacity-50 rounded-lg transition-colors",children:e.jsx(Un,{className:"w-4 h-4 rotate-90"})}),e.jsxs("span",{className:"text-sm text-slate-600",children:["Page ",E," of ",S]}),e.jsx("button",{onClick:()=>C(q=>Math.min(S,q+1)),disabled:E===S,className:"px-3 py-1.5 bg-slate-100 hover:bg-slate-200 disabled:opacity-50 rounded-lg transition-colors",children:e.jsx(is,{className:"w-4 h-4 rotate-90"})})]})]})]})}function nd({icon:t,label:s,value:a,color:r}){const l={cyan:"bg-cyan-100 text-cyan-600",emerald:"bg-emerald-100 text-emerald-600",blue:"bg-blue-100 text-blue-600",amber:"bg-amber-100 text-amber-600"};return e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg ${l[r]} flex items-center justify-center mb-3`,children:e.jsx(t,{className:"w-5 h-5"})}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:a}),e.jsx("p",{className:"text-sm text-slate-500",children:s})]})}function po({title:t,children:s,className:a=""}){return e.jsxs("div",{className:`bg-white rounded-xl border border-slate-200 p-6 ${a}`,children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:t}),e.jsx("div",{className:"space-y-4",children:s})]})}function wx({label:t,description:s,value:a,onChange:r}){return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:t}),s&&e.jsx("p",{className:"text-sm text-slate-500",children:s})]}),e.jsx("button",{onClick:()=>r(!a),className:`relative w-12 h-6 rounded-full transition-colors ${a?"bg-cyan-500":"bg-slate-200"}`,children:e.jsx("div",{className:`absolute top-1 w-4 h-4 bg-white rounded-full shadow transition-transform ${a?"left-7":"left-1"}`})})]})}function Wr({label:t,description:s,type:a="text",value:r,onChange:l,prefix:n}){return e.jsx("div",{children:e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"font-medium text-slate-900",children:t}),s&&e.jsx("span",{className:"block text-sm text-slate-500 mb-1",children:s}),e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[n&&e.jsx("span",{className:"text-slate-400",children:n}),e.jsx("input",{type:a,value:r,onChange:i=>l(i.target.value),className:"flex-1 px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-cyan-500 focus:border-transparent"})]})]})})}const Zp=[{key:"today",label:"Today"},{key:"yesterday",label:"Yesterday"},{key:"last7days",label:"Last 7 Days"},{key:"last30days",label:"Last 30 Days"},{key:"thisMonth",label:"This Month"},{key:"lastMonth",label:"Last Month"}];function fo(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function Us(t){const s=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${s}-${a}-${r}`}function t5(t){const s=new Date;switch(s.setHours(0,0,0,0),t){case"today":return{start:Us(s),end:Us(s)};case"yesterday":{const a=new Date(s);return a.setDate(a.getDate()-1),{start:Us(a),end:Us(a)}}case"last7days":{const a=new Date(s);return a.setDate(a.getDate()-6),{start:Us(a),end:Us(s)}}case"last30days":{const a=new Date(s);return a.setDate(a.getDate()-29),{start:Us(a),end:Us(s)}}case"thisMonth":{const a=new Date(s.getFullYear(),s.getMonth(),1);return{start:Us(a),end:Us(s)}}case"lastMonth":{const a=new Date(s.getFullYear(),s.getMonth()-1,1),r=new Date(s.getFullYear(),s.getMonth(),0);return{start:Us(a),end:Us(r)}}default:return{start:Us(s),end:Us(s)}}}function s5(t,s){return new Date(t,s+1,0).getDate()}function a5(t,s){return new Date(t,s,1).getDay()}function r5({selectedStart:t,selectedEnd:s,onSelectDate:a,selectingStart:r}){const[l,n]=o.useState(()=>{const N=t?new Date(t):new Date;return{year:N.getFullYear(),month:N.getMonth()}}),i=s5(l.year,l.month),c=a5(l.year,l.month),d=[];for(let N=0;N<c;N++)d.push(null);for(let N=1;N<=i;N++)d.push(N);const x=()=>{n(N=>N.month===0?{year:N.year-1,month:11}:{...N,month:N.month-1})},m=()=>{n(N=>N.month===11?{year:N.year+1,month:0}:{...N,month:N.month+1})},h=N=>{const v=Us(new Date(l.year,l.month,N));return v===t||v===s},f=N=>{if(!t||!s)return!1;const v=Us(new Date(l.year,l.month,N));return v>t&&v<s},y=N=>{const v=new Date;return N===v.getDate()&&l.month===v.getMonth()&&l.year===v.getFullYear()},g=N=>{const v=new Date(l.year,l.month,N),j=new Date;return j.setHours(0,0,0,0),v>j},w=["January","February","March","April","May","June","July","August","September","October","November","December"];return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("button",{onClick:x,className:"p-1.5 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(Ua,{className:"w-5 h-5 text-slate-600"})}),e.jsxs("div",{className:"font-semibold text-slate-800",children:[w[l.month]," ",l.year]}),e.jsx("button",{onClick:m,className:"p-1.5 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(ra,{className:"w-5 h-5 text-slate-600"})})]}),e.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:["Su","Mo","Tu","We","Th","Fr","Sa"].map(N=>e.jsx("div",{className:"text-center text-xs font-medium text-slate-500 py-2",children:N},N))}),e.jsx("div",{className:"grid grid-cols-7 gap-1",children:d.map((N,v)=>e.jsx("div",{className:"aspect-square",children:N&&e.jsx("button",{onClick:()=>!g(N)&&a(Us(new Date(l.year,l.month,N))),disabled:g(N),className:`w-full h-full flex items-center justify-center text-sm rounded-lg transition-all 888 ${g(N)?"text-slate-300 cursor-not-allowed":"hover:bg-emerald-50"} 889 ${h(N)?"bg-emerald-600 text-white font-semibold hover:bg-emerald-700":""} 890 ${f(N)?"bg-emerald-100 text-emerald-800":""} 891 ${y(N)&&!h(N)?"ring-2 ring-emerald-400 ring-inset font-semibold":""} 892 ${!h(N)&&!f(N)&&!g(N)?"text-slate-700":""} 893 `,children:N})},v))}),e.jsx("div",{className:"mt-3 pt-3 border-t border-slate-200 text-xs text-slate-500 text-center",children:r?"Select start date":"Select end date"})]})}function l5({value:t,onChange:s}){const[a,r]=o.useState(!1),[l,n]=o.useState(!1),[i,c]=o.useState(!0),[d,x]=o.use
893State(t.startDate),[m,h]=o.useState(t.endDate),f=o.useRef(null);o.useEffect(()=>{const b=p=>{f.current&&!f.current.contains(p.target)&&(r(!1),n(!1))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]);const y=b=>{const p=t5(b);s({startDate:p.start,endDate:p.end,preset:b}),r(!1),n(!1)},g=()=>{n(!0),c(!0),x(t.startDate),h(t.endDate)},w=b=>{i?(x(b),h(b),c(!1)):(b<d?(x(b),h(d)):h(b),s({startDate:b<d?b:d,endDate:b<d?d:b,preset:"custom"}),r(!1),n(!1))},N=b=>{const p=new Date(t.startDate);if(t.startDate===t.endDate){const C=new Date(p);C.setDate(C.getDate()+(b==="next"?1:-1));const S=new Date;if(S.setHours(0,0,0,0),C>S)return;const k=Us(C);s({startDate:k,endDate:k,preset:"custom"})}},v=()=>{if(t.preset!=="custom"){const b=Zp.find(p=>p.key===t.preset);return(b==null?void 0:b.label)||"Today"}return t.startDate===t.endDate?fo(t.startDate):`${fo(t.startDate)} - ${fo(t.endDate)}`},j=t.startDate===t.endDate;return e.jsxs("div",{ref:f,className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[j&&e.jsx("button",{onClick:()=>N("prev"),className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",title:"Previous day",children:e.jsx(Ua,{className:"w-4 h-4 text-slate-600"})}),e.jsxs("button",{onClick:()=>r(!a),className:"flex items-center gap-2 px-4 py-2 bg-white border border-slate-200 rounded-xl hover:border-emerald-300 hover:shadow-sm transition-all group",children:[e.jsx(Ds,{className:"w-4 h-4 text-emerald-600"}),e.jsx("span",{className:"text-sm font-medium text-slate-700 group-hover:text-emerald-700",children:v()}),e.jsx(is,{className:`w-4 h-4 text-slate-400 transition-transform ${a?"rotate-180":""}`})]}),j&&e.jsx("button",{onClick:()=>N("next"),className:"p-2 hover:bg-slate-100 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",disabled:t.startDate===Us(new Date),title:"Next day",children:e.jsx(ra,{className:"w-4 h-4 text-slate-600"})})]}),a&&e.jsx("div",{className:"absolute top-full left-0 sm:left-auto sm:right-0 mt-2 bg-white rounded-2xl shadow-xl border border-slate-200 z-50 overflow-hidden w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[320px] max-w-[320px]",children:l?e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100 bg-slate-50",children:[e.jsx("button",{onClick:()=>n(!1),className:"text-sm text-slate-600 hover:text-slate-800 font-medium",children:"Back to presets"}),e.jsx("button",{onClick:()=>{r(!1),n(!1)},className:"p-1 hover:bg-slate-200 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-4 h-4 text-slate-500"})})]}),e.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-emerald-50 border-b border-emerald-100",children:[e.jsxs("div",{className:`flex-1 px-3 py-2 rounded-lg text-sm ${i?"bg-white shadow-sm ring-2 ring-emerald-400":"bg-emerald-100/50"}`,children:[e.jsx("div",{className:"text-xs text-emerald-600 font-medium mb-0.5",children:"Start"}),e.jsx("div",{className:"font-semibold text-emerald-800",children:fo(d)})]}),e.jsx("div",{className:"text-slate-400",children:"-"}),e.jsxs("div",{className:`flex-1 px-3 py-2 rounded-lg text-sm ${i?"bg-emerald-100/50":"bg-white shadow-sm ring-2 ring-emerald-400"}`,children:[e.jsx("div",{className:"text-xs text-emerald-600 font-medium mb-0.5",children:"End"}),e.jsx("div",{className:"font-semibold text-emerald-800",children:fo(m)})]})]}),e.jsx(r5,{selectedStart:d,selectedEnd:m,onSelectDate:w,selectingStart:i})]}):e.jsxs("div",{className:"p-2",children:[e.jsx("div",{className:"grid grid-cols-2 gap-2 mb-2",children:Zp.map(b=>e.jsx("button",{onClick:()=>y(b.key),className:`px-4 py-2.5 text-sm font-medium rounded-xl transition-all 894 ${t.preset===b.key?"bg-emerald-600 text-white shadow-lg shadow-emerald-200":"bg-slate-50 text-slate-700 hover:bg-emerald-50 hover:text-emerald-700"}`,children:b.label},b.key))}),e.jsx("div",{className:"border-t border-slate-100 pt-2 mt-2",children:e.jsxs("button",{onClick:g,className:`w-full px-4 py-2.5 text-sm font-medium rounded-xl transition-all flex items-center justify-center gap-2 895 ${t.preset==="custom"?"bg-emerald-600 text-white shadow-lg shadow-emerald-200":"bg-slate-50 text-slate-700 hover:bg-emerald-50 hover:text-emerald-700"}`,children:[e.jsx(Ds,{className:"w-4 h-4"}),"Custom Range"]})})]})})]})}function n5(){const t=Us(new Date);return{startDate:t,endDate:t,preset:"today"}}class i5 extends o.Component{constructor(s){super(s),this.state={hasError:!1,error:null}}static getDerivedStateFromError(s){return{hasError:!0,error:s}}componentDidCatch(s,a){console.error("[AdminLiveChat] Error caught:",s,a)}render(){return this.state.hasError?e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[1000] flex items-center justify-center p-4",onClick:this.props.onClose,children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-sm p-6 text-center",onClick:s=>s.stopPropagation(),children:[e.jsx(Fs,{className:"w-12 h-12 text-red-500 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-bold text-slate-800 mb-2",children:"Bir hata olustu"}),e.jsx("p",{className:"text-sm text-slate-500 mb-2",children:"Sohbet yuklenirken bir sorun olustu."}),this.state.error&&e.jsx("p",{className:"text-xs text-red-400 mb-4 font-mono bg-red-50 p-2 rounded break-all",children:this.state.error.message}),e.jsx("button",{onClick:this.props.onClose,className:"px-6 py-2 bg-slate-100 text-slate-700 rounded-lg hover:bg-slate-200 transition-colors",children:"Kapat"})]})}):this.props.children}}const ef={tr:"Turkce",en:"Ingilizce",de:"Almanca",fr:"Fransizca",es:"Ispanyolca",it:"Italyanca",pt:"Portekizce",ru:"Rusca",ar:"Arapca",ja:"Japonca",ko:"Korece",zh:"Cince",nl:"Felemenkce",pl:"Lehce",uk:"Ukraynaca"};function o5({user:t,adminId:s,onClose:a,onMessageSent:r}){var z;
895const[l,n]=o.useState([]),[i,c]=o.useState(""),[d,x]=o.useState(null),[m,h]=o.useState(!0),[f,y]=o.useState(!1),[g,w]=o.useState(null),[N,v]=o.useState(null),j=o.useRef(null),b=o.useRef(null),p=o.useRef(!1),E=I=>I.startsWith("data:image/")||I.startsWith("[IMG]"),C=I=>I.startsWith("[IMG]")&&I.endsWith("[/IMG]")?I.slice(5,-6):I,S=o.useCallback(I=>{var Q;const Z=(Q=I.clipboardData)==null?void 0:Q.items;if(Z){for(let _=0;_<Z.length;_++)if(Z[_].type.indexOf("image")!==-1){I.preventDefault();const M=Z[_].getAsFile();if(M){const F=new FileReader;F.onload=R=>{var re;const X=(re=R.target)==null?void 0:re.result;w(X)},F.readAsDataURL(M)}break}}},[]),k=()=>{var I;(I=j.current)==null||I.scrollIntoView({behavior:"smooth"})},J=o.useCallback(async I=>{try{const Z=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/live_chat?action=mark_read",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({chatSessionId:I,senderType:"admin"})});Z.ok||console.error("[AdminLiveChat] mark_read failed:",Z.status)}catch(Z){console.error("[AdminLiveChat] Error marking as read:",Z)}},[]);o.useEffect(()=>{if(p.current)return;p.current=!0,(async()=>{try{v(null);const Z=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/live_chat?action=start_session",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({sessionId:t.session_id,adminId:s,visitorUserId:t.user_id,userCountry:t.country||"US"})});if(!Z.ok)throw new Error(`HTTP ${Z.status}`);const Q=await Z.json();if(Q.success&&Q.session){x(Q.session);const _=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/live_chat?action=get_messages&chatSessionId=${Q.session.id}`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(_.ok){const M=await _.json();M.success&&(n(M.messages||[]),J(Q.session.id))}}else v(Q.error||"Oturum baslatilamadi")}catch(Z){console.error("[AdminLiveChat] Init error:",Z),v(Z instanceof Error?Z.message:"Baglanti hatasi")}finally{h(!1),setTimeout(()=>{var Z;return(Z=b.current)==null?void 0:Z.focus()},100)}})()},[J]),o.useEffect(()=>{if(!(d!=null&&d.id))return;let I=null;try{I=Ye.channel(`live_chat_${d.id}`).on("postgres_changes",{event:"INSERT",schema:"public",table:"live_chat_messages",filter:`chat_session_id=eq.${d.id}`},_=>{try{const M=_.new;n(F=>{const R=F.findIndex(X=>X.id===M.id||X.id.startsWith("temp_"));if(R>=0&&F[R].id.startsWith("temp_")){const X=[...F];return X[R]=M,X}return F.some(X=>X.id===M.id)?F:[...F,M]}),M.sender_type==="user"&&J(d.id)}catch(M){console.error("[AdminLiveChat] Realtime message error:",M)}}).subscribe()}catch(_){console.error("[AdminLiveChat] Realtime subscription error:",_)}const Z=async()=>{try{const _=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/live_chat?action=get_messages&chatSessionId=${d.id}`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(_.ok){const M=await _.json();if(M.success&&M.messages){const F=M.messages;n(R=>(F.some(re=>re.sender_type==="user"&&!R.some(U=>U.id===re.id))&&J(d.id),F))}}}catch(_){console.error("[AdminLiveChat] Polling error:",_)}};Z();const Q=setInterval(Z,800);return()=>{clearInterval(Q),I&&Ye.removeChannel(I)}},[d==null?void 0:d.id,J]),o.useEffect(()=>{k()},[l]);const u=async I=>{var M;const Z=I||i.trim();if(!Z||!d||f)return;y(!0),I||c(""),I&&w(null);const Q=I?`[IMG]${I}
895[/IMG]`:Z,_={id:`temp_${Date.now()}`,chat_session_id:d.id,sender_type:"admin",sender_id:s,original_message:Q,translated_message:null,original_language:"tr",target_language:d.user_language,created_at:new Date().toISOString(),read_at:null};n(F=>[...F,_]);try{const F=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/live_chat?action=send_message",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({chatSessionId:d.id,senderType:"admin",senderId:s,message:Q,originalLanguage:"tr",targetLanguage:d.user_language})});if(!F.ok)throw new Error(`HTTP ${F.status}`);const R=await F.json();if(R.success&&R.message)n(X=>X.map(re=>re.id===_.id?R.message:re)),r==null||r();else throw new Error(R.error||"Mesaj gonderilemedi")}catch(F){console.error("[AdminLiveChat] Error sending message:",F),n(R=>R.filter(X=>X.id!==_.id)),I||c(Z)}finally{y(!1),(M=b.current)==null||M.focus()}},A=()=>{g&&u(g)},T=()=>{w(null)},ae=I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),u())},P=I=>new Date(I).toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit"});return e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[1000] flex items-end sm:items-center justify-center sm:p-4",onClick:a,children:e.jsxs("div",{className:"bg-white sm:rounded-2xl shadow-2xl w-full max-h-[100dvh] sm:max-h-[85vh] sm:h-auto sm:max-w-lg flex flex-col overflow-hidden rounded-t-2xl sm:rounded-b-2xl",onClick:I=>I.stopPropagation(),style:{height:"calc(100dvh - env(safe-area-inset-top))"},children:[e.jsxs("div",{className:"bg-gradient-to-r from-blue-600 to-cyan-600 text-white p-3 sm:p-4 flex items-center justify-between sm:rounded-t-2xl safe-area-top",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0 flex-1",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 bg-white/20 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(Ls,{className:"w-4 h-4 sm:w-5 sm:h-5"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"font-bold text-sm sm:text-base truncate",children:t.user_name||((z=t.user_email)==null?void 0:z.split("@")[0])||"Misafir"}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2 text-xs sm:text-sm text-blue-100",children:[e.jsx(wt,{className:"w-3 h-3 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:ef[(d==null?void 0:d.user_language)||"en"]||"Ingilizce"}),e.jsx("span",{className:"text-blue-200 hidden sm:inline",children:"|"}),e.jsx("span",{className:"text-xs hidden sm:inline",children:t.ip_address})]})]})]}),e.jsx("button",{onClick:a,className:"p-2 sm:p-2.5 hover:bg-white/20 rounded-lg transition-colors flex-shrink-0 ml-2",children:e.jsx(ht,{className:"w-5 h-5 sm:w-5 sm:h-5"})})]}),e.jsxs("div",{className:"bg-blue-50 px-3 sm:px-4 py-2 border-b border-blue-100 flex items-center gap-2 text-xs sm:text-sm text-blue-700",children:[e.jsx(wt,{className:"w-3 h-3 sm:w-4 sm:h-4 flex-shrink-0"}),e.jsxs("span",{className:"truncate",children:["Turkce yazin - ",e.jsx("strong",{children:ef[(d==null?void 0:d.user_language)||"en"]}),"'ye cevrilecek"]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-3 sm:p-4 space-y-3 bg-slate-50 min-h-0",style:{minHeight:"150px"},children:[m?e.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",children:e.jsx(Ne,{className:"w-8 h-8 text-blue-500 animate-spin"})}):N?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full min-h-[200px] text-red-500",children:[e.jsx(ht,{className:"w-10 h-10 sm:w-12 sm:h-12 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm sm:text-base",children:"Hata olustu"}),e.jsx("p",{className:"text-xs sm:text-sm text-red-400",children:N}),e.jsx("button",{onClick:()=>{p.current=!1,h(!0),v(null),window.location.reload()},className:"mt-3 px-4 py-2 bg-red-100 text-red-600 rounded-lg text-sm hover:bg-red-200 transition-colors",children:"Tekrar Dene"})]}):l.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full min-h-[200px] text-slate-400",children:[e.jsx(Ls,{className:"w-10 h-10 sm:w-12 sm:h-12 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm sm:text-base",children:"Henuz mesaj yok"}),e.jsx("p",{className:"text-xs sm:text-sm",children:"Sohbete baslayin!"})]}):l.map(I=>e.jsx("div",{className:`flex ${I.sender_type==="admin"?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[85%] sm:max-w-[80%] rounded-2xl px-3 sm:px-4 py-2 shadow-sm ${I.sender_type==="admin"?"bg-gradient-to-r from-blue-500 to-blue-600 text-white rounded-br-md":"bg-white text-slate-800 rounded-bl-md border border-slate-200"}`,children:[E(I.original_message)?e.jsx("img",{src:C(I.original_message),alt:"Shared image",className:"max-w-full rounded-lg cursor-pointer hover:opacity-90 transition-opacity",style:{maxHeight:"150px"},onClick:()=>window.open(C(I.original_message),"_blank")}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm leading-relaxed break-words",children:I.sender_type==="user"&&I.translated_message?I.translated_message:I.original_message}),I.sender_type==="user"&&I.translated_message&&I.translated_message!==I.original_message&&e.jsxs("p",{className:"text-xs mt-1 pt-1 border-t text-slate-500 border-slate-200",children:[e.jsx(wt,{className:"w-3 h-3 inline mr-1"}),I.original_message]})]}),e.jsxs("div",{className:`flex items-center gap-1 mt-1 text-xs ${I.sender_type==="admin"?"text-blue-200":"text-slate-400"}`,children:[e.jsx(Ze,{className:"w-3 h-3"}),P(I.created_at)]})]})},I.id)),e.jsx("div",{ref:j})]}),e.jsxs("div",{className:"p-3 sm:p-4 bg-white border-t border-slate-200 flex-shrink-0",style:{paddingBottom:"max(12px, env(safe-area-inset-bottom))"},children:[g&&e.jsx("div",{className:"mb-3 p-2 sm:p-3 bg-slate-100 rounded-xl relative",children:e.jsxs("div",{className:"flex items-start gap-2 sm:gap-3",children:[e.jsx("img",{src:g,alt:"Preview",className:"max-h-20 sm:max-h-32 rounded-lg border border-slate-200"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-xs sm:text-sm text-slate-600 mb-2",children:[e.jsx(sm,{className:"w-3 h-3 sm:w-4 sm:h-4 inline mr-1"}),"Gorsel hazir"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:A,disabled:f,className:"px-2.5 sm:px-3 py-1.5 bg-blue-500 text-white text-xs sm:text-sm rounded-lg hover:bg-blue-600 transition-colors disabled:opacity-50",children:f?"...":"Gonder"}),e.jsx("button",{onClick:T,disabled:f,className:"px-2.5 sm:px-3 py-1.5 bg-slate-200 text-slate-600 text-xs sm:text-sm rounded-lg hover:bg-slate-300 transition-colors disabled:opacity-50",children:"Iptal"})]})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 relative",children:e.jsx("input",{ref:b,type:"text",value:i,onChange:I=>c(I.target.value),onKeyPress:ae,onPaste:S,placeholder:"Mesaj yazin...",className:"w-full px-3 sm:px-4 py-2.5 sm:py-3 bg-slate-100 border-0 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 text-slate-800 placeholder-slate-400 text-sm sm:text-base",disabled:m||f})}),e.jsx("button",{onClick:()=>u(),disabled:!i.trim()||m||f,className:"p-2.5 sm:p-3 bg-gradient-to-r from-blue-500 to-blue-600 text-white rounded-xl hover:from-blue-600 hover:to-blue-700 transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-blue-500/30 flex-shrink-0",children:f?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(As,{className:"w-5 h-5"})})]})]})]})})}function c5(t){return e.jsx(i5,{onClose:t.onClose,children:e.jsx(o5,{...t})})}const su={"/":"Ana Sayfa","/pricing":"Fiyatlandirma","/terms":"Kullanim Sartlari","/privacy":"Gizlilik","/refund":"Iade Politikasi","/blog":"Blog","/1234":"Smm Panel","/reseller":"Smm Panel","/wholesale":"Smm Panel",home:"Ana Sayfa",dashboard:"Kullanici Paneli",checkout:"Odeme",support:"Destek",admin:"Admin Panel"},d5=["/","/pricing","/terms","/privacy","/refund","/blog","/buy-"],m5=t=>t?su[t]||d5.some(s=>t.startsWith(s)&&t.length<100)?!0:!(t.length>50||t.includes("market/")||t.includes("steam/")||t.includes("http")):!1,Nx={ana_sayfa:{label:"Anasayfa",color:"bg-blue-500",icon:cy},browsing:{label:"Geziyor",color:"bg-blue-500",icon:Ct},viewing:{label:"Inceliyor",color:"bg-green-500",icon:Ct},checkout:{label:"Odeme Yapiyor",color:"bg-yellow-500",icon:Ws},purchasing:{label:"Satin Aliyor",color:"bg-orange-500",icon:Ws},selecting_package:{label:"Paket Seciyor",color:"bg-cyan-500",icon:my},verifying:{label:"Dogrulama",color:"bg-teal-500",icon:Xr},support:{label:"Destek",color:"bg-pink-500",icon:ja},dashboard:{label:"Dashboard",color:"bg-slate-600",icon:Si},add_funds:{label:"Add Funds",color:"bg-emerald-500",icon:Jt}
895,lucky_spin:{label:"Lucky Spin",color:"bg-amber-500",icon:rs},profile_verification:{label:"Profil Dogrulama",color:"bg-teal-500",icon:Xr},signing_up:{label:"Uye Oluyor",color:"bg-rose-500",icon:ls},bank_transfer:{label:"Bank Transfer",color:"bg-green-600",icon:Gi},crypto_payment:{label:"Crypto Payment",color:"bg-amber-600",icon:gn},smm_panel:{label:"Smm Panel",color:"bg-indigo-500",icon:dy},mystery_box:{label:"Mystery Box",color:"bg-teal-600",icon:Im},pay_crypto:{label:"Pay Crypto",color:"bg-amber-600",icon:gn},pay_bank:{label:"Pay Bank",color:"bg-green-600",icon:Gi}},tf=new Set(["/1234","/reseller","/wholesale"]),x5=t=>!t||t==="Unknown"?null:`https://flagcdn.com/w40/${t.toLowerCase()}.png`;function u5(){var hs;const[t,s]=o.useState(null),[a,r]=o.useState({totalUsers:null,totalOrders:0,activeOrders:0,totalRevenue:0,giftOrdersRevenue:0,giftOrdersCount:0,newUserRevenue:0,newUserOrderCount:0,newUserCount:0,totalBalance:0,userBalances:[],totalGiftBalance:0,userGiftBalances:[],totalCashRevenue:0,cashBreakdown:{stripe:0,bankTransfer:0,crypto:0,paypal:0,payoup:0,finby:0,glodipay:0,linkPayments:0}}
895),[l,n]=o.useState([]),[i,c]=o.useState(!0),[d,x]=o.useState(!1),[m,h]=o.useState(null),[f,y]=o.useState(new Date),[g,w]=o.useState(null),[N,v]=o.useState(null),[j,b]=o.useState(null),[p,E]=o.useState(n5),[C,S]=o.useState(!1),[k,J]=o.useState(!1),[u,A]=o.useState("users"),[T,ae]=o.useState(null),[P,z]=o.useState({}),[I,Z]=o.useState(new Set),[Q,_]=o.useState(!1),[M,F]=o.useState(!1),[R,X]=o.useState([]),[re,U]=o.useState(!1),[oe,ue]=o.useState(!1),[K,q]=o.useState([]),[je,we]=o.useState(!1),[se,Se]=o.useState([]),[$,ie]=o.useState(!1),[be,Pe]=o.useState([]),de=()=>{const B=new Date,V=B.getMinutes(),Ce=B.getSeconds(),xt=(Math.ceil((V+1)/5)*5-V)*60-Ce;return xt<=0?300:xt},[H,me]=o.useState(de),[ee,Ae]=o.useState(!1),[he,D]=o.useState(null),[O,fe]=o.useState(!1),[W,_e]=o.useState(null);o.useEffect(()=>{const B=localStorage.getItem("adminUser");if(B)try{const V=JSON.parse(B);ae(V.id)}catch{console.error("Failed to parse admin user")}},[]);const Re=o.useCallback(async()=>{try{const B=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_active_users",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(!B.ok){console.error("[LiveUsersTracker] API error:",B.status),c(!1);return}const V=await B.json();V.success&&(s(V.data),y(new Date),h(null))}catch(B){console.error("[LiveUsersTracker] Fetch error:",B)}finally{c(!1)}},[]),ve=o.useCallback(async B=>{const V=B||p;try{const Ce="https://kdqsajuhvcmxsnttdetg.supabase.co",Ee="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Oe=new Date().getTimezoneOffset(),xt=new URLSearchParams;xt.append("startDate",V.startDate),xt.append("endDate",V.endDate),xt.append("tzOffset",Oe.toString());const[Dt,ts]=await Promise.all([fetch(`${Ce}/functions/v1/get_total_users_count`,{headers:{Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}}),fetch(`${Ce}/functions/v1/get_admin_stats?${xt.toString()}`,{headers:{Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}})]);let bs=null;if(Dt.ok){const Tt=await Dt.json();bs=Tt.totalUsers??Tt.count??null}if(ts.ok){const Tt=await ts.json();r({totalUsers:bs,totalOrders:Tt.totalOrders||0,activeOrders:Tt.activeOrders||0,totalRevenue:Tt.totalRevenue||0,giftOrdersRevenue:Tt.giftOrdersRevenue||0,giftOrdersCount:Tt.giftOrdersCount||0,newUserRevenue:Tt.newUserRevenue||0,newUserOrderCount:Tt.newUserOrderCount||0,newUserCount:Tt.newUserCount||0,totalBalance:Tt.totalBalance||0,userBalances:Tt.userBalances||[],totalGiftBalance:Tt.totalGiftBalance||0,userGiftBalances:Tt.userGiftBalances||[],totalCashRevenue:Tt.totalCashRevenue||0,cashBreakdown:Tt.cashBreakdown||{stripe:0,bankTransfer:0,crypto:0,paypal:0,payoup:0,finby:0,glodipay:0,linkPayments:0}}),Pe(Tt.revenueBySource||[])}}catch(Ce){console.error("Dashboard stats error:",Ce)}},[p]),Te=o.useCallback(async B=>{const V=B||p;x(!0);try{const Ce="https://kdqsajuhvcmxsnttdetg.supabase.co",Ee="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Oe=new Date().getTimezoneOffset(),xt=new URLSearchParams;xt.append("startDate",V.startDate),xt.append("endDate",V.endDate),xt.append("tzOffset",Oe.toString());const Dt=await fetch(`${Ce}/functions/v1/get_daily_orders_by_country?${xt.toString()}`,{headers:{Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}});if(Dt.ok){const ts=await Dt.json();ts.success&&n(ts.countries||ts.data||[])}}catch(Ce){console.error("Country stats error:",Ce)}finally{x(!1)}},[p]),ze=o.useCallback(()=>{if(l.length===0)return;const B=l.reduce((Tt,_t)=>Tt+_t.revenue,0),V=l.reduce((Tt,_t)=>Tt+_t.orderCount,0),Ce=Tt=>{const[_t,Bt,Ts]=Tt.split("-");return`${Ts}.${Bt}.${_t}`},Ee=p.startDate===p.endDate?Ce(p.startDate):`${Ce(p.startDate)} - ${Ce(p.endDate)}`,Oe=["#10b981","#3b82f6","#f59e0b","#ef4444","#8b5cf6","#ec4899","#06b6d4","#84cc16","#f97316","#6366f1","#14b8a6","#a855f7","#eab308","#22c55e","#0ea5e9"],xt=()=>{let Ts=-90;const ps=[],Bs=l.slice(0,10),Xt=l.slice(10).reduce((Kt,Y)=>Kt+Y.revenue,0);return(Xt>0?[...Bs,{countryName:"Diger",revenue:Xt,countryCode:"OTHER",orderCount:0}
895]:Bs).forEach((Kt,Y)=>{const qe=Kt.revenue/B*100,ct=qe/100*360,gt=Ts,ds=Ts+ct,ys=gt*Math.PI/180,Na=ds*Math.PI/180,Ma=150+120*Math.cos(ys),Ll=150+120*Math.sin(ys),at=150+120*Math.cos(Na),Ea=150+120*Math.sin(Na),zr=ct>180?1:0,qa=Oe[Y%Oe.length];qe>.5&&ps.push(`<path d="M 150 150 L ${Ma} ${Ll} A 120 120 0 ${zr} 1 ${at} ${Ea} Z" fill="${qa}" stroke="#fff" stroke-width="2"/>`),Ts=ds}),ps.join("")},Dt=()=>{const Tt=l.slice(0,10),_t=l.slice(10).reduce((Ts,ps)=>Ts+ps.revenue,0);return(_t>0?[...Tt,{countryName:"Diger",revenue:_t,countryCode:"OTHER",orderCount:0}]:Tt).map((Ts,ps)=>{const Bs=(Ts.revenue/B*100).toFixed(1);return` 896 <div class="legend-item"> 897 <span class="legend-color" style="background: ${Oe[ps%Oe.length]};"></span> 898 <span class="legend-label">${Ts.countryName}</span> 899 <span class="legend-value">${Bs}%</span> 900 </div> 901 `}).join("")},ts=` 902 <!DOCTYPE html> 903 <html> 904 <head> 905 <meta charset="UTF-8"> 906 <title>Ulkelere Gore Gelir Raporu</title> 907 <style> 908 * { margin: 0; padding: 0; box-sizing: border-box; } 909 body { font-family: 'Segoe UI', Arial, sans-serif; padding: 40px; background: #fff; color: #1e293b; } 910 .header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid #10b981; } 911 .header h1 { font-size: 24px; color: #1e293b; margin-bottom: 8px; } 912 .header .date { font-size: 14px; color: #64748b; } 913 .summary { display: flex; justify-content: center; gap: 40px; margin-bottom: 30px; } 914 .summary-item { text-align: center; padding: 15px 25px; background: #f0fdf4; border-radius: 8px; } 915 .summary-item .label { font-size: 12px; color: #64748b; margin-bottom: 4px; } 916 .summary-item .value { font-size: 20px; font-weight: bold; color: #10b981; } 917 .chart-section { display: flex; justify-content: center; align-items: center; gap: 40px; margin: 30px 0; padding: 20px; background: #f8fafc; border-radius: 12px; } 918 .chart-container { flex-shrink: 0; } 919 .legend { display: flex; flex-direction: column; gap: 8px; } 920 .legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; } 921 .legend-color { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; } 922 .legend-label { flex: 1; color: #475569; } 923 .legend-value { font-weight: 600; color: #1e293b; min-width: 50px; text-align: right; } 924 table { width: 100%; border-collapse: collapse; margin-top: 20px; } 925 th { background: #f8fafc; padding: 12px; text-align: left; font-size: 12px; color: #64748b; border-bottom: 2px solid #e2e8f0; } 926 td { padding: 12px; border-bottom: 1px solid #e2e8f0; } 927 .rank { width: 50px; text-align: center; } 928 .rank-badge { display: inline-block; width: 24px; height: 24px; border-radius: 50%; line-height: 24px; text-align: center; font-size: 12px; font-weight: bold; } 929 .rank-1 { background: #fbbf24; color: #78350f; } 930 .rank-2 { background: #cbd5e1; color: #475569; } 931 .rank-3 { background: #d97706; color: #fff; } 932 .rank-other { background: #d1fae5; color: #059669; } 933 .country { font-weight: 500; } 934 .revenue { text-align: right; font-weight: bold; color: #10b981; } 935 .orders { text-align: right; color: #64748b; } 936 .percent { text-align: right; color: #3b82f6; font-weight: 500; } 937 .footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid #e2e8f0; text-align: center; font-size: 12px; color: #94a3b8; } 938 @media print { 939 body { padding: 20px; } 940 .chart-section { break-inside: avoid; } 941 } 942 </style> 943 </head> 944 <body> 945 <div class="header"> 946 <h1>Ulkelere Gore Gelir Raporu</h1> 947 <div class="date">${Ee}</div> 948 </div> 949 <div class="summary"> 950 <div class="summary-item"> 951 <div class="label">Toplam Gelir</div> 952 <div class="value">$${B.toFixed(2)}</div> 953 </div> 954 <div class="summary-item"> 955 <div class="label">Toplam Siparis</div> 956 <div class="value">${V}</div> 957 </div> 958 <div class="summary-item"> 959 <div class="label">Ulke Sayisi</div> 960 <div class="value">${l.length}</div> 961 </div> 962 </div> 963 <div class="chart-section"> 964 <div class="chart-container">
965 <svg width="300" height="300" viewBox="0 0 300 300"> 966 ${xt()} 967 </svg> 968 </div> 969 <div class="legend"> 970 ${Dt()} 971 </div> 972 </div> 973 <table> 974 <thead> 975 <tr> 976 <th class="rank">#</th> 977 <th>Ulke</th> 978 <th style="text-align: right;">Gelir</th> 979 <th style="text-align: right;">Oran</th> 980 <th style="text-align: right;">Siparis</th> 981 </tr> 982 </thead> 983 <tbody> 984 ${l.map((Tt,_t)=>{const Bt=(Tt.revenue/B*100).toFixed(1);return` 985 <tr> 986 <td class="rank"> 987 <span class="rank-badge ${_t===0?"rank-1":_t===1?"rank-2":_t===2?"rank-3":"rank-other"}"> 988 ${_t+1} 989 </span> 990 </td> 991 <td class="country">${Tt.countryName}</td> 992 <td class="revenue">$${Tt.revenue.toFixed(2)}</td> 993 <td class="percent">${Bt}%</td> 994 <td class="orders">${Tt.orderCount}</td> 995 </tr> 996 `}).join("")} 997 </tbody> 998 </table> 999 <div class="footer"> 1000 Rapor olusturma tarihi: ${new Date().toLocaleString("tr-TR")} 1001 </div> 1002 </body> 1003 </html> 1004 `,bs=window.open("","_blank");bs&&(bs.document.write(ts),bs.document.close(),setTimeout(()=>{bs.print()},250))},[l,p]),it=o.useCallback(async()=>{try{const V=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/live_chat?action=get_unread_counts",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}})).json();V.success&&V.counts&&z(V.counts),V.success&&V.contacted&&Z(new Set(V.contacted))}catch(B){console.error("Error fetching unread counts:",B)}},[]),ke=o.useCallback(async()=>{U(!0);try{const{data:B,error:V}=await Ye.from("orders").select(` 1005 id, order_number, platform, service_type, username, link, quantity, price, status, 1006 provider_status, provider_order_id, created_at, updated_at, email, payment_source, user_id 1007 `).in("status",["pending","paid","processing","in_progress","partial"]).order("created_at",{ascending:!1}).limit(200);if(V){console.error("Active orders error:",V),X([]);return}const Ce=(B||[]).map(_t=>_t.id),{data:Ee,error:Oe}=await Ye.from("payments").select("order_id").in("order_id",Ce).eq("status","completed");Oe&&console.error("Payments error:",Oe);const xt=new Set((Ee||[]).map(_t=>_t.order_id)),Dt=(B||[]).filter(_t=>xt.has(_t.id)||_t.payment_source==="wallet"||_t.payment_source==="gift_balance"),ts=[...new Set(Dt.filter(_t=>_t.user_id).map(_t=>_t.user_id))];let bs={};if(ts.length>0){const{data:_t}=await Ye.from("users").select("id, full_name, email").in("id",ts);_t&&_t.forEach(Bt=>{bs[Bt.id]={full_name:Bt.full_name,email:Bt.email}})}const Tt=Dt.map(_t=>({..._t,user:_t.user_id&&bs[_t.user_id]?bs[_t.user_id]:null}));X(Tt)}catch(B){console.error("Active orders error:",B)}finally{U(!1)}},[]),Xe=o.useCallback(async()=>{we(!0);try{const B=new Date,V=new Date(B.getFullYear(),B.getMonth(),B.getDate()),Ce=new Date(B.getFullYear(),B.getMonth(),B.getDate(),23,59,59,999),{data:Ee,error:Oe}=await Ye.from("orders").select(` 1008 id, order_number, platform, service_type, username, link, quantity, price, status, 1009 provider_status, provider_order_id, created_at, updated_at, email, payment_source 1010 `).gte("created_at",V.toISOString()).lte("created_at",Ce.toISOString()).not("status","in","(canceled,cancelled,failed,rejected,refunded)").order("created_at",{ascending:!1}).limit(200);if(Oe){console.error("Today orders error:",Oe),q([]);return}const xt=(Ee||[]).map(_t=>_t.id),{data:Dt,error:ts}=await Ye.from("payments").select("order_id").in("order_id",xt).eq("status","completed");ts&&console.error("Payments query error:",ts);const bs=new Set((Dt||[]).map(_t=>_t.order_id)),Tt=(Ee||[]).filter(_t=>_t.payment_source==="wallet"||_t.payment_source==="gift_balance"?!0:bs.has(_t.id));q(Tt)}catch(B){console.error("Today orders error:",B)}finally{we(!1)}},[]),ce=o.useCallback(async()=>{ie(!0);try{const Ce=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_stuck_orders",{method:"GET",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(!Ce.ok){console.error("Error fetching stuck orders:",Ce.status);return}const Ee=await Ce.json();Se(Ee.orders||[]),Ee.last_retry_at&&_e(Ee.last_retry_at)}catch(B){console.error("Stuck orders fetch error:",B)}finally{ie(!1)}},[]),Le=o.useCallback(async()=>
1010{if(!(ee||se.length===0)){Ae(!0);try{const Ce=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/retry_pending_orders",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({limit:20})});if(Ce.ok){const Ee=await Ce.json();D({timestamp:new Date,total:Ee.total||0,succeeded:Ee.succeeded||0,failed:Ee.failed||0,results:Ee.results||[]}),await ce()}}catch(B){console.error("Retry stuck orders error:",B)}finally{Ae(!1),me(900)}}},[ee,se.length,ce]);o.useEffect(()=>{ce();const B=setInterval(ce,6e4);return()=>clearInterval(B)},[ce]),o.useEffect(()=>{const B=setInterval(()=>{const V=de();me(V),V<=1&&ce()},1e3);return()=>clearInterval(B)},[ce]),o.useEffect(()=>{Re(),ve(),Te(),it();const B=setInterval(Re,1e4),V=setInterval(it,5e3);return()=>{clearInterval(B),clearInterval(V)}},[Re,ve,Te,it]);const Fe=B=>{E(B),ve(B),Te(B)},Me=B=>{const V=new Date(B),Ee=Math.floor((new Date().getTime()-V.getTime())/1e3);return Ee<10?"Simdi":Ee<60?`${Ee} sn once`:Ee<3600?`${Math.floor(Ee/60)} dk once`:`${Math.floor(Ee/3600)} saat once`},ft=B=>Nx[B]||{label:B.replace(/_/g," ").replace(/\b\w/g,V=>V.toUpperCase()),color:"bg-gray-500",icon:ja},pe=B=>su[B]?su[B]:m5(B)?B:"Ana Sayfa",dt=({country:B,size:V="md"})=>{const Ce=x5(B),Ee={sm:"w-4 h-3",md:"w-5 h-3.5",lg:"w-6 h-4"};return Ce?e.jsx("img",{src:Ce,alt:B||"",className:`${Ee[V]} object-cover rounded-[2px] inline-block`,loading:"lazy"}):e.jsx(ny,{className:V==="sm"?"w-3 h-3":"w-4 h-4",style:{color:"#94a3b8"}})},ot=B=>{if(!B)return{short:"Direkt",full:"Direkt erisim"};try{return{short:new URL(B).hostname.replace("www.",""),full:B}}catch{return{short:B.slice(0,20),full:B}}},Mt=async()=>{_(!0);try{await Promise.all([Re(),ve(p),Te(p),it()]),y(new Date)}finally{_(!1)}};return i&&!t?e.jsx("div",{className:"min-h-[400px] flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Ve,{className:"w-12 h-12 text-blue-600 animate-spin mx-auto mb-4"}),e.jsx("p",{className:"text-slate-600",children:"Dashboard yukleniyor..."})]})}):m?e.jsx("div",{className:"min-h-[400px] flex items-center justify-center",children:e.jsxs("div",{className:"text-center bg-red-50 rounded-2xl p-8 border border-red-200",children:[e.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(ja,{className:"w-8 h-8 text-red-600"})}),e.jsx("p",{className:"text-red-600 font-medium mb-4",children:m}),e.jsx("button",{onClick:Re,className:"px-6 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors",children:"Tekrar Dene"})]})}):e.jsxs("div",{className:"space-y-3 lg:space-y-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-9 h-9 lg:w-10 lg:h-10 bg-gradient-to-br from-blue-600 to-cyan-600 rounded-lg flex items-center justify-center",children:e.jsx(ja,{className:"w-4 h-4 lg:w-5 lg:h-5 text-white"})}),e.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-3 h-3 bg-green-500 rounded-full border-2 border-white animate-pulse"})]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg lg:text-xl font-bold text-slate-900",children:"Canli Dashboard"}),e.jsxs("p",{className:"text-xs text-slate-500",children:[f.toLocaleTimeString("tr-TR")," -",e.jsxs("span",{className:"text-green-600 font-medium ml-1",children:[(t==null?void 0:t.totalActive)||0," aktif kullanici"]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(l5,{value:p,onChange:Fe}),e.jsx("button",{onClick:Mt,disabled:Q,className:"p-2 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors shadow-sm disabled:opacity-50",title:"Tum verileri yenile",children:e.jsx(Ve,{className:`w-4 h-4 text-slate-600 ${Q?"animate-spin":""}`})})]})]}),e.jsxs("div",{className:"lg:hidden grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl p-3 text-white shadow-md shadow-blue-500/20",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"flex items-center gap-0.5 text-blue-100 text-[10px]",children:[e.jsx(rt,{className:"w-2.5 h-2.5"}),"Canli"]})]}),e.jsx("div",{className:"text-2xl font-bold",children:(t==null?void 0:t.totalActive)||0}),e.jsx("div",{className:"text-blue-100 text-xs",children:"Aktif Kullanici"}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5 text-[10px] text-blue-100",children:[e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(Xr,{className:"w-2.5 h-2.5"})," ",(t==null?void 0:t.authenticatedCount)||0," Uye"]}),e.jsx("span",{children:"|"}),e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(di,{className:"w-2.5 h-2.5"})," ",(t==null?void 0:t.guestCount)||0," Misafir"]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 border border-slate-200 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("div",{className:"w-7 h-7 bg-slate-100 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-3.5 h-3.5 text-slate-600"})}),e.jsx(tt,{className:"w-4 h-4 text-green-500"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:a.totalUsers===null?e.jsx(Ve,{className:"w-5 h-5 text-slate-400 animate-spin"}):a.totalUsers}),e.jsx("div",{className:"text-slate-600 text-xs",children:"Toplam Uye"})]}),e.jsxs("button",{onClick:()=>{ue(!0),Xe()},className:"bg-white rounded-xl p-3 border border-slate-200 shadow-sm hover:shadow-md hover:border-green-300 transition-all text-left w-full group",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("div",{className:"w-7 h-7 bg-green-100 rounded-lg flex items-center justify-center group-hover:bg-green-200 transition-colors",children:e.jsx(Ws,{className:"w-3.5 h-3.5 text-green-600"})}),e.jsx(ja,{className:"w-4 h-4 text-green-500"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:a.totalOrders}),e.jsx("div",{className:"text-slate-600 text-xs",children:"Toplam Siparis"})]}),e.jsxs("button",{onClick:()=>{F(!0),ke()},className:"bg-white rounded-xl p-3 border border-slate-200 shadow-sm hover:shadow-md hover:border-orange-300 transition-all text-left w-full group",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("div",{className:"w-7 h-7 bg-orange-100 rounded-lg flex items-center justify-center group-hover:bg-orange-200 transition-colors",children:e.jsx(us,{className:"w-3.5 h-3.5 text-orange-600"})}),e.jsx(ja,{className:"w-4 h-4 text-orange-500 animate-pulse"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:a.activeOrders}),e.jsx("div",{className:"text-slate-600 text-xs",children:"Aktif Siparis"})]}),e.jsxs("div",{className:"col-span-2 bg-gradient-to-br from-emerald-500 to-emerald-600 rounded-xl p-3 text-white shadow-md shadow-emerald-500/20",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center",children:e.jsx(Jt,{className:"w-3.5 h-3.5"})}),e.jsx(tt,{className:"w-4 h-4 text-emerald-100"})]}),e.jsx("div",{className:"text-2xl font-bold",children:pt(a.totalCashRevenue)}),e.jsx("div",{className:"text-emerald-100 text-xs",children:"Kasaya Giren"}),e.jsxs("div",{className:"mt-2 pt-2 border-t border-white/20 grid grid-cols-2 gap-x-4 gap-y-0.5",children:[a.cashBreakdown.stripe>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-emerald-100 text-[10px] shrink-0",children:"Stripe"}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.c
1010ashBreakdown.stripe)})]}),a.cashBreakdown.paypal>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-emerald-100 text-[10px] shrink-0",children:"PayPal"}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.cashBreakdown.paypal)})]}),a.cashBreakdown.bankTransfer>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-emerald-100 text-[10px] shrink-0",children:"Banka Transferi"}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.cashBreakdown.bankTransfer)})]}),a.cashBreakdown.crypto>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-emerald-100 text-[10px] shrink-0",children:"Kripto"}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.cashBreakdown.crypto)})]}),a.cashBreakdown.payoup>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-emerald-100 text-[10px] shrink-0",children:"Payoup"}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.cashBreakdown.payoup)})]}),a.cashBreakdown.finby>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-emerald-100 text-[10px] shrink-0",children:"Finby"}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.cashBreakdown.finby)})]}),a.cashBreakdown.glodipay>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-emerald-100 text-[10px] shrink-0",children:"GlodiPay"}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.cashBreakdown.glodipay)})]}),a.cashBreakdown.linkPayments>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-emerald-100 text-[10px] shrink-0",children:"Link Odeme"}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.cashBreakdown.linkPayments)})]}),e.jsxs("div",{className:"flex items-baseline justify-between gap-2 pt-0.5 border-t border-white/10",children:[e.jsxs("span",{className:"text-emerald-100 text-[10px] shrink-0",children:["Yeni Uye (",a.newUserCount,")"]}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.newUserRevenue)})]}),e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsxs("span",{className:"text-emerald-100 text-[10px] shrink-0",children:["Hediye (",a.giftOrdersCount,")"]}),e.jsx("span",{className:"text-white font-semibold text-xs shrink-0",children:pt(a.giftOrdersRevenue)})]})]})]})]}),e.jsxs("div",{className:"hidden lg:flex gap-2.5 items-start",children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl p-3 text-white shadow-md shadow-blue-500/20 flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"flex items-center gap-0.5 text-blue-100 text-[10px]",children:[e.jsx(rt,{className:"w-2.5 h-2.5"}),"Canli"]})]}),e.jsx("div",{className:"text-2xl font-bold leading-tight",children:(t==null?void 0:t.totalActive)||0}),e.jsx("div",{className:"text-blue-100 text-[11px]",children:"Aktif Kullanici"}),e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-[10px] text-blue-100",children:[e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(Xr,{className:"w-2.5 h-2.5"})," ",(t==null?void 0:t.authenticatedCount)||0," Uye"]}),e.jsx("span",{children:"|"}),e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(di,{className:"w-2.5 h-2.5"})," ",(t==null?void 0:t.guestCount)||0," Misafir"]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 border border-slate-200 shadow-sm flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("div",{className:"w-7 h-7 bg-slate-100 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-3.5 h-3.5 text-slate-600"})}),e.jsx(tt,{className:"w-3.5 h-3.5 text-green-500"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900 leading-tight",children:a.totalUsers===null?e.jsx(Ve,{className:"w-5 h-5 text-slate-400 animate-spin"}):a.totalUsers}),e.jsx("div",{className:"text-slate-500 text-[11px]",children:"Toplam Uye"})]}),e.jsxs("button",{onClick:()=>{ue(!0),Xe()},className:"bg-white rounded-xl p-3 border border-slate-200 shadow-sm hover:shadow-md hover:border-green-300 transition-all text-left flex-1 min-w-0 group",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("div",{className:"w-7 h-7 bg-green-100 rounded-lg flex items-center justify-center group-hover:bg-green-200 transition-colors",children:e.jsx(Ws,{className:"w-3.5 h-3.5 text-green-600"})}),e.jsx(ja,{className:"w-3.5 h-3.5 text-green-500"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900 leading-tight",children:a.totalOrders}),e.jsx("div",{className:"text-slate-500 text-[11px]",children:"Toplam Siparis"})]}),e.jsxs("button",{onClick:()=>{F(!0),ke()},className:"bg-white rounded-xl p-3 border border-slate-200 shadow-sm hover:shadow-md hover:border-orange-300 transition-all text-left flex-1 min-w-0 group",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("div",{className:"w-7 h-7 bg-orange-100 rounded-lg flex items-center justify-center group-hover:bg-orange-200 transition-colors",children:e.jsx(us,{className:"w-3.5 h-3.5 text-orange-600"})}),e.jsx(ja,{className:"w-3.5 h-3.5 text-orange-500 animate-pulse"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900 leading-tight",children:a.activeOrders}),e.jsx("div",{className:"text-slate-500 text-[11px]",children:"Aktif Siparis"})]}),e.jsxs("div",{className:"bg-gradient-to-br from-emerald-500 to-emerald-600 rounded-xl p-3 text-white shadow-md shadow-emerald-500/20 flex-[1.3] min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center",children:e.jsx(Jt,{className:"w-3.5 h-3.5"})}),e.jsx(tt,{className:"w-3.5 h-3.5 text-emerald-100"})]}),e.jsx("div",{className:"text-2xl font-bold leading-tight",children:pt(a.totalCashRevenue)}),e.jsx("div",{className:"text-emerald-100 text-[11px]",children:"Kasaya Giren"}),e.jsxs("div",{className:"mt-1.5 pt-1.5 border-t border-white/20 space-y-0.5",children:[a.cashBreakdown.stripe>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsx("span",{className:"text-emerald-100 text-[10px]",children:"Stripe"}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.c
1010ashBreakdown.stripe)})]}),a.cashBreakdown.paypal>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsx("span",{className:"text-emerald-100 text-[10px]",children:"PayPal"}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.cashBreakdown.paypal)})]}),a.cashBreakdown.bankTransfer>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsx("span",{className:"text-emerald-100 text-[10px]",children:"Banka"}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.cashBreakdown.bankTransfer)})]}),a.cashBreakdown.crypto>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsx("span",{className:"text-emerald-100 text-[10px]",children:"Kripto"}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.cashBreakdown.crypto)})]}),a.cashBreakdown.payoup>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsx("span",{className:"text-emerald-100 text-[10px]",children:"Payoup"}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.cashBreakdown.payoup)})]}),a.cashBreakdown.finby>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsx("span",{className:"text-emerald-100 text-[10px]",children:"Finby"}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.cashBreakdown.finby)})]}),a.cashBreakdown.glodipay>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsx("span",{className:"text-emerald-100 text-[10px]",children:"GlodiPay"}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.cashBreakdown.glodipay)})]}),a.cashBreakdown.linkPayments>0&&e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsx("span",{className:"text-emerald-100 text-[10px]",children:"Link"}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.cashBreakdown.linkPayments)})]}),e.jsxs("div",{className:"flex items-baseline justify-between gap-1 pt-0.5 border-t border-white/10",children:[e.jsxs("span",{className:"text-emerald-100 text-[10px]",children:["Yeni (",a.newUserCount,")"]}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.newUserRevenue)})]}),e.jsxs("div",{className:"flex items-baseline justify-between gap-1",children:[e.jsxs("span",{className:"text-emerald-100 text-[10px]",children:["Hediye (",a.giftOrdersCount,")"]}),e.jsx("span",{className:"text-white font-semibold text-[11px]",children:pt(a.giftOrdersRevenue)})]})]})]})]}),e.jsxs("div",{className:"flex gap-1.5 p-0.5 bg-slate-100 rounded-lg w-fit",children:[e.jsxs("button",{onClick:()=>A("users"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${u==="users"?"bg-white text-slate-900 shadow-sm":"text-slate-600 hover:text-slate-900"}`,children:["Aktif Kullanicilar (",(t==null?void 0:t.users.length)||0,")"]}),e.jsx("button",{onClick:()=>A("overview"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${u==="overview"?"bg-white text-slate-900 shadow-sm":"text-slate-600 hover:text-slate-900"}`,children:"Genel Bakis"})]}),u==="overview"&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-3",children:[e.jsxs("div",{className:`md:col-span-2 xl:col-span-4 rounded-xl p-4 border shadow-sm transition-all ${se.length>0?"bg-gradient-to-r from-red-50 to-orange-50 border-red-200":"bg-gradient-to-r from-emerald-50 to-green-50 border-emerald-200"}`,children:[e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center ${se.length>0?"bg-red-500":"bg-emerald-500"}`,children:se.length>0?e.jsx(Fs,{className:"w-5 h-5 text-white"}):e.jsx(hl,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-bold text-slate-900 flex items-center gap-2",children:["Provider Bekleyen Siparisler",$&&e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin text-slate-400"})]}),e.jsx("p",{className:`text-xs ${se.length>0?"text-red-600":"text-emerald-600"}`,children:se.length>0?`${se.length} siparis providera gonderilmedi veya hata aldi`:"Tum siparisler providera basariyla gonderildi"})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[W&&e.jsxs("div",{className:"text-center px-2 py-1.5 bg-white/80 rounded-lg flex-1 sm:flex-none",children:[e.jsx("div",{className:"text-xs font-bold text-slate-900 font-mono",children:new Date(W).toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),e.jsx("div",{className:"text-[9px] text-slate-500",children:"Son Deneme"})]}),e.jsxs("div",{className:"text-center px-2 py-1.5 bg-white/80 rounded-lg flex-1 sm:flex-none",children:[e.jsxs("div",{className:"text-lg font-bold text-slate-900 font-mono",children:[Math.floor(H/60).toString().padStart(2,"0"),":",(H%60).toString().padStart(2,"0")]}),e.jsx("div",{className:"text-[9px] text-slate-500",children:"Sonraki Kontrol"})]})]}),e.jsxs("div",{className:"flex flex-row sm:flex-col gap-1.5",children:[e.jsx("button",{onClick:Le,disabled:ee||se.length===0,className:`flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg font-medium transition-all text-xs flex-1 sm:flex-none whitespace-nowrap ${se.length>0?"bg-red-500 hover:bg-red-600 text-white shadow-md shadow-red-500/30":"bg-slate-200 text-slate-400 cursor-not-allowed"} disabled:opacity-50`,children:ee?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin"}),e.jsx("span",{children:"Gonderiliyor..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(As,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Simdi Gonder"})]})}),se.length>0&&e.jsxs("button",{onClick:()=>fe(!0),className:"flex items-center justify-center gap-1.5 px-3 py-2 bg-white hover:bg-slate-50 border border-slate-200 rounded-lg text-slate-700 font-medium transition-all text-xs flex-1 sm:flex-none whitespace-nowrap",children:[e.jsx(Ct,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Detaylari Gor"})]})]})]})]}),he&&e.jsx("div",{className:"mt-3 pt-3 border-t border-slate-200",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"text-xs text-slate-600",children:["Son islem: ",he.timestamp.toLocaleTimeString("tr-TR")]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsxs("span",{className:"flex items-center gap-1 text-emerald-600",children:[e.jsx(hl,{className:"w-4 h-4"}),he.succeeded," basarili"]}),he.failed>0&&e.jsxs("span",{className:"flex items-center gap-1 text-red-600",children:[e.jsx(nt,{className:"w-4 h-4"}),he.failed," basarisiz"]})]})]})})]}),e.jsxs("div",{className:"bg-white rounded-xl p-4 border border-slate-200 shadow-sm",children:[e.jsxs("h3",{className:"text-lg font-bold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(kt,{className:"w-5 h-5 text-blue-600"}),"Hizli Istatistikler"]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"rounded-xl overflow-hidden border border-slate-200",children:[e.jsxs("button",{onClick:()=>S(!C),className:"w-full flex items-center justify-between p-4 bg-slate-50 hover:bg-slate-100 transition-colors",children:[e.jsx("span",{className:"text-slate-700 font-medium",children:"Toplam Kullanici Bakiyesi"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-lg font-bold text-blue-600",children:pt(a.totalBalance)}),e.jsx(is,{className:`w-5 h-5 text-slate-400 transition-transform ${C?"rotate-180":""}`})]})]}),C&&a.userBalances.length>0&&e.jsx("div",{className:"border-t border-slate-200 max-h-48 overflow-y-auto",children:a.userBalances.map((B,V)=>e.jsxs("div",{onClick:()=>v(B.id),className:"flex items-center justify-between p-3 border-b border-slate-100 last:border-b-0 hover:bg-blue-50 cursor-pointer transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold ${V===0?"bg-yellow-400 text-yellow-900":V===1?"bg-slate-300 text-slate-700":V===2?"bg-amber-600 text-white":"bg-slate-100 text-slate-600"}`,children:V<3?V+1:e.jsx(ls,{className:"w-3 h-3"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-slate-800 text-sm",children:B.fullName}),e.jsx("div",{className:"text-xs text-slate-500",children:B.email})]})]}),e.jsx("div",{className:"font-bold text-blue-600 text-sm",children:pt(B.balance)})]},B.id))})]}),e.jsxs("div",{className:"rounded-xl overflow-hidden border border-slate-200",children:[e.jsxs("button",{onClick:()=>J(!k),className:"w-full flex items-center justify-between p-4 bg-slate-50 hover:bg-slate-100 transition-colors",children:[e.jsx("span",{className:"text-slate-700 font-medium",children:"Oyun Bakiyesi"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-lg font-bold text-emerald-600",children:pt(a.totalGiftBalance)}),e.jsx(is,{className:`w-5 h-5 text-slate-400 transition-transform ${k?"rotate-180":""}`})]})]}),k&&a.userGiftBalances.length>0&&e.jsx("div",{className:"border-t border-slate-200 max-h-48 overflow-y-auto",children:a.userGiftBalances.map((B,V)=>e.jsxs("div",{onClick:()=>v(B.id),className:"flex items-center justify-between p-3 border-b border-slate-100 last:border-b-0 hover:bg-emerald-50 cursor-pointer transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold ${V===0?"bg-yellow-400 text-yellow-900":V===1?"bg-slate-300 text-slate-700":V===2?"bg-amber-600 text-white":"bg-slate-100 text-slate-600"}`,children:V<3?V+1:e.jsx(ls,{className:"w-3 h-3"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-slate-800 text-sm",children:B.fullName}),e.jsx("div",{className:"text-xs text-slate-500",children:B.email})]})]}),e.jsx("div",{className:"font-bold text-emerald-600 text-sm",children:pt(B.giftBalance)})]},B.id))})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl",children:[e.jsx("span",{className:"text-slate-700 font-medium",children:"Ortalama Siparis"}),e.jsx("span",{className:"text-lg font-bold text-green-600",children:pt(a.totalOrders>0?a.totalRevenue/a.totalOrders:0)})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-4 border border-slate-200 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h3",{className:"text-lg font-bold text-slate-900 flex items-center gap-2",children:[e.jsx(wt,{className:"w-5 h-5 text-emerald-600"}),"Ulkelere Gore Gelir"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:ze,disabled:d||l.length===0,className:"p-2 hover:bg-emerald-50 rounded-lg transition-colors disabled:opacity-50",title:"PDF Indir",children:e.jsx(_l,{className:"w-4 h-4 text-emerald-600"})}),e.jsx("button",{onClick:()=>Te(),disabled:d,className:"p-2 hover:bg-slate-100 rounded-lg transition-colors disabled:opacity-50",children:e.jsx(Ve,{className:`w-4 h-4 text-slate-500 ${d?"animate-spin":""}`})})]})]}),d?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Ve,{className:"w-6 h-6 text-emerald-600 animate-spin"})}):l.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx(Fr,{className:"w-10 h-10 text-slate-300 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Bu tarih araliginda siparis yok"})]}):e.jsxs("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:[l.map((B,V)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-xl hover:bg-slate-100 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold ${V===0?"bg-yellow-400 text-yellow-900":V===1?"bg-slate-300 text-slate-700":V===2?"bg-amber-600 text-white":"bg-emerald-100 text-emerald-700"}`,children:V+1}),e.jsx(dt,{country:B.countryCode,size:"lg"}),e.jsx("span",{className:"text-sm font-medium text-slate-700",children:B.countryName})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"font-bold text-emerald-600",children:pt(B.revenue)}),e.jsxs("div",{className:"text-xs text-slate-500",children:[B.orderCount," siparis"]})]})]},B.countryCode)),l.length>0&&e.jsxs("div",{className:"flex items-center justify-between p-3 bg-emerald-50 rounded-xl border border-emerald-200 mt-3",children:[e.jsx("span",{className:"font-medium text-emerald-800",children:"Toplam"}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"font-bold text-emerald-600",children:pt(l.reduce((B,V)=>B+V.revenue,0))}),e.jsxs("div",{className:"text-xs text-emerald-700",children:[l.reduce((B,V)=>B+V.orderCount,0)," siparis"]})]})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-4 border border-slate-200 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h3",{className:"text-lg font-bold text-slate-900 flex items-center gap-2",children:[e.jsx(cc,{className:"w-5 h-5 text-blue-600"}),"Kaynaklara Gore Gelir"]}),e.jsx("button",{onClick:()=>ve(),disabled:Q,className:"p-2 hover:bg-slate-100 rounded-lg transition-colors disabled:opacity-50",children:e.jsx(Ve,{className:`w-4 h-4 text-slate-500 ${Q?"animate-spin":""}`})})]}),Q&&be.length===0?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Ve,{className:"w-6 h-6 text-blue-600 animate-spin"})}):be.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx(cc,{className:"w-10 h-10 text-slate-300 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Bu tarih araliginda veri yok"})]}):e.jsxs("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:[be.map((B,V)=>{const Ce=be.reduce((Oe,xt)=>Oe+xt.revenue,0),Ee=Ce>0?B.revenue/Ce*100:0;return e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-xl hover:bg-slate-100 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0 ${V===0?"bg-yellow-400 text-yellow-900":V===1?"bg-slate-300 text-slate-700":V===2?"bg-amber-600 text-white":"bg-blue-100 text-blue-700"}`,children:V+1}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-sm font-medium text-slate-700 block truncate",children:B.source}),e.jsx("div",{className:"w-full bg-slate-200 rounded-full h-1.5 mt-1",children:e.jsx("div",{className:"bg-blue-500 h-1.5 rounded-full transition-all",style:{width:`${Math.max(Ee,2)}%`}})})]})]}),e.jsxs("div",{className:"text-right flex-shrink-0 ml-3",children:[e.jsx("div",{className:"font-bold text-blue-600",children:pt(B.revenue)}),e.jsxs("div",{className:"text-xs text-slate-500",children:[B.orderCount," siparis (",Ee.toFixed(1),"%)"]})]})]},B.source)}),be.length>0&&e.jsxs("div",{className:"flex items-center justify-between p-3 bg-blue-50 rounded-xl border border-blue-200 mt-3",children:[e.jsx("span",{className:"font-medium text-blue-800",children:"Toplam"}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"font-bold text-blue-600",children:pt(be.reduce((B,V)=>B+V.revenue,0))}),e.jsxs("div",{className:"text-xs text-blue-700",children:[be.reduce((B,V)=>B+V.orderCount,0)," siparis"]})]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-white rounded-xl p-4 border border-slate-200 shadow-sm",children:[e.jsxs("h3",{className:"text-lg font-bold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Si,{className:"w-5 h-5 text-slate-600"}),"Cihaz Dagilimi"]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Si,{className:"w-5 h-5 text-blue-600"}),e.jsx("span",{classN
1010ame:"text-slate-700",children:"Masaustu"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-24 h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-blue-500 rounded-full",style:{width:`${((t==null?void 0:t.deviceBreakdown.desktop)||0)/((t==null?void 0:t.totalActive)||1)*100}%`}})}),e.jsx("span",{className:"font-bold text-slate-900 w-8 text-right",children:(t==null?void 0:t.deviceBreakdown.desktop)||0})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Id,{className:"w-5 h-5 text-green-600"}),e.jsx("span",{className:"text-slate-700",children:"Mobil"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-24 h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${((t==null?void 0:t.deviceBreakdown.mobile)||0)/((t==null?void 0:t.totalActive)||1)*100}%`}})}),e.jsx("span",{className:"font-bold text-slate-900 w-8 text-right",children:(t==null?void 0:t.deviceBreakdown.mobile)||0})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(dx,{className:"w-5 h-5 text-orange-600"}),e.jsx("span",{className:"text-slate-700",children:"Tablet"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-24 h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-orange-500 rounded-full",style:{width:`${((t==null?void 0:t.deviceBreakdown.tablet)||0)/((t==null?void 0:t.totalActive)||1)*100}%`}})}),e.jsx("span",{className:"font-bold text-slate-900 w-8 text-right",children:(t==null?void 0:t.deviceBreakdown.tablet)||0})]})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-4 border border-slate-200 shadow-sm",children:[e.jsxs("h3",{className:"text-lg font-bold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(ja,{className:"w-5 h-5 text-green-600"}),"Canli Aktiviteler"]}),e.jsx("div",{className:"space-y-2",children:(t==null?void 0:t.actionBreakdown)&&Object.entries(t.actionBreakdown).sort(([,B],[,V])=>V-B).slice(0,5).map(([B,V])=>{const Ce=ft(B),Ee=Ce.icon;return e.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-slate-50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${Ce.color}`}),e.jsx(Ee,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{className:"text-sm text-slate-700",children:Ce.label})]}),e.jsx("span",{className:"font-bold text-slate-900",children:V})]},B)})})]})]})]})}),u==="users"&&e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden",children:[e.jsx("div",{className:"px-3 py-2 sm:px-4 sm:py-2.5 border-b border-slate-200 bg-slate-50",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-1.5",children:[e.jsxs("h3",{className:"text-sm font-bold text-slate-900 flex items-center gap-2",children:[e.jsx(mt,{className:"w-4 h-4 text-blue-600"}),"Aktif Kullanicilar"]}),e.jsxs("div",{className:"flex items-center gap-3 sm:gap-4 text-xs sm:text-sm",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-600",children:[e.jsx(Fr,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),Object.keys((t==null?void 0:t.countryBreakdown)||{}).length," ulke"]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-600",children:[e.jsx(wt,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),Object.keys((t==null?void 0:t.pageBreakdown)||{}).length," sayfa"]})]})]})}),e.jsx("div",{className:"max-h-[600px] overflow-y-auto",children:(t==null?void 0:t.users.length)===0?e.jsxs("div",{className:"p-8 sm:p-12 text-center",children:[e.jsx(mt,{className:"w-12 h-12 sm:w-16 sm:h-16 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-500 text-base sm:text-lg",children:"Su anda aktif kullanici yok"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50 sticky top-0",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Kullanici"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Aktivite"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Platform / Paket"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Kaynak"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Cihaz"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Konum"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"IP Adresi"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Son Islem"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Sohbet"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:t==null?void 0:t.users.map(B=>{var Ee;const V=tf.has(B.current_page)?Nx.smm_panel:ft(B.current_action),Ce=V.icon;return e.jsxs("tr",{className:"hover:bg-slate-50 cursor-pointer transition-colors",onClick:()=>
1010{B.is_authenticated&&B.user_id?v(B.user_id):w(B)},children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-9 h-9 rounded-full flex items-center justify-center ${B.is_authenticated?"bg-green-100":"bg-slate-100"}`,children:B.is_authenticated?e.jsx(Xr,{className:"w-4 h-4 text-green-600"}):e.jsx(di,{className:"w-4 h-4 text-slate-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:B.user_name||((Ee=B.user_email)==null?void 0:Ee.split("@")[0])||"Misafir"}),B.user_email&&e.jsx("p",{className:"text-xs text-slate-500",children:B.user_email})]})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium text-white ${V.color}`,children:[e.jsx(Ce,{className:"w-3 h-3"}),V.label]})}),e.jsx("td",{className:"px-4 py-3",children:B.platform?e.jsxs("div",{className:"max-w-[160px]",children:[e.jsx("p",{className:"text-xs font-semibold text-slate-800 truncate",children:B.platform}),e.jsx("p",{className:"text-[11px] text-slate-500 truncate",children:B.package_name||B.service_type||""})]}):e.jsx("span",{className:"text-xs text-slate-400",children:"-"})}),e.jsx("td",{className:"px-4 py-3",children:(()=>{const Oe=ot(B.referrer);return e.jsxs("div",{className:"flex items-center gap-1.5 max-w-[140px]",title:Oe.full,children:[B.referrer?e.jsx(Gs,{className:"w-3 h-3 text-slate-400 flex-shrink-0"}):null,e.jsx("span",{className:`text-xs truncate ${B.referrer?"text-blue-600":"text-slate-500"}`,children:Oe.short})]})})()}),e.jsxs("td",{className:"px-4 py-3",children:[B.device_type==="desktop"&&e.jsx(Si,{className:"w-4 h-4 text-slate-500"}),B.device_type==="mobile"&&e.jsx(Id,{className:"w-4 h-4 text-slate-500"}),B.device_type==="tablet"&&e.jsx(dx,{className:"w-4 h-4 text-slate-500"})]}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(dt,{country:B.country,size:"md"}),e.jsx("span",{className:"text-xs text-slate-500",children:B.country||"-"})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"text-xs font-mono text-slate-600 bg-slate-100 px-2 py-1 rounded",children:B.ip_address||"-"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"text-xs text-slate-500",children:Me(B.last_heartbeat)})}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsxs("button",{onClick:Oe=>{Oe.stopPropagation(),b(B)},className:`relative p-2 text-white rounded-lg transition-all shadow-md hover:shadow-lg hover:scale-105 ${I.has(B.session_id)?"bg-gradient-to-r from-amber-400 to-yellow-500 shadow-amber-400/30 hover:from-amber-500 hover:to-yellow-600 hover:shadow-amber-500/40":"bg-gradient-to-r from-blue-500 to-cyan-500 shadow-blue-500/30 hover:from-blue-600 hover:to-cyan-600 hover:shadow-blue-500/40"}`,title:"Canli Sohbet Baslat",children:[e.jsx(Ls,{className:"w-4 h-4"}),P[B.session_id]>0&&e.jsx("span",{className:"absolute -top-1.5 -right-1.5 min-w-[18px] h-[18px] bg-red-500 text-white text-[10px] font-bold rounded-full flex items-center justify-center px-1 animate-pulse shadow-lg",children:P[B.session_id]})]})})]},B.session_id)})})]})}),e.jsx("div",{className:"lg:hidden divide-y divide-slate-100",children:t==null?void 0:t.users.map(B=>{var Oe;const V=tf.has(B.current_page)?Nx.smm_panel:ft(B.current_action),Ce=V.icon,Ee=ot(B.referrer);return e.jsx("div",{className:"p-3 hover:bg-slate-50 active:bg-slate-100 cursor-pointer transition-colors",onClick:()=>{B.is_authenticated&&B.user_id?v(B.user_id):w(B)},children:e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:`w-9 h-9 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5 ${B.is_authenticated?"bg-green-100":"bg-slate-100"}`,children:B.is_authenticated?e.jsx(Xr,{className:"w-4 h-4 text-green-600"}):e.jsx(di,{className:"w-4 h-4 text-slate-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"font-semibold text-slate-900 text-sm truncate",children:B.user_name||((Oe=B.user_email)==null?void 0:Oe.split("@")[0])||"Misafir"}),e.jsxs("button",{onClick:xt=>{xt.stopPropagation(),b(B)},className:`relative p-1.5 text-white rounded-lg transition-all shadow-md flex-shrink-0 ${I.has(B.session_id)?"bg-gradient-to-r from-amber-400 to-yellow-500":"bg-gradient-to-r from-blue-500 to-cyan-500"}`,children:[e.jsx(Ls,{className:"w-3.5 h-3.5"}),P[B.session_id]>0&&e.jsx("span",{className:"absolute -top-1 -right-1 min-w-[16px] h-[16px] bg-red-500 text-white text-[9px] font-bold rounded-full flex items-center justify-center px-1 animate-pulse",children:P[B.session_id]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 mt-1",children:[e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium text-white ${V.color}`,children:[e.jsx(Ce,{className:"w-2.5 h-2.5"}),V.label]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(dt,{country:B.country,size:"sm"}),e.jsx("span",{className:"text-[10px] text-slate-500",children:B.country||"-"})]}),B.device_type==="desktop"&&e.jsx(Si,{className:"w-3 h-3 text-slate-400"}),B.device_type==="mobile"&&e.jsx(Id,{className:"w-3 h-3 text-slate-400"}),B.device_type==="tablet"&&e.jsx(dx,{className:"w-3 h-3 text-slate-400"})]}),B.platform&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5 bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-100 rounded-lg px-2.5 py-1.5",children:[e.jsx(us,{className:"w-3.5 h-3.5 text-blue-500 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-[11px] font-bold text-blue-700 block truncate",children:B.platform}),(B.service_type||B.package_name)&&e.jsx("span",{className:"text-[10px] text-blue-500 block truncate",children:B.package_name||B.service_type||""})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 mt-1.5 text-[10px] text-slate-500",children:[e.jsx("span",{className:"font-mono bg-slate-100 px-1.5 py-0.5 rounded",children:B.ip_address||"-"}),e.jsx("span",{children:Me(B.last_heartbeat)}),B.referrer&&e.jsxs("span",{className:"flex items-center gap-1 text-blue-600 truncate max-w-[120px]",children:[e.jsx(Gs,{className:"w-2.5 h-2.5 flex-shrink-0"}),Ee.short]})]})]})]})},B.session_id)})})]})})]}),g&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",onClick:()=>w(null),children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-md w-full",onClick:B=>B.stopPropagation(),children:[e.jsx("div",{className:"p-6 border-b border-slate-200",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Kullanici Detayi"}),e.jsx("button",{onClick:()=>w(null),className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx("span",{className:"text-slate-400 text-xl",children:"Ã"})})]})}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`w-16 h-16 rounded-2xl flex items-center justify-center ${g.is_authenticated?"bg-green-100":"bg-slate-100"}`,children:g.is_authenticated?e.jsx(Xr,{className:"w-8 h-8 text-green-600"}):e.jsx(di,{className:"w-8 h-8 text-slate-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xl font-bold text-slate-900",children:g.user_name||((hs=g.user_email)==null?void 0:hs.split("@")[0])||"Misafir"}),e.jsx("p",{className:"text-sm text-slate-500",children:g.is_authenticated?"Kayitli Uye":"Ziyaretci"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"E-posta"}),e.jsx("p",{className:"text-sm font-medium text-slate-900",children:g.user_email||"-"})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"IP Adresi"}),e.jsx("p",{className:"text-sm font-medium text-slate-900 font-mono",children:g.ip_address})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Cihaz"}),e.jsx("p",{className:"text-sm font-medium text-slate-900 capitalize",children:g.device_type})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Ulke"}),e.jsxs("p",{className:"text-sm font-medium text-slate-900 flex items-center gap-2",children:[e.jsx(dt,{country:g.country,size:"md"}),g.country||"Bilinmiyor"]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Mevcut Sayfa"}),e.jsx("p",{className:"text-sm font-medium text-slate-900",children:pe(g.current_page)})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Aktivite"}),e.jsx("p",{className:"text-sm font-medium text-slate-900",children:ft(g.current_action).label})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Son Aktivite"}),e.jsx("p",{className:"text-sm font-medium text-slate-900",children:Me(g.last_heartbeat)})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Yonlendiren Kaynak"}),g.referrer?e.jsxs("a",{href:g.referrer,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-blue-600 hover:underline flex items-center gap-1 break-all",children:[ot(g.referrer).short,e.jsx(Gs,{className:"w-3 h-3 flex-shrink-0"})]}):e.jsx("p",{className:"text-sm font-medium text-slate-600",children:"Direkt erisim"})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Oturum ID"}),e.jsx("p",{className:"text-xs text-slate-600 font-mono break-all",children:g.session_id})]})]})]})}),j&&T&&e.jsx(c5,{user:j,adminId:T,onClose:()=>{b(null),it()},onMessageSent:()=>{Z(B=>new Set([...B,j.session_id])),it()}}),N&&e.jsx(to,{userId:N,onClose:()=>v(null),onRefresh:()=>{}}),O&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-2 sm:p-4",onClick:()=>fe(!1),children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-4xl w-full max-h-[90vh] sm:max-h-[85vh] overflow-hidden",onClick:B=>B.stopPropagation(),children:[e.jsx("div",{className:"p-3 sm:p-5 border-b border-slate-200 bg-gradient-to-r from-red-500 to-orange-500",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(Fs,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-lg sm:text-xl font-bold text-white",children:"Provider Bekleyen Siparisler"}),e.jsxs("p",{className:"text-red-100 text-xs sm:text-sm",children:[se.length," siparis providera gonderilmeyi bekliyor"]})]})]}
1010),e.jsxs("div",{className:"flex items-center gap-2 self-end sm:self-auto",children:[e.jsxs("button",{onClick:()=>{Le()},disabled:ee,className:"flex items-center gap-2 px-3 sm:px-4 py-2 bg-white/20 hover:bg-white/30 rounded-lg text-white font-medium transition-colors disabled:opacity-50 text-sm",children:[ee?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(As,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden xs:inline",children:"Tumu"})," Gonder"]}),e.jsx("button",{onClick:ce,disabled:$,className:"p-2 bg-white/20 hover:bg-white/30 rounded-lg transition-colors",children:e.jsx(Ve,{className:`w-5 h-5 text-white ${$?"animate-spin":""}`})}),e.jsx("button",{onClick:()=>fe(!1),className:"p-2 bg-white/20 hover:bg-white/30 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-white"})})]})]})}),e.jsx("div",{className:"p-3 sm:p-4 bg-slate-50 border-b border-slate-200",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[e.jsxs("div",{className:"text-center px-3 sm:px-4 py-2 bg-white rounded-xl border border-slate-200 flex-shrink-0",children:[e.jsxs("div",{className:"text-lg sm:text-xl font-bold text-slate-900 font-mono",children:[Math.floor(H/60).toString().padStart(2,"0"),":",(H%60).toString().padStart(2,"0")]}),e.jsx("div",{className:"text-xs text-slate-500",children:"Otomatik Kontrol"})]}),e.jsx("div",{className:"text-xs sm:text-sm text-slate-600",children:"5 dakikada bir otomatik olarak kontrol edilir ve providera gonderilir"})]}),he&&e.jsxs("div",{className:"text-xs sm:text-sm text-slate-600 bg-white px-3 py-2 rounded-lg border border-slate-200",children:["Son: ",he.timestamp.toLocaleTimeString("tr-TR")," -",e.jsxs("span",{className:"text-emerald-600 font-medium ml-1",children:[he.succeeded," basarili"]}),he.failed>0&&e.jsxs("span",{className:"text-red-600 font-medium ml-1",children:[", ",he.failed," basarisiz"]})]})]})}),e.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-180px)] sm:max-h-[calc(85vh-200px)]",children:$?e.jsx("div",{className:"flex items-center justify-center py-12 sm:py-16",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Ne,{className:"w-8 h-8 sm:w-10 sm:h-10 text-red-500 animate-spin mx-auto mb-3"}),e.jsx("p",{className:"text-slate-500 text-sm sm:text-base",children:"Siparisler yukleniyor..."})]})}):se.length===0?e.jsx("div",{className:"flex items-center justify-center py-12 sm:py-16",children:e.jsxs("div",{className:"text-center px-4",children:[e.jsx(hl,{className:"w-12 h-12 sm:w-16 sm:h-16 text-green-500 mx-auto mb-4"}),e.jsx("p",{className:"text-lg sm:text-xl font-semibold text-slate-700 mb-2",children:"Tum Siparisler Tamamlandi"}),e.jsx("p",{className:"text-slate-500 text-sm sm:text-base",children:"Provider gonderimi bekleyen siparis bulunmuyor"})]})}):e.jsx("div",{className:"divide-y divide-slate-100",children:se.map(B=>e.jsx("div",{className:"p-3 sm:p-4 hover:bg-slate-50 transition-colors",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3 sm:gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:gap-2 mb-2",children:[e.jsxs("span",{className:"font-mono text-xs sm:text-sm font-semibold text-slate-800 break-all",children:["#",B.order_number]}),e.jsx("span",{className:`px-1.5 sm:px-2 py-0.5 rounded-full text-[10px] sm:text-xs font-medium whitespace-nowrap ${B.status==="paid"?"bg-green-100 text-green-700":B.status==="pending"?"bg-yellow-100 text-yellow-700":B.status==="processing"?"bg-blue-100 text-blue-700":"bg-slate-100 text-slate-700"}`,children:B.status==="paid"?"Odendi":B.status==="pending"?"Bekliyor":B.status==="processing"?"Isleniyor":B.status}),e.jsx("span",{className:`px-1.5 sm:px-2 py-0.5 rounded-full text-[10px] sm:text-xs font-medium whitespace-nowrap ${B.provider_status==="failed"?"bg-orange-100 text-orange-700":"bg-red-100 text-red-700"}`,children:B.provider_status==="failed"?"Provider Hatasi":"Hic Gonderilmedi"})]}),B.api_error?e.jsxs("div",{className:"mb-2 px-2 py-1 bg-red-50 border border-red-200 rounded text-[10px] sm:text-xs text-red-600 break-words",children:["Hata: ",B.api_error]}):e.jsx("div",{className:"mb-2 px-2 py-1 bg-amber-50 border border-amber-200 rounded text-[10px] sm:text-xs text-amber-700 break-words",children:B.service_id?B.status==="pending"?"Sebep: Odeme henuz onaylanmadi":"Sebep: Provider'a gonderim bekliyor - sonraki otomatik kontrolde gonderilecek":"Sebep: Servis ID bulunamadi"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 text-xs sm:text-sm text-slate-600 mb-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium text-slate-700",children:B.platform}),e.jsx("span",{className:"text-slate-400",children:"/"}),e.jsx("span",{children:B.service_type})]}),e.jsxs("span",{className:"text-[10px] sm:text-xs text-slate-400",children:["Service ID: ",B.service_id]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs sm:text-sm",children:[e.jsxs("span",{className:"text-slate-500 truncate max-w-[150px] sm:max-w-none",children:["@",B.username]}),B.link&&e.jsxs("a",{href:B.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline flex items-center gap-1",children:[e.jsx(Gs,{className:"w-3 h-3"}),"Link"]})]}),e.jsxs("div",{className:"mt-2 text-[10px] sm:text-xs text-slate-500 flex flex-wrap items-center gap-1",children:[e.jsx("span",{className:"truncate max-w-[150px] sm:max-w-none",children:B.email}),e.jsx("span",{className:"mx-1 sm:mx-2",children:"|"}),e.jsx("span",{children:new Date(B.created_at).toLocaleDateString("tr-TR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})})]})]}),e.jsxs("div",{className:"flex sm:flex-col items-center sm:items-end justify-between sm:justify-start gap-2 sm:gap-0 flex-shrink-0 pt-2 sm:pt-0 border-t sm:border-t-0 border-slate-100",children:[e.jsx("div",{className:"text-base sm:text-lg font-bold text-slate-900",children:pt(B.price)}),e.jsxs("div",{className:"text-xs sm:text-sm text-slate-500",children:[B.quantity.toLocaleStr
1010ing()," adet"]})]})]})},B.id))})})]})}),M&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",onClick:()=>F(!1),children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-4xl w-full max-h-[85vh] overflow-hidden",onClick:B=>B.stopPropagation(),children:[e.jsx("div",{className:"p-5 border-b border-slate-200 bg-gradient-to-r from-orange-500 to-amber-500",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(us,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Aktif Siparisler"}),e.jsxs("p",{className:"text-orange-100 text-sm",children:[R.length," aktif siparis"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:ke,disabled:re,className:"p-2 bg-white/20 hover:bg-white/30 rounded-lg transition-colors",children:e.jsx(Ve,{className:`w-5 h-5 text-white ${re?"animate-spin":""}`})}),e.jsx("button",{onClick:()=>F(!1),className:"p-2 bg-white/20 hover:bg-white/30 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-white"})})]})]})}),e.jsx("div",{className:"overflow-y-auto max-h-[calc(85vh-100px)]",children:re?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Ne,{className:"w-10 h-10 text-orange-500 animate-spin mx-auto mb-3"}),e.jsx("p",{className:"text-slate-500",children:"Siparisler yukleniyor..."})]})}):R.length===0?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsxs("div",{className:"text-center",children:[e.jsx(hl,{className:"w-16 h-16 text-green-500 mx-auto mb-4"}),e.jsx("p",{className:"text-xl font-semibold text-slate-700 mb-2",children:"Tum siparisler tamamlandi"}),e.jsx("p",{className:"text-slate-500",children:"Su anda bekleyen veya islenen siparis yok"})]})}):e.jsx("div",{className:"divide-y divide-slate-100",children:R.map(B=>e.jsx("div",{className:"p-4 hover:bg-slate-50 transition-colors",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsxs("span",{className:"font-mono text-sm font-semibold text-slate-800",children:["#",B.order_number]}),e.jsxs("span",{className:`px-2 py-0.5 rounded-full text-xs font-medium ${B.status==="pending"?"bg-yellow-100 text-yellow-700":B.status==="processing"?"bg-blue-100 text-blue-700":B.status==="in_progress"?"bg-cyan-100 text-cyan-700":B.status==="partial"?"bg-orange-100 text-orange-700":"bg-slate-100 text-slate-700"}`,children:[B.status==="pending"&&e.jsx(Ar,{className:"w-3 h-3 inline mr-1"}),B.status==="processing"&&e.jsx(Ne,{className:"w-3 h-3 inline mr-1 animate-spin"}),B.status==="in_progress"&&e.jsx(zs,{className:"w-3 h-3 inline mr-1"}),B.status==="partial"&&e.jsx(nt,{className:"w-3 h-3 inline mr-1"}),B.status==="pending"?"Bekliyor":B.status==="processing"?"Isleniyor":B.status==="in_progress"?"Devam Ediyor":B.status==="partial"?"Kismi":B.status]}),B.provider_status&&e.jsxs("span",{className:"px-2 py-0.5 rounded-full text-xs bg-slate-100 text-slate-600",children:["API: ",B.provider_status]}),B.provider_order_id&&e.jsxs("span",{className:"px-2 py-0.5 rounded-full text-xs bg-emerald-100 text-emerald-700 font-mono",children:["ID: ",B.provider_order_id]})]}),e.jsx("div",{className:"flex items-center gap-4 text-sm text-slate-600 mb-2",children:e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium text-slate-700",children:B.platform}),e.jsx("span",{className:"text-slate-400",children:"/"}),e.jsx("span",{children:B.service_type})]})}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsxs("span",{className:"text-slate-500",children:["@",B.username]}),B.link&&e.jsxs("a",{href:B.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline flex items-center gap-1",children:[e.jsx(Gs,{className:"w-3 h-3"}),"Link"]})]}),B.user&&e.jsxs("div",{className:"mt-2 text-xs text-slate-500",children:[e.jsx("span",{className:"font-medium",children:B.user.full_name}),e.jsx("span",{className:"mx-1",children:"-"}),e.jsx("span",{children:B.user.email})]})]}),e.jsxs("div",{className:"text-right flex-shrink-0",children:[e.jsx("div",{className:"text-lg font-bold text-slate-900",children:pt(B.price)}),e.jsxs("div",{className:"text-sm text-slate-500",children:[B.quantity.toLocaleStr
1010ing()," adet"]}),e.jsx("div",{className:"text-xs text-slate-400 mt-1",children:new Date(B.created_at).toLocaleDateString("tr-TR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})})]})]})},B.id))})})]})}),oe&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",onClick:()=>ue(!1),children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-4xl w-full max-h-[85vh] overflow-hidden",onClick:B=>B.stopPropagation(),children:[e.jsx("div",{className:"p-5 border-b border-slate-200 bg-gradient-to-r from-green-500 to-emerald-500",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(Ws,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Bugunun Siparisleri"}),e.jsxs("p",{className:"text-green-100 text-sm",children:[K.length," siparis"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:Xe,disabled:je,className:"p-2 bg-white/20 hover:bg-white/30 rounded-lg transition-colors",children:e.jsx(Ve,{className:`w-5 h-5 text-white ${je?"animate-spin":""}`})}),e.jsx("button",{onClick:()=>ue(!1),className:"p-2 bg-white/20 hover:bg-white/30 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-white"})})]})]})}),e.jsx("div",{className:"overflow-y-auto max-h-[calc(85vh-100px)]",children:je?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Ne,{className:"w-10 h-10 text-green-500 animate-spin mx-auto mb-3"}),e.jsx("p",{className:"text-slate-500",children:"Siparisler yukleniyor..."})]})}):K.length===0?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Ws,{className:"w-16 h-16 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-xl font-semibold text-slate-700 mb-2",children:"Bugun siparis yok"}),e.jsx("p",{className:"text-slate-500",children:"Henuz bugun bir siparis alinmadi"})]})}):e.jsx("div",{className:"divide-y divide-slate-100",children:K.map(B=>e.jsx("div",{className:"p-4 hover:bg-slate-50 transition-colors",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsxs("span",{className:"font-mono text-sm font-semibold text-slate-800",children:["#",B.order_number]}),e.jsxs("span",{className:`px-2 py-0.5 rounded-full text-xs font-medium ${B.status==="pending"?"bg-yellow-100 text-yellow-700":B.status==="paid"?"bg-blue-100 text-blue-700":B.status==="processing"?"bg-cyan-100 text-cyan-700":B.status==="in_progress"?"bg-teal-100 text-teal-700":B.status==="completed"?"bg-green-100 text-green-700":B.status==="partial"?"bg-orange-100 text-orange-700":B.status==="refunded"||B.status==="canceled"||B.status==="cancelled"?"bg-red-100 text-red-700":"bg-slate-100 text-slate-700"}`,children:[B.status==="pending"&&e.jsx(Ar,{className:"w-3 h-3 inline mr-1"}),B.status==="paid"&&e.jsx(hl,{className:"w-3 h-3 inline mr-1"}),B.status==="processing"&&e.jsx(Ne,{className:"w-3 h-3 inline mr-1 animate-spin"}),B.status==="in_progress"&&e.jsx(zs,{className:"w-3 h-3 inline mr-1"}),B.status==="completed"&&e.jsx(hl,{className:"w-3 h-3 inline mr-1"}),B.status==="partial"&&e.jsx(nt,{className:"w-3 h-3 inline mr-1"}),B.status==="pending"?"Bekliyor":B.status==="paid"?"Odendi":B.status==="processing"?"Isleniyor":B.status==="in_progress"?"Devam Ediyor":B.status==="completed"?"Tamamlandi":B.status==="partial"?"Kismi":B.status==="refunded"?"Iade Edildi":B.status==="canceled"||B.status==="cancelled"?"Iptal":B.status]}),B.provider_status&&e.jsxs("span",{className:"px-2 py-0.5 rounded-full text-xs bg-slate-100 text-slate-600",children:["API: ",B.provider_status]})]}),e.jsx("div",{className:"flex items-center gap-4 text-sm text-slate-600 mb-2",children:e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"font-medium text-slate-700",children:B.platform}),e.jsx("span",{className:"text-slate-400",children:"/"}),e.jsx("span",{children:B.service_type})]})}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsxs("span",{className:"text-slate-500",children:["@",B.username]}),B.link&&e.jsxs("a",{href:B.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline flex items-center gap-1",children:[e.jsx(Gs,{className:"w-3 h-3"}),"Link"]})]}),B.user&&e.jsxs("div",{className:"mt-2 text-xs text-slate-500",children:[e.jsx("span",{className:"font-medium",children:B.user.full_name}),e.jsx("span",{className:"mx-1",children:"-"}),e.jsx("span",{children:B.user.email})]})]}),e.jsxs("div",{className:"text-right flex-shrink-0",children:[e.jsx("div",{className:"text-lg font-bold text-slate-900",children:pt(B.price)}),e.jsxs("div",{className:"text-sm text-slate-500",children:[B.quantity.toLocaleStr
1010ing()," adet"]}),e.jsx("div",{className:"text-xs text-slate-400 mt-1",children:new Date(B.created_at).toLocaleDateString("tr-TR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})})]})]})},B.id))})})]})})]})}const h5=t=>{switch(t){case"paypal":return Nt;case"stripe":return Nt;case"crypto":return gn;case"payoup":return Td;case"glodipay":return wt;case"finby":return Nt;default:return Nt}},p5=t=>{switch(t){case"paypal":return"from-blue-500 to-blue-600";case"stripe":return"from-violet-500 to-violet-600";case"crypto":return"from-orange-500 to-amber-500";case"payoup":return"from-sky-500 to-cyan-600";case"glodipay":return"from-teal-500 to-emerald-600";case"finby":return"from-rose-500 to-red-600";default:return"from-slate-500 to-slate-600"}};function f5(){const[t,s]=o.useState([]),[a,r]=o.useState({wallet_loading_enabled:"true",checkout_enabled:"true",minimum_checkout_amount:"1",maximum_checkout_amount:"10000",minimum_wallet_deposit:"5",maximum_wallet_deposit:"10000"}),[l,n]=o.useState(!0),[i,c]=o.useState(null),[d,x]=o.use
1010State(null),[m,h]=o.useState(null),[f,y]=o.useState(null),[g,w]=o.useState({}),[N,v]=o.useState({}),[j,b]=o.useState({}),[p,E]=o.useState(null),[C,S]=o.useState({item_name:"",item_description:"",soft_descriptor:"",brand_name:"",shipping_preference:"NO_SHIPPING"}),[k,J]=o.useState({item_name:"",item_description:"",statement_descriptor:"",brand_name:""}),[u,A]=o.useState({currency:"TRY",brand_name:""}),[T,ae]=o.useState({currency:"USD",brand_name:""}),[P,z]=o.useState({currency:"EUR"}),I=o.useCallback(async()=>{var K;try{n(!0),x(null);const q=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_payment_providers",{method:"POST"}),je=await q.json();if(!q.ok)throw new Error(je.error||"Failed to fetch providers");s(je.providers||[]),r(se=>({...se,...je.settings}));const we={};(K=je.providers)==null||K.forEach(se=>{we[se.id]={},Object.keys(se.credentials||{}).forEach(Se=>{we[se.id][Se]=""}),se.provider_code==="paypal"&&se.settings&&S({item_name:se.settings.item_name||"Digital Consulting",item_description:se.settings.item_description||"Online digital marketing and Digital Consulting",soft_descriptor:se.settings.soft_descriptor||"IGTAKELTD",brand_name:se.settings.brand_name||"IG TAKE LTD Services",shipping_preference:se.settings.shipping_preference||"NO_SHIPPING"}),se.provider_code==="stripe"&&se.settings&&J({item_name:se.settings.item_name||"Digital Consulting",item_description:se.settings.item_description||"Online digital marketing and consulting services",statement_descriptor:se.settings.statement_descriptor||"IGTAKELTD",brand_name:se.settings.brand_name||"IG TAKE LTD Services"}),se.provider_code==="payoup"&&se.settings&&A({currency:se.settings.currency||"TRY",brand_name:se.settings.brand_name||"Follx"}),se.provider_code==="glodipay"&&se.settings&&ae({currency:se.settings.currency||"USD",brand_name:se.settings.brand_name||"Follx"}),se.provider_code==="finby"&&se.settings&&z({currency:se.settings.currency||"EUR"})}),v(we)}catch(q){console.error("Error fetching providers:",q),x(q.message||"Failed to load payment providers")}finally{n(!1)}},[]);o.useEffect(()=>{I()},[I]);const Z=async(K,q,je)=>{try{c(K),x(null),h(null);const we=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_payment_provider",{method:"POST",body:JSON.stringify({provider_id:K,updates:q,credentials_update:je})}),se=await we.json();if(!we.ok)throw new Error(se.error||"Failed to update provider");s(Se=>Se.map($=>$.id===K?{...$,...se.provider}:$)),je&&v(Se=>({...Se,[K]:Object.fromEntries(Object.keys(Se[K]||{}).map($=>[$,""]))})),h(`${se.provider.display_name} updated successfully`),setTimeout(()=>h(null),3e3)}catch(we){console.error("Error updating provider:",we),x(we.message||"Failed to update provider")}finally{c(null)}},Q=async(K,q)=>{try{c(K),x(null);const je=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_payment_setting",{method:"POST",body:JSON.stringify({key:K,value:q})}),we=await je.json();if(!je.ok)throw new Error(we.error||"Failed to update setting");r(se=>({...se,...we.settings})),h("Setting updated successfully"),setTimeout(()=>h(null),3e3)}catch(je){console.error("Error updating setting:",je),x(je.message||"Failed to update setting")}finally{c(null)}},_=async K=>{try{c("paypal-settings"),x(null);const q=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_payment_provider",{method:"POST",body:JSON.stringify({provider_id:K,settings_update:C})}),je=await q.json();if(!q.ok)throw new Error(je.error||"Failed to update settings");s(we=>we.map(se=>se.id===K?{...se,settings:{...se.settings,...C}}:se)),h("PayPal display settings updated successfully"),setTimeout(()=>h(null),3e3)}catch(q){console.error("Error updating PayPal settings:",q),x(q.message||"Failed to update settings")}finally{c(null)}},M=async K=>{try{c("stripe-settings"),x(null);const q=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_payment_provider",{method:"POST",body:JSON.stringify({provider_id:K,settings_update:k})}),je=await q.json();if(!q.ok)throw new Error(je.error||"Failed to update settings");s(we=>we.map(se=>se.id===K?{...se,settings:{...se.settings,...k}}:se)),h("Stripe display settings updated successfully"),setTimeout(()=>h(null),3e3)}catch(q){console.error("Error updating Stripe settings:",q),x(q.message||"Failed to update settings")}finally{c(null)}},F=async K=>{try{c("payoup-settings"),x(null);const q=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_payment_provider",{method:"POST",body:JSON.stringify({provider_id:K,settings_update:u})}),je=await q.json();if(!q.ok)throw new Error(je.error||"Failed to update settings");s(we=>we.map(se=>se.id===K?{...se,settings:{...se.settings,...u}}:se)),h("Payoup settings updated successfully"),setTimeout(()=>h(null),3e3)}catch(q){console.error("Error updating Payoup settings:",q),x(q.message||"Failed to update settings")}finally{c(null)}},R=async K=>{try{c("glodipay-settings"),x(null);const q=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_payment_provider",{method:"POST",body:JSON.stringify({provider_id:K,settings_update:T})}),je=await q.json();if(!q.ok)throw new Error(je.error||"Failed to update settings");s(we=>we.map(se=>se.id===K?{...se,settings:{...se.settings,...T}}:se)),h("GlodiPay settings updated successfully"),setTimeout(()=>h(null),3e3)}catch(q){console.error("Error updating GlodiPay settings:",q),x(q.message||"Failed to update settings")}finally{c(null)}},X=async K=>{try{c("finby-settings"),x(null);const q=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_payment_provider",{method:"POST",body:JSON.stringify({provider_id:K,settings_update:P})}),je=await q.json();if(!q.ok)throw new Error(je.error||"Failed to update settings");s(we=>we.map(se=>se.id===K?{...se,settings:{...se.settings,...P}}:se)),h("Finby settings updated successfully"),setTimeout(()=>h(null),3e3)}catch(q){console.error("Error updating Finby settings:",q),x(q.message||"Failed to update settings")}finally{c(null)}},re=async K=>{try{const{data:q,error:je}=await Ye.from("payment_provider_logs").select("*").eq("provider_id",K).order("created_at",{ascending:!1}).limit(20);if(je)throw je;b(we=>({...we,[K]:q||[]}))}catch(q){console.error("Error fetching logs:",q)}},U=K=>{p===K?E(null):(E(K),j[K]||re(K))},oe=(K,q,je,we)=>{var be,Pe;const se=g[`${K.id}-${q}`],Se=((be=N[K.id])==null?void 0:be[q])||"",$=((Pe=K.credentials_masked)==null?void 0:Pe[q])||"",ie=$&&$!=="";return e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700",children:je}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:se?"text":"password",value:Se,onChange:de=>v(H=>({...H,[K.id]:{...H[K.id],[q]:de.target.value}})),placeholder:ie?$:we,className:"w-full px-4 py-2.5 pr-12 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition font-mono text-sm"}),e.jsx("button",{type:"button",onClick:()=>w(de=>({...de,[`${K.id}-${q}`]:!se})),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600",children:se?e.jsx(ur,{className:"w-4 h-4"}):e.jsx(Ct,{className:"w-4 h-4"})})]}),ie&&e.jsxs("p",{className:"text-xs text-green-600 flex items-center gap-1",children:[e.jsx(ne,{className:"w-3 h-3"}),"Configured"]})]},q)},ue=K=>{var Se;const q=h5(K.provider_code),je=p5(K.provider_code),we=f===K.id,se=i===K.id;return e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`p-3 rounded-xl bg-gradient-to-br ${je} shadow-lg`,children:e.jsx(q,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:K.display_name}),e.jsx("p",{className:"text-sm text-slate-500",children:K.description})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:`px-2.5 py-1 rounded-full text-xs font-medium ${K.mode==="live"?"bg-green-100 text-green-700":"bg-amber-100 text-amber-700"}`,children:K.mode==="live"?"Live":"Sandbox"})})]}),e.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"p-4 bg-slate-50 rounded-xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Nt,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{className:"text-sm font-medium text-slate-700",children:"Checkout"})]}),e.jsx("button",{onClick:()=>Z(K.id,{is_checkout_active:!K.is_checkout_active}),disabled:se,className:"focus:outline-none",children:K.is_checkout_active?e.jsx(Qr,{className:"w-8 h-8 text-green-500"}):e.jsx(Kr,{className:"w-8 h-8 text-slate-300"})})]}),e.jsx("p",{className:"text-xs text-slate-500",children:K.is_checkout_active?"Enabled for payments":"Disabled"})]}),e.jsxs("div",{className:"p-4 bg-slate-50 rounded-xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(kt,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{className:"text-sm font-medium text-slate-700",children:"Wallet"})]}),e.jsx("button",{onClick:()=>Z(K.id,{is_wallet_active:!K.is_wallet_active}),disabled:se,className:"focus:outline-none",children:K.is_wallet_active?e.jsx(Qr,{className:"w-8 h-8 text-green-500"}):e.jsx(Kr,{className:"w-8 h-8 text-slate-300"})})]}),e.jsx("p",{className:"text-xs text-slate-500",children:K.is_wallet_active?"Enabled for deposits":"Disabled"})]})]}),e.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>y(we?null:K.id),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-lg transition",children:[e.jsx(tl,{className:"w-4 h-4"}),"Configure",we?e.jsx(Un,{className:"w-4 h-4"}):e.jsx(is,{className:"w-4 h-4"})]}),e.jsxs("button",{onClick:()=>
1010U(K.id),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-lg transition",children:[e.jsx(qi,{className:"w-4 h-4"}),"Logs"]}),!K.has_credentials&&K.provider_code!=="crypto"&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-amber-600",children:[e.jsx(nt,{className:"w-3.5 h-3.5"}),"API credentials required"]})]})]}),we&&e.jsx("div",{className:"border-t border-slate-200 p-6 bg-slate-50",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(wt,{className:"w-4 h-4"}),"Environment Mode"]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("button",{onClick:()=>Z(K.id,{mode:"sandbox"}),disabled:se,className:`flex-1 px-4 py-3 rounded-lg border-2 transition ${K.mode==="sandbox"?"border-amber-500 bg-amber-50 text-amber-700":"border-slate-200 bg-white text-slate-600 hover:border-slate-300"}`,children:[e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx(er,{className:"w-4 h-4"}),e.jsx("span",{className:"font-medium",children:"Sandbox"})]}),e.jsx("p",{className:"text-xs mt-1 opacity-75",children:"Test mode"})]}),e.jsxs("button",{onClick:()=>Z(K.id,{mode:"live"}),disabled:se,className:`flex-1 px-4 py-3 rounded-lg border-2 transition ${K.mode==="live"?"border-green-500 bg-green-50 text-green-700":"border-slate-200 bg-white text-slate-600 hover:border-slate-300"}`,children:[e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx(rt,{className:"w-4 h-4"}),e.jsx("span",{className:"font-medium",children:"Live"})]}),e.jsx("p",{className:"text-xs mt-1 opacity-75",children:"Production mode"})]})]})]}),K.provider_code==="paypal"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx($t,{className:"w-4 h-4"}),"PayPal API Credentials"]}),e.jsxs("div",{className:"space-y-4",children:[oe(K,"client_id","Client ID","Enter PayPal Client ID"),oe(K,"client_secret","Secret Key","Enter PayPal Secret Key"),oe(K,"webhook_id","Webhook ID (Optional)","Enter Webhook ID"),e.jsxs("button",{onClick:()=>{const $=N[K.id];Object.values($).some(be=>be&&be.trim()!=="")&&Z(K.id,void 0,$)},disabled:se||!Object.values(N[K.id]||{}).some($=>$&&$.trim()!==""),className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-blue-600 hover:bg-blue-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[se?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Credentials"]})]})]}),K.provider_code==="paypal"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Td,{className:"w-4 h-4"}),"PayPal Display Settings"]}),e.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"These settings control what customers see during PayPal checkout"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Item Name"}),e.jsx("input",{type:"text",value:C.item_name,onChange:$=>S(ie=>({...ie,item_name:$.target.value})),placeholder:"Digital Consulting",className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Name shown for the item in PayPal"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Item Description"}),e.jsx("input",{type:"text",value:C.item_description,onChange:$=>S(ie=>({...ie,item_description:$.target.value})),placeholder:"Online digital marketing and Digital Consulting",className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Description shown in PayPal checkout"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Soft Descriptor"}),e.jsx("input",{type:"text",value:C.soft_descriptor,onChange:$=>S(ie=>({...ie,soft_descriptor:$.target.value.slice(0,22)})),placeholder:"IGTAKELTD",maxLength:22,className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Appears on customer's bank statement (max 22 chars)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Brand Name"}),e.jsx("input",{type:"text",value:C.brand_name,onChange:$=>S(ie=>({...ie,brand_name:$.target.value})),placeholder:"IG TAKE LTD Services",className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Your business name shown in PayPal"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Shipping Preference"}),e.jsxs("select",{value:C.shipping_preference,onChange:$=>S(ie=>({...ie,shipping_preference:$.target.value})),className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500",children:[e.jsx("option",{value:"NO_SHIPPING",children:"No Shipping (Digital Goods)"}),e.jsx("option",{value:"SET_PROVIDED_ADDRESS",children:"Use Provided Address"}),e.jsx("option",{value:"GET_FROM_FILE",children:"Get from PayPal Profile"})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"How shipping is handled in checkout"})]}),e.jsxs("button",{onClick:()=>_(K.id),disabled:i==="paypal-settings",className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[i==="paypal-settings"?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Display Settings"]})]})]}),K.provider_code==="stripe"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx($t,{className:"w-4 h-4"}),"Stripe API Credentials"]}),e.jsxs("div",{className:"space-y-4",children:[oe(K,"publishable_key","Publishable Key","pk_test_..."),oe(K,"secret_key","Secret Key","sk_test_..."),oe(K,"webhook_secret","Webhook Secret (Optional)","whsec_..."),e.jsxs("button",{onClick:()=>{const $=N[K.id];Object.values($).some(be=>be&&be.trim()!=="")&&Z(K.id,void 0,$)},disabled:se||!Object.values(N[K.id]||{}).some($=>$&&$.trim()!==""),className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-teal-600 hover:bg-teal-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[se?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Credentials"]})]})]}),K.provider_code==="stripe"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Td,{className:"w-4 h-4"}),"Stripe Display Settings"]}),e.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"These settings control what appears in Stripe charges and customer receipts"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Item Name"}),e.jsx("input",{type:"text",value:k.item_name,onChange:$=>J(ie=>({...ie,item_name:$.target.value})),placeholder:"Digital Consulting",className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-teal-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Name shown for the item in Stripe"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Item Description"}),e.jsx("input",{type:"text",value:k.item_description,onChange:$=>J(ie=>({...ie,item_description:$.target.value})),placeholder:"Online digital marketing and consulting services",className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-teal-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Description shown in Stripe receipts"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Statement Descriptor"}),e.jsx("input",{type:"text",value:k.statement_descriptor,onChange:$=>J(ie=>({...ie,statement_descriptor:$.target.value.slice(0,22).toUpperCase()})),placeholder:"IGTAKELTD",maxLength:22,className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-teal-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Appears on customer's bank statement (max 22 chars, letters/numbers only)"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Brand Name"}),e.jsx("input",{type:"text",value:k.brand_name,onChange:$=>J(ie=>({...ie,brand_name:$.target.value})),placeholder:"IG TAKE LTD Services",className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-teal-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Your business name shown in receipts"})]}),e.jsxs("button",{onClick:()=>M(K.id),disabled:i==="stripe-settings",className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[i==="str
1010ipe-settings"?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Display Settings"]})]})]}),K.provider_code==="payoup"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx($t,{className:"w-4 h-4"}),"Payoup API Credentials"]}),e.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"Redirect-based payment gateway supporting TRY, USD, EUR, GBP. Get your API key from Payoup Dashboard > API Integration."}),e.jsxs("div",{className:"space-y-4",children:[oe(K,"api_key","API Key","pk_live_... or pk_test_..."),e.jsxs("button",{onClick:()=>{const $=N[K.id];Object.values($).some(be=>be&&be.trim()!=="")&&Z(K.id,void 0,$)},disabled:se||!Object.values(N[K.id]||{}).some($=>$&&$.trim()!==""),className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-sky-600 hover:bg-sky-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[se?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Credentials"]})]})]}),K.provider_code==="payoup"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Td,{className:"w-4 h-4"}),"Payoup Settings"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Currency"}),e.jsxs("select",{value:u.currency,onChange:$=>A(ie=>({...ie,currency:$.target.value})),className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-sky-500",children:[e.jsx("option",{value:"TRY",children:"TRY - Turkish Lira"}),e.jsx("option",{value:"USD",children:"USD - US Dollar"}),e.jsx("option",{value:"EUR",children:"EUR - Euro"}),e.jsx("option",{value:"GBP",children:"GBP - British Pound"})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Currency used for Payoup transactions"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Brand Name"}),e.jsx("input",{type:"text",value:u.brand_name,onChange:$=>A(ie=>({...ie,brand_name:$.target.value})),placeholder:"Your Business Name",className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-sky-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Your business name shown during checkout"})]}),e.jsxs("button",{onClick:()=>F(K.id),disabled:i==="payoup-settings",className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[i==="payoup-settings"?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Settings"]})]})]}),K.provider_code==="glodipay"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx($t,{className:"w-4 h-4"}),"GlodiPay API Credentials"]}),e.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"RSA signature-based payment gateway. Get your Merchant ID, Private Key, and Public Key from GlodiPay Merchant Dashboard."}),e.jsxs("div",{className:"space-y-4",children:[oe(K,"merchant_id","Merchant ID","Your GlodiPay Merchant ID"),oe(K,"private_key","Private Key (PEM)","-----BEGIN PRIVATE KEY-----..."),oe(K,"public_key","Public Key (PEM)","-----BEGIN PUBLIC KEY-----..."),e.jsxs("button",{onClick:()=>{const $=N[K.id];Object.values($).some(be=>be&&be.trim()!=="")&&Z(K.id,void 0,$)},disabled:se||!Object.values(N[K.id]||{}).some($=>$&&$.trim()!==""),className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-teal-600 hover:bg-teal-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[se?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Credentials"]})]})]}),K.provider_code==="glodipay"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(wt,{className:"w-4 h-4"}),"GlodiPay Settings"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Currency"}),e.jsxs("select",{value:T.currency,onChange:$=>ae(ie=>({...ie,currency:$.target.value})),className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-teal-500",children:[e.jsx("option",{value:"USD",children:"USD - US Dollar"}),e.jsx("option",{value:"EUR",children:"EUR - Euro"}
1010),e.jsx("option",{value:"GBP",children:"GBP - British Pound"}),e.jsx("option",{value:"TRY",children:"TRY - Turkish Lira"})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Currency used for GlodiPay transactions"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Brand Name"}),e.jsx("input",{type:"text",value:T.brand_name,onChange:$=>ae(ie=>({...ie,brand_name:$.target.value})),placeholder:"Your Business Name",className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-teal-500"}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Your business name shown during checkout"})]}),e.jsxs("button",{onClick:()=>R(K.id),disabled:i==="glodipay-settings",className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[i==="glodipay-settings"?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Settings"]})]})]}),K.provider_code==="finby"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx($t,{className:"w-4 h-4"}),"Finby Virtual POS Credentials"]}),e.jsx("p",{className:"text-xs text-slate-500 mb-4",children:"Redirect-based virtual POS card payment gateway. Get your Account ID and Secret Key from your Finby merchant dashboard."}),e.jsxs("div",{className:"space-y-4",children:[oe(K,"account_id","Account ID","Your Finby Account ID (numeric)"),oe(K,"secret_key","Secret Key","Your HMAC secret key"),e.jsxs("button",{onClick:()=>{const $=N[K.id];Object.values($).some(be=>be&&be.trim()!=="")&&Z(K.id,void 0,$)},disabled:se||!Object.values(N[K.id]||{}).some($=>$&&$.trim()!==""),className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-rose-600 hover:bg-rose-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[se?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Credentials"]})]})]}),K.provider_code==="finby"&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Nt,{className:"w-4 h-4"}),"Finby Settings"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Currency"}),e.jsxs("select",{value:P.currency,onChange:$=>z(ie=>({...ie,currency:$.target.value})),className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-rose-500",children:[e.jsx("option",{value:"EUR",children:"EUR - Euro"}),e.jsx("option",{value:"USD",children:"USD - US Dollar"}),e.jsx("option",{value:"GBP",children:"GBP - British Pound"}),e.jsx("option",{value:"TRY",children:"TRY - Turkish Lira"})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Currency used for Finby transactions"})]}),e.jsxs("button",{onClick:()=>X(K.id),disabled:i==="finby-settings",className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 disabled:bg-slate-300 text-white font-medium rounded-lg transition",children:[i==="finby-settings"?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Settings"]})]})]}),K.provider_code==="crypto"&&e.jsx("div",{className:"p-4 bg-white rounded-lg border border-slate-200",children:e.jsxs("p",{className:"text-sm text-slate-600",children:["Cryptocurrency payments use the internal wallet system. Configure crypto wallets in the",e.jsx("span",{className:"font-medium text-slate-900",children:" Crypto Wallets"})," section."]})}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(Jt,{className:"w-4 h-4"}),"Amount Limits"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Min Amount (USD)"}),e.jsx("input",{type:"number",value:K.min_amount,onChange:$=>Z(K.id,{min_amount:parseFloat($.target.value)||1}),className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Max Amount (USD)"}),e.jsx("input",{type:"number",value:K.max_amount,onChange:$=>Z(K.id,{max_amount:parseFloat($.target.value)||1e4}),className:"w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500"})]})]})]})]})}),p===K.id&&e.jsxs("div",{className:"border-t border-slate-200 p-6 bg-white",children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(qi,{className:"w-4 h-4"}),"Change History"]}),(Se=j[K.id])!=null&&Se.length?e.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:j[K.id].map($=>e.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${$.action==="activated"?"bg-green-100 text-green-700":$.action==="deactivated"?"bg-red-100 text-red-700":$.action==="credentials_updated"?"bg-blue-100 text-blue-700":"bg-slate-100 text-slate-700"}`,children:$.action.replace("_"," ")}),e.jsx("span",{className:"text-xs text-slate-500",children:new Date($.created_at).toLocaleStr
1010ing()})]}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["IP: ",$.ip_address]})]},$.id))}):e.jsx("p",{className:"text-sm text-slate-500",children:"No changes recorded yet."})]})]},K.id)};return l?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(Ne,{className:"w-8 h-8 text-blue-600 animate-spin"})}):e.jsxs("div",{className:"space-y-8",children:[d&&e.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-xl flex items-start gap-3",children:[e.jsx(nt,{className:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-red-800",children:"Error"}),e.jsx("p",{className:"text-sm text-red-600",children:d})]})]}),m&&e.jsxs("div",{className:"p-4 bg-green-50 border border-green-200 rounded-xl flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"font-medium text-green-800",children:m})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Payment Modules"}),e.jsx("p",{className:"text-slate-500",children:"Configure payment providers and global settings"})]}),e.jsxs("button",{onClick:I,disabled:l,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 transition",children:[e.jsx(Ve,{className:`w-4 h-4 ${l?"animate-spin":""}`}),"Refresh"]})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-sm p-6",children:[e.jsxs("h3",{className:"text-lg font-bold text-slate-900 mb-6 flex items-center gap-2",children:[e.jsx(lt,{className:"w-5 h-5 text-blue-600"}),"Global Payment Settings"]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"p-5 bg-gradient-to-br from-blue-50 to-cyan-50 rounded-xl border border-blue-100",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-blue-500 rounded-lg",children:e.jsx(Nt,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-slate-900",children:"Checkout Payments"}),e.jsx("p",{className:"text-xs text-slate-500",children:"Enable/disable all checkout payments"})]})]}),e.jsx("button",{onClick:()=>Q("checkout_enabled",a.checkout_enabled==="true"?"false":"true"),disabled:i==="checkout_enabled",className:"focus:outline-none",children:a.checkout_enabled==="true"?e.jsx(Qr,{className:"w-10 h-10 text-green-500"}):e.jsx(Kr,{className:"w-10 h-10 text-slate-300"})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-600 mb-1",children:"Min Amount"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",children:"$"}),e.jsx("input",{type:"number",value:a.minimum_checkout_amount,onChange:K=>r(q=>({...q,minimum_checkout_amount:K.target.value})),onBlur:K=>Q("minimum_checkout_amount",K.target.value),className:"w-full pl-7 pr-3 py-2 bg-white border border-slate-200 rounded-lg text-sm"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-600 mb-1",children:"Max Amount"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",children:"$"}),e.jsx("input",{type:"number",value:a.maximum_checkout_amount,onChange:K=>r(q=>({...q,maximum_checkout_amount:K.target.value})),onBlur:K=>Q("maximum_checkout_amount",K.target.value),className:"w-full pl-7 pr-3 py-2 bg-white border border-slate-200 rounded-lg text-sm"})]})]})]})]}),e.jsxs("div",{className:"p-5 bg-gradient-to-br from-green-50 to-emerald-50 rounded-xl border border-green-100",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-green-500 rounded-lg",children:e.jsx(kt,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-slate-900",children:"Wallet Loading"}),e.jsx("p",{className:"text-xs text-slate-500",children:"Enable/disable wallet deposits"})]})]}),e.jsx("button",{onClick:()=>Q("wallet_loading_enabled",a.wallet_loading_enabled==="true"?"false":"true"),disabled:i==="wallet_loading_enabled",className:"focus:outline-none",children:a.wallet_loading_enabled==="true"?e.jsx(Qr,{className:"w-10 h-10 text-green-500"}):e.jsx(Kr,{className:"w-10 h-10 text-slate-300"})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-600 mb-1",children:"Min Deposit"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",children:"$"}),e.jsx("input",{type:"number",value:a.minimum_wallet_deposit,onChange:K=>r(q=>({...q,minimum_wallet_deposit:K.target.value})),onBlur:K=>Q("minimum_wallet_deposit",K.target.value),className:"w-full pl-7 pr-3 py-2 bg-white border border-slate-200 rounded-lg text-sm"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-600 mb-1",children:"Max Deposit"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",children:"$"}),e.jsx("input",{type:"number",value:a.maximum_wallet_deposit,onChange:K=>r(q=>({...q,maximum_wallet_deposit:K.target.value})),onBlur:K=>Q("maximum_wallet_deposit",K.target.value),className:"w-full pl-7 pr-3 py-2 bg-white border border-slate-200 rounded-lg text-sm"})]})]})]})]})]}),e.jsx("div",{className:"mt-6 p-4 bg-amber-50 border border-amber-200 rounded-xl",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(nt,{className:"w-5 h-5 text-amber-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-amber-800",children:"Important Notes"}),e.jsxs("ul",{className:"text-sm text-amber-700 mt-1 space-y-1",children:[e.jsx("li",{children:"- Disabling checkout/wallet globally affects all users immediately"}),e.jsx("li",{children:"- Existing pending transactions will not be affected"}),e.jsx("li",{children:"- API credentials are securely encrypted and never exposed to frontend"})]})]})]})})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-bold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(ja,{className:"w-5 h-5 text-blue-600"}),"Payment Providers"]}),e.jsx("div",{className:"space-y-4",children:t.map(K=>ue(K))})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-slate-100 rounded-2xl p-6 border border-slate-200",children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-4",children:"Qu
1010ick Reference"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"p-4 bg-white rounded-xl",children:[e.jsx("h4",{className:"font-semibold text-slate-900 mb-2",children:"PayPal Setup"}),e.jsxs("ol",{className:"text-sm text-slate-600 space-y-1",children:[e.jsx("li",{children:"1. Go to developer.paypal.com"}),e.jsx("li",{children:"2. Create a REST API app"}),e.jsx("li",{children:"3. Copy Client ID & Secret"}),e.jsx("li",{children:"4. Configure webhooks (optional)"})]})]}),e.jsxs("div",{className:"p-4 bg-white rounded-xl",children:[e.jsx("h4",{className:"font-semibold text-slate-900 mb-2",children:"Stripe Setup"}),e.jsxs("ol",{className:"text-sm text-slate-600 space-y-1",children:[e.jsx("li",{children:"1. Go to dashboard.stripe.com"}),e.jsx("li",{children:"2. Navigate to API keys"}),e.jsx("li",{children:"3. Copy Publishable & Secret keys"}),e.jsx("li",{children:"4. Setup webhooks in Dashboard"})]})]}),e.jsxs("div",{className:"p-4 bg-white rounded-xl",children:[e.jsx("h4",{className:"font-semibold text-slate-900 mb-2",children:"Payoup Setup"}),e.jsxs("ol",{className:"text-sm text-slate-600 space-y-1",children:[e.jsx("li",{children:"1. Go to payoup.com/dashboard"}),e.jsx("li",{children:"2. Navigate to API Integration"}),e.jsx("li",{children:"3. Copy your API Key"}),e.jsx("li",{children:"4. Test Card: 4242 4242 4242 4242"})]})]}),e.jsxs("div",{className:"p-4 bg-white rounded-xl",children:[e.jsx("h4",{className:"font-semibold text-slate-900 mb-2",children:"Testing Mode"}),e.jsxs("ol",{className:"text-sm text-slate-600 space-y-1",children:[e.jsx("li",{children:"1. Set provider to Sandbox"}),e.jsx("li",{children:"2. Use test credentials"}),e.jsx("li",{children:"3. Test all payment flows"}),e.jsx("li",{children:"4. Switch to Live when ready"})]})]})]})]})]})}function g5(){const{showConfirm:t}=Vs(),[s,a]=o.useState("blog"),[r,l]=o.useState([]),[n,i]=o.useState([]),[c,d]=o.useState([]),[x,m]=o.useState([]),[h,f]=o.useState(!0),[y,g]=o.useState("");o.useEffect(()=>{w()},[s]);const w=async()=>{f(!0);try{if(s==="blog"){const{data:b}=await Ye.from("blog_posts").select("*").order("created_at",{ascending:!1});l(b||[])}else if(s==="testimonials"){const{data:b}=await Ye.from("testimonials").select("*").order("created_at",{ascending:!1});i(b||[])}else if(s==="faq"){const{data:b}=await Ye.from("faq_items").select("*").order("display_order",{ascending:!0});d(b||[])}else if(s==="stats"){const{data:b}=await Ye.from("seo_stats").select("*").order("display_order",{ascending:!0});m(b||[])}}catch(b){console.error("Failed to load data:",b)}finally{f(!1)}},N=async(b,p,E,C)=>{try{await Ye.from(b).update({[E]:C}).eq("id",p),w()}catch(S){console.error("Failed to toggle:",S)}},v=async(b,p)=>{if(await t("Are you sure you want to delete this item?",{title:"Delete Item",type:"warning"}))try{await Ye.from(b).delete().eq("id",p),w()}catch(C){console.error("Failed to delete:",C)}},j=[{id:"blog",label:"Blog Posts",icon:ei,count:r.length},{id:"testimonials",label:"Testimonials",icon:rm,count:n.length},{id:"faq",label:"FAQ",icon:oy,count:c.length},{id:"stats",label:"SEO Stats",icon:Ia,count:x.length}];return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"SEO Content Management"})}),e.jsx("div",{className:"flex items-center gap-2 border-b border-slate-200 overflow-x-auto",children:j.map(b=>e.jsxs("button",{onClick:()=>a(b.id),className:`flex items-center gap-2 px-4 py-3 border-b-2 transition-colors whitespace-nowrap ${s===b.id?"border-blue-600 text-blue-600":"border-transparent text-slate-500 hover:text-slate-700"}`,children:[e.jsx(b.icon,{className:"w-4 h-4"}),b.label,e.jsx("span",{className:"bg-slate-100 text-slate-600 px-2 py-0.5 rounded-full text-xs",children:b.count})]},b.id))}),e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search...",value:y,onChange:b=>g(b.target.value),className:"w-full pl-10 pr-4 py-2 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),h?e.jsx("div",{className:"space-y-4",children:[1,2,3].map(b=>e.jsx("div",{className:"animate-pulse bg-slate-100 rounded-lg h-20"},b))}):e.jsxs(e.Fragment,{children:[s==="blog"&&e.jsx("div",{className:"space-y-4",children:r.filter(b=>b.title.toLowerCase().includes(y.toLowerCase())).map(b=>e.jsx("div",{className:"bg-white border border-slate-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:b.title}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${b.is_published?"bg-green-100 text-green-700":"bg-slate-100 text-slate-600"}`,children:b.is_published?"Published":"Draft"})]}),e.jsx("p",{className:"text-sm text-slate-600 line-clamp-2",children:b.excerpt}),e.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[e.jsxs("span",{children:["Category: ",b.category]}),e.jsxs("span",{children:["Views: ",b.view_count]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>N("blog_posts",b.id,"is_published",!b.is_published),className:"p-2 text-slate-400 hover:text-blue-600 transition-colors",children:b.is_published?e.jsx(ur,{className:"w-4 h-4"}):e.jsx(Ct,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>v("blog_posts",b.id),className:"p-2 text-slate-400 hover:text-red-600 transition-colors",children:e.jsx(xs,{className:"w-4 h-4"})})]})]})},b.id))}),s==="testimonials"&&e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:n.filter(b=>b.customer_name.toLowerCase().includes(y.toLowerCase())).map(b=>e.jsx("div",{className:"bg-white border border-slate-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((p,E)=>e.jsx(Zt,{className:`w-4 h-4 ${E<b.rating?"text-amber-400 fill-amber-400":"text-slate-200"}`},E))}),b.is_featured&&e.jsx("span",{className:"bg-blue-100 text-blue-700 px-2 py-0.5 rounded text-xs",children:"Featured"}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${b.is_approved?"bg-green-100 text-green-700":"bg-amber-100 text-amber-700"}`,children:b.is_approved?"Approved":"Pending"})]}),e.jsxs("p",{className:"text-sm text-slate-600 mb-2",children:['"',b.content,'"']}),e.jsxs("div",{className:"text-xs text-slate-500",children:[b.customer_name," - ",b.customer_role]})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("button",{onClick:()=>
1010N("testimonials",b.id,"is_approved",!b.is_approved),className:`p-2 rounded transition-colors ${b.is_approved?"text-green-600 bg-green-50":"text-slate-400 hover:bg-slate-100"}`,children:e.jsx(Ct,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>N("testimonials",b.id,"is_featured",!b.is_featured),className:`p-2 rounded transition-colors ${b.is_featured?"text-blue-600 bg-blue-50":"text-slate-400 hover:bg-slate-100"}`,children:e.jsx(Zt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>v("testimonials",b.id),className:"p-2 text-slate-400 hover:text-red-600 transition-colors",children:e.jsx(xs,{className:"w-4 h-4"})})]})]})},b.id))}),s==="faq"&&e.jsx("div",{className:"space-y-3",children:c.filter(b=>b.question.toLowerCase().includes(y.toLowerCase())).map(b=>e.jsx("div",{className:"bg-white border border-slate-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsxs("span",{className:"text-sm font-medium text-slate-400",children:["#",b.display_order]}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${b.is_active?"bg-green-100 text-green-700":"bg-slate-100 text-slate-600"}`,children:b.is_active?"Active":"Inactive"})]}),e.jsx("h4",{className:"font-semibold text-slate-900 mb-1",children:b.question}),e.jsx("p",{className:"text-sm text-slate-600 line-clamp-2",children:b.answer})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>N("faq_items",b.id,"is_active",!b.is_active),className:"p-2 text-slate-400 hover:text-blue-600 transition-colors",children:b.is_active?e.jsx(ur,{className:"w-4 h-4"}):e.jsx(Ct,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>v("faq_items",b.id),className:"p-2 text-slate-400 hover:text-red-600 transition-colors",children:e.jsx(xs,{className:"w-4 h-4"})})]})]})},b.id))}),s==="stats"&&e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:x.map(b=>e.jsx("div",{className:"bg-white border border-slate-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-blue-600",children:b.stat_value}),e.jsx("div",{className:"text-sm text-slate-600",children:b.display_label}),e.jsxs("div",{className:"text-xs text-slate-400 mt-1",children:["Key: ",b.stat_key]})]}),e.jsx("button",{onClick:()=>N("seo_stats",b.id,"is_active",!b.is_active),className:`p-2 rounded transition-colors ${b.is_active?"text-green-600 bg-green-50":"text-slate-400 hover:bg-slate-100"}`,children:b.is_active?e.jsx(Ct,{className:"w-4 h-4"}):e.jsx(ur,{className:"w-4 h-4"})})]})},b.id))})]})]})}function b5(){const[t,s]=o.useState([]),[a,r]=o.useState(!0),[l,n]=o.useState(!1),[i,c]=o.useState(null),[d,x]=o.use
1010State({page:1,limit:20,total:0,totalPages:0}),[m,h]=o.useState(""),[f,y]=o.useState(""),[g,w]=o.useState(""),[N,v]=o.useState(""),[j,b]=o.useState(""),[p,E]=o.useState(null),[C,S]=o.useState(null),[k,J]=o.useState(!1),u=o.useCallback(async()=>{r(!0),E(null);try{const I=new URLSearchParams({page:d.page.toString(),limit:d.limit.toString()});m&&I.append("search",m),f&&I.append("payment_provider",f),g&&I.append("document_type",g),N&&I.append("start_date",N),j&&I.append("end_date",j);const Q=await(await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_order_documents?${I}`)).json();Q.success?(s(Q.documents),x(_=>({..._,...Q.pagination}))):E(Q.error||"Failed to fetch documents")}catch(I){console.error("Error fetching documents:",I),E("Failed to fetch documents")}finally{r(!1)}},[d.page,d.limit,m,f,g,N,j]);o.useEffect(()=>{u()},[u]);const A=async()=>{n(!0),E(null),S(null);try{const Z=await(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/generate_retroactive_documents",{method:"POST"})).json();Z.success?(S(`Successfully generated ${Z.generated} documents`),u()):E(Z.error||"Failed to generate documents")}catch(I){console.error("Error generating documents:",I),E("Failed to generate retroactive documents")}finally{n(!1)}},T=async I=>{c(I.id);try{const Z=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/download_order_document_pdf?id=${I.id}`);if(!Z.ok)throw new Error("Failed to download PDF");const Q=await Z.blob(),_=window.URL.createObjectURL(Q),M=document.createElement("a");M.href=_,M.download=`Service-Document-${I.order_number}.pdf`,document.body.appendChild(M),M.click(),window.URL.revokeObjectURL(_),document.body.removeChild(M)}catch(Z){console.error("Error downloading PDF:",Z),E("Failed to download PDF")}finally{c(null)}},ae=I=>new Date(I).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),P=I=>new Date(I).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),z=I=>{I.preventDefault(),x(Z=>({...Z,page:1})),u()};return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-slate-900",children:"Order Documents"}),e.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"Service completion documents for all successful orders"})]}),e.jsxs("button",{onClick:A,disabled:l,className:"inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition disabled:opacity-50 text-sm font-medium w-full sm:w-auto",children:[l?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Ve,{className:"w-4 h-4"}),"Generate Missing Documents"]})]}),p&&e.jsxs("div",{className:"p-3 sm:p-4 bg-red-50 border border-red-200 rounded-lg flex items-start gap-3",children:[e.jsx(nt,{className:"w-5 h-5 text-red-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-red-700 text-sm",children:p})]}),C&&e.jsxs("div",{className:"p-3 sm:p-4 bg-green-50 border border-green-200 rounded-lg flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-green-700 text-sm",children:C})]}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-3 sm:p-4",children:e.jsxs("form",{onSubmit:z,className:"space-y-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 sm:w-5 sm:h-5 text-slate-400"}),e.jsx("input",{type:"text",value:m,onChange:I=>h(I.target.value),placeholder:"Search by Order ID or Email...",className:"w-full pl-9 sm:pl-10 pr-4 py-2 sm:py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"})]}),e.jsxs("button",{type:"button",onClick:()=>J(!k),className:"flex items-center justify-between w-full px-3 py-2 text-sm text-slate-700 bg-slate-50 rounded-lg sm:hidden",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Yn,{className:"w-4 h-4"}),"Filters"]}),e.jsx(is,{className:`w-4 h-4 transition-transform ${k?"rotate-180":""}`})]}),e.jsxs("div",{className:`${k?"block":"hidden"} sm:flex flex-wrap gap-2 sm:gap-3`,children:[e.jsxs("select",{value:g,onChange:I=>w(I.target.value),className:"w-full sm:w-auto px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm bg-white",children:[e.jsx("option",{value:"",children:"All Types"}),e.jsx("option",{value:"order",children:"Orders"}),e.jsx("option",{value:"deposit",children:"Add Funds"})]}),e.jsxs("select",{value:f,onChange:I=>y(I.target.value),className:"w-full sm:w-auto px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm bg-white mt-2 sm:mt-0",children:[e.jsx("option",{value:"",children:"All Providers"}),e.jsx("option",{value:"PayPal",children:"PayPal"}),e.jsx("option",{value:"Stripe",children:"Stripe"}),e.jsx("option",{value:"Card",children:"Card"}),e.jsx("option",{value:"Cryptocurrency",children:"Cryptocurrency"}),e.jsx("option",{value:"Wallet",children:"Wallet"})]}),e.jsxs("div",{className:"flex gap-2 mt-2 sm:mt-0",children:[e.jsx("input",{type:"date",value:N,onChange:I=>v(I.target.value),className:"flex-1 sm:flex-none px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"}),e.jsx("input",{type:"date",value:j,onChange:I=>b(I.target.value),className:"flex-1 sm:flex-none px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"})]}),e.jsxs("button",{type:"submit",className:"w-full sm:w-auto px-4 py-2 bg-slate-800 text-white rounded-lg hover:bg-slate-700 transition flex items-center justify-center gap-2 text-sm mt-2 sm:mt-0",children:[e.jsx(Yn,{className:"w-4 h-4"}),"Filter"]})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:a?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-blue-600"})}):t.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-slate-500",children:[e.jsx(ei,{className:"w-12 h-12 mb-4 opacity-50"}),e.jsx("p",{children:"No documents found"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Doc ID"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Type"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Customer"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Amount"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Provider"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Status"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Generated"}),e.jsx("th",{className:"px-4 py-3 text-right text-sm font-semibold text-slate-700",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200",children:t.map(I=>e.jsxs("tr",{className:"hover:bg-slate-50 transition",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(B0,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"font-mono text-sm text-slate-900",children:I.order_number})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${I.document_type==="deposit"?"bg-emerald-100 text-emerald-800":"bg-blue-100 text-blue-800"}`,children:I.document_type==="deposit"?"Add Funds":"Order"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"font-medium text-slate-900",children:I.customer_name||"N/A"}),e.jsxs("p",{className:"text-slate-500 flex items-center gap-1",children:[e.jsx(gs,{className:"w-3 h-3"}),I.customer_email]})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-1 text-slate-900 font-medium",children:[e.jsx(Jt,{className:"w-4 h-4 text-green-600"}),Number(I.payment_amount).toFixed(2)]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-slate-100 text-slate-800",children:I.payment_provider})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800",children:[e.jsx(ne,{className:"w-3 h-3"}),I.service_status]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"text-sm text-slate-600 flex items-center gap-1",children:[e.jsx(Ds,{className:"w-3 h-3"}),ae(I.generated_at),I.is_retroactive&&e.jsx("span",{className:"ml-1 text-xs text-amber-600",children:"(Retroactive)"})]})}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsxs("button",{onClick:()=>T(I),disabled:i===I.id,className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition disabled:opacity-50",children:[i===I.id?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(_l,{className:"w-4 h-4"}),"PDF"]})})]},I.id))})]})}),e.jsx("div",{className:"lg:hidden divide-y divide-slate-200",children:t.map(I=>e.jsxs("div",{className:"p-4 hover:bg-slate-50 transition",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[e.jsx(B0,{className:"w-4 h-4 text-blue-600 flex-shrink-0"}),e.jsx("span",{className:"font-mono text-sm text-slate-900 truncate",children:I.order_number}),e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium ${I.document_type==="deposit"?"bg-emerald-100 text-emerald-800":"bg-blue-100 text-blue-800"}`,children:I.document_type==="deposit"?"Add Funds":"Order"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-600",children:[e.jsx(ls,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{className:"text-sm truncate",children:I.customer_name||"N/A"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-500 mt-0.5",children:[e.jsx(gs,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{className:"text-xs truncate",children:I.customer_email})]})]}),e.jsx("div",{className:"text-right flex-shrink-0",children:e.jsxs("div",{className:"flex items-center gap-1 text-lg font-bold text-green-600",children:[e.jsx(Jt,{className:"w-4 h-4"}),Number(I.payment_amount).toFixed(2)]})})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[e.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-slate-100 text-slate-800",children:I.payment_provider}),e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800",children:[e.jsx(ne,{className:"w-3 h-3"}),I.service_status]}),I.is_retroactive&&e.jsx("span",{className:"text-xs text-amber-600",children:"(Retroactive)"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-1",children:[e.jsx(Ds,{className:"w-3 h-3"}),P(I.generated_at)]}),e.jsxs("button",{onClick:()=>T(I),disabled:i===I.id,className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition disabled:opacity-50",children:[i===I.id?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(_l,{className:"w-4 h-4"}),"PDF"]})]})]},I.id))}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 px-4 py-3 border-t border-slate-200 bg-slate-50",children:[e.jsxs("div",{className:"text-xs sm:text-sm text-slate-600 order-2 sm:order-1",children:[(d.page-1)*d.limit+1,"-",Math.min(d.page*d.limit,d.total),e.jsx("span",{className:"mx-1",children:"/"}),d.total,e.jsx("span",{className:"hidden sm:inline",children:" documents"})]}
1010),e.jsxs("div",{className:"flex items-center gap-2 order-1 sm:order-2",children:[e.jsx("button",{onClick:()=>x(I=>({...I,page:I.page-1})),disabled:d.page<=1,className:"p-2 rounded-lg border border-slate-200 hover:bg-slate-100 disabled:opacity-50 disabled:cursor-not-allowed transition bg-white",children:e.jsx(Ua,{className:"w-4 h-4"})}),e.jsxs("span",{className:"px-2 sm:px-3 py-1 text-xs sm:text-sm text-slate-700 min-w-[80px] text-center",children:[d.page," / ",d.totalPages]}),e.jsx("button",{onClick:()=>x(I=>({...I,page:I.page+1})),disabled:d.page>=d.totalPages,className:"p-2 rounded-lg border border-slate-200 hover:bg-slate-100 disabled:opacity-50 disabled:cursor-not-allowed transition bg-white",children:e.jsx(ra,{className:"w-4 h-4"})})]})]})]})})]})}function y5(){const[t,s]=o.useState([]),[a,r]=o.useState(!0),[l,n]=o.useState(null),[i,c]=o.useState({page:1,limit:20,total:0,totalPages:0}),[d,x]=o.useState(""),[m,h]=o.useState(""),[f,y]=o.useState(""),[g,w]=o.useState(""),[N,v]=o.useState(null),[j,b]=o.useState(!1),p=o.useCallback(async()=>{r(!0),v(null);try{const A=new URLSearchParams({page:i.page.toString(),limit:i.limit.toString()});d&&A.append("search",d),m&&A.append("payment_method",m),f&&A.append("start_date",f),g&&A.append("end_date",g);const ae=await(await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_wallet_deposits?${A}`)).json();ae.success?(s(ae.deposits),c(P=>({...P,...ae.pagination}))):v(ae.error||"Failed to fetch deposits")}catch(A){console.error("Error fetching deposits:",A),v("Failed to fetch deposits")}finally{r(!1)}},[i.page,i.limit,d,m,f,g]);o.useEffect(()=>{p()},[p]);const E=async A=>{if(!A.document_id){v("No document available for this deposit");return}n(A.id);try{const T=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/download_order_document_pdf?id=${A.document_id}`);if(!T.ok)throw new Error("Failed to download PDF");const ae=await T.blob(),P=window.URL.createObjectURL(ae),z=document.createElement("a");z.href=P,z.download=`Deposit-Document-DEP-${A.id.substring(0,8).toUpperCase()}.pdf`,document.body.appendChild(z),z.click(),window.URL.revokeObjectURL(P),document.body.removeChild(z)}catch(T){console.error("Error downloading PDF:",T),v("Failed to download PDF")}finally{n(null)}},C=A=>new Date(A).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),S=A=>new Date(A).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),k=A=>{A.preventDefault(),c(T=>({...T,page:1})),p()},J=A=>{const T=(A==null?void 0:A.toLowerCase())||"";return T==="paypal"?"bg-blue-100 text-blue-800":T==="stripe"?"bg-emerald-100 text-emerald-800":T==="card"?"bg-slate-100 text-slate-800":T==="cryptocurrency"?"bg-amber-100 text-amber-800":"bg-slate-100 text-slate-800"},u=A=>A==="completed"?"bg-green-100 text-green-800":A==="pending"?"bg-amber-100 text-amber-800":"bg-red-100 text-red-800";return e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-slate-900",children:"Balance Deposits"}),e.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"All wallet balance top-up transactions"})]}),N&&e.jsxs("div",{className:"p-3 sm:p-4 bg-red-50 border border-red-200 rounded-lg flex items-start gap-3",children:[e.jsx(nt,{className:"w-5 h-5 text-red-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-red-700 text-sm",children:N})]}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-3 sm:p-4",children:e.jsxs("form",{onSubmit:k,className:"space-y-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 sm:w-5 sm:h-5 text-slate-400"}),e.jsx("input",{type:"text",value:d,onChange:A=>x(A.target.value),placeholder:"Search by Email...",className:"w-full pl-9 sm:pl-10 pr-4 py-2 sm:py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"})]}),e.jsxs("button",{type:"button",onClick:()=>b(!j),className:"flex items-center justify-between w-full px-3 py-2 text-sm text-slate-700 bg-slate-50 rounded-lg sm:hidden",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Yn,{className:"w-4 h-4"}),"Filters"]}),e.jsx(is,{className:`w-4 h-4 transition-transform ${j?"rotate-180":""}`})]}),e.jsxs("div",{className:`${j?"block":"hidden"} sm:flex flex-wrap gap-2 sm:gap-3`,children:[e.jsxs("select",{value:m,onChange:A=>h(A.target.value),className:"w-full sm:w-auto px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm bg-white",children:[e.jsx("option",{value:"",children:"All Methods"}),e.jsx("option",{value:"PayPal",children:"PayPal"}),e.jsx("option",{value:"Stripe",children:"Stripe"}),e.jsx("option",{value:"Card",children:"Card"}),e.jsx("option",{value:"Cryptocurrency",children:"Cryptocurrency"})]}),e.jsxs("div",{className:"flex gap-2 mt-2 sm:mt-0",children:[e.jsx("input",{type:"date",value:f,onChange:A=>y(A.target.value),className:"flex-1 sm:flex-none px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"}),e.jsx("input",{type:"date",value:g,onChange:A=>w(A.target.value),className:"flex-1 sm:flex-none px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm"})]}),e.jsxs("button",{type:"submit",className:"w-full sm:w-auto px-4 py-2 bg-slate-800 text-white rounded-lg hover:bg-slate-700 transition flex items-center justify-center gap-2 text-sm mt-2 sm:mt-0",children:[e.jsx(Yn,{className:"w-4 h-4"}),"Filter"]})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:a?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-blue-600"})}):t.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-slate-500",children:[e.jsx(kt,{className:"w-12 h-12 mb-4 opacity-50"}),e.jsx("p",{children:"No deposits found"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Customer"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Amount"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Method"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Status"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Balance After"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold text-slate-700",children:"Date"}),e.jsx("th",{className:"px-4 py-3 text-right text-sm font-semibold text-slate-700",children:"Document"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200",children:t.map(A=>e.jsxs("tr",{className:"hover:bg-slate-50 transition",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-emerald-100 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(ls,{className:"w-4 h-4 text-emerald-600"})}),e.jsxs("div",{className:"text-sm min-w-0",children:[e.jsx("p",{className:"font-medium text-slate-900 truncate",children:A.user_full_name||"N/A"}),e.jsxs("p",{className:"text-slate-500 flex items-center gap-1 truncate",children:[e.jsx(gs,{className:"w-3 h-3 flex-shrink-0"}),A.user_email]})]})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-1 text-slate-900 font-semibold",children:[e.jsx(Jt,{className:"w-4 h-4 text-green-600"}),Number(A.amount).toFixed(2)]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-medium ${J(A.payment_method)}`,children:[e.jsx(Nt,{className:"w-3 h-3"}),A.payment_method]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-medium ${u(A.status)}`,children:[A.status==="completed"&&e.jsx(ne,{className:"w-3 h-3"}),A.status==="pending"&&e.jsx(Ze,{className:"w-3 h-3"}),A.status.charAt(0).toUpperCase()+A.status.slice(1)]})}),e.jsx("td",{className:"px-4 py-3",children:A.balance_after!==null?e.jsxs("span",{className:"text-slate-900 font-medium",children:["$",Number(A.balance_after).toFixed(2)]}):e.jsx("span",{className:"text-slate-400",children:"-"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"text-sm text-slate-600 flex items-center gap-1",children:[e.jsx(Ds,{className:"w-3 h-3"}),C(A.created_at)]})}),e.jsx("td",{className:"px-4 py-3 text-right",children:A.document_id?e.jsxs("button",{onClick:()=>E(A),disabled:l===A.id,className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 transition disabled:opacity-50",children:[l===A.id?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(_l,{className:"w-4 h-4"}),"PDF"]}):e.jsx("span",{className:"text-slate-400 text-sm",children:"No document"})})]},A.id))})]})}),e.jsx("div",{className:"lg:hidden divide-y divide-slate-200",children:t.map(A=>e.jsxs("div",{className:"p-4 hover:bg-slate-50 transition",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx("div",{className:"w-10 h-10 bg-emerald-100 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(ls,{className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-semibold text-slate-900 truncate",children:A.user_full_name||"N/A"}),e.jsxs("p",{className:"text-slate-500 text-sm flex items-center gap-1 truncate",children:[e.jsx(gs,{className:"w-3 h-3 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:A.user_email})]})]})]}),e.jsx("div",{className:"text-right flex-shrink-0",children:e.jsxs("div",{className:"flex items-center gap-0.5 text-xl font-bold text-green-600",children:[e.jsx(Jt,{className:"w-5 h-5"}),Number(A.amount).toFixed(2)]})})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${J(A.payment_method)}`,children:[e.jsx(Nt,{className:"w-3 h-3"}),A.payment_method]}),e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${u(A.status)}`,children:[A.status==="completed"&&e.jsx(ne,{className:"w-3 h-3"}),A.status==="pending"&&e.jsx(Ze,{className:"w-3 h-3"}),A.status.charAt(0).toUpperCase()+A.status.slice(1)]}),A.balance_after!==null&&e.jsxs("span",{className:"text-xs text-slate-600",children:["After: ",e.jsxs("span",{className:"font-medium",children:["$",Number(A.balance_after).toFixed(2)]})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-1",children:[e.jsx(Ds,{className:"w-3 h-3"}),S(A.created_at)]}),A.document_id?e.jsxs("button",{onClick:()=>E(A),disabled:l===A.id,className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 transition disabled:opacity-50",children:[l===A.id?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(_l,{className:"w-4 h-4"}),"PDF"]}):e.jsx("span",{className:"text-slate-400 text-xs",children:"No document"})]})]},A.id))}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 px-4 py-3 border-t border-slate-200 bg-slate-50",children:[e.jsxs("div",{className:"text-xs sm:text-sm text-slate-600 order-2 sm:order-1",children:[(i.page-1)*i.limit+1,"-",Math.min(i.page*i.limit,i.total),e.jsx("span",{className:"mx-1",children:"/"}),i.total,e.jsx("span",{className:"hidden sm:inline",children:" deposits"})]}
1010),e.jsxs("div",{className:"flex items-center gap-2 order-1 sm:order-2",children:[e.jsx("button",{onClick:()=>c(A=>({...A,page:A.page-1})),disabled:i.page<=1,className:"p-2 rounded-lg border border-slate-200 hover:bg-slate-100 disabled:opacity-50 disabled:cursor-not-allowed transition bg-white",children:e.jsx(Ua,{className:"w-4 h-4"})}),e.jsxs("span",{className:"px-2 sm:px-3 py-1 text-xs sm:text-sm text-slate-700 min-w-[80px] text-center",children:[i.page," / ",i.totalPages]}),e.jsx("button",{onClick:()=>c(A=>({...A,page:A.page+1})),disabled:i.page>=i.totalPages,className:"p-2 rounded-lg border border-slate-200 hover:bg-slate-100 disabled:opacity-50 disabled:cursor-not-allowed transition bg-white",children:e.jsx(ra,{className:"w-4 h-4"})})]})]})]})})]})}const j5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-5.2 1.74 2.89 2.89 0 012.31-4.64 2.93 2.93 0 01.88.13V9.4a6.84 6.84 0 00-1-.05A6.33 6.33 0 005 20.1a6.34 6.34 0 0010.86-4.43v-7a8.16 8.16 0 004.77 1.52v-3.4a4.85 4.85 0 01-1-.1z"})}),v5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.217-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0z"})}),w5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})}),N5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M13.54 12a6.8 6.8 0 01-6.77 6.82A6.8 6.8 0 010 12a6.8 6.8 0 016.77-6.82A6.8 6.8 0 0113.54 12zM20.96 12c0 3.54-1.51 6.42-3.38 6.42-1.87 0-3.39-2.88-3.39-6.42s1.52-6.42 3.39-6.42 3.38 2.88 3.38 6.42M24 12c0 3.17-.53 5.75-1.19 5.75-.66 0-1.19-2.58-1.19-5.75s.53-5.75 1.19-5.75C23.47 6.25 24 8.83 24 12z"})}),k5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M14.563 24c-5.093 0-7.031-3.756-7.031-6.411V9.747H5.116V6.648c3.63-1.313 4.512-4.596 4.71-6.469C9.84.05 9.941 0 10.037 0h3.887v6.091h5.089v3.656h-5.089v7.291c.015 1.042.406 2.461 2.266 2.461.639 0 1.477-.148 1.899-.396l1.277 3.357c-.403.457-2.097 1.246-4.042 1.246-.045 0-.089-.001-.134-.002z"})}),_5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M23.977 6.416c-.105 2.338-1.739 5.543-4.894 9.609-3.268 4.247-6.026 6.37-8.29 6.37-1.409 0-2.578-1.294-3.553-3.881L5.322 11.4C4.603 8.816 3.834 7.522 3.01 7.522c-.179 0-.806.378-1.881 1.132L0 7.197c1.185-1.044 2.351-2.084 3.501-3.128C5.08 2.701 6.266 1.984 7.055 1.91c1.867-.18 3.016 1.1 3.447 3.838.465 2.953.789 4.789.971 5.507.539 2.45 1.131 3.674 1.776 3.674.502 0 1.256-.796 2.265-2.385 1.004-1.589 1.54-2.797 1.612-3.628.144-1.371-.395-2.061-1.614-2.061-.574 0-1.167.121-1.777.391 1.186-3.868 3.434-5.757 6.762-5.637 2.473.06 3.628 1.664 3.493 4.797l-.013.01z"})}),S5=({className:t})=>
1010e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M6.938 4.503c.702 0 1.34.06 1.92.188.577.13 1.07.33 1.485.61.41.28.733.65.96 1.12.225.47.34 1.05.34 1.73 0 .74-.17 1.36-.507 1.86-.338.5-.837.9-1.502 1.22.906.26 1.576.72 2.022 1.37.448.66.665 1.45.665 2.36 0 .75-.13 1.39-.41 1.93-.28.55-.67 1-1.16 1.35-.48.348-1.05.6-1.67.767-.61.165-1.252.254-1.91.254H0V4.51h6.938v-.007zM6.545 9.64c.543 0 .97-.142 1.284-.436.314-.294.465-.69.465-1.2 0-.3-.05-.554-.154-.762a1.316 1.316 0 0 0-.43-.514 1.82 1.82 0 0 0-.678-.287 3.96 3.96 0 0 0-.89-.09H3.363v3.29h3.182zm.238 5.69c.348 0 .67-.038.97-.115.3-.08.558-.2.768-.378.21-.175.377-.4.494-.676.12-.272.18-.604.18-.994 0-.768-.227-1.32-.686-1.664-.46-.34-1.07-.514-1.83-.514H3.364v4.34h3.42zm10.118-1.49c.343.36.847.55 1.51.55.477 0 .888-.118 1.238-.353.35-.234.57-.465.66-.688h2.19c-.353 1.075-.87 1.84-1.55 2.3-.68.463-1.51.69-2.49.69-.653 0-1.24-.097-1.77-.294a3.95 3.95 0 0 1-1.36-.844 3.782 3.782 0 0 1-.87-1.347c-.21-.53-.31-1.12-.31-1.77 0-.617.105-1.19.32-1.716a3.95 3.95 0 0 1 .89-1.35 4.09 4.09 0 0 1 1.37-.886c.53-.21 1.11-.314 1.74-.314.69 0 1.3.12 1.83.37.527.25.97.6 1.33 1.05.36.454.62.99.79 1.604.17.615.22 1.29.16 2.02h-6.54c.037.86.288 1.45.63 1.81v-.003zm2.64-4.19c-.27-.315-.7-.47-1.31-.47-.4 0-.73.065-1 .2-.27.13-.48.295-.65.49-.16.19-.27.4-.32.615-.05.22-.083.4-.1.55h4.04c-.09-.58-.38-1.06-.66-1.39v.004zm-2.37-4.08h5.21v1.36h-5.21V5.57z"})}),C5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.395-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.428 6.8.265 7.14.33-.02-2.42-.88-4.64-2.31-6.38z"})}),I5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})}),T5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1.175 12.225c-.051 0-.094.046-.101.1l-.233 2.154.233 2.105c.007.058.05.098.101.098.05 0 .09-.04.099-.098l.255-2.105-.27-2.154c-.009-.06-.049-.1-.084-.1zm-.899 1.02c-.051 0-.09.037-.099.085l-.183 1.148.183 1.136c.009.05.048.085.099.085.05 0 .09-.035.099-.085l.207-1.136-.207-1.148c-.009-.05-.049-.085-.099-.085zm1.86-1.058c-.061 0-.112.054-.119.114l-.194 2.268.194 2.186c.007.068.058.118.119.118.061 0 .112-.05.12-.118l.22-2.186-.22-2.268c-.008-.068-.059-.114-.12-.114zm.947-.051c-.073 0-.131.06-.139.13l-.168 2.319.168 2.218c.008.077.066.132.139.132.072 0 .13-.055.138-.132l.19-2.218-.19-2.319c-.008-.077-.066-.13-.138-.13zm.99.112c-.084 0-.152.066-.159.146l-.143 2.207.143 2.142c.007.09.075.15.159.15.083 0 .151-.06.158-.15l.162-2.142-.162-2.207c-.007-.09-.075-.146-.158-.146zm.988-.177c-.094 0-.17.075-.176.162l-.117 2.222.117 2.071c.006.097.082.167.176.167.093 0 .169-.07.176-.167l.132-2.071-.132-2.222c-.007-.097-.083-.162-.176-.162zm1.058-.236c-.104 0-.189.083-.195.18l-.091 2.278.091 2.002c.006.105.091.185.195.185s.189-.08.195-.185l.104-2.002-.104-2.278c-.006-.105-.091-.18-.195-.18zm2.985-1.725c-.057 0-.112.01-.165.028-.105.034-.185.103-.235.202-.057-.005-.108-.008-.164-.008-1.07 0-1.937.896-1.937 2.002 0 1.106.867 2.002 1.937 2.002h4.66c.904 0 1.637-.756 1.637-1.688 0-.932-.733-1.688-1.637-1.688-.266 0-.515.07-.731.193-.366-1.17-1.433-2.023-2.701-2.023-.269 0-.529.038-.779.109-.139.04-.17.08-.174.152v7.785c.004.07.057.134.126.146h4.218c1.489 0 2.698-1.247 2.698-2.784 0-1.537-1.209-2.784-2.698-2.784-.288 0-.565.049-.828.138-.471-1.447-1.802-2.493-3.381-2.493-.326 0-.643.045-.947.127-.173.047-.212.095-.217.183v9.451c.005.086.069.165.153.184h5.22c1.893 0 3.428-1.586 3.428-3.544 0-1.957-1.535-3.543-3.428-3.543-.444 0-.867.09-1.256.249-.653-2.01-2.51-3.467-4.704-3.467-.363 0-.717.04-1.059.117-.194.043-.237.109-.244.203v11.766c.008.106.08.198.183.218h6.82c2.296 0 4.159-1.921 4.159-4.291 0-2.371-1.863-4.292-4.159-4.292z"})}),P5=({className:t})=>
1010e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})}),A5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),M5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),E5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z"})}),D5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1.333 0h21.334C23.403 0 24 .597 24 1.333v21.334c0 .736-.597 1.333-1.333 1.333H1.333C.597 24 0 23.403 0 22.667V1.333C0 .597.597 0 1.333 0zM8 6v12h2.667V14L14 18h3.333l-4-6 4-6H14l-3.333 4V6H8z"})}),R5=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.
101018zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.969-.982z"})}),go={Instagram:Za,TikTok:j5,YouTube:Qi,X:yl,"X (Twitter)":yl,Twitter:yl,Facebook:Vn,Pinterest:v5,Reddit:w5,Medium:N5,Tumblr:k5,Vimeo:_5,LinkedIn:th,GitHub:iy,Behance:S5,Dribbble:C5,Spotify:I5,SoundCloud:T5,Telegram:P5,Discord:A5,WhatsApp:M5,Twitch:E5,Kick:D5,WeChat:R5},kx={Users:mt,Heart:ia,MessageCircle:Ls,Play:zs,Share2:Ki,Eye:Ct,Star:Zt},sf=[{from:"#E1306C",to:"#F77737",name:"Instagram"},{from:"#000000",to:"#25F4EE",name:"TikTok"},{from:"#FF0000",to:"#CC0000",name:"YouTube"},{from:"#000000",to:"#14171A",name:"X"},{from:"#1877F2",to:"#0D65D9",name:"Facebook"},{from:"#E60023",to:"#BD001A",name:"Pinterest"},{from:"#FF4500",to:"#FF5722",name:"Reddit"},{from:"#000000",to:"#292929",name:"Medium"},{from:"#36465D",to:"#001935",name:"Tumblr"},{from:"#1AB7EA",to:"#162221",name:"Vimeo"},{from:"#0A66C2",to:"#004182",name:"LinkedIn"},{from:"#24292F",to:"#0D1117",name:"GitHub"},{from:"#1769FF",to:"#0057FF",name:"Behance"},{from:"#EA4C89",to:"#C32361",name:"Dribbble"},{from:"#1DB954",to:"#1ED760",name:"Spotify"},{from:"#FF5500",to:"#FF7700",name:"SoundCloud"},{from:"#0088CC",to:"#229ED9",name:"Telegram"},{from:"#5865F2",to:"#7289DA",name:"Discord"},{from:"#25D366",to:"#128C7E",name:"WhatsApp"},{from:"#9146FF",to:"#6441A5",name:"Twitch"},{from:"#53FC18",to:"#00FF00",name:"Kick"},{from:"#07C160",to:"#09BB07",name:"WeChat"},{from:"#ec4899",to:"#8b5cf6",name:"Pink to Purple"},{from:"#3b82f6",to:"#06b6d4",name:"Blue to Cyan"},{from:"#10b981",to:"#14b8a6",name:"Emerald to Teal"},{from:"#f97316",to:"#ef4444",name:"Orange to Red"},{from:"#6366f1",to:"#8b5cf6",name:"Indigo to Violet"},{from:"#F59E0B",to:"#EF4444",name:"Amber to Red"},{from:"#8B5CF6",to:"#D946EF",name:"Violet to Fuchsia"},{from:"#14B8A6",to:"#3B82F6",name:"Teal to Blue"}];function F5(){const{showConfirm:t}=Vs(),[s,a]=o.useState("featured"),[r,l]=o.useState([]),[n,i]=o.useState([]),[c,d]=o.useState(!0),[x,m]=o.useState(!1),[h,f]=o.useState(new Set),[y,g]=o.useState(null),[w,N]=o.useState(null),[v,j]=o.useState(null),[b,p]=o.use
1010State(!1),[E,C]=o.useState(null),[S,k]=o.useState(""),[J,u]=o.useState(""),[A,T]=o.useState([]),[ae,P]=o.useState(new Set),[z,I]=o.useState({name:"",subtitle:"",badge_text:"Limited Time Offer",gradient_from:"#ec4899",gradient_to:"#8b5cf6",icon:"Instagram"}),[Z,Q]=o.useState({name:"",icon:"Users"});o.useEffect(()=>{_(),M()},[]);const _=async()=>{d(!0);try{const[H,me]=await Promise.all([We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_sales_boost_featured",{method:"POST",body:JSON.stringify({action:"get_all"})}),We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_sales_boost_featured",{method:"POST",body:JSON.stringify({action:"get_available_packages"})})]),ee=await H.json(),Ae=await me.json();ee.success&&l(ee.groups||[]),Ae.success&&i(Ae.packages||[])}catch(H){console.error("Error fetching data:",H)}finally{d(!1)}},M=async()=>{try{const me=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_sales_boost_settings",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}})).json();me.success&&me.settings&&T(me.settings)}catch(H){console.error("Error fetching settings:",H)}},F=async(H,me={})=>{m(!0);try{const Ae=await(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_sales_boost_featured",{method:"POST",body:JSON.stringify({action:H,...me})})).json();return Ae.success||console.error("API error:",Ae.error),Ae}catch(ee){return console.error("Error:",ee),{success:!1}}finally{m(!1)}},R=async(H,me)=>{m(!0);try{const Ae=await(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_sales_boost_setting",{method:"POST",body:JSON.stringify({setting_key:H,...me})})).json();Ae.success&&Ae.setting&&T(he=>he.map(D=>D.setting_key===H?Ae.setting:D))}catch(ee){console.error("Error updating setting:",ee)}finally{m(!1)}},X=async()=>{(await F("create_group",z)).success&&(await _(),p(!1),I({name:"",subtitle:"",badge_text:"Limited Time Offer",gradient_from:"#ec4899",gradient_to:"#8b5cf6",icon:"Instagram"}))},re=async H=>{(await F("update_group",{id:H.id,name:H.name,subtitle:H.subtitle,badge_text:H.badge_text,gradient_from:H.gradient_from,gradient_to:H.gradient_to,icon:H.icon,is_active:H.is_active})).success&&(await _(),g(null))},U=async H=>{if(!await t("Bu grubu ve tum iceriginizi silmek istediginize emin misiniz?",{title:"Delete Group",type:"warning"}))return;(await F("delete_group",{id:H})).success&&await _()},oe=async(H,me,ee)=>{const Ae=me==="mobile"?{default_expanded_mobile:ee}:{default_expanded_desktop:ee};(await F("update_group",{id:H,...Ae})).success&&l(D=>D.map(O=>O.id===H?{...O,...Ae}:O))},ue=async H=>{(await F("create_tab",{group_id:H,...Z})).success&&(await _(),C(null),Q({name:"",icon:"Users"}))},K=async H=>{(await F("update_tab",{id:H.id,name:H.name,icon:H.icon,is_active:H.is_active})).success&&(await _(),N(null))},q=async H=>{if(!await t("Bu sekmeyi silmek istediginize emin misiniz?",{title:"Delete Tab",type:"warning"}))return;(await F("delete_tab",{id:H})).success&&await _()},je=async(H,me)=>{(await F("add_featured_package",{tab_id:H,package_id:me,discount_percentage:50})).success&&await _()},we=async(H,me)=>{(await F("update_featured_package",{id:H,...me})).success&&await _()},se=async H=>{(await F("remove_featured_package",{id:H})).success&&await _()},Se=async(H,me,ee,Ae)=>{const he=Ae==="up"?ee-1:ee+1;if(he<0||he>=me.length)return;const D=[...me];[D[ee],D[he]]=[D[he],D[ee]],await F("reorder_packages",{order:D.map(O=>O.id)}),await _()},$=async(H,me)=>{const ee=me==="up"?H-1:H+1;if(ee<0||ee>=r.length)return;const Ae=[...r];[Ae[H],Ae[ee]]=[Ae[ee],Ae[H]],l(Ae),await F("reorder_groups",{order:Ae.map(he=>he.id)})},ie=H=>{f(me=>{const ee=new Set(me);return ee.has(H)?ee.delete(H):ee.add(H),ee})},be=n.filter(H=>{var O,fe,W;const me=((fe=(O=H.category)==null?void 0:O.platform)==null?void 0:fe.name)||"",ee=((W=H.category)==null?void 0:W.name)||"",Ae=S.toLowerCase();return(!S||me.toLowerCase().includes(Ae)||ee.toLowerCase().includes(Ae)||H.quantity.toString().includes(Ae))&&(!J||me===J)}),Pe=[...new Set(n.map(H=>{var me,ee;return(ee=(me=H.category)==null?void 0:me.platform)==null?void 0:ee.name}
1010).filter(Boolean))],de={quick_pricing:{title:"Hizli Fiyat Tablosu",description:"Ana sayfada goruntulenen paketler",icon:tt},trust_badges_bar:{title:"Guven Rozeti Bari",description:"Hero section altindaki guven rozetleri",icon:lt},trust_badges_floating:{title:"Kayan Guven Rozetleri",description:"Sol tarafta sabit kalan sosyal kanitlar",icon:Zt},exit_intent_popup:{title:"Cikis Niyeti Popup",description:"Kullanici sayfadan ciktiginda gosterilen indirim teklifi",icon:rs},proactive_help_bubble:{title:"Proaktif Yardim Balonu",description:"Otomatik acilan canli destek teklifi",icon:rm}};return c?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(Ve,{className:"w-8 h-8 text-blue-500 animate-spin"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-2xl font-bold text-slate-900 flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-gradient-to-br from-amber-400 to-orange-500 rounded-xl",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),"Satis Arttirma Araclari"]}),e.jsx("p",{className:"text-slate-600 mt-1",children:"Donusum oranini arttirmak icin araclari yonetin"})]}),e.jsxs("button",{onClick:_,disabled:x,className:"flex items-center gap-2 px-4 py-2 bg-slate-100 text-slate-700 rounded-lg hover:bg-slate-200 transition-colors",children:[e.jsx(Ve,{className:`w-4 h-4 ${x?"animate-spin":""}`}),"Yenile"]})]}),e.jsxs("div",{className:"flex gap-2 border-b border-slate-200",children:[e.jsxs("button",{onClick:()=>a("featured"),className:`px-4 py-2 font-medium border-b-2 transition-colors ${s==="featured"?"border-blue-500 text-blue-600":"border-transparent text-slate-600 hover:text-slate-900"}`,children:[e.jsx(us,{className:"w-4 h-4 inline mr-2"}),"Vitrin Paketleri"]}),e.jsxs("button",{onClick:()=>a("settings"),className:`px-4 py-2 font-medium border-b-2 transition-colors ${s==="settings"?"border-blue-500 text-blue-600":"border-transparent text-slate-600 hover:text-slate-900"}`,children:[e.jsx(tl,{className:"w-4 h-4 inline mr-2"}),"Diger Ayarlar"]})]}),s==="featured"?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-slate-600",children:[e.jsx("span",{className:"font-medium",children:r.length})," vitrin grubu,"," ",e.jsx("span",{className:"font-medium",children:r.reduce((H,me)=>H+me.tabs.length,0)})," sekme,"," ",e.jsx("span",{className:"font-medium",children:r.reduce((H,me)=>H+me.tabs.reduce((ee,Ae)=>ee+Ae.featured_packages.length,0),0)})," paket"]}),e.jsxs("button",{onClick:()=>p(!0),className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-500 to-cyan-500 text-white rounded-lg hover:from-blue-600 hover:to-cyan-600 transition-all shadow-lg shadow-blue-500/25",children:[e.jsx(ns,{className:"w-4 h-4"}),"Yeni Vitrin Grubu"]})]}),r.length===0?e.jsxs("div",{className:"text-center py-16 bg-slate-50 rounded-2xl border-2 border-dashed border-slate-300",children:[e.jsx(Os,{className:"w-16 h-16 text-slate-300 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-slate-700 mb-2",children:"Henuz vitrin grubu yok"}),e.jsx("p",{className:"text-slate-500 mb-6",children:"Ana sayfada gosterilecek paketleri organize etmek icin yeni bir grup olusturun"}),e.jsxs("button",{onClick:()=>p(!0),className:"inline-flex items-center gap-2 px-6 py-3 bg-blue-500 text-white rounded-xl hover:bg-blue-600 transition-colors",children:[e.jsx(ns,{className:"w-5 h-5"}),"Ilk Grubu Olustur"]})]}):e.jsx("div",{className:"space-y-4",children:r.map((H,me)=>{const ee=h.has(H.id),Ae=go[H.icon]||Za;return e.jsxs("div",{className:`bg-white rounded-2xl border-2 overflow-hidden transition-all ${H.is_active?"border-slate-200":"border-slate-200 opacity-60"}`,children:[e.jsx("div",{className:"p-4 cursor-pointer",style:{background:`linear-gradient(135deg, ${H.gradient_from}15, ${H.gradient_to}15)`},onClick:()=>ie(H.id),children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-1 text-slate-400",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("button",{onClick:he=>{he.stopPropagation(),$(me,"up")}
1010,disabled:me===0||x,className:`p-0.5 rounded hover:bg-slate-200 transition-colors ${me===0?"opacity-30 cursor-not-allowed":"hover:text-slate-600"}`,title:"Yukari tasi",children:e.jsx(Un,{className:"w-4 h-4"})}),e.jsx("button",{onClick:he=>{he.stopPropagation(),$(me,"down")},disabled:me===r.length-1||x,className:`p-0.5 rounded hover:bg-slate-200 transition-colors ${me===r.length-1?"opacity-30 cursor-not-allowed":"hover:text-slate-600"}`,title:"Asagi tasi",children:e.jsx(is,{className:"w-4 h-4"})})]}),e.jsxs("span",{className:"text-sm font-medium ml-1",children:["#",me+1]})]}),e.jsx("div",{className:"p-3 rounded-xl",style:{background:`linear-gradient(135deg, ${H.gradient_from}, ${H.gradient_to})`},children:e.jsx(Ae,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-bold text-slate-900 text-lg",children:H.name}),H.badge_text&&e.jsx("span",{className:"px-2 py-0.5 bg-amber-100 text-amber-700 text-xs font-medium rounded-full",children:H.badge_text}),!H.is_active&&e.jsx("span",{className:"px-2 py-0.5 bg-slate-200 text-slate-600 text-xs font-medium rounded-full",children:"Pasif"})]}),H.subtitle&&e.jsx("p",{className:"text-sm text-slate-600",children:H.subtitle}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[H.tabs.length," sekme, ",H.tabs.reduce((he,D)=>he+D.featured_packages.length,0)," paket"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1 mr-2 px-2 py-1 bg-white/80 rounded-lg border border-slate-200",children:[e.jsx("button",{onClick:he=>{he.stopPropagation(),oe(H.id,"mobile",!H.default_expanded_mobile)},title:H.default_expanded_mobile?"Mobilde varsayilan acik":"Mobilde varsayilan kapali",className:`p-1.5 rounded-md transition-all ${H.default_expanded_mobile?"bg-emerald-100 text-emerald-600":"bg-slate-100 text-slate-400 hover:bg-slate-200"}`,children:e.jsx(Id,{className:"w-4 h-4"})}),e.jsx("button",{onClick:he=>{he.stopPropagation(),oe(H.id,"desktop",!H.default_expanded_desktop)},title:H.default_expanded_desktop?"Masaustunde varsayilan acik":"Masaustunde varsayilan kapali",className:`p-1.5 rounded-md transition-all ${H.default_expanded_desktop?"bg-emerald-100 text-emerald-600":"bg-slate-100 text-slate-400 hover:bg-slate-200"}`,children:e.jsx(Si,{className:"w-4 h-4"})})]}),e.jsx("button",{onClick:he=>{he.stopPropagation(),g({...H})},className:"p-2 text-slate-500 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",children:e.jsx(Nt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:he=>{he.stopPropagation(),U(H.id)},className:"p-2 text-slate-500 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors",children:e.jsx(xs,{className:"w-4 h-4"})}),ee?e.jsx(Un,{className:"w-5 h-5 text-slate-400"}):e.jsx(is,{className:"w-5 h-5 text-slate-400"})]})]})}),ee&&e.jsx("div",{className:"border-t border-slate-200",children:e.jsxs("div",{className:"p-4 bg-slate-50/50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h4",{className:"font-medium text-slate-700",children:"Sekmeler"}),e.jsxs("button",{onClick:()=>C({groupId:H.id}),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-white border border-slate-300 text-slate-700 rounded-lg hover:bg-slate-50 transition-colors",children:[e.jsx(ns,{className:"w-4 h-4"}),"Sekme Ekle"]})]}),H.tabs.length===0?e.jsx("div",{className:"text-center py-8 bg-white rounded-xl border border-dashed border-slate-300",children:e.jsx("p",{className:"text-slate-500",children:"Henuz sekme eklenmedi"})}):e.jsx("div",{className:"space-y-4",children:H.tabs.map(he=>{const D=kx[he.icon]||mt;return e.jsxs("div",{className:`bg-white rounded-xl border ${he.is_active?"border-slate-200":"border-slate-200 opacity-60"}`,children:[e.jsxs("div",{className:"p-3 border-b border-slate-100 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-slate-100 rounded-lg",children:e.jsx(D,{className:"w-4 h-4 text-slate-600"})}),e.jsx("span",{className:"font-medium text-slate-800",children:he.name}),e.jsxs("span",{className:"text-xs text-slate-500",children:[he.featured_packages.length," paket"]}),!he.is_active&&e.jsx("span",{className:"px-2 py-0.5 bg-slate-200 text-slate-600 text-xs rounded-full",children:"Pasif"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>N({...he}),className:"p-1.5 text-slate-400 hover:text-blue-600 rounded",children:e.jsx(Nt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>q(he.id),className:"p-1.5 text-slate-400 hover:text-red-600 rounded",children:e.jsx(xs,{className:"w-4 h-4"})})]})]}),e.jsx("div",{className:"p-3",children:he.featured_packages.length===0?e.jsxs("div",{className:"text-center py-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-2",children:"Henuz paket eklenmedi"}),e.jsxs("button",{onClick:()=>j({tabId:he.id}),className:"text-sm text-blue-600 hover:text-blue-700",children:[e.jsx(ns,{className:"w-4 h-4 inline mr-1"}),"Paket Ekle"]})]}):e.jsxs("div",{className:"space-y-2",children:[he.featured_packages.map((O,fe)=>{var W,_e,Re,ve,Te,ze,it,ke,Xe,ce,Le;return e.jsxs("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${O.is_highlighted?"bg-gradient-to-r from-pink-50 to-amber-50 border-pink-200":"bg-slate-50 border-slate-200"}`,children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("button",{onClick:()=>Se(he.id,he.featured_packages,fe,"up"),disabled:fe===0,className:"p-0.5 text-slate-400 hover:text-slate-600 disabled:opacity-30",children:e.jsx(Cm,{className:"w-3 h-3"})}),e.jsx("button",{onClick:()=>Se(he.id,he.featured_packages,fe,"down"),disabled:fe===he.featured_packages.length-1,className:"p-0.5 text-slate-400 hover:text-slate-600 disabled:opacity-30",children:e.jsx(Sm,{className:"w-3 h-3"})})]}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-bold text-slate-900",children:(_e=(W=O.package)==null?void 0:W.quantity)==null?void 0:_e.toLocaleStr
1010ing()}),e.jsxs("span",{className:"text-sm text-slate-600",children:[(Te=(ve=(Re=O.package)==null?void 0:Re.category)==null?void 0:ve.platform)==null?void 0:Te.name," ",(it=(ze=O.package)==null?void 0:ze.category)==null?void 0:it.name]}),O.is_highlighted&&e.jsx(Zt,{className:"w-4 h-4 text-amber-500 fill-amber-500"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsxs("span",{className:"font-medium text-green-600",children:["$",(Xe=(ke=O.package)==null?void 0:ke.price)==null?void 0:Xe.toFixed(2)]}),e.jsxs("span",{className:"text-slate-400 line-through text-xs",children:["$",(Le=(ce=O.package)==null?void 0:ce.original_price)==null?void 0:Le.toFixed(2)]}),e.jsxs("span",{className:"text-xs bg-red-100 text-red-700 px-1.5 py-0.5 rounded",children:[O.discount_percentage,"% OFF"]})]}),O.custom_label&&e.jsx("span",{className:"text-xs text-pink-600 font-medium",children:O.custom_label})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>we(O.id,{is_highlighted:!O.is_highlighted}),className:`p-1.5 rounded ${O.is_highlighted?"bg-amber-100 text-amber-600":"text-slate-400 hover:text-amber-600"}`,title:"One Cikart",children:e.jsx(Vt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>{const Fe=prompt("Ozel etiket (bos birakirsaniz silinir):",O.custom_label||"");Fe!==null&&we(O.id,{custom_label:Fe||null})},className:"p-1.5 text-slate-400 hover:text-blue-600 rounded",title:"Etiket Ekle",children:e.jsx(bn,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>{const Fe=prompt("Indirim yuzdesi:",O.discount_percentage.toString());Fe&&we(O.id,{discount_percentage:parseInt(Fe)})},className:"p-1.5 text-slate-400 hover:text-green-600 rounded",title:"Indirim Ayarla",children:e.jsx("span",{className:"text-xs font-bold",children:"%"})}),e.jsx("button",{onClick:()=>se(O.id),className:"p-1.5 text-slate-400 hover:text-red-600 rounded",children:e.jsx(xs,{className:"w-4 h-4"})})]})]},O.id)}),e.jsxs("button",{onClick:()=>j({tabId:he.id}),className:"w-full py-2 border-2 border-dashed border-slate-300 rounded-lg text-sm text-slate-500 hover:border-blue-400 hover:text-blue-600 transition-colors",children:[e.jsx(ns,{className:"w-4 h-4 inline mr-1"}),"Paket Ekle"]})]})})]},he.id)})})]})})]},H.id)})})]}):e.jsx("div",{className:"space-y-4",children:A.map(H=>{const me=de[H.setting_key],ee=(me==null?void 0:me.icon)||tl,Ae=ae.has(H.setting_key);return e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer hover:bg-slate-50",onClick:()=>{P(he=>{const D=new Set(he);return D.has(H.setting_key)?D.delete(H.setting_key):D.add(H.setting_key),D})},children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`p-3 rounded-xl ${H.is_enabled?"bg-gradient-to-br from-blue-500 to-cyan-500":"bg-slate-200"}`,children:e.jsx(ee,{className:`w-5 h-5 ${H.is_enabled?"text-white":"text-slate-500"}`})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900",children:(me==null?void 0:me.title)||H.setting_key}),e.jsx("p",{className:"text-sm text-slate-500",children:me==null?void 0:me.description})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:he=>{he.stopPropagation(),R(H.setting_key,{is_enabled:!H.is_enabled})},className:`relative inline-flex h-7 w-14 items-center rounded-full transition-colors ${H.is_enabled?"bg-green-500":"bg-slate-300"}`,children:e.jsx("span",{className:`inline-block h-5 w-5 transform rounded-full bg-white shadow-md transition-transform ${H.is_enabled?"translate-x-8":"translate-x-1"}`})}),Ae?e.jsx(Un,{className:"w-5 h-5 text-slate-400"}):e.jsx(is,{className:"w-5 h-5 text-slate-400"})]})]}),Ae&&e.jsx("div",{className:"px-4 pb-4 border-t border-slate-100 pt-4",children:e.jsx("pre",{className:"text-xs bg-slate-100 p-4 rounded-lg overflow-auto max-h-64",children:JSON.stringify(H.setting_value,null,2)})})]},H.setting_key)})}),b&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-lg w-full max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"p-6 border-b border-slate-200",children:[e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"Yeni Vitrin Grubu"}),e.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Ana sayfada gosterilecek paket grubunu olusturun"})]}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Grup Adi *"}),e.jsx("input",{type:"text",value:z.name,onChange:H=>I({...z,name:H.target.value}),placeholder:"ornegin: Instagram Growth",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Alt Baslik"}),e.jsx("input",{type:"text",value:z.subtitle,onChange:H=>I({...z,subtitle:H.target.value}),placeholder:"ornegin: Real & High-Quality Services",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Rozet Metni"}),e.jsx("input",{type:"text",value:z.badge_text,onChange:H=>I({...z,badge_text:H.target.value}),placeholder:"ornegin: Limited Time Offer",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Platform Ikonu"}),e.jsx("div",{className:"max-h-40 overflow-y-auto border border-slate-200 rounded-xl p-3 bg-slate-50/50",children:e.jsx("div",{className:"grid grid-cols-8 gap-2",children:Object.entries(go).filter(([H])=>!["X (Twitter)","Twitter"].includes(H)).map(([H,me])=>e.jsx("button",{onClick:()=>I({...z,icon:H}),title:H,className:`p-2.5 rounded-xl border-2 transition-all flex items-center justify-center aspect-square ${z.icon===H?"border-blue-500 bg-blue-100 shadow-md ring-2 ring-blue-200":"border-slate-200 bg-white hover:border-blue-300 hover:bg-blue-50"}`,children:e.jsx(me,{className:`w-5 h-5 ${z.icon===H?"text-blue-600":"text-slate-700"}`})},H))})}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1.5",children:["Secili: ",e.jsx("span",{className:"font-medium text-slate-700",children:z.icon})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Gradient Rengi"}),e.jsx("div",{className:"max-h-48 overflow-y-auto border border-slate-200 rounded-xl p-3 bg-slate-50/50",children:e.jsx("div",{className:"grid grid-cols-4 gap-2",children:sf.map((H,me)=>e.jsx("button",{onClick:()=>I({...z,gradient_from:H.from,gradient_to:H.to}
1010),title:H.name,className:`p-2.5 rounded-xl border-2 transition-all h-11 ${z.gradient_from===H.from&&z.gradient_to===H.to?"border-blue-500 ring-2 ring-blue-200 scale-105":"border-transparent hover:border-white/50 hover:scale-105"}`,style:{background:`linear-gradient(135deg, ${H.from}, ${H.to})`},children:e.jsx("span",{className:"text-white text-[10px] font-semibold drop-shadow-md truncate block",children:H.name})},me))})})]}),e.jsx("div",{className:"p-4 rounded-xl",style:{background:`linear-gradient(135deg, ${z.gradient_from}, ${z.gradient_to})`},children:e.jsxs("div",{className:"flex items-center gap-3",children:[(()=>{const H=go[z.icon]||Za;return e.jsx(H,{className:"w-8 h-8 text-white"})})(),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-white",children:z.name||"Grup Adi"}),e.jsx("p",{className:"text-white/80 text-sm",children:z.subtitle||"Alt baslik"})]})]})})]}),e.jsxs("div",{className:"p-6 border-t border-slate-200 flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>p(!1),className:"px-4 py-2 text-slate-700 hover:bg-slate-100 rounded-xl transition-colors",children:"Iptal"}),e.jsx("button",{onClick:X,disabled:!z.name||x,className:"px-6 py-2 bg-blue-500 text-white rounded-xl hover:bg-blue-600 transition-colors disabled:opacity-50",children:x?e.jsx(Ve,{className:"w-4 h-4 animate-spin"}):"Olustur"})]})]})}),y&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-lg w-full max-h-[90vh] overflow-y-auto",children:[e.jsx("div",{className:"p-6 border-b border-slate-200",children:e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"Grubu Duzenle"})}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Grup Adi *"}),e.jsx("input",{type:"text",value:y.name,onChange:H=>g({...y,name:H.target.value}),className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Alt Baslik"}),e.jsx("input",{type:"text",value:y.subtitle||"",onChange:H=>g({...y,subtitle:H.target.value}),className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Rozet Metni"}),e.jsx("input",{type:"text",value:y.badge_text||"",onChange:H=>g({...y,badge_text:H.target.value}),className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Platform Ikonu"}),e.jsx("div",{className:"max-h-40 overflow-y-auto border border-slate-200 rounded-xl p-3 bg-slate-50/50",children:e.jsx("div",{className:"grid grid-cols-8 gap-2",children:Object.entries(go).filter(([H])=>!["X (Twitter)","Twitter"].includes(H)).map(([H,me])=>e.jsx("button",{onClick:()=>g({...y,icon:H}),title:H,className:`p-2.5 rounded-xl border-2 transition-all flex items-center justify-center aspect-square ${y.icon===H?"border-blue-500 bg-blue-100 shadow-md ring-2 ring-blue-200":"border-slate-200 bg-white hover:border-blue-300 hover:bg-blue-50"}`,children:e.jsx(me,{className:`w-5 h-5 ${y.icon===H?"text-blue-600":"text-slate-700"}`})},H))})}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1.5",children:["Secili: ",e.jsx("span",{className:"font-medium text-slate-700",children:y.icon})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Gradient Rengi"}),e.jsx("div",{className:"max-h-48 overflow-y-auto border border-slate-200 rounded-xl p-3 bg-slate-50/50",children:e.jsx("div",{className:"grid grid-cols-4 gap-2",children:sf.map((H,me)=>e.jsx("button",{onClick:()=>g({...y,gradient_from:H.from,gradient_to:H.to}
1010),title:H.name,className:`p-2.5 rounded-xl border-2 transition-all h-11 ${y.gradient_from===H.from&&y.gradient_to===H.to?"border-blue-500 ring-2 ring-blue-200 scale-105":"border-transparent hover:border-white/50 hover:scale-105"}`,style:{background:`linear-gradient(135deg, ${H.from}, ${H.to})`},children:e.jsx("span",{className:"text-white text-[10px] font-semibold drop-shadow-md truncate block",children:H.name})},me))})})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl",children:[e.jsx("span",{className:"font-medium text-slate-700",children:"Aktif"}),e.jsx("button",{onClick:()=>g({...y,is_active:!y.is_active}),className:`relative inline-flex h-7 w-14 items-center rounded-full transition-colors ${y.is_active?"bg-green-500":"bg-slate-300"}`,children:e.jsx("span",{className:`inline-block h-5 w-5 transform rounded-full bg-white shadow-md transition-transform ${y.is_active?"translate-x-8":"translate-x-1"}`})})]})]}),e.jsxs("div",{className:"p-6 border-t border-slate-200 flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>g(null),className:"px-4 py-2 text-slate-700 hover:bg-slate-100 rounded-xl transition-colors",children:"Iptal"}),e.jsx("button",{onClick:()=>re(y),disabled:!y.name||x,className:"px-6 py-2 bg-blue-500 text-white rounded-xl hover:bg-blue-600 transition-colors disabled:opacity-50",children:x?e.jsx(Ve,{className:"w-4 h-4 animate-spin"}):"Kaydet"})]})]})}),E&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-md w-full",children:[e.jsx("div",{className:"p-6 border-b border-slate-200",children:e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"Yeni Sekme"})}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Sekme Adi *"}),e.jsx("input",{type:"text",value:Z.name,onChange:H=>Q({...Z,name:H.target.value}),placeholder:"ornegin: Followers",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Ikon"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(kx).map(([H,me])=>e.jsx("button",{onClick:()=>Q({...Z,icon:H}),className:`p-3 rounded-xl border-2 transition-all ${Z.icon===H?"border-blue-500 bg-blue-50":"border-slate-200 hover:border-slate-300"}`,children:e.jsx(me,{className:"w-5 h-5"})},H))})]})]}),e.jsxs("div",{className:"p-6 border-t border-slate-200 flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>C(null),className:"px-4 py-2 text-slate-700 hover:bg-slate-100 rounded-xl transition-colors",children:"Iptal"}),e.jsx("button",{onClick:()=>ue(E.groupId),disabled:!Z.name||x,className:"px-6 py-2 bg-blue-500 text-white rounded-xl hover:bg-blue-600 transition-colors disabled:opacity-50",children:x?e.jsx(Ve,{className:"w-4 h-4 animate-spin"}):"Olustur"})]})]})}),w&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-md w-full",children:[e.jsx("div",{className:"p-6 border-b border-slate-200",children:e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"Sekmeyi Duzenle"})}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Sekme Adi *"}),e.jsx("input",{type:"text",value:w.name,onChange:H=>N({...w,name:H.target.value}),className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Ikon"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(kx).map(([H,me])=>e.jsx("button",{onClick:()=>N({...w,icon:H}),className:`p-3 rounded-xl border-2 transition-all ${w.icon===H?"border-blue-500 bg-blue-50":"border-slate-200 hover:border-slate-300"}`,children:e.jsx(me,{className:"w-5 h-5"})},H))})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl",children:[e.jsx("span",{className:"font-medium text-slate-700",children:"Aktif"}),e.jsx("button",{onClick:()=>N({...w,is_active:!w.is_active}),className:`relative inline-flex h-7 w-14 items-center rounded-full transition-colors ${w.is_active?"bg-green-500":"bg-slate-300"}`,children:e.jsx("span",{className:`inline-block h-5 w-5 transform rounded-full bg-white shadow-md transition-transform ${w.is_active?"translate-x-8":"translate-x-1"}`})})]})]}),e.jsxs("div",{className:"p-6 border-t border-slate-200 flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>N(null),className:"px-4 py-2 text-slate-700 hover:bg-slate-100 rounded-xl transition-colors",children:"Iptal"}),e.jsx("button",{onClick:()=>K(w),disabled:!w.name||x,className:"px-6 py-2 bg-blue-500 text-white rounded-xl hover:bg-blue-600 transition-colors disabled:opacity-50",children:x?e.jsx(Ve,{className:"w-4 h-4 animate-spin"}):"Kaydet"})]})]})}),v&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-2xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"p-6 border-b border-slate-200",children:[e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"Paket Ekle"}),e.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Vitrine eklemek istediginiz paketi secin"})]}),e.jsx("div",{className:"p-4 border-b border-slate-200 bg-slate-50",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("input",{type:"text",value:S,onChange:H=>k(H.target.value),placeholder:"Paket ara...",className:"flex-1 px-4 py-2 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),e.jsxs("select",{value:J,onChange:H=>u(H.target.value),className:"px-4 py-2 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[e.jsx("option",{value:"",children:"Tum Platformlar"}),Pe.map(H=>e.jsx("option",{value:H,children:H},H))]})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:e.jsxs("div",{className:"space-y-2",children:[be.map(H=>{var me,ee,Ae,he,D,O;return e.jsxs("button",{onClick:()=>{je(v.tabId,H.id),j(null)},className:"w-full flex items-center justify-between p-4 bg-slate-50 hover:bg-blue-50 rounded-xl border border-slate-200 hover:border-blue-300 transition-all text-left",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-2 bg-white rounded-lg border border-slate-200",children:(()=>{var W,_e;const fe=go[(_e=(W=H.category)==null?void 0:W.platform)==null?void 0:_e.name]||us;return e.jsx(fe,{className:"w-5 h-5 text-slate-600"})})()}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-bold text-slate-900",children:(me=H.quantity)==null?void 0:me.toLocaleStr
1010ing()}),e.jsx("span",{className:"text-slate-600",children:(ee=H.category)==null?void 0:ee.name})]}),e.jsx("span",{className:"text-sm text-slate-500",children:(he=(Ae=H.category)==null?void 0:Ae.platform)==null?void 0:he.name})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"font-bold text-green-600",children:["$",(D=H.price)==null?void 0:D.toFixed(2)]}),H.original_price&&H.original_price>H.price&&e.jsxs("div",{className:"text-xs text-slate-400 line-through",children:["$",(O=H.original_price)==null?void 0:O.toFixed(2)]})]})]},H.id)}),be.length===0&&e.jsx("div",{className:"text-center py-8 text-slate-500",children:"Paket bulunamadi"})]})}),e.jsx("div",{className:"p-6 border-t border-slate-200",children:e.jsx("button",{onClick:()=>j(null),className:"w-full px-4 py-2 text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-colors",children:"Kapat"})})]})})]})}function O5({session:t}){var we,se,Se;const{showConfirm:s}=Vs(),[a,r]=o.useState("campaigns"),[l,n]=o.useState(!1),[i,c]=o.useState(""),[d,x]=o.use
1010State(""),[m,h]=o.useState(null),[f,y]=o.useState([]),[g,w]=o.useState([]),[N,v]=o.useState([]),[j,b]=o.useState([]),[p,E]=o.useState(""),[C,S]=o.useState({name:"",subject:"",content:"",template_id:"",recipient_type:"all"}),[k,J]=o.useState(""),[u,A]=o.useState({host:"",port:"587",username:"",password:"",from_name:"Follx",from_email:"",encryption:"tls"}),[T,ae]=o.useState(null),[P,z]=o.useState(!1),I="https://kdqsajuhvcmxsnttdetg.supabase.co",Z=o.useCallback(async()=>{try{const ie=await(await fetch(`${I}/functions/v1/admin_manage_email_settings`,{headers:{Authorization:`Bearer ${t.access_token}`,"Content-Type":"application/json"}})).json();ie.settings&&(h(ie.settings),A({host:ie.settings.host||"",port:String(ie.settings.port||587),username:ie.settings.username||"",password:ie.settings.password||"",from_name:ie.settings.from_name||"Follx",from_email:ie.settings.from_email||"",encryption:ie.settings.encryption||"tls"}))}catch($){console.error("Error fetching SMTP settings:",$)}},[t.access_token,I]),Q=o.useCallback(async()=>{try{const ie=await(await fetch(`${I}/functions/v1/admin_manage_email_campaigns`,{headers:{Authorization:`Bearer ${t.access_token}`,"Content-Type":"application/json"}})).json();y(ie.campaigns||[])}catch($){console.error("Error fetching campaigns:",$)}},[t.access_token,I]),_=o.useCallback(async()=>{var $;try{const be=await(await fetch(`${I}/functions/v1/admin_manage_email_campaigns?action=templates`,{headers:{Authorization:`Bearer ${t.access_token}`,"Content-Type":"application/json"}})).json();if(w(be.templates||[]),(($=be.templates)==null?void 0:$.length)>0){const Pe=be.templates.find(de=>de.is_default);Pe&&S(de=>({...de,template_id:Pe.id}))}}catch(ie){console.error("Error fetching templates:",ie)}},[t.access_token,I]),M=o.useCallback(async()=>{try{let $=[],ie=1;const be=500;let Pe=!0;for(;Pe;){const H=await(await fetch(`${I}/functions/v1/get_users_list?pageSize=${be}&page=${ie}`,{headers:{Authorization:`Bearer ${t.access_token}`,"Content-Type":"application/json"}})).json(),me=H.users||[];$=$.concat(me),Pe=ie<(H.totalPages||1),ie++}v($)}catch($){console.error("Error fetching users:",$)}},[t.access_token,I]);o.useEffect(()=>{Z(),Q(),_(),M()},[Z,Q,_,M]);const F=async()=>{n(!0),c(""),x("");try{const ie=await(await fetch(`${I}/functions/v1/admin_manage_email_settings`,{method:"POST",headers:{Authorization:`Bearer ${t.access_token}`,"Content-Type":"application/json"},body:JSON.stringify(u)})).json();if(ie.error)throw new Error(ie.error);x("SMTP settings saved successfully"),Z()}catch($){c($.message)}finally{n(!1)}},R=$=>$.split(/[\n,;]+/).map(ie=>ie.trim().toLowerCase()).filter(ie=>ie&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(ie)),X=async()=>{var ie;if(!C.name||!C.subject||!C.content){c("Please fill in all required fields");return}if(C.recipient_type==="selected"&&j.length===0){c("Please select at least one recipient");return}const $=R(k);if(C.recipient_type==="manual"&&$.length===0){c("Please enter at least one valid email address");return}n(!0),c(""),x("");try{const Pe=await(await fetch(`${I}/functions/v1/admin_manage_email_campaigns`,{method:"POST",headers:{Authorization:`Bearer ${t.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({...C,recipient_ids:C.recipient_type==="selected"?j:[],manual_emails:C.recipient_type==="manual"?$:[]})})).json();if(Pe.error)throw new Error(Pe.error);x("Campaign created successfully"),S({name:"",subject:"",content:"",template_id:((ie=g.find(de=>de.is_default))==null?void 0:ie.id)||"",recipient_type:"all"}),b([]),J(""),Q(),r("campaigns")}catch(be){c(be.message)}finally{n(!1)}},re=async $=>{if(!(m!=null&&m.host)||!(m!=null&&m.username)){c("Please configure SMTP settings first");return}n(!0),c(""),x("");try{const be=await(await fetch(`${I}/functions/v1/admin_send_campaign_emails`,{method:"POST",headers:{Authorization:`Bearer ${t.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({campaign_id:$})})).json();if(be.error)throw new Error(be.error);x(`Campaign sent! ${be.sent_count} emails delivered, ${be.failed_count} failed.`),Q()}catch(ie){c(ie.message)}finally{n(!1)}},U=async $=>{if(await s("Are you sure you want to delete this campaign?",{title:"Delete Campaign",type:"warning"}))try{const Pe=await(await fetch(`${I}
1010/functions/v1/admin_manage_email_campaigns?id=${$}`,{method:"DELETE",headers:{Authorization:`Bearer ${t.access_token}`,"Content-Type":"application/json"}})).json();if(Pe.error)throw new Error(Pe.error);x("Campaign deleted"),Q()}catch(be){c(be.message)}},oe=$=>{b(ie=>ie.includes($)?ie.filter(be=>be!==$):[...ie,$])},ue=()=>{const $=N.filter(ie=>{var be,Pe;return((be=ie.email)==null?void 0:be.toLowerCase().includes(p.toLowerCase()))||((Pe=ie.full_name)==null?void 0:Pe.toLowerCase().includes(p.toLowerCase()))});b($.map(ie=>ie.id))},K=()=>{b([])},q=N.filter($=>{var ie,be;return((ie=$.email)==null?void 0:ie.toLowerCase().includes(p.toLowerCase()))||((be=$.full_name)==null?void 0:be.toLowerCase().includes(p.toLowerCase()))}),je=$=>{const ie={draft:"bg-slate-100 text-slate-700",scheduled:"bg-blue-100 text-blue-700",sending:"bg-amber-100 text-amber-700",completed:"bg-green-100 text-green-700",failed:"bg-red-100 text-red-700"};return ie[$]||ie.draft};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Email Marketing"}),e.jsx("p",{className:"text-slate-600 mt-1",children:"Send professional emails to your customers"})]}),e.jsxs("button",{onClick:()=>r("compose"),className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-500 to-cyan-500 text-white rounded-xl font-medium hover:shadow-lg transition-all",children:[e.jsx(ns,{className:"w-5 h-5"}),"New Campaign"]})]}),i&&e.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-xl flex items-center gap-2",children:[e.jsx(nt,{className:"w-5 h-5"}),i,e.jsx("button",{onClick:()=>c(""),className:"ml-auto",children:e.jsx(st,{className:"w-5 h-5"})})]}),d&&e.jsxs("div",{className:"bg-green-50 border border-green-200 text-green-700 px-4 py-3 rounded-xl flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5"}),d,e.jsx("button",{onClick:()=>x(""),className:"ml-auto",children:e.jsx(st,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"flex gap-2 border-b border-slate-200",children:[e.jsx("button",{onClick:()=>r("campaigns"),className:`px-4 py-3 font-medium transition-colors border-b-2 -mb-px ${a==="campaigns"?"text-blue-600 border-blue-600":"text-slate-600 border-transparent hover:text-slate-900"}`,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(eh,{className:"w-5 h-5"}),"Campaigns"]})}),e.jsx("button",{onClick:()=>r("compose"),className:`px-4 py-3 font-medium transition-colors border-b-2 -mb-px ${a==="compose"?"text-blue-600 border-blue-600":"text-slate-600 border-transparent hover:text-slate-900"}`,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ei,{className:"w-5 h-5"}),"Compose"]})}),e.jsx("button",{onClick:()=>r("settings"),className:`px-4 py-3 font-medium transition-colors border-b-2 -mb-px ${a==="settings"?"text-blue-600 border-blue-600":"text-slate-600 border-transparent hover:text-slate-900"}`,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(tl,{className:"w-5 h-5"}),"SMTP Settings"]})})]}),a==="campaigns"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 flex items-center justify-center",children:e.jsx(gs,{className:"w-5 h-5 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:f.length}),e.jsx("p",{className:"text-sm text-slate-600",children:"Total Campaigns"})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-green-100 flex items-center justify-center",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:f.filter($=>$.status==="completed").length}),e.jsx("p",{className:"text-sm text-slate-600",children:"Completed"})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 flex items-center justify-center",children:e.jsx(mt,{className:"w-5 h-5 text-amber-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:N.length}),e.jsx("p",{className:"text-sm text-slate-600",children:"Total Users"})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 flex items-center justify-center",children:e.jsx(Ia,{className:"w-5 h-5 text-cyan-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:f.reduce(($,ie)=>$+(ie.sent_count||0),0)}),e.jsx("p",{className:"text-sm text-slate-600",children:"Emails Sent"})]})]})})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-slate-200 flex items-center justify-between",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"All Campaigns"}),e.jsx("button",{onClick:Q,className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(Ve,{className:"w-5 h-5 text-slate-600"})})]}),f.length===0?e.jsxs("div",{className:"p-12 text-center",children:[e.jsx(gs,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-600",children:"No campaigns yet"}),e.jsx("button",{onClick:()=>r("compose"),className:"mt-4 text-blue-600 hover:text-blue-700 font-medium",children:"Create your first campaign"})]}):e.jsx("div",{className:"divide-y divide-slate-100",children:f.map($=>{var ie,be;return e.jsx("div",{className:"p-4 hover:bg-slate-50 transition-colors",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h4",{className:"font-semibold text-slate-900 truncate",children:$.name}),e.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${je($.status)}`,children:$.status})]}),e.jsx("p",{className:"text-sm text-slate-600 mt-1 truncate",children:$.subject}),e.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(mt,{className:"w-3 h-3"}),$.recipient_type==="all"?"All users":$.recipient_type==="manual"?`${((ie=$.manual_emails)==null?void 0:ie.length)||0} manual`:`${((be=$.recipient_ids)==null?void 0:be.length)||0} selected`]}),$.status==="completed"&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"flex items-center gap-1 text-green-600",children:[e.jsx(ne,{className:"w-3 h-3"}),$.sent_count," sent"]}),$.failed_count>0&&e.jsxs("span",{className:"flex items-center gap-1 text-red-600",children:[e.jsx(st,{className:"w-3 h-3"}),$.failed_count," failed"]})]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ze,{className:"w-3 h-3"}),new Date($.created_at).toLocaleDateString()]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[$.status==="draft"&&e.jsxs("button",{onClick:()=>re($.id),disabled:l,className:"flex items-center gap-1 px-3 py-1.5 bg-green-500 text-white rounded-lg text-sm font-medium hover:bg-green-600 transition-colors disabled:opacity-50",children:[l?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(As,{className:"w-4 h-4"}),"Send"]}),e.jsx("button",{onClick:()=>{ae($),z(!0)},className:"p-2 hover:bg-slate-200 rounded-lg transition-colors",children:e.jsx(Ct,{className:"w-4 h-4 text-slate-600"})}),e.jsx("button",{onClick:()=>U($.id),className:"p-2 hover:bg-red-100 rounded-lg transition-colors",children:e.jsx(xs,{className:"w-4 h-4 text-red-500"})})]})]})},$.id)})})]})]}),a==="compose"&&e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-6",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Campaign Details"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Campaign Name *"}),e.jsx("input",{type:"text",value:C.name,onChange:$=>S(ie=>({...ie,name:$.target.value})),placeholder:"e.g., January Newsletter",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Email Subject *"}),e.jsx("input",{type:"text",value:C.subject,onChange:$=>S(ie=>({...ie,subject:$.target.value})),placeholder:"e.g., Exclusive offer just for you!",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Email Template"}),e.jsxs("select",{value:C.template_id,onChange:$=>S(ie=>({...ie,template_id:$.target.value})),className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500",children:[e.jsx("option",{value:"",children:"No template (plain text)"}),g.map($=>e.jsxs("option",{value:$.id,children:[$.name," ",$.is_default&&"(Default)"]},$.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Email Content *"}),e.jsxs("p",{className:"text-xs text-slate-500 mb-2",children:["Use ","{{name}}"," for recipient name, ","{{email}}"," for email address"]}),e.jsx("textarea",{value:C.content,onChange:$=>S(ie=>({...ie,content:$.target.value})),placeholder:"Write your email content here...",rows:12,className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 font-mono text-sm"})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>
1010r("campaigns"),className:"px-6 py-2.5 border border-slate-300 text-slate-700 rounded-xl font-medium hover:bg-slate-50 transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:X,disabled:l,className:"flex items-center gap-2 px-6 py-2.5 bg-gradient-to-r from-blue-500 to-cyan-500 text-white rounded-xl font-medium hover:shadow-lg transition-all disabled:opacity-50",children:[l?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(ns,{className:"w-5 h-5"}),"Create Campaign"]})]})]}),e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-6",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Recipients"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>S($=>({...$,recipient_type:"all"})),className:`flex-1 px-3 py-2 rounded-xl font-medium text-sm transition-colors ${C.recipient_type==="all"?"bg-blue-500 text-white":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:"All Users"}),e.jsx("button",{onClick:()=>S($=>({...$,recipient_type:"selected"})),className:`flex-1 px-3 py-2 rounded-xl font-medium text-sm transition-colors ${C.recipient_type==="selected"?"bg-blue-500 text-white":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:"Select Users"}),e.jsx("button",{onClick:()=>S($=>({...$,recipient_type:"manual"})),className:`flex-1 px-3 py-2 rounded-xl font-medium text-sm transition-colors ${C.recipient_type==="manual"?"bg-blue-500 text-white":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:"Manual"})]}),C.recipient_type==="all"&&e.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 text-center",children:[e.jsx(mt,{className:"w-8 h-8 text-blue-500 mx-auto mb-2"}),e.jsxs("p",{className:"font-medium text-blue-900",children:[N.length," users"]}),e.jsx("p",{className:"text-sm text-blue-700",children:"Will receive this email"})]}),C.recipient_type==="manual"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Enter email addresses (one per line, or separated by commas)"}),e.jsx("textarea",{value:k,onChange:$=>J($.target.value),placeholder:`[email protected] 1011[email protected] 1012[email protected]`,rows:6,className:"w-full px-3 py-2 border border-slate-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 font-mono"}),e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 text-center",children:e.jsxs("p",{className:"font-medium text-blue-900",children:[R(k).length," valid emails"]})})]}),C.recipient_type==="selected"&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",value:p,onChange:$=>E($.target.value),placeholder:"Search users...",className:"w-full pl-10 pr-4 py-2 border border-slate-300 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsxs("span",{className:"text-slate-600",children:[j.length," selected"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:ue,className:"text-blue-600 hover:text-blue-700",children:"Select all"}),e.jsx("button",{onClick:K,className:"text-slate-600 hover:text-slate-700",children:"Clear"})]})]}),e.jsx("div",{className:"max-h-64 overflow-y-auto border border-slate-200 rounded-xl divide-y divide-slate-100",children:q.map($=>e.jsxs("label",{className:"flex items-center gap-3 p-3 hover:bg-slate-50 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:j.includes($.id),onChange:()=>oe($.id),className:"w-4 h-4 rounded border-slate-300 text-blue-500 focus:ring-blue-500"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900 truncate",children:$.full_name||"No name"}),e.jsx("p",{className:"text-xs text-slate-500 truncate",children:$.email})]})]},$.id))})]})]})]})})]}),a==="settings"&&e.jsx("div",{className:"max-w-2xl",children:e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center",children:e.jsx(er,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"SMTP Configuration"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Configure your email server settings"})]})]}),e.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 mb-6",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(nt,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-amber-800",children:[e.jsx("p",{className:"font-medium mb-1",children:"Tips for avoiding spam filters:"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-amber-700",children:[e.jsx("li",{children:"Use a verified domain with SPF, DKIM, and DMARC records"}),e.jsx("li",{children:"Use a reputable SMTP provider (SendGrid, Mailgun, Amazon SES)"}),e.jsx("li",{children:"Avoid spam trigger words in subject lines"}),e.jsx("li",{children:"Include an unsubscribe link in all emails"})]})]})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:[e.jsx(wt,{className:"w-4 h-4 inline mr-1"}),"SMTP Host"]}),e.jsx("input",{type:"text",value:u.host,onChange:$=>A(ie=>({...ie,host:$.target.value})),placeholder:"smtp.example.com",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Port"}),e.jsx("input",{type:"text",value:u.port,onChange:$=>A(ie=>({...ie,port:$.target.value})),placeholder:"587",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:[e.jsx(gs,{className:"w-4 h-4 inline mr-1"}),"Username / Email"]}),e.jsx("input",{type:"text",value:u.username,onChange:$=>A(ie=>({...ie,username:$.target.value})),placeholder:"[email protected]",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:[e.jsx($t,{className:"w-4 h-4 inline mr-1"}),"Password / API Key"]}),e.jsx("input",{type:"password",value:u.password,onChange:$=>A(ie=>({...ie,password:$.target.value})),placeholder:"Enter password or API key",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"From Name"}),e.jsx("input",{type:"text",value:u.from_name,onChange:$=>A(ie=>({...ie,from_name:$.target.value})),placeholder:"Follx",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"From Email"}),e.jsx("input",{type:"email",value:u.from_email,onChange:$=>A(ie=>({...ie,from_email:$.target.value})),placeholder:"[email protected]",className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"Encryption"}),e.jsxs("select",{value:u.encryption,onChange:$=>A(ie=>({...ie,encryption:$.target.value})),className:"w-full px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500",children:[e.jsx("option",{value:"tls",children:"TLS (Recommended - Port 587)"}),e.jsx("option",{value:"ssl",children:"SSL (Port 465)"}),e.jsx("option",{value:"none",children:"None (Not recommended)"})]})]}),e.jsx("div",{className:"pt-4",children:e.jsxs("button",{onClick:F,disabled:l,className:"w-full flex items-center justify-center gap-2 px-6 py-3 bg-gradient-to-r from-blue-500 to-cyan-500 text-white rounded-xl font-medium hover:shadow-lg transition-all disabled:opacity-50",children:[l?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(Lt,{className:"w-5 h-5"}),"Save Settings"]})})]})]})}),P&&T&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-2xl w-full max-h-[80vh] overflow-hidden",children:[e.jsxs("div",{className:"p-6 border-b border-slate-200 flex items-center justify-between",children:[e.jsx("h3",{className:"font-semibold text-lg text-slate-900",children:T.name}),e.jsx("button",{onClick:()=>z(!1),className:"p-2 hover:bg-slate-100 rounded-lg",children:e.jsx(st,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-500",children:"Subject"}),e.jsx("p",{className:"text-slate-900",children:T.subject})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-500",children:"Status"}),e.jsx("p",{children:e.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${je(T.status)}`,children:T.status})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-500",children:"Recipients"}),e.jsx("p",{className:"text-slate-900",children:T.recipient_type==="all"?"All users":T.recipient_type==="manual"?`${((we=T.manual_emails)==null?void 0:we.length)||0} manual emails`:`${((se=T.recipient_ids)==null?void 0:se.length)||0} selected users`}),T.recipient_type==="manual"&&((Se=T.manual_emails)==null?void 0:Se.length)>0&&e.jsx("div",{className:"mt-2 p-3 bg-slate-50 rounded-lg text-xs text-slate-600 max-h-32 overflow-y-auto",children:T.manual_emails.join(", ")})]}),T.status==="completed"&&e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:T.total_recipients}),e.jsx("p",{className:"text-sm text-slate-600",children:"Total"})]}),e.jsxs("div",{className:"bg-green-50 rounded-xl p-4 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-green-600",children:T.sent_count}),e.jsx("p",{className:"text-sm text-green-700",children:"Sent"})]}),e.jsxs("div",{className:"bg-red-50 rounded-xl p-4 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-red-600",children:T.failed_count}),e.jsx("p",{className:"text-sm text-red-700",children:"Failed"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-500",children:"Content"}),e.jsx("div",{className:"mt-2 p-4 bg-slate-50 rounded-xl whitespace-pre-wrap text-sm text-slate-700",children:T.content})]})]})})]})})]})}const af=t=>{const s=t.toLowerCase();return s.includes("instagram")?e.jsx(Za,{className:"w-4 h-4 text-pink-500"}):s.includes("youtube")?e.jsx(Qi,{className:"w-4 h-4 text-red-500"}):s.includes("twitter")||s.includes(" x ")||s.startsWith("x ")?e.jsx(yl,{className:"w-4 h-4 text-sky-500"}):s.includes("facebook")||s.includes("fb ")?e.jsx(Vn,{className:"w-4 h-4 text-blue-600"}):s.includes("tiktok")||s.includes("tik tok")?e.jsx($o,{className:"w-4 h-4 text-gray-800"}):s.includes("spotify")?e.jsx($o,{className:"w-4 h-4 text-green-500"}):s.includes("linkedin")?e.jsx(th,{className:"w-4 h-4 text-blue-700"}):s.includes("telegram")?e.jsx(As,{className:"w-4 h-4 text-blue-500"}):s.includes("whatsapp")?e.jsx(Ls,{className:"w-4 h-4 text-green-500"}):s.includes("twitch")?e.jsx(ow,{className:"w-4 h-4 text-purple-500"}):s.includes("vimeo")||s.includes("dailymotion")?e.jsx(zs,{className:"w-4 h-4 text-blue-400"}):s.includes("soundcloud")?e.jsx($o,{className:"w-4 h-4 text-orange-500"}):s.includes("pinterest")?e.jsx(wt,{className:"w-4 h-4 text-red-600"}):s.includes("discord")?e.jsx(Ls,{className:"w-4 h-4 text-indigo-500"}
1012):s.includes("reddit")?e.jsx(wt,{className:"w-4 h-4 text-orange-600"}):s.includes("snapchat")?e.jsx(wt,{className:"w-4 h-4 text-yellow-500"}):s.includes("kwai")?e.jsx(zs,{className:"w-4 h-4 text-orange-500"}):s.includes("threads")?e.jsx(Ls,{className:"w-4 h-4 text-gray-800"}):s.includes("wow")?e.jsx(wt,{className:"w-4 h-4 text-cyan-500"}):e.jsx(wt,{className:"w-4 h-4 text-gray-400"})};function z5(){const[t,s]=o.useState([]),[a,r]=o.useState(null),[l,n]=o.useState([]),[i,c]=o.useState([]),[d,x]=o.useState([]),[m,h]=o.useState(!0),[f,y]=o.useState(null),[g,w]=o.useState(null),[N,v]=o.useState(new Set),[j,b]=o.useState(""),[p,E]=o.useState(!1),[C,S]=o.useState(null),[k,J]=o.useState(!1),[u,A]=o.useState("providers"),[T,ae]=o.useState(34),[P,z]=o.useState(null),[I,Z]=o.useState(""),[Q,_]=o.useState(!1),[M,F]=o.useState(null),[R,X]=o.useState(0),re=o.useRef(null),U=o.useRef(null),oe=o.useRef(0),[ue,K]=o.useState(null),[q,je]=o.useState({}),[we,se]=o.useState(0),Se=o.useRef(null),$=o.useRef(null),ie=o.useCallback(async ce=>{try{const Le=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_provider_service_sync_status?providerId=${ce}`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}});if(Le.ok){const Fe=await Le.json();F(Fe);const Me=new Date(Fe.server_now).getTime();if(oe.current=Me-Date.now(),Fe.next_sync_at){const ft=new Date(Fe.next_sync_at).getTime(),pe=Math.max(0,Math.floor((ft-Me)/1e3));X(pe)}Fe.is_running?y(ce):f===ce&&y(null)}}catch(Le){console.error("Error loading sync status:",Le)}},[f]),be=o.useCallback(async()=>{try{const ce=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_global_sync_status",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}});if(ce.ok){const Le=await ce.json();K(Le);const Fe=new Date(Le.server_now).getTime();if(oe.current=Fe-Date.now(),Le.global.next_sync_at){const ft=Math.max(0,Math.floor((new Date(Le.global.next_sync_at).getTime()-Fe)/1e3));se(ft)}const Me={};for(const ft of Le.providers)if(ft.next_sync_at){const pe=Math.max(0,Math.floor((new Date(ft.next_sync_at).getTime()-Fe)/1e3));Me[ft.id]=pe}je(Me)}}catch(ce){console.error("Error loading global sync status:",ce)}},[]);o.useEffect(()=>(de(),Pe(),be(),Se.current=setInterval(()=>{be()},15e3),()=>{Se.current&&clearInterval(Se.current)}),[be]),o.useEffect(()=>{if(a)return H(a.id),ie(a.id),U.current&&clearInterval(U.current),U.current=setInterval(()=>{ie(a.id)},2e4),()=>{U.current&&clearInterval(U.current)}},[a,ie]),o.useEffect(()=>(re.current&&clearInterval(re.current),R>0&&(re.current=setInterval(()=>{X(ce=>ce<=1?(a&&ie(a.id),0):ce-1)},1e3)),()=>{re.current&&clearInterval(re.current)}),[R>0]),o.useEffect(()=>($.current&&clearInterval($.current),$.current=setInterval(()=>{je(ce=>{const Le={};let Fe=!1;for(const[Me,ft]of Object.entries(ce)){const pe=Math.max(0,ft-1);Le[Me]=pe,pe===0&&ft>0&&(Fe=!0)}return Fe&&be(),Le}),se(ce=>Math.max(0,ce-1))},1e3),()=>{$.current&&clearInterval($.current)}),[be]);const Pe=async()=>{try{const ce=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_exchange_rate?currency=TRY",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}});if(ce.ok){const Le=await ce.json();ae(Le.rate||34)}}catch(ce){console.error("Error loading exchange rate:",ce)}},de=async()=>{try{const ce=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_providers");if(ce.ok){const Le=await ce.json();s(Le.providers||[]);const Fe=localStorage.getItem("selectedResellerProvider");if(Fe&&Le.providers){const Me=Le.providers.find(ft=>ft.id===Fe);Me&&r(Me)}}}catch(ce){console.error("Error loading providers:",ce)}finally{h(!1)}},H=async ce=>{try{const Le=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_get_reseller_services?providerId=${ce}`);if(Le.ok){const Fe=await Le.json();n(Fe.categories||[]),c(Fe.services||[]),x(Fe.sync_logs||[])}}
1012catch(Le){console.error("Error loading services:",Le)}},me=async ce=>{var Le;y(ce.id),w(null);try{const Fe=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_sync_provider_services",{method:"POST",body:JSON.stringify({providerId:ce.id,profitMarginTL:ce.profit_margin_tl,profitMarginUSD:ce.profit_margin_usd})}),Me=await Fe.json();Fe.ok?(w({success:!0,message:`Synced ${Me.services_added} new, updated ${Me.services_updated} services. Currency: ${Me.provider_currency}, Margin: ${Me.profit_margin_applied}%, Rate: 1 USD = ${(Le=Me.exchange_rate)==null?void 0:Le.toFixed(2)} TRY`,providerId:ce.id}),de(),(a==null?void 0:a.id)===ce.id&&H(ce.id)):w({success:!1,message:Me.error||"Failed to sync services",providerId:ce.id})}catch(Fe){console.error("Error syncing services:",Fe),w({success:!1,message:Fe instanceof Error?Fe.message:"Failed to sync services",providerId:ce.id})}finally{y(null),ce.id&&(a==null?void 0:a.id)===ce.id&&setTimeout(()=>ie(ce.id),1e3)}},ee=async ce=>{J(!0);try{(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/manage_provider",{method:"PUT",body:JSON.stringify({id:ce.id,currency:ce.currency,profit_margin_tl:ce.profit_margin_tl,profit_margin_usd:ce.profit_margin_usd,priority:ce.priority,description:ce.description})})).ok&&(S(null),de())}catch(Le){console.error("Error updating provider:",Le)}finally{J(!1)}},Ae=async ce=>{const Le=!ce.reseller_active;s(Fe=>Fe.map(Me=>Me.id===ce.id?{...Me,reseller_active:Le}:Me));try{(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/manage_provider",{method:"PUT",body:JSON.stringify({id:ce.id,reseller_active:Le})})).ok||s(Me=>Me.map(ft=>ft.id===ce.id?{...ft,reseller_active:!Le}:ft))}catch{s(Fe=>Fe.map(Me=>Me.id===ce.id?{...Me,reseller_active:!Le}:Me))}},he=ce=>{const Le=new Set(N);Le.has(ce)?Le.delete(ce):Le.add(ce),v(Le)},D=i.filter(ce=>{const Le=j===""||ce.name.toLowerCase().includes(j.toLowerCase())||ce.provider_service_id.includes(j),Fe=p||ce.is_active;return Le&&Fe}),O=ce=>D.filter(Le=>Le.category_id===ce),fe=ce=>{z(ce),Z(ce.description||"")},W=async()=>{if(P){_(!0);try{(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_update_reseller_service",{method:"POST",body:JSON.stringify({serviceId:P.id,description:I})})).ok&&(c(Le=>Le.map(Fe=>Fe.id===P.id?{...Fe,description:I}:Fe)),z(null))}catch(ce){console.error("Error saving description:",ce)}finally{_(!1)}}},_e=ce=>(ue==null?void 0:ue.providers.find(Le=>Le.id===ce))||null,Re=ce=>{const Le=_e(ce.id);return Le?Le.sync_status:ce.sync_status||"never_synced"},ve=ce=>{switch(ce){case"synced":return"text-emerald-600";case"syncing":return"text-amber-600";case"stale":return"text-orange-600";case"error":return"text-red-600";default:return"text-gray-400"}},Te=ce=>{switch(ce){case"synced":return{bg:"bg-emerald-100 text-emerald-700",label:"LIVE"};case"syncing":return{bg:"bg-amber-100 text-amber-700",label:"SYNCING"};case"stale":return{bg:"bg-orange-100 text-orange-700",label:"STALE"};case"error":return{bg:"bg-red-100 text-red-700",label:"FAILED"};default:return{bg:"bg-gray-100 text-gray-500",label:"NEVER"}}},ze=ce=>{switch(ce){case"synced":return e.jsx(ne,{className:"w-4 h-4"});case"syncing":return e.jsx(Ne,{className:"w-4 h-4 animate-spin"});case"stale":return e.jsx(nt,{className:"w-4 h-4"});case"error":return e.jsx(st,{className:"w-4 h-4"});default:return e.jsx(Ze,{className:"w-4 h-4"})}},it=ce=>ce?new Date(ce).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Never",ke=ce=>{const Le=Math.floor(ce/3600),Fe=Math.floor(ce%3600/60),Me=ce%60;return`${String(Le).padStart(2,"0")}:${String(Fe).padStart(2,"0")}:${String(Me).padStart(2,"0")}`},Xe=ce=>{if(!ce)return null;const Le=Date.now()+oe.current-new Date(ce).getTime(),Fe=Math.floor(Le/6e4);if(Fe<60)return`${Fe}m ago`;const Me=Math.floor(Fe/60),ft=Fe%60;return`${Me}h ${ft}m ago`};return m?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-teal-500"})}):e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[e.jsx("div",{className:"flex items-center space-x-4",children:e.jsxs("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[e.jsxs("button",{onClick:()=>A("providers"),className:`px-4 py-2 rounded-md text-sm font-medium transition ${u==="providers"?"bg-teal-600 text-white shadow-sm":"text-gray-500 hover:text-gray-800"}`,children:[e.jsx(er,{className:"w-4 h-4 inline mr-2"}),"Providers (",t.length,")"]}),e.jsxs("button",{onClick:()=>A("services"),className:`px-4 py-2 rounded-md text-sm font-medium transition ${u==="services"?"bg-teal-600 text-white shadow-sm":"text-gray-500 hover:text-gray-800"}`,disabled:!a,children:[e.jsx(us,{className:"w-4 h-4 inline mr-2"}),"Services ",a?`(${i.length})`:""]})]})}),e.jsxs("div",{className:"flex items-center space-x-3 text-sm",children:[ue&&e.jsxs("div",{className:"flex items-center gap-3 bg-slate-800 rounded-lg px-4 py-2 border border-slate-700",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(ja,{className:`w-3.5 h-3.5 ${ue.global.sync_status==="syncing"?"text-amber-400 animate-pulse":"text-emerald-400"}`}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-slate-300",children:"Auto Sync"}),e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[9px] font-bold ${ue.global.sync_status==="syncing"?"bg-amber-500/20 text-amber-400":"bg-emerald-500/20 text-emerald-400"}`,children:ue.global.sync_status==="syncing"?"RUNNING":"ACTIVE"})]}),e.jsx("div",{className:"h-4 w-px bg-slate-600"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Ar,{className:"w-3.5 h-3.5 text-teal-400"}),e.jsx("span",{className:"font-mono text-sm font-bold text-teal-400 tracking-wider min-w-[56px] text-center",children:ue.global.sync_status==="syncing"?e.jsx("span",{className:"text-amber-400 animate-pulse text-xs",children:"SYNCING"}):we>0?ke(we):e.jsx("span",{className:"text-slate-500 text-xs",children:"--:--"})})]}),ue.global.last_sync_at&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-4 w-px bg-slate-600"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[e.jsx(Ze,{className:"w-3 h-3"}),e.jsx("span",{children:it(ue.global.last_sync_at)})]})]})]}),a&&u==="services"&&e.jsxs("div",{className:"flex items-center gap-2 bg-slate-700 rounded-lg px-3 py-1.5 border border-slate-600",children:[M!=null&&M.is_running?e.jsx(Ne,{className:"w-3.5 h-3.5 text-amber-400 animate-spin"}):M!=null&&M.last_sync_success?e.jsx(ne,{className:"w-3.5 h-3.5 text-emerald-400"}):M!=null&&M.last_sync_at?e.jsx(st,{className:"w-3.5 h-3.5 text-red-400"}):e.jsx(Ze,{className:"w-3.5 h-3.5 text-slate-400"}),e.jsx(Ar,{className:"w-3.5 h-3.5 text-teal-400"}),e.jsx("span",{className:"font-mono text-sm font-bold text-teal-400 tracking-wider min-w-[68px] text-center",children:M!=null&&M.is_running?e.jsx("span",{className:"text-amber-400 animate-pulse text-xs",children:"SYNCING"}):R>0?ke(R):M?e.jsx("span",{className:"text-slate-400 text-xs",children:"--:--:--"}):e.jsx(Ne,{className:"w-3.5 h-3.5 text-slate-400 animate-spin inline"})})]}),e.jsxs("div",{className:"flex items-center space-x-2 bg-emerald-50 border border-emerald-200 rounded-lg px-3 py-2",children:[e.jsx(wt,{className:"w-4 h-4 text-emerald-600"}),e.jsx("span",{className:"text-gray-500",children:"USD/TRY:"}),e.jsx("span",{className:"text-gray-900 font-semibold",children:T.toFixed(2)})]})]})]}),u==="providers"&&e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4",children:t.map(ce=>{const Le=Re(ce),Fe=Te(Le),Me=_e(ce.id),ft=(Me==null?void 0:Me.last_sync_at)||ce.last_sync_at,pe=q[ce.id]||0,dt=(Me==null?void 0:Me.is_running)||f===ce.id;return e.jsx("div",{className:`bg-white rounded-xl border transition-all shadow-sm ${(a==null?void 0:a.id)===ce.id?"border-teal-400 ring-2 ring-teal-100":"border-gray-200 hover:border-gray-300 hover:shadow-md"} ${ce.reseller_active?"":"opacity-60"}`,children:e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsxs("div",{className:`w-10 h-10 rounded-lg flex items-center justify-center relative ${ce.reseller_active?"bg-teal-50":"bg-gray-100"}`,children:[e.jsx(er,{className:`w-5 h-5 ${ce.reseller_active?"text-teal-600":"text-gray-400"}`}),Le==="synced"&&ce.reseller_active&&e.jsx("div",{className:"absolute -top-0.5 -right-0.5 w-2.5 h-2.5 bg-emerald-500 rounded-full border-2 border-white"}),dt&&e.jsx("div",{className:"absolute -top-0.5 -right-0.5 w-2.5 h-2.5 bg-amber-500 rounded-full border-2 border-white animate-pulse"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-semibold text-gray-900",children:ce.name}),e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-bold tracking-wide ${Fe.bg}`,children:dt?"SYNCING":Fe.label}),!ce.reseller_active&&e.jsx("span",{className:"px-1.5 py-0.5 bg-red-100 text-red-600 rounded text-[10px] font-medium",children:"Inactive"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-xs mt-0.5",children:[e.jsxs("span",{className:`flex items-center space-x-1 ${ve(Le)}`,children:[dt?e.jsx(Ne,{className:"w-3 h-3 animate-spin"}):ze(Le),e.jsx("span",{children:it(ft)})]}),Me!=null&&Me.sync_duration_ms?e.jsxs("span",{className:"text-gray-400",children:["(",(Me.sync_duration_ms/1e3).toFixed(1),"s)"]}):null]})]})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:()=>Ae(ce),className:`p-1.5 rounded-lg transition ${ce.reseller_active?"text-emerald-500 hover:text-emerald-700 hover:bg-emerald-50":"text-gray-300 hover:text-gray-500 hover:bg-gray-100"}`,title:ce.reseller_active?"Deactivate for reseller":"Activate for reseller",children:ce.reseller_active?e.jsx(Qr,{className:"w-5 h-5"}):e.jsx(Kr,{className:"w-5 h-5"})}),e.jsx("button",{onClick:()=>S(ce),className:"p-1.5 text-gray-400 hover:text-gray-700 hover:bg-gray-100 rounded-lg transition",children:e.jsx(tl,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[e.jsxs("div",{className:"bg-gray-50 rounded-lg p-2.5",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-xs text-gray-500 mb-1",children:[e.jsx(Ev,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Currency"})]}),e.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${ce.currency==="TL"?"bg-
1012orange-100 text-orange-700":"bg-emerald-100 text-emerald-700"}`,children:ce.currency})]}),e.jsxs("div",{className:"bg-gray-50 rounded-lg p-2.5",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-xs text-gray-500 mb-1",children:[e.jsx(Cd,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Profit Margin"})]}),e.jsxs("span",{className:"text-gray-900 font-medium",children:[ce.currency==="TL"?ce.profit_margin_tl:ce.profit_margin_usd,"%"]})]}),e.jsxs("div",{className:"bg-gray-50 rounded-lg p-2.5",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-xs text-gray-500 mb-1",children:[e.jsx(us,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Services"})]}),e.jsx("span",{className:"text-gray-900 font-medium",children:(Me==null?void 0:Me.total_services)||ce.total_services||0})]}),e.jsxs("div",{className:"bg-gray-50 rounded-lg p-2.5",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-xs text-gray-500 mb-1",children:[e.jsx(Ar,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Next Sync"})]}),dt?e.jsx("span",{className:"text-amber-600 text-xs font-medium animate-pulse",children:"Syncing..."}):pe>0?e.jsx("span",{className:"font-mono text-xs font-bold text-teal-700",children:ke(pe)}):e.jsx("span",{className:"text-gray-400 text-xs",children:"--:--:--"})]})]}),(Le==="error"||Le==="stale")&&((Me==null?void 0:Me.sync_error_message)||ce.sync_error_message)&&e.jsx("div",{className:"mb-3 p-2 rounded-lg bg-red-50 border border-red-200",children:e.jsx("p",{className:"text-xs text-red-600 truncate",title:(Me==null?void 0:Me.sync_error_message)||ce.sync_error_message||"",children:(Me==null?void 0:Me.sync_error_message)||ce.sync_error_message})}),(g==null?void 0:g.providerId)===ce.id&&e.jsx("div",{className:`mb-3 p-2.5 rounded-lg text-xs ${g.success?"bg-emerald-50 border border-emerald-200 text-emerald-700":"bg-red-50 border border-red-200 text-red-700"}`,children:g.message}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsxs("button",{onClick:()=>{r(ce),localStorage.setItem("selectedResellerProvider",ce.id),A("services")},className:"flex-1 px-3 py-2 bg-gray-100 hover:bg-gray-200 text-gray-700 text-sm font-medium rounded-lg transition flex items-center justify-center space-x-2",children:[e.jsx(Ct,{className:"w-4 h-4"}),e.jsx("span",{children:"View Services"})]}),e.jsxs("button",{onClick:()=>me(ce),disabled:dt||!ce.reseller_active,className:"flex-1 px-3 py-2 bg-teal-600 hover:bg-teal-500 disabled:bg-gray-200 disabled:text-gray-400 text-white text-sm font-medium rounded-lg transition flex items-center justify-center space-x-2",children:[dt?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Ve,{className:"w-4 h-4"}),e.jsx("span",{children:dt?"Syncing...":"Sync"})]})]})]})},ce.id)})}),u==="services"&&a&&e.jsxs("div",{className:"space-y-4",children:[M&&e.jsx("div",{className:`rounded-xl border p-3 ${M.is_running?"bg-amber-50 border-amber-200":M.last_sync_success?"bg-white border-gray-200":M.last_sync_at?"bg-red-50 border-red-200":"bg-white border-gray-200"}`,children:e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[M.is_running?e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-7 h-7 rounded-full bg-amber-100 flex items-center justify-center",children:e.jsx(Ne,{className:"w-3.5 h-3.5 text-amber-600 animate-spin"})}),e.jsx("div",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 bg-amber-500 rounded-full animate-pulse"})]}):M.last_sync_success?e.jsx("div",{className:"w-7 h-7 rounded-full bg-emerald-100 flex items-center justify-center",children:e.jsx(ne,{className:"w-3.5 h-3.5 text-emerald-600"})}):M.last_sync_at?e.jsx("div",{className:"w-7 h-7 rounded-full bg-red-100 flex items-center justify-center",children:e.jsx(st,{className:"w-3.5 h-3.5 text-red-600"})}):e.jsx("div",{className:"w-7 h-7 rounded-full bg-gray-100 flex items-center justify-center",children:e.jsx(Ze,{className:"w-3.5 h-3.5 text-gray-400"})}),e.jsxs("div",{children:[e.jsx("span",{className:`text-sm font-medium ${M.is_running?"text-amber-700":M.last_sync_success?"text-emerald-700":M.last_sync_at?"text-red-700":"text-gray-500"}`,children:M.is_running?"Sync in progress...":M.last_sync_success?"Last sync successful":M.last_sync_at?"Last sync failed":"Never synced"}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-400 mt-0.5",children:[M.last_sync_at&&!M.is_running&&e.jsx("span",{children:Xe(M.last_sync_at)}),M.last_sync_success&&!M.is_running&&e.jsxs(e.Fragment,{children:[M.updated>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-300",children:"|"}),e.jsxs("span",{children:[M.updated," updated"]})]}),M.disabled>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-300",children:"|"}),e.jsxs("span",{children:[M.disabled," disabled"]})]}),M.sync_duration_ms>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-300",children:"|"}),e.jsxs("span",{children:[(M.sync_duration_ms/1e3).toFixed(1),"s"]})]})]}),M.last_error&&!M.is_running&&e.jsx("span",{className:"text-red-500 max-w-xs truncate",title:M.last_error,children:M.last_error})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2.5 bg-slate-700 rounded-lg px-3.5 py-2 border border-slate-600",children:[e.jsx(Ar,{className:"w-4 h-4 text-teal-400"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 leading-none mb-0.5",children:"Server Cron"}),e.jsx("span",{className:"font-mono text-base font-bold text-teal-400 leading-none tracking-wider",children:M.is_running?e.jsx("span",{className:"text-amber-400 animate-pulse",children:"SYNCING"}):R>0?ke(R):e.jsx("span",{className:"text-emerald-400",children:"STARTING"})})]})]})]})}),e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(er,{className:"w-5 h-5 text-teal-600"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-gray-900",children:a.name}),e.jsxs("p",{className:"text-xs text-gray-500",children:[a.currency," Provider | Margin: ",a.currency==="TL"?a.profit_margin_tl:a.profit_margin_usd,"%"]})]})]}),e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"Search services...",value:j,onChange:ce=>b(ce.target.value),className:"pl-9 pr-4 py-2 bg-white border border-gray-300 rounded-lg text-sm text-gray-900 placeholder-gray-400 focus:border-teal-500 focus:ring-1 focus:ring-teal-500 focus:outline-none w-64"})]}),e.jsxs("label",{className:"flex items-center space-x-2 text-sm text-gray-500 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:p,onChange:ce=>E(ce.target.checked),className:"rounded border-gray-300 text-teal-500 focus:ring-teal-500"}),e.jsx("span",{children:"Show inactive"})]}),e.jsxs("button",{onClick:()=>me(a),disabled:f===a.id||(M==null?void 0:M.is_running),className:"px-4 py-2 bg-teal-600 hover:bg-teal-500 disabled:bg-gray-200 disabled:text-gray-400 text-white text-sm font-medium rounded-lg transition flex items-center space-x-2",children:[f===a.id||M!=null&&M.is_running?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Ve,{className:"w-4 h-4"}),e.jsx("span",{children:f===a.id||M!=null&&M.is_running?"Syncing...":"Sync Services"})]})]})]}),(g==null?void 0:g.providerId)===a.id&&e.jsxs("div",{className:`mb-4 p-3 rounded-lg flex items-start space-x-2 ${g.success?"bg-emerald-50 border border-emerald-200":"bg-red-50 border border-red-200"}`,children:[g.success?e.jsx(ne,{className:"w-5 h-5 text-emerald-600 flex-shrink-0 mt-0.5"}):e.jsx(nt,{className:"w-5 h-5 text-red-600 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:g.success?"text-emerald-700":"text-red-700",children:g.message})]}),e.jsxs("div",{className:"text-sm text-gray-500 mb-2",children:[D.length," services in ",l.length," categories"]})]}),e.jsx("div",{className:"space-y-2",children:l.map(ce=>{const Le=O(ce.id);return Le.length===0&&!p?null:e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden shadow-sm",children:[e.jsxs("button",{onClick:()=>he(ce.id),className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 transition",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[af(ce.name),e.jsx("span",{className:"font-medium text-gray-900",children:ce.name}),e.jsxs("span",{className:"px-2 py-0.5 bg-gray-100 rounded text-xs text-gray-500 font-medium",children:[Le.length," services"]}),!ce.is_active&&e.jsx("span",{className:"px-2 py-0.5 bg-red-100 text-red-600 rounded text-xs font-medium",children:"Inactive"})]}),N.has(ce.id)?e.jsx(Un,{className:"w-5 h-5 text-gray-400"}):e.jsx(is,{className:"w-5 h-5 text-gray-400"})]}),N.has(ce.id)&&e.jsx("div",{className:"border-t border-gray-200",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-xs text-gray-500 border-b border-gray-200 bg-gray-50/50",children:[e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"ID"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Service Name"}),e.jsx("th",{className:"text-right px-4 py-2 font-medium",children:"Min"}),e.jsx("th",{className:"text-right px-4 py-2 font-medium",children:"Max"}),e.jsx("th",{className:"text-right px-4 py-2 font-medium",children:"Cost (USD)"}),e.jsx("th",{className:"text-right px-4 py-2 font-medium",children:"Sell (USD)"}),e.jsx("th",{className:"text-right px-4 py-2 font-medium",children:"Margin"}),e.jsx("th",{className:"text-center px-4 py-2 font-medium",children:"Features"}),e.jsx("th",{className:"text-center px-4 py-2 font-medium",children:"Status"}),e.jsx("th",{className:"text-center px-4 py-2 font-medium",children:"Actions"})]})}),e.jsx("tbody",{children:Le.map(Fe=>{var Me,ft,pe,dt;return e.jsxs("tr",{className:"border-b border-gray-100 hover:bg-gray-50/50",children:[e.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:Fe.provider_service_id}),e.jsxs("td",{className:"px-4 py-2 max-w-md",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-900",children:[af(Fe.name),e.jsx("span",{children:Fe.name})]}),Fe.description&&e.jsxs("details",{className:"mt-1 ml-6",children:[e.jsx("summary",{className:"text-xs text-teal-600 cursor-pointer hover:text-teal-500",children:"View Description"}),e.jsx("div",{className:"mt-1 p-2 bg-gray-50 rounded text-xs text-gray-600 whitespace-pre-line border border-gray-200",children:Fe.description})]})]}),e.jsx("td",{className:"px-4 py-2 text-right text-sm text-gray-700",children:Fe.min_quantity.toLocaleStr
1012ing()}),e.jsx("td",{className:"px-4 py-2 text-right text-sm text-gray-700",children:Fe.max_quantity.toLocaleString()}),e.jsxs("td",{className:"px-4 py-2 text-right text-sm text-gray-500",children:["$",((Me=Fe.cost_price_usd)==null?void 0:Me.toFixed(4))||((ft=Fe.rate_usd)==null?void 0:ft.toFixed(4))||"0.0000"]}),e.jsxs("td",{className:"px-4 py-2 text-right text-sm text-emerald-600 font-medium",children:["$",((pe=Fe.sell_price_usd)==null?void 0:pe.toFixed(4))||((dt=Fe.reseller_rate)==null?void 0:dt.toFixed(4))||"0.0000"]}),e.jsx("td",{className:"px-4 py-2 text-right",children:e.jsxs("span",{className:"px-2 py-0.5 bg-teal-50 text-teal-700 rounded text-xs font-medium",children:[Fe.profit_margin,"%"]})}),e.jsx("td",{className:"px-4 py-2",children:e.jsxs("div",{className:"flex items-center justify-center space-x-1",children:[Fe.refill&&e.jsx("span",{className:"px-1.5 py-0.5 bg-emerald-100 text-emerald-700 rounded text-xs",title:"Refill",children:"R"}),Fe.cancel&&e.jsx("span",{className:"px-1.5 py-0.5 bg-amber-100 text-amber-700 rounded text-xs",title:"Cancel",children:"C"}),Fe.dripfeed&&e.jsx("span",{className:"px-1.5 py-0.5 bg-blue-100 text-blue-700 rounded text-xs",title:"Dripfeed",children:"D"})]})}),e.jsx("td",{className:"px-4 py-2 text-center",children:Fe.is_active?e.jsx("span",{className:"px-2 py-0.5 bg-emerald-100 text-emerald-700 rounded text-xs font-medium",children:"Active"}):e.jsx("span",{className:"px-2 py-0.5 bg-red-100 text-red-600 rounded text-xs font-medium",children:"Inactive"})}),e.jsx("td",{className:"px-4 py-2 text-center",children:e.jsx("button",{onClick:()=>fe(Fe),className:"p-1.5 text-gray-400 hover:text-teal-600 hover:bg-gray-100 rounded transition",title:"Edit Description",children:e.jsx(lm,{className:"w-4 h-4"})})})]},Fe.id)})})]})})})]},ce.id)})})]}),C&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 w-full max-w-lg shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Provider Settings"}),e.jsx("button",{onClick:()=>S(null),className:"p-1 text-gray-400 hover:text-gray-700 rounded-lg hover:bg-gray-100",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Provider Name"}),e.jsx("input",{type:"text",value:C.name,disabled:!0,className:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-lg text-gray-900 disabled:opacity-60"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Currency"}),e.jsxs("select",{value:C.currency,onChange:ce=>S({...C,currency:ce.target.value}),className:"w-full px-3 py-2 bg-white border border-gray-300 rounded-lg text-gray-900 focus:border-teal-500 focus:ring-1 focus:ring-teal-500 focus:outline-none",children:[e.jsx("option",{value:"TL",children:"TL (Turkish Lira)"}),e.jsx("option",{value:"USD",children:"USD (US Dollar)"})]}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Select the currency that this provider uses for pricing"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"TL Profit Margin (%)"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"number",value:C.profit_margin_tl,onChange:ce=>S({...C,profit_margin_tl:parseFloat(ce.target.value)||0}),className:"w-full px-3 py-2 bg-white border border-gray-300 rounded-lg text-gray-900 focus:border-teal-500 focus:ring-1 focus:ring-teal-500 focus:outline-none pr-8"}),e.jsx(Cd,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"})]}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Applied when currency is TL"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"USD Profit Margin (%)"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"number",value:C.profit_margin_usd,onChange:ce=>S({...C,profit_margin_usd:parseFloat(ce.target.value)||0}),className:"w-full px-3 py-2 bg-white border border-gray-300 rounded-lg text-gray-900 focus:border-teal-500 focus:ring-1 focus:ring-teal-500 focus:outline-none pr-8"}),e.jsx(Cd,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"})]}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Applied when currency is USD"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Priority"}),e.jsx("input",{type:"number",value:C.priority,onChange:ce=>S({...C,priority:parseInt(ce.target.value)||0}),className:"w-full px-3 py-2 bg-white border border-gray-300 rounded-lg text-gray-900 focus:border-teal-500 focus:ring-1 focus:ring-teal-500 focus:outline-none"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Higher priority providers are used first for orders"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),e.jsx("textarea",{value:C.description||"",onChange:ce=>S({...C,description:ce.target.value}),rows:3,className:"w-full px-3 py-2 bg-white border border-gray-300 rounded-lg text-gray-900 focus:border-teal-500 focus:ring-1 focus:ring-teal-500 focus:outline-none resize-none",placeholder:"Provider description..."})]}),e.jsxs("div",{className:"bg-gray-50 rounded-lg p-3 border border-gray-200",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Pricing Preview"}),e.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[e.jsxs("p",{children:["If provider rate is ",e.jsxs("span",{className:"text-gray-900 font-medium",children:["1000 ",C.currency]}),":"]}),C.currency==="TL"?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Cost in USD: $",(1e3/T).toFixed(4)]}),e.jsxs("p",{children:["Sell price: ",e.jsxs("span",{className:"text-emerald-600 font-medium",children:["$",(1e3/T*(1+C.profit_margin_tl/100)).toFixed(4)]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Cost in USD: $1000.0000"}),e.jsxs("p",{children:["Sell price: ",e.jsxs("span",{className:"text-emerald-600 font-medium",children:["$",(1e3*(1+C.profit_margin_usd/100)).toFixed(4)]})]})]})]})]})]}),e.jsxs("div",{className:"flex justify-end space-x-3 p-4 border-t border-gray-200",children:[e.jsx("button",{onClick:()=>S(null),className:"px-4 py-2 text-gray-500 hover:text-gray-700 transition",children:"Cancel"}),e.jsxs("button",{onClick:()=>ee(C),disabled:k,className:"px-4 py-2 bg-teal-600 hover:bg-teal-500 text-white font-medium rounded-lg transition flex items-center space-x-2 disabled:opacity-50",children:[k?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),e.jsx("span",{children:"Save Changes"})]})]})]})}),P&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 w-full max-w-2xl shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Edit Service Description"}),e.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[P.provider_service_id," - ",P.name]})]}),e.jsx("button",{onClick:()=>z(null),className:"p-1 text-gray-400 hover:text-gray-700 rounded-lg hover:bg-gray-100",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),e.jsx("textarea",{value:I,onChange:ce=>Z(ce.target.value),rows:8,className:"w-full px-3 py-2 bg-white border border-gray-300 rounded-lg text-gray-900 focus:border-teal-500 focus:ring-1 focus:ring-teal-500 focus:outline-none resize-none",placeholder:"Enter service description... This will be shown to customers when they select this service."}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Add important notes like: link requirements, delivery time, restrictions, etc."})]}),e.jsxs("div",{className:"bg-gray-50 rounded-lg p-3 border border-gray-200",children:[e.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Example Description:"}),e.jsxs("div",{className:"text-xs text-gray-500 space-y-1",children:[e.jsx("p",{children:"- The link you provide must be visible to everyone."}),e.jsx("p",{children:"- Private links are not accepted."}
1012),e.jsx("p",{children:"- Do not hide your account during the process."}),e.jsx("p",{children:"- Completion time may vary depending on quantity."})]})]})]}),e.jsxs("div",{className:"flex justify-end space-x-3 p-4 border-t border-gray-200",children:[e.jsx("button",{onClick:()=>z(null),className:"px-4 py-2 text-gray-500 hover:text-gray-700 transition",children:"Cancel"}),e.jsxs("button",{onClick:W,disabled:Q,className:"px-4 py-2 bg-teal-600 hover:bg-teal-500 text-white font-medium rounded-lg transition flex items-center space-x-2 disabled:opacity-50",children:[Q?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),e.jsx("span",{children:"Save Description"})]})]})]})})]})}function $5({apiResellers:t,apiStats:s,apiLoading:a,apiActionLoading:r,selectedApiReseller:l,apiResellerLogs:n,rateLimitInput:i,setRateLimitInput:c,onLoad:d,onLoadDetail:x,onAction:m,onCloseDetail:h}){var v,j,b;const{showConfirm:f}=Vs(),[y,g]=o.useState(""),w=t.filter(p=>{var C,S,k,J,u;if(!y)return!0;const E=y.toLowerCase();return((C=p.company_name)==null?void 0:C.toLowerCase().includes(E))||((k=(S=p.user)==null?void 0:S.email)==null?void 0:k.toLowerCase().includes(E))||((u=(J=p.user)==null?void 0:J.full_name)==null?void 0:u.toLowerCase().includes(E))}),N=p=>p?new Date(p).toLocaleString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"-";return l?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:h,className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(Ua,{className:"w-5 h-5 text-slate-600"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900",children:((v=l.user)==null?void 0:v.full_name)||((j=l.user)==null?void 0:j.email)||"Reseller"}),e.jsx("p",{className:"text-sm text-slate-500",children:(b=l.user)==null?void 0:b.email})]}),e.jsx("div",{className:"ml-auto flex items-center gap-2",children:l.api_suspended?e.
1012jsx("span",{className:"px-3 py-1 bg-red-100 text-red-700 text-xs font-semibold rounded-full",children:"Askida"}):l.api_enabled?e.jsx("span",{className:"px-3 py-1 bg-green-100 text-green-700 text-xs font-semibold rounded-full",children:"Aktif"}):e.jsx("span",{className:"px-3 py-1 bg-slate-100 text-slate-600 text-xs font-semibold rounded-full",children:"Pasif"})})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Bugunki Istek"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:l.api_requests_today||0})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Toplam Istek"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:(l.api_requests_total||0).toLocaleString()})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Rate Limit"}),e.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[l.api_rate_limit||60,"/dk"]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Son Istek"}),e.jsx("p",{className:"text-sm font-medium text-slate-700",children:N(l.last_api_request)})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"API Anahtari"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("code",{className:"flex-1 px-4 py-3 bg-slate-50 rounded-lg text-sm font-mono text-slate-700 truncate",children:l.api_key||"Anahtar yok"}),e.jsx("button",{onClick:()=>{l.api_key&&navigator.clipboard.writeText(l.api_key)},className:"p-2.5 hover:bg-slate-100 rounded-lg transition-colors",title:"Kopyala",children:e.jsx(Ht,{className:"w-4 h-4 text-slate-500"})}),e.jsx("button",{onClick:async()=>{await f("API anahtari sifirlanacak. Mevcut anahtar gecersiz olacak. Emin misiniz?",{title:"Reset API Key",type:"warning"})&&m(l.id,"reset_key")},disabled:r===`${l.id}_reset_key`,className:"px-4 py-2.5 bg-amber-100 text-amber-700 text-sm font-medium rounded-lg hover:bg-amber-200 transition-colors disabled:opacity-50",children:r===`${l.id}_reset_key`?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(rw,{className:"w-3.5 h-3.5"})," Sifirla"]})})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Hizli Islemler"}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[l.api_enabled&&!l.api_suspended&&e.jsxs("button",{onClick:()=>m(l.id,"suspend_api"),disabled:!!r,className:"flex items-center gap-2 px-4 py-2.5 bg-red-50 text-red-700 rounded-lg hover:bg-red-100 transition-colors text-sm font-medium disabled:opacity-50",children:[e.jsx(Lo,{className:"w-4 h-4"})," Askiya Al"]}),l.api_suspended&&e.jsxs("button",{onClick:()=>m(l.id,"unsuspend_api"),disabled:!!r,className:"flex items-center gap-2 px-4 py-2.5 bg-green-50 text-green-700 rounded-lg hover:bg-green-100 transition-colors text-sm font-medium disabled:opacity-50",children:[e.jsx(zs,{className:"w-4 h-4"})," Askiyi Kaldir"]}),l.api_enabled&&e.jsxs("button",{onClick:async()=>
1012{await f("API erisimi tamamen kapatilacak. Emin misiniz?",{title:"Disable API Access",type:"warning"})&&m(l.id,"disable_api")},disabled:!!r,className:"flex items-center gap-2 px-4 py-2.5 bg-slate-100 text-slate-700 rounded-lg hover:bg-slate-200 transition-colors text-sm font-medium disabled:opacity-50",children:[e.jsx(st,{className:"w-4 h-4"})," API Kapat"]}),!l.api_enabled&&e.jsxs("button",{onClick:()=>m(l.id,"enable_api"),disabled:!!r,className:"flex items-center gap-2 px-4 py-2.5 bg-blue-50 text-blue-700 rounded-lg hover:bg-blue-100 transition-colors text-sm font-medium disabled:opacity-50",children:[e.jsx(zs,{className:"w-4 h-4"})," API Ac"]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-slate-100 flex items-center justify-between",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"Son API Loglari"}),e.jsxs("span",{className:"text-xs text-slate-500",children:[n.length," kayit"]})]}),n.length===0?e.jsx("div",{className:"p-8 text-center text-slate-400",children:"Henuz API logu yok"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50",children:[e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Tarih"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Aksiyon"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Durum"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"IP"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Sure"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:n.map(p=>e.jsxs("tr",{className:"hover:bg-slate-50 transition-colors",children:[e.jsx("td",{className:"px-4 py-3 text-slate-600 whitespace-nowrap",children:N(p.created_at)}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"px-2 py-0.5 bg-blue-50 text-blue-700 text-xs font-medium rounded",children:p.action})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:`px-2 py-0.5 text-xs font-medium rounded ${p.status_code<300?"bg-green-50 text-green-700":p.status_code<500?"bg-amber-50 text-amber-700":"bg-red-50 text-red-700"}`,children:p.status_code})}),e.jsx("td",{className:"px-4 py-3 text-slate-500 font-mono text-xs",children:p.ip_address||"-"}),e.jsx("td",{className:"px-4 py-3 text-slate-500",children:p.duration_ms?`${p.duration_ms}ms`:"-"})]},p.id))})]})})]})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900",children:"API Yonetimi"}),e.jsx("p",{className:"text-slate-500 mt-1",children:"Reseller API erisimlerini yonetin ve izleyin"})]}),e.jsxs("button",{onClick:d,disabled:a,className:"flex items-center gap-2 px-4 py-2 text-slate-600 hover:text-slate-900 hover:bg-slate-100 rounded-lg transition-colors",children:[a?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(Ve,{className:"w-5 h-5"}),"Yenile"]})]}),s&&e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center gap-3 mb-3",children:e.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-5 h-5 text-blue-600"})})}),e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"API Kullanicilari"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:s.total_api_users})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center gap-3 mb-3",children:e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center",children:e.jsx(ja,{className:"w-5 h-5 text-green-600"})})}),e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Bugunki Istekler"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:(s.today_requests||0).toLocaleStr
1012ing()})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center gap-3 mb-3",children:e.jsx("div",{className:"w-10 h-10 bg-slate-100 rounded-lg flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-slate-600"})})}),e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Toplam Istek"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:(s.total_requests||0).toLocaleString()})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center gap-3 mb-3",children:e.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-lg flex items-center justify-center",children:e.jsx(Fs,{className:"w-5 h-5 text-red-600"})})}),e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Hatalar (24s)"}),e.jsx("p",{className:"text-2xl font-bold text-red-600",children:s.errors_24h||0})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-slate-100 flex items-center justify-between",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"API Erisimli Reseller'lar"}),e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Ara...",value:y,onChange:p=>g(p.target.value),className:"pl-9 pr-4 py-2 border border-slate-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 w-56"})]})]}),a?e.jsxs("div",{className:"p-12 text-center",children:[e.jsx(Ne,{className:"w-8 h-8 animate-spin text-blue-600 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-500",children:"Yukleniyor..."})]}):w.length===0?e.jsxs("div",{className:"p-12 text-center",children:[e.jsx(Dr,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-500",children:"Henuz API erisimli reseller yok"})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50",children:[e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Reseller"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Durum"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Bugun"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Toplam"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Rate Limit"}),e.jsx("th",{className:"px-4 py-3 text-left font-medium text-slate-600",children:"Son Istek"}),e.jsx("th",{className:"px-4 py-3 text-right font-medium text-slate-600",children:"Islemler"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:w.map(p=>{var E,C;return e.jsxs("tr",{className:"hover:bg-slate-50 transition-colors",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:p.company_name||((E=p.user)==null?void 0:E.full_name)||"-"}),e.jsx("p",{className:"text-xs text-slate-500",children:(C=p.user)==null?void 0:C.email})]})}
1012),e.jsx("td",{className:"px-4 py-3",children:p.api_suspended?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 bg-red-50 text-red-700 text-xs font-semibold rounded-full",children:[e.jsx(Lo,{className:"w-3 h-3"})," Askida"]}):p.api_enabled?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 bg-green-50 text-green-700 text-xs font-semibold rounded-full",children:[e.jsx(ne,{className:"w-3 h-3"})," Aktif"]}):e.jsx("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 bg-slate-100 text-slate-600 text-xs font-semibold rounded-full",children:"Pasif"})}),e.jsx("td",{className:"px-4 py-3 font-mono text-slate-700",children:p.api_requests_today||0}),e.jsx("td",{className:"px-4 py-3 font-mono text-slate-700",children:(p.api_requests_total||0).toLocaleString()}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"number",value:i[p.id]??String(p.api_rate_limit||60),onChange:S=>c({...i,[p.id]:S.target.value}),min:"1",max:"1000",className:"w-20 px-2 py-1.5 border border-slate-200 rounded-lg text-xs font-mono focus:ring-2 focus:ring-blue-500"}),i[p.id]&&String(p.api_rate_limit||60)!==i[p.id]&&e.jsx("button",{onClick:()=>{m(p.id,"set_rate_limit",{rate_limit:i[p.id]}),c({...i,[p.id]:""})},disabled:!!r,className:"px-2 py-1 bg-blue-600 text-white text-xs rounded hover:bg-blue-700 transition-colors disabled:opacity-50",children:"Kaydet"})]})}),e.jsx("td",{className:"px-4 py-3 text-xs text-slate-500 whitespace-nowrap",children:N(p.last_api_request)}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[e.jsx("button",{onClick:()=>x(p.id),className:"p-1.5 hover:bg-slate-100 rounded-lg transition-colors",title:"Detay",children:e.jsx(Ct,{className:"w-4 h-4 text-slate-500"})}),p.api_enabled&&!p.api_suspended&&e.jsx("button",{onClick:()=>m(p.id,"suspend_api"),disabled:!!r,className:"p-1.5 hover:bg-red-50 rounded-lg transition-colors",title:"Askiya Al",children:e.jsx(Lo,{className:"w-4 h-4 text-red-500"})}),p.api_suspended&&e.jsx("button",{onClick:()=>m(p.id,"unsuspend_api"),disabled:!!r,className:"p-1.5 hover:bg-green-50 rounded-lg transition-colors",title:"Askiyi Kaldir",children:e.jsx(zs,{className:"w-4 h-4 text-green-500"})})]})})]},p.id)})})]})})]})]})}function L5(){var Bt,Ts,ps,Bs,Xt,lr,Kt;const{showConfirm:t}=Vs(),[s,a]=o.useState("overview"),[r,l]=o.useState([]),[n,i]=o.useState([]),[c,d]=o.useState([]),[x,m]=o.useState([]),[h,f]=o.useState([]),[y,g]=o.useState(null),[w,N]=o.useState(!0),[v,j]=o.useState(""),[b,p]=o.use
1012State("all"),[E,C]=o.useState(null),[S,k]=o.useState(null),[J,u]=o.useState(null),[A,T]=o.useState(!1),[ae,P]=o.useState(!1),[z,I]=o.useState(!1),[Z,Q]=o.useState(""),[_,M]=o.useState(!1),[F,R]=o.useState({cookie_days:"30",commission_rate:"10",min_payout:"5",signup_commission:"5",fraud_detection_enabled:!0,block_self_referral:!0,same_ip_threshold:"5"}),[X,re]=o.useState(null),[U,oe]=o.useState(!1),[ue,K]=o.useState(null),[q,je]=o.useState({name:"",commission_rate:"10",min_conversions:"0",min_revenue:"0",bonus_rate:"0",lifetime_attribution:!1,cookie_days:"30",is_active:!0}),[we,se]=o.useState(!1),[Se,$]=o.useState(null),[ie,be]=o.useState([]),[Pe,de]=o.useState(null),[H,me]=o.useState(!1),[ee,Ae]=o.useState(null),[he,D]=o.useState(null),[O,fe]=o.useState([]),[W,_e]=o.useState({}),Re=(Y,qe)=>{re({type:Y,message:qe}),setTimeout(()=>re(null),4e3)},ve=(Y,qe)=>We(Y,qe);o.useEffect(()=>{Te()},[]),o.useEffect(()=>{s==="api_management"&&ke()},[s]);const Te=async()=>{N(!0),await Promise.all([Le(),Fe(),Me(),ft(),pe(),dt(),ze()]),N(!1)},ze=async()=>{try{const Y=await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_environment_settings",{headers:{}});if(Y.ok){const qe=await Y.json(),gt=(Array.isArray(qe)?qe:Array.isArray(qe.settings)?qe.settings:[]).reduce((ds,ys)=>(ds[ys.key]=ys.value,ds),{});R({cookie_days:gt.affiliate_default_cookie_days||"30",commission_rate:gt.affiliate_default_commission_rate||"10",min_payout:gt.affiliate_min_payout||"5",signup_commission:gt.affiliate_signup_commission||"5",fraud_detection_enabled:gt.affiliate_fraud_detection_enabled==="true",block_self_referral:gt.affiliate_block_self_referral==="true",same_ip_threshold:gt.affiliate_same_ip_threshold||"5"})}}catch(Y){console.error("Error loading affiliate settings:",Y)}},it=async()=>{if(parseInt(F.commission_rate)<1||parseInt(F.commission_rate)>50){Re("error","Komisyon orani 1-50 arasinda olmalidir");return}if(parseInt(F.cookie_days)<1||parseInt(F.cookie_days)>365){Re("error","Cookie suresi 1-365 gun arasinda olmalidir");return}if(parseInt(F.min_payout)<1){Re("error","Minimum odeme tutari 1$ veya uzerinde olmalidir");return}M(!0);try{const Y=[{key:"affiliate_default_cookie_days",value:F.cookie_days},{key:"affiliate_default_commission_rate",value:F.commission_rate},{key:"affiliate_min_payout",value:F.min_payout},{key:"affiliate_signup_commission",value:F.signup_commission},{key:"affiliate_fraud_detection_enabled",value:F.fraud_detection_enabled?"true":"false"},{key:"affiliate_block_self_referral",value:F.block_self_referral?"true":"false"},{key:"affiliate_same_ip_threshold",value:F.same_ip_threshold}];let qe=!1;for(const ct of Y)(await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/update_environment_setting",{method:"POST",headers:{},body:JSON.stringify(ct)})).ok||(qe=!0);qe?Re("error","Bazi ayarlar kaydedilemedi"):Re("success","Tum ayarlar basariyla kaydedildi")}catch(Y){console.error("Error saving settings:",Y),Re("error","Ayarlar kaydedilirken bir hata olustu")}finally{M(!1)}},ke=async()=>{me(!0);try{const Y=await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_reseller_api",{method:"GET"});if(Y.ok){const qe=await Y.json();be(qe.resellers||[]),de(qe.stats||null)}}catch(Y){console.error("Error loading API management:",Y)}finally{me(!1)}},Xe=async Y=>{try{const qe=await ve(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_reseller_api?resellerId=${Y}`,{method:"GET"});if(qe.ok){const ct=await qe.json();D(ct.reseller),fe(ct.logs||[])}}catch(qe){console.error("Error loading API reseller detail:",qe)}},ce=async(Y,qe,ct)=>{Ae(`${Y}_${qe}`);try{const gt=await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_reseller_api",{method:"POST",body:JSON.stringify({action:qe,resellerId:Y,...ct})});if(gt.ok)Re("success","Islem basarili"),await ke(),(he==null?void 0:he.id)===Y&&await Xe(Y);else{const ds=await gt.json();Re("error",ds.error||"Islem basarisiz")}}catch(gt){console.error("Error performing API action:",gt),Re("error","Islem sirasinda hata olustu")}finally{Ae(null)}},Le=async()=>{try{const Y=await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_get_affiliate_stats",{});if(Y.ok){const qe=await Y.json();g(qe)}}catch(Y){console.error("Error loading stats:",Y)}},Fe=async()=>{try{const Y=await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_get_affiliates",{});if(Y.ok){const qe=await Y.json();l(qe)}}catch(Y){console.error("Error loading affiliates:",Y)}},Me=async()=>{try{const Y=await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_get_resellers",{});if(Y.ok){const qe=await Y.json();i(qe)}
1012}catch(Y){console.error("Error loading resellers:",Y)}},ft=async()=>{const{data:Y}=await Ye.from("affiliate_payouts").select(` 1013 *, 1014 affiliate:affiliates( 1015 affiliate_code, 1016 user:users(email, name) 1017 ) 1018 `).order("created_at",{ascending:!1});Y&&d(Y)},pe=async()=>{const{data:Y}=await Ye.from("fraud_flags").select(` 1019 *, 1020 affiliate:affiliates( 1021 affiliate_code, 1022 user:users(email) 1023 ) 1024 `).eq("resolved",!1).order("created_at",{ascending:!1});Y&&m(Y)},dt=async()=>{const{data:Y}=await Ye.from("affiliate_tiers").select("*").order("priority");Y&&f(Y)},ot=Y=>{Y?(K(Y),je({name:Y.name,commission_rate:Y.commission_rate.toString(),min_conversions:Y.min_conversions.toString(),min_revenue:Y.min_revenue.toString(),bonus_rate:Y.bonus_rate.toString(),lifetime_attribution:Y.lifetime_attribution,cookie_days:Y.cookie_days.toString(),is_active:Y.is_active})):(K(null),je({name:"",commission_rate:"10",min_conversions:"0",min_revenue:"0",bonus_rate:"0",lifetime_attribution:!1,cookie_days:"30",is_active:!0})),oe(!0)},Mt=async()=>{if(!q.name.trim()){Re("error","Seviye adi zorunludur");return}se(!0);try{const Y=ue?"PUT":"POST",qe={...ue&&{id:ue.id},name:q.name.trim(),commission_rate:parseFloat(q.commission_rate)||10,min_conversions:parseInt(q.min_conversions)||0,min_revenue:parseFloat(q.min_revenue)||0,bonus_rate:parseFloat(q.bonus_rate)||0,lifetime_attribution:q.lifetime_attribution,cookie_days:parseInt(q.cookie_days)||30,is_active:q.is_active},ct=await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_affiliate_tiers",{method:Y,headers:{},body:JSON.stringify(qe)});if(ct.ok)Re("success",ue?"Seviye guncellendi":"Seviye olusturuldu"),oe(!1),dt();else{const gt=await ct.json().catch(()=>({}));Re("error",gt.error||"Islem basarisiz")}}catch(Y){console.error("Error saving tier:",Y),Re("error","Beklenmeyen bir hata olustu")}finally{se(!1)}},hs=async Y=>{if(await t("Bu seviyeyi silmek istediginize emin misiniz?",{title:"Delete Tier",type:"warning"}))try{const ct=await ve("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_affiliate_tiers",{method:"DELETE",headers:{},body:JSON.stringify({id:Y})});if(ct.ok)Re("success","Seviye silindi"),dt();else{const gt=await ct.json().catch(()=>({}));Re("error",gt.error||"Silme islemi basarisiz")}}catch(ct){console.error("Error deleting tier:",ct),Re("error","Beklenmeyen bir hata olustu")}},B=async(Y,qe)=>{I(!0);try{const{error:ct}=await Ye.from("affiliates").update({status:qe,updated_at:new Date().toISOString()}).eq("id",Y);ct||(Fe(),Le(),T(!1))}catch(ct){console.error("Error updating status:",ct)}finally{I(!1)}},V=async(Y,qe)=>{I(!0);try{const{error:ct}=await Ye.from("resellers").update({status:qe,updated_at:new Date().toISOString()}).eq("id",Y);ct||(Me(),Le(),T(!1))}catch(ct){console.error("Error updating status:",ct)}finally{I(!1)}},Ce=async(Y,qe,ct)=>{I(!0);try{const gt={processed_at:new Date().toISOString()};qe==="approve"?gt.status="processing":qe==="reject"?gt.status="rejected":qe==="complete"&&(gt.status="completed",gt.transaction_id=ct);const{error:ds}=await Ye.from("affiliate_payouts").update(gt).eq("id",Y);ds||(ft(),Le(),P(!1),Q(""))}catch(gt){console.error("Error processing payout:",gt)}finally{I(!1)}},Ee=async(Y,qe)=>{I(!0);try{const{error:ct}=await Ye.from("fraud_flags").update({resolved:!0,resolved_at:new Date().toISOString(),resolution_notes:qe}).eq("id",Y);ct||(pe(),Le())}catch(ct){console.error("Error resolving flag:",ct)}finally{I(!1)}},Oe=Y=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Y),xt=Y=>new Date(Y).toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}),Dt=Y=>{const qe={active:{bg:"bg-green-100",text:"text-green-700",icon:ne},pending:{bg:"bg-amber-100",text:"text-amber-700",icon:Ze},suspended:{bg:"bg-red-100",text:"text-red-700",icon:Ka},rejected:{bg:"bg-slate-100",text:"text-slate-700",icon:st},processing:{bg:"bg-blue-100",text:"text-blue-700",icon:Ve},completed:{bg:"bg-green-100",text:"text-green-700",icon:ne}},ct=qe[Y]||qe.pending,gt=ct.icon;return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${ct.bg} ${ct.text}`,children:[e.jsx(gt,{className:"w-3 h-3"}),Y==="active"&&"Aktif",Y==="pending"&&"Bekliyor",Y==="suspended"&&"Askiya Alindi",Y==="rejected"&&"Reddedildi",Y==="processing"&&"Isleniyor",Y==="completed"&&"Tamamlandi"]})},ts=Y=>{const qe={low:"bg-blue-100 text-blue-700",medium:"bg-amber-100 text-amber-700",high:"bg-orange-100 text-orange-700",critical:"bg-red-100 text-red-700"};return e.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${qe[Y]||qe.medium}`,children:Y.toUpperCase()})},bs=r.filter(Y=>{var gt,ds,ys,Na;const qe=Y.affiliate_code.toLowerCase().includes(v.toLowerCase())||((ds=(gt=Y.user)==null?void 0:gt.email)==null?void 0:ds.toLowerCase().includes(v.toLowerCase()))||((Na=(ys=Y.user)==null?void 0:ys.name)==null?void 0:Na.toLowerCase().includes(v.toLowerCase())),ct=b==="all"||Y.status===b;return qe&&ct}),Tt=n.filter(Y=>{var gt,ds,ys;const qe=Y.reseller_code.toLowerCase().includes(v.toLowerCase())||((ds=(gt=Y.user)==null?void 0:gt.email)==null?void 0:ds.toLowerCase().includes(v.toLowerCase()))||((ys=Y.company_name)==null?void 0:ys.toLowerCase().includes(v.toLowerCase())),ct=b==="all"||Y.status===b;return qe&&ct}),_t=c.filter(Y=>Y.status==="pending");return w?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-blue-600"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Affiliate & Reseller Yonetimi"}),e.jsx("p",{className:"text-slate-600",children:"Ortaklik programini yonetin ve performansi takip edin"})]}),e.jsxs("button",{onClick:Te,className:"flex items-center gap-2 px-4 py-2 text-slate-600 hover:text-slate-900 hover:bg-slate-100 rounded-lg transition-colors",children:[e.jsx(Ve,{className:"w-5 h-5"}),"Yenile"]})]}),e.jsx("div",{className:"border-b border-slate-200",children:e.jsx("div",{className:"flex overflow-x-auto",children:["overview","affiliates","resellers","providers","payouts","fraud","tiers","api_management","settings"].map(Y=>e.jsxs("button",{onClick:()=>a(Y),className:`px-6 py-4 text-sm font-medium whitespace-nowrap transition-colors relative ${s===Y?"text-blue-600 border-b-2 border-blue-600":"text-slate-600 hover:text-slate-900"}`,children:[Y==="overview"&&"Genel Bakis",Y==="affiliates"&&"Affiliates",Y==="resellers"&&"Resellers",Y==="providers"&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(er,{className:"w-4 h-4"}),"Provider Services"]}),Y==="payouts"&&e.jsxs(e.Fragment,{children:["Odemeler",_t.length>0&&e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-red-500 text-white text-xs rounded-full",children:_t.length})]}),Y==="fraud"&&e.jsxs(e.Fragment,{children:["Fraud",x.length>0&&e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-amber-500 text-white text-xs rounded-full",children:x.length})]}),Y==="tiers"&&"Seviyeler",Y==="api_management"&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(Dr,{className:"w-4 h-4"}),"API Yonetimi"]}),Y==="settings"&&"Ayarlar"]},Y))})}),s==="overview"&&y&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center gap-3 mb-3",children:e.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-5 h-5 text-blue-600"})})}),e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Toplam Affiliate"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:y.total_affiliates}),e.jsxs("p",{className:"text-xs text-green-600 mt-1",children:[y.active_affiliates," aktif"]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center gap-3 mb-3",children:e.jsx("div",{className:"w-10 h-10 bg-purple-100 rounded-lg flex items-center justify-center",children:e.jsx(sa,{className:"w-5 h-5 text-purple-600"})})}),e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Toplam Reseller"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:y.total_resellers}),e.jsxs("p",{className:"text-xs text-green-600 mt-1",children:[y.active_resellers," aktif"]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center gap-3 mb-3",children:e.jsx("div",{className:"w-10 h-10 bg-amber-100 rounded-lg flex items-center justify-center",children:e.jsx(Ze,{className:"w-5 h-5 text-amber-600"})})}),e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Bekleyen Odeme"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:y.pending_payouts}),e.jsx("p",{className:"text-xs text-amber-600 mt-1",children:Oe(y.pending_payout_amount)})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center gap-3 mb-3",children:e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center",children:e.jsx(Jt,{className:"w-5 h-5 text-green-600"})})}),e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Odenen Komisyon"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:Oe(y.total_commission_paid)})]})]}),(y.pending_affiliates>0||x.length>0)&&e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[y.pending_affiliates>0&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx(Ze,{className:"w-6 h-6 text-amber-600"}),e.jsx("h3",{className:"font-semibold text-amber-900",children:"Bekleyen Basvurular"})]}),e.jsxs("p",{className:"text-sm text-amber-700 mb-4",children:[y.pending_affiliates," affiliate basvurusu onay bekliyor."]}),e.jsx("button",{onClick:()=>{a("affiliates"),p("pending")},className:"px-4 py-2 bg-amber-500 text-white rounded-lg hover:bg-amber-600 transition-colors text-sm font-medium",children:"Basvurulari Incele"})]}),x.length>0&&e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx(Fs,{className:"w-6 h-6 text-red-600"}),e.jsx("h3",{className:"font-semibold text-red-900",children:"Fraud Uyarilari"})]}),e.jsxs("p",{className:"text-sm text-red-700 mb-4",children:[x.length," supheli aktivite tespit edildi."]}),e.jsx("button",{onClick:()=>a("fraud"),className:"px-4 py-2 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors text-sm font-medium",children:"Uyarilari Incele"})]})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"En Iyi Affiliates"}),e.jsx("div",{className:"space-y-3",children:r.filter(Y=>Y.status==="active").sort((Y,qe)=>qe.total_revenue-Y.total_revenue).slice(0,5).map((Y,qe)=>{var ct;return e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`w-6 h-6 flex items-center justify-center rounded-full text-xs font-bold ${qe===0?"bg-amber-100 text-amber-700":qe===1?"bg-slate-200 text-slate-700":qe===2?"bg-orange-100 text-orange-700":"bg-slate-100 text-slate-600"}`,children:qe+1}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:((ct=Y.user)==null?void 0:ct.name)||Y.affiliate_code}),e.jsxs("p",{className:"text-xs text-slate-500",children:[Y.total_conversions," donusum"]})]})]}),e.jsx("p",{className:"font-semibold text-slate-900",children:Oe(Y.total_revenue)})]},Y.id)})})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"En Iyi Resellers"}),e.jsx("div",{className:"space-y-3",children:n.filter(Y=>Y.status==="active").sort((Y,qe)=>qe.total_revenue-Y.total_revenue).slice(0,5).map((Y,qe)=>{var ct,gt,ds;return e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg cursor-pointer hover:bg-slate-100 transition-colors",onClick:()=>Y.user_id&&$(Y.user_id),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`w-6 h-6 flex items-center justify-center rounded-full text-xs font-bold ${qe===0?"bg-amber-100 text-amber-700":qe===1?"bg-slate-200 text-slate-700":qe===2?"bg-orange-100 text-orange-700":"bg-slate-100 text-slate-600"}`,children:qe+1}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-900 hover:text-blue-600 transition-colors",children:((ct=Y.user)==null?void 0:ct.name)||((ds=(gt=Y.user)==null?void 0:gt.email)==null?void 0:ds.split("@")[0])||Y.company_name||Y.reseller_code}),e.jsxs("p",{className:"text-xs text-slate-500",children:[Y.total_orders," siparis"]})]})]}),e.jsx("p",{className:"font-semibold text-slate-900",children:Oe(Y.total_revenue)})]},Y.id)})})]})]})]}),s==="affiliates"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Affiliate ara...",value:v,onCh
1024ange:Y=>j(Y.target.value),className:"w-full pl-10 pr-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500"})]}),e.jsxs("select",{value:b,onChange:Y=>p(Y.target.value),className:"px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500",children:[e.jsx("option",{value:"all",children:"Tum Durumlar"}),e.jsx("option",{value:"pending",children:"Bekleyen"}),e.jsx("option",{value:"active",children:"Aktif"}),e.jsx("option",{value:"suspended",children:"Askiya Alinan"}),e.jsx("option",{value:"rejected",children:"Reddedilen"})]}),e.jsxs("button",{className:"flex items-center gap-2 px-4 py-2.5 text-slate-600 hover:text-slate-900 border border-slate-300 rounded-xl hover:bg-slate-50 transition-colors",children:[e.jsx(_l,{className:"w-4 h-4"}),"Disari Aktar"]})]}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Affiliate"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Seviye"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Tiklanma"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Donusum"}),e.jsx("th",{className:"text-right text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Gelir"}),e.jsx("th",{className:"text-right text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Komisyon"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Durum"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Islem"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:bs.map(Y=>{var qe,ct,gt;return e.jsxs("tr",{className:"hover:bg-slate-50",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:((qe=Y.user)==null?void 0:qe.name)||"-"}),e.jsx("p",{className:"text-xs text-slate-500",children:(ct=Y.user)==null?void 0:ct.email}),e.jsx("p",{className:"text-xs text-blue-600 font-mono",children:Y.affiliate_code})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"px-2 py-1 bg-slate-100 text-slate-700 text-xs font-medium rounded",children:((gt=Y.tier)==null?void 0:gt.name)||"-"})}),e.jsx("td",{className:"px-4 py-3 text-center text-sm text-slate-900",children:Y.total_clicks.toLocaleString()}),e.jsx("td",{className:"px-4 py-3 text-center text-sm text-slate-900",children:Y.total_conversions.toLocaleString()}),e.jsx("td",{className:"px-4 py-3 text-right text-sm font-medium text-slate-900",children:Oe(Y.total_revenue)}),e.jsxs("td",{className:"px-4 py-3 text-right",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:Oe(Y.total_commission)}),e.jsxs("p",{className:"text-xs text-amber-600",children:["(",Oe(Y.pending_commission)," bekliyor)"]})]}),e.jsx("td",{className:"px-4 py-3 text-center",children:Dt(Y.status)}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{onClick:()=>{k(null),C(Y),T(!0)},className:"p-2 text-slate-400 hover:text-slate-600 rounded-lg hover:bg-slate-100 transition-colors",children:e.jsx(Ct,{className:"w-4 h-4"})})})]},Y.id)})})]})})})]}),s==="resellers"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Reseller ara...",value:v,onChange:Y=>j(Y.target.value),className:"w-full pl-10 pr-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500"})]}),e.jsxs("select",{value:b,onChange:Y=>p(Y.target.value),className:"px-4 py-2.5 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500",children:[e.jsx("option",{value:"all",children:"Tum Durumlar"}),e.jsx("option",{value:"pending",children:"Bekleyen"}),e.jsx("option",{value:"active",children:"Aktif"}),e.jsx("option",{value:"suspended",children:"Askiya Alinan"})]})]}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Reseller"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Seviye"}),e.jsx("th",{className:"text-right text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Bakiye"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Siparis"}),e.jsx("th",{className:"text-right text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Toplam Harcama"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"API"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Durum"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Islem"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:Tt.map(Y=>{var qe,ct;return e.jsxs("tr",{className:"hover:bg-slate-50",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:Y.company_name||"-"}),e.jsx("p",{className:"text-xs text-slate-500",children:(qe=Y.user)==null?void 0:qe.email}),e.jsx("p",{className:"text-xs text-purple-600 font-mono",children:Y.reseller_code})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"px-2 py-1 bg-slate-100 text-slate-700 text-xs font-medium rounded",children:((ct=Y.tier)==null?void 0:ct.name)||"-"})}),e.jsx("td",{className:"px-4 py-3 text-right text-sm font-medium text-green-600",children:Oe(Y.wallet_balance)}),e.jsx("td",{className:"px-4 py-3 text-center text-sm text-slate-900",children:Y.total_orders.toLocaleStr
1024ing()}),e.jsx("td",{className:"px-4 py-3 text-right text-sm font-medium text-slate-900",children:Oe(Y.total_revenue)}),e.jsx("td",{className:"px-4 py-3 text-center",children:Y.api_enabled?e.jsx(ne,{className:"w-4 h-4 text-green-500 mx-auto"}):e.jsx(st,{className:"w-4 h-4 text-slate-300 mx-auto"})}),e.jsx("td",{className:"px-4 py-3 text-center",children:Dt(Y.status)}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{onClick:()=>{C(null),k(Y),T(!0)},className:"p-2 text-slate-400 hover:text-slate-600 rounded-lg hover:bg-slate-100 transition-colors",children:e.jsx(Ct,{className:"w-4 h-4"})})})]},Y.id)})})]})})})]}),s==="providers"&&e.jsx(z5,{}),s==="payouts"&&e.jsx("div",{className:"space-y-4",children:e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Tarih"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Affiliate"}),e.jsx("th",{className:"text-right text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Tutar"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Yontem"}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Adres"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Durum"}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:"Islem"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:c.map(Y=>{var qe,ct,gt,ds,ys,Na;return e.jsxs("tr",{className:"hover:bg-slate-50",children:[e.jsx("td",{className:"px-4 py-3 text-sm text-slate-600",children:xt(Y.created_at)}),e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900",children:((ct=(qe=Y.affiliate)==null?void 0:qe.user)==null?void 0:ct.name)||((gt=Y.affiliate)==null?void 0:gt.affiliate_code)}),e.jsx("p",{className:"text-xs text-slate-500",children:(ys=(ds=Y.affiliate)==null?void 0:ds.user)==null?void 0:ys.email})]}),e.jsx("td",{className:"px-4 py-3 text-right text-sm font-semibold text-slate-900",children:Oe(Y.amount)}),e.jsx("td",{className:"px-4 py-3 text-sm text-slate-600",children:Y.payout_method==="crypto"?"USDT (TRC20)":"Banka Transferi"}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("p",{className:"text-xs text-slate-600 font-mono truncate max-w-[200px]",children:((Na=Y.payout_details)==null?void 0:Na.wallet_address)||"-"})}),e.jsx("td",{className:"px-4 py-3 text-center",children:Dt(Y.status)}),e.jsxs("td",{className:"px-4 py-3 text-center",children:[Y.status==="pending"&&e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[e.jsx("button",{onClick:()=>{u(Y),P(!0)},className:"p-2 text-green-600 hover:bg-green-50 rounded-lg transition-colors",title:"Onayla",children:e.jsx(Lt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>Ce(Y.id,"reject"),className:"p-2 text-red-600 hover:bg-red-50 rounded-lg transition-colors",title:"Reddet",children:e.jsx(ht,{className:"w-4 h-4"})})]}),Y.status==="processing"&&e.jsx("button",{onClick:()=>{u(Y),P(!0)},className:"px-3 py-1 bg-green-600 text-white text-xs font-medium rounded-lg hover:bg-green-700 transition-colors",children:"Tamamla"}),Y.status==="completed"&&Y.transaction_id&&e.jsx("span",{className:"text-xs text-slate-500 font-mono",children:Y.transaction_id})]})]},Y.id)})})]})})})}),s==="fraud"&&e.jsx("div",{className:"space-y-4",children:x.length>0?e.jsx("div",{className:"space-y-4",children:x.map(Y=>{var qe,ct,gt;return e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg flex items-center justify-center ${Y.severity==="critical"?"bg-red-100":Y.severity==="high"?"bg-orange-100":Y.severity==="medium"?"bg-amber-100":"bg-blue-100"}`,children:e.jsx(Fs,{className:`w-5 h-5 ${Y.severity==="critical"?"text-red-600":Y.severity==="high"?"text-orange-600":Y.severity==="medium"?"text-amber-600":"text-blue-600"}`})}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium text-slate-900",children:[Y.flag_type==="self_referral"&&"Self Referral",Y.flag_type==="same_ip"&&"Ayni IP",Y.flag_type==="same_card"&&"Ayni Kart",Y.flag_type==="suspicious_pattern"&&"Supheli Desen",Y.flag_type==="multiple_accounts"&&"Coklu Hesap",Y.flag_type==="fake_conversions"&&"Sahte Donusum"]}),e.jsxs("p",{className:"text-sm text-slate-500",children:[(qe=Y.affiliate)==null?void 0:qe.affiliate_code," - ",(gt=(ct=Y.affiliate)==null?void 0:ct.user)==null?void 0:gt.email]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[ts(Y.severity),e.jsx("span",{className:"text-xs text-slate-500",children:xt(Y.created_at)})]})]}),e.jsx("div",{className:"bg-slate-50 rounded-lg p-3 mb-4",children:e.jsx("pre",{className:"text-xs text-slate-600 overflow-x-auto",children:JSON.stringify(Y.details,null,2)})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>Ee(Y.id,"Incelendi ve cozuldu"),className:"px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 transition-colors",children:"Cozuldu Olarak Isaretle"}),Y.affiliate_id&&e.jsx("button",{onClick:()=>B(Y.affiliate_id,"suspended"),className:"px-4 py-2 bg-red-600 text-white text-sm font-medium rounded-lg hover:bg-red-700 transition-colors",children:"Affiliate'i Askiya Al"})]})]},Y.id)})}):e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-12 text-center",children:[e.jsx(lt,{className:"w-16 h-16 text-green-500 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"Temiz!"}),e.jsx("p",{className:"text-slate-500",children:"Cozulmemis fraud uyarisi bulunmuyor."})]})}),s==="tiers"&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Affiliate Seviyeleri"}),e.jsxs("button",{onClick:()=>ot(),className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm font-medium",children:[e.jsx(ns,{className:"w-4 h-4"}),"Yeni Seviye"]})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-4",children:h.map(Y=>e.jsxs("div",{className:`bg-white rounded-xl border p-5 ${Y.is_active?"border-slate-200":"border-red-200 bg-red-50/30"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h4",{className:"font-semibold text-slate-900",children:Y.name}),!Y.is_active&&e.jsx("span",{className:"px-1.5 py-0.5 text-xs bg-red-100 text-red-600 rounded",children:"Pasif"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>ot(Y),className:"p-1.5 text-slate-400 hover:text-blue-600 rounded hover:bg-blue-50 transition-colors",children:e.jsx(Nt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>hs(Y.id),className:"p-1.5 text-slate-400 hover:text-red-600 rounded hover:bg-red-50 transition-colors",children:e.jsx(xs,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Komisyon"}),e.jsxs("span",{className:"font-semibold text-green-600",children:["%",Y.commission_rate]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Bonus"}),e.jsxs("span",{className:"font-medium text-slate-900",children:["%",Y.bonus_rate]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Cookie"}),e.jsxs("span",{className:"font-medium text-slate-900",children:[Y.cookie_days," gun"]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Min. Donusum"}),e.jsx("span",{className:"font-medium text-slate-900",children:Y.min_conversions})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Min. Gelir"}),e.jsx("span",{className:"font-medium text-slate-900",children:Oe(Y.min_revenue)})]}),Y.lifetime_attribution&&e.jsx("div",{className:"pt-2 border-t border-slate-100",children:e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-blue-100 text-blue-700 text-xs font-medium rounded",children:[e.jsx(qs,{className:"w-3 h-3"}),"Omur Boyu Atama"]})})]})]},Y.id))})]}),s==="api_management"&&e.jsx($5,{apiResellers:ie,apiStats:Pe,apiLoading:H,apiActionLoading:ee,selectedApiReseller:he,apiResellerLogs:O,rateLimitInput:W,setRateLimitInput:_e,onLoad:ke,onLoadDetail:Xe,onAction:ce,onCloseDetail:()=>{D(null),fe([])}}),s==="settings"&&e.jsxs("div",{className:"max-w-4xl space-y-8",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900",children:"Affiliate Program Ayarlari"}),e.jsx("p",{className:"text-slate-500 mt-1",children:"Affiliate ve Reseller programlarinizi yapilandirin"})]}),e.jsx("button",{onClick:it,disabled:_,className:"px-6 py-2.5 bg-gradient-to-r from-blue-600 to-cyan-600 text-white font-semibold rounded-xl hover:from-blue-700 hover:to-cyan-700 transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2 shadow-lg shadow-blue-500/25",children:_?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),"Kaydediliyor..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Lt,{className:"w-5 h-5"}),"Degisiklikleri Kaydet"]})})]}),e.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"bg-gradient-to-r from-blue-50 to-cyan-50 px-6 py-4 border-b border-slate-100",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-xl flex items-center justify-center",children:e.jsx(tl,{className:"w-5 h-5 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"Komisyon Ayarlari"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Affiliate kazanc oranlari"})]})]})}),e.jsxs("div",{className:"p-6 space-y-5",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Varsayilan Komisyon Orani"}),e.jsx("span",{className:"text-xs text-slate-400",children:"1-50%"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"number",value:F.commission_rate,onChange:Y=>R(qe=>({...qe,commission_rate:Y.target.value})),min:"1",max:"50",className:"w-full px-4 py-3 pr-12 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all"}),e.jsx("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-400 font-medium",children:"%"})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1.5",children:"Yeni affiliate'lere varsayilan olarak uygulanacak oran"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Kayit Komisyonu"}),e.jsx("span",{className:"text-xs text-slate-400",children:"Her yeni kayit icin"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-medium",children:"$"}),e.jsx("input",{type:"number",value:F.signup_commission,onChange:Y=>R(qe=>({...qe,signup_commission:Y.target.value})),min:"0",className:"w-full pl-8 pr-4 py-3 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all"})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1.5",children:"Affiliate referansiyla gelen her kayit icin sabit odeme"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Minimum Odeme Tutari"}),e.jsx("span",{className:"text-xs text-slate-400",children:"Cekim esigi"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-medium",children:"$"}),e.jsx("input",{type:"number",value:F.min_payout,onChange:Y=>R(qe=>({...qe,min_payout:Y.target.value})),min:"1",className:"w-full pl-8 pr-4 py-3 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all"})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1.5",children:"Affiliate'lerin odeme talep edebilecegi minimum bakiye"})]})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"bg-gradient-to-r from-amber-50 to-orange-50 px-6 py-4 border-b border-slate-100",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-amber-100 rounded-xl flex items-center justify-center",children:e.jsx(Ze,{className:"w-5 h-5 text-amber-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"Izleme Ayarlari"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Cookie ve attribution suresi"})]})]})}),e.jsxs("div",{className:"p-6 space-y-5",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Cookie Suresi"}),e.jsx("span",{className:"text-xs text-slate-400",children:"1-365 gun"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"number",value:F.cookie_days,onChange:Y=>R(qe=>({...qe,cookie_days:Y.target.value})),min:"1",max:"365",className:"w-full px-4 py-3 pr-16 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all"}),e.jsx("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-400 font-medium",children:"gun"})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1.5",children:"Referans linkine tiklayan kullanicilarin izleme suresi"})]}),e.jsx("div",{className:"bg-slate-50 rounded-xl p-4",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-slate-600",children:[e.jsx("div",{className:"w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(sr,{className:"w-4 h-4 text-blue-600"})}),e.jsx("p",{children:"Cookie suresi dolana kadar yapilan tum siparisler affiliate'e atanir"})]})}),e.jsx("div",{className:"bg-gradient-to-r from-green-50 to-emerald-50 rounded-xl p-4 border border-green-100",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-green-100 rounded-lg flex items-center justify-center",children:e.jsx(qs,{className:"w-4 h-4 text-green-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-green-900",children:"Lifetime Attribution"}),e.jsx("p",{className:"text-xs text-green-600",children:"VIP tier icin aktif"})]})]}),e.jsx("span",{className:"px-2.5 py-1 bg-green-100 text-green-700 text-xs font-semibold rounded-full",children:"Aktif"})]})})]})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"bg-gradient-to-r from-red-50 to-rose-50 px-6
1024 py-4 border-b border-slate-100",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-xl flex items-center justify-center",children:e.jsx(lt,{className:"w-5 h-5 text-red-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:"Fraud Onleme"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Guvenlik ve koruma ayarlari"})]})]})}),e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl hover:bg-slate-100 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white rounded-lg flex items-center justify-center shadow-sm",children:e.jsx(ny,{className:"w-5 h-5 text-slate-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:"Fraud Tespiti"}),e.jsx("p",{className:"text-xs text-slate-500",children:"Suppheli aktiviteleri otomatik tespit et"})]})]}),e.jsx("button",{onClick:()=>R(Y=>({...Y,fraud_detection_enabled:!Y.fraud_detection_enabled})),className:`relative w-12 h-7 rounded-full transition-colors ${F.fraud_detection_enabled?"bg-green-500":"bg-slate-300"}`,children:e.jsx("span",{className:`absolute top-1 w-5 h-5 bg-white rounded-full shadow-sm transition-all ${F.fraud_detection_enabled?"right-1":"left-1"}`})})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl hover:bg-slate-100 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white rounded-lg flex items-center justify-center shadow-sm",children:e.jsx(di,{className:"w-5 h-5 text-slate-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:"Self Referral Engelle"}),e.jsx("p",{className:"text-xs text-slate-500",children:"Kullanicilarin kendilerini refere etmesini engelle"})]})]}),e.jsx("button",{onClick:()=>R(Y=>({...Y,block_self_referral:!Y.block_self_referral})),className:`relative w-12 h-7 rounded-full transition-colors ${F.block_self_referral?"bg-green-500":"bg-slate-300"}`,children:e.jsx("span",{className:`absolute top-1 w-5 h-5 bg-white rounded-full shadow-sm transition-all ${F.block_self_referral?"right-1":"left-1"}`})})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Ayni IP Esigi"}),e.jsx("span",{className:"text-xs text-slate-400",children:"Max donusum"})]}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"number",value:F.same_ip_threshold,onChange:Y=>R(qe=>({...qe,same_ip_threshold:Y.target.value})),min:"1",max:"100",className:"w-full px-4 py-3 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all"})}),e.jsx("p",{className:"text-xs text-slate-400 mt-1.5",children:"Ayni IP adresinden izin verilen maksimum donusum sayisi"})]}),e.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Fs,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-amber-900",children:"Fraud Koruma Aktif"}),e.jsx("p",{className:"text-xs text-amber-700 mt-1",children:"Suppheli aktiviteler otomatik olarak isaretlenir ve incelenmek uzere bekletilir"})]})]})})]})]})})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-slate-200 rounded-lg flex items-center justify-center",children:e.jsx(Ve,{className:"w-5 h-5 text-slate-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-700",children:"Son Guncelleme"}),e.jsx("p",{className:"text-xs text-slate-500",children:new Date().toLocaleStr
1024ing("tr-TR")})]})]}),e.jsx("button",{onClick:ze,className:"px-4 py-2 text-slate-600 hover:text-slate-900 hover:bg-slate-200 rounded-lg transition-colors text-sm font-medium",children:"Ayarlari Yenile"})]})]}),A&&E&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-white border-b border-slate-200 px-6 py-4 flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Affiliate Detayi"}),e.jsx("button",{onClick:()=>T(!1),className:"text-slate-400 hover:text-slate-600",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-xl flex items-center justify-center",children:e.jsx(mt,{className:"w-8 h-8 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xl font-semibold text-slate-900",children:((Bt=E.user)==null?void 0:Bt.name)||"Isim Yok"}),e.jsx("p",{className:"text-slate-500",children:(Ts=E.user)==null?void 0:Ts.email}),e.jsx("p",{className:"text-sm text-blue-600 font-mono",children:E.affiliate_code})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Toplam Tiklanma"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:E.total_clicks.toLocaleString()})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Kayit Olan"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:E.total_signups.toLocaleString()})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Donusum"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:E.total_conversions.toLocaleString()})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Toplam Gelir"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:Oe(E.total_revenue)})]})]}),e.jsx("div",{className:"bg-green-50 border border-green-200 rounded-xl p-4",children:e.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-green-600 mb-1",children:"Toplam Komisyon"}),e.jsx("p",{className:"text-xl font-bold text-green-700",children:Oe(E.total_commission)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-amber-600 mb-1",children:"Bekleyen"}),e.jsx("p",{className:"text-xl font-bold text-amber-700",children:Oe(E.pending_commission)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-600 mb-1",children:"Odenen"}),e.jsx("p",{className:"text-xl font-bold text-slate-700",children:Oe(E.paid_commission)})]})]})}),e.jsxs("div",{children:[e.jsx("h5",{className:"font-medium text-slate-900 mb-3",children:"Odeme Bilgileri"}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"Yontem"}),e.jsx("span",{className:"font-medium",children:E.payout_method==="crypto"?"USDT (TRC20)":"Banka Transferi"})]}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"Adres"}),e.jsx("span",{className:"font-mono text-xs",children:((ps=E.payout_details)==null?void 0:ps.wallet_address)||"-"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-slate-200",children:[E.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>B(E.id,"active"),disabled:z,className:"flex-1 py-2.5 bg-green-600 text-white font-medium rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50",children:"Onayla"}),e.jsx("button",{onClick:()=>B(E.id,"rejected"),disabled:z,className:"flex-1 py-2.5 bg-red-600 text-white font-medium rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50",children:"Reddet"})]}),E.status==="active"&&e.jsx("button",{onClick:()=>B(E.id,"suspended"),disabled:z,className:"flex-1 py-2.5 bg-red-600 text-white font-medium rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50",children:"Askiya Al"}),E.status==="suspended"&&e.jsx("button",{onClick:()=>B(E.id,"active"),disabled:z,className:"flex-1 py-2.5 bg-green-600 text-white font-medium rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50",children:"Aktif Et"})]})]})]})}
1024),A&&S&&!E&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-white border-b border-slate-200 px-6 py-4 flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Reseller Detayi"}),e.jsx("button",{onClick:()=>{T(!1),k(null)},className:"text-slate-400 hover:text-slate-600",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-16 h-16 bg-purple-100 rounded-xl flex items-center justify-center",children:e.jsx(sa,{className:"w-8 h-8 text-purple-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xl font-semibold text-slate-900",children:S.company_name||"Sirket Adi Yok"}),e.jsx("p",{className:"text-slate-500",children:(Bs=S.user)==null?void 0:Bs.email}),e.jsx("p",{className:"text-sm text-purple-600 font-mono",children:S.reseller_code})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Bakiye"}),e.jsx("p",{className:"text-2xl font-bold text-green-600",children:Oe(S.wallet_balance)})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Kredi Limiti"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:Oe(S.credit_limit)})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Toplam Siparis"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:S.total_orders.toLocaleString()})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Toplam Harcama"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:Oe(S.total_revenue)})]})]}),e.jsxs("div",{children:[e.jsx("h5",{className:"font-medium text-slate-900 mb-3",children:"Seviye & API"}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"Seviye"}),e.jsx("span",{className:"font-medium",children:((Xt=S.tier)==null?void 0:Xt.name)||"Starter"})]}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"Indirim Orani"}),e.jsxs("span",{className:"font-medium text-green-600",children:["%",((lr=S.tier)==null?void 0:lr.discount_percentage)||0]})]}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"API Erisimi"}),e.jsx("span",{className:"font-medium",children:S.api_enabled?"Aktif":"Pasif"})]}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"KYC Durumu"}),e.jsx("span",{className:"font-medium",children:S.kyc_status||"Bekliyor"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-slate-200",children:[S.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>V(S.id,"active"),disabled:z,className:"flex-1 py-2.5 bg-green-600 text-white font-medium rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50",children:z?e.jsx(Ne,{className:"w-5 h-5 animate-spin mx-auto"}):"Onayla"}),e.jsx("button",{onClick:()=>V(S.id,"rejected"),disabled:z,className:"flex-1 py-2.5 bg-red-600 text-white font-medium rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50",children:"Reddet"})]}),S.status==="active"&&e.jsx("button",{onClick:()=>V(S.id,"suspended"),disabled:z,className:"flex-1 py-2.5 bg-red-600 text-white font-medium rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50",children:"Askiya Al"}),S.status==="suspended"&&e.jsx("button",{onClick:()=>V(S.id,"active"),disabled:z,className:"flex-1 py-2.5 bg-green-600 text-white font-medium rounded-lg hover:bg-green-700 transition-colors disabled:opacity-50",children:"Aktif Et"})]})]})]})}),ae&&J&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-md w-full p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Odeme Islemi"}),e.jsx("button",{onClick:()=>P(!1),className:"text-slate-400 hover:text-slate-600",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm text-slate-500",children:"Tutar"}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:Oe(J.amount)})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-slate-500",children:"Adres"}),e.jsx("span",{className:"text-xs font-mono text-slate-600 truncate max-w-[200px]",children:(Kt=J.payout_details)==null?void 0:Kt.wallet_address})]})]}),J.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>Ce(J.id,"approve"),disabled:z,className:"w-full py-3 bg-blue-600 text-white font-semibold rounded-xl hover:bg-blue-700 transition-colors disabled:opacity-50",children:z?e.jsx(Ne,{className:"w-5 h-5 animate-spin mx-auto"}):"Onayla ve Isleme Al"}),e.jsx("button",{onClick:()=>Ce(J.id,"reject"),disabled:z,className:"w-full py-3 border border-red-300 text-red-600 font-semibold rounded-xl hover:bg-red-50 transition-colors disabled:opacity-50",children:"Reddet"})]}),J.status==="processing"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Islem ID (Transaction Hash)"}),e.jsx("input",{type:"text",value:Z,onChange:Y=>Q(Y.target.value),placeholder:"0x...",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 font-mono text-sm"})]}),e.jsx("button",{onClick:()=>Ce(J.id,"complete",Z),disabled:z||!Z,className:"w-full py-3 bg-green-600 text-white font-semibold rounded-xl hover:bg-green-700 transition-colors disabled:opacity-50",children:z?e.jsx(Ne,{className:"w-5 h-5 animate-spin mx-auto"}):"Odemeyi Tamamla"})]})]})]})}),U&&e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-slate-200",children:[e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:ue?"Seviye Duzenle":"Yeni Seviye Olustur"}),e.jsx("button",{onClick:()=>oe(!1),className:"p-2 hover:bg-slate-100 rounded-full transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-slate-500"})})]}),e.jsxs("div",{className:"p-6 space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Seviye Adi"}),e.jsx("input",{type:"text",value:q.name,onChange:Y=>je({...q,name:Y.target.value}),placeholder:"ornek: Gold",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Komisyon Orani (%)"}),e.jsx("input",{type:"number",value:q.commission_rate,onChange:Y=>je({...q,commission_rate:Y.target.value}),min:"0",max:"100",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Bonus Orani (%)"}),e.jsx("input",{type:"number",value:q.bonus_rate,onChange:Y=>je({...q,bonus_rate:Y.target.value}),min:"0",max:"100",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Cookie Suresi (gun)"}),e.jsx("input",{type:"number",value:q.cookie_days,onChange:Y=>je({...q,cookie_days:Y.target.value}),min:"1",max:"365",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Min. Donusum"}),e.jsx("input",{type:"number",value:q.min_conversions,onChange:Y=>je({...q,min_conversions:Y.target.value}),min:"0",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Min. Gelir ($)"}),e.jsx("input",{type:"number",value:q.min_revenue,onChange:Y=>je({...q,min_revenue:Y.target.value}),min:"0",step:"0.01",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:"Omur Boyu Atama"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Ilk referanstan sonra tum siparisler affiliate'e atanir"})]}),e.jsx("button",{type:"button",onClick:()=>je({...q,lifetime_attribution:!q.lifetime_attribution}),className:`relative w-12 h-6 rounded-full transition-colors ${q.lifetime_attribution?"bg-blue-600":"bg-slate-300"}`,children:e.jsx("span",{className:`absolute top-0.5 left-0.5 w-
10245 h-5 bg-white rounded-full shadow transition-transform ${q.lifetime_attribution?"translate-x-6":"translate-x-0"}`})})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:"Aktif"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Bu seviye kullanilabilir mi?"})]}),e.jsx("button",{type:"button",onClick:()=>je({...q,is_active:!q.is_active}),className:`relative w-12 h-6 rounded-full transition-colors ${q.is_active?"bg-green-600":"bg-slate-300"}`,children:e.jsx("span",{className:`absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform ${q.is_active?"translate-x-6":"translate-x-0"}`})})]})]}),e.jsxs("div",{className:"flex items-center gap-3 p-6 border-t border-slate-200 bg-slate-50",children:[e.jsx("button",{onClick:()=>oe(!1),className:"flex-1 py-3 border border-slate-300 text-slate-700 font-semibold rounded-xl hover:bg-slate-100 transition-colors",children:"Iptal"}),e.jsx("button",{onClick:Mt,disabled:we,className:"flex-1 py-3 bg-blue-600 text-white font-semibold rounded-xl hover:bg-blue-700 transition-colors disabled:opacity-50 flex items-center justify-center gap-2",children:we?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(Cs,{className:"w-5 h-5"}),ue?"Guncelle":"Olustur"]})})]})]})}),Se&&e.jsx(to,{userId:Se,onClose:()=>$(null)}),X&&e.jsx("div",{className:"fixed bottom-6 right-6 z-50 animate-in slide-in-from-right-5 fade-in duration-300",children:e.jsxs("div",{className:`flex items-center gap-3 px-5 py-4 rounded-xl shadow-2xl border ${X.type==="success"?"bg-green-50 border-green-200 text-green-800":"bg-red-50 border-red-200 text-red-800"}`,children:[X.type==="success"?e.jsx("div",{className:"w-8 h-8 bg-green-100 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})}):e.jsx("div",{className:"w-8 h-8 bg-red-100 rounded-full flex items-center justify-center flex-shrink-0",children:e.jsx(st,{className:"w-5 h-5 text-red-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-sm",children:X.type==="success"?"Basarili":"Hata"}),e.jsx("p",{className:"text-sm opacity-80",children:X.message})]}),e.jsx("button",{onClick:()=>re(null),className:"ml-4 p-1 hover:bg-black/5 rounded-full transition-colors",children:e.jsx(ht,{className:"w-4 h-4"})})]})})]})}const qy={pending:{label:"Beklemede",color:"text-amber-700",bg:"bg-amber-50 border-amber-200",icon:Ze},processing:{label:"Isleniyor",color:"text-blue-700",bg:"bg-blue-50 border-blue-200",icon:Ve},in_progress:{label:"Devam Ediyor",color:"text-sky-700",bg:"bg-sky-50 border-sky-200",icon:Ve},paid:{label:"Odendi",color:"text-emerald-700",bg:"bg-emerald-50 border-emerald-200",icon:ne},completed:{label:"Tamamlandi",color:"text-green-700",bg:"bg-green-50 border-green-200",icon:ne},partial:{label:"Kismi",color:"text-orange-700",bg:"bg-orange-50 border-orange-200",icon:Fs},cancelled:{label:"Iptal",color:"text-red-700",bg:"bg-red-50 border-red-200",icon:st},canceled:{label:"Iptal",color:"text-red-700",bg:"bg-red-50 border-red-200",icon:st},refunded:{label:"Iade",color:"text-slate-700",bg:"bg-slate-50 border-slate-200",icon:st},failed:{label:"Basarisiz",color:"text-red-700",bg:"bg-red-50 border-red-200",icon:st}};function B5({onSyncComplete:t}){var E,C,S,k,J;const[s,a]=o.useState(null),[r,l]=o.useState(60),[n,i]=o.useState(0),c=o.useRef(""),d=o.useRef(null),x=o.useRef(null),m=o.useCallback(async()=>{try{const u="https://kdqsajuhvcmxsnttdetg.supabase.co",A="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",T=Date.now(),ae=await fetch(`${u}/functions/v1/get_smm_sync_status`,{headers:{Authorization:`Bearer ${A}`,"Content-Type":"application/json"}});if(!ae.ok)return;const P=await ae.json(),z=(Date.now()-T)/2,I=new Date(P.server_now).getTime()+z,Z=Date.now();i(I-Z),c.current&&c.current!==P.last_sync_at&&t(),c.current=P.last_sync_at,a(P);const Q=new Date(P.next_sync_at).getTime(),_=Z+(I-Z),M=Math.max(0,Math.ceil((Q-_)/1e3));l(M)}catch(u){console.error("Error fetching sync status:",u)}},[t]);o.useEffect(()=>(m(),d.current=setInterval(m,5e3),()=>{d.current&&clearInterval(d.current)}),[m]),o.useEffect(()=>(x.current=setInterval(()=>{l(u=>u<=0?0:u-1)},1e3),()=>{x.current&&clearInterval(x.current)}),[]);const h=(s==null?void 0:s.status)==="running",f=(s==null?void 0:s.status)==="failed",y=(s==null?void 0:s.status)==="success",g=s?Math.max(0,Math.min(100,(s.interval_seconds-r)/s.interval_seconds*100)):0,w=s?Math.max(0,Math.round((Date.now()+n-new Date(s.last_sync_at).getTime())/1e3)):0,[N,v]=o.useState(!1),j=(E=s==null?void 0:s.syncs)==null?void 0:E.reseller_sync,b=(C=s==null?void 0:s.syncs)==null?void 0:C.batch_refresh,p=(s==null?void 0:s.recent_logs)||[];return e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsxs("div",{className:`relative flex items-center justify-center w-9 h-9 rounded-lg ${h?"bg-blue-100":f?"bg-red-100":"bg-emerald-100"}`,children:[h?e.jsx(Ne,{className:"w-4.5 h-4.5 text-blue-600 animate-spin"}):f?e.jsx(st,{className:"w-4.5 h-4.5 text-red-600"}):e.jsx(uy,{className:"w-4.5 h-4.5 text-emerald-600"}),e.jsx("span",{className:`absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 border-white ${h?"bg-blue-500 animate-pulse":f?"bg-red-500":"bg-emerald-500"}`})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-semibold text-slate-900",children:"Provider Sync"}),h&&e.jsx("span",{className:"px-1.5 py-0.5 bg-blue-50 text-blue-700 text-[10px] font-semibold rounded-full border border-blue-200 animate-pulse",children:"SYNCING"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 flex-wrap",children:[y&&((S=s==null?void 0:s.details)==null?void 0:S.synced)!==void 0&&e.jsxs("span",{children:[s.details.synced," synced / ",s.details.total||0," checked"]}),f&&e.jsx("span",{className:"text-red-600 font-medium",children:"Son sync basarisiz"}),y&&w>0&&e.jsxs("span",{className:"text-slate-400",children:[w,"s once"]}),s!=null&&s.duration_ms?e.jsxs("span",{className:"text-slate-400",children:[s.duration_ms,"ms"]}):null,e.jsx("button",{onClick:()=>v(!N),className:"text-blue-500 hover:text-blue-700 underline",children:N?"Gizle":"Log"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Ar,{className:"w-3.5 h-3.5 text-slate-400"}),e.jsx("span",{className:"text-xs text-slate-500",children:"Sonraki sync"})]}),e.jsx("div",{className:`text-xl font-bold tabular-nums tracking-tight ${r<=5?"text-blue-600":r<=15?"text-amber-600":"text-slate-900"}`,children:h?e.jsx("span",{className:"text-blue-600 text-base",children:"Calistirilyor..."}):e.jsxs("span",{children:[r,"s"]})})]}),e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center border-[3px] ${h||r<=
10245?"border-blue-500 bg-blue-50":r<=15?"border-amber-400 bg-amber-50":"border-slate-200 bg-slate-50"}`,style:{background:h?void 0:`conic-gradient(${r<=5?"#3b82f6":r<=15?"#f59e0b":"#94a3b8"} ${g}%, transparent ${g}%)`},children:e.jsx("div",{className:"w-6 h-6 rounded-full bg-white flex items-center justify-center",children:e.jsx(rt,{className:`w-3 h-3 ${h||r<=5?"text-blue-500":"text-slate-400"}`})})})]})]}),e.jsx("div",{className:"h-1 bg-slate-100",children:e.jsx("div",{className:`h-full transition-all duration-1000 ease-linear ${h?"bg-blue-500 animate-pulse":f?"bg-red-400":"bg-emerald-500"}`,style:{width:h?"100%":`${g}%`}})}),N&&e.jsxs("div",{className:"border-t border-slate-100 px-4 py-3 space-y-3",children:[j&&b&&e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-slate-50 rounded-lg p-2.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-500 uppercase mb-1",children:"Reseller Sync"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${j.status==="success"?"bg-emerald-500":j.status==="running"?"bg-blue-500 animate-pulse":"bg-red-500"}`}),e.jsxs("span",{className:"text-xs text-slate-700",children:[j.duration_ms,"ms"]}),((k=j.details)==null?void 0:k.synced)!==void 0&&e.jsxs("span",{className:"text-xs text-slate-500",children:[j.details.synced,"/",j.details.total]})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-lg p-2.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-500 uppercase mb-1",children:"Batch Refresh"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${b.status==="success"?"bg-emerald-500":b.status==="running"?"bg-blue-500 animate-pulse":"bg-red-500"}`}),e.jsxs("span",{className:"text-xs text-slate-700",children:[b.duration_ms,"ms"]}),((J=b.details)==null?void 0:J.synced)!==void 0&&e.jsxs("span",{className:"text-xs text-slate-500",children:[b.details.synced,"/",b.details.total]})]})]})]}),p.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-500 uppercase mb-1.5",children:"Son Sync Loglari"}),e.jsx("div",{className:"space-y-1",children:p.slice(0,5).map(u=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${u.success?"bg-emerald-500":"bg-red-500"}`}),e.jsx("span",{className:"text-slate-500 font-mono text-[10px] w-20 flex-shrink-0",children:u.sync_type==="batch_refresh"?"REFRESH":"RESELLER"}),e.jsxs("span",{className:"text-slate-700",children:[u.total_orders_updated,"/",u.total_orders_checked]}),u.total_errors>0&&e.jsxs("span",{className:"text-red-600",children:[u.total_errors," hata"]}),e.jsxs("span",{className:"text-slate-400",children:[u.duration_ms,"ms"]}),u.error_message&&e.jsx("span",{className:"text-red-500 truncate max-w-[200px]",title:u.error_message,children:u.error_message})]},u.id))})]})]})]})}function U5({onViewUser:t}){const[s,a]=o.useState([]),[r,l]=o.useState(!0),[n,i]=o.useState("all"),[c,d]=o.useState(""),[x,m]=o.useState(1),[h,f]=o.useState(1),[y,g]=o.useState(0),[w,N]=o.useState(null),[v,j]=o.useState(null),b=o.useCallback(async()=>{try{l(!0);const u="https://kdqsajuhvcmxsnttdetg.supabase.co",A="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",T=new URLSearchParams({status:n,page:x.toString(),pageSize:"30"});c&&T.set("search",c);const ae=await fetch(`${u}/functions/v1/admin_get_reseller_orders?${T}`,{headers:{Authorization:`Bearer ${A}`,"Content-Type":"application/json"}});if(ae.ok){const P=await ae.json();a(P.data||[]),g(P.total||0),f(P.totalPages||1)}}catch(u){console.error("Error fetching reseller orders:",u)}finally{l(!1)}},[n,x,c]);o.useEffect(()=>{b()},[b]),o.useEffect(()=>{m(1)},[n,c]);const p=o.useCallback(()=>{b()},[b]),E=(u,A)=>{navigator.clipboard.writeText(u),N(A),setTimeout(()=>N(null),2e3)},C=u=>{const A=qy[u]||{label:u,color:"text-slate-700",bg:"bg-slate-50 border-slate-200",icon:Ze},T=A.icon;return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border ${A.bg} ${A.color}`,children:[e.jsx(T,{className:"w-3 h-3"}),A.label]})},S=u=>{if(!u)return"bg-slate-100 text-slate-700";const A=u.toLowerCase();return A.includes("instagram")?"bg-pink-50 text-pink-700":A.includes("tiktok")?"bg-slate-800 text-white":A.includes("youtube")?"bg-red-50 text-red-700":A.includes("twitter")||A.includes("x")?"bg-sky-50 text-sky-700":A.includes("facebook")?"bg-blue-50 text-blue-700":A.includes("spotify")?"bg-green-50 text-green-700":A.includes("telegram")?"bg-cyan-50 text-cyan-700":"bg-slate-100 text-slate-700"},k=u=>
1024new Date(u).toLocaleString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}),J=["all","pending","processing","in_progress","completed","partial","canceled","refunded"];return e.jsxs("div",{className:"space-y-4",children:[e.jsx(B5,{onSyncComplete:p}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Siparis ID, URL, servis adi, provider ID ara...",value:c,onChange:u=>d(u.target.value),className:"w-full pl-10 pr-4 py-2.5 border border-slate-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("button",{onClick:b,className:"flex items-center gap-2 px-4 py-2.5 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors text-sm font-medium",children:[e.jsx(Ve,{className:`w-4 h-4 ${r?"animate-spin":""}`}),"Yenile"]})]}),e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:J.map(u=>e.jsx("button",{onClick:()=>i(u),className:`px-3 py-1.5 rounded-full text-xs font-medium whitespace-nowrap transition-colors ${n===u?"bg-blue-600 text-white":"bg-slate-100 text-slate-600 hover:bg-slate-200"}`,children:u==="all"?"Tumu":u==="pending"?"Beklemede":u==="processing"?"Isleniyor":u==="in_progress"?"Devam Ediyor":u==="completed"?"Tamamlandi":u==="partial"?"Kismi":u==="canceled"?"Iptal":u==="refunded"?"Iade":u},u))}),e.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-500",children:[e.jsxs("span",{children:[y," siparis bulundu"]}),e.jsxs("span",{children:["Sayfa ",x,"/",h]})]}),r?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-blue-500"})}):s.length===0?e.jsxs("div",{className:"text-center py-16",children:[e.jsx(Ws,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-500",children:"Reseller siparisi bulunamadi"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden lg:block bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Siparis ID"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Reseller"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Hizmet"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Hedef"}),e.jsx("th",{className:"text-right px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Miktar"}),e.jsx("th",{className:"text-right px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Tutar"}),e.jsx("th",{className:"text-center px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Durum"}),e.jsx("th",{className:"text-right px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Start Count"}),e.jsx("th",{className:"text-right px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Remains"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Saglayici"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Provider ID"}),e.jsx("th",{className:"text-left px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Tarih"}),e.jsx("th",{className:"text-center px-4 py-3 text-xs font-semibold text-slate-500 uppercase",children:"Islem"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:s.map(u=>{var I,Z,Q,_,M,F,R,X;const A=u.service_name||((I=u.package)==null?void 0:I.description)||`${((Z=u.package)==null?void 0:Z.platform)||""} ${((Q=u.package)==null?void 0:Q.service_type)||""}`.trim()||"-",T=u.platform||((_=u.package)==null?void 0:_.platform)||null,ae=u.id.slice(0,8),P=((F=(M=u.reseller)==null?void 0:M.user)==null?void 0:F.email)||"-",z=((X=(R=u.reseller)==null?void 0:R.user)==null?void 0:X.full_name)||P.split("@")[0];return e.jsxs("tr",{className:"hover:bg-slate-50 transition-colors",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("code",{className:"text-xs font-mono bg-slate-100 px-1.5 py-0.5 rounded text-slate-700",children:ae}),e.jsx("button",{onClick:()=>E(u.id.slice(0,8),`id-${u.id}`),className:"p-0.5 hover:bg-slate-100 rounded transition-colors",title:"ID Kopyala",children:w===`id-${u.id}`?e.jsx(ne,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5 text-slate-400"})})]}),u.external_reference&&e.jsxs("div",{className:"text-[10px] text-slate-400 mt-0.5 font-mono",children:["Ref
1024: ",u.external_reference]})]}),e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("div",{className:"text-sm font-medium text-slate-900 truncate max-w-[140px]",children:z}),e.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[140px]",children:P})]}),e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("div",{className:"flex items-center gap-2",children:T&&e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-medium ${S(T)}`,children:T})}),e.jsx("div",{className:"text-xs text-slate-600 mt-0.5 truncate max-w-[200px]",title:A,children:A})]}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-1 max-w-[180px]",children:[e.jsx("span",{className:"text-xs text-slate-600 truncate",title:u.target_url,children:u.target_url.length>30?u.target_url.slice(0,30)+"...":u.target_url}),e.jsx("a",{href:u.target_url,target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 p-0.5 hover:bg-slate-100 rounded transition-colors",children:e.jsx(Gs,{className:"w-3 h-3 text-slate-400"})})]})}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("span",{className:"text-sm font-medium text-slate-900",children:u.quantity.toLocaleString()})}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("span",{className:"text-sm font-semibold text-slate-900",children:om(u.total_price)})}),e.jsx("td",{className:"px-4 py-3 text-center",children:C(u.status)}),e.jsx("td",{className:"px-4 py-3 text-right",children:u.start_count!==null&&u.start_count!==void 0?e.jsx("span",{className:"text-xs font-mono text-slate-700",children:u.start_count.toLocaleString()}):e.jsx("span",{className:"text-xs text-slate-400",children:"-"})}),e.jsx("td",{className:"px-4 py-3 text-right",children:u.remains!==null&&u.remains!==void 0?e.jsx("span",{className:`text-xs font-mono font-medium ${u.remains===0?"text-green-600":"text-amber-600"}`,children:u.remains.toLocaleString()}):e.jsx("span",{className:"text-xs text-slate-400",children:"-"})}),e.jsx("td",{className:"px-4 py-3",children:u.provider_name?e.jsx("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full bg-slate-100 text-slate-700",children:u.provider_name}):e.jsx("span",{className:"text-xs text-slate-400",children:"-"})}),e.jsx("td",{className:"px-4 py-3",children:u.provider_order_id?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("code",{className:"text-xs font-mono bg-blue-50 text-blue-700 px-1.5 py-0.5 rounded",children:u.provider_order_id}),e.jsx("button",{onClick:()=>E(u.provider_order_id,`pid-${u.id}`),className:"p-0.5 hover:bg-slate-100 rounded transition-colors",children:w===`pid-${u.id}`?e.jsx(ne,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5 text-slate-400"})})]}):e.jsx("span",{className:"text-xs text-slate-400",children:"-"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"text-xs text-slate-500",children:k(u.created_at)})}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{onClick:()=>j(u),className:"p-1.5 hover:bg-blue-50 rounded-lg transition-colors text-blue-600",title:"Detay",children:e.jsx(Ct,{className:"w-4 h-4"})})})]},u.id)})})]})})}),e.jsx("div",{className:"lg:hidden space-y-3",children:s.map(u=>{var I,Z,Q,_,M,F,R,X;const A=u.service_name||((I=u.package)==null?void 0:I.description)||`${((Z=u.package)==null?void 0:Z.platform)||""} ${((Q=u.package)==null?void 0:Q.service_type)||""}`.trim()||"-",T=u.platform||((_=u.package)==null?void 0:_.platform)||null,ae=u.id.slice(0,8),P=((F=(M=u.reseller)==null?void 0:M.user)==null?void 0:F.email)||"-",z=((X=(R=u.reseller)==null?void 0:R.user)==null?void 0:X.full_name)||P.split("@")[0];return e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4 space-y-3 active:bg-slate-50 transition-colors",onClick:()=>j(u),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"flex flex-col gap-1 min-w-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"text-xs font-mono bg-slate-100 px-1.5 py-0.5 rounded text-slate-700 flex-shrink-0",children:ae}),e.jsx("button",{onClick:re=>{re.stopPropagation(),E(u.id.slice(0,8),`id-${u.id}`)},className:"p-0.5 hover:bg-slate-100 rounded transition-colors flex-shrink-0",children:w===`id-${u.id}`?e.jsx(ne,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5 text-slate-400"})}),C(u.status)]})}),e.jsx("span",{className:"text-sm font-bold text-slate-900 flex-shrink-0",children:om(u.total_price)})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[T&&e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-medium ${S(T)}`,children:T}),e.jsx("span",{className:"text-xs text-slate-600 truncate",children:A})]}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-500",children:[e.jsx(Gs,{className:"w-3 h-3 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:u.target_url})]}),e.jsx("div",{className:"flex items-center justify-between text-xs",children:e.jsxs("div",{className:"text-slate-500",children:[e.jsx("span",{className:"font-medium text-slate-700",children:z}),e.jsx("span",{className:"mx-1",children:"-"}),e.jsx("span",{children:P})]})}),(u.start_count!==null||u.remains!==null)&&e.jsxs("div",{className:"flex items-center gap-4 text-xs",children:[u.start_count!==null&&u.start_count!==void 0&&e.jsxs("div",{children:[e.jsx("span",{className:"text-slate-400",children:"Start: "}),e.jsx("span",{className:"font-mono text-slate-700",children:u.start_count.toLocaleStr
1024ing()})]}),u.remains!==null&&u.remains!==void 0&&e.jsxs("div",{children:[e.jsx("span",{className:"text-slate-400",children:"Kalan: "}),e.jsx("span",{className:`font-mono font-medium ${u.remains===0?"text-green-600":"text-amber-600"}`,children:u.remains.toLocaleString()})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-slate-100",children:[e.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-500",children:[e.jsxs("span",{children:[u.quantity.toLocaleString()," adet"]}),u.provider_name&&e.jsx("span",{className:"font-medium px-1.5 py-0.5 rounded-full bg-slate-100 text-slate-600 text-[10px]",children:u.provider_name}),u.provider_order_id&&e.jsx("code",{className:"font-mono bg-blue-50 text-blue-700 px-1.5 py-0.5 rounded text-[10px]",children:u.provider_order_id})]}),e.jsx("span",{className:"text-[10px] text-slate-400",children:k(u.created_at)})]})]},u.id)})})]}),h>1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 pt-2",children:[e.jsx("button",{onClick:()=>m(u=>Math.max(1,u-1)),disabled:x===1,className:"p-2 rounded-lg border border-slate-200 hover:bg-slate-50 disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsx(Ua,{className:"w-4 h-4"})}),e.jsx("div",{className:"flex gap-1",children:Array.from({length:Math.min(5,h)},(u,A)=>{let T;return h<=5||x<=3?T=A+1:x>=h-2?T=h-4+A:T=x-2+A,e.jsx("button",{onClick:()=>m(T),className:`w-8 h-8 rounded-lg text-sm font-medium transition-colors ${x===T?"bg-blue-600 text-white":"bg-white border border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:T},T)})}),e.jsx("button",{onClick:()=>m(u=>Math.min(h,u+1)),disabled:x===h,className:"p-2 rounded-lg border border-slate-200 hover:bg-slate-50 disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsx(ra,{className:"w-4 h-4"})})]}),v&&e.jsx(q5,{order:v,onClose:()=>j(null),onCopyId:E,copiedId:w,onViewUser:t})]})}function q5({order:t,onClose:s,onCopyId:a,copiedId:r,onViewUser:l}){var f,y,g,w,N,v,j,b,p;const n=t.service_name||((f=t.package)==null?void 0:f.description)||`${((y=t.package)==null?void 0:y.platform)||""} ${((g=t.package)==null?void 0:g.service_type)||""}`.trim()||"-",i=t.platform||((w=t.package)==null?void 0:w.platform)||null,c=((v=(N=t.reseller)==null?void 0:N.user)==null?void 0:v.email)||"-",d=((b=(j=t.reseller)==null?void 0:j.user)==null?void 0:b.full_name)||c.split("@")[0],x=qy[t.status]||{label:t.status,color:"text-slate-700",bg:"bg-slate-50 border-slate-200",icon:Ze},m=x.icon,h=E=>new Date(E).toLocaleString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"});return e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-end sm:items-center justify-center z-[1400] sm:p-4",children:e.jsxs("div",{className:"bg-white rounded-t-2xl sm:rounded-xl shadow-2xl w-full sm:max-w-2xl h-[90vh] sm:h-auto sm:max-h-[85vh] flex flex-col",children:[e.jsxs("div",{className:"flex-shrink-0 px-5 py-4 border-b border-slate-200 flex items-center justify-between rounded-t-2xl sm:rounded-t-xl",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Reseller Siparis Detayi"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx("code",{className:"text-xs font-mono bg-slate-100 px-2 py-0.5 rounded",children:t.id.slice(0,8)}),e.jsx("button",{onClick:()=>a(t.id,`detail-${t.id}`),className:"p-0.5 hover:bg-slate-100 rounded",children:r===`detail-${t.id}`?e.jsx(ne,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5 text-slate-400"})}),e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border ${x.bg} ${x.color}`,children:[e.jsx(m,{className:"w-3 h-3"}),x.label]})]})]}),e.jsx("button",{onClick:s,className:"p-2 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(st,{className:"w-5 h-5 text-slate-400"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-5 space-y-5",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 space-y-3",children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-700 flex items-center gap-2",children:[e.jsx(us,{className:"w-4 h-4"}),"Reseller Bilgisi"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Isim"}),e.jsx("div",{className:"text-sm font-medium text-slate-900",children:d})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"E-posta"}),e.jsx("div",{className:"text-sm text-slate-900",children:c})]})]}
1024),l&&((p=t.reseller)==null?void 0:p.user_id)&&e.jsxs("button",{onClick:()=>{l(t.reseller.user_id),s()},className:"text-xs text-blue-600 hover:underline flex items-center gap-1",children:[e.jsx(Ct,{className:"w-3 h-3"}),"Kullanici Profilini Gor"]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 space-y-3",children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-700 flex items-center gap-2",children:[e.jsx(wt,{className:"w-4 h-4"}),"Siparis Bilgisi"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Platform"}),e.jsx("div",{className:"text-sm font-medium text-slate-900",children:i||"-"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Hizmet"}),e.jsx("div",{className:"text-sm text-slate-900",children:n})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Miktar"}),e.jsx("div",{className:"text-sm font-medium text-slate-900",children:t.quantity.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Tutar"}),e.jsx("div",{className:"text-sm font-semibold text-slate-900",children:om(t.total_price)})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Hedef URL"}),e.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[e.jsx("a",{href:t.target_url,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline break-all",children:t.target_url}),e.jsx(Gs,{className:"w-3 h-3 text-blue-400 flex-shrink-0"})]})]}),t.external_reference&&e.jsxs("div",{className:"col-span-2",children:[e.jsx("div",{className:"text-xs text-slate-500",children:"External Reference"}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx("code",{className:"text-sm font-mono bg-white border border-slate-200 px-2 py-0.5 rounded",children:t.external_reference}),e.jsx("button",{onClick:()=>a(t.external_reference,`ref-${t.id}`),className:"p-0.5 hover:bg-slate-100 rounded",children:r===`ref-${t.id}`?e.jsx(ne,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5 text-slate-400"})})]})]})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 space-y-3",children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-700 flex items-center gap-2",children:[e.jsx(fc,{className:"w-4 h-4"}),"Provider Bilgisi"]}),t.provider_name&&e.jsxs("div",{className:"mb-3",children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Provider"}),e.jsx("div",{className:"text-sm font-medium text-slate-800 mt-0.5",children:t.provider_name})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Provider Order ID"}),t.provider_order_id?e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx("code",{className:"text-sm font-mono bg-blue-50 text-blue-700 px-2 py-0.5 rounded border border-blue-200",children:t.provider_order_id}),e.jsx("button",{onClick:()=>a(t.provider_order_id,`dpid-${t.id}`),className:"p-0.5 hover:bg-slate-100 rounded",children:r===`dpid-${t.id}`?e.jsx(ne,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5 text-slate-400"})})]}):e.jsx("div",{className:"text-sm text-slate-400",children:"-"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Main Order ID"}),t.order_id?e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx("code",{className:"text-xs font-mono bg-slate-100 px-2 py-0.5 rounded",children:t.order_id.slice(0,8)}),e.jsx("button",{onClick:()=>a(t.order_id,`oid-${t.id}`),className:"p-0.5 hover:bg-slate-100 rounded",children:r===`oid-${t.id}`?e.jsx(ne,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5 text-slate-400"})})]}):e.jsx("div",{className:"text-sm text-slate-400",children:"-"})]}),t.start_count!==null&&t.start_count!==void 0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Start Count"}),e.jsx("div",{className:"text-sm font-medium text-slate-900",children:t.start_count.toLocaleStr
1024ing()})]}),t.remains!==null&&t.remains!==void 0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Remains"}),e.jsx("div",{className:`text-sm font-medium ${t.remains===0?"text-green-600":"text-amber-600"}`,children:t.remains.toLocaleString()})]}),t.charge!==null&&t.charge!==void 0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Provider Charge"}),e.jsxs("div",{className:"text-sm font-medium text-slate-900",children:["$",Number(t.charge).toFixed(4)]})]})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 space-y-3",children:[e.jsxs("h4",{className:"text-sm font-semibold text-slate-700 flex items-center gap-2",children:[e.jsx(Ze,{className:"w-4 h-4"}),"Tarih Bilgisi"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Olusturulma"}),e.jsx("div",{className:"text-sm text-slate-900",children:h(t.created_at)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Son Guncelleme"}),e.jsx("div",{className:"text-sm text-slate-900",children:h(t.updated_at)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Odeme Yontemi"}),e.jsx("div",{className:"text-sm font-medium text-slate-900 capitalize",children:t.payment_method})]}),t.discount_applied>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-slate-500",children:"Indirim"}),e.jsx("div",{className:"text-sm font-medium text-green-600",children:om(t.discount_applied)})]})]})]}),t.notes&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4",children:[e.jsx("h4",{className:"text-sm font-semibold text-amber-800 mb-1",children:"Notlar"}),e.jsx("p",{className:"text-sm text-amber-700",children:t.notes})]})]})]})})}const G5=["Zap","Users","Headphones","Shield","Star","Check","Clock","Award","Heart","TrendingUp"];function J5(){const{showConfirm:t}=Vs(),[s,a]=o.useState({badge_text:"Buy Followers - Premium Services",title_line1:"Buy Instagram Followers",title_line2:"& TikTok Followers",description:"Buy followers for Instagram, TikTok, YouTube and more. Instant delivery, real followers, best prices.",button_text:"Buy Followers Now",secondary_button_text:"View Packages",hero_image_url:"",show_trust_badges:!0,badge_items:[{icon:"Zap",text:"Instant Delivery"},{icon:"Users",text:"Real Followers"},{icon:"Headphones",text:"24/7 Support"}],is_active:!0}),[r,l]=o.useState([]),[n,i]=o.useState({image_url:"",width:200,height:200,alt_text:"",link_url:""}),[c,d]=o.useState(null),[x,m]=o.useState(!0),[h,f]=o.useState(!1),[y,g]=o.useState(!1),[w,N]=o.useState(null);o.useEffect(()=>{v()},[]);const v=async()=>{try{const u=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_hero_content");if(u.ok){const A=await u.json();A.success&&A.data&&a(A.data),A.images&&l(A.images)}}catch(u){console.error("Error fetching hero content:",u)}finally{m(!1)}},j=async()=>{if(n.image_url){g(!0);try{const u=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_hero_content?action=images",{method:"POST",body:JSON.stringify({...n,position:r.length,is_active:!0})});if(u.ok){const A=await u.json();A.success&&A.image&&(l([...r,A.image]),i({image_url:"",width:200,height:200,alt_text:"",link_url:""}),N({type:"success",text:"Image added successfully!"}))}}catch{N({type:"error",text:"Error adding image"})}finally{g(!1)}}},b=async u=>{g(!0);try{const A=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_hero_content?action=images",{method:"PUT",body:JSON.stringify(u)});if(A.ok){const T=await A.json();T.success&&T.image&&(l(r.map(ae=>ae.id===u.id?T.image:ae)),d(null),N({type:"success",text:"Image updated successfully!"}))}}catch{N({type:"error",text:"Error updating image"})}finally{g(!1)}},p=async u=>{if(await t("Are you sure you want to delete this image?",{title:"Delete Image",type:"warning"}))try{(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_hero_content?action=images",{method:"DELETE",body:JSON.stringify({id:u})})).ok&&(l(r.filter(ae=>ae.id!==u)),N({type:"success",text:"Image deleted!"}))}catch{N({type:"error",text:"Error deleting image"})}},E=async u=>{await b({...u,is_active:!u.is_active})},C=async()=>{f(!0),N(null);try{const u=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_hero_content",{method:"PUT",body:JSON.stringify(s)});if(u.ok){const A=await u.json();A.success?(N({type:"success",text:"Hero content saved successfully!"}),A.data&&a(A.data)):N({type:"error",text:A.error||"Failed to save"})}else N({type:"error",text:"Failed to save hero content"})}catch{N({type:"error",text:"Error saving hero content"})}finally{f(!1)}},S=()=>{a(u=>({...u,badge_items:[...u.badge_items||[],{icon:"Star",text:""}]}))},k=u=>{a(A=>({...A,badge_items:A.badge_items.filter((T,ae)=>ae!==u)}))},J=(u,A,T)=>{a(ae=>({...ae,badge_items:ae.badge_items.map((P,z)=>z===u?{...P,[A]:T}:P)}))};return x?e.jsx("div",{className:"flex items-center justify-center p-12",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-cyan-500"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Hero Section Settings"}),e.jsx("p",{className:"text-sm text-slate-400",children:"Customize the main hero section on the homepage"})]}),e.jsxs("button",{onClick:C,disabled:h,className:"flex items-center gap-2 px-4 py-2 bg-cyan-500 text-white rounded-lg hover:bg-cyan-600 disabled:opacity-50",children:[h?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"}),"Save Changes"]})]}),w&&e.jsx("div",{className:`p-4 rounded-lg ${w.type==="success"?"bg-emerald-500/20 text-emerald-400 border border-emerald-500/30":"bg-red-500/20 text-red-400 border border-red-500/30"}`,children:w.text}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-slate-800 rounded-xl p-6 border border-slate-700",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(Vt,{className:"w-5 h-5 text-cyan-400"}),e.jsx("h3",{className:"font-semibold text-white",children:"Badge & Titles"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Badge Text"}),e.jsx("input",{type:"text",value:s.badge_text,onChange:u=>a({...s,badge_text:u.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Buy Followers - Premium Services"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Small badge shown above the title"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Title Line 1"}),e.jsx("input",{type:"text",value:s.title_line1,onChange:u=>a({...s,title_line1:u.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Buy Instagram Followers"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Title Line 2 (Gradient)"}),e.jsx("input",{type:"text",value:s.title_line2,onChange:u=>a({...s,title_line2:u.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"& TikTok Followers"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This line appears with gradient effect"})]})]})]}),e.jsxs("div",{className:"bg-slate-800 rounded-xl p-6 border border-slate-700",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(ei,{className:"w-5 h-5 text-cyan-400"}),e.jsx("h3",{className:"font-semibold text-white",children:"Description & Buttons"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Description"}),e.jsx("textarea",{value:s.description,onChange:u=>a({...s,description:u.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",rows:3,placeholder:"Buy followers for Instagram, TikTok, YouTube and more..."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Primary Button"}),e.jsx("input",{type:"text",value:s.button_text,onChange:u=>a({...s,button_text:u.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"Buy Followers Now"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Secondary Button"}),e.jsx("input",{type:"text",value:s.secondary_button_text,onChange:u=>a({...s,secondary_button_text:u.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"View Packages"})]})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-slate-800 rounded-xl p-6 border border-slate-700",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(sm,{className:"w-5 h-5 text-cyan-400"}),e.jsx("h3",{className:"font-semibold text-white",children:"Hero Image (Optional)"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-300 mb-1",children:"Image URL"}),e.jsx("input",{type:"text",value:s.hero_image_url||"",onChange:u=>a({...s,hero_image_url:u.target.value}),className:"w-full px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white",placeholder:"https://example.com/hero-image.jpg"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Leave empty to not show an image"})]}),s.hero_image_url&&e.jsx("div",{className:"relative",children:e.jsx("img",{src:s.hero_image_url,alt:"Hero Preview",className:"w-full h-48 object-cover rounded-lg border border-slate-700",onError:u=>{u.target.style.display="none"}})})]})]}),e.jsxs("div",{className:"bg-slate-800 rounded-xl p-6 border border-slate-700",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Np,{className:"w-5 h-5 text-cyan-400"}),e.jsx("h3",{className:"font-semibold text-white",children:"Trust Badges"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.show_trust_badges,onChange:u=>a({...s,show_trust_badges:u.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-cyan-500"}),e.jsx("span",{className:"text-sm text-slate-300",children:"Show Badges"})]})]}),s.show_trust_badges&&e.jsxs("div",{className:"space-y-3",children:[(s.badge_items||[]).map((u,A)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("select",{value:u.icon,onChange:T=>
1024J(A,"icon",T.target.value),className:"w-32 px-2 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white text-sm",children:G5.map(T=>e.jsx("option",{value:T,children:T},T))}),e.jsx("input",{type:"text",value:u.text,onChange:T=>J(A,"text",T.target.value),className:"flex-1 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-white text-sm",placeholder:"Badge text"}),e.jsx("button",{onClick:()=>k(A),className:"p-2 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded-lg",children:e.jsx(xs,{className:"w-4 h-4"})})]},A)),e.jsxs("button",{onClick:S,className:"flex items-center gap-2 text-sm text-cyan-400 hover:text-cyan-300",children:[e.jsx(ns,{className:"w-4 h-4"}),"Add Badge"]})]})]}),e.jsxs("div",{className:"bg-slate-800 rounded-xl p-6 border border-slate-700",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[s.is_active?e.jsx(Ct,{className:"w-5 h-5 text-emerald-400"}):e.jsx(ur,{className:"w-5 h-5 text-slate-400"}),e.jsx("h3",{className:"font-semibold text-white",children:"Status"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.is_active,onChange:u=>a({...s,is_active:u.target.checked}),className:"w-4 h-4 rounded border-slate-600 bg-slate-900 text-cyan-500"}),e.jsx("span",{className:"text-sm text-slate-300",children:"Active"})]})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"When disabled, the default translation texts will be shown"})]})]})]}),e.jsxs("div",{className:"bg-slate-800 rounded-xl p-6 border border-slate-700",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(tm,{className:"w-5 h-5 text-cyan-400"}),e.jsx("h3",{className:"font-semibold text-white",children:"Hero Images"})]}),e.jsx("p",{className:"text-xs text-slate-400",children:"Add images with custom sizes to display in the hero section"})]}),e.jsxs("div",{className:"bg-slate-900 rounded-lg p-4 mb-4 border border-slate-700",children:[e.jsx("h4",{className:"text-sm font-medium text-slate-300 mb-3",children:"Add New Image"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3 mb-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"Image URL"}),e.jsx("input",{type:"text",value:n.image_url,onChange:u=>i({...n,image_url:u.target.value}),className:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white text-sm",placeholder:"https://example.com/image.png"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"Width (px)"}),e.jsx("input",{type:"number",value:n.width,onChange:u=>i({...n,width:parseInt(u.target.value)||200}),className:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white text-sm",min:"50",max:"1000"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"Height (px)"}),e.jsx("input",{type:"number",value:n.height,onChange:u=>i({...n,height:parseInt(u.target.value)||200}),className:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white text-sm",min:"50",max:"1000"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"Alt Text (SEO)"}),e.jsx("input",{type:"text",value:n.alt_text,onChange:u=>i({...n,alt_text:u.target.value}),className:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white text-sm",placeholder:"Image description"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"Link URL (Optional)"}),e.jsx("input",{type:"text",value:n.link_url,onChange:u=>i({...n,link_url:u.target.value}),className:"w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white text-sm",placeholder:"https://example.com/page"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:j,disabled:!n.image_url||y,className:"flex items-center gap-2 px-4 py-2 bg-cyan-500 text-white rounded-lg hover:bg-cyan-600 disabled:opacity-50 text-sm",children:[y?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(ns,{className:"w-4 h-4"}),"Add Image"]}),n.image_url&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-slate-400",children:"Preview:"}),e.jsx("img",{src:n.image_url,alt:"Preview",style:{width:Math.min(n.width,100),height:Math.min(n.height,100),objectFit:"cover"},className:"rounded border border-slate-600",onError:u=>{u.target.style.display="none"}})]})]})]}),r.length>0?e.jsx("div",{className:"space-y-3",children:r.map((u,A)=>e.jsxs("div",{className:`flex items-center gap-4 p-3 rounded-lg border ${u.is_active?"bg-slate-900 border-slate-700":"bg-slate-900/50 border-slate-800 opacity-60"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 text-slate-500",children:[e.jsx(Xv,{className:"w-4 h-4"}),e.jsxs("span",{className:"text-xs font-mono",children:["#",A+1]})]}),e.jsx("img",{src:u.image_url,alt:u.alt_text||"Hero image",style:{width:Math.min(u.width,80),height:Math.min(u.height,60),objectFit:"cover"},className:"rounded border border-slate-700"}),(c==null?void 0:c.id)===u.id?e.jsxs("div",{className:"flex-1 grid grid-cols-2 md:grid-cols-4 gap-2",children:[e.jsx("input",{type:"text",value:c.image_url,onChange:T=>d({...c,image_url:T.target.value}),className:"px-2 py-1 bg-slate-800 border border-slate-600 rounded text-white text-xs",placeholder:"URL"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("input",{type:"number",value:c.width,onChange:T=>d({...c,width:parseInt(T.target.value)||200}
1024),className:"w-20 px-2 py-1 bg-slate-800 border border-slate-600 rounded text-white text-xs",placeholder:"W"}),e.jsx("input",{type:"number",value:c.height,onChange:T=>d({...c,height:parseInt(T.target.value)||200}),className:"w-20 px-2 py-1 bg-slate-800 border border-slate-600 rounded text-white text-xs",placeholder:"H"})]}),e.jsx("input",{type:"text",value:c.alt_text,onChange:T=>d({...c,alt_text:T.target.value}),className:"px-2 py-1 bg-slate-800 border border-slate-600 rounded text-white text-xs",placeholder:"Alt text"}),e.jsx("input",{type:"text",value:c.link_url,onChange:T=>d({...c,link_url:T.target.value}),className:"px-2 py-1 bg-slate-800 border border-slate-600 rounded text-white text-xs",placeholder:"Link URL"})]}):e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-white font-medium",children:[u.width,"x",u.height,"px"]}),u.link_url&&e.jsx(hn,{className:"w-3 h-3 text-cyan-400"})]}),e.jsx("p",{className:"text-xs text-slate-400 truncate max-w-xs",children:u.image_url})]}),e.jsx("div",{className:"flex items-center gap-1",children:(c==null?void 0:c.id)===u.id?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>b(c),disabled:y,className:"p-2 text-emerald-400 hover:bg-emerald-500/10 rounded-lg",children:y?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Cs,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>d(null),className:"p-2 text-slate-400 hover:bg-slate-700 rounded-lg",children:e.jsx(ur,{className:"w-4 h-4"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>d(u),className:"p-2 text-cyan-400 hover:bg-cyan-500/10 rounded-lg",children:e.jsx(Np,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>E(u),className:`p-2 rounded-lg ${u.is_active?"text-emerald-400 hover:bg-emerald-500/10":"text-slate-500 hover:bg-slate-700"}`,children:u.is_active?e.jsx(Ct,{className:"w-4 h-4"}):e.jsx(ur,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>p(u.id),className:"p-2 text-red-400 hover:bg-red-500/10 rounded-lg",children:e.jsx(xs,{className:"w-4 h-4"})})]})})]},u.id))}):e.jsxs("div",{className:"text-center py-8 text-slate-500",children:[e.jsx(sm,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:"No hero images added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add images above to display them in the hero section"})]})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-xl p-6 border border-slate-700",children:[e.jsx("h3",{className:"font-semibold text-white mb-4",children:"Preview"}),e.jsxs("div",{className:"bg-gradient-to-b from-slate-100 to-white rounded-xl p-8 text-center",children:[e.jsx("div",{className:"inline-flex items-center space-x-2 bg-blue-600/10 px-4 py-2 rounded-full mb-4 border border-blue-200/50",children:e.jsx("span",{className:"text-sm font-bold text-blue-600",children:s.badge_text})}),e.jsxs("h1",{className:"text-3xl font-black mb-2",children:[e.jsx("span",{className:"text-slate-900",children:s.title_line1}),e.jsx("br",{}),e.jsx("span",{className:"bg-gradient-to-r from-blue-600 via-cyan-500 to-teal-500 bg-clip-text text-transparent",children:s.title_line2})]}),e.jsx("p",{className:"text-slate-600 max-w-xl mx-auto mb-4",children:s.description}),r.filter(u=>u.is_active).length>0&&e.jsx("div",{className:"flex items-center justify-center gap-4 mb-4 flex-wrap",children:r.filter(u=>u.is_active).map(u=>e.jsx("img",{src:u.image_url,alt:u.alt_text||"Hero image",style:{width:u.width/2,height:u.height/2,objectFit:"cover"},className:"rounded-lg shadow-lg"},u.id))}),e.jsxs("div",{className:"flex items-center justify-center gap-4",children:[e.jsx("button",{className:"bg-gradient-to-r from-blue-600 to-cyan-500 text-white px-6 py-2 rounded-full font-bold text-sm",children:s.button_text}),e.jsx("button",{className:"bg-white text-slate-700 px-6 py-2 rounded-full font-bold text-sm border-2 border-slate-200",children:s.secondary_button_text})]})]})]})]})}function W5(){var R,X,re;const[t,s]=o.useState([]),[a,r]=o.useState(!0),[l,n]=o.useState("payment_started"),[i,c]=o.useState(""),[d,x]=o.use
1024State(1),[m,h]=o.useState(1),[f,y]=o.useState(0),[g,w]=o.useState(null),[N,v]=o.useState(!1),[j,b]=o.useState(""),[p,E]=o.useState(!1),[C,S]=o.useState(null),[k,J]=o.useState(null),[u,A]=o.useState(60),T=o.useRef(null),ae=o.useCallback(()=>{const ue=60-new Date().getSeconds();return ue<=0?60:ue},[]);o.useEffect(()=>{P();const U=setInterval(P,15e3);return()=>clearInterval(U)},[l,d,i]),o.useEffect(()=>(A(ae()),T.current=setInterval(()=>{A(U=>U<=1?(P(),ae()):U-1)},1e3),()=>{T.current&&clearInterval(T.current)}),[ae]);const P=async()=>{try{const U=new URLSearchParams({status:l,page:d.toString(),pageSize:"20"});i&&U.set("search",i);const oe=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_link_payments?${U}`);if(oe.ok){const ue=await oe.json();s(ue.data||[]),y(ue.total||0),h(ue.totalPages||1)}}catch(U){console.error("Error fetching link payments:",U)}finally{r(!1)}},z=async(U,oe)=>{v(!0),J(null);try{const ue=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_process_link_payment",{method:"POST",body:JSON.stringify({linkPaymentId:oe,action:U,adminNote:j||void 0})}),K=await ue.json();if(ue.ok&&K.success)if(J({type:"success",message:K.message||"Islem basarili"}),await P(),U==="cancel")E(!1),w(null);else{const{data:q}=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_link_payments?status=all&search=${oe}`).then(we=>we.json()),je=q==null?void 0:q.find(we=>we.id===oe);je&&w(je)}else J({type:"error",message:K.error||"Islem basarisiz"})}catch{J({type:"error",message:"Bir hata olustu"})}finally{v(!1)}},I=(U,oe)=>{navigator.clipboard.writeText(U),S(oe),setTimeout(()=>S(null),2e3)},Z=U=>new Date(U).toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}),Q=U=>{w(U),E(!0),b(""),J(null)},_=U=>{const oe={pending:{bg:"bg-slate-100",text:"text-slate-600",label:"Bekliyor",icon:e.jsx(Ze,{className:"w-3.5 h-3.5"})},payment_started:{bg:"bg-amber-50",text:"text-amber-700",label:"Odeme Basladi",icon:e.jsx(Gs,{className:"w-3.5 h-3.5"})},paid:{bg:"bg-blue-50",text:"text-blue-700",label:"Odendi",icon:e.jsx(Jt,{className:"w-3.5 h-3.5"})},processing:{bg:"bg-sky-50",text:"text-sky-700",label:"Isleniyor",icon:e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin"})},completed:{bg:"bg-emerald-50",text:"text-emerald-700",label:"Tamamlandi",icon:e.jsx(ne,{className:"w-3.5 h-3.5"})},cancelled:{bg:"bg-red-50",text:"text-red-700",label:"Iptal",icon:e.jsx(st,{className:"w-3.5 h-3.5"})}},ue=oe[U]||oe.pending;return e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold ${ue.bg} ${ue.text}`,children:[ue.icon," ",ue.label]})},M=(U,oe)=>{if(!oe)return e.jsx("span",{className:"text-xs text-slate-300",children:"-"});if(!U)return e.jsx("span",{className:"text-xs text-slate-400",children:"pending"});const ue=U.toLowerCase().trim();return ue==="completed"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-emerald-600",children:[e.jsx(ne,{className:"w-3 h-3"})," completed"]}):ue==="in progress"||ue==="processing"||ue==="inprogress"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-sky-600",children:[e.jsx(Ne,{className:"w-3 h-3 animate-spin"})," in progress"]}):ue==="pending"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-amber-600",children:[e.jsx(Ze,{className:"w-3 h-3"})," pending"]}):ue==="canceled"||ue==="cancelled"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-red-600",children:[e.jsx(st,{className:"w-3 h-3"})," cancelled"]}):ue==="partial"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-orange-600",children:[e.jsx(nt,{className:"w-3 h-3"})," partial"]}):e.jsx("span",{className:"text-xs text-slate-500 font-medium",children:U})},F=[{value:"payment_started",label:"Odeme Basladi"},{value:"paid",label:"Odendi"},{value:"processing",label:"Isleniyor"},{value:"completed",label:"Tamamlandi"},{value:"cancelled",label:"Iptal"},{value:"all",label:"Tumunu Gor"}];return a&&t.length===0?e.jsx("div",{className:"flex items-center justify-center h-96",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 border-3 border-blue-200 border-t-blue-600 rounded-full animate-spin"}),e.jsx("span",{className:"text-sm text-slate-500 font-medium",children:"Yukleniyor..."})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-11 h-11 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl flex items-center justify-center shadow-lg shadow-blue-500/20",children:e.jsx(hn,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-slate-800",children:"Link Odeme Yonetimi"}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-sm mt-0.5",children:"Link ile odeme yapan kullanicilari yonetin ve siparisleri providere gonderin"})]})]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsxs("div",{className:"hidden sm:flex items-center gap-3 px-4 py-2 bg-slate-50 rounded-xl border border-slate-200",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),e.jsx("span",{className:"text-xs text-slate-500",children:"Server Cron"})]}),e.jsx("div",{className:"h-4 w-px bg-slate-300"}),e.jsxs("span",{className:"text-xs font-mono text-slate-600",children:[Math.floor(u/60),":",String(u%60).padStart(2,"0")]})]}),e.jsxs("div",{className:"bg-white border border-slate-200 px-3.5 py-2 rounded-lg shadow-sm",children:[e.jsx("span",{className:"text-sm font-semibold text-slate-700",children:f}),e.jsx("span",{className:"text-xs text-slate-400 ml-1",children:"kayit"})]}),e.jsx("button",{onClick:()=>{r(!0),P()},className:"p-2.5 bg-white border border-slate-200 rounded-lg text-slate-500 hover:text-blue-600 hover:border-blue-300 hover:shadow-sm transition-all",children:e.jsx(Ve,{className:`w-4 h-4 ${a?"animate-spin":""}`})})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3.5 to
1024p-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",value:i,onChange:U=>{c(U.target.value),x(1)},placeholder:"Kullanici adi, e-posta veya link ile ara...",className:"w-full pl-10 pr-4 py-2.5 bg-white border border-slate-200 rounded-xl text-sm text-slate-800 placeholder:text-slate-400 focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none shadow-sm transition-all"})]}),e.jsx("div",{className:"flex gap-1.5 overflow-x-auto pb-1 -mx-1 px-1 scrollbar-hide",children:F.map(U=>e.jsx("button",{onClick:()=>{n(U.value),x(1)},className:`px-3.5 py-2 rounded-lg text-xs sm:text-sm font-medium whitespace-nowrap transition-all ${l===U.value?"bg-blue-600 text-white shadow-md shadow-blue-600/25":"bg-white text-slate-600 border border-slate-200 hover:border-slate-300 hover:bg-slate-50"}`,children:U.label},U.value))}),t.length===0?e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl p-12 text-center shadow-sm",children:[e.jsx("div",{className:"w-14 h-14 bg-slate-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:e.jsx(hn,{className:"w-6 h-6 text-slate-400"})}),e.jsx("p",{className:"text-slate-700 text-base font-semibold",children:"Bu filtrede kayit bulunamadi"}),e.jsx("p",{className:"text-slate-400 text-sm mt-1.5",children:"Farkli bir filtre veya arama deneyin"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden xl:block bg-white border border-slate-200 rounded-2xl overflow-hidden shadow-sm",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-slate-100",children:[e.jsx("th",{className:"px-5 py-3.5 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Kullanici"}),e.jsx("th",{className:"px-5 py-3.5 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Hizmet"}),e.jsx("th",{className:"px-5 py-3.5 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Hedef"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Miktar"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Tutar"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"API Durum"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Durum"}),e.jsx("th",{className:"px-5 py-3.5 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Tarih"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Islem"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:t.map(U=>{var oe,ue,K;return e.jsxs("tr",{className:"hover:bg-blue-50/40 transition-colors cursor-pointer group",onClick:()=>Q(U),children:[e.jsxs("td",{className:"px-5 py-3.5",children:[e.jsxs("div",{className:"text-sm font-semibold text-slate-800 flex items-center gap-1.5",children:[((oe=U.user)==null?void 0:oe.full_name)||"-",((ue=U.user)==null?void 0:ue.is_guest)&&e.jsx("span",{className:"text-[10px] bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full font-medium",children:"Guest"})]}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:((K=U.user)==null?void 0:K.email)||"-"})]}),e.jsxs("td",{className:"px-5 py-3.5",children:[e.jsx("div",{className:"text-sm font-medium text-slate-700",children:U.platform}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:U.service_type})]}),e.jsx("td",{className:"px-5 py-3.5",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-slate-700 font-medium truncate max-w-[160px]",children:U.username}),e.jsx("button",{onClick:q=>{q.stopPropagation(),I(U.link||U.username,U.id)},className:"text-slate-300 hover:text-blue-500 transition-colors flex-shrink-0 opacity-0 group-hover:opacity-100",children:C===U.id?e.jsx(Lt,{className:"w-3.5 h-3.5 text-emerald-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5"})})]})}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:e.jsx("span",{className:"text-sm font-semibold text-slate-700",children:U.quantity.toLocaleStr
1024ing()})}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:e.jsxs("span",{className:"text-sm font-bold text-emerald-600",children:["$",Number(U.price).toFixed(2)]})}),e.jsxs("td",{className:"px-5 py-3.5 text-center",children:[M(U.provider_status,U.provider_order_id),U.provider_order_id&&e.jsxs("div",{className:"text-[10px] text-slate-400 font-mono mt-0.5",children:["#",U.provider_order_id]})]}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:_(U.status)}),e.jsx("td",{className:"px-5 py-3.5",children:e.jsx("span",{className:"text-xs text-slate-500",children:Z(U.created_at)})}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:e.jsx("button",{onClick:q=>{q.stopPropagation(),Q(U)},className:"p-2 bg-slate-50 hover:bg-blue-50 hover:text-blue-600 rounded-lg text-slate-400 transition-all border border-transparent hover:border-blue-200",children:e.jsx(Ct,{className:"w-4 h-4"})})})]},U.id)})})]})}),e.jsx("div",{className:"xl:hidden space-y-3",children:t.map(U=>{var oe,ue,K;return e.jsxs("div",{onClick:()=>Q(U),className:"bg-white border border-slate-200 rounded-xl p-4 cursor-pointer hover:border-blue-300 hover:shadow-md transition-all active:scale-[0.99]",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"text-sm font-bold text-slate-800 truncate flex items-center gap-1.5",children:[((oe=U.user)==null?void 0:oe.full_name)||"-",((ue=U.user)==null?void 0:ue.is_guest)&&e.jsx("span",{className:"text-[10px] bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full font-medium flex-shrink-0",children:"Guest"})]}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5 truncate",children:((K=U.user)==null?void 0:K.email)||"-"})]}),_(U.status)]}),e.jsxs("div",{className:"bg-slate-50 rounded-lg p-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase",children:U.platform}),e.jsx("span",{className:"w-1 h-1 bg-slate-300 rounded-full"}),e.jsx("span",{className:"text-xs text-slate-500",children:U.service_type})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-slate-700 font-medium truncate",children:U.username}),e.jsx("button",{onClick:q=>{q.stopPropagation(),I(U.link||U.username,U.id)},className:"text-slate-300 hover:text-blue-500 transition-colors flex-shrink-0",children:C===U.id?e.jsx(Lt,{className:"w-3.5 h-3.5 text-emerald-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5"})})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-400 uppercase",children:"Miktar"}),e.jsx("div",{className:"text-sm font-bold text-slate-700",children:U.quantity.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-400 uppercase",children:"Tutar"}),e.jsxs("div",{className:"text-sm font-bold text-emerald-600",children:["$",Number(U.price).toFixed(2)]})]}),U.provider_order_id&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-400 uppercase",children:"API"}),e.jsx("div",{children:M(U.provider_status,U.provider_order_id)})]})]}),e.jsx("div",{className:"text-xs text-slate-400",children:Z(U.created_at)})]})]},U.id)})}),m>1&&e.jsxs("div",{className:"flex items-center justify-between bg-white border border-slate-200 rounded-xl px-4 py-3 shadow-sm",children:[e.jsxs("span",{className:"text-sm text-slate-500",children:["Sayfa ",e.jsx("span",{className:"font-semibold text-slate-700",children:d})," / ",m]}),e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("button",{onClick:()=>x(U=>Math.max(1,U-1)),disabled:d===1,className:"p-2 bg-white border border-slate-200 rounded-lg text-slate-500 hover:text-blue-600 hover:border-blue-300 disabled:opacity-40 disabled:cursor-not-allowed transition-all",children:e.jsx(Ua,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>x(U=>Math.min(m,U+1)),disabled:d===m,className:"p-2 bg-white border border-slate-200 rounded-lg text-slate-500 hover:text-blue-600 hover:border-blue-300 disabled:opacity-40 disabled:cursor-not-allowed transition-all",children:e.jsx(ra,{className:"w-4 h-4"})})]})]})]}),p&&g&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center bg-black/50 backdrop-blur-sm",onClick:()=>{E(!1),w(null),J(null)},children:e.jsxs("div",{className:"bg-white rounded-t-2xl sm:rounded-2xl w-full sm:max-w-lg max-h-[92vh] sm:max-h-[90vh] overflow-y-auto shadow-2xl sm:mx-4",onClick:U=>U.stopPropagation(),children:[e.jsxs("div",{className:"sticky top-0 bg-white/95 backdrop-blur-sm border-b border-slate-100 px-5 py-4 flex items-center justify-between z-10",children:[e.jsxs("h3",{className:"text-lg font-bold text-slate-800 flex items-center gap-2.5",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center shadow-sm",children:e.jsx(hn,{className:"w-4 h-4 text-white"})}),"Link Odeme Detayi"]}),e.jsx("button",{onClick:()=>{E(!1),w(null),J(null)},className:"p-2 text-slate-400 hover:text-slate-600 hover:bg-slate-100 rounded-lg transition-all",children:e.jsx(st,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[_(g.status),g.provider_order_id&&e.jsxs("div",{className:"text-xs text-slate-500 bg-slate-50 px-2.5 py-1 rounded-md border border-slate-200",children:["Provider: ",e.jsx("span",{className:"text-blue-600 font-mono font-semibold",children:g.provider_order_id})]})]}),e.jsx("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-9 h-9 bg-white border border-slate-200 rounded-lg flex items-center justify-center flex-shrink-0 shadow-sm",children:e.jsx(ls,{className:"w-4 h-4 text-slate-500"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-sm font-semibold text-slate-800 flex items-center gap-1.5",children:[((R=g.user)==null?void 0:R.full_name)||"-",((X=g.user)==null?void 0:X.is_guest)&&e.jsx("span",{className:"text-[10px] bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full font-medium",children:"Guest"})]}),e.jsx("div",{className:"text-xs text-slate-500 truncate",children:((re=g.user)==null?void 0:re.email)||"-"})]})]})}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-9 h-9 bg-white border border-slate-200 rounded-lg flex items-center justify-center flex-shrink-0 shadow-sm",children:e.jsx(us,{className:"w-4 h-4 text-slate-500"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-sm font-semibold text-slate-800",children:[g.platform," - ",g.service_type]}),e.jsxs("div",{className:"text-xs text-slate-500",children:["Miktar: ",e.jsx("span",{className:"text-slate-700 font-semibold",children:g.quantity.toLocaleStr
1024ing()})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-12",children:[e.jsx(Jt,{className:"w-4 h-4 text-emerald-500"}),e.jsxs("span",{className:"text-xl font-bold text-emerald-600",children:["$",Number(g.price).toFixed(2)]})]})]}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-4 space-y-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase min-w-[50px]",children:"Hedef:"}),e.jsx("span",{className:"text-slate-800 font-mono font-medium",children:g.username}),e.jsx("button",{onClick:()=>I(g.link||g.username,"detail-link"),className:"text-slate-300 hover:text-blue-500 transition-colors",children:C==="detail-link"?e.jsx(Lt,{className:"w-3.5 h-3.5 text-emerald-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5"})})]}),g.link&&g.link!==g.username&&e.jsxs("div",{className:"text-sm flex items-start gap-2",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase min-w-[50px]",children:"Link:"}),e.jsx("span",{className:"text-blue-600 font-mono text-xs break-all",children:g.link})]}),e.jsxs("div",{className:"text-sm flex items-start gap-2",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase min-w-[50px]",children:"Odeme:"}),e.jsxs("a",{href:g.payment_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 text-xs break-all flex items-center gap-1",children:[g.payment_url.substring(0,50),"...",e.jsx(Gs,{className:"w-3 h-3 flex-shrink-0"})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400 px-1",children:[e.jsxs("span",{children:["Olusturulma: ",e.jsx("span",{className:"text-slate-600 font-medium",children:Z(g.created_at)})]}),g.processed_at&&e.jsxs("span",{children:["Islendi: ",e.jsx("span",{className:"text-slate-600 font-medium",children:Z(g.processed_at)})]})]}),g.admin_note&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-3",children:[e.jsx("div",{className:"text-xs text-amber-700 font-semibold mb-1",children:"Admin Notu"}),e.jsx("div",{className:"text-sm text-slate-700",children:g.admin_note})]}),g.provider_status&&e.jsxs("div",{className:"bg-sky-50 border border-sky-200 rounded-xl p-3",children:[e.jsx("div",{className:"text-xs text-sky-700 font-semibold mb-1",children:"Provider Durumu"}),e.jsx("div",{className:"text-sm text-slate-700 font-medium",children:g.provider_status})]}),k&&e.jsxs("div",{className:`p-3 rounded-xl border text-sm font-medium flex items-center gap-2 ${k.type==="success"?"bg-emerald-50 border-emerald-200 text-emerald-700":"bg-red-50 border-red-200 text-red-700"}`,children:[k.type==="success"?e.jsx(ne,{className:"w-4 h-4 flex-shrink-0"}):e.jsx(nt,{className:"w-4 h-4 flex-shrink-0"}),k.message]}),["pending","payment_started","paid","processing"].includes(g.status)&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase tracking-wide",children:"Admin Notu"}),e.jsx("textarea",{value:j,onChange:U=>b(U.target.value),rows:2,className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-slate-800 placeholder:text-slate-400 text-sm resize-none focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none transition-all",placeholder:"Opsiyonel not ekleyin..."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 pt-3 border-t border-slate-100",children:[(g.status==="payment_started"||g.status==="pending")&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>z("mark_paid",g.id),disabled:N,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-blue-600 hover:bg-blue-700 text-white rounded-xl text-sm font-semibold disabled:opacity-50 transition-all active:scale-[0.98] shadow-sm",children:[N?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Jt,{className:"w-4 h-4"}),"Odendi Isaretle"]}),e.jsx("button",{onClick:()=>z("cancel",g.id),disabled:N,className:"px-4 py-3 bg-white hover:bg-red-50 text-red-600 rounded-xl text-sm font-semibold disabled:opacity-50 transition-all border border-red-200 active:scale-[0.98]",children:e.jsx(st,{className:"w-4 h-4"})})]}),g.status==="paid"&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>z("submit_to_provider",g.id),disabled:N,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 text-white rounded-xl text-sm font-semibold disabled:opacity-50 transition-all active:scale-[0.98] shadow-sm",children:[N?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(As,{className:"w-4 h-4"}),"Providere Gonder"]}),e.jsx("button",{onClick:()=>z("cancel",g.id),disabled:N,className:"px-4 py-3 bg-white hover:bg-red-50 text-red-600 rounded-xl text-sm font-semibold disabled:opacity-50 transition-all border border-red-200 active:scale-[0.98]",children:e.jsx(st,{className:"w-4 h-4"})})]}),g.status==="processing"&&e.jsxs("button",{onClick:()=>z("check_status",g.id),disabled:N,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-sky-600 hover:bg-sky-700 text-white rounded-xl text-sm font-semibold disabled:opacity-50 transition-all active:scale-[0.98] shadow-sm",children:[N?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Ve,{className:"w-4 h-4"}),"Durumu Kontrol Et"]})]})]})]})})]})}const _x=[{code:"US",label:"United States",flag:"ðºð¸",defaultCurrency:"USD"},{code:"UK",label:"United Kingdom",flag:"ð¬ð§",defaultCurrency:"GBP"},{code:"EU",label:"Europe",flag:"ðªðº",defaultCurrency:"EUR"},{code:"TR",label:"Turkey",flag:"ð¹ð·",defaultCurrency:"TRY"}],Sx={region:"US",bank_name:"",account_holder:"",account_number:"",routing_number:"",swift_code:"",iban:"",currency:"USD",additional_info:"",is_active:!0,sort_order:0};function H5(){const{showConfirm:t}
1024=Vs(),[s,a]=o.useState([]),[r,l]=o.useState(!0),[n,i]=o.useState(!1),[c,d]=o.useState(null),[x,m]=o.useState(Sx),[h,f]=o.useState(!1),[y,g]=o.useState(null);o.useEffect(()=>{w()},[]);const w=async()=>{try{const E=await(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_bank_accounts",{method:"POST",body:JSON.stringify({action:"list"})})).json();E.success&&a(E.data||[])}catch(p){console.error("Error fetching bank accounts:",p)}finally{l(!1)}},N=async()=>{if(!x.account_holder){g("Account holder is required");return}f(!0),g(null);try{const E={action:c?"update":"create",...x};c&&(E.id=c);const S=await(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_bank_accounts",{method:"POST",body:JSON.stringify(E)})).json();S.success?(i(!1),d(null),m(Sx),w()):g(S.error||"Failed to save")}catch{g("An error occurred")}finally{f(!1)}},v=async p=>{if(await t("Are you sure you want to delete this bank account?",{title:"Delete Bank Account",type:"warning"}))try{const C=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_bank_accounts",{method:"POST",body:JSON.stringify({action:"delete",id:p})}),S=await C.json().catch(()=>({}));if(!C.ok||!S.success){g(S.error||`Failed to delete (${C.status})`);return}g(null),w()}catch(C){console.error("Error deleting:",C),g(C instanceof Error?C.message:"Failed to delete")}},j=async p=>{try{const E=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_bank_accounts",{method:"POST",body:JSON.stringify({action:"update",id:p.id,is_active:!p.is_active})}),C=await E.json().catch(()=>({}));if(!E.ok||!C.success){g(C.error||`Failed to update (${E.status})`);return}g(null),w()}catch(E){console.error("Error toggling:",E),g(E instanceof Error?E.message:"Failed to update")}},b=p=>{m({region:p.region,bank_name:p.bank_name,account_holder:p.account_holder,account_number:p.account_number,routing_number:p.routing_number||"",swift_code:p.swift_code||"",iban:p.iban||"",currency:p.currency,additional_info:p.additional_info||"",is_active:p.is_active,sort_order:p.sort_order}),d(p.id),i(!0),g(null)};return r?e.jsx("div",{className:"flex items-center justify-center h-96",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 border-3 border-blue-200 border-t-blue-600 rounded-full animate-spin"}),e.jsx("span",{className:"text-sm text-slate-500 font-medium",children:"Loading..."})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-11 h-11 bg-gradient-to-br from-teal-500 to-teal-600 rounded-xl flex items-center justify-center shadow-lg shadow-teal-500/20",children:e.jsx(sa,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-slate-800",children:"Bank Accounts"}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-sm mt-0.5",children:"Manage bank accounts for wire transfer payments"})]})]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("button",{onClick:w,className:"p-2.5 bg-white border border-slate-200 rounded-lg text-slate-500 hover:text-blue-600 hover:border-blue-300 transition-all",children:e.jsx(Ve,{className:"w-4 h-4"})}),e.jsxs("button",{onClick:()=>{m(Sx),d(null),i(!0),g(null)},className:"flex items-center gap-2 px-4 py-2.5 bg-teal-600 hover:bg-teal-700 text-white rounded-lg text-sm font-semibold transition-all shadow-sm",children:[e.jsx(ns,{className:"w-4 h-4"})," Add Account"]})]})]}),y&&!n&&e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-200 rounded-xl text-sm text-red-700",children:[e.jsx(nt,{className:"w-4 h-4 flex-shrink-0"})," ",y,e.jsx("button",{onClick:()=>g(null),className:"ml-auto text-red-500 hover:text-red-700",children:e.jsx(ht,{className:"w-4 h-4"})})]}),_x.map(p=>{const E=s.filter(C=>C.region===p.code);return e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"px-5 py-3.5 bg-slate-50 border-b border-slate-100 flex items-center gap-3",children:[e.jsx("span",{className:"text-xl",children:p.flag}),e.jsx("span",{className:"text-sm font-bold text-slate-700",children:p.label}),e.jsx("span",{className:"text-xs text-slate-400 font-medium",children:p.defaultCurrency}),e.jsx("span",{className:"ml-auto bg-slate-200 text-slate-600 text-xs font-bold px-2 py-0.5 rounded-full",children:E.length})]}),E.length===0?e.jsx("div",{className:"p-8 text-center text-sm text-slate-400",children:"No bank accounts for this region"}):e.jsx("div",{className:"divide-y divide-slate-100",children:E.map(C=>e.jsxs("div",{className:"px-5 py-4 flex items-center gap-4 hover:bg-slate-50 transition-colors",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-sm font-bold text-slate-800",children:C.bank_name||"Untitled Bank Account"}),!C.is_active&&e.jsx("span",{className:"text-[10px] bg-red-100 text-red-600 px-1.5 py-0.5 rounded-full font-semibold",children:"Inactive"})]}),e.jsxs("div",{className:"text-xs text-slate-500 space-y-0.5",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-600",children:"Holder:"})," ",C.account_holder]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-600",children:"Account:"})," ",e.jsx("span",{className:"font-mono",children:C.account_number})]}),C.iban&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-600",children:"IBAN:"})," ",e.jsx("span",{className:"font-mono",children:C.iban})]}),C.routing_number&&e.jsxs("div",{children:[e.jsxs("span",{className:"font-medium text-slate-600",children:[C.region==="UK"?"Sort Code":"Routing",":"]})," ",e.jsx("span",{className:"font-mono",children:C.routing_number})]}),C.swift_code&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-600",children:"SWIFT:"})," ",e.jsx("span",{className:"font-mono",children:C.swift_code})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx("button",{onClick:()=>j(C),className:"p-1.5 hover:bg-slate-100 rounded-lg transition-colors",children:C.is_active?e.jsx(Qr,{className:"w-6 h-6 text-emerald-500"}):e.jsx(Kr,{className:"w-6 h-6 text-slate-300"})}),e.jsx("button",{onClick:()=>b(C),className:"p-2 hover:bg-blue-50 rounded-lg text-slate-400 hover:text-blue-600 transition-all",children:e.jsx(Nt,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>v(C.id),className:"p-2 hover:bg-red-50 rounded-lg text-slate-400 hover:text-red-600 transition-all",children:e.jsx(xs,{className:"w-4 h-4"})})]})]},C.id))})]},p.code)}),n&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:()=>i(!1),children:e.jsxs("div",{className:"bg-white rounded-2xl w-full max-w-lg max-h-[90vh] overflow-y-auto shadow-2xl mx-4",onClick:p=>p.stopPropagation(),children:[e.jsxs("div",{className:"sticky top-0 bg-white border-b border-slate-100 px-5 py-4 flex items-center justify-between z-10",children:[e.jsx("h3",{className:"text-lg font-bold text-slate-800",children:c?"Edit Bank Account":"Add Bank Account"}),e.jsx("button",{onClick:()=>i(!1),className:"p-2 text-slate-400 hover:text-slate-600 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"Region"}),e.jsx("select",{value:x.region,onChange:p=>{const E=_x.find(C=>C.code===p.target.value);m(C=>({...C,region:p.target.value,currency:(E==null?void 0:E.defaultCurrency)||C.currency}))},className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none",children:_x.map(p=>e.jsxs("option",{value:p.code,children:[p.flag," ",p.label]},p.code))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"Bank Name"}),e.jsx("input",{value:x.bank_name,onChange:p=>m(E=>({...E,bank_name:p.target.value})),className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"Currency"}),e.jsx("input",{value:x.currency,onChange:p=>m(E=>({...E,currency:p.target.value})),className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"Account Holder *"}),e.jsx("input",{value:x.account_holder,onChange:p=>m(E=>({...E,account_holder:p.target.value})),className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"Account Number"}),e.jsx("input",{value:x.account_number,onChange:p=>m(E=>({...E,account_number:p.target.value})),className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm font-mono focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"IBAN"}),e.jsx("input",{value:x.iban,onChange:p=>m(E=>({...E,iban:p.target.value})),className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm font-mono focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none",placeholder:"Optional"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:x.region==="UK"?"Sort Code":"Routing Number"}),e.jsx("input",{value:x.routing_number,onChange:p=>m(E=>({...E,routing_number:p.target.value})),className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm font-mono focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none",placeholder:"Optional"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"SWIFT/BIC Code"}),e.jsx("input",{value:x.swift_code,onChange:p=>m(E=>({...E,swift_code:p.target.value})),className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm font-mono focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none",placeholder:"Optional"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"Additional Info"}),e.jsx("textarea",{value:x.additional_info,onChange:p=>m(E=>({...E,additional_info:p.target.value})),rows:2,className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none resize-none",placeholder:"Optional notes for customers..."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase",children:"Sort Order"}),e.jsx("input",{type:"number",value:x.sort_order,onChange:p=>m(E=>({...E,sort_order:parseInt(p.target.value)||0})),className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-100 outline-none"})]}),e.jsx("div",{className:"flex items-end pb-1",children:e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:x.is_active,onChange:p=>m(E=>({...E,is_active:p.target.checked})),className:"w-4 h-4 rounded border-slate-300 text-teal-600 focus:ring-teal-500"}),e.jsx("span",{className:"text-sm font-medium text-slate-700",children:"Active"})]})})]}),y&&e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-200 rounded-xl text-sm text-red-700",children:[e.jsx(nt,{className:"w-4 h-4 flex-shrink-0"})," ",y]}),e.jsxs("div",{className:"flex gap-2.5 pt-2",children:[e.jsx("button",{onClick:()=>i(!1),className:"flex-1 py-3 bg-white border border-slate-200 rounded-xl text-sm font-semibold text-slate-600 hover:bg-slate-50 transition-all",children:"Cancel"}),e.jsxs("button",{onClick:N,disabled:h,className:"flex-1 flex items-center justify-center gap-2 py-3 bg-teal-600 hover:bg-teal-700 text-white rounded-xl text-sm font-semibold disabled:opacity-50 transition-all",children:[h?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Lt,{className:"w-4 h-4"}),c?"Update":"Create"]})]})]})]})})]})}const Cx={USD:"$",GBP:"£",EUR:"â¬"};function V5({onViewUser:t,notificationCount:s,onClearNotifications:a}){var se,Se,$,ie,be,Pe;
1024const[r,l]=o.useState([]),[n,i]=o.useState(!0),[c,d]=o.useState("payment_submitted"),[x,m]=o.useState(""),[h,f]=o.useState(1),[y,g]=o.useState(1),[w,N]=o.useState(0),[v,j]=o.useState(null),[b,p]=o.useState(!1),[E,C]=o.useState(""),[S,k]=o.useState(!1),[J,u]=o.useState(null),[A,T]=o.useState(null),[ae,P]=o.useState(()=>60-new Date().getSeconds()),[z,I]=o.useState(!1),[Z,Q]=o.useState(null),_=o.useRef(null),M=o.useRef(!1),F=o.useRef(),R=o.useCallback(async()=>{try{const de=new URLSearchParams({status:c,page:h.toString(),pageSize:"20"});x&&de.set("search",x);const H=await We(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_bank_transfers?${de}`);if(H.ok){const me=await H.json();l(me.data||[]),N(me.total||0),g(me.totalPages||1)}}catch(de){console.error("Error fetching bank transfers:",de)}finally{i(!1)}},[c,h,x]);F.current=R;const X=o.useCallback(async(de=!1)=>{var H;if(!M.current){M.current=!0,de||I(!0);try{const me="https://kdqsajuhvcmxsnttdetg.supabase.co",ee="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ae=await fetch(`${me}/functions/v1/batch_sync_bank_transfer_statuses`,{method:"POST",headers:{Authorization:`Bearer ${ee}`,"Content-Type":"application/json",apikey:ee},body:JSON.stringify({limit:50})});if(Ae.ok){const he=await Ae.json(),D=he.total||0,O=he.changed||0,fe=he.synced||0;D>0?Q(O>0?`${O}/${D} guncellendi`:`${fe}/${D} kontrol, degisiklik yok`):Q("Sync edilecek kayit yok")}else{const he=await Ae.text().catch(()=>"");console.error("Sync response error:",Ae.status,he),Q(`Hata: ${Ae.status}`)}}catch(me){console.error("Provider sync error:",me),Q("Baglanti hatasi")}finally{M.current=!1,I(!1),(H=F.current)==null||H.call(F)}}},[]);o.useEffect(()=>{R()},[R]);const re=o.useRef(X);re.current=X,o.useEffect(()=>{re.current(!0),P((()=>{const ee=new Date().getSeconds();return ee===0?60:60-ee})());let H=-1;return _.current=setInterval(()=>{const me=new Date,ee=me.getSeconds(),Ae=ee===0?60:60-ee;P(Ae);const he=me.getMinutes();(ee===1||ee===2)&&he!==H&&(H=he,re.current(!0))},1e3),()=>{_.current&&clearInterval(_.current)}},[]);const U=async(de,H)=>{p(!0),T(null);try{const me=await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_process_bank_transfer",{method:"POST",body:JSON.stringify({paymentId:H,action:de,adminNote:E||void 0})}),ee=await me.json();me.ok&&ee.success?(T({type:ee.queued?"warning":"success",message:ee.queued?"Provider mesgul - Siparis bekleme sirasina alindi ve otomatik olarak tekrar denenecek":ee.message||"Islem basarili"}),await R(),k(!1),j(null)):T({type:"error",message:ee.error||"Islem basarisiz"})}catch{T({type:"error",message:"Bir hata olustu"})}finally{p(!1)}},oe=(de,H)=>{navigator.clipboard.writeText(de),u(H),setTimeout(()=>u(null),2e3)},ue=de=>new Date(de).toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}),K=de=>{j(de),k(!0),C(""),T(null)},q=de=>{const H={payment_submitted:{bg:"bg-amber-50",text:"text-amber-700",label:"Odeme Yapildi",icon:e.jsx(Ze,{className:"w-3.5 h-3.5"})},confirmed:{bg:"bg-blue-50",text:"text-blue-700",label:"Onaylandi",icon:e.jsx(ne,{className:"w-3.5 h-3.5"})},processing:{bg:"bg-sky-50",text:"text-sky-700",label:"Isleniyor",icon:e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin"})},completed:{bg:"bg-emerald-50",text:"text-emerald-700",label:"Tamamlandi",icon:e.jsx(ne,{className:"w-3.5 h-3.5"})},rejected:{bg:"bg-red-50",text:"text-red-700",label:"Reddedildi",icon:e.jsx(Ka,{className:"w-3.5 h-3.5"})},cancelled:{bg:"bg-slate-100",text:"text-slate-600",label:"Iptal",icon:e.jsx(st,{className:"w-3.5 h-3.5"})}},me=H[de]||H.payment_submitted;return e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold ${me.bg} ${me.text}`,children:[me.icon," ",me.label]})},je=(de,H)=>{if(!H)return e.jsx("span",{className:"text-xs text-slate-300",children:"-"});if(!de)return e.jsx("span",{className:"text-xs text-slate-400",children:"pending"});const me=de.toLowerCase().trim();return me==="completed"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-emerald-600",children:[e.jsx(ne,{className:"w-3 h-3"})," completed"]}):me==="in progress"||me==="processing"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-sky-600",children:[e.jsx(Ne,{className:"w-3 h-3 animate-spin"})," in progress"]}):me==="pending"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-amber-600",children:[e.jsx(Ze,{className:"w-3 h-3"})," pending"]}):me==="canceled"||me==="cancelled"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-red-600",children:[e.jsx(st,{className:"w-3 h-3"})," cancelled"]}):e.jsx("span",{className:"text-xs text-slate-500 font-medium",children:de})},we=[{value:"payment_submitted",label:"Odeme Yapildi"},{value:"confirmed",label:"Onaylandi"},{value:"processing",label:"Isleniyor"},{value:"completed",label:"Tamamlandi"},{value:"rejected",label:"Reddedildi"},{value:"all",label:"Tumunu Gor"}];return n&&r.length===0?e.jsx("div",{className:"flex items-center justify-center h-96",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 border-3 border-teal-200 border-t-teal-600 rounded-full animate-spin"}),e.jsx("span",{className:"text-sm text-slate-500 font-medium",children:"Yukleniyor..."})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-11 h-11 bg-gradient-to-br from-teal-500 to-teal-600 rounded-xl flex items-center justify-center shadow-lg shadow-teal-500/20",children:e.jsx(sa,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-slate-800",children:"Bank Transfer Odemeleri"}),e.jsx("p",{className:"text-slate-500 text-xs sm:text-sm mt-0.5",children:"Banka havale odemeleri yonetin ve siparisleri providere gonderin"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("div",{className:`flex items-center gap-2 sm:gap-3 px-3 sm:px-4 py-2 rounded-xl border transition-all ${z?"bg-amber-50 border-amber-200":"bg-slate-50 border-slate-200"}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${z?"bg-amber-500":"bg-green-500"} animate-pulse`}),e.jsx("span",{className:"text-xs text-slate-500 hidden sm:inline",children:z?"
1024Senkronize ediliyor...":"Cron Aktif"})]}),e.jsx("div",{className:"h-4 w-px bg-slate-300"}),e.jsxs("span",{className:`text-xs font-mono font-semibold tabular-nums ${ae<=5?"text-amber-600":"text-slate-600"}`,children:["0:",String(ae).padStart(2,"0")]}),e.jsx("button",{onClick:()=>X(!1),disabled:z,className:"p-1 sm:p-1.5 hover:bg-amber-100 rounded-lg transition-colors disabled:opacity-50",title:"Provider ile hemen senkronize et",children:z?e.jsx(Ne,{className:"w-4 h-4 text-amber-600 animate-spin"}):e.jsx(rt,{className:"w-4 h-4 text-amber-600"})})]}),Z&&e.jsx("span",{className:`text-[10px] px-2 py-1 rounded-full border ${Z.includes("hata")||Z.includes("Hata")||Z.includes("basarisiz")?"text-red-600 bg-red-50 border-red-200":"text-teal-600 bg-teal-50 border-teal-200"}`,children:Z}),e.jsxs("div",{className:"bg-white border border-slate-200 px-3.5 py-2 rounded-lg shadow-sm",children:[e.jsx("span",{className:"text-sm font-semibold text-slate-700",children:w}),e.jsx("span",{className:"text-xs text-slate-400 ml-1",children:"kayit"})]}),s!==void 0&&s>0&&a&&e.jsxs("button",{onClick:a,title:"Bildirimleri temizle",className:"flex items-center gap-1.5 px-3 py-2 bg-red-50 border border-red-200 rounded-lg text-red-600 hover:bg-red-100 hover:border-red-300 transition-all text-xs font-semibold",children:[e.jsx(Dv,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Temizle"}),e.jsx("span",{className:"bg-red-500 text-white text-[10px] font-bold px-1.5 py-0.5 rounded-full min-w-[18px] text-center",children:s>99?"99+":s})]}),e.jsx("button",{onClick:()=>{i(!0),R()},className:"p-2.5 bg-white border border-slate-200 rounded-lg text-slate-500 hover:text-teal-600 hover:border-teal-300 transition-all",title:"Listeyi yenile",children:e.jsx(Ve,{className:`w-4 h-4 ${n?"animate-spin":""}`})})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",value:x,onChange:de=>{m(de.target.value),f(1)},placeholder:"Kullanici adi, e-posta veya hedef ile ara...",className:"w-full pl-10 pr-4 py-2.5 bg-white border border-slate-200 rounded-xl text-sm text-slate-800 placeholder:text-slate-400 focus:border-teal-400 focus:ring-2 focus:ring-teal-100 outline-none shadow-sm transition-all"})]}),e.jsx("div",{className:"flex gap-1.5 overflow-x-auto pb-1 -mx-1 px-1 scrollbar-hide",children:we.map(de=>e.jsx("button",{onClick:()=>{d(de.value),f(1)},className:`px-3.5 py-2 rounded-lg text-xs sm:text-sm font-medium whitespace-nowrap transition-all ${c===de.value?"bg-teal-600 text-white shadow-md shadow-teal-600/25":"bg-white text-slate-600 border border-slate-200 hover:border-slate-300"}`,children:de.label},de.value))}),r.length===0?e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl p-12 text-center shadow-sm",children:[e.jsx("div",{className:"w-14 h-14 bg-slate-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:e.jsx(sa,{className:"w-6 h-6 text-slate-400"})}),e.jsx("p",{className:"text-slate-700 text-base font-semibold",children:"Bu filtrede kayit bulunamadi"}),e.jsx("p",{className:"text-slate-400 text-sm mt-1.5",children:"Farkli bir filtre veya arama deneyin"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden xl:block bg-white border border-slate-200 rounded-2xl overflow-hidden shadow-sm",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-slate-100",children:[e.jsx("th",{className:"px-5 py-3.5 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Kullanici"}),e.jsx("th",{className:"px-5 py-3.5 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Hizmet"}),e.jsx("th",{className:"px-5 py-3.5 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Hedef"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Banka"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Tutar"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"API Durum"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Durum"}),e.jsx("th",{className:"px-5 py-3.5 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Tarih"}),e.jsx("th",{className:"px-5 py-3.5 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Islem"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:r.map(de=>{var H,me,ee,Ae,he;return e.jsxs("tr",{className:"hover:bg-teal-50/40 transition-colors cursor-pointer group",onClick:()=>K(de),children:[e.jsxs("td",{className:"px-5 py-3.5",children:[e.jsxs("div",{className:"text-sm font-semibold text-slate-800 flex items-center gap-1.5",children:[((H=de.user)==null?void 0:H.full_name)||"-",((me=de.user)==null?void 0:me.is_guest)&&e.jsx("span",{className:"text-[10px] bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full font-medium",children:"Guest"})]}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:((ee=de.user)==null?void 0:ee.email)||"-"}),de.sender_name&&e.jsxs("div",{className:"text-[10px] text-teal-600 font-semibold mt-0.5",children:["Gonderen: ",de.sender_name]})]}),e.jsxs("td",{className:"px-5 py-3.5",children:[e.jsx("div",{className:"text-sm font-medium text-slate-700",children:de.platform}),e.jsxs("div",{className:"text-xs text-slate-400 mt-0.5",children:[de.quantity.toLocaleStr
1024ing()," ",de.service_type]})]}),e.jsx("td",{className:"px-5 py-3.5",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-slate-700 font-medium truncate max-w-[140px]",children:de.username}),e.jsx("button",{onClick:D=>{D.stopPropagation(),oe(de.link||de.username,de.id)},className:"text-slate-300 hover:text-teal-500 transition-colors flex-shrink-0 opacity-0 group-hover:opacity-100",children:J===de.id?e.jsx(Lt,{className:"w-3.5 h-3.5 text-emerald-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5"})})]})}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:de.bank_account?e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-semibold text-slate-700",children:de.bank_account.bank_name}),e.jsxs("div",{className:"text-[10px] text-slate-400",children:[de.bank_account.region," - ",de.bank_account.currency]})]}):e.jsx("span",{className:"text-xs text-slate-300",children:"-"})}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:de.local_price&&((Ae=de.bank_account)!=null&&Ae.currency)?e.jsxs("div",{children:[e.jsxs("span",{className:"text-sm font-bold text-emerald-600",children:[Cx[de.bank_account.currency]||"",Number(de.local_price).toFixed(2)]}),de.bank_account.currency!=="USD"&&e.jsxs("div",{className:"text-[10px] text-slate-400",children:["$",Number(de.price).toFixed(2)," USD"]})]}):(he=de.bank_account)!=null&&he.currency&&de.bank_account.currency!=="USD"?e.jsxs("div",{children:[e.jsxs("span",{className:"text-sm font-bold text-emerald-600",children:["$",Number(de.price).toFixed(2)]}),e.jsx("div",{className:"text-[10px] text-slate-400",children:de.bank_account.currency})]}):e.jsxs("span",{className:"text-sm font-bold text-emerald-600",children:["$",Number(de.price).toFixed(2)]})}),e.jsxs("td",{className:"px-5 py-3.5 text-center",children:[je(de.provider_status,de.provider_order_id),de.provider_order_id&&e.jsxs("div",{className:"text-[10px] text-slate-400 font-mono mt-0.5",children:["#",de.provider_order_id]})]}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:q(de.status)}),e.jsx("td",{className:"px-5 py-3.5",children:e.jsx("span",{className:"text-xs text-slate-500",children:ue(de.created_at)})}),e.jsx("td",{className:"px-5 py-3.5 text-center",children:e.jsx("button",{onClick:D=>{D.stopPropagation(),K(de)},className:"p-2 bg-slate-50 hover:bg-teal-50 hover:text-teal-600 rounded-lg text-slate-400 transition-all border border-transparent hover:border-teal-200",children:e.jsx(Ct,{className:"w-4 h-4"})})})]},de.id)})})]})}),e.jsx("div",{className:"xl:hidden space-y-3",children:r.map(de=>{var H,me,ee,Ae;return e.jsxs("div",{onClick:()=>K(de),className:"bg-white border border-slate-200 rounded-xl p-4 cursor-pointer hover:border-teal-300 hover:shadow-md transition-all",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"text-sm font-bold text-slate-800 truncate flex items-center gap-1.5",children:[((H=de.user)==null?void 0:H.full_name)||"-",((me=de.user)==null?void 0:me.is_guest)&&e.jsx("span",{className:"text-[10px] bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full font-medium flex-shrink-0",children:"Guest"})]}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5 truncate",children:((ee=de.user)==null?void 0:ee.email)||"-"}),de.sender_name&&e.jsxs("div",{className:"text-[11px] text-teal-600 font-semibold mt-0.5",children:["Gonderen: ",de.sender_name]})]}),q(de.status)]}),e.jsxs("div",{className:"bg-slate-50 rounded-lg p-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase",children:de.platform}),e.jsx("span",{className:"w-1 h-1 bg-slate-300 rounded-full"}),e.jsxs("span",{className:"text-xs text-slate-500",children:[de.quantity.toLocaleString()," ",de.service_type]})]}),e.jsx("span",{className:"text-sm text-slate-700 font-medium truncate block",children:de.username})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-400 uppercase",children:"Tutar"}),de.local_price&&((Ae=de.bank_account)!=null&&Ae.currency)?e.jsxs("div",{children:[e.jsxs("div",{className:"text-sm font-bold text-emerald-600",children:[Cx[de.bank_account.currency]||"",Number(de.local_price).toFixed(2)]}),de.bank_account.currency!=="USD"&&e.jsxs("div",{className:"text-[10px] text-slate-400",children:["$",Number(de.price).toFixed(2)]})]}):e.jsxs("div",{className:"text-sm font-bold text-emerald-600",children:["$",Number(de.price).toFixed(2)]})]}),de.bank_account&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-400 uppercase",children:"Banka"}),e.jsx("div",{className:"text-xs font-semibold text-slate-600",children:de.bank_account.bank_name})]})]}),e.jsx("div",{className:"text-xs text-slate-400",children:ue(de.created_at)})]})]},de.id)})}),y>1&&e.jsxs("div",{className:"flex items-center justify-between bg-white border border-slate-200 rounded-xl px-4 py-3 shadow-sm",children:[e.jsxs("span",{className:"text-sm text-slate-500",children:["Sayfa ",e.jsx("span",{className:"font-semibold text-slate-700",children:h})," / ",y]}),e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("button",{onClick:()=>f(de=>Math.max(1,de-1)),disabled:h===1,className:"p-2 bg-white border border-slate-200 rounded-lg text-slate-500 hover:text-teal-600 disabled:opacity-40 transition-all",children:e.jsx(Ua,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>f(de=>Math.min(y,de+1)),disabled:h===y,className:"p-2 bg-white border border-slate-200 rounded-lg text-slate-500 hover:text-teal-600 disabled:opacity-40 transition-all",children:e.jsx(ra,{className:"w-4 h-4"})})]})]})]}),S&&v&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center bg-black/50 backdrop-blur-sm",onClick:()=>{k(!1),j(null),T(null)},children:e.jsxs("div",{className:"bg-white rounded-t-2xl sm:rounded-2xl w-full sm:max-w-lg max-h-[95vh] sm:max-h-[90vh] flex flex-col shadow-2xl sm:mx-4",onClick:de=>de.stopPropagation(),children:[e.jsxs("div",{className:"flex-shrink-0 bg-white/95 backdrop-blur-sm border-b border-slate-100 px-4 sm:px-5 py-3 sm:py-4 flex items-center justify-between z-10 rounded-t-2xl",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-bold text-slate-800 flex items-center gap-2",children:[e.jsx("div",{className:"w-7 h-7 sm:w-8 sm:h-8 bg-gradient-to-br from-teal-500 to-teal-600 rounded-lg flex items-center justify-center shadow-sm",children:e.jsx(sa,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-white"})}),"Bank Transfer Detay"]}),e.jsx("button",{onClick:()=>{k(!1),j(null),T(null)},className:"p-2 text-slate-400 hover:text-slate-600 hover:bg-slate-100 rounded-lg transition-all",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 sm:p-5 space-y-3 sm:space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[q(v.status),v.provider_order_id&&e.jsxs("div",{className:"text-xs text-slate-500 bg-slate-50 px-2.5 py-1 rounded-md border border-slate-200 truncate max-w-[200px]",children:["Provider: ",e.jsx("span",{className:"text-teal-600 font-mono font-semibold",children:v.provider_order_id})]})]}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-3 sm:p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 sm:w-9 sm:h-9 bg-white border border-slate-200 rounded-lg flex items-center justify-center flex-shrink-0 shadow-sm",children:e.jsx(ls,{className:"w-4 h-4 text-slate-500"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"text-sm font-semibold text-slate-800 flex items-center gap-1.5 flex-wrap",children:[v.user_id&&!((se=v.user)!=null&&se.is_guest)&&t?e.jsx("button",{onClick:()=>{k(!1),j(null),t(v.user_id)},className:"text-teal-600 hover:text-teal-700 hover:underline transition-colors text-left break-all",children:((Se=v.user)==null?void 0:Se.full_name)||"-"}):e.jsx("span",{className:"break-all",children:(($=v.user)==null?void 0:$.full_name)||"-"}),((ie=v.user)==null?void 0:ie.is_guest)&&e.jsx("span",{className:"text-[10px] bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full font-medium flex-shrink-0",children:"Guest"})]}),e.jsx("div",{className:"text-xs text-slate-500 truncate",children:((be=v.user)==null?void 0:be.email)||"-"})]})]}),v.sender_name&&e.jsx("div",{className:"mt-3 pt-3 border-t border-slate-200",children:e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase",children:"Gonderen Ismi:"}),e.jsx("span",{className:"text-sm font-bold text-teal-700 break-all",children:v.sender_name})]})})]}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-3 sm:p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 sm:w-9 sm:h-9 bg-white border border-slate-200 rounded-lg flex items-center justify-center flex-shrink-0 shadow-sm",children:e.jsx(us,{className:"w-4 h-4 text-slate-500"})}),e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"text-sm font-semibold text-slate-800 break-words",children:[v.platform," - ",v.quantity.toLocaleStr
1024ing()," ",v.service_type]})})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-11 sm:pl-12",children:[e.jsx(Jt,{className:"w-4 h-4 text-emerald-500 flex-shrink-0"}),v.local_price&&((Pe=v.bank_account)!=null&&Pe.currency)?e.jsxs("div",{children:[e.jsxs("span",{className:"text-lg sm:text-xl font-bold text-emerald-600",children:[Cx[v.bank_account.currency]||"",Number(v.local_price).toFixed(2),e.jsx("span",{className:"text-xs font-medium text-slate-400 ml-1",children:v.bank_account.currency})]}),v.bank_account.currency!=="USD"&&e.jsxs("div",{className:"text-xs text-slate-400 mt-0.5",children:["$",Number(v.price).toFixed(2)," USD",v.exchange_rate_used&&e.jsxs("span",{className:"ml-1.5",children:["(kur: ",Number(v.exchange_rate_used).toFixed(4),")"]})]})]}):e.jsxs("span",{className:"text-lg sm:text-xl font-bold text-emerald-600",children:["$",Number(v.price).toFixed(2)]})]})]}),v.bank_account&&e.jsxs("div",{className:"bg-teal-50 border border-teal-200 rounded-xl p-3 sm:p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(sa,{className:"w-4 h-4 text-teal-600"}),e.jsx("span",{className:"text-xs font-semibold text-teal-700 uppercase",children:"Secilen Banka"})]}),e.jsx("div",{className:"text-sm font-bold text-slate-800",children:v.bank_account.bank_name}),e.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[v.bank_account.region," - ",v.bank_account.currency]})]}),e.jsx("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-3 sm:p-4",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase flex-shrink-0",children:"Hedef:"}),e.jsx("span",{className:"text-slate-800 font-mono font-medium truncate",children:v.username}),e.jsx("button",{onClick:()=>oe(v.link||v.username,"detail-link"),className:"text-slate-300 hover:text-teal-500 transition-colors flex-shrink-0",children:J==="detail-link"?e.jsx(Lt,{className:"w-3.5 h-3.5 text-emerald-500"}):e.jsx(Ht,{className:"w-3.5 h-3.5"})})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-1 text-xs text-slate-400 px-1",children:[e.jsxs("span",{children:["Olusturulma: ",e.jsx("span",{className:"text-slate-600 font-medium",children:ue(v.created_at)})]}),v.processed_at&&e.jsxs("span",{children:["Islendi: ",e.jsx("span",{className:"text-slate-600 font-medium",children:ue(v.processed_at)})]})]}),v.admin_note&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-3",children:[e.jsx("div",{className:"text-xs text-amber-700 font-semibold mb-1",children:"Admin Notu"}),e.jsx("div",{className:"text-sm text-slate-700 break-words",children:v.admin_note})]}),v.provider_status&&e.jsxs("div",{className:"bg-sky-50 border border-sky-200 rounded-xl p-3",children:[e.jsx("div",{className:"text-xs text-sky-700 font-semibold mb-1",children:"Provider Durumu"}),e.jsx("div",{className:"text-sm text-slate-700 font-medium",children:v.provider_status})]}),A&&e.jsxs("div",{className:`p-3 rounded-xl border text-sm font-medium flex items-start gap-2 ${A.type==="success"?"bg-emerald-50 border-emerald-200 text-emerald-700":A.type==="warning"?"bg-amber-50 border-amber-200 text-amber-700":"bg-red-50 border-red-200 text-red-700"}`,children:[A.type==="success"?e.jsx(ne,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}):A.type==="warning"?e.jsx(Ze,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}):e.jsx(nt,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"break-words",children:A.message})]}),["payment_submitted","confirmed","processing"].includes(v.status)&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 mb-1.5 uppercase tracking-wide",children:"Admin Notu"}),e.jsx("textarea",{value:E,onChange:de=>C(de.target.value),rows:2,className:"w-full px-3 py-2.5 bg-white border border-slate-200 rounded-xl text-slate-800 placeholder:text-slate-400 text-sm resize-none focus:border-teal-400 focus:ring-2 focus:ring-teal-100 outline-none transition-all",placeholder:"Opsiyonel not ekleyin..."})]})]}),["payment_submitted","confirmed","processing"].includes(v.status)&&e.jsx("div",{className:"flex-shrink-0 border-t border-slate-100 p-4 sm:p-5 bg-white rounded-b-2xl",children:e.jsxs("div",{className:"flex gap-2",children:[v.status==="payment_submitted"&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>U("confirm",v.id),disabled:b,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 text-white rounded-xl text-sm font-semibold disabled:opacity-50 transition-all shadow-sm active:scale-[0.98]",children:[b?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(As,{className:"w-4 h-4"}),"Onayla & Gonder"]}),e.jsx("button",{onClick:()=>U("reject",v.id),disabled:b,className:"px-4 py-3 bg-white hover:bg-red-50 text-red-600 rounded-xl text-sm font-semibold disabled:opacity-50 transition-all border border-red-200 active:scale-[0.98]",children:e.jsx(Ka,{className:"w-4 h-4"})})]}),v.status==="confirmed"&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>U("submit_to_provider",v.id),disabled:b,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 text-white rounded-xl text-sm font-semibold disabled:opacity-50 transition-all shadow-sm active:scale-[0.98]",children:[b?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(As,{className:"w-4 h-4"}),"Providere Gonder"]}),e.jsx("button",{onClick:()=>U("cancel",v.id),disabled:b,className:"px-4 py-3 bg-white hover:bg-red-50 text-red-600 rounded-xl text-sm font-semibold disabled:opacity-50 transition-all border border-red-200 active:scale-[0.98]",children:e.jsx(st,{className:"w-4 h-4"})})]}),v.status==="processing"&&e.jsxs("button",{onClick:()=>U("check_status",v.id),disabled:b,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-sky-600 hover:bg-sky-700 text-white rounded-xl text-sm font-semibold disabled:opacity-50 transition-all shadow-sm active:scale-[0.98]",children:[b?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Ve,{className:"w-4 h-4"}),"Durumu Kontrol Et"]})]})})]})})]})}function Y5({onViewUser:t}
1024){const[s,a]=o.useState([]),[r,l]=o.useState(!0),[n,i]=o.useState("all"),[c,d]=o.useState(""),[x,m]=o.useState(null),[h,f]=o.useState({}),[y,g]=o.useState(null),w=async()=>{l(!0);try{const k=n!=="all"?`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_get_withdrawals?status=${n}`:"https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_get_withdrawals",u=await(await We(k)).json();u.withdrawals&&a(u.withdrawals)}catch(k){console.error("Error fetching withdrawals:",k)}finally{l(!1)}};o.useEffect(()=>{w()},[n]);const N=async(k,J)=>{m(k);try{(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_process_withdrawal",{method:"POST",body:JSON.stringify({withdrawal_id:k,action:J,admin_note:h[k]||null})})).ok&&(w(),g(null))}catch(u){console.error("Error processing withdrawal:",u)}finally{m(null)}},v=s.filter(k=>{var u,A,T,ae;if(!c)return!0;const J=c.toLowerCase();return((u=k.user_email)==null?void 0:u.toLowerCase().includes(J))||((A=k.user_name)==null?void 0:A.toLowerCase().includes(J))||((T=k.holder_name)==null?void 0:T.toLowerCase().includes(J))||((ae=k.id)==null?void 0:ae.toLowerCase().includes(J))}),j=s.filter(k=>k.status==="pending").length,b=s.filter(k=>k.status==="completed").length,p=s.filter(k=>k.status==="rejected").length,E=s.filter(k=>k.status==="pending").reduce((k,J)=>k+J.amount,0),C=k=>k==="US"?"United States":k==="UK"?"United Kingdom":"Europe",S=k=>k==="US"?"ðºð¸":k==="UK"?"ð¬ð§":"ðªðº";return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Withdrawal Requests"}),e.jsx("p",{className:"text-slate-500 mt-1 text-sm",children:"Manage user withdrawal requests from game balance"})]}),e.jsxs("button",{onClick:w,disabled:r,className:"flex items-center gap-2 px-4 py-2.5 bg-white border border-slate-200 hover:border-slate-300 rounded-xl text-sm font-medium text-slate-700 transition-colors shadow-sm",children:[e.jsx(Ve,{className:`w-4 h-4 ${r?"animate-spin":""}`}),"Refresh"]})]}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-6",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Ze,{className:"w-4 h-4 text-amber-500"}),e.jsx("span",{className:"text-xs font-medium text-slate-500 uppercase",children:"Pending"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:j}),e.jsxs("div",{className:"text-xs text-amber-600 font-medium mt-0.5",children:["$",E.toFixed(2)," total"]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(ne,{className:"w-4 h-4 text-emerald-500"}),e.jsx("span",{className:"text-xs font-medium text-slate-500 uppercase",children:"Completed"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:b})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(st,{className:"w-4 h-4 text-red-500"}),e.jsx("span",{className:"text-xs font-medium text-slate-500 uppercase",children:"Rejected"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:p})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(an,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-xs font-medium text-slate-500 uppercase",children:"Total"})]}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:s.length})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsx("div",{className:"p-4 border-b border-slate-200",children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",value:c,onChange:k=>d(k.target.value),placeholder:"Search by name, email...",className:"w-full pl-10 pr-4 py-2.5 border border-slate-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none"})]}),e.jsx("div",{className:"flex gap-2",children:["all","pending","completed","rejected"].map(k=>e.jsxs("button",{onClick:()=>i(k),className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors capitalize ${n===k?"bg-blue-600 text-white":"bg-slate-100 text-slate-600 hover:bg-slate-200"}`,children:[k==="all"?"All":k,k==="pending"&&j>0&&e.jsx("span",{className:"ml-1.5 bg-red-500 text-white text-[10px] font-bold px-1.5 py-0.5 rounded-full",children:j})]},k))})]})}),r?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(Ne,{className:"w-8 h-8 text-blue-500 animate-spin"})}):v.length===0?e.jsxs("div",{className:"text-center py-20",children:[e.jsx(an,{className:"w-12 h-12 text-slate-200 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-500 text-sm",children:"No withdrawal requests found"})]}):e.jsx("div",{className:"divide-y divide-slate-100",children:v.map(k=>e.jsxs("div",{className:"p-4 lg:p-5 hover:bg-slate-50/50 transition-colors",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:`p-2.5 rounded-xl flex-shrink-0 ${k.status==="pending"?"bg-amber-100":k.status==="completed"?"bg-emerald-100":"bg-red-100"}`,children:k.status==="pending"?e.jsx(Ze,{className:"w-5 h-5 text-amber-600"}):k.status==="completed"?e.jsx(ne,{className:"w-5 h-5 text-emerald-600"}):e.jsx(st,{className:"w-5 h-5 text-red-600"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("span",{className:"font-bold text-slate-900 text-lg",children:["$",k.amount.toFixed(2)]}),e.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-bold uppercase ${k.status==="pending"?"bg-amber-100 text-amber-700":k.status==="completed"?"bg-emerald-100 text-emerald-700":"bg-red-100 text-red-700"}`,children:k.status})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[e.jsx("button",{onClick:()=>
1024t==null?void 0:t(k.user_id),className:"text-xs text-blue-600 hover:text-blue-700 font-medium hover:underline",children:k.user_name||k.user_email}),e.jsx("span",{className:"text-[10px] text-slate-400",children:k.user_email})]})]})]}),e.jsxs("div",{className:"text-right flex-shrink-0",children:[e.jsx("div",{className:"text-xs text-slate-500",children:new Date(k.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}),k.processed_at&&e.jsxs("div",{className:"text-[10px] text-slate-400 mt-0.5",children:["Processed: ",new Date(k.processed_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})]})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(wt,{className:"w-3.5 h-3.5 text-slate-400"}),e.jsxs("span",{className:"text-xs font-semibold text-slate-600",children:[S(k.region)," ",C(k.region)]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2",children:[e.jsxs("div",{className:"bg-white rounded-lg p-2.5 border border-slate-200",children:[e.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase block mb-0.5",children:"Holder Name"}),e.jsx("span",{className:"text-sm font-medium text-slate-800",children:k.holder_name})]}),k.account_number&&e.jsxs("div",{className:"bg-white rounded-lg p-2.5 border border-slate-200",children:[e.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase block mb-0.5",children:"Account Number"}),e.jsx("span",{className:"text-sm font-mono font-medium text-slate-800",children:k.account_number})]}),k.routing_number&&e.jsxs("div",{className:"bg-white rounded-lg p-2.5 border border-slate-200",children:[e.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase block mb-0.5",children:"Routing Number"}),e.jsx("span",{className:"text-sm font-mono font-medium text-slate-800",children:k.routing_number})]}),k.sort_code&&e.jsxs("div",{className:"bg-white rounded-lg p-2.5 border border-slate-200",children:[e.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase block mb-0.5",children:"Sort Code"}),e.jsx("span",{className:"text-sm font-mono font-medium text-slate-800",children:k.sort_code})]}),k.iban&&e.jsxs("div",{className:"bg-white rounded-lg p-2.5 border border-slate-200 sm:col-span-2",children:[e.jsx("span",{className:"text-[10px] font-semibold text-slate-400 uppercase block mb-0.5",children:"IBAN"}),e.jsx("span",{className:"text-sm font-mono font-medium text-slate-800 break-all",children:k.iban})]})]})]}),k.admin_note&&e.jsxs("div",{className:"flex items-start gap-2 bg-blue-50 rounded-lg p-2.5 mb-3 border border-blue-200",children:[e.jsx(rm,{className:"w-3.5 h-3.5 text-blue-500 mt-0.5 flex-shrink-0"}),e.jsx("span",{className:"text-xs text-blue-700",children:k.admin_note})]}),k.status==="pending"&&e.jsx("div",{className:"flex flex-col sm:flex-row gap-2",children:y===k.id?e.jsxs("div",{className:"flex-1 flex gap-2",children:[e.jsx("input",{type:"text",value:h[k.id]||"",onChange:J=>f(u=>({...u,[k.id]:J.target.value})),placeholder:"Admin note (optional)...",className:"flex-1 px-3 py-2 border border-slate-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none"}),e.jsxs("button",{onClick:()=>N(k.id,"complete"),disabled:x===k.id,className:"px-4 py-2 bg-emerald-600 hover:bg-emerald-700 disabled:bg-emerald-400 text-white rounded-lg text-sm font-medium transition-colors flex items-center gap-1.5",children:[x===k.id?e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(ne,{className:"w-3.5 h-3.5"}),"Complete"]}),e.jsxs("button",{onClick:()=>N(k.id,"reject"),disabled:x===k.id,className:"px-4 py-2 bg-red-600 hover:bg-red-700 disabled:bg-red-400 text-white rounded-lg text-sm font-medium transition-colors flex items-center gap-1.5",children:[x===k.id?e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(st,{className:"w-3.5 h-3.5"}),"Reject"]}),e.jsx("button",{onClick:()=>g(null),className:"px-3 py-2 bg-slate-100 hover:bg-slate-200 text-slate-600 rounded-lg text-sm font-medium transition-colors",children:"Cancel"})]}):e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>N(k.id,"complete"),disabled:x===k.id,className:"px-4 py-2.5 bg-emerald-600 hover:bg-emerald-700 disabled:bg-emerald-400 text-white rounded-xl text-sm font-semibold transition-colors flex items-center gap-2 shadow-sm",children:[x===k.id?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(ne,{className:"w-4 h-4"}),"Complete"]}),e.jsxs("button",{onClick:()=>N(k.id,"reject"),disabled:x===k.id,className:"px-4 py-2.5 bg-red-600 hover:bg-red-700 disabled:bg-red-400 text-white rounded-xl text-sm font-semibold transition-colors flex items-center gap-2 shadow-sm",children:[x===k.id?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(st,{className:"w-4 h-4"}),"Reject"]}),e.jsxs("button",{onClick:()=>g(k.id),className:"px-3 py-2.5 bg-slate-100 hover:bg-slate-200 text-slate-600 rounded-xl text-sm font-medium transition-colors flex items-center gap-1.5",children:[e.jsx(rm,{className:"w-4 h-4"}),"Note"]})]})})]},k.id))})]})]})}const X5={critical:{label:"Kritik",color:"text-red-700",bg:"bg-red-50",border:"border-red-200",icon:py},high:{label:"Yuksek",color:"text-orange-700",bg:"bg-orange-50",border:"border-orange-200",icon:sh},medium:{label:"Orta",color:"text-yellow-700",bg:"bg-yellow-50",border:"border-yellow-200",icon:lt}};function K5(){const[t,s]=o.useState("overview"),[a,r]=o.useState(!1),[l,n]=o.useState(30),[i,c]=o.useState(""),[d,x]=o.use
1024State("all"),[m,h]=o.useState(!1),[f,y]=o.useState({totalAlerts:0,sameTargetCount:0,sameIpCount:0,gameAbuseCount:0}),[g,w]=o.useState([]),[N,v]=o.useState([]),[j,b]=o.useState([]),[p,E]=o.useState([]),[C,S]=o.useState(!1),[k,J]=o.useState(new Set),[u,A]=o.useState(null),[T,ae]=o.useState(null),P=o.useCallback(async()=>{r(!0);try{const U=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_fraud_analysis?days=${l}&type=all`,{method:"GET",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(!U.ok)return;const oe=await U.json();y(oe.stats||{totalAlerts:0,sameTargetCount:0,sameIpCount:0,gameAbuseCount:0}),w(oe.sameTarget||[]),v(oe.sameIp||[]),b(oe.gameAbuse||[])}catch(X){console.error("Fraud analysis fetch error:",X)}finally{r(!1)}},[l]),z=o.useCallback(async()=>{S(!0);try{const U=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_banned_user_ips",{method:"GET",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(!U.ok)return;const oe=await U.json();oe.success&&E(oe.data||[])}catch(X){console.error("Banned users fetch error:",X)}finally{S(!1)}},[]);o.useEffect(()=>{P(),z()},[P,z]),o.useEffect(()=>{t==="banned_ips"&&z()},[t,z]);const I=X=>{const re=new Set(k);re.has(X)?re.delete(X):re.add(X),J(re)},Z=X=>{navigator.clipboard.writeText(X),ae(X),setTimeout(()=>ae(null),2e3)},Q=X=>{let re=X;return d!=="all"&&(re=re.filter(U=>U.severity===d)),m&&(re=re.filter(U=>U.unbannedCount>0)),re},_=(X,re)=>{if(!i.trim())return X;const U=i.toLowerCase();return X.filter(oe=>{const ue=re?re(oe):"";return oe.users.some(K=>K.email.toLowerCase().includes(U)||(K.fullName||"").toLowerCase().includes(U))||ue.toLowerCase().includes(U)})};if(u)return e.jsx(to,{userId:u,onClose:()=>A(null),onRefresh:()=>{}});const M=_(Q(g),X=>`${X.target} ${X.platform}`),F=_(Q(N),X=>X.ip),R=_(Q(j),X=>X.ip);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-slate-900 flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-red-500 to-rose-600 rounded-xl shadow-lg shadow-red-500/20",children:e.jsx(lt,{className:"w-6 h-6 text-white"})}),"Dolandiricilik Tespit Merkezi"]}),e.jsx("p",{className:"text-slate-500 mt-1",children:"Coklu hesap, IP analizi ve oyun istismari tespiti"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("select",{value:l,onChange:X=>n(parseInt(X.target.value)),className:"px-3 py-2 border border-slate-200 rounded-lg text-sm bg-white focus:ring-2 focus:ring-red-500/20 focus:border-red-300",children:[e.jsx("option",{value:7,children:"Son 7 Gun"}),e.jsx("option",{value:14,children:"Son 14 Gun"}),e.jsx("option",{value:30,children:"Son 30 Gun"}),e.jsx("option",{value:60,children:"Son 60 Gun"}),e.jsx("option",{value:90,children:"Son 90 Gun"})]}),e.jsxs("button",{onClick:P,disabled:a,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-red-500 to-rose-600 text-white rounded-lg text-sm font-medium hover:from-red-600 hover:to-rose-700 transition-all shadow-sm disabled:opacity-50",children:[e.jsx(Ve,{className:`w-4 h-4 ${a?"animate-spin":""}`}),"Tara"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsx(id,{icon:sh,label:"Toplam Uyari",value:f.totalAlerts,color:"red",onClick:()=>s("overview"),active:t==="overview"}),e.jsx(id,{icon:sr,label:"Ayni Hedef",value:f.sameTargetCount,color:"orange",onClick:()=>s("same_target"),active:t==="same_target"}),e.jsx(id,{icon:Wi,label:"Ayni IP",value:f.sameIpCount,color:"blue",onClick:()=>s("same_ip"),active:t==="same_ip"}),e.jsx(id,{icon:Xn,label:"Oyun Istismari",value:f.gameAbuseCount,color:"emerald",onClick:()=>s("game_abuse"),active:t==="game_abuse"})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-sm overflow-hidden",children:[e.jsx("div",{className:"flex border-b border-slate-200 overflow-x-auto",children:[{key:"overview",label:"Genel Bakis",icon:Ct},{key:"same_target",label:"Ayni Hedef",icon:sr,count:f.sameTargetCount},{key:"same_ip",label:"Ayni IP",icon:Wi,count:f.sameIpCount},{key:"game_abuse",label:"Oyun Istismari",icon:Xn,count:f.gameAbuseCount},{key:"banned_ips",label:"Banlanan IP'ler",icon:Ka,count:p.length}].map(X=>e.jsxs("button",{onClick:()=>s(X.key),className:`flex items-center gap-2 px-5 py-3.5 text-sm font-medium whitespace-nowrap border-b-2 transition-all ${t===X.key?"border-red-500 text-red-600 bg-red-50/50":"border-transparent text-slate-500 hover:text-slate-700 hover:bg-slate-50"}`,children:[e.jsx(X.icon,{className:"w-4 h-4"}),X.label,X.count!==void 0&&X.count>0&&e.jsx("span",{className:`px-1.5 py-0.5 text-[10px] font-bold rounded-full ${t===X.key?"bg-red-100 text-red-700":"bg-slate-100 text-slate-600"}`,children:X.count})]},X.key))}),t!=="overview"&&e.jsxs("div",{className:"p-4 border-b border-slate-100 bg-slate-50/50 flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",value:i,onChange:X=>c(X.target.value),placeholder:"E-posta, isim, IP veya hedef ara...",className:"w-full pl-9 pr-4 py-2 border border-slate-200 rounded-lg text-sm focus:ring-2 focus:ring-red-500/20 focus:border-red-300"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("select",{value:d,onChange:X=>x(X.target.value),className:"px-3 py-2 border border-slate-200 rounded-lg text-sm bg-white",children:[e.jsx("option",{value:"all",children:"Tum Seviyeler"}),e.jsx("option",{value:"critical",children:"Kritik"}),e.jsx("option",{value:"high",children:"Yuksek"}),e.jsx("option",{value:"medium",children:"Orta"})]}),e.jsxs("label",{className:"flex items-center gap-2 px-3 py-2 border border-slate-200 rounded-lg text-sm bg-white cursor-pointer select-none",children:[e.jsx("input",{type:"checkbox",checked:m,onChange:X=>h(X.target.checked),className:"rounded border-slate-300 text-red-500 focus:ring-red-500/20"}),e.jsx("span",{className:"text-slate-600 whitespace-nowrap",children:"Banli gizle"})]})]})]}),e.jsx("div",{className:"min-h-[400px]",children:a?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-16 h-16 border-4 border-slate-100 rounded-full"}),e.jsx("div",{className:"absolute inset-0 w-16 h-16 border-4 border-red-500 border-t-transparent roun
1024ded-full animate-spin"})]}),e.jsx("p",{className:"text-slate-500 mt-4 font-medium",children:"Analiz ediliyor..."}),e.jsx("p",{className:"text-slate-400 text-sm mt-1",children:"Siparisler, IP adresleri ve oyun verileri taraniyor"})]}):e.jsxs(e.Fragment,{children:[t==="overview"&&e.jsx(Q5,{stats:f,sameTarget:g,sameIp:N,gameAbuse:j,onNavigate:s}),t==="same_target"&&e.jsx(Z5,{groups:M,expandedItems:k,onToggle:I,onSelectUser:A,onCopyIp:Z,copiedIp:T}),t==="same_ip"&&e.jsx(e4,{clusters:F,expandedItems:k,onToggle:I,onSelectUser:A,onCopyIp:Z,copiedIp:T}),t==="game_abuse"&&e.jsx(t4,{clusters:R,expandedItems:k,onToggle:I,onSelectUser:A,onCopyIp:Z,copiedIp:T}),t==="banned_ips"&&e.jsx(s4,{users:p,loading:C,onSelectUser:A,onCopyIp:Z,copiedIp:T,onRefresh:z,searchQuery:i})]})})]})]})}function id({icon:t,label:s,value:a,color:r,onClick:l,active:n}){const i={red:{gradient:"from-red-500 to-rose-600",text:"text-red-600",ring:"ring-red-500/30"},orange:{gradient:"from-orange-500 to-amber-600",text:"text-orange-600",ring:"ring-orange-500/30"},blue:{gradient:"from-blue-500 to-cyan-600",text:"text-blue-600",ring:"ring-blue-500/30"},emerald:{gradient:"from-emerald-500 to-teal-600",text:"text-emerald-600",ring:"ring-emerald-500/30"}},c=i[r]||i.red;return e.jsxs("button",{onClick:l,className:`relative bg-white rounded-xl border p-4 text-left transition-all hover:shadow-md ${n?`border-slate-300 shadow-md ring-2 ${c.ring}`:"border-slate-200 hover:border-slate-300"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("div",{className:`p-2 bg-gradient-to-br ${c.gradient} rounded-lg shadow-sm`,children:e.jsx(t,{className:"w-4 h-4 text-white"})}),a>0&&e.jsx("span",{className:`px-2 py-0.5 text-xs font-bold rounded-full ${c.text} bg-opacity-10`,style:{backgroundColor:"currentcolor",WebkitBackgroundClip:"unset",color:"inherit"},children:e.jsx("span",{className:c.text,children:a})})]}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:a}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:s})]})}function ch({severity:t}){const s=X5[t],a=s.icon;return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-bold ${s.bg} ${s.color} ${s.border} border`,children:[e.jsx(a,{className:"w-3 h-3"}),s.label]})}function dh({email:t,fullName:s,isBanned:a,onClick:r,children:l}){return e.jsxs("div",{onClick:r,className:`flex items-center justify-between p-3 rounded-xl border cursor-pointer transition-all group ${a?"bg-red-50/80 border-red-200 hover:border-red-300":"bg-white border-slate-200 hover:border-blue-300 hover:shadow-sm"}`,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:`w-9 h-9 rounded-full flex items-center justify-center flex-shrink-0 ${a?"bg-gradient-to-br from-red-100 to-red-200":"bg-gradient-to-br from-slate-100 to-slate-200 group-hover:from-blue-100 group-hover:to-blue-200"}`,children:e.jsx(ls,{className:`w-4 h-4 ${a?"text-red-500":"text-slate-500 group-hover:text-blue-500"}`})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:`font-medium text-sm truncate ${a?"text-red-900 line-through":"text-slate-900"}`,children:s||"Isimsiz"}),a&&e.jsx("span",{className:"flex-shrink-0 px-1.5 py-0.5 text-[9px] font-bold bg-red-600 text-white rounded",children:"BANLI"})]}),e.jsx("p",{className:`text-xs truncate ${a?"text-red-400":"text-slate-500"}`,children:t})]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0 ml-3",children:[l,e.jsx(Gs,{className:"w-3.5 h-3.5 text-slate-300 group-hover:text-blue-400 transition-colors"})]})]})}function Dm({ip:t,onCopy:s,copied:a}){return e.jsxs("button",{onClick:r=>{r.stopPropagation(),s(t)},className:"inline-flex items-center gap-1.5 px-2 py-1 bg-slate-100 hover:bg-slate-200 rounded-md text-xs font-mono text-slate-600 transition-colors",children:[e.jsx(wt,{className:"w-3 h-3"}
1024),t,a?e.jsx(Lt,{className:"w-3 h-3 text-green-500"}):e.jsx(Ht,{className:"w-3 h-3 text-slate-400"})]})}function Rm({icon:t,title:s,subtitle:a}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[e.jsx("div",{className:"w-16 h-16 bg-slate-100 rounded-2xl flex items-center justify-center mb-4",children:e.jsx(t,{className:"w-8 h-8 text-slate-300"})}),e.jsx("p",{className:"font-medium text-slate-600",children:s}),e.jsx("p",{className:"text-sm text-slate-400 mt-1",children:a})]})}function Q5({stats:t,sameTarget:s,sameIp:a,gameAbuse:r,onNavigate:l}){const n=s.filter(v=>v.severity==="critical").length,i=a.filter(v=>v.severity==="critical").length,c=r.filter(v=>v.severity==="critical").length,d=n+i+c,x=s.filter(v=>v.severity==="high").length,m=a.filter(v=>v.severity==="high").length,h=r.filter(v=>v.severity==="high").length,f=x+m+h,y=s.filter(v=>v.unbannedCount>0).length,g=a.filter(v=>v.unbannedCount>0).length,w=r.filter(v=>v.unbannedCount>0).length,N=y+g+w;return e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-gradient-to-br from-red-50 to-rose-50 border border-red-100 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(py,{className:"w-4 h-4 text-red-600"}),e.jsx("span",{className:"text-sm font-semibold text-red-700",children:"Kritik Uyarilar"})]}),e.jsx("p",{className:"text-3xl font-bold text-red-900",children:d}),e.jsx("p",{className:"text-xs text-red-500 mt-1",children:"Acil mudahale gerektirenler"})]}),e.jsxs("div",{className:"bg-gradient-to-br from-orange-50 to-amber-50 border border-orange-100 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(sh,{className:"w-4 h-4 text-orange-600"}),e.jsx("span",{className:"text-sm font-semibold text-orange-700",children:"Yuksek Risk"})]}),e.jsx("p",{className:"text-3xl font-bold text-orange-900",children:f}),e.jsx("p",{className:"text-xs text-orange-500 mt-1",children:"Incelenmeyi bekleyenler"})]}),e.jsxs("div",{className:"bg-gradient-to-br from-blue-50 to-cyan-50 border border-blue-100 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Sl,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"text-sm font-semibold text-blue-700",children:"Aksiyon Bekleyen"})]}),e.jsx("p",{className:"text-3xl font-bold text-blue-900",children:N}),e.jsx("p",{className:"text-xs text-blue-500 mt-1",children:"Henuz banlanmamis gruplar"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"font-semibold text-slate-700 text-sm",children:"Kategori Ozeti"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ix,{icon:sr,label:"Ayni Hedef Siparisleri",description:"Farkli hesaplardan ayni hedefe siparis verenler",total:t.sameTargetCount,critical:n,high:x,unbanned:y,color:"orange",onClick:()=>l("same_target")}),e.jsx(Ix,{icon:Wi,label:"Ayni IP Kayitlari",description:"Ayni IP adresinden birden fazla hesap acanlar",total:t.sameIpCount,critical:i,high:m,unbanned:g,color:"blue",onClick:()=>l("same_ip")}),e.jsx(Ix,{icon:Xn,label:"Oyun Bakiye Istismari",description:"Ayni IP'den coklu hesapla oyun bakiyesi kasanlar",total:t.gameAbuseCount,critical:c,high:h,unbanned:w,color:"emerald",onClick:()=>l("game_abuse")})]})]})]})}function Ix({icon:t,label:s,description:a,total:r,critical:l,high:n,unbanned:i,color:c,onClick:d}){const x={orange:"from-orange-500 to-amber-600",blue:"from-blue-500 to-cyan-600",emerald:"from-emerald-500 to-teal-600"};return e.jsxs("button",{onClick:d,className:"w-full flex items-center gap-4 p-4 bg-white border border-slate-200 rounded-xl hover:border-slate-300 hover:shadow-sm transition-all text-left group",children:[e.jsx("div",{className:`p-2.5 bg-gradient-to-br ${x[c]} rounded-xl shadow-sm flex-shrink-0`,children:e.jsx(t,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-semibold text-slate-900 group-hover:text-slate-700",children:s}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:a})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[l>0&&e.jsxs("span",{className:"px-2 py-1 bg-red-100 text-red-700 text-xs font-bold rounded-lg",children:[l," kritik"]}),n>0&&e.jsxs("span",{className:"px-2 py-1 bg-orange-100 text-orange-700 text-xs font-bold rounded-lg",children:[n," yuksek"]}),i>0&&e.jsxs("span",{className:"px-2 py-1 bg-blue-100 text-blue-700 text-xs font-bold rounded-lg",children:[i," aktif"]}),e.jsx("span",{className:"text-2xl font-bold text-slate-900 w-10 text-right",children:r}),e.jsx(ra,{className:"w-5 h-5 text-slate-300 group-hover:text-slate-500 transition-colors"})]})]})}function Z5({groups:t,expandedItems:s,onToggle:a,onSelectUser:r,onCopyIp:l,copiedIp:n}){return t.length===0?e.jsx(Rm,{icon:sr,title:"Ayni hedef tespiti bulunamadi",subtitle:"Filtreleri degistirerek tekrar deneyin"}):e.jsx("div",{className:"divide-y divide-slate-100",children:t.map((i,c)=>{const d=`target:${i.targetType}:${i.target}:${c}`,x=s.has(d);return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>a(d),className:"w-full p-4 flex items-center gap-4 hover:bg-slate-50/80 transition-colors text-left",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(ch,{severity:i.severity})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("span",{className:`px-2 py-0.5 text-[10px] font-bold rounded ${i.targetType==="link"?"bg-blue-100 text-blue-700":"bg-teal-100 text-teal-700"}`,children:i.targetType==="link"?"LINK":"USERNAME"}),e.jsx("span",{className:"px-2 py-0.5 text-[10px] font-medium bg-slate-100 text-slate-600 rounded",children:i.platform}),e.jsxs("span",{className:"px-2 py-0.5 text-[10px] font-bold bg-red-100 text-red-700 rounded",children:[i.users.length," hesap"]}),i.allSameIp&&e.jsxs("span",{className:"px-2 py-0.5 text-[10px] font-bold bg-orange-100 text-orange-700 rounded flex items-center gap-1",children:[e.jsx(Wi,{className:"w-2.5 h-2.5"})," AYNI IP"]}),i.unbannedCount===0&&e.jsx("span",{className:"px-2 py-0.5 text-[10px] font-bold bg-green-100 text-green-700 rounded",children:"TUMU BANLI"})]}),e.jsx("p",{className:"text-sm font-medium text-slate-900 truncate",children:i.target}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-slate-500",children:[e.jsxs("span",{children:[i.totalPaidOrders," odemeli siparis"]}),e.jsx("span",{className:"w-1 h-1 bg-slate-300 rounded-full"}),e.jsx("span",{children:pt(i.totalSpent)}
1024),i.totalGiftOrders>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-1 h-1 bg-slate-300 rounded-full"}),e.jsxs("span",{className:"text-orange-500",children:[i.totalGiftOrders," hediye siparis (",pt(i.totalGiftSpent),")"]})]})]})]}),e.jsx(is,{className:`w-5 h-5 text-slate-400 flex-shrink-0 transition-transform ${x?"rotate-180":""}`})]}),x&&e.jsxs("div",{className:"px-4 pb-4 space-y-2",children:[i.sharedIp&&e.jsxs("div",{className:"flex items-center gap-2 mb-3 p-2 bg-orange-50 border border-orange-200 rounded-lg",children:[e.jsx(Wi,{className:"w-4 h-4 text-orange-600"}),e.jsx("span",{className:"text-xs text-orange-700 font-medium",children:"Ortak IP:"}),e.jsx(Dm,{ip:i.sharedIp,onCopy:l,copied:n===i.sharedIp})]}),i.users.map(m=>e.jsx(dh,{email:m.email,fullName:m.fullName,isBanned:m.isBanned,onClick:()=>r(m.userId),children:e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:`font-bold text-sm ${m.isBanned?"text-red-900":"text-slate-900"}`,children:pt(m.totalSpent)}),e.jsxs("p",{className:`text-[11px] ${m.isBanned?"text-red-400":"text-slate-500"}`,children:[m.orderCount," siparis",m.giftOrderCount>0&&e.jsxs("span",{className:"text-orange-500",children:[" + ",m.giftOrderCount," hediye"]})]})]})},m.userId))]})]},d)})})}function e4({clusters:t,expandedItems:s,onToggle:a,onSelectUser:r,onCopyIp:l,copiedIp:n}){return t.length===0?e.jsx(Rm,{icon:Wi,title:"Ayni IP tespiti bulunamadi",subtitle:"Filtreleri degistirerek tekrar deneyin"}):e.jsx("div",{className:"divide-y divide-slate-100",children:t.map((i,c)=>{const d=`ip:${i.ip}:${c}`,x=s.has(d);return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>a(d),className:"w-full p-4 flex items-center gap-4 hover:bg-slate-50/80 transition-colors text-left",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(ch,{severity:i.severity})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx(Dm,{ip:i.ip,onCopy:l,copied:n===i.ip}),e.jsxs("span",{className:"px-2 py-0.5 text-[10px] font-bold bg-red-100 text-red-700 rounded",children:[i.userCount," hesap"]}),i.sameFingerprint&&e.jsxs("span",{className:"px-2 py-0.5 text-[10px] font-bold bg-orange-100 text-orange-700 rounded flex items-center gap-1",children:[e.jsx(Uv,{className:"w-2.5 h-2.5"})," AYNI CIHAZ"]}),i.unbannedCount===0&&e.jsx("span",{className:"px-2 py-0.5 text-[10px] font-bold bg-green-100 text-green-700 rounded",children:"TUMU BANLI"})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(rs,{className:"w-3 h-3 text-orange-500"}),"Toplam hediye: ",pt(i.totalGiftBalance)]}),e.jsx("span",{className:"w-1 h-1 bg-slate-300 rounded-full"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Jt,{className:"w-3 h-3 text-green-500"}),"Toplam bakiye: ",pt(i.totalBalance)]})]})]}),e.jsx(is,{className:`w-5 h-5 text-slate-400 flex-shrink-0 transition-transform ${x?"rotate-180":""}`})]}),x&&e.jsx("div",{className:"px-4 pb-4 space-y-2",children:i.users.map(m=>e.jsx(dh,{email:m.email,fullName:m.fullName,isBanned:m.isBanned,onClick:()=>r(m.userId),children:e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"flex items-center gap-1.5 justify-end",children:[e.jsx(rs,{className:"w-3 h-3 text-orange-500"}),e.jsx("span",{className:`font-bold text-sm ${m.giftBalance>0?"text-orange-600":"text-slate-400"}`,children:pt(m.giftBalance)})]}),e.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5",children:new Date(m.createdAt).toLocaleDateString("tr-TR")})]})},m.userId))})]},d)})})}function t4({clusters:t,expandedItems:s,onToggle:a,onSelectUser:r,onCopyIp:l,copiedIp:n}){return t.length===0?e.jsx(Rm,{icon:Xn,title:"Oyun istismari tespiti bulunamadi",subtitle:"Filtreleri degistirerek tekrar deneyin"}):e.jsx("div",{className:"divide-y divide-slate-100",children:t.map((i,c)=>{const d=`game:${i.ip}:${c}`,x=s.has(d);return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>a(d),className:"w-full p-4 flex items-center gap-4 hover:bg-slate-50/80 transition-colors text-left",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(ch,{severity:i.severity})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx(Dm,{ip:i.ip,onCopy:l,copied:n===i.ip}),e.jsxs("span",{className:"px-2 py-0.5 text-[10px] font-bold bg-red-100 text-red-700 rounded",children:[i.userCount," hesap"]}),i.unbannedCount===0&&e.jsx("span",{className:"px-2 py-0.5 text-[10px] font-bold bg-green-100 text-green-700 rounded",children:"TUMU BANLI"})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-1 font-medium text-emerald-600",children:[e.jsx(rt,{className:"w-3 h-3"}),"Toplam kazanilan: ",pt(i.totalWon)]}),e.jsx("span",{className:"w-1 h-1 bg-slate-300 rounded-full"}),e.jsxs("span",{children:[i.totalPlays," oyun oynandi"]})]})]}),e.jsx(is,{className:`w-5 h-5 text-slate-400 flex-shrink-0 transition-transform ${x?"rotate-180":""}`})]}),x&&e.jsx("div",{className:"px-4 pb-4 space-y-2",children:i.users.map(m=>e.jsx(dh,{email:m.email,fullName:m.fullName,isBanned:m.isBanned,onClick:()=>r(m.userId),children:e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:`font-bold text-sm ${m.totalWon>0?"text-emerald-600":"text-slate-400"}`,children:pt(m.totalWon)}),e.jsxs("div",{className:"flex items-center gap-2 justify-end mt-0.5",children:[m.mysteryCount>0&&e.jsxs("span",{className:"text-[10px] text-slate-500 flex items-center gap-0.5",children:[e.jsx(Im,{className:"w-2.5 h-2.5"})," ",m.mysteryCount,"x"]}),m.spinCount>0&&e.jsxs("span",{className:"text-[10px] text-slate-500 flex items-center gap-0.5",children:[e.jsx(hy,{className:"w-2.5 h-2.5"})," ",m.spinCount,"x"]})]})]})}
1024,m.userId))})]},d)})})}function s4({users:t,loading:s,onSelectUser:a,onCopyIp:r,copiedIp:l,onRefresh:n,searchQuery:i}){const c=i.trim()?t.filter(m=>{const h=i.toLowerCase();return m.email.toLowerCase().includes(h)||(m.fullName||"").toLowerCase().includes(h)||(m.registrationIp||"").includes(h)||(m.banReason||"").toLowerCase().includes(h)}):t,d=c.filter(m=>m.registrationIp),x=()=>{const f=["IP Adresi E-posta Isim Ban Nedeni Ban Tarihi",...d.map(N=>`${N.registrationIp} ${N.email} ${N.fullName||"-"} ${N.banReason||"-"} ${new Date(N.bannedAt).toLocaleDateString("tr-TR")}`)].join(` 1025`),y=new Blob([f],{type:"text/plain;charset=utf-8"}),g=URL.createObjectURL(y),w=document.createElement("a");w.href=g,w.download=`banlanan_ipler_${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(g)};return s?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-16 h-16 border-4 border-slate-100 rounded-full"}),e.jsx("div",{className:"absolute inset-0 w-16 h-16 border-4 border-red-500 border-t-transparent rounded-full animate-spin"})]}),e.jsx("p",{className:"text-slate-500 mt-4 font-medium",children:"Yukleniyor..."})]}):c.length===0?e.jsx(Rm,{icon:Ka,title:"Banlanan kullanici bulunamadi",subtitle:"Henuz banlanan kullanici yok veya filtreye uygun sonuc bulunamadi"}):e.jsxs("div",{children:[e.jsxs("div",{className:"p-4 border-b border-slate-100 flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[e.jsx(Ka,{className:"w-4 h-4 text-red-500"}),e.jsxs("span",{className:"font-medium",children:[c.length," banlanan kullanici"]}),e.jsxs("span",{className:"text-slate-400",children:["(",d.length," IP mevcut)"]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:n,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-slate-600 bg-slate-100 hover:bg-slate-200 rounded-lg transition-colors",children:[e.jsx(Ve,{className:"w-3.5 h-3.5"}),"Yenile"]}),e.jsxs("button",{onClick:x,disabled:d.length===0,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-gradient-to-r from-red-500 to-rose-600 hover:from-red-600 hover:to-rose-700 rounded-lg transition-all shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(_l,{className:"w-3.5 h-3.5"}),"IP Listesini Indir (.txt)"]})]})]}),e.jsx("div",{className:"divide-y divide-slate-100",children:c.map(m=>e.jsxs("div",{onClick:()=>a(m.userId),className:"flex items-center justify-between p-4 hover:bg-slate-50/80 transition-colors cursor-pointer group",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"w-9 h-9 rounded-full flex items-center justify-center flex-shrink-0 bg-gradient-to-br from-red-100 to-red-200",children:e.jsx(ls,{className:"w-4 h-4 text-red-500"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-medium text-sm text-red-900 truncate",children:m.fullName||"Isimsiz"}),e.jsx("span",{className:"flex-shrink-0 px-1.5 py-0.5 text-[9px] font-bold bg-red-600 text-white rounded",children:"BANLI"})]}),e.jsx("p",{className:"text-xs text-red-400 truncate",children:m.email})]})]}),e.jsxs("div",{className:"flex items-center gap-4 flex-shrink-0 ml-3",children:[m.registrationIp?e.jsx(Dm,{ip:m.registrationIp,onCopy:r,copied:l===m.registrationIp}):e.jsx("span",{className:"text-xs text-slate-400 italic",children:"IP yok"}),e.jsxs("div",{className:"text-right hidden sm:block",children:[m.banReason&&e.jsx("p",{className:"text-xs text-slate-500 max-w-[200px] truncate",children:m.banReason}),e.jsx("p",{className:"text-[11px] text-slate-400",children:new Date(m.bannedAt).toLocaleDateString("tr-TR")})]}),e.jsx(Gs,{className:"w-3.5 h-3.5 text-slate-300 group-hover:text-blue-400 transition-colors"})]})]}
1025,m.userId))})]})}function a4(){var Q;const[t,s]=o.useState([]),[a,r]=o.useState(!0),[l,n]=o.useState(null),[i,c]=o.useState(1),[d,x]=o.useState(0),[m,h]=o.useState("all"),[f,y]=o.useState(""),[g,w]=o.useState(null),[N,v]=o.useState([]),[j,b]=o.useState(!1),[p,E]=o.useState(null),[C,S]=o.useState(null),k=25,J=async(_,M={})=>(await We("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_sub_accounts",{method:"POST",body:JSON.stringify({action:_,...M})})).json(),u=async()=>{r(!0);try{const _=await J("list",{page:i,limit:k,status:m!=="all"?m:void 0});_.success&&(s(_.accounts||[]),x(_.total||0))}catch(_){console.error("Load error:",_)}finally{r(!1)}},A=async()=>{try{const _=await J("get_stats");_.success&&n(_.stats)}catch(_){console.error("Stats error:",_)}},T=async _=>{try{const M=await J("get_audit_logs",_?{account_id:_}:{});M.success&&v(M.logs||[])}catch(M){console.error("Audit logs error:",M)}};o.useEffect(()=>{u(),A()},[i,m]);const ae=(_,M)=>{S({type:_,message:M}),setTimeout(()=>S(null),4e3)},P=async(_,M)=>{E(_);try{const F=M?prompt("Suspension reason (optional):"):null,R=await J("suspend",{account_id:_,suspend:M,reason:F});R.success?(ae("success",R.message),u(),A()):ae("error",R.message)}catch{ae("error","Network error")}finally{E(null)}},z=f?t.filter(_=>{var M,F,R,X,re,U,oe;return((F=(M=_.user)==null?void 0:M.email)==null?void 0:F.toLowerCase().includes(f.toLowerCase()))||((R=_.label)==null?void 0:R.toLowerCase().includes(f.toLowerCase()))||((re=(X=_.reseller)==null?void 0:X.company_name)==null?void 0:re.toLowerCase().includes(f.toLowerCase()))||((oe=(U=_.reseller)==null?void 0:U.reseller_code)==null?void 0:oe.toLowerCase().includes(f.toLowerCase()))}):t,I=Math.ceil(d/k),Z=_=>_.replace(/_/g," ").replace(/\b\w/g,M=>M.toUpperCase());return e.jsxs("div",{className:"space-y-6",children:[C&&e.jsxs("div",{className:`flex items-center gap-2 p-3 rounded-xl text-sm border ${C.type==="success"?"bg-green-50 border-green-200 text-green-700":"bg-red-50 border-red-200 text-red-700"}`,children:[C.type==="success"?e.jsx(ne,{className:"w-4 h-4"}):e.jsx(nt,{className:"w-4 h-4"}),C.message,e.jsx("button",{onClick:()=>S(null),className:"ml-auto",children:e.jsx(ht,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900",children:"Sub Account Management"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Monitor and manage all reseller sub-accounts"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>{b(!0),T()},className:"flex items-center gap-2 px-3 py-2 text-sm border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors",children:[e.jsx(Ze,{className:"w-4 h-4"}),"Audit Logs"]}),e.jsxs("button",{onClick:()=>{u(),A()},className:"flex items-center gap-2 px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:[e.jsx(Ve,{className:"w-4 h-4"}),"Refresh"]})]})]}),l&&e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[{label:"Total",value:l.total,color:"bg-slate-50 border-slate-200 text-slate-700"},{label:"Active",value:l.active,color:"bg-green-50 border-green-200 text-green-700"},{label:"Inactive",value:l.inactive,color:"bg-amber-50 border-amber-200 text-amber-700"},{label:"Suspended",value:l.suspended,color:"bg-red-50 border-red-200 text-red-700"}].map(_=>e.jsxs("div",{className:`p-4 rounded-xl border ${_.color}`,children:[e.jsx("p",{className:"text-xs font-medium opacity-70",children:_.label}),e.jsx("p",{className:"text-2xl font-bold",children:_.value})]},_.label))}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ws,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",value:f,onChange:_=>y(_.target.value),placeholder:"Search by email, label, or reseller...",className:"w-full pl-10 pr-4 py-2.5 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none"})]}),e.jsxs("select",{value:m,onChange:_=>{h(_.target.value),c(1)},className:"px-4 py-2.5 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 outline-none",children:[e.jsx("option",{value:"all",children:"All Status"}),e.jsx("option",{value:"active",children:"Active"}),e.jsx("option",{value:"inactive",children:"Inactive"}),e.jsx("option",{value:"suspended",children:"Suspended"})]})]}),a?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-blue-500"})}):z.length>0?e.jsx("div",{className:"space-y-2",children:z.map(_=>{var F,R;const M=_.is_suspended?"border-red-200 bg-red-50/30":_.is_active?"border-slate-200 bg-white":"border-amber-200 bg-amber-50/30";return e.jsx("div",{className:`p-4 rounded-xl border ${M} transition-all hover:shadow-sm`,children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx("div",{className:`w-9 h-9 rounded-full flex items-center justify-center flex-shrink-0 ${_.is_suspended?"bg-red-100":_.is_active?"bg-blue-50":"bg-amber-100"}`,children:e.jsx(mt,{className:`w-4 h-4 ${_.is_suspended?"text-red-500":_.is_active?"text-blue-500":"text-amber-500"}`})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("p",{className:"text-sm font-medium text-slate-900 truncate",children:_.label||((F=_.user)==null?void 0:F.full_name)||"Unnamed"}),_.is_suspended&&e.jsx("span",{className:"px-1.5 py-0.5 text-[10px] font-semibold bg-red-100 text-red-700 rounded",children:"SUSPENDED"}),!_.is_active&&!_.is_suspended&&e.jsx("span",{className:"px-1.5 py-0.5 text-[10px] font-semibold bg-amber-100 text-amber-700 rounded",children:"INACTIVE"}),_.is_active&&!_.is_suspended&&e.jsx("span",{className:"px-1.5 py-0.5 text-[10px] font-semibold bg-green-100 text-green-700 rounded",children:"ACTIVE"})]}),e.jsx("p",{className:"text-xs text-slate-500",children:(R=_.user)==null?void 0:R.email}),_.reseller&&e.jsxs("p",{className:"text-xs text-blue-500",children:["Reseller: ",_.reseller.company_name||_.reseller.reseller_code]})]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsxs("div",{className:"hidden md:flex items-center gap-4 text-xs text-slate-500",children:[e.jsxs("span",{children:[_.total_orders||0," orders"]}),e.jsx("span",{children:new Date(_.created_at).toLocaleDateString()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>w(_),className:"p-2 text-blue-500 hover:bg-blue-50 rounded-lg transition-colors",title:"View Details",children:e.jsx(Ct,{className:"w-4 h-4"})}
1025),_.is_suspended?e.jsx("button",{onClick:()=>P(_.id,!1),disabled:p===_.id,className:"p-2 text-green-500 hover:bg-green-50 rounded-lg transition-colors disabled:opacity-50",title:"Reactivate",children:p===_.id?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(zs,{className:"w-4 h-4"})}):e.jsx("button",{onClick:()=>P(_.id,!0),disabled:p===_.id,className:"p-2 text-amber-500 hover:bg-amber-50 rounded-lg transition-colors disabled:opacity-50",title:"Suspend",children:p===_.id?e.jsx(Ne,{className:"w-4 h-4 animate-spin"}):e.jsx(Lo,{className:"w-4 h-4"})})]})]})]})},_.id)})}):e.jsxs("div",{className:"text-center py-16 text-slate-400",children:[e.jsx(mt,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),e.jsx("p",{className:"font-medium",children:"No sub-accounts found"})]}),I>1&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("p",{className:"text-sm text-slate-500",children:[d," total accounts"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>c(_=>Math.max(1,_-1)),disabled:i===1,className:"p-2 border border-slate-200 rounded-lg disabled:opacity-50",children:e.jsx(Ua,{className:"w-4 h-4"})}),e.jsxs("span",{className:"text-sm text-slate-600",children:["Page ",i," of ",I]}),e.jsx("button",{onClick:()=>c(_=>Math.min(I,_+1)),disabled:i===I,className:"p-2 border border-slate-200 rounded-lg disabled:opacity-50",children:e.jsx(ra,{className:"w-4 h-4"})})]})]}),g&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-lg w-full p-6 max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Sub-Account Details"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:(Q=g.user)==null?void 0:Q.email})]}),e.jsx("button",{onClick:()=>w(null),className:"text-slate-400 hover:text-slate-600",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"p-3 bg-slate-50 rounded-xl",children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Label"}),e.jsx("p",{className:"text-sm font-medium text-slate-900",children:g.label||"None"})]}),e.jsxs("div",{className:"p-3 bg-slate-50 rounded-xl",children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Status"}),e.jsx("p",{className:"text-sm font-medium",children:g.is_suspended?e.
1025jsx("span",{className:"text-red-600",children:"Suspended"}):g.is_active?e.jsx("span",{className:"text-green-600",children:"Active"}):e.jsx("span",{className:"text-amber-600",children:"Inactive"})})]}),e.jsxs("div",{className:"p-3 bg-slate-50 rounded-xl",children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Total Orders"}),e.jsx("p",{className:"text-sm font-medium text-slate-900",children:g.total_orders||0})]}),e.jsxs("div",{className:"p-3 bg-slate-50 rounded-xl",children:[e.jsx("p",{className:"text-xs text-slate-500",children:"Created"}),e.jsx("p",{className:"text-sm font-medium text-slate-900",children:new Date(g.created_at).toLocaleDateString()})]})]}),g.reseller&&e.jsxs("div",{className:"p-3 bg-blue-50 rounded-xl",children:[e.jsx("p",{className:"text-xs text-blue-600 font-medium",children:"Parent Reseller"}),e.jsx("p",{className:"text-sm text-slate-900",children:g.reseller.company_name||g.reseller.reseller_code})]}),g.suspended_reason&&e.jsxs("div",{className:"p-3 bg-red-50 rounded-xl",children:[e.jsx("p",{className:"text-xs text-red-600 font-medium",children:"Suspension Reason"}),e.jsx("p",{className:"text-sm text-slate-900",children:g.suspended_reason})]}),g.permissions&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-700 mb-2",children:"Permissions"}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[g.permissions.can_create_order&&e.jsx("span",{className:"px-2 py-1 text-xs bg-blue-50 text-blue-600 rounded-full",children:"Create Order"}),g.permissions.can_view_orders&&e.jsx("span",{className:"px-2 py-1 text-xs bg-blue-50 text-blue-600 rounded-full",children:"View Orders"}),g.permissions.can_view_wallet&&e.jsx("span",{className:"px-2 py-1 text-xs bg-blue-50 text-blue-600 rounded-full",children:"View Wallet"}),g.permissions.can_use_api&&e.jsx("span",{className:"px-2 py-1 text-xs bg-blue-50 text-blue-600 rounded-full",children:"API Access"}),g.permissions.can_refill&&e.jsx("span",{className:"px-2 py-1 text-xs bg-blue-50 text-blue-600 rounded-full",children:"Refill"}),g.permissions.can_cancel&&e.jsx("span",{className:"px-2 py-1 text-xs bg-blue-50 text-blue-600 rounded-full",children:"Cancel"})]})]}),e.jsxs("div",{className:"flex gap-2 pt-2",children:[g.is_suspended?e.
1025jsxs("button",{onClick:()=>{P(g.id,!1),w(null)},className:"flex-1 py-2.5 bg-green-600 text-white text-sm font-medium rounded-xl hover:bg-green-700 transition-colors flex items-center justify-center gap-2",children:[e.jsx(zs,{className:"w-4 h-4"})," Reactivate"]}):e.jsxs("button",{onClick:()=>{P(g.id,!0),w(null)},className:"flex-1 py-2.5 bg-amber-600 text-white text-sm font-medium rounded-xl hover:bg-amber-700 transition-colors flex items-center justify-center gap-2",children:[e.jsx(Lo,{className:"w-4 h-4"})," Suspend"]}),e.jsxs("button",{onClick:()=>{T(g.id),b(!0),w(null)},className:"py-2.5 px-4 border border-slate-200 text-sm font-medium rounded-xl hover:bg-slate-50 transition-colors flex items-center gap-2",children:[e.jsx(Ze,{className:"w-4 h-4"})," Logs"]})]})]})]})}),j&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-2xl w-full p-6 max-h-[85vh] overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Audit Logs"}),e.jsx("button",{onClick:()=>b(!1),className:"text-slate-400 hover:text-slate-600",children:e.jsx(ht,{className:"w-5 h-5"})})]}),N.length>0?e.jsx("div",{className:"space-y-2",children:N.map(_=>e.jsxs("div",{className:"p-3 bg-slate-50 rounded-xl text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"font-medium text-slate-800",children:Z(_.action)}),e.jsx("span",{className:"text-xs text-slate-400",children:new Date(_.created_at).toLocaleString()})]}),_.ip_address&&e.jsxs("p",{className:"text-xs text-slate-500",children:["IP: ",_.ip_address]}),_.metadata&&Object.keys(_.metadata).length>0&&e.jsx("pre",{className:"text-xs text-slate-500 mt-1 bg-white p-2 rounded overflow-x-auto",children:JSON.stringify(_.metadata,null,2)})]},_.id))}):e.jsxs("div",{className:"text-center py-12 text-slate-400",children:[e.jsx(Ze,{className:"w-10 h-10 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:"No audit logs found"})]})]})})]})}const Tx="https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_manage_verification_blocklist";function r4(){const[t,s]=o.useState([]),[a,r]=o.useState(!1),[l,n]=o.useState(!1),[i,c]=o.useState(null),[d,x]=o.use
1025State(""),[m,h]=o.useState(""),[f,y]=o.useState(null),[g,w]=o.useState(null),N=async()=>{r(!0),y(null);try{const b=await We(Tx,{method:"GET"}),p=await b.json();if(!b.ok)throw new Error(p.error||"Failed to load");s(p.entries||[])}catch(b){y(b.message)}finally{r(!1)}};o.useEffect(()=>{N()},[]);const v=async b=>{if(b.preventDefault(),!!d.trim()){n(!0),y(null),w(null);try{const p=await We(Tx,{method:"POST",body:JSON.stringify({action:"add",ip_address:d.trim(),reason:m.trim()})}),E=await p.json();if(!p.ok)throw new Error(E.error||"Failed to add");w(`${d.trim()} engellendi`),x(""),h(""),await N()}catch(p){y(p.message)}finally{n(!1)}}},j=async b=>{if(confirm(`${b} adresini engelden kaldirmak istediginizden emin misiniz?`)){c(b),y(null),w(null);try{const p=await We(Tx,{method:"POST",body:JSON.stringify({action:"remove",ip_address:b})}),E=await p.json();if(!p.ok)throw new Error(E.error||"Failed to remove");w(`${b} engelden kaldirildi`),await N()}catch(p){y(p.message)}finally{c(null)}}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-2xl font-bold text-slate-900 flex items-center gap-2",children:[e.jsx(lt,{className:"w-6 h-6 text-red-600"}),"Dogrulama IP Engelleme"]}),e.jsx("p",{className:"text-sm text-slate-600 mt-1 max-w-2xl",children:"RapidAPI kotasini suistimal eden IP'leri engelleyin. Engellenen adresler Instagram, TikTok ve YouTube kullanici/icerik dogrulama uc noktalarinda hicbir API cagrisi yapamaz."})]}),e.jsxs("button",{onClick:N,disabled:a,className:"flex items-center gap-2 px-4 py-2 bg-white border border-slate-300 rounded-lg hover:bg-slate-50 disabled:opacity-50 text-sm",children:[e.jsx(Ve,{className:`w-4 h-4 ${a?"animate-spin":""}`}),"Yenile"]})]}),e.jsxs("form",{onSubmit:v,className:"bg-white border border-slate-200 rounded-xl p-5 shadow-sm grid grid-cols-1 sm:grid-cols-[1fr_2fr_auto] gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-600 mb-1",children:"IP Adresi"}),e.jsx("input",{value:d,onChange:b=>x(b.target.value),placeholder:"78.179.132.141",className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-red-500 focus:border-transparent text-sm",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-600 mb-1",children:"Sebep (opsiyonel)"}),e.jsx("input",{value:m,onChange:b=>h(b.target.value),placeholder:"Kota suistimali",className:"w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-red-500 focus:border-transparent text-sm"})]}),e.jsx("div",{className:"flex items-end",children:e.jsxs("button",{type:"submit",disabled:l||!d.trim(),className:"flex items-center justify-center gap-2 px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 disabled:opacity-50 text-sm w-full sm:w-auto",children:[e.jsx(ns,{className:"w-4 h-4"}),l?"Ekleniyor...":"Engelle"]})})]}),f&&e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 flex items-start gap-2 text-sm text-red-800",children:[e.jsx(Fs,{className:"w-4 h-4 mt-0.5 shrink-0"}),f]}),g&&e.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 text-sm text-green-800",children:g}),e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-3 border-b border-slate-200 flex items-center justify-between",children:[e.jsx("h3",{className:"font-semibold text-slate-900 text-sm",children:"Engelli IP'ler"}),e.jsxs("span",{className:"text-xs text-slate-500",children:[t.length," kayit"]})]}),a&&t.length===0?e.jsx("div",{className:"p-8 text-center text-sm text-slate-500",children:"Yukleniyor..."}):t.length===0?e.jsx("div",{className:"p-8 text-center text-sm text-slate-500",children:"Henuz engellenmis IP yok."}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-slate-50",children:e.jsxs("tr",{className:"text-left text-xs text-slate-600 uppercase tracking-wide",children:[e.jsx("th",{className:"px-5 py-3",children:"IP Adresi"}),e.jsx("th",{className:"px-5 py-3",children:"Sebep"}),e.jsx("th",{className:"px-5 py-3",children:"Eklenme Zamani"}),e.jsx("th",{className:"px-5 py-3 text-right",children:"Islem"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:t.map(b=>e.jsxs("tr",{className:"hover:bg-slate-50",children:[e.jsx("td",{className:"px-5 py-3 font-mono text-slate-900",children:b.ip_address}),e.jsx("td",{className:"px-5 py-3 text-slate-700",children:b.reason||"-"}),e.jsx("td",{className:"px-5 py-3 text-slate-500 text-xs",children:new Date(b.created_at).toLocaleStr
1025ing("tr-TR")}),e.jsx("td",{className:"px-5 py-3 text-right",children:e.jsxs("button",{onClick:()=>j(b.ip_address),disabled:i===b.ip_address,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs bg-white border border-red-200 text-red-700 rounded-lg hover:bg-red-50 disabled:opacity-50",children:[e.jsx(xs,{className:"w-3.5 h-3.5"}),i===b.ip_address?"Kaldiriliyor...":"Engeli Kaldir"]})})]},b.ip_address))})]})})]})]})}function l4(){const[t,s]=o.useState(!1),[a,r]=o.useState(null),[l,n]=o.useState("dashboard"),[i,c]=o.useState(""),[d,x]=o.useState(""),[m,h]=o.useState(""),[f,y]=o.useState(null),[g,w]=o.useState(null),[N,v]=o.useState(!1),[j,b]=o.useState(null),[p,E]=o.useState(!1),[C,S]=o.useState(!1),[k,J]=o.useState(0),[u,A]=o.useState(0),[T,ae]=o.useState(0),[P,z]=o.useState(0),[I,Z]=o.useState(!1),[Q,_]=o.useState(""),[M,F]=o.useState(""),[R,X]=o.useState(!1),re=o.useRef(null),U=$=>{var ie;return!a||a.role==="super_admin"?!0:((ie=a.permissions)==null?void 0:ie[$])===!0},oe=async()=>{E(!0);try{const be=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_lucky_spin_stats",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(be.ok){const Pe=await be.json();b(Pe)}}catch($){console.error("[ADMIN] Error loading lucky spin stats:",$)}finally{E(!1)}},ue=()=>{localStorage.setItem("bankTransferLastSeen",new Date().toISOString()),ae(0)},K=async()=>{try{const{count:$}=await Ye.from("support_messages").select("*",{count:"exact",head:!0}).eq("is_admin",!1).eq("is_read",!1);J($||0);const{count:ie}=await Ye.from("refill_requests").select("*",{count:"exact",head:!0}).eq("status","pending");A(ie||0);const be=localStorage.getItem("bankTransferLastSeen");let Pe=Ye.from("bank_transfer_payments").select("*",{count:"exact",head:!0}).eq("status","payment_submitted");be&&(Pe=Pe.gt("created_at",be));const{count:de}=await Pe;ae(de||0);const{count:H}=await Ye.from("withdrawals").select("*",{count:"exact",head:!0}).eq("status","pending");z(H||0)}catch($){console.error("[ADMIN] Error loading notification counts:",$)}};o.useEffect(()=>{(async()=>{const ie=localStorage.getItem("adminAuthenticated"),be=localStorage.getItem("adminUser"),Pe=localStorage.getItem("adminSession");if(ie==="true"){if(be)try{r(JSON.parse(be))}catch{console.error("Failed to parse admin user")}if(Pe)try{const de=JSON.parse(Pe);if(de.access_token&&de.refresh_token){const{data:H,error:me}=await Ye.auth.setSession({access_token:de.access_token,refresh_token:de.refresh_token});!me&&H.session&&localStorage.setItem("adminSession",JSON.stringify({access_token:H.session.access_token,refresh_token:H.session.refresh_token}))}}catch{console.error("Failed to restore session tokens")}s(!0)}})()},[]),o.useEffect(()=>{if(!t)return;const $=FN(()=>{Z(!0)});re.current=setInterval(()=>{Up().catch(()=>{})},4*60*1e3);const ie=()=>{document.visibilityState==="visible"&&t&&Up().catch(()=>{})};return document.addEventListener("visibilitychange",ie),()=>{$(),re.current&&clearInterval(re.current),document.removeEventListener("visibilitychange",ie)}},[t]);const q=o.useCallback(async $=>{$.preventDefault(),F(""),X(!0);try{const ie=localStorage.getItem("adminUser"),be=ie?JSON.parse(ie).username:"",Pe=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_panel_login",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({username:be,password:Q})}),de=await Pe.json();if(!Pe.ok){F(de.error||"Login failed");return}de.session&&(localStorage.setItem("adminSession",JSON.stringify({access_token:de.session.access_token,refresh_token:de.session.refresh_token})),await Ye.auth.setSession({access_token:de.session.access_token,refresh_token:de.session.refresh_token})),de.admin_token&&localStorage.setItem("adminToken",de.admin_token),_(""),Z(!1)}catch{F("Connection error. Please try again.")}finally{X(!1)}},[Q]);o.useEffect(()=>{t&&l==="lucky-spin"&&oe()},[l,t]),o.useEffect(()=>{if(t){K();const $=setInterval(K,3e4);return()=>clearInterval($)}},[t]),o.useEffect(()=>{t&&K()},[l]),o.useEffect(()=>{var $;if(a&&t){const ie=[{section:"dashboard",permission:"dashboard"},{section:"fraud-detection",permission:"users"},{section:"users",permission:"users"},{section:"orders",permission:"orders"},{section:"packages",permission:"packages"},{section:"providers",permission:"providers"},{section:"environment",permission:"environment"},{section:"support",permission:"support"},{section:"announcements",permission:"announcements"},{section:"crypto-wallets",permission:"crypto_wallets"},{section:"crypto-payments",permission:"crypto_payments"},{section:"refills",permission:"refills"},{section:"lucky-spin",permission:"lucky_spin"},{section:"mystery-box",permission:"mystery_box"},{section:"admin-users",permission:"admin_management"},{section:"payment-modules",permission:"payment_modules"},{section:"seo",permission:"seo_management"},{section:"order-documents",permission:"orders"},{section:"wallet-deposits",permission:"orders"},{section:"link-payments",permission:"orders"},{section:"bank-accounts",permission:"payment_modules"},{section:"bank-transfers",permission:"orders"},{section:"withdrawals",permission:"orders"}],be=($=ie.find(Pe=>Pe.section===l))==null?void 0:$.permission;if(be&&!U(be)){const Pe=ie.find(de=>U(de.permission));Pe&&n(Pe.section)}}},[a,t]),o.useEffect(()=>(N?document.body.style.overflow="hidden":document.body.style.overflow="auto",()=>{document.body.style.overflow="auto"}),[N]);const je=async $=>{$.preventDefault(),h("");try{const ie=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/admin_panel_login",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({username:i,password:d})}),be=await ie.json();if(!ie.ok){h(be.error||"Login failed");return}if(localStorage.setItem("adminAuthenticated","true"),be.session&&(localStorage.setItem("adminSession",JSON.stringify({access_token:be.session.access_token,refresh_token:be.session.refresh_token})),await Ye.auth.setSession({access_token:be.session.access_token,refresh_token:be.session.refresh_token})),be.admin_token&&localStorage.setItem("adminToken",be.admin_token),be.user){const Pe={id:be.user.id,username:be.user.username,email:be.user.email,full_name:be.user.full_name,role:be.user.role,permissions:be.user.permissions||{}};r(Pe),localStorage.setItem("adminUser",JSON.stringify(Pe))}s(!0)}catch(ie){console.error("Login error:",ie),h("Connection error. Please try again.")}},we=async()=>{await Ye.auth.signOut(),s(!1),r(null),localStorage.removeItem("adminAuthenticated"),localStorage.removeItem("adminSession"),localStorage.removeItem("adminUser"),localStorage.removeItem("adminToken")},se=$=>{n($),v(!1)},Se=()=>
1025{v(!1)};return t?e.jsxs("div",{className:"min-h-screen bg-slate-50 flex",children:[I&&e.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[9999] flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-sm p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 bg-amber-100 rounded-xl flex items-center justify-center",children:e.jsx(Fs,{className:"w-5 h-5 text-amber-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Oturum Suresi Doldu"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Devam etmek icin tekrar giris yapin"})]})]}),e.jsxs("form",{onSubmit:q,className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-600 mb-1",children:"Sifre"}),e.jsx("input",{type:"password",value:Q,onChange:$=>_($.target.value),autoComplete:"current-password",className:"w-full px-3 py-2.5 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none text-sm",required:!0,autoFocus:!0})]}),M&&e.jsx("p",{className:"text-red-500 text-xs",children:M}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",disabled:R,className:"flex-1 bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-2.5 rounded-lg font-medium text-sm hover:from-blue-700 hover:to-cyan-700 transition-all disabled:opacity-50",children:R?"Giris yapiliyor...":"Giris Yap"}),e.jsx("button",{type:"button",onClick:we,className:"px-4 py-2.5 text-slate-600 border border-slate-300 rounded-lg text-sm hover:bg-slate-50 transition-all",children:"Cikis"})]})]})]})}),N&&e.jsx("div",{className:"fixed inset-0 bg-black/40 z-[900] lg:hidden",onClick:Se}),e.jsxs("aside",{className:` 1026 w-64 bg-white border-r border-slate-200 flex flex-col 1027 fixed lg:static top-0 left-0 h-screen z-[1000] 1028 transition-transform duration-300 ease-in-out 1029 ${N?"translate-x-0":"-translate-x-full lg:translate-x-0"} 1030 `,children:[e.jsx("div",{className:"p-6 border-b border-slate-200",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-600 to-cyan-600 rounded-xl flex items-center justify-center",children:e.jsx(tl,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-slate-900",children:"Yonetim Paneli"}),e.jsx("p",{className:"text-xs text-slate-500",children:"Yonetim"})]})]}),e.jsxs("div",{className:"lg:hidden flex items-center gap-2",children:[e.jsx("button",{onClick:we,className:"p-2 hover:bg-red-50 rounded-lg transition-colors text-red-600","aria-label":"Logout",children:e.jsx(U0,{className:"w-5 h-5"})}),e.jsx("button",{onClick:Se,className:"p-2 hover:bg-slate-100 rounded-lg transition-colors","aria-label":"Close menu",children:e.jsx(ht,{className:"w-5 h-5 text-slate-600"})})]})]})}),e.jsxs("nav",{className:"flex-1 p-4 overflow-y-auto",children:[U("dashboard")&&e.jsxs("button",{onClick:()=>
1030se("dashboard"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="dashboard"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(Ia,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Kontrol Paneli"})]}),U("orders")&&e.jsxs("button",{onClick:()=>se("orders"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="orders"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(Ws,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Siparisler"})]}),U("support")&&e.jsxs("button",{onClick:()=>se("support"),className:`w-full flex items-center justify-between px-4 py-3 rounded-lg mb-2 transition-colors ${l==="support"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(Ls,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Destek"})]}),k>0&&e.jsx("span",{className:"bg-red-500 text-white text-xs font-bold px-2 py-0.5 rounded-full min-w-[20px] text-center",children:k>99?"99+":k})]}),U("refills")&&e.jsxs("button",{onClick:()=>se("refills"),className:`w-full flex items-center justify-between px-4 py-3 rounded-lg mb-2 transition-colors ${l==="refills"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(Ve,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Refill"})]}),u>0&&e.jsx("span",{className:"bg-red-500 text-white text-xs font-bold px-2 py-0.5 rounded-full min-w-[20px] text-center",children:u>99?"99+":u})]}),U("orders")&&e.jsxs("button",{onClick:()=>se("bank-transfers"),className:`w-full flex items-center justify-between px-4 py-3 rounded-lg mb-2 transition-colors ${l==="bank-transfers"?"bg-teal-50 text-teal-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(Nt,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Banka Transferi"})]}),T>0&&e.jsx("span",{className:"bg-red-500 text-white text-xs font-bold px-2 py-0.5 rounded-full min-w-[20px] text-center",children:T>99?"99+":T})]}),U("crypto_payments")&&e.jsxs("button",{onClick:()=>se("crypto-payments"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="crypto-payments"?"bg-orange-50 text-orange-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(gn,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Kripto Odemeler"})]}),U("users")&&e.jsxs("button",{onClick:()=>se("users"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="users"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(mt,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Kullanicilar"})]}),U("packages")&&e.jsxs("button",{onClick:()=>se("packages"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="packages"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(us,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Paketler"})]}),U("providers")&&e.jsxs("button",{onClick:()=>se("providers"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="providers"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(er,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Saglayicilar"})]}),U("orders")&&e.jsxs("button",{onClick:()=>se("order-documents"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="order-documents"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(B0,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Siparis Belgeleri"})]}),U("orders")&&e.jsxs("button",{onClick:()=>se("wallet-deposits"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="wallet-deposits"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(kt,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Bakiye Yuklemeleri"})]}),U("orders")&&e.jsxs("button",{onClick:()=>se("link-payments"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="link-payments"?"bg-amber-50 text-amber-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(hn,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Link Odeme"})]}),U("orders")&&e.jsxs("button",{onClick:()=>se("withdrawals"),className:`w-full flex items-center justify-between px-4 py-3 rounded-lg mb-2 transition-colors ${l==="withdrawals"?"bg-emerald-50 text-emerald-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(an,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Para Cekme"})]}),P>0&&e.jsx("span",{className:"bg-red-500 text-white text-xs font-bold px-2 py-0.5 rounded-full min-w-[20px] text-center",children:P>99?"99+":P})]}),U("environment")&&e.jsxs("button",{onClick:()=>se("environment"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="environment"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(Dr,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Ortam Ayarlari"})]}),U("announcements")&&e.jsxs("button",{onClick:()=>se("announcements"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="announcements"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(Ei,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Duyurular"})]}),U("crypto_wallets")&&e.jsxs("button",{onClick:()=>se("crypto-wallets"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="crypto-wallets"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(kt,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Kripto Cuzdanlar"})]}),U("lucky_spin")&&e.jsxs("button",{onClick:()=>se("lucky-spin"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="lucky-spin"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10.5",fill:"#fcd34d",stroke:"#b45309",strokeWidth:"0.8"}
1030),e.jsx("path",{d:"M12 1.5 A10.5 10.5 0 0 1 21.1 6.75 L12 12 Z",fill:"#ef4444",stroke:"#b91c1c",strokeWidth:"0.3"}),e.jsx("path",{d:"M21.1 6.75 A10.5 10.5 0 0 1 21.1 17.25 L12 12 Z",fill:"#f97316",stroke:"#c2410c",strokeWidth:"0.3"}),e.jsx("path",{d:"M21.1 17.25 A10.5 10.5 0 0 1 12 22.5 L12 12 Z",fill:"#facc15",stroke:"#a16207",strokeWidth:"0.3"}),e.jsx("path",{d:"M12 22.5 A10.5 10.5 0 0 1 2.9 17.25 L12 12 Z",fill:"#22c55e",stroke:"#15803d",strokeWidth:"0.3"}),e.jsx("path",{d:"M2.9 17.25 A10.5 10.5 0 0 1 2.9 6.75 L12 12 Z",fill:"#3b82f6",stroke:"#1d4ed8",strokeWidth:"0.3"}),e.jsx("path",{d:"M2.9 6.75 A10.5 10.5 0 0 1 12 1.5 L12 12 Z",fill:"#a855f7",stroke:"#7e22ce",strokeWidth:"0.3"}),e.jsx("circle",{cx:"12",cy:"12",r:"3",fill:"#fef3c7",stroke:"#b45309",strokeWidth:"0.5"}),e.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"#b45309"}),e.jsx("path",{d:"M12 0 L13.2 2.8 L10.8 2.8 Z",fill:"#dc2626",stroke:"#7f1d1d",strokeWidth:"0.3"})]}),e.jsx("span",{className:"font-medium",children:"Sans Carki"})]}),U("mystery_box")&&e.jsxs("button",{onClick:()=>se("mystery-box"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="mystery-box"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(Im,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Gizem Kutusu"})]}),(U("admin_management")||U("payment_modules"))&&e.jsxs("div",{className:"border-t border-slate-200 my-3 pt-3",children:[e.jsx("p",{className:"px-4 text-xs font-semibold text-slate-400 uppercase tracking-wider mb-2",children:"Yonetim"}),U("payment_modules")&&e.jsxs("button",{onClick:()=>se("payment-modules"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="payment-modules"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(Nt,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Odeme Modulleri"})]}),U("payment_modules")&&e.jsxs("button",{onClick:()=>se("bank-accounts"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="bank-accounts"?"bg-teal-50 text-teal-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(kt,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Banka Hesaplari"})]}),U("users")&&e.jsxs("button",{onClick:()=>se("fraud-detection"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="fraud-detection"?"bg-gradient-to-r from-red-50 to-rose-50 text-red-600 border border-red-200":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(Sl,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Kotu Amac"})]}),U("users")&&e.jsxs("button",{onClick:()=>se("verification-blocklist"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="verification-blocklist"?"bg-gradient-to-r from-red-50 to-rose-50 text-red-600 border border-red-200":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(lt,{className:"w-5 h-5 shrink-0"}),e.jsx("span",{className:"font-medium whitespace-nowrap text-sm",children:"IP Engel"})]}),e.jsxs("button",{onClick:()=>se("sales-boost"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="sales-boost"?"bg-gradient-to-r from-amber-50 to-orange-50 text-amber-600 border border-amber-200":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(ja,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Satis Artirma"})]}),e.jsxs("button",{onClick:()=>se("hero-content"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="hero-content"?"bg-gradient-to-r from-purple-50 to-pink-50 text-purple-600 border border-purple-200":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(dy,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Ana Sayfa Icerigi"})]}),e.jsxs("button",{onClick:()=>se("email-marketing"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="email-marketing"?"bg-gradient-to-r from-blue-50 to-cyan-50 text-blue-600 border border-blue-200":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(gs,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"E-posta Pazarlama"})]}),e.jsxs("button",{onClick:()=>se("affiliates"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="affiliates"?"bg-gradient-to-r from-green-50 to-emerald-50 text-green-600 border border-green-200":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(mt,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Ortaklik & Bayi"})]}),e.jsxs("button",{onClick:()=>se("sub-accounts"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="sub-accounts"?"bg-gradient-to-r from-blue-50 to-cyan-50 text-blue-600 border border-blue-200":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(lt,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Alt Hesaplar"})]}),U("seo_management")&&e.jsxs("button",{onClick:()=>se("seo"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="seo"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(ei,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"SEO Icerik"})]}),U("admin_management")&&e.jsxs("button",{onClick:()=>se("admin-users"),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg mb-2 transition-colors ${l==="admin-users"?"bg-blue-50 text-blue-600":"text-slate-600 hover:bg-slate-50"}`,children:[e.jsx(Sl,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Yonetici Kullanicilar"})]})]})]}),e.jsx("div",{className:"hidden lg:block p-4 border-t border-slate-200",children:e.jsxs("button",{onClick:we,className:"w-full flex items-center space-x-3 px-4 py-3 rounded-lg text-red-600 hover:bg-red-50 transition-colors",children:[e.jsx(U0,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Cikis Yap"})]})})]}),e.jsxs("main",{className:"flex-1 overflow-y-auto w-full lg:w-auto",children:[e.jsxs("div",{className:"lg:hidden sticky top-0 bg-white border-b border-slate-200 px-4 py-3 z-[800] flex items-center space-x-3",children:[e.jsx("button",{onClick:()=>v(!0),className:"p-2 hover:bg-slate-100 rounded-lg transition-colors","aria-label":"Open menu",children:e.jsx(Yv,{className:"w-6 h-6 text-slate-700"})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-600 to-cyan-600 rounded-lg flex items-center justify-center",children:e.jsx(tl,{className:"w-5 h-5 text-white"})}),e.jsx("h1",{className:"font-bold text-slate-900",children:"Yonetim Paneli"})]})]}),e.jsxs("div",{className:"p-4 lg:p-8",children:[l==="fraud-detection"&&U("users")&&e.jsx(K5,{}),l==="verification-blocklist"&&U("users")&&e.jsx(r4,{}),l==="dashboard"&&U("dashboard")&&e.jsx(u5,{}),l==="users"&&U("users")&&e.jsx(LN,{}),l==="orders"&&U("orders")&&e.jsx(UN,{onViewOrder:$=>y($)}),l==="smm-orders"&&U("orders")&&e.jsxs("div",{children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"SMM Siparisler"}),e.jsx("p",{className:"text-slate-500 mt-1",children:"Reseller API uzerinden gelen siparisleri yonetin"})]}),e.jsx(U5,{onViewUser:$=>w($)})]}),l==="packages"&&U("packages")&&e.jsx("div",{className:"bg-slate-900 -m-8 p-8 min-h-screen",children:e.jsx(XN,{})}),l==="providers"&&U("providers")&&e.jsx("div",{className:"bg-slate-900 -m-8 p-8 min-h-screen",children:e.jsx(KN,{})}),l==="environment"&&U("environment")&&e.jsx("div",{children:e.jsx(ON,{})}),l==="support"&&U("support")&&e.jsx(qN,{onMessagesRead:K}),l==="announcements"&&U("announcements")&&e.jsx(JN,{}),l==="crypto-wallets"&&U("crypto_wallets")&&e.jsx(WN,{}),l==="crypto-payments"&&U("crypto_payments")&&e.jsx(HN,{}),l==="refills"&&U("refills")&&e.jsx(VN,{onViewUser:$=>w($)}),l==="lucky-spin"&&U("lucky_spin")&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Lucky Spin Statistics"}),e.jsx("p",{className:"text-slate-600 mt-1",children:"View total game balance given to users through Lucky Spin"})]}),e.jsxs("button",{onClick:oe,disabled:p,className:"flex items-center gap-2 px-4 py-2 bg-emerald-600 hover:bg-emerald-700 disabled:bg-emerald-400 text-white rounded-lg transition-colors",children:[e.jsx(Ve,{className:`w-4 h-4 ${p?"animate-spin":""}`}),"Refresh"]})]}),p&&!j?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(Ve,{className:"w-8 h-8 text-emerald-600 animate-spin"})}
1030):j?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-gradient-to-br from-emerald-600 to-teal-600 rounded-2xl p-6 text-white shadow-xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-3 bg-white/20 rounded-xl",children:e.jsx(rs,{className:"w-8 h-8"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-medium text-emerald-100",children:"Total Game Balance Given"}),e.jsx("p",{className:"text-sm text-emerald-200",children:"All time Lucky Spin winnings"})]})]}),e.jsxs("div",{className:"text-5xl font-bold",children:["$",j.totalAmount.toFixed(2)]}),e.jsxs("div",{className:"mt-4 pt-4 border-t border-white/20 flex flex-wrap gap-6",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold",children:j.totalSpins}),e.jsx("div",{className:"text-sm text-emerald-200",children:"Total Spins"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold",children:j.uniqueUsers}),e.jsx("div",{className:"text-sm text-emerald-200",children:"Unique Users"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold",children:["$",j.averageWin.toFixed(2)]}),e.jsx("div",{className:"text-sm text-emerald-200",children:"Average Win"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-slate-200 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:e.jsx(Vt,{className:"w-5 h-5 text-blue-600"})}),e.jsx("span",{className:"text-sm font-medium text-slate-600",children:"Today"})]}),e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:["$",j.todayAmount.toFixed(2)]}),e.jsxs("div",{className:"text-sm text-slate-500 mt-1",children:[j.todaySpins," spins"]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-slate-200 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"p-2 bg-amber-100 rounded-lg",children:e.jsx(Vt,{className:"w-5 h-5 text-amber-600"})}),e.jsx("span",{className:"text-sm font-medium text-slate-600",children:"Last 7 Days"})]}),e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:["$",j.weekAmount.toFixed(2)]}),e.jsxs("div",{className:"text-sm text-slate-500 mt-1",children:[j.weekSpins," spins"]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-slate-200 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"p-2 bg-emerald-100 rounded-lg",children:e.jsx(Vt,{className:"w-5 h-5 text-emerald-600"})}),e.jsx("span",{className:"text-sm font-medium text-slate-600",children:"Last 30 Days"})]}),e.jsxs("div",{className:"text-2xl font-bold text-slate-900",children:["$",j.monthAmount.toFixed(2)]}),e.jsxs("div",{className:"text-sm text-slate-500 mt-1",children:[j.monthSpins," spins"]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-slate-200 shadow-sm",children:[e.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-4",children:"Summary"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg",children:[e.jsx("span",{className:"text-slate-700 font-medium",children:"Total Game Balance Distributed"}),e.jsxs("span",{className:"text-lg font-bold text-emerald-600",children:["$",j.totalAmount.toFixed(2)]})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg",children:[e.jsx("span",{className:"text-slate-700 font-medium",children:"Average Win Per Spin"}),e.jsxs("span",{className:"text-lg font-bold text-blue-600",children:["$",j.averageWin.toFixed(2)]})]}),e.jsxs("div",{className:"rounded-lg overflow-hidden",children:[e.jsxs("button",{onClick:()=>S(!C),className:"w-full flex items-center justify-between p-3 bg-slate-50 hover:bg-slate-100 transition-colors cursor-pointer",children:[e.jsx("span",{className:"text-slate-700 font-medium",children:"Users Who Won"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-lg font-bold text-amber-600",children:j.uniqueUsers}),e.jsx(is,{className:`w-5 h-5 text-slate-400 transition-transform ${C?"rotate-180":""}`})]})]}),C&&j.winners&&j.winners.length>0&&e.jsx("div",{className:"border-t border-slate-200 bg-white max-h-80 overflow-y-auto",children:j.winners.map(($,ie)=>e.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-slate-100 last:border-b-0 hover:bg-slate-50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold ${ie===0?"bg-yellow-400 text-yellow-900":ie===1?"bg-slate-300 text-slate-700":ie===2?"bg-amber-600 text-white":"bg-slate-100 text-slate-600"}`,children:ie<3?ie+1:e.jsx(ls,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-slate-800",children:$.fullName}),e.jsx("div",{className:"text-xs text-slate-500",children:$.email})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"font-bold text-emerald-600",children:["$",$.totalWon.toFixed(2)]}),e.jsxs("div",{className:"text-xs text-slate-500",children:[$.spinCount," spin",$.spinCount!==1?"s":""]})]})]}
1030,$.userId))})]})]})]})]}):e.jsxs("div",{className:"text-center py-20",children:[e.jsx(rs,{className:"w-16 h-16 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-500",children:"No spin data available"})]})]}),l==="mystery-box"&&U("mystery_box")&&e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center justify-between mb-8",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Mystery Box"}),e.jsx("p",{className:"text-slate-600 mt-1",children:"Configure rewards, view analytics, and manage the Mystery Box feature"})]})}),e.jsx(e5,{})]}),l==="admin-users"&&U("admin_management")&&e.jsx(ZN,{}),l==="payment-modules"&&U("payment_modules")&&e.jsx(f5,{}),l==="seo"&&U("seo_management")&&e.jsx(g5,{}),l==="sales-boost"&&e.jsx(F5,{}),l==="order-documents"&&U("orders")&&e.jsx(b5,{}),l==="wallet-deposits"&&U("orders")&&e.jsx(y5,{}),l==="link-payments"&&U("orders")&&e.jsx(W5,{}),l==="bank-transfers"&&U("orders")&&e.jsx(V5,{onViewUser:$=>w($),notificationCount:T,onClearNotifications:ue}),l==="withdrawals"&&U("orders")&&e.jsx(Y5,{onViewUser:$=>w($)}),l==="bank-accounts"&&U("payment_modules")&&e.jsx(H5,{}),l==="email-marketing"&&U("email_marketing")&&e.jsx(O5,{session:localStorage.getItem("adminSession")?JSON.parse(localStorage.getItem("adminSession")):null}),l==="affiliates"&&e.jsx(L5,{}),l==="hero-content"&&e.jsx(J5,{}),l==="sub-accounts"&&e.jsx(a4,{})]})]}),f&&e.jsx(Uy,{orderId:f,onClose:()=>y(null),onRefresh:()=>y(null),onViewUserDetail:$=>w($)}),g&&e.jsx(to,{userId:g,onClose:()=>w(null),onRefresh:()=>{}})]}):e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-blue-900 to-slate-900 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-md p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-blue-600 to-cyan-600 rounded-2xl mx-auto mb-4 flex items-center justify-center",children:e.jsx(tl,{className:"w-8 h-8 text-white"})}),e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-2",children:"Yonetim Paneli"}),e.jsx("p",{className:"text-slate-600",children:"Sign in to access the dashboard"})]}),m&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg text-red-600 text-sm",children:m}),e.jsxs("form",{onSubmit:je,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Username"}),e.jsx("input",{type:"text",value:i,onChange:$=>c($.target.value),autoComplete:"username",className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"Password"}),e.jsx("input",{type:"password",value:d,onChange:$=>x($.target.value),autoComplete:"current-password",className:"w-full px-4 py-3 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none",required:!0})]}),e.jsx("button",{type:"submit",className:"w-full bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3 rounded-lg font-semibold hover:from-blue-700 hover:to-cyan-700 transition-all",children:"Sign In"})]})]})})}function n4(){const t=[{name:"Starter",description:"Perfect for small businesses getting started with digital marketing",price:"29",period:"/month",features:["Website promotion tools","Basic analytics dashboard","Email campaign management","Up to 1,000 monthly reach","Standard support"],popular:!1,color:"from-slate-600 to-slate-700"},{name:"Professional",description:"Ideal for growing businesses and marketing teams",price:"79",period:"/month",features:["Advanced promotion tools","Comprehensive analytics","Multi-channel campaigns","Up to 10,000 monthly reach","Priority support","Performance optimization"],popular:!0,color:"from-blue-500 to-cyan-500"},{name:"Enterprise",description:"For agencies and large-scale marketing operations",price:"Custom",period:"",features:["Full platform access","Custom integrations","Unlimited campaigns","Dedicated account manager","24/7 premium support","Custom reporting","API access"],popular:!1,color:"from-slate-800 to-slate-900"}],s=[{icon:wt,title:"Website Promotion Tools",description:"Digital tools to increase your online visibility and reach target audiences"},{icon:sr,title:"Campaign Setup & Optimization",description:"Professional setup and continuous optimization of your marketing campaigns"},{icon:Hv,title:"Performance Analytics",description:"Detailed insights and reports on campaign performance and ROI"},{icon:gs,title:"Online Delivery",description:"All services delivered digitally via dashboard or email notifications"},{icon:Os,title:"Multi-Platform Support",description:"Manage campaigns across multiple digital channels from one platform"},{icon:Ia,title:"Real-Time Reporting",description:"Access live dashboards with up-to-date performance metrics"}];return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-blue-50",children:[e.jsx("header",{className:"bg-white/80 backdrop-blur-xl border-b border-slate-200/50 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 transition-colors",children:[e.jsx(xr,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Back to Home"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-xl font-bold bg-gradient-to-r from-slate-900 to-slate-700 bg-clip-text text-transparent",children:"Follx"})]})]})})}),e.jsxs("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-slate-900 mb-4",children:"Simple, Transparent Pricing"}),e.jsx("p",{className:"text-xl text-slate-600 max-w-2xl mx-auto",children:"Choose the plan that fits your digital marketing needs. All plans include our quality guarantee and dedicated support."}),e.jsx("p",{className:"text-sm text-slate-500 mt-4",children:"Prices may vary depending on specific requirements and campaign scope."})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-8 mb-20",children:t.map(a=>e.jsxs("div",{className:`relative bg-white rounded-2xl shadow-xl border ${a.popular?"border-blue-500 ring-2 ring-blue-500/20":"border-slate-200"} overflow-hidden`,children:[a.popular&&e.jsx("div",{className:"absolute top-0 right-0 bg-gradient-to-r from-blue-500 to-cyan-500 text-white text-xs font-bold px-4 py-1 rounded-bl-lg",children:"MOST POPULAR"}),e.jsxs("div",{className:`bg-gradient-to-r ${a.color} p-6 text-white`,children:[e.jsx("h3",{className:"text-2xl font-bold mb-1",children:a.name}),e.jsx("p",{className:"text-white/80 text-sm",children:a.description})]}),e.jsxs("div",{className:"p-6",children:[e.jsx("div",{className:"mb-6",children:e.jsx("div",{className:"flex items-baseline gap-1",children:a.price==="Custom"?e.jsx("span",{className:"text-3xl font-bold text-slate-900",children:"Contact Us"}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-4xl font-bold text-slate-900",children:["$",a.price]}),e.jsx("span",{className:"text-slate-500",children:a.period})]})})}),e.jsx("ul",{className:"space-y-3 mb-8",children:a.features.map((r,l)=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-green-100 flex items-center justify-center mt-0.5",children:e.jsx(Lt,{className:"w-3 h-3 text-green-600"})}),e.jsx("span",{className:"text-slate-600 text-sm",children:r})]},l))}),e.jsx("a",{href:"/",className:`block w-full text-center py-3 px-4 roun
1030ded-xl font-semibold transition-all ${a.popular?"bg-gradient-to-r from-blue-500 to-cyan-500 text-white hover:shadow-lg hover:shadow-blue-500/25":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:a.price==="Custom"?"Contact Sales":"Get Started"})]})]},a.name))}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-slate-200 p-8 md:p-12 mb-16",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-4",children:"What You Get"}),e.jsx("p",{className:"text-slate-600 max-w-2xl mx-auto",children:"All plans include access to our comprehensive digital marketing platform with these core features and deliverables."})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:s.map((a,r)=>e.jsxs("div",{className:"text-center p-6 rounded-xl bg-slate-50 border border-slate-100",children:[e.jsx("div",{className:"w-14 h-14 rounded-xl bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center mx-auto mb-4 shadow-lg",children:e.jsx(a.icon,{className:"w-7 h-7 text-white"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:a.title}),e.jsx("p",{className:"text-slate-600 text-sm",children:a.description})]},r))})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-slate-200 p-8 md:p-12 mb-16",children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-8 text-center",children:"Why Choose Follx?"}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-100 flex items-center justify-center mx-auto mb-4",children:e.jsx(lt,{className:"w-6 h-6 text-blue-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Secure Platform"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Enterprise-grade security for all your data and campaigns"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-green-100 flex items-center justify-center mx-auto mb-4",children:e.jsx(Ze,{className:"w-6 h-6 text-green-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Quick Setup"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Get started within minutes with our intuitive onboarding"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-amber-100 flex items-center justify-center mx-auto mb-4",children:e.jsx(Zt,{className:"w-6 h-6 text-amber-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Quality Results"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Proven strategies that deliver measurable outcomes"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-rose-100 flex items-center justify-center mx-auto mb-4",children:e.jsx(rt,{className:"w-6 h-6 text-rose-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Expert Support"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Dedicated team ready to help you succeed"})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-r from-slate-900 to-slate-800 rounded-2xl p-8 md:p-12 text-center text-white",children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4",children:"Ready to Grow Your Business?"}),e.jsx("p",{className:"text-slate-300 mb-8 max-w-xl mx-auto",children:"Join thousands of businesses using Follx to enhance their digital marketing presence and reach their goals."}),e.jsxs("a",{href:"/",className:"inline-flex items-center gap-2 bg-white text-slate-900 px-8 py-3 rounded-xl font-semibold hover:bg-slate-100 transition-colors",children:["Start Your Free Trial",e.jsx(rt,{className:"w-5 h-5"})]})]})]}),e.jsx("footer",{className:"bg-white border-t border-slate-200 py-8",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"font-bold text-slate-900",children:"Follx"})]}),e.jsxs("div",{className:"flex items-center gap-6 text-sm text-slate-600",children:[e.jsx("a",{href:"/terms",className:"hover:text-slate-900 transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"/privacy-policy",className:"hover:text-slate-900 transition-colors",children:"Privacy Policy"}),e.jsx("a",{href:"/refund-policy",className:"hover:text-slate-900 transition-colors",children:"Refund Policy"})]}),e.jsx("p",{className:"text-slate-500 text-sm",children:"2025 Follx. All rights reserved."})]})})})]})}function i4(){return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-blue-50",children:[e.jsx("header",{className:"bg-white/80 backdrop-blur-xl border-b border-slate-200/50 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 transition-colors",children:[e.jsx(xr,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Back to Home"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-xl font-bold bg-gradient-to-r from-slate-900 to-slate-700 bg-clip-text text-transparent",children:"Follx"})]})]})})}),e.jsx("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-slate-200 overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 px-8 py-6",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg",children:e.jsx(ei,{className:"w-6 h-6 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-white",children:"Terms of Service"})]})}),e.jsxs("div",{className:"p-8",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-6",children:"Last updated: January 2025"}),e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 mb-8",children:e.jsx("p",{className:"text-blue-800 font-medium",children:"This website is operated by Follx Social Media Company LLC."})}),e.jsx("p",{className:"text-slate-600 mb-8 leading-relaxed",children:"Please read these Terms of Service carefully before using our platform. By accessing or using our services, you agree to be bound by these terms."}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"1. Acceptance of Terms"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"By accessing and using this website and our services, you accept and agree to be bound by the terms and provisions of this agreement. If you do not agree to these terms, please do not use our services."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"2. Description of Services"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"Follx provides digital marketing services delivered online, including:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Website promotion tools and marketing optimization features"}),e.jsx("li",{children:"Performance analytics and campaign insights"}),e.jsx("li",{children:"Digital marketing campaign management"}),e.jsx("li",{children:"Online visibility enhancement services"})]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mt-3",children:"All services are delivered digitally via our online dashboard or email. No physical products are sold through this platform."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"3. User Responsibilities"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"As a user of our services, you agree to:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Provide accurate and complete information when using our services"}),e.jsx("li",{children:"Maintain the security of your account credentials"}),e.jsx("li",{children:"Not use our services for illegal or prohibited activities"}),e.jsx("li",{children:"Not resell our services without authorization"}),e.jsx("li",{children:"Comply with all applicable laws and regulations"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"4. Payment Terms"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"Payments are processed via secure payment providers for digital services. By making a purchase, you agree to:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Pay all fees associated with your order"}),e.jsx("li",{children:"Provide valid payment information"}),e.jsx("li",{children:"Authorize us to charge your payment method for the total order amount"})]}),e.jsx("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-xl",children:e.jsxs("p",{className:"text-blue-800 text-sm",children:[e.jsx("strong",{children:"Payment Processing:"})," All payments are securely processed via Paddle or other authorized payment processors. We accept major credit cards, debit cards, and other payment methods as available."]})})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"5. Promotional Credits"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"Promotional site credits (including credits earned through bonuses or promotions) have no cash value and cannot be withdrawn or c
1030onverted to cash. Promotional credits can only be used to purchase digital services on our platform."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"6. Refund Policy"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"We offer refunds under the following circumstances:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Service not delivered within the specified timeframe"}),e.jsx("li",{children:"Service delivered is significantly different from what was ordered"}),e.jsx("li",{children:"Technical issues on our end preventing delivery"})]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mt-3",children:"Refunds are not available for delivered services or orders cancelled after service delivery has begun. Refund requests must be submitted within 30 days of purchase. Please see our full Refund Policy for details."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"7. Service Delivery"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"We strive to deliver all services as quickly as possible. Delivery times vary depending on the service type and scope. All services are delivered digitally through our online platform or via email notification. While we aim to complete services within the estimated timeframe, delays may occur due to high demand or te
1030chnical factors."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"8. Intellectual Property"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"All content, features, and functionality of this website, including but not limited to text, graphics, logos, and software, are owned by Follx and are protected by copyright, trademark, and other intellectual property laws."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"9. Limitation of Liability"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"To the fullest extent permitted by law, Follx shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising out of or related to your use of our services. Our total liability shall not exceed the amount paid for the specific service in question."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"10. Modifications to Terms"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"We reserve the right to modify these terms at any time. Changes will be effective immediately upon posting to the website. Your continued use of our services after any changes indicates your acceptance of the new terms."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"11. Governing Law"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"These Terms of Service shall be governed by and construed in accordance with applicable laws. Any disputes arising from these terms shall be resolved through appropriate legal channels."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"12. Contact Information"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"If you have any questions about these Terms of Service, please contact our support team through our Support Center or via email."}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(sa,{className:"w-4 h-4 text-white"})}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"Follx LTD"})]}),e.jsxs("div",{className:"space-y-2.5 text-sm text-slate-600",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Fr,{className:"w-4 h-4 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:"Suite 10475 5 Brayford Square, London, United Kingdom, E1 0SG"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ji,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsx("span",{children:"+44 7404 376861"})]})]})]}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(sa,{className:"w-4 h-4 text-white"})}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"Follx Social Media Company LLC"})]}),e.jsxs("div",{className:"space-y-2.5 text-sm text-slate-600",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Fr,{className:"w-4 h-4 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:"30 N Gould St #41998, Sheridan, WY 82801, USA"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ji,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsx("span",{children:"+1 (812) 925-9161"})]})]})]})]})]})]})]})]})}),e.jsx("footer",{className:"bg-white border-t border-slate-200 py-8",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"font-bold text-slate-900",children:"Follx"})]}),e.jsxs("div",{className:"flex items-center gap-6 text-sm text-slate-600",children:[e.jsx("a",{href:"/pricing",className:"hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/privacy-policy",className:"hover:text-slate-900 transition-colors",children:"Privacy Policy"}),e.jsx("a",{href:"/refund-policy",className:"hover:text-slate-900 transition-colors",children:"Refund Policy"})]}),e.jsx("p",{className:"text-slate-500 text-sm",children:"2025 Follx. All rights reserved."})]})})})]})}function o4(){return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-blue-50",children:[e.jsx("header",{className:"bg-white/80 backdrop-blur-xl border-b border-slate-200/50 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 transition-colors",children:[e.jsx(xr,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Back to Home"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-xl font-bold bg-gradient-to-r from-slate-900 to-slate-700 bg-clip-text text-transparent",children:"Follx"})]})]})})}),e.jsx("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-slate-200 overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 px-8 py-6",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg",children:e.jsx(lt,{className:"w-6 h-6 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-white",children:"Privacy Policy"})]})}),e.jsxs("div",{className:"p-8",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-6",children:"Last updated: January 2025"}),e.jsx("p",{className:"text-slate-600 mb-8 leading-relaxed",children:"Your privacy is important to us. This Privacy Policy explains how Follx collects, uses, disclose
1030s, and safeguards your information when you use our digital marketing services."}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"1. Information We Collect"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"We collect information that you provide directly to us, including:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Account information (email address, name)"}),e.jsx("li",{children:"Order details and service preferences"}),e.jsx("li",{children:"Payment information (processed securely by payment providers)"}),e.jsx("li",{children:"Communication records when you contact our support"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"2. Automatic Information Collection"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"When you access our website, we automatically collect certain information, including:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"IP address and location data"}),e.jsx("li",{children:"Browser type and version"}),e.jsx("li",{children:"Device information"}),e.jsx("li",{children:"Pages visited and time spent on site"}),e.jsx("li",{children:"Referring website addresses"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"3. How We Use Your Information"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"We use the collected information for the following purposes:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"To process and fulfill your service orders"}),e.jsx("li",{children:"To communicate with you about your orders and account"}),e.jsx("li",{children:"To provide customer support"}),e.jsx("li",{children:"To improve our services and user experience"}),e.jsx("li",{children:"To detect and prevent fraud or abuse"}),e.jsx("li",{children:"To comply with legal obligations"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"4. Information Sharing"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"We do not sell your personal information. We may share your information with:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Service providers who assist in delivering our services"}),e.jsx("li",{children:"Payment processors (such as Paddle) for transaction processing"}),e.jsx("li",{children:"Law enforcement when required by law"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"5. Data Security"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"We implement appropriate technical and organizational security measures to protect your personal information against unauthorized access, alteration, disclosure, or destruction. This includes encryption, secure servers, and regular security assessments."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"6. Cookies and Tracking"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"We use cookies and similar tracking technologies to enhance your experience on our website. Cookies help us remember your preferences, understand how you use our site, and improve our services. You can control cookie settings through your browser preferences."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"7. Data Retention"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"We retain your personal information for as long as necessary to fulfill the purposes outlined in this policy, unless a longer retention period is required by law. Order records are typically retained for accounting and legal compliance purposes."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"8. Your Rights"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"You have the right to:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Access your personal information"}),e.jsx("li",{children:"Correct inaccurate information"}
vendor: 12,556 bytes, line 1030
1030),e.jsx("li",{children:"Request deletion of your data"}),e.jsx("li",{children:"Object to processing of your information"}),e.jsx("li",{children:"Request data portability"})]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mt-3",children:"To exercise these rights, please contact our support team."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"9. Children's Privacy"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"Our services are not intended for individuals under the age of 18. We do not knowingly collect personal information from children. If you believe we have collected information from a minor, please contact us immediately."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"10. International Data Transfers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"Your information may be transferred to and processed in countries other than your country of residence. We ensure appropriate safeguards are in place to protect your data in accordance with applicable data protection laws."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"11. Changes to This Policy"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:'We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page and updating the "Last updated" date. We encourage you to review this policy periodically.'})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"12. Contact Us"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"If you have any questions about this Privacy Policy or our data practices, please contact our support team through our Support Center or via email."}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(sa,{className:"w-4 h-4 text-white"})}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"Follx LTD"})]}),e.jsxs("div",{className:"space-y-2.5 text-sm text-slate-600",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Fr,{className:"w-4 h-4 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:"Suite 10475 5 Brayford Square, London, United Kingdom, E1 0SG"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ji,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsx("span",{children:"+44 7404 376861"})]})]})]}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(sa,{className:"w-4 h-4 text-white"})}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"Follx Social Media Company LLC"})]}),e.jsxs("div",{className:"space-y-2.5 text-sm text-slate-600",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Fr,{className:"w-4 h-4 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:"30 N Gould St #41998, Sheridan, WY 82801, USA"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ji,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsx("span",{children:"+1 (812) 925-9161"})]})]})]})]})]})]})]})]})}),e.jsx("footer",{className:"bg-white border-t border-slate-200 py-8",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"font-bold text-slate-900",children:"Follx"})]}),e.jsxs("div",{className:"flex items-center gap-6 text-sm text-slate-600",children:[e.jsx("a",{href:"/pricing",className:"hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/terms",className:"hover:text-slate-900 transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"/refund-policy",className:"hover:text-slate-900 transition-colors",children:"Refund Policy"})]}),e.jsx("p",{className:"text-slate-500 text-sm",children:"2025 Follx. All rights reserved."})]})})})]})}function c4(){return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-blue-50",children:[e.jsx("header",{className:"bg-white/80 backdrop-blur-xl border-b border-slate-200/50 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 transition-colors",children:[e.jsx(xr,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Back to Home"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-xl font-bold bg-gradient-to-r from-slate-900 to-slate-700 bg-clip-text text-transparent",children:"Follx"})]})]})})}),e.jsx("main",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-slate-200 overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 px-8 py-6",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center shadow-lg",children:e.jsx(hy,{className:"w-6 h-6 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-white",children:"Refund Policy"})]})}),e.jsxs("div",{className:"p-8",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-6",children:"Last updated: January 2025"}),e.jsx("p",{className:"text-slate-600 mb-8 leading-relaxed",children:"We are committed to ensuring customer satisfaction. This Refund Policy outlines the conditions under which refunds may be issued for our digital marketing services."}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mb-10",children:[e.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx(ne,{className:"w-6 h-6 text-green-600"}),e.jsx("h3",{className:"font-semibold text-green-900",children:"Eligible for Refund"})]}),e.jsxs("ul",{className:"space-y-2 text-sm text-green-800",children:[e.jsx("li",{children:"Service not started within 72 hours"}),e.jsx("li",{children:"Technical failure on our end"}),e.jsx("li",{children:"Duplicate payment"}),e.jsx("li",{children:"Service not matching description"})]})]}),e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx(st,{className:"w-6 h-6 text-red-600"}),e.jsx("h3",{className:"font-semibold text-red-900",children:"Not Eligible for Refund"})]}),e.jsxs("ul",{className:"space-y-2 text-sm text-red-800",children:[e.jsx("li",{children:"Service already delivered"}),e.jsx("li",{children:"Service delivery in progress"}),e.jsx("li",{children:"Incorrect information provided"}),e.jsx("li",{children:"Change of mind after purchase"})]})]})]}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"1. Refund Eligibility"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"Refunds may be issued under the following circumstances:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Service not delivered within the specified timeframe (typically 72 hours for standard services)"}),e.jsx("li",{children:"Service delivered is significantly different from what was ordered"}),e.jsx("li",{children:"Technical issues on our end preventing delivery"}),e.jsx("li",{children:"Duplicate charges or payment errors"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"2. Non-Refundable Situations"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"Refunds will NOT be issued in the following cases:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Service has been fully or partially delivered"}),e.jsx("li",{children:"Customer provided incorrect information"}),e.jsx("li",{children:"Customer cancelled or modified their requirements after service began"}),e.jsx("li",{children:"Change of mind after order placement"}),e.jsx("li",{children:"Promotional credits or bonus amounts"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"3. Refund Request Timeframe"}),e.jsxs("div",{className:"flex items-start gap-3 p-4 bg-amber-50 border border-amber-200 rounded-xl mb-4",children:[e.jsx(Ze,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),e.jsxs("p",{className:"text-amber-800 text-sm",children:[e.jsx("strong",{children:"Important:"})," Refund requests must be submitted within 30 days of the original purchase date. Requests submitted after this period will not be considered."]})]}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"All refund requests must be submitted through our Support Center. Please include your order number and a detailed description of the issue."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"4. Refund Methods"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"Approved refunds will be processed using the original payment method:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Credit/Debit Cards:"})," Refunded to the original card within 5-10 business days"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Account Balance:"})," Credited back to your account balance instantly"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Other Payment Methods:"})," Refunded via the same method used for payment"]})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"5. Partial Refunds"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"In cases where a service has been partially delivered, we may offer a partial refund proportional to the undelivered portion. The exact amount will be calculated based on the percentage of service not delivered."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"6. Service Guarantee"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:"Many of our services include a satisfaction guarantee. Before requesting a refund, please consider:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 space-y-2 ml-4",children:[e.jsx("li",{children:"Contacting support for service adjustments"}),e.jsx("li",{children:"Allowing the full estimated delivery timeframe"}),e.jsx("li",{children:"Reviewing our FAQ for common solutions"})]}),e.jsxs("div",{className:"flex items-start gap-3 p-4 bg-blue-50 border border-blue-200 rounded-xl mt-4",children:[e.jsx(nt,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-blue-800 text-sm",children:"We recommend contacting our support team before requesting a refund, as many issues can be resolved quickly."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"7. Refund Processing Time"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"Once a refund is a
1030pproved, processing times are as follows:"}),e.jsxs("div",{className:"mt-4 grid gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg",children:[e.jsx("span",{className:"text-slate-700",children:"Account Balance"}),e.jsx("span",{className:"font-semibold text-slate-900",children:"Instant"})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg",children:[e.jsx("span",{className:"text-slate-700",children:"Credit/Debit Card"}),e.jsx("span",{className:"font-semibold text-slate-900",children:"5-10 Business Days"})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg",children:[e.jsx("span",{className:"text-slate-700",children:"Other Methods"}),e.jsx("span",{className:"font-semibold text-slate-900",children:"5-14 Business Days"})]})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"8. Dispute Resolution"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"If you disagree with our refund decision, you may appeal by contacting our support team with additional information or evidence. We will review your case and provide a final decision within 5 business days."})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-lg font-semibold text-slate-900 mb-3",children:"9. Contact Us"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"For refund requests or questions about this policy, please contact our support team through the Support Center on our website. Include your order number for faster processing."}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(sa,{className:"w-4 h-4 text-white"})}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"Follx LTD"})]}),e.jsxs("div",{className:"space-y-2.5 text-sm text-slate-600",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Fr,{className:"w-4 h-4 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:"Suite 10475 5 Brayford Square, London, United Kingdom, E1 0SG"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ji,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsx("span",{children:"+44 7404 376861"})]})]})]}),e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(sa,{className:"w-4 h-4 text-white"})}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"Follx Social Media Company LLC"})]}),e.jsxs("div",{className:"space-y-2.5 text-sm text-slate-600",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Fr,{className:"w-4 h-4 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:"30 N Gould St #41998, Sheridan, WY 82801, USA"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ji,{className:"w-4 h-4 text-slate-400 flex-shrink-0"}),e.jsx("span",{children:"+1 (812) 925-9161"})]})]})]})]})]})]})]})]})}),e.jsx("footer",{className:"bg-white border-t border-slate-200 py-8",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"font-bold text-slate-900",children:"Follx"})]}),e.jsxs("div",{className:"flex items-center gap-6 text-sm text-slate-600",children:[e.jsx("a",{href:"/pricing",className:"hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/terms",className:"hover:text-slate-900 transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"/privacy-policy",className:"hover:text-slate-900 transition-colors",children:"Privacy Policy"})]}),e.jsx("p",{className:"text-slate-500 text-sm",children:"2025 Follx. All rights reserved."})]})})})]})}const d4=(t,s,a)=>{const r=t[s];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((l,n)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+s+(s.split("/").length!==a?". Note that variables only represent file names one level deep.":""))))})},Co={"header.login":"Login","header.signup":"Sign Up","header.home":"Home","header.back_to_home":"Back to main page","header.dashboard":"Dashboard","header.orders_wallet":"Orders & Wallet","header.announcements":"Announcements","header.latest_updates":"Latest updates","header.lucky_spin":"Lucky Spin","header.win_credits":"Win free credits","header.mystery_box":"Mystery Box","header.win_gift":"Win Game Balance","header.support":"Support","header.get_help":"Get help","header.sign_out":"Sign Out","header.premium":"Premium","auth.welcome_back":"Welcome Back","auth.sign_in_continue":"Sign in to continue to your account","auth.create_account":"Create Account","auth.join_community":"Join our community today","auth.full_name":"Full Name","auth.email":"Email Address","auth.password":"Password","auth.confirm_password":"Confirm Password","auth.forgot_password":"Forgot password?","auth.no_account":"Don't have an account?","auth.have_account":"Already have an account?","auth.signing_in":"Signing in...","auth.creating_account":"Creating account...","auth.or_continue_with":"or continue with","auth.continue_with_google":"Continue with Google","pricing.select_platform":"Select Platform","pricing.select_service":"Select Service","pricing.enter_username":"Enter Username or Profile URL","pricing.enter_post_link":"Enter Post Link","pricing.select_quantity":"Select Quantity","pricing.custom_quantity":"Custom Quantity","pricing.min_order":"Minimum order","pricing.max_order":"Maximum order","pricing.price_per_1000":"Price per 1000","pricing.total":"Total","pricing.checkout":"Checkout","pricing.pay_now":"Pay Now","pricing.add_to_cart":"Add to Cart","pricing.instant_delivery":"Instant Delivery","pricing.high_quality":"High Quality","pricing.support_24_7":"24/7 Support","pricing.secure_payment":"Secure Payment","pricing.money_back":"Money Back Guarantee","pricing.refill_guarantee":"Refill Guarantee","service.shares":"Shares","service.subscribers":"Subscribers","service_type.followers":"Followers","service_type.likes":"Likes","service_type.views":"Views","service_type.comments":"Comments","service_type.shares":"Shares","service_type.retweets":"Retweets","service_type.subscribers":"Subscribers","platform_desc.instagram":"Boost your Instagram presence with real, engaged followers","platform_desc.tiktok":"Grow your TikTok account and reach millions of viewers","platform_desc.twitter":"Expand your reach on X with authentic engagement","platform_desc.youtube":"Grow your YouTube channel with real subscribers and views","platform_desc.facebook":"Increase your Facebook presence with genuine engagement","platform_desc.spotify":"Boost your Spotify streams and grow your music audience","platform_desc.telegram":"Grow your Telegram channel with real members","platform_desc.default":"Grow your social media presence with real engagement","live_stats.orders_today":"Orders Today","live_stats.delivered_today":"Delivered Today","live_stats.happy_customers":"Happy Customers","live_stats.total_delivered":"Total Delivered","live_stats.avg_start_time":"Avg. Start Time","live_stats.secure_payments":"Secure Payments","live_stats.support_available":"Support Available","live_stats.customer_rating":"Customer Rating","dashboard.my_orders":"My Orders","dashboard.wallet":"Wallet","dashboard.order_history":"Order History","dashboard.status":"Status","dashboard.quantity":"Quantity","dashboard.price":"Price","dashboard.current_balance":"Current Balance","status.pending":"Pending","status.processing":"Processing","status.completed":"Completed","status.cancelled":"Cancelled","status.canceled":"Cancelled","status.refunded":"Refunded","status.partial":"Partial","status.in_progress":"In Progress","status.queued":"Processing","status.awaiting_verification":"Awaiting Verification","status.paid":"Paid","status.failed":"Failed","status.payment_failed":"Payment Failed","dashboard.report_error":"Report Error!","refund.title":"Refund Request","refund.subtitle":"Request a refund or free refill","refund.order_info":"Order Information","refund.service":"Service:","refund.order_quantity":"Order Quantity:","refund.price":"Price:","refund.order_id":"Order ID:","refund.why_refund":"Why do you want a refund?","refund.reason_not_completed":"My order was not completed","refund.reason_decreased":"My order arrived but decreased","refund.reason_not_satisfied":"I am not satisfied","refund.what_would_you_like":"What would you like?","refund.want_free_refill":"I want a free refill","refund.want_money_refund":"I
1030want a money refund","refund.not_eligible_for_money_refund":"This order was paid with refund balance and is not eligible for another money refund. You can still request a free refill.","refund.drop_amount":"Drop Amount","refund.enter_drop_amount":"Enter the amount that dropped","refund.drop_amount_hint":"Enter the number that dropped from your order","refund.free_refill":"Free Refill","refund.submitting":"Submitting...","refund.processing":"Processing...","refund.refund_button":"Refund","refund.success_title":"Refund Completed!","refund.wallet_credited":"Added to Wallet Balance","refund.new_balance":"New Balance","refund.wallet_info_title":"Use Your Balance","refund.wallet_info_message":"Your refund has been credited to your wallet balance. You can use it to purchase any product or service on our platform.","refund.thank_you":"Thank you for your understanding. We appreciate your business!","refund.close":"Close","refund.refill_policy_title":"Refill Policy","refund.refill_policy_desc":"You can request a refill once every 24 hours per order. Our team will review your request and process it within 24-48 hours.","refund.refill_warning_title":"Important Warning","refund.refill_warning_desc":"Refill operations cannot be performed on accounts where the username or link URL has been changed. Refills can only be made to the original username or post link from your order.","refund.refill_confirm_checkbox":"I confirm that the username/link has not been changed and I accept the refill policy.","refund.submit_refill_request":"Submit Refill Request","refund.request_refill_title":"Request Refill","refund.request_refill_subtitle":"Get compensation for drops","refund.start_count":"Start Count","refund.purchased_quantity":"Purchased Quantity","refund.expected_count_title":"Expected Count Calculation","refund.expected_count":"Expected Count","refund.expected_count_info":"If your current count has dropped below this number, your refill request will be processed.","refund.current_follower_count":"Your Current Follower Count","refund.enter_current_count":"Enter your current follower count","refund.current_count_hint":"Enter the current number of followers on your account","refund.too_many_followers":"You have more followers than expected. Refill cannot be applied.","refund.calculated_drop":"Calculated Drop Amount","packages.for_members_discount":"For Members -50%","category.followers":"Followers","category.likes":"Likes","category.views":"Views","category.shares":"Shares","category.retweets":"Retweets","category.instant_delivery":"Instant delivery","category.money_back_title":"30-Day Money Back Guarantee","category.money_back_desc":"100% satisfaction or full refund, no questions asked","category.member_discount":"Member Discount","input.post_link":"Post Link","input.enter_post_link":"Enter the post link","input.paste_full_link":"Paste the full link to your post","input.profile_link":"Profile Link","input.enter_profile_link":"Enter your profile link","input.paste_profile_link":"Paste the full link to your profile or channel","input.video_link":"Video Link","input.enter_video_link":"Enter the video link","input.paste_video_link":"Paste the full link to your video","input.channel_link":"Channel Link","input.enter_channel_link":"Enter your channel URL","input.paste_channel_link":"Paste the full link to your channel","input.username":"Username","input.enter_username":"Enter your username","input.no_password_required":"No password required, just your public username","social.just_bought":"just bought","social.min_ago":"min ago","payment.select_method":"Select Payment Method","payment.card":"Credit/Debit Card","payment.paypal":"PayPal","payment.crypto":"Cryptocurrency","payment.wallet":"Wallet Balance","payment.processing":"Processing payment...","payment.success":"Payment successful!","payment.failed":"Payment failed","payment.try_again":"Try Again","payment.email_sent_title":"Order details have been sent to your email","payment.email_sent_subtitle":"Please check your spam folder if you don't see it in your inbox","support.title":"Support Center","support.new_ticket":"New Ticket","support.my_tickets":"My Tickets","supp
1030ort.subject":"Subject","support.message":"Message","support.send":"Send","support.no_tickets":"No support tickets","support.reply":"Reply","support.close_ticket":"Close Ticket","announcements.title":"Announcements","announcements.no_announcements":"No announcements","announcements.check_later":"Check back later for updates","announcements.mark_read":"Mark Read","announcements.mark_all_read":"Mark All as Read","announcements.stay_updated":"Stay updated with the latest news","common.loading":"Loading...","common.error":"Error","common.success":"Success","common.cancel":"Cancel","common.confirm":"Confirm","common.save":"Save","common.delete":"Delete","common.edit":"Edit","common.close":"Close","common.search":"Search","common.filter":"Filter","common.refresh":"Refresh","common.view_all":"View All","common.learn_more":"Learn More","common.get_started":"Get Started","common.contact_us":"Contact Us","common.back":"Back","common.next":"Next","common.submit":"Submit","common.continue":"Continue","footer.terms":"Terms of Service","footer.privacy":"Privacy Policy","footer.refund":"Refund Policy","footer.all_rights":"All rights reserved","whatsapp.contact":"Contact via WhatsApp","validation.required":"This field is required","validation.invalid_email":"Invalid email address","validation.password_min":"Password must be at least 6 characters","validation.password_match":"Passwords do not match","validation.invalid_url":"Invalid URL","validation.min_quantity":"Quantity is below minimum","validation.max_quantity":"Quantity exceeds maximum","time.just_now":"Just now","time.minutes_ago":"minutes ago","time.hours_ago":"hours ago","time.days_ago":"days ago","time.today":"Today","time.yesterday":"Yesterday","home.trusted_by":"Trusted by 500,000+ customers who buy followers","home.hero_title":"Buy Followers Instantly","home.hero_subtitle":"#1 Trusted Service","home.hero_description":"Buy Instagram followers, buy TikTok followers, and grow your social media fast. When you buy followers from us, you get real, high-quality followers with instant delivery. 30-day money-back guarantee, no password required.","home.start_growing":"Buy Followers Now","home.view_pricing":"View Packages","home.money_back_title":"30-Day Money Back Guarantee","home.money_back_subtitle":"100% satisfaction when you buy followers","home.exclusive_benefits":"Exclusive Member Benefits","home.win_free_balance":"Win Free Balance Every Day!","home.promo_description":"Sign up now and get access to our exclusive daily games where you can win free balance to buy followers. Spin the Lucky Wheel or open Mystery Boxes to earn credits!","home.lucky_wheel":"Lucky Wheel","home.free_daily_spin":"Free daily spin","home.mystery_box":"Mystery Box","home.unlock_rewards":"Unlock rewards","home.100_free":"100% FREE","home.no_purchase":"No purchase required","home.signup_free":"Sign Up Free","home.join_members":"Join 500,000+ who buy followers","home.choose_service":"Buy Followers for Any Platform","home.select_platform":"Buy Instagram followers, buy TikTok followers, or buy followers for any platform","home.why_choose_us":"Why Buy Followers From Us?","home.why_description":"The #1 trusted place to buy followers with instant delivery and real results","home.instant_delivery":"Instant Delivery","home.instant_delivery_desc":"Buy followers and see results within minutes. Fast, reliable service.","home.high_quality":"Real Followers","home.high_quality_desc":"Buy real followers with profile pictures and activity. No bots.","home.secure_safe":"100% Safe to Buy","home.secure_safe_desc":"When you buy followers from us, your account is 100% safe. No password needed.","home.support_247":"24/7 Support","home.support_247_desc":"Get help anytime when you buy followers from our platform","home.refill_guarantee":"Refill Guarantee","home.refill_guarantee_desc":"Free refills after you buy followers if you experience drops","home.best_prices":"Best Prices","home.best_prices_desc":"Buy followers at the lowest prices without compromising quality","home.ready_to_grow":"Ready to Buy Followers?","home.join_thousands":"Join thousands who buy Instagram followers and TikTok followers from us daily","home.get_started_now":"Buy Followers Now","platform.premium_services":"Buy Followers - Premium Services","platform.choose_platform":"Buy Instagram Followers & TikTok Followers","platform.smm_hero_title":"#1 SMM PANEL IN THE WORLD!","platform.smm_hero_subtitle":"SMM Follx","platform.enterprise_desc":"Buy followers for Instagram, TikTok, YouTube and more. Instant delivery, real followers, best prices.","platform.available_services":"Services to Buy","platform.get_started":"Buy Now","platform.secure_delivery":"Safe to Buy Followers","platform.no_password":"No Password Required","platform.safe_secure":"100% safe when you buy followers","platform.instant_start":"Instant Delivery","platform.within_minutes":"Buy followers, get them in minutes","platform.premium_quality":"Real Followers","platform.real_users":"Buy real, active followers","platform.why_choose":"Why Buy Followers From Follx?","platform.trusted_platform":"The #1 trusted platform to buy Instagram followers and TikTok followers","features.instant_delivery":"Instant Delivery","features.instant_delivery_desc":"Buy followers and see results within minutes. Fast, reliable service guaranteed.","features.secure":"100% Safe to Buy","features.secure_desc":"Buy followers safely with bank-level encryption. No password required, ever.","features.premium_quality":"Real Followers","features.premium_quality_desc":"Buy real followers, not bots. Just genuine, active accounts with real engagement.","features.support_247":"24/7 Support","features.support_247_desc":"Get help anytime when you buy followers. Our team is always ready to assist.","stats.happy_customers":"Customers Buy Followers","stats.orders_delivered":"Followers Delivered","stats.satisfaction":"Satisfaction Rate","stats.years_business":"Years Helping You Buy Followers","guarantee.title":"30-Day Money Back Guarantee","guarantee.description":"Buy followers with confidence. We offer a full refund within 30 days if you're not completely satisfied with your purchase. No questions asked.","guarantee.no_risk":"Risk-Free to Buy","guarantee.no_risk_desc":"Buy followers risk-free","guarantee.real_results":"Real Followers","guarantee.real_results_desc":"Buy real followers guaranteed","guarantee.secure":"100% Safe","guarantee.secure_desc":"Safe to buy followers","guarantee.button":"Buy Followers Risk-Free","faq.title":"Frequently Asked Questions About Buying Followers","faq.description":"Everything you need to know before you buy followers","cta.title":"Ready to Buy Followers?","cta.description":"Join thousands who buy Instagram followers and TikTok followers from us every day","cta.button":"Buy Followers Now","dashboard.title":"My Dashboard","dashboard.subtitle":"Track orders & manage wallet","dashboard.available_balance":"Available Balance","dashboard.add_funds":"Add Funds","dashboard.total":"Total","dashboard.active":"Active","dashboard.done":"Done","dashboard.orders_tab":"Orders","dashboard.wallet_tab":"Wallet","dashboard.all_time":"All time","dashboard.today":"Today","dashboard.last_7_days":"Last 7 Days","dashboard.this_month":"This Month","dashboard.custom":"Custom","dashboard.custom_date_range":"Custom Date Range","dashboard.from":"From","dashboard.to":"To","dashboard.apply_filter":"Apply Filter","dashboard.clear_filter":"Clear filter","dashboard.loading_orders":"Loading orders...","dashboard.no_orders":"No orders yet","dashboard.no_orders_desc":"Your order history will appear here once you place your first order.","dashboard.no_orders_period":"No orders in this period","dashboard.no_orders_period_desc":"Try selecting a different date range to see your orders.","dashboard.orders_count":"orders","dashboard.scroll_more":"Scroll to see more","dashboard.target":"Target","dashboard.payment":"Payment","dashboard.date":"Date","dashboard.order_id":"Order ID","dashboard.start_count":"Start Count","dashboard.remains":"Remains","dashboard.request_refill":"Request Refill","dashboard.refill_pending":"Refill Pending","dashboard.refill_processing":"Refill Processing","dashboard.refill_blocked":"Refill Not Available","dashboard.requested":"Requested","dashboard.wallet_balance":"Wallet Balance","dashboard.gift_balance":"Game Balance","dashboard.gift_credits":"Credits Earned from Games","dashboard.gift_order":"Gift","dashboard.transfer_wallet":"Transfer to Wallet","dashboard.refund_credited":"Refund Credited","dashboard.reason":"Reason","dashboard.note":"Note","dashboard.refund_wallet_note":"Refund amount has been credited to your wallet balance. You can use this balance for future orders.","dashboard.quick_actions":"Quick Actions","dashboard.deposit":"Deposit","dashboard.deposit_desc":"Add funds via PayPal Checkout","dashboard.transaction_history":"Transaction History","dashboard.transactions_count":"transactions","dashboard.no_transactions":"No transactions yet","dashboard.no_transactions_desc":"Your transaction history will appear here","dashboard.filter_all":"All","dashboard.filter_deposits":"Deposits","dashboard.filter_purchases":"Purchases","dashboard.filter_refunds":"Refunds","dashboard.tx_wallet_deposit":"Wallet Deposit","dashboard.tx_purchase":"Purchase","dashboard.tx_refund":"Refund","dashboard.tx_bonus_credit":"Bonus Credit","dashboard.tx_admin_debit":"Balance Adjustment","dashboard.tx_admin_debit_notice":"Adjusted by admin","dashboard.tx_balance_before":"Before","dashboard.tx_card":"Card","dashboard.tx_balance":"Balance","dashboard.tx_paypal":"PayPal","dashboard.tx_completed":"Completed","dashboard.tx_failed":"Failed","dashboard.tx_balance_after":"Balance","dashboard.no_filtered_transactions":"No transactions foun
1030d","dashboard.add_funds_title":"Add Funds","dashboard.add_funds_desc":"Secure payment with credit or debit card","dashboard.amount_usd":"Amount (USD)","dashboard.enter_amount":"Enter amount","dashboard.min_max":"Minimum: $5 | Maximum: $10,000","dashboard.amount_to_add":"Amount to add:","dashboard.cardholder_name":"Cardholder Name","dashboard.card_number":"Card Number","dashboard.expiry_date":"Expiry Date","dashboard.cvv":"CVV","dashboard.processing":"Processing...","dashboard.enter_min_amount":"Enter an amount of $5 or more to continue","dashboard.secure_payment":"Secure payment processing. Wallet balance can only be used to purchase services on our platform.","dashboard.refill_title":"Request Refill","dashboard.refill_desc":"Get compensation for drops","dashboard.order_info":"Order Information","dashboard.service":"Service:","dashboard.order_quantity":"Order Quantity:","dashboard.drop_amount":"Drop Amount","dashboard.drop_placeholder":"Enter the amount that dropped","dashboard.drop_help":"Enter the number of followers/likes that dropped from your order","dashboard.refill_policy":"Refill Policy","dashboard.refill_policy_text":"You can request a refill once every 24 hours per order. Our team will review your request and process it within 24-48 hours.","dashboard.submit_refill":"Submit Refill Request","dashboard.submitting":"Submitting...","dashboard.funds_added":"Funds Added!","dashboard.wallet_topped":"Your wallet has been topped up successfully","dashboard.transaction_details":"Transaction Details","dashboard.amount_added":"Amount Added","dashboard.new_balance":"New Balance","dashboard.payment_method":"Payment Method","dashboard.credit_card":"Credit Card","dashboard.completed":"Completed","dashboard.ready_to_use":"Ready to Use","dashboard.ready_to_use_desc":"Your funds are now available. Use your balance to purchase any service instantly!","dashboard.verified":"Verified","dashboard.credited":"Credited","dashboard.transaction_recorded":"Your transaction has been recorded securely","dashboard.pay":"Pay","package.choose_service":"Choose the service you want to buy","package.fast_delivery":"Fast & Secure Delivery","package.instant_delivery":"Buy followers with instant delivery","package.select":"Select","package.packages":"Buy Followers Packages","package.choose_package":"Choose the perfect package to buy followers","package.buy_now":"Buy Now","package.best_value":"Best Value","package.instant_start":"Instant Start","package.real_active":"Real Active","trust.why_choose_us":"WHY CHOOSE US","trust.happy_customers":"500K+ Happy Customers","trust.rating":"4.9/5 Rating","trust.real_active_users":"Real & Active Users","trust.live_support":"24/7 Live Support","trust.based_on_reviews":"Based on 50,000+ reviews","trust.secure":"100% Secure","trust.ssl_protected":"SSL Protected","trust.no_password":"No Password","trust.required":"Required","trust.money_back":"Money Back","trust.guarantee":"Guarantee","trust.instant":"Instant","trust.delivery":"Delivery","package.safe":"100% Safe to Buy","package.premium_quality":"Real Followers","package.money_back":"30-Day Money Back Guarantee","package.no_drop_lifetime":"No Drop (Life Time)","package.satisfaction":"Buy followers with confidence - 100% satisfaction or full refund","package.back":"Back","service.followers":"Buy Followers","service.likes":"Buy Likes","service.views":"Buy Views","service.comments":"Buy Comments","service.retweets":"Buy Retweets","checkout.service":"Service","checkout.package":"Package","checkout.details":"Details","checkout.account":"Account","checkout.payment":"Payment","checkout.checkout":"Checkout","checkout.complete_order":"Complete Your Order","checkout.order_summary":"Order Summary","checkout.platform":"Platform","checkout.quantity":"Quantity","checkout.total":"Total","checkout.profile_verified":"Profile Verified","checkout.profile_verified_desc":"has been verified successfully","checkout.post_verified":"Post Successfully Verified","checkout.account_required":"Account Required","checkout.proceed_payment":"Proceed to Secure Payment","checkout.credit_card_subtitle":"Pay securely with Credit or Debit Card","checkout.continue_account":"Continue","checkout.payp
1030al_checkout":"PayPal Checkout","checkout.guest_fields_required":"Please enter your name and email address","checkout.no_password":"No Password","checkout.instant_delivery":"Instant Delivery","checkout.secure_payment":"Secure Payment","checkout.ssl_encrypted":"256-bit SSL Encrypted","checkout.secure":"100% Secure","checkout.choose_payment":"Choose Payment Method","checkout.your_wallet":"Your Wallet Balance:","checkout.your_gift_balance":"Your Game Balance:","checkout.payment_method":"Payment Method","checkout.pay_with_card":"Pay with Card","checkout.pay_with_wallet":"Pay with Wallet","checkout.pay_with_crypto":"Pay with Crypto","checkout.pay_with_gift":"Pay with Game Balance","checkout.wallet_balance":"Wallet Balance","checkout.gift_balance":"Game Balance","checkout.pay_gift_button":"Pay with Game Balance","checkout.available":"Available","checkout.insufficient_balance":"Insufficient balance","checkout.add_funds":"Add Funds","checkout.need_account":"You'll need to create an account or sign in to complete your purchase and access our 30-Day Money Back Guarantee.","checkout.sign_in":"Sign In","checkout.create_account":"Create Account","checkout.processing":"Processing...","checkout.complete_purchase":"Complete Purchase","checkout.target":"Target","checkout.link_payment_description":"You will be redirected to the payment page to complete your order. After payment is completed, your order will be processed by the admin.","checkout.link_payment_go":"Go to Payment Page","checkout.link_payment_note":"After payment is confirmed, your order will be processed automatically.","checkout.link_payment_error":"An error occurred. Please try again.","checkout.link_payment_review_title":"Payment Pending","checkout.link_payment_review_subtitle":"Once your payment is confirmed, your order will be processed automatically.","checkout.link_payment_review_badge":"Verifying","checkout.link_payment_review_info_title":"Automatic Payment Verification","checkout.link_payment_review_info_desc":"Your payment is being automatically verified by our system. Once confirmed, your order will start processing immediately. You can track the progress in your dashboard.","checkout.open_in_new_tab":"Open in new tab","checkout.link_payment_completed":"I have completed the payment","checkout.wallet_restricted_warning":"Warning: Due to a previous refund for {product}, you cannot place this order using your wallet balance according to our policy. Please use Stripe payment instead.","checkout.wallet_restricted_short":"Wallet restricted for {product}","checkout.wallet_restriction_modal_title":"Wallet Payment Restricted","checkout.wallet_restriction_modal_reason":"Due to a previous refund for {product}, wallet balance cannot be used for this service according to our policy.","checkout.wallet_restriction_modal_alternative":"You can complete your purchase using a credit or debit card instead. All card payments are processed securely.","checkout.wallet_restriction_modal_use_card":"Pay with Card","checkout.wallet_restriction_modal_close":"Close","affiliate.title":"Affiliate Program","affiliate.subtitle":"Start earning by promoting","affiliate.description":"Join the Follx.com affiliate program and earn commission on every successful sale. High commission rates, real-time tracking, and fast payouts.","affiliate.commission_rate":"Commission Rate","affiliate.cookie_days":"Day Cookie","affiliate.min_payout":"Min. Payout","affiliate.apply_now":"Apply Now","affiliate.high_commission":"High Commission","affiliate.high_commission_desc":"Earn 10-20% commission on every successful sale. Your rate increases as your performance improves.","affiliate.realtime_tracking":"Real-Time Tracking","affiliate.realtime_tracking_desc":"Track your clicks, registrations, and sales in real-time. Detailed reports and analytics.","affiliate.fast_payouts":"Fast Payouts","affiliate.fast_payouts_desc":"Fast payment via USDT (TRC20) or bank transfer. Reach the $50 threshold and withdraw.","affiliate.how_it_works":"How It Works","affiliate.step1_title":"Sign Up","affiliate.step1_desc":"Create a free account and apply to the affiliate program","affiliate.step2_title":"Get Your Link","affiliate.step2_desc":"Get your unique referral link and share it","affiliate.step3_title":"Promote","affiliate.step3_desc":"Promote via blog, social media, or email","affiliate.step4_title":"Earn","affiliate.step4_desc":"Earn commission on every sale and withdraw","affiliate.menu_title":"Affiliate Program","affiliate.menu_desc":"Earn by promoting","reseller.title":"SMM Panel","reseller.subtitle":"Buy at wholesale prices, sell to your customers","reseller.description":"Join our reseller program to buy services at wholesale discount prices and sell to your own customers. Automatic ordering via API integration.","reseller.discount_rate":"Discount Rate","reseller.credit_limit":"Credit Limit","reseller.api_integration":"Integration","reseller.apply_now":"Apply as Reseller","reseller.wholesale_discounts":"Wholesale Discounts","reseller.wholesale_discounts_desc":"Get 15-45% discount based on your level. More orders, more savings.","reseller.api_integration_title":"API Integration","reseller.api_integration_desc":"Integrate with your own panel. Automatic ordering, status tracking, and reporting.","reseller.credit_system":"Credit System","reseller.credit_system_desc":"Up to $10,000 credit limit for approved resellers. Pay later system.","reseller.menu_title":"SMM Panel","reseller.menu_desc":"Buy wholesale","reseller.company_name":"Company Name (Optional)","reseller.company_placeholder":"Company Name Ltd.","reseller.terms_text":"I have read and accept the reseller program terms and conditions. I commit to selling to my own customers after purchasing at wholesale prices and not violating platform rules.","reseller.application_review":"Your Application is Under Review","reseller.application_review_desc":"Your reseller application is under review. After approval, you will be able to order at wholesale prices.","reseller.awaiting_approval":"Awaiting Approval","reseller.account_suspended":"Your Account is Suspended","reseller.application_rejected":"Your Application was Rejected","reseller.contact_support":"Please contact our support team for more information.","reseller.panel_title":"SMM Panel","reseller.panel_subtitle":"Place wholesale orders and increase your earnings","reseller.balance":"Balance","reseller.used":"Used","reseller.total_orders":"Total Orders","reseller.overview":"Overview","reseller.packages_order":"Create Order","reseller.order_history":"Order History","reseller.sub_accounts":"Sub Accounts","reseller.api_access":"API Access - V2 Compatible","reseller.settings":"Settings","reseller.recent_transactions":"Recent Transactions","reseller.view_all":"View All","reseller.balance_deposit":"Balance Deposit","reseller.order":"Order","reseller.refund":"Refund","reseller.refunded":"Refunded","reseller.credit":"Credit","reseller.no_transactions":"No transactions yet","reseller.quick_stats":"Quick Statistics","reseller.total_spending":"Total Spending","reseller.average_order":"Average Order","reseller.savings":"Total Savings","reseller.next_level":"Next Level","reseller.next_level_desc":"Increase your monthly volume for more discounts.","reseller.next_level_order":"Order $1,000 more for Professional level","reseller.search_package":"Search package...","reseller.all_platforms":"All Platforms","reseller.package":"Package","reseller.quantity":"Quantity","reseller.regular_price":"Regular Price","reseller.reseller_price":"Reseller Price","reseller.saving":"Savings","reseller.action":"Action","reseller.place_order":"Place Order","reseller.download":"Download","reseller.loading_history":"Loading order history...","reseller.new_account":"New Account","reseller.active":"Active","reseller.inactive":"Inactive","reseller.no_sub_accounts":"No sub accounts yet","reseller.sub_accounts_desc":"You can create sub accounts for your customers","reseller.api_integrate":"Integrate your system with API","reseller.api_key":"API Key","reseller.api_doc":"API Documentation","reseller.base_url":"Base URL","reseller.auth_header":"Auth Header","reseller.rate_limit":"Rate Limit","reseller.view_full_docs":"View Full Documentation","reseller.api_disabled":"API Access Disabled","reseller.api_disabled_desc":"Please contact our support team for API access.","reseller.contact_support_btn":"Contact Support","reseller.api_generate_title":"Start API Access","reseller.api_generate_desc":"Generate an API key to integrate your systems. Automate your orders, fetch service lists, and track y
1030our balance.","reseller.api_generate_btn":"Generate API Key","reseller.api_generating":"Generating...","reseller.api_instant":"Instantly Active","reseller.api_instant_desc":"Start using right away","reseller.api_secure":"Secure","reseller.api_secure_desc":"Encrypted API key","reseller.api_rate_limit_desc":"Default rate limit","reseller.level":"Level","reseller.level_benefits":"Level Benefits","reseller.discount_rate_label":"discount rate","reseller.credit_limit_label":"credit limit","reseller.priority_support":"Priority support","reseller.api_on_request":"API access (on request)","reseller.deposit_funds":"Deposit Funds","reseller.deposit_desc":"You can use one of the following methods to deposit funds.","reseller.crypto_usdt":"Crypto (USDT)","reseller.credit_debit":"Credit/Debit Card","reseller.bank_transfer":"Bank Transfer","reseller.eft_wire":"EFT / Wire","reseller.order_modal_title":"Place Order","reseller.target_label":"Target (Username / URL)","reseller.target_placeholder":"@username or URL","reseller.qty_label":"Quantity","reseller.unit_price":"Unit Price","reseller.total":"Total","reseller.error_not_logged_in":"Please log in to continue.","reseller.error_session_expired":"Your session has expired. Please log in again.","reseller.error_already_registered":"You are already registered as a reseller.","reseller.error_registration_failed":"Registration failed. Please try again.","affiliate.register_title":"Register as Affiliate","affiliate.wallet_address":"USDT Wallet Address (TRC20)","affiliate.terms_text":"I have read and accept the affiliate program terms and conditions. I commit to not engaging in misleading promotions, not sending spam, and n
1030ot violating platform rules.","affiliate.application_review":"Your Application is Under Review","affiliate.application_review_desc":"Your affiliate application has been received. Our team will review and get back to you shortly. This process usually takes 24-48 hours.","affiliate.awaiting_approval":"Awaiting Approval","affiliate.account_suspended":"Your Account is Suspended","affiliate.application_rejected":"Your Application was Rejected","affiliate.contact_support":"Please contact our support team for more information.","affiliate.panel_title":"Affiliate Panel","affiliate.panel_subtitle":"Track your promotion performance and manage your earnings","affiliate.referral_link":"Your Referral Link","affiliate.copy":"Copy","affiliate.copied":"Copied!","affiliate.commission":"Commission","affiliate.cookie_duration":"Cookie Duration","affiliate.lifetime_attribution":"Lifetime Attribution","affiliate.total_clicks":"Total Clicks","affiliate.signups":"Signups","affiliate.conversions":"Conversions","affiliate.conversion_rate":"Conversion Rate","affiliate.pending":"Pending","affiliate.paid":"Paid","affiliate.withdrawable":"Withdrawable","affiliate.withdraw":"Withdraw","affiliate.minimum":"Minimum","affiliate.overview":"Overview","affiliate.conversions_tab":"Conversions","affiliate.payouts":"Payouts","affiliate.settings":"Settings","affiliate.performance_chart":"Performance Chart","affiliate.last_7_days":"Last 7 Days","affiliate.last_30_days":"Last 30 Days","affiliate.last_90_days":"Last 90 Days","affiliate.no_data":"No data yet","affiliate.quick_stats":"Quick Statistics","affiliate.total_revenue_generated":"Total Revenue Generated","affiliate.average_order":"Average Order","affiliate.commission_rate_label":"Commission Rate","affiliate.next_level":"Next Level","affiliate.current_level":"Current Level","affiliate.conversions_needed":"conversions needed for next level","affiliate.highest_level":"You are at the highest level!","affiliate.conversion_history":"Conversion History","affiliate.download":"Download","affiliate.date":"Date","affiliate.type":"Type","affiliate.order_amount":"Order Amount","affiliate.commission_amount":"Commission","affiliate.status":"Status","affiliate.purchase":"Sale","affiliate.signup":"Signup","affiliate.status_pending":"Pending","affiliate.status_approved":"Approved","affiliate.status_paid":"Paid","affiliate.status_rejected":"Rejected","affiliate.no_conversions":"No conversions yet","affiliate.no_conversions_desc":"Share your referral link to start earning","affiliate.payout_history":"Payout History","affiliate.amount":"Amount","affiliate.method":"Method","affiliate.transaction_id":"Transaction ID","affiliate.crypto_trc20":"USDT (TRC20)","affiliate.status_processing":"Processing","affiliate.status_completed":"Completed","affiliate.no_payouts":"No payout requests yet","affiliate.payout_method":"Payout Method","affiliate.crypto_option":"Crypto (USDT TRC20)","affiliate.bank_transfer":"Bank Transfer","affiliate.payout_change_hint":"Contact support to change payout method","affiliate.wallet_address_label":"Wallet Address","affiliate.affiliate_code":"Affiliate Code","affiliate.important_info":"Important Information","affiliate.min_payout_info":"Minimum payout amount:","affiliate.commission_active_info":"Commissions become active after sale approval","affiliate.payout_schedule":"Payouts are processed every Friday","affiliate.self_referral_forbidden":"Self-referral is strictly forbidden","affiliate.payout_request":"Payout Request","affiliate.withdraw_amount":"Withdrawal Amount","affiliate.withdrawable_amount":"Withdrawable:","affiliate.payout_address":"Payout Address:","affiliate.request_payout":"Request Payout","affiliate.withdraw_settings":"Withdraw Settings","affiliate.trc20_network_hint":"Make sure to enter a valid TRC20 network address","affiliate.saved":"Saved!","affiliate.save_wallet":"Save Wallet Address","affiliate.add_wallet_first":"Please add your wallet address in Settings first","reseller.quick_order_title":"QUICK ORDER FORM","reseller.new_order":"New Order","reseller.favorites_tab":"Favorites","reseller.category":"Category","reseller.select_category":"Select category...","reseller.service":"Service","reseller.select_service":"Select service...","reseller.link":"Link","reseller.enter_quantity":"Enter quantity","reseller.amount":"Amount","reseller.complete_order":"Complete Order","reseller.price_per_1000":"Price per 1000:","reseller.per_minute_delivery":"Per minute delivery:","reseller.avg_speed":"Avg. Speed:","reseller.speed_varies":"Gradual","reseller.min_delivery":"Minimum Delivery:","reseller.daily_max_delivery":"Daily maximum delivery:","reseller.max_delivery":"Maximum Delivery:","reseller.service_description":"Description","reseller.no_services":"No services available yet","reseller.contact_admin":"Contact admin to sync provider services","reseller.no_favorites":"No favorite services yet","reseller.add_favorites":"Add your frequently used services to favorites","reseller.insufficient_balance":"Insufficient balance","reseller.quantity_between":"Quantity must be between","reseller.and":"and","reseller.order_failed":"Failed to place order","bank_transfer.title":"Bank Transfer","bank_transfer.subtitle":"Pay via bank transfer to one of our accounts","bank_transfer.select_region":"Select Your Region","bank_transfer.region_us":"United States","bank_transfer.region_uk":"United Kingdom","bank_transfer.region_eu":"Europe","bank_transfer.region_tr":"Turkey","bank_transfer.bank_name":"Bank Name","bank_transfer.account_holder":"Account Holder","bank_transfer.account_number":"Account Number","bank_transfer.routing_number":"Routing Number","bank_transfer.sort_code":"Sort Code","bank_transfer.swift_code":"SWIFT/BIC Code","bank_transfer.iban":"IBAN","bank_transfer.currency":"Currency","bank_transfer.additional_info":"Additional Information","bank_transfer.amount_to_send":"Amount to Send","bank_transfer.copy":"Copy","bank_transfer.copied":"Copied!","bank_transfer.i_have_paid":"I Have Made the Payment","bank_transfer.submitting":"Submitting...","bank_transfer.pending_title":"Payment Under Review","bank_transfer.pending_message":"Your payment is being automatically reviewed by our system. Once the transfer is confirmed in our bank account, your order will be processed automatically.","bank_transfer.pending_note":"This usually takes a few minutes to a few hours depen
1030ding on your bank.","bank_transfer.or_pay_with_bank":"or pay with Crypto","bank_transfer.no_accounts":"No bank accounts available for this region","bank_transfer.error":"An error occurred. Please try again.","bank_transfer.back_to_regions":"Back to regions","bank_transfer.instant_automatic":"Instant & Automatic","bank_transfer.instant_automatic_desc":"Your payment is verified automatically. Your order starts processing instantly once confirmed.","bank_transfer.contact_info":"Contact Information","bank_transfer.full_name_label":"Full Name (Bank Holder Name)","bank_transfer.full_name_placeholder":"Full Name","bank_transfer.email_label":"E-Mail","bank_transfer.holder_name_title":"Bank Holder Name","bank_transfer.enter_holder_name":"Enter the name on your bank account","withdraw.title":"Withdraw Funds","withdraw.subtitle":"Withdraw your game balance to your bank account","withdraw.select_region":"Select Your Bank Region","withdraw.region_us":"United States","withdraw.region_uk":"United Kingdom","withdraw.region_eu":"Europe","withdraw.holder_name":"Account Holder Name","withdraw.holder_name_placeholder":"Enter full name on account","withdraw.account_number":"Account Number","withdraw.account_number_placeholder":"Enter account number","withdraw.routing_number":"Routing Number","withdraw.routing_number_placeholder":"Enter routing number","withdraw.sort_code":"Sort Code","withdraw.sort_code_placeholder":"Enter sort code","withdraw.iban":"IBAN","withdraw.iban_placeholder":"Enter IBAN","withdraw.amount":"Withdrawal Amount","withdraw.amount_placeholder":"Enter amount","withdraw.available_balance":"Available Balance","withdraw.min_amount":"Minimum withdrawal: $1.00","withdraw.submit":"Withdraw","withdraw.submitting":"Processing...","withdraw.success_title":"Withdrawal Submitted","withdraw.success_message":"Your withdrawal request has been submitted and is pending review. You will be notified once it is processed.","withdraw.insufficient_balance":"Insufficient game balance","withdraw.error":"An error occurred. Please try again.","withdraw.back_to_regions":"Back to regions","withdraw.bank_details":"Bank Details","withdraw.history":"Withdrawal History","withdraw.no_history":"No withdrawal history yet","withdraw.no_withdrawals":"No withdrawals yet","withdraw.no_withdrawals_desc":"Your withdrawal requests will appear here","withdraw.status_pending":"Pending","withdraw.status_completed":"Completed","withdraw.status_rejected":"Rejected","withdraw.btn":"Withdraw","withdraw.close":"Close","crypto.contact_info":"Contact Information","crypto.contact_info_desc":"Please enter your email to receive payment updates","crypto.email_required":"Please enter your email address to continue","crypto.payment_title":"Crypto Payment","crypto.select_wallet":"Select Crypto Wallet","crypto.choose_wallet":"Choose a wallet to complete your payment","crypto.you_save":"You save","crypto.amount_to_send":"Amount to Send","crypto.refresh_price":"Refresh Price","checkout.secure_one_time":"Secure one-time purchase","checkout.platform_label":"Platform","checkout.service_label":"Service","checkout.quantity_label":"Quantity","checkout.ssl_encrypted_short":"SSL Encrypted","checkout.instant_delivery_short":"Instant Delivery","checkout.auto_refill":"Auto Refill","checkout.total_usd":"Total · USD","checkout.pay_wallet":"Pay ${amount} with Wallet","checkout.wallet_need_more":"Wallet: ${balance} (need ${needed} more)","checkout.pay_gift":"Pay ${amount} with {label}","checkout.or":"or","checkout.live_support":"24/7 Live Support","checkout.chat_whatsapp":"Chat with us on WhatsApp","checkout.off_25":"25% OFF","checkout.swipe_explore":"Swipe to explore","checkout.from_reviews":"from {count}+ reviews","hero.mobile_line1":"Super Fast 5min","hero.mobile_line2":"Instant Delivery","home.no_password":"No Password","home.read_blog":"Read Our Blog","home.blog_desc":"Get expert tips and guides on how to grow your social media presence safely and effectively.","home.visit_blog":"Visit Our Blog","home.social_growth_title":"Social Media Growth Services","home.social_growth_desc":"Accelerate your online presence with our trusted growth solutions. Every service is backed by real delivery, 24/7 support, and a satisfaction guarantee.","home.smm_solutions_title":"Professional SMM Solutions","home.smm_solutions_de
1030sc":"Whether you are building your own SMM panel or looking for the most cost-effective provider, our professional solutions power thousands of businesses worldwide.","home.become_reseller":"Become an SMM Panel Reseller","home.reseller_desc":"Looking to start your own SMM business? Our reseller program offers wholesale pricing with up to 80% profit margins.","footer.brand":"Follx","footer.brand_desc":"The #1 trusted platform to buy followers. Buy Instagram followers, buy TikTok followers, and grow your social media presence with real followers.","footer.buy_followers":"Buy Followers","footer.resources":"Resources","footer.legal":"Legal","footer.blog_guides":"Blog & Guides","footer.customer_reviews":"Customer Reviews","footer.contact":"Contact","footer.copyright":"2025 Follx. All rights reserved.","footer.money_back":"30-Day Money Back Guarantee","footer.buy_instagram":"Buy Instagram Followers","footer.buy_tiktok":"Buy TikTok Followers","footer.buy_youtube":"Buy YouTube Subscribers","footer.buy_likes_views":"Buy Likes & Views","footer.contact_label":"Contact:","footer.ssl_encrypted":"SSL Encrypted","footer.seo_desc":"Buy followers from Follx - the most trusted service to buy Instagram followers and buy TikTok followers online. When you buy followers from us, you get real, high-quality followers with instant delivery. Safe, secure, and satisfaction guaranteed.","footer.contact_us":"Contact Us","verify.enter_username":"Enter your username","verify.username_placeholder":"@username","verify.verify_profile":"Verify Profile","verify.verifying":"Verifying...","verify.verified":"Profile Verified","verify.profile_found":"Profile Found","verify.followers":"Followers","verify.following":"Following","verify.posts":"Posts","verify.subscribers":"Subscribers","verify.views":"Views","verify.members":"Members","verify.is_private":"This account is private","verify.private_warning":"Private accounts cannot receive followers. Please make your account public first.","verify.confirm_profile":"Yes, this is my profile","verify.not_my_profile":"Not my profile","verify.enter_post_link":"Enter the post link","verify.post_link_placeholder":"Paste the full post URL","verify.verify_post":"Verify Post","verify.post_verified":"Post Verified","verify.enter_video_link":"Enter the video link","verify.video_link_placeholder":"Paste the full video URL","verify.verify_video":"Verify Video","verify.video_verified":"Video Verified","verify.enter_channel_link":"Enter the channel link","verify.channel_link_placeholder":"Paste the full channel URL","verify.verify_channel":"Verify Channel","verify.channel_verified":"Channel Verified","verify.enter_server_link":"Enter the server invite link","verify.server_link_placeholder":"Paste the Discord invite link","verify.verify_server":"Verify Server","verify.server_verified":"Server Verified","verify.likes":"Likes","verify.comments":"Comments","verify.cancel":"Cancel","verify.continue":"Continue","verify.try_again":"Try Again","verify.error_not_found":"Profile not found. Please check the username and try again.","verify.error_generic":"Verification failed. Please try again.","verify.safe_secure":"Your account information is safe & secure","verify.no_password_needed":"We never ask for your password","verify.about":"About","verify.bio":"Bio","verify.caption":"Caption","verify.confirm_channel":"Confirm this is your channel to continue.","verify.confirm_video":"Confirm this is your video to continue.","verify.copy_video_link":"Copy video link from the app and paste it here","verify.description":"Description","verify.discord_invite_link":"Discord Invite Link","verify.duration":"Duration","verify.enter_without_at":"Without @ symbol","verify.facebook_page_url":"Facebook Page URL","verify.facebook_post_url":"Facebook Post URL","verify.fast":"Fast","verify.instagram_post_url":"Instagram Post URL","verify.member_discount":"Member Discount","verify.offline":"Offline","verify.online":"Online","verify.order_summary":"Order Summary","verify.paste_post_link":"Paste the full post URL here","verify.platform":"Platform","verify.post_url":"Post URL","verify.public_only":"Public Only","verify.quantity":"Quantity","verify.security_notice":"Your account information is safe & secure. We never ask for your password.","verify.service":"Service","verify.shares":"Shares","verify.signup_discount_title":"Sign up for member discounts","verify.telegram_channel_link":"Telegram Channel Link","verify.tiktok_username":"TikTok Username","verify.tiktok_video_url":"TikTok Video URL","verify.total":"Total","verify.type":"Type","verify.video_eligible":"This video is eligible for the selected service.","verify.video_url_verified":"Video URL verified and accepted.","verify.profile_verified_video_accepted":"Profile verified â video accepted for the selected service.","verify.videos":"Videos","verify.viewers":"Viewers","verify.youtube_channel":"YouTube Channel URL or @handle","verify.youtube_video_link":"YouTube Video URL","verify.twitch_username":"Twitch Username","verify.verify_spotify_playlist":"Verify Playlist","verify.enter_spotify_url":"Enter your Spotify playlist URL","verify.spotify_playlist_url":"Spotify Playlist URL","verify.spotify_url_required":"Please enter a Spotify playlist URL","verify.spotify_url_hint":"Paste the full Spotify playlist link","verify.verify_playlist":"Verify Playlist","verify.playlist_found":"Playlist verified successfully!","verify.tracks":"Tracks","storefront.hero_desc":"Buy followers for Instagram, TikTok, YouTube and more. Instant delivery, real followers, best prices.","storefront.hero_line1":"Buy Instagram Followers","storefront.hero_line2":"& TikTok Followers","storefront.instagram_growth":"Instagram Growth","storefront.real_high_quality_services":"Real & High-Quality Services","storefront.limited_time_offer":"Limited Time Offer","storefront.todays_deals":"Today's Deal
1030s!","storefront.off":"OFF","storefront.real_high_quality":"Real & High-Quality","storefront.mixed":"Mixed","storefront.premium_quality":"Premium Quality","storefront.natural_delivery":"Natural Delivery","storefront.super_fast_delivery":"Super Fast 5min Instant Delivery","storefront.active_followers":"Active Followers","storefront.vip_support":"24/7 VIP Support","storefront.signup_discount":"Sign Up & 50% OFF","storefront.live_support_247":"24/7 Live Support","storefront.tiktok_delivery_rate":"800-1,000 followers/day for account safety","storefront.youtube_delivery_rate":"100-150 per day for channel safety","home.support_24_7":"24/7 Support","tracker.title":"Track Order","tracker.subtitle":"Check your order status in real-time","tracker.placeholder":"Username or post link...","tracker.no_orders":"No orders found","tracker.try_different":"Try a different username or link","tracker.detected_orders":"Detected {count} order(s) from your device","tracker.orders_found":"{count} order(s) found","tracker.refresh":"Refresh","tracker.syncing":"Syncing...","tracker.platform":"Platform","tracker.service":"Service","tracker.quantity":"Quantity","tracker.amount":"Amount","tracker.start_count":"Start Count","tracker.date":"Date","tracker.delivery_progress":"Delivery Progress","tracker.delivered":"delivered","tracker.remaining":"remaining","tracker.target":"Target","tracker.delivery_started":"Delivery has started.","tracker.delivery_in_progress_msg":"Your order is currently being delivered","tracker.looking_up":"Looking up your recent orders...","tracker.enter_username":"Enter your username or link","tracker.detecting":"Detecting orders from your device","tracker.find_all":"We'll find all orders related to your search","tracker.admin_response":"Admin Response","tracker.payment_confirmed":"Payment Confirmed â Your order will begin shortly","tracker.waiting_queue":"Waiting in Queue â Another order is currently being processed","tracker.refill_processing":"Your refill request is being processed","tracker.refill_time":"Will be completed within 48 hours","tracker.remaining_time":"remaining","tracker.submitting":"Submitting...","tracker.request_refill":"Request Refill","tracker.processing_time":"Processing time is 48 hours","tracker.unable_connect":"Unable to connect. Please try again.","card.secure_payment":"Secure Payment","card.total_amount":"Total Amount","card.ssl_encrypted":"256-bit SSL Encrypted","card.card_number":"Card Number","card.expiry_date":"Expiry Date","card.cvv":"CVV","card.processing":"Processing Payment...","card.pay":"Pay","card.secure_checkout":"Secure checkout","card.ssl_label":"SSL encrypted","card.disclaimer":"Your payment information is encrypted and secure. By completing this payment, you agree to our terms of service.","card.invalid_number":"Please enter a valid card number","card.invalid_expiry":"Please enter a valid expiry date (MM/YY)","card.invalid_cvv":"Please enter a valid CVV","card.payment_not_completed":"Payment could not be completed","card.allow_popups":"Please allow popups for 3D Secure verification","card.payment_failed":"Payment failed","card.verification_failed":"Payment verification failed","checkout.payment_failed_retry":"Payment failed. Please try again.","checkout.insufficient_balance":"Insufficient balance. Please add funds to your wallet or choose another payment method.","checkout.insufficient_gift":"Insufficient gift balance.","checkout.payment_processing_failed":"Payment processing failed","checkout.unable_start_payment":"Unable to start payment","checkout.unable_start_retry":"Unable to start payment. Please try again.","checkout.fill_all_fields":"Please fill in all fields","checkout.private_profile_error":"Cannot process order for private Instagram profiles. Please make your profile public and try again.","checkout.private_profile_short":"Cannot process order for private Instagram profiles.","checkout.views_video_only":"Views can only be purchased for video posts. Please select a different post or service.","checkout.payment_error_title":"Payment Error","checkout.payment_error_retry":`Payment error: {error} 1031 1032Please try again.`,"checkout.generic_error":"An error occurred. Please try again.","checkout.amount_available":"{amount} available","checkout.wallet_need_more":"Need {amount} more to pay with wallet","checkout.wallet_add_funds":"Add funds to your wallet to use this option","checkout.redirect_secure":"You will be redirected to a secure payment page to complete your purchase.","checkout.payment_under_review":"Payment Under Review","checkout.review_desc":"Your payment is being verified. Your order will start automatically once confirmed.","checkout.payment_successful":"Payment Successful!","checkout.order_confirmed_desc":"Your order is confirmed and being processed.","checkout.order_details":"Order Details","checkout.username_label":"Username","checkout.order_number":"Order #","checkout.total_paid":"Total Paid","checkout.success_badge":"Success!","checkout.pending_badge":"Pending","checkout.wallet_balance_label":"Wallet Balance","checkout.pay_wallet_amount":"Pay {amount} with Wallet","checkout.pay_gift_amount":"Pay {amount} with {label}","checkout.or_divider":"OR","checkout.finby_desc":"Visa, MC, Apple Pay, Google Pay","checkout.stripe_desc":"Visa, Mastercard, Amex","checkout.credit_debit_card":"Credit/Debit Card","checkout.crypto_desc":"USDT, USDC, BTC, ETH","checkout.crypto_subtitle":"BTC, ETH, USDT & MORE","checkout.bank_desc":"USD, EUR, GBP","checkout.payoup_desc":"Visa, Mastercard","checkout.glodipay_label":"GlodiPay","checkout.glodipay_desc":"Visa, Mastercard (Global)","checkout.glodipay_secure":"Your payment is processed securely by GlodiPay","checkout.glodipay_iframe_title":"GlodiPay Card Payment","checkout.signup_discount_text":"Sign up to get this package for {discounted} instead of {original}.","checkout.add_to_wallet":"Add {amount} to Wallet","checkout.pay_now_amount":"Pay Now - {amount}","checkout.fast_secure":"Fast & secure checkout","checkout.instant_automatic":"Instant & automatic","checkout.visa_mastercard":"Visa, Mastercard","checkout.need_help":"Need help? Contact us via Support Center","checkout.apple_pay":"Apple Pay","checkout.google_pay":"Google Pay","verify.without_at":"Without @ symbol","verify.username_placeholder":"username","verify.enter_username_error":"Please enter a username","verify.network_error":"Network error. Please check your connection and try again.","verify.invalid_response":"Invalid response from server. Please try again.","verify.failed_verify":"Failed to verify profile. Please try again.","verify.invalid_format":"Invalid response format. Please try again.","verify.no_data":"Unable to verify profile. No data received.","verify.not_found":"Unable to verify profile. Username not found.","verify.private_profile":"This profile is private. Please make your profile public and try again.","verify.unex
1032pected_error":"An unexpected error occurred. Please try again.","verify.order_summary":"Order Summary","verify.off_badge":"-50% OFF","verify.total":"Total","verify.signup_unlock":"Sign up to unlock","verify.price":"price","verify.private_badge":"Private","verify.followers":"followers","verify.following":"following","verify.posts":"posts","newsletter.stay_updated":"Stay Updated","newsletter.footer_desc":"Get exclusive tips and special offers delivered to your inbox.","newsletter.thanks":"Thanks for subscribing!","newsletter.enter_email":"Enter your email","newsletter.failed":"Failed to subscribe","newsletter.error":"Something went wrong. Please try again.","newsletter.badge":"Exclusive Offers","newsletter.title":"Get 10% Off Your First Order","newsletter.desc":"Subscribe to our newsletter for exclusive discounts, tips on growing your social media, and the latest updates.","newsletter.success_title":"You're In!","newsletter.success_desc":"Check your inbox for your 10% discount code. Welcome to the Follx family!","newsletter.enter_email_full":"Enter your email address","newsletter.subscribe":"Subscribe","newsletter.privacy":"We respect your privacy. Unsubscribe at any time.","testimonials.badge":"Verified Reviews","testimonials.title":"Loved by Thousands of Customers","testimonials.desc":"See what our customers say about their experience buying followers from us.","testimonials.role_blogger":"Lifestyle Blogger","testimonials.role_ecommerce":"E-commerce Owner","testimonials.role_fitness":"Fitness Influencer","testimonials.role_music":"Music Producer","testimonials.role_travel":"Travel Blogger","testimonials.role_marketer":"Digital Marketer","testimonials.review1":"I bought Instagram followers from Follx to kickstart my new lifestyle blog. Within days, I started getting organic followers too. The social proof really works!","testimonials.review2":"Our online store needed credibility on Instagram. Buying followers from Follx was the best marketing investment we made. Sales increased by 40% after.","testimonials.review3":"As a fitness influencer, having a large following is essential for brand deals. Follx helped me reach 100K and now I work with top fitness brands.","testimonials.review4":"Getting my music heard was tough with a small following. After buying Instagram followers, my reach exploded and I got signed to a label.","testimonials.review5":"Hotels and tourism boards now reach out to me for partnerships. Follx helped build my initial audience and now I travel for free!","testimonials.review6":"I recommend Follx to all my clients. The quality of followers is great and the delivery is always fast. Best service in the market.","faq.badge":"Got Questions?","faq.title_full":"Frequently Asked Questions","faq.desc":"Everything you need to know about buying followers safely and securely.","services.buy_ig_followers":"Buy Instagram Followers","services.buy_ig_followers_desc":"Grow your Instagram audience with high-quality followers delivered instantly. Our Instagram follower packages are trusted by creators, brands, and businesses worldwide for safe, organic-looking growth.","services.buy_ig_followers_cta":"Buy Instagram followers safely and instantly","services.buy_ig_likes":"Buy Instagram Likes","services.buy_ig_likes_desc":"Boost your post engagement with real Instagram likes. Higher like counts signal credibility and help your content reach more users through the algorithm, driving organic visibility.","services.buy_ig_likes_cta":"Get real Instagram likes for your posts","services.buy_ig_views":"Buy Instagram Views","services.buy_ig_views_desc":"Maximize your Reels and video reach by purchasing Instagram views. Higher view counts attract more organic viewers and improve your content ranking on the Explore page.","services.buy_ig_views_cta":"Increase your Instagram video views today","services.buy_tiktok":"Buy TikTok Followers","services.buy_tiktok_desc":"Scale your TikTok presence with genuine followers. A larger follower count unlocks monetization features, attracts brand deals, and positions your profile for viral growth on TikTok.","services.buy_tiktok_cta":"Buy TikTok followers to grow your audience","services.buy_youtube":"Buy YouTube Subscribers","services.buy_youtube_desc":"Grow your YouTube channel with real subscribers. Meeting the 1,000 subscriber threshold unlocks YouTube monetization, and a strong subscriber base improves your channel authority.","services.buy_youtube_cta":"Purchase YouTube subscribers for channel growth","services.buy_twitter":"Buy Twitter Followers","services.buy_twitter_desc":"Strengthen your X (Twitter) profile with authentic followers. A credible follower count enhances your authority, increases tweet impressions, and builds trust with your target audience.","services.buy_twitter_cta":"Gain Twitter followers for social proof","smm.api_title":"SMM Panel API","smm.api_desc":"Integrate our powerful API into your own platform for fully automated order processing. The Follx SMM panel API supports 5,000+ services with real-time status updates and instant delivery across all major social networks.","smm.api_cta":"Explore our SMM panel API documentation","smm.cheap_title":"Cheap SMM Panel","smm.cheap_desc":"Access the most affordable SMM panel without compromising on quality. Our competitive wholesale pricing and volume discounts make Follx the go-to cheap SMM panel for resellers and agencies seeking reliable, budget-friendly services.","smm.cheap_cta":"Find the cheapest SMM panel services","smm.best_title":"Best SMM Panel","smm.best_desc":"Rated as the best SMM panel by thousands of users, Follx combines an extensive service catalog, reliable delivery speeds, and responsive support. Discover why professionals and agencies consistently rank Follx as the top SMM panel provider.","smm.best_cta":"See why Follx is the best SMM panel","footer.terms_of_service":"Terms of Service","footer.privacy_policy":"Privacy Policy","footer.refund_policy":"Refund Policy","footer.terms":"Terms","footer.privacy":"Privacy","footer.refund":"Refund","reseller.services_title":"High-Demand Social Media Services for Resellers","reseller.services_desc":"Each service category below represents a proven revenue opportunity. As a Follx reseller, you purchase these services at wholesale rates and set your own retail pricing to maximize profit margins.","reseller.ig_followers_title":"Buy Instagram Followers for Clients","reseller.ig_followers_p1":"Instagram followers are the single most requested service in social media marketing. Businesses, influencers, and content creators consistently invest in growing their audience, making this a high-volume, recurring revenue stream for resellers.","reseller.ig_followers_p2":"With wholesale margins between 40% and 70%, resellers can offer Instagram follower packages at competitive retail prices while maintaining strong profitability. This is the foundation service for any SMM reseller business.","reseller.ig_likes_title":"Instagram Likes for Post Engagement","reseller.ig_likes_p1":"Engagement services generate repeat purchases because clients need fresh likes on every new post. This creates predictable, subscription-style revenue that compounds over time.","reseller.ig_likes_p2":"Resellers who purchase Instagram likes in bulk through our wholesale system can bundle them into monthly engagement packages, increasing average order value and client retention.","reseller.ig_views_title":"Instagram Views for Reels and Video","reseller.ig_views_p1":"With Instagram prioritizing Reels and video content, view count services are growing faster than any other category. Creators and brands need high view counts to compete in the algorithm.","reseller.ig_views_p2":"The demand for Instagram video views continues to accelerate as short-form video dominates the platform. Resellers offering view packages tap into this expanding market segment.","reseller.tiktok_title":"TikTok Followers","reseller.tiktok_p1":"TikTok is the fastest-growing social platform and the hottest market for resellers. Creators need followers to unlock monetization, live features, and brand partnerships.","reseller.tiktok_p2":"Position your business at the forefront of this trend by offering clients the ability to buy TikTok followers through your reseller panel with instant automated delivery.","reseller.youtube_title":"YouTube Subscribers","reseller.youtube_p1":"YouTube's 1,000-subscriber monetization threshold creates a clear, urgent need for content creators. Channels approaching this milestone are willing to invest significantly.","reseller.youtube_p2":"Help your clients grow their YouTube subscriber base with reliable delivery that supports channel monetization and long-term audience building.","reseller.twitter_title":"Twitter (X) Followers","reseller.twitter_p1":"X (Twitter) remains the platform of choice for B2B professionals, public figures, and thought leaders. A strong follower count signals authority and credibility.","reseller.twitter_p2":"C
1032omplete your multi-platform service catalog by helping clients acquire Twitter followers alongside their Instagram and TikTok growth strategies.","smm.infra_title":"Professional Panel & API Infrastructure","smm.infra_desc":"Scale your reseller operations with enterprise-grade infrastructure. From automated API integration to white-label panel solutions, Follx provides the technical backbone for your SMM business.","smm.api_detail_title":"SMM Panel API Integration","smm.api_detail_p1":"The Follx API enables full automation of your SMM business. Place orders, check statuses, and manage refills programmatically without any manual intervention.","smm.api_detail_p2":"Resellers processing high volumes benefit most from API-driven order automation. Reduce operational overhead, eliminate human error, and scale your order capacity.","smm.tag_rest_api":"REST API","smm.tag_auto_processing":"Auto-Processing","smm.tag_callbacks":"Status Callbacks","smm.cheap_detail_title":"Cost-Effective SMM Panel","smm.cheap_detail_p1":"Starting an SMM panel business does not require a large investment. Follx offers the lowest wholesale prices in the industry with tiered volume discounts.","smm.cheap_detail_p2":"Our affordable SMM panel pricing ensures healthy profit margins at every scale.","smm.tag_wholesale":"Wholesale Rates","smm.tag_volume":"Volume Discounts","smm.tag_low_cost":"Low Entry Cost","smm.best_detail_title":"Top-Rated SMM Panel Provider","smm.best_detail_p1":"Follx is consistently rated among the top SMM panels by resellers worldwide. With 5,000+ services, 99.9% uptime, and delivery speeds that outperform competitors.","smm.best_detail_p2":"Discover what makes Follx the highest-rated SMM panel in the industry. From enterprise-grade infrastructure to dedicated reseller support.","smm.tag_white_label":"White Label","smm.tag_uptime":"99.9% Uptime","smm.tag_services":"5,000+ Services","faq.q1":"Is it safe to buy followers?","faq.a1":"Yes, it is completely safe to buy followers from Follx. We use secure methods that comply with platform guidelines. Your account information is never shared, and we provide real followers that won't harm your account.","faq.q2":"How fast will I receive my followers?","faq.a2":"Most orders begin processing within minutes. Delivery speed depends on the package size, but you'll typically see results within 1-24 hours. We use gradual delivery to keep your account safe and make growth look natural.","faq.q3":"Can I buy Instagram followers safely?","faq.a3":"Absolutely. Follx uses safe delivery methods that comply with Instagram's terms. We never ask for your password, and our gradual delivery system ensures your account stays secure throughout the process.","faq.q4":"How much does it cost to buy TikTok followers?","faq.a4":"TikTok follower packages start from just a few dollars. Follx offers some of the most competitive prices in the market, with bulk discounts available for larger orders. Check our pricing page for current rates.","faq.q5":"Do you offer a money-back guarantee?","faq.a5":"Yes, we offer a full money-back guarantee if we fail to deliver your order. If followers drop within the guarantee period, we provide free refills at no extra cost. Your satisfaction is our top priority.","faq.q6":"Will my followers drop?","faq.a6":"We provide high-quality followers with minimal drop rates. In the rare event of a drop, our free refill guarantee covers you. Most customers experience stable, lasting results with their Follx orders.","faq.q7":"Do I need to provide my password?","faq.a7":"No, never. We will never ask for your password or login credentials. All we need is your public username or profile URL. Your account security is always maintained throughout the entire process.","faq.q8":"Can I split my order across multiple accounts?","faq.a8":"Yes, you can place separate orders for different accounts. Each order is processed independently, so you can distribute followers, likes, or views across as many accounts as you need."},m4=Object.freeze(Object.defineProperty({__proto__:null,default:Co},Symbol.toStringTag,{value:"Module"}
1032)),Io=[{code:"en",name:"English",nativeName:"English",flag:"ðºð¸",countryCode:"us",dir:"ltr"},{code:"tr",name:"Turkish",nativeName:"Türkçe",flag:"ð¹ð·",countryCode:"tr",dir:"ltr"},{code:"es",name:"Spanish",nativeName:"Español",flag:"ðªð¸",countryCode:"es",dir:"ltr"},{code:"pt",name:"Portuguese",nativeName:"Português",flag:"ð§ð·",countryCode:"br",dir:"ltr"},{code:"fr",name:"French",nativeName:"Français",flag:"ð«ð·",countryCode:"fr",dir:"ltr"},{code:"ar",name:"Arabic",nativeName:"Ø§ÙØ¹Ø±Ø¨ÙØ©",flag:"ð¸ð¦",countryCode:"sa",dir:"rtl"},{code:"ru",name:"Russian",nativeName:"Ð ÑÑÑкий",flag:"ð·ðº",countryCode:"ru",dir:"ltr"},{code:"it",name:"Italian",nativeName:"Italiano",flag:"ð®ð¹",countryCode:"it",dir:"ltr"},{code:"de",name:"German",nativeName:"Deutsch",flag:"ð©ðª",countryCode:"de",dir:"ltr"},{code:"zh-CN",name:"Chinese (Simplified)",nativeName:"ç®ä½ä¸æ",flag:"ð¨ð³",countryCode:"cn",dir:"ltr"},{code:"zh-TW",name:"Chinese (Traditional)",nativeName:"ç¹é«ä¸æ",flag:"ð¹ð¼",countryCode:"tw",dir:"ltr"},{code:"ja",name:"Japanese",nativeName:"æ¥æ¬èª",flag:"ð¯ðµ",countryCode:"jp",dir:"ltr"}],Gy=o.createContext(null),Px="follx_language",Ax="follx_language_source";function rf(t){try{return localStorage.getItem(t)}catch{return null}}function od(t,s){try{localStorage.setItem(t,s)}catch{}}function x4(t){return{TR:"tr",IT:"it",DE:"de",FR:"fr",ES:"es",MX:"es",AR:"es",CO:"es",CL:"es",PE:"es",SA:"ar",AE:"ar",EG:"ar",QA:"ar",KW:"ar",BH:"ar",OM:"ar",JO:"ar",LB:"ar",IQ:"ar",MA:"ar",DZ:"ar",TN:"ar",RU:"ru",BR:"pt",PT:"pt",CN:"zh-CN",SG:"zh-CN",TW:"zh-TW",HK:"zh-TW",MO:"zh-TW",JP:"ja"}[t.toUpperCase()]??null}function u4(t){const a=t.toLowerCase().replace(/_/g,"-").split("-");for(const l of a){if(l==="hans")return"zh-CN";if(l==="hant")return"zh-TW"}const r=a.find(l=>l.length===2&&l!=="zh");return r&&["tw","hk","mo"].includes(r)?"zh-TW":"zh-CN"}function h4(){var a;const t=typeof navigator<"u"&&((a=navigator.languages)!=null&&a.length)?[...navigator.languages]:typeof navigator<"u"&&navigator.language?[navigator.language]:[],s=new Set(["en","es","pt","fr","ar","ru","it","de","tr"]);for(const r of t){const n=r.toLowerCase().replace(/_/g,"-").split("-")[0];if(n==="zh")return u4(r);if(n==="ja")return"ja";if(s.has(n))return n}return null}const p4={en:"en",es:"es",pt:"pt",fr:"fr",ar:"ar",ru:"ru",it:"it",de:"de",tr:"tr","zh-CN":"zh-CN","zh-TW":"zh-TW",ja:"ja"};function f4({children:t}){const[s,a]=o.useState(()=>{if(typeof window<"u"){const f=rf(Px);if(f&&Io.some(g=>g.code===f))return f;const y=h4();if(y)return y}return"en"}),[r,l]=o.useState(Co),[n,i]=o.useState(!1),c=o.useCallback(async f=>{if(f==="en"){l(Co);return}i(!0);try{const y=p4[f],g=await d4(Object.assign({
1032"../i18n/ar.ts":()=>_s(()=>import("./ar-DFzBSTWH.js"),[]),
1032"../i18n/de.ts":()=>_s(()=>import("./de-yyRFLyI8.js"),[]),
1032"../i18n/en.ts":()=>_s(()=>Promise.resolve().then(()=>m4),void 0),
1032"../i18n/es.ts":()=>_s(()=>import("./es-DKaT56zf.js"),[]),
1032"../i18n/fr.ts":()=>_s(()=>import("./fr-DrNzlBkE.js"),[]),
1032"../i18n/it.ts":()=>_s(()=>import("./it-Ct-RzGGI.js"),[]),
1032"../i18n/ja.ts":()=>_s(()=>import("./ja-vWq0P6Nf.js"),[]),
1032"../i18n/pt.ts":()=>_s(()=>import("./pt-CUAdPnJo.js"),[]),
1032"../i18n/ru.ts":()=>_s(()=>import("./ru-m7JeJsE4.js"),[]),
1032"../i18n/tr.ts":()=>_s(()=>import("./tr-K6F71xzb.js"),[]),
1032"../i18n/zh-CN.ts":()=>_s(()=>import("./zh-CN-BGFB1_RO.js"),[]),
1032"../i18n/zh-TW.ts":()=>_s(()=>import("./zh-TW-Dx5OH_c4.js"),[])
1032}),`../i18n/${y}.ts`,3);l(g.default)}catch(y){console.error(`Failed to load translations for ${f}:`,y),l(Co)}finally{i(!1)}},[]);o.useEffect(()=>{c(s)},[s,c]),o.useEffect(()=>{const f=Io.find(y=>y.code===s);f&&(document.documentElement.dir=f.dir,document.documentElement.lang=s)},[s]);const d=f=>{a(f),od(Px,f),od(Ax,"manual")},x=o.useCallback(f=>{if(rf(Ax)==="manual")return;const g=x4(f);g&&(a(g),od(Px,g),od(Ax,"auto"))},[]),m=(f,y)=>{let g=r[f]||Co[f]||f;if(y)for(const[w,N]of Object.entries(y))g=g.replace(new RegExp(`\\{${w}\\}`,"g"),String(N));return g},h=Io.find(f=>f.code===s)||Io[0];return e.jsx(Gy.Provider,{value:{language:s,setLanguage:d,t:m,dir:h.dir,languageInfo:h,setLanguageFromGeo:x},children:t})}function os(){const t=o.useContext(Gy);if(!t)throw new Error("useLanguage must be used within a LanguageProvider");return t}const g4="2026-10-05T20:00:00Z",Jy="follx_currency_pref",b4={USD:{symbol:"$",locale:"en-US"},GBP:{symbol:"£",locale:"en-GB"},EUR:{symbol:"â¬",locale:"de-DE"},TRY:{symbol:"TL",locale:"tr-TR"}},Wy=new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","AL","AD","BA","BY","CH","GI","IS","XK","LI","MD","MC","ME","MK","NO","RS","SM","UA","VA"]);function y4(t){return t==="TR"?"TRY":t==="GB"?"GBP":Wy.has(t)?"EUR":"USD"}const Hy=o.createContext(null),j4=new Set(["USD","GBP","EUR","TRY"]);function v4(){try{const t=localStorage.getItem(Jy);if(!t)return localStorage.getItem("follx_currency")&&localStorage.removeItem("follx_currency"),null;const s=JSON.parse(t);return s&&j4.has(s.currency)?s:null}catch{return null}}function lf(t){try{localStorage.setItem(Jy,JSON.stringify(t))}catch{}}function nf(t){return t==="TR"?"TURKEY":t==="GB"?"UK":Wy.has(t)?"EUROPE":"DEFAULT"}function w4({children:t}){const{language:s,setLanguageFromGeo:a}=os(),[r,l]=o.useState("USD"),[n,i]=o.useState(null),[c,d]=o.useState({USD:1,GBP:.76,EUR:.89,TRY:49.15}),[x,m]=o.useState(!0),[h,f]=o.useState({buildVersion:g4,geoRequestSent:!1,geoProvider:"none",prefSource:"initializing"});o.useEffect(()=>{const S=v4();if((S==null?void 0:S.source)==="manual"){l(S.currency),i(S.country||null),f(u=>({...u,prefSource:"manual (localStorage)",geoResponseCountry:S.country||null,regionRule:nf(S.country||""),currencyAfterGeo:S.currency}));return}async function k(u,A,T){const ae=new AbortController,P=setTimeout(()=>ae.abort(),A);try{const z=await fetch(u,{signal:ae.signal,headers:{Accept:"application/json",...T}});return clearTimeout(P),z}catch(z){throw clearTimeout(P),z}}async function J(){const u=[];try{const T="https://kdqsajuhvcmxsnttdetg.supabase.co",ae="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc";if(T&&ae){const P=await k(`${T}/functions/v1/detect_country`,5e3,{Authorization:`Bearer ${ae}`,apikey:ae});if(P.ok){const z=await P.json(),I=(z.country||"").toString().trim().toUpperCase();if(I&&I!=="XX")return{country:I,provider:`edge:${z.source||"detect_country"}`};u.push(`edge: country=${I}`)}else u.push(`edge: HTTP ${P.status}`)}}catch(T){u.push(`edge: ${(T==null?void 0:T.name)==="AbortError"?"Timeout":(T==null?void 0:T.message)||"failed"}`)}const A=[{name:"ipapi.co",url:"https://ipapi.co/json/"},{name:"ipwho.is",url:"https://ipwho.is/"}];for(const T of A)try{const ae=await k(T.url,4e3);if(!ae.ok){u.push(`${T.name}: HTTP ${ae.status}`);continue}const P=await ae.json(),I=(P.country_code||P.country||P.countryCode||"").toString().trim().toUpperCase();if(I&&I!=="XX")return{country:I,provider:T.name};u.push(`${T.name}: empty country`)}catch(ae){u.push(`${T.name}: ${(ae==null?void 0:ae.name)==="AbortError"?"Timeout":(ae==null?void 0:ae.message)||"failed"}`)}throw new Error(u.join(" | "))}(async()=>{let u={geoRequestSent:!0,geoProvider:"edge+fallback",prefSource:"auto"};try{const{country:A,provider:T}=await J();u.geoProvider=T,u.geoResponseCountry=A,i(A),a(A);const ae=y4(A);u.regionRule=nf(A),u.currencyAfterGeo=ae,l(ae),lf({currency:ae,source:"auto",country:A}),console.info(`[Follx Geo] country=${A} currency=${ae} source=${T}`)}catch(A){const T=(A==null?void 0:A.message)||"Unknown error";u.geoError=T,u.geoResponseCountry="XX",u.currencyAfterGeo="USD",u.prefSource="fallback (all geo failed)",i("XX"),console.warn("[Follx Geo] all providers failed, defaulting to USD",T)}finally{f(A=>({...A,...u}))}})()},[a]);const y=o.useCallback(async()=>{try{const{data:S,error:k}=await Ye.from("exchange_rates").select("currency, rate_from_usd, fetched_at, source").in("currency",["USD","GBP","EUR","TRY"]);if(!k&&S&&S.length>0){const J={USD:1};let u="";for(const T of S){const ae=Number(T.rate_from_usd);ae>0&&(J[T.currency]=ae),T.fetched_at&&(u=T.fetched_at)}const A={USD:1,GBP:J.GBP&&J.GBP>0?J.GBP:.76,EUR:J.EUR&&J.EUR>0?J.EUR:.89,TRY:J.TRY&&J.TRY>0?J.TRY:49.15};d(A),f(T=>({...T,fxGbpLoaded:!!(J.GBP&&J.GBP>0),fxEurLoaded:!!(J.EUR&&J.EUR>0),fxTryLoaded:!!(J.TRY&&J.TRY>
10320),fxGbpValue:A.GBP,fxEurValue:A.EUR,fxTryValue:A.TRY,fxUpdatedAt:u})),console.info(`[Follx FX] GBP=${A.GBP} EUR=${A.EUR} TRY=${A.TRY} updated=${u}`)}else f(J=>({...J,fxGbpLoaded:!1,fxEurLoaded:!1,fxTryLoaded:!1,geoError:(J.geoError||"")+(k?` | FX error: ${k.message}`:" | FX: no data")}))}catch{f(S=>({...S,fxGbpLoaded:!1,fxEurLoaded:!1,fxTryLoaded:!1}))}},[]);o.useEffect(()=>{y().then(()=>m(!1));const S=setInterval(y,30*60*1e3);return()=>clearInterval(S)},[y]);const g=o.useCallback(S=>{l(S),lf({currency:S,source:"manual",country:n||void 0}),f(k=>({...k,prefSource:"manual (user switched)",currencyAfterGeo:S}))},[n]),w=c[r],N=o.useCallback(S=>{const k=S*w;return r==="TRY"?Math.floor(k/10)*10:Math.round(k*100)/100},[w,r]),v=o.useCallback((S,k)=>{const J=k||r;if(J==="TRY")return`${(Math.floor(S/10)*10).toLocaleString("tr-TR")} TL`;const u=b4[J],A=Math.abs(S);let T=2;return A>0&&A<.01&&(T=4,A<1e-4&&(T=6)),S.toLocaleString(u.locale,{style:"currency",currency:J,minimumFractionDigits:2,maximumFractionDigits:T})},[r]),j=o.useCallback(S=>v(N(S)),[N,v]),b=typeof window<"u"&&new URLSearchParams(window.location.search).has("geo_debug"),p=N(4.9),E=j(4.9),C=typeof window<"u"?localStorage.getItem("follx_language_source")||"browser":"unknown";return e.jsxs(Hy.Provider,{value:{currency:r,setCurrency:g,rate:w,rates:c,loading:x,detectedCountry:n,convertFromUsd:N,formatInCurrency:j,formatRaw:v},children:[t,b&&e.jsxs("div",{style:{position:"fixed",bottom:12,right:12,zIndex:99999,background:"rgba(0,0,0,0.92)",color:"#0f0",fontFamily:"monospace",fontSize:11,padding:"12px 16px",borderRadius:8,maxWidth:420,lineHeight:1.6,pointerEvents:"auto",border:"1px solid #333",maxHeight:"80vh",overflowY:"auto"},children:[e.jsx("div",{style:{fontWeight:"bold",fontSize:13,marginBottom:6,color:"#0ff"},children:"FOLLX GEO DEBUG"}),e.jsxs("div",{children:["Build: ",h.buildVersion]}),e.jsxs("div",{children:["Geo Sent: ",h.geoRequestSent?"YES":"NO"]}),e.jsxs("div",{children:["Geo Provider: ",h.geoProvider]}),e.jsxs("div",{children:["Geo HTTP: ",h.geoHttpStatus??"N/A"]}),e.jsxs("div",{children:["Geo Error: ",h.geoError??"none"]}),e.jsxs("div",{children:["Country: ",h.geoResponseCountry??n??"null"]}),e.jsxs("div",{children:["Region Rule: ",h.regionRule??"N/A"]}),e.jsxs("div",{children:["Currency After Geo: ",h.currencyAfterGeo??"N/A"]}),e.jsxs("div",{children:["Pref Source: ",h.prefSource]}),e.jsx("hr",{style:{borderColor:"#333",margin:"6px 0"}}),e.jsxs("div",{style:{color:"#ff0"},children:["Active Language: ",s]}),e.jsxs("div",{style:{color:"#ff0"},children:["Language Source: ",C]}),e.jsxs("div",{style:{color:"#ff0"},children:["Active Currency: ",r]}),e.jsxs("div",{style:{color:"#ff0"},children:["Active Rate: ",w]}),e.jsx("hr",{style:{borderColor:"#333",margin:"6px 0"}}),e.jsxs("div",{children:["GBP Rate Loaded: ",h.fxGbpLoaded?"YES":"NO"]}),e.jsxs("div",{children:["GBP Rate: ",h.fxGbpValue??c.GBP]}),e.jsxs("div",{children:["EUR Rate Loaded: ",h.fxEurLoaded?"YES":"NO"]}),e.jsxs("div",{children:["EUR Rate: ",h.fxEurValue??c.EUR]}),e.jsxs("div",{children:["TRY Rate Loaded: ",h.fxTryLoaded?"YES":"NO"]}),e.jsxs("div",{children:["TRY Rate: ",h.fxTryValue??c.TRY]}),e.jsxs("div",{children:["FX Updated: ",h.fxUpdatedAt??"N/A"]}),e.jsx("hr",{style:{borderColor:"#333",margin:"6px 0"}}),e.jsx("div",{children:"Example Base: 4.90 USD"}),e.jsxs("div",{children:["Converted: ",p]}),e.jsxs("div",{children:["Formatted: ",E]}),e.jsxs("div",{children:["FINBY TARGET CURRENCY: ",r]}),h.cspNote&&e.jsxs("div",{style:{color:"#f55",marginTop:4},children:["CSP: ",h.cspNote]})]})]})}function Nn(){const t=o.useContext(Hy);if(!t)throw new Error("useCurrency must be inside CurrencyProvider");return t}function of({cart:t,onSuccess:s,onError:a,customerEmail:r=""}){const{t:l}=os(),{currency:n,rate:i,formatRaw:c}
1032=Nn(),[d,x]=o.useState(null),[m,h]=o.useState(!1);o.useState(!1),o.useState(!1),o.useState("");const f="CUSTOMER",[y,g]=o.useState(""),[w,N]=o.useState(""),[v,j]=o.useState("");o.useRef(null),o.useRef(!1);const b="https://kdqsajuhvcmxsnttdetg.supabase.co",p=t.reduce((u,A)=>u+A.price,0),E=Math.round(p*i*100)/100,C=c(E),S=u=>u.replace(/\D/g,"").slice(0,16).replace(/(\d{4})/g,"$1 ").trim(),k=u=>{const A=u.replace(/\D/g,"");return A.length>=2?A.slice(0,2)+"/"+A.slice(2,4):A},J=async()=>{x(null);const u=y.replace(/\s/g,"");if(u.length<15){x(l("card.invalid_number"));return}if(!/^\d{2}\/\d{2}$/.test(w)){x(l("card.invalid_expiry"));return}if(v.length<3){x(l("card.invalid_cvv"));return}h(!0);try{const A=await fetch(`${b}/functions/v1/process_card_payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerName:f,cart:t,cardDetails:{number:u,expiry:w,cvv:v,name:f}})}),T=await A.json();if(!A.ok)throw new Error(T.error||l("card.payment_failed"));if(T.requiresAction&&T.actionUrl){const z=window.screenX+(window.outerWidth-500)/2,I=window.screenY+(window.outerHeight-600)/2,Z=window.open(T.actionUrl,"3DSecure",`width=500,height=600,left=${z},top=${I},scrollbars=yes`);if(Z){const Q=T.orderId;let _=!1;const M=async()=>{if(!_){_=!0;try{const re=await(await fetch(`${b}/functions/v1/capture_order`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderID:Q})})).json();re.success?s(re.captureId,re.orderNumber):x(re.error||l("card.verification_failed"))}catch{x(l("card.verification_failed"))}finally{h(!1)}}},F=async X=>{var re;X.origin!==window.location.origin&&!X.origin.includes("paypal.com")||((re=X.data)==null?void 0:re.type)==="PAYPAL_3DS_COMPLETE"&&(window.removeEventListener("message",F),await M())};window.addEventListener("message",F);const R=setInterval(()=>{Z.closed&&(clearInterval(R),window.removeEventListener("message",F),setTimeout(()=>{M()},1e3))},500)}else x(l("card.allow_popups")),h(!1);return}if(T.success)s(T.captureId,T.orderNumber);else throw new Error(l("card.payment_not_completed"))}catch(A){const T=A instanceof Error?A.message:l("card.payment_failed");x(T),a==null||a(T)}finally{h(!1)}};return e.jsxs("div",{className:"rounded-2xl overflow-hidden",children:[e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(lt,{className:"w-5 h-5 text-green-500"}),e.jsx("span",{className:"text-sm text-green-600 font-medium",children:l("card.secure_payment")})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("svg",{viewBox:"0 0 48 48",className:"w-6 h-6",children:[e.jsx("rect",{fill:"#1565C0",width:"48",height:"48",rx:"4"}),e.jsx("path",{fill:"#FFF",d:"M20.3,18.7l-2.4,10.5h-2.8l2.4-10.5H20.3z"})]}),e.jsxs("svg",{viewBox:"0 0 48 48",className:"w-6 h-6",children:[e.jsx("rect",{fill:"#3F51B5",width:"48",height:"48",rx:"4"}),e.jsx("circle",{fill:"#E91E63",cx:"19",cy:"24",r:"8"}),e.jsx("circle",{fill:"#FF9800",cx:"29",cy:"24",r:"8"})]})]})]}),e.jsxs("div",{className:"flex justify-between items-end",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-500 text-sm mb-1",children:l("card.total_amount")}),e.jsx("p",{className:"text-3xl font-bold text-slate-900",children:C})]}),e.jsx("div",{className:"text-right",children:e.jsx("p",{className:"text-slate-400 text-xs",children:l("card.ssl_encrypted")})})]})]}),e.jsxs("div",{className:"p-6 space-y-5",children:[d&&e.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-xl flex items-start gap-3",children:[e.jsx(nt,{className:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-red-700 text-sm",children:d})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:l("card.card_number")}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",inputMode:"numeric",value:y,onChange:u=>g(S(u.target.value)),placeholder:"1234 5678 9012 3456",maxLength:19,className:"w-full px-4 py-3.5 pr-12 border-2 border-slate-200 rounded-xl bg-white focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500 outline-none transition font-mono tracking-wider text-slate-900 placeholder-slate-400"}),e.jsx(Nt,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:l("card.expiry_date")}),e.jsx("input",{type:"text",inputMode:"numeric",value:w,onChange:u=>N(k(u.target.value)),placeholder:"MM/YY",maxLength:5,className:"w-full px-4 py-3.5 border-2 border-slate-200 rounded-xl bg-white focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500 outline-none transition font-mono tracking-wider text-slate-900 placeholder-slate-400"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:l("card.cvv")}
1032),e.jsx("input",{type:"text",inputMode:"numeric",value:v,onChange:u=>j(u.target.value.replace(/\D/g,"").slice(0,4)),placeholder:"123",maxLength:4,className:"w-full px-4 py-3.5 border-2 border-slate-200 rounded-xl bg-white focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500 outline-none transition font-mono tracking-wider text-slate-900 placeholder-slate-400"})]})]}),e.jsx("button",{onClick:J,disabled:m||!f,className:"w-full bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-4 rounded-xl font-bold text-lg shadow-xl hover:shadow-2xl hover:from-blue-700 hover:to-cyan-700 transition-all duration-300 disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-3",children:m?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:l("card.processing")})]}):e.jsxs(e.Fragment,{children:[e.jsx($t,{className:"w-5 h-5"}),e.jsxs("span",{children:[l("card.pay")," ",C]})]})}),e.jsxs("div",{className:"flex items-center justify-center gap-4 pt-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-400 text-xs",children:[e.jsx(lt,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{children:l("card.secure_checkout")})]}),e.jsx("div",{className:"w-1 h-1 bg-slate-300 rounded-full"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-slate-400 text-xs",children:[e.jsx($t,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{children:l("card.ssl_label")})]})]}),e.jsx("p",{className:"text-xs text-slate-400 text-center",children:l("card.disclaimer")})]})]})}function N4({onVerified:t,onCancel:s,orderSummary:a}){const{t:r}
1032=os(),[l,n]=o.useState(""),[i,c]=o.useState(!1),[d,x]=o.useState(""),[m,h]=o.useState(null),f=async()=>{if(!l.trim()){x(r("verify.enter_username_error"));return}c(!0),x(""),h(null);try{const w=l.trim().replace("@","");let N;try{N=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_instagram_profile",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({username:w})})}catch(j){throw console.error("Network error:",j),new Error(r("verify.network_error"))}let v;try{v=await N.json()}catch(j){throw console.error("Parse error:",j),new Error(r("verify.invalid_response"))}if(console.log("API Response:",v),!v||typeof v!="object")throw new Error(r("verify.invalid_response"));if(v.success===!1){const j=v.error&&typeof v.error=="string"?v.error:r("verify.failed_verify");throw new Error(j)}if(v.success!==!0)throw new Error(r("verify.invalid_format"));if(!v.data||typeof v.data!="object")throw new Error(r("verify.no_data"));if(!v.data.username||typeof v.data.username!="string")throw new Error(r("verify.not_found"));if(v.data.is_private===!0)throw new Error(r("verify.private_profile"));h(v.data)}catch(w){console.error("Verification error:",w);const N=w instanceof Error?w.message:r("verify.unexpected_error");x(N)}finally{c(!1)}},y=()=>{m&&t(m.username,m)},g=w=>w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":w.toString();return e.jsxs("div",{className:"max-w-lg mx-auto",children:[a&&e.jsxs("div",{className:"bg-slate-900 rounded-2xl p-4 mb-4 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_top_right,rgba(236,72,153,0.15),transparent_70%)]"}),e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_bottom_left,rgba(6,182,212,0.1),transparent_70%)]"}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h3",{className:"text-sm font-bold text-white flex items-center gap-2",children:[e.jsx(Vt,{className:"w-3.5 h-3.5 text-pink-400"}),r("verify.order_summary")]}),a.isMembershipRequired&&e.jsx("span",{className:"text-[10px] font-bold text-emerald-400 bg-emerald-500/15 px-2 py-0.5 rounded-full",children:r("verify.off_badge")})]}),e.jsxs("div",{className:"space-y-1.5 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-slate-400",children:[a.platform," ",a.serviceType]}),e.jsx("span",{className:"font-semibold text-white",children:a.quantity.toLocaleString()})]}),e.jsxs("div",{className:"flex justify-between items-center pt-2 border-t border-white/10",children:[e.jsx("span",{className:"font-bold text-white text-sm",children:r("verify.total")}),e.jsxs("div",{className:"flex items-center gap-2",children:[a.isMembershipRequired&&e.jsxs("span",{className:"text-xs text-slate-500 line-through",children:["$",a.originalPrice]}),e.jsxs("span",{className:"text-lg font-black text-white",children:["$",a.price]})]})]})]}),a.isMembershipRequired&&e.jsxs("div",{className:"mt-3 flex items-center gap-2 bg-amber-500/10 border border-amber-500/20 rounded-lg px-3 py-2",children:[e.jsx(Vt,{className:"w-3.5 h-3.5 text-amber-400 flex-shrink-0"}),e.jsxs("span",{className:"text-[11px] text-amber-200",children:[r("verify.signup_unlock")," ",e.jsxs("span",{className:"font-bold text-amber-100",children:["$",a.price]})," ",r("verify.price")]})]})]})]}),!m&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"relative",children:e.jsxs("div",{className:"bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 rounded-2xl p-5 relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-bl from-pink-500/20 to-transparent rounded-bl-full"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-cyan-500/10 to-transparent roun
1032ded-tr-full"}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-pink-500 to-rose-600 blur-md opacity-50"}),e.jsx("div",{className:"relative bg-gradient-to-br from-pink-500 via-rose-500 to-pink-600 p-2.5 rounded-xl",children:e.jsx(Za,{className:"w-5 h-5 text-white"})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-white text-base",children:r("verify.enter_username")}),e.jsx("p",{className:"text-xs text-slate-400",children:r("verify.without_at")})]})]}),e.jsx("div",{className:"relative",children:e.jsxs("div",{className:"flex items-center bg-white/10 backdrop-blur-sm border border-white/20 rounded-xl overflow-hidden focus-within:border-pink-500/60 focus-within:bg-white/15 transition-all duration-300 focus-within:shadow-lg focus-within:shadow-pink-500/10",children:[e.jsx("div",{className:"pl-4 pr-1 text-slate-400 font-semibold text-sm select-none",children:"@"}),e.jsx("input",{type:"text",value:l,onChange:w=>n(w.target.value),onKeyPress:w=>w.key==="Enter"&&f(),placeholder:r("verify.username_placeholder"),disabled:i,className:"w-full px-2 py-3 bg-transparent text-white text-sm font-medium placeholder:text-slate-500 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed"}),l.trim()&&e.jsx("div",{className:"pr-3",children:e.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400 animate-pulse"})})]})}),e.jsxs("div",{className:"flex items-center justify-center gap-4 mt-4 text-[10px] text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx($t,{className:"w-3 h-3 text-emerald-500"}),e.jsx("span",{className:"text-slate-400",children:r("checkout.no_password")})]}),e.jsx("span",{className:"w-px h-3 bg-slate-700"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ct,{className:"w-3 h-3 text-cyan-500"}),e.jsx("span",{className:"text-slate-400",children:r("checkout.instant_delivery")})]}),e.jsx("span",{className:"w-px h-3 bg-slate-700"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(rt,{className:"w-3 h-3 text-amber-500"}),e.jsx("span",{className:"text-slate-400",children:r("package.instant_start")})]})]})]})]})}),d&&e.jsxs("div",{className:"bg-red-950/40 border border-red-500/30 rounded-xl p-3 flex items-start gap-2.5",children:[e.jsx(st,{className:"w-4 h-4 text-red-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-red-300 text-xs",children:r("verify.error_generic")}),e.jsx("div",{className:"text-xs text-red-400/80 mt-0.5",children:d})]})]}),e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx("button",{onClick:s,disabled:i,className:"flex-1 bg-slate-100 hover:bg-slate-200 text-slate-600 py-2.5 rounded-xl font-semibold transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed text-sm",children:r("verify.cancel")}),e.jsxs("button",{onClick:f,disabled:i||!l.trim(),className:"group relative flex-[2] overflow-hidden bg-gradient-to-r from-pink-500 via-rose-500 to-pink-600 text-white py-2.5 rounded-xl font-bold shadow-lg shadow-pink-500/25 hover:shadow-xl hover:shadow-pink-500/35 hover:scale-[1.01] transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 flex items-center justify-center gap-2 text-sm",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/25 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),i?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin relative"}),e.jsx("span",{className:"relative",children:r("verify.verifying")})]}):e.jsxs(e.Fragment,{children:[e.jsx(lt,{className:"w-4 h-4 relative"}),e.jsx("span",{className:"relative",children:r("verify.verify_profile")})]})]})]})]}),m&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 rounded-2xl overflow-hidden relative",children:[e.jsx("div",{className:"absolute top-0 right-0 w-40 h-40 bg-gradient-to-bl from-pink-500/15 to-transparent roun
1032ded-bl-full"}),e.jsxs("div",{className:"p-5 relative",children:[e.jsxs("div",{className:"flex items-center gap-3.5 mb-4",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[m.profile_pic_url?e.jsx("img",{src:m.id?`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_instagram_profile_image?id=${m.id}`:m.profile_pic_url,alt:m.full_name||m.username,className:"w-14 h-14 rounded-2xl border-2 border-white/20 shadow-lg object-cover",onError:w=>{const N=w.target;if(m.id&&N.src.includes("get_instagram_profile_image")){N.src=m.profile_pic_url;return}N.style.display="none";const v=N.parentElement;if(v&&!v.querySelector(".initials-avatar")){const j=document.createElement("div");j.className="initials-avatar w-14 h-14 rounded-2xl border-2 border-white/20 shadow-lg flex items-center justify-center bg-gradient-to-br from-pink-500 to-rose-600 text-white text-lg font-bold",j.textContent=(m.full_name||m.username).charAt(0).toUpperCase(),v.appendChild(j)}}}):e.jsx("div",{className:"w-14 h-14 rounded-2xl border-2 border-white/20 shadow-lg flex items-center justify-center bg-gradient-to-br from-pink-500 to-rose-600 text-white text-lg font-bold",children:e.jsx(Za,{className:"w-6 h-6"})}),m.is_verified&&e.jsx("div",{className:"absolute -bottom-1 -right-1 bg-blue-500 rounded-full p-0.5 ring-2 ring-slate-900",children:e.jsx(ne,{className:"w-3 h-3 text-white"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-base font-bold text-white truncate",children:m.full_name||m.username}),e.jsxs("div",{className:"text-sm text-slate-400",children:["@",m.username]}),m.is_private&&e.jsxs("span",{className:"inline-flex items-center gap-1 bg-red-500/15 px-2 py-0.5 rounded-full text-[10px] text-red-400 mt-1 font-medium",children:[e.jsx(lt,{className:"w-2.5 h-2.5"}),"Private"]})]})]}),(m.follower_count>0||m.following_count>0)&&e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3",children:[e.jsxs("div",{className:"bg-white/5 backdrop-blur-sm border border-white/10 rounded-xl p-3 text-center",children:[e.jsx("div",{className:"text-lg font-black text-white",children:g(m.follower_count)}),e.jsx("div",{className:"text-[10px] text-slate-500 font-medium uppercase tracking-wider",children:r("verify.followers")})]}),e.jsxs("div",{className:"bg-white/5 backdrop-blur-sm border border-white/10 rounded-xl p-3 text-center",children:[e.jsx("div",{className:"text-lg font-black text-white",children:g(m.following_count)}),e.jsx("div",{className:"text-[10px] text-slate-500 font-medium uppercase tracking-wider",children:r("verify.following")})]})]}),m.biography&&e.jsx("div",{className:"bg-white/5 border border-white/10 rounded-xl p-3",children:e.jsx("p",{className:"text-xs text-slate-400 leading-relaxed whitespace-pre-wrap line-clamp-3",children:m.biography})})]})]}),m.is_private?e.jsxs("div",{className:"bg-red-950/40 border border-red-500/30 rounded-xl p-3 flex items-start gap-2.5",children:[e.jsx(st,{className:"w-4 h-4 text-red-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-red-300 text-xs",children:r("verify.is_private")}),e.jsx("div",{className:"text-[11px] text-red-400/80 mt-0.5",children:r("verify.private_warning")})]})]}):e.jsxs("div",{className:"bg-emerald-950/40 border border-emerald-500/30 rounded-xl p-3 flex items-start gap-2.5",children:[e.jsx(ne,{className:"w-4 h-4 text-emerald-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-emerald-300 text-xs",children:r("verify.verified")}),e.jsx("div",{className:"text-[11px] text-emerald-400/80 mt-0.5",children:r("verify.confirm_profile")})]})]}),e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx("button",{onClick:()=>{h(null),n(""),x("")},className:"flex-1 bg-slate-100 text-slate-600 py-2.5 rounded-xl font-semibold hover:bg-slate-200 transition-all duration-200 text-sm",children:r("verify.try_again")}),e.jsxs("button",{onClick:y,disabled:m.is_private,className:"group relative flex-[2] overflow-hidden bg-gradient-to-r from-emerald-500 to-teal-500 text-white py-2.5 rounded-xl font-bold shadow-lg shadow-emerald-500/25 hover:shadow-xl hover:shadow-emerald-500/35 hover:scale-[1.01] transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 text-sm",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),e.jsx(ne,{className:"w-4 h-4 flex-shrink-0 relative"}),e.jsx("span",{className:"relative",children:r("verify.continue")})]})]})]})]})}function k4({serviceType:t,onVerified:s,onCancel:a,orderSummary:r}){const{t:l}
1032=os(),[n,i]=o.useState(""),[c,d]=o.useState(!1),[x,m]=o.useState(""),[h,f]=o.useState(null),[y,g]=o.useState(!1),[w,N]=o.useState(!1),v=(C,S)=>t==="views"?C==="REEL"||C==="VIDEO"||S:!0,j=C=>{switch(C){case"REEL":case"VIDEO":return e.jsx(Di,{className:"w-4 h-4"});case"CAROUSEL":return e.jsx(Os,{className:"w-4 h-4"});default:return e.jsx(sm,{className:"w-4 h-4"})}},b=C=>{switch(C){case"REEL":return"REEL";case"VIDEO":return"VIDEO";case"CAROUSEL":return"CAROUSEL";case"IMAGE":return"IMAGE";default:return C}},p=async()=>{if(!n.trim()){m("Please enter a post URL");return}d(!0),m(""),f(null),g(!1),N(!1);try{const S=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_instagram_post",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({post_url:n.trim(),order_type:t})})).json();if(!S.success)throw new Error(S.message||"Failed to verify post");if(!v(S.data.media_type,S.data.has_video))throw new Error(`This post type is not compatible with ${t}`);f(S.data)}catch(C){console.error("Verification error:",C);const S=C instanceof Error?C.message:"Failed to verify post. Please try again.";m(S)}finally{d(!1)}},E=()=>{h&&s(h.source_url,h)};return e.jsxs("div",{className:"max-w-lg mx-auto space-y-4",children:[r&&e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"w-0.5 h-5 bg-gradient-to-b from-orange-500 to-red-500 rounded-full"}),e.jsx("h3",{className:"text-sm font-bold text-slate-900",children:l("verify.order_summary")})]}),e.jsxs("div",{className:"space-y-2 text-xs",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:l("verify.platform")}),e.jsx("span",{className:"font-semibold text-slate-900",children:r.platform})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:l("verify.service")}),e.jsx("span",{className:"font-semibold text-slate-900",children:r.serviceType})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:l("verify.quantity")}),e.jsx("span",{className:"font-semibold text-slate-900",children:r.quantity.toLocaleString()})]}),r.isMembershipRequired&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:l("verify.member_discount")}),e.jsx("span",{className:"font-semibold text-green-600",children:"-50%"})]}),e.jsx("div",{className:"border-t border-slate-100 pt-2 mt-2",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-bold text-slate-900 text-sm",children:l("verify.total")}),r.isMembershipRequired?e.jsxs("div",{className:"text-right",children:[e.jsxs("span",{className:"text-xs text-slate-400 line-through block",children:["$",r.originalPrice]}),e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",r.price]})]}):e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",r.price]})]})})]}),r.isMembershipRequired&&e.jsx("div",{className:"mt-3 bg-gradient-to-r from-amber-50 to-orange-50 border border-amber-200/80 rounded-lg p-2.5",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-gradient-to-br from-amber-400 to-orange-500 p-1 rounded-md",children:e.jsx(Vt,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-amber-900 text-[11px]",children:l("verify.signup_discount_title")}),e.jsxs("div",{className:"text-[10px] text-amber-700",children:["Sign up to get this package for $",r.price," instead of $",r.originalPrice,"."]})]})]})})]}),!h&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-orange-500/20 via-pink-500/20 to-rose-500/20 rounded-xl blur"}),e.jsxs("div",{className:"relative bg-white rounded-xl border border-slate-200/80 p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[e.jsx("div",{className:"bg-gradient-to-br from-orange-500 to-pink-600 p-2 rounded-lg",children:e.jsx(hn,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900 text-sm",children:l("verify.instagram_post_url")}),e.jsx("p",{className:"text-[11px] text-slate-500",children:l("verify.paste_post_link")})]})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-orange-500 via-pink-500 to-rose-500 rounded-lg opacity-0 group-focus-within:opacity-100 blur transition duration-300"}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"text",value:n,onChange:C=>i(C.target.value),onKeyPress:C=>C.key==="Enter"&&p(),placeholder:"https://instagram.com/p/...",disabled:c,
1032className:"w-full px-3 py-3 bg-slate-50/80 border border-slate-200 rounded-lg focus:border-orange-500 focus:bg-white focus:outline-none transition-all duration-300 text-sm font-medium text-slate-900 placeholder:text-slate-400 disabled:opacity-50 disabled:cursor-not-allowed"})})]})]})]}),x&&e.jsx("div",{className:"bg-red-50 border border-red-200/80 rounded-xl p-3",children:e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"bg-red-500 p-1.5 rounded-lg flex-shrink-0",children:e.jsx(st,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-red-900 text-xs",children:l("verify.error_generic")}),e.jsx("div",{className:"text-xs text-red-700 mt-0.5",children:x})]})]})}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-rose-50 border border-rose-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(ia,{className:"w-3 h-3 text-rose-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-rose-800 whitespace-nowrap",children:l("verify.likes")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-cyan-50 border border-cyan-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(Ct,{className:"w-3 h-3 text-cyan-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-cyan-800 whitespace-nowrap",children:l("verify.views")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-amber-50 border border-amber-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(zs,{className:"w-3 h-3 text-amber-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-amber-800 whitespace-nowrap",children:l("verify.fast")})]})]}),e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx("button",{onClick:a,disabled:c,className:"flex-1 bg-slate-100 hover:bg-slate-200 text-slate-700 py-2.5 rounded-lg font-semibold transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed border border-slate-200 text-sm",children:l("verify.cancel")}),e.jsxs("button",{onClick:p,disabled:c||!n.trim(),className:"group relative flex-1 overflow-hidden bg-gradient-to-r from-orange-500 via-pink-500 to-rose-500 text-white py-2.5 rounded-lg font-semibold shadow-md shadow-pink-500/20 hover:shadow-lg hover:shadow-pink-500/30 hover:scale-[1.01] transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 flex items-center justify-center gap-1.5 text-sm",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),c?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin relative"}),e.jsx("span",{className:"relative",children:l("verify.verifying")})]}):e.jsxs(e.Fragment,{children:[e.jsx(lt,{className:"w-4 h-4 relative"}),e.jsx("span",{className:"relative",children:l("verify.verify_post")})]})]})]})]}),h&&e.jsxs("div",{className:"space-y-4 animate-in fade-in zoom-in duration-500",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-orange-500/15 via-pink-500/15 to-rose-500/15 rounded-xl blur"}),e.jsxs("div",{className:"relative bg-white rounded-xl border border-pink-200/60 p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[e.jsx("div",{className:"bg-gradient-to-br from-pink-500 to-rose-600 p-2 rounded-lg text-white",children:j(h.media_type)}),e.jsxs("div",{children:[e.jsxs("div",{className:"font-bold text-slate-900 text-sm",children:[b(h.media_type),h.media_type==="REEL"&&" - Video"]}),e.jsxs("div",{className:"text-[11px] text-slate-500",children:["Compatible with ",t]})]})]}),e.jsx("div",{className:"mb-3 bg-slate-900 rounded-lg shadow-inner overflow-hidden flex items-center justify-center",style:{maxHeight:"280px"},children:h.video_url&&!y?e.jsx("video",{src:h.video_url,poster:h.image_url||`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_instagram_post_image?id=${h.id}
1032`,controls:!0,playsInline:!0,preload:"metadata",className:"w-full rounded-lg",style:{maxHeight:"280px",objectFit:"contain"},onError:()=>g(!0)}):w?e.jsx("div",{className:"flex items-center justify-center w-full h-32 rounded-md bg-gradient-to-br from-pink-50 to-rose-50 border border-pink-100",children:e.jsxs("div",{className:"text-center",children:[e.jsx(zs,{className:"w-8 h-8 text-pink-400 mx-auto mb-1.5"}),e.jsx("span",{className:"text-xs text-pink-500 font-medium",children:b(h.media_type)})]})}):e.jsx("img",{src:`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_instagram_post_image?id=${h.id}`,alt:"Instagram post",className:"w-full rounded-lg",style:{maxHeight:"280px",objectFit:"contain"},onError:()=>N(!0)})}),h.title&&e.jsxs("div",{className:"bg-slate-50/80 rounded-lg p-2.5 mb-2",children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-600 mb-0.5",children:l("verify.caption")}),e.jsx("p",{className:"text-xs text-slate-600 leading-relaxed line-clamp-2",children:h.title})]}),e.jsxs("div",{className:"bg-slate-50/80 rounded-lg p-2.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-600 mb-0.5",children:l("verify.post_url")}),e.jsx("div",{className:"bg-white rounded-md px-2.5 py-1.5 text-[11px] text-slate-500 break-all font-mono border border-slate-200",children:h.source_url})]})]})]}),e.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-green-900 text-xs",children:l("verify.post_verified")}),e.jsxs("div",{className:"text-[11px] text-green-700 mt-0.5",children:["Compatible with ",t,". Continue to complete your purchase."]})]})]})}),e.jsxs("div",{className:"flex flex-col-reverse sm:flex-row gap-2.5",children:[e.jsx("button",{onClick:()=>{f(null),i(""),m(""),g(!1),N(!1)},className:"flex-1 bg-slate-100 hover:bg-slate-200 text-slate-700 py-2.5 rounded-lg font-semibold transition-all duration-200 border border-slate-200 text-sm",children:l("verify.try_again")}),e.jsxs("button",{onClick:E,className:"group relative flex-1 overflow-hidden bg-gradient-to-r from-emerald-500 to-green-500 text-white py-2.5 rounded-lg font-semibold shadow-md shadow-emerald-500/20 hover:shadow-lg hover:shadow-emerald-500/30 hover:scale-[1.01] transition-all duration-200 flex items-center justify-center gap-1.5 text-sm",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),e.jsx(ne,{className:"w-4 h-4 flex-shrink-0 relative"}),e.jsx("span",{className:"relative",children:l("verify.continue")})]})]})]})]})}function _4({onVerified:t,onCancel:s,orderSummary:a}){const{t:r}
1032=os(),[l,n]=o.useState(""),[i,c]=o.useState(!1),[d,x]=o.useState(""),[m,h]=o.useState(null),f=async()=>{if(!l.trim()){x("Please enter a username");return}c(!0),x(""),h(null);try{let w=l.trim();const N=w.match(/tiktok\.com\/@([^/?&#]+)/i);N?w=N[1]:w=w.replace(/^@/,"");const j=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_tiktok_profile",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({username:w})})).json();if(!j.success)throw new Error(j.error||"Failed to verify profile");if(j.isPrivate)throw new Error("This TikTok account is private. Please make it public to receive followers.");if(!j.verified||!j.profile)throw new Error("TikTok user not found. Please check the username.");h(j.profile)}catch(w){const N=w instanceof Error?w.message:"An unexpected error occurred";x(N)}finally{c(!1)}},y=()=>{m&&t(m.username,m)},g=w=>w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":w.toString();return e.jsxs("div",{className:"max-w-lg mx-auto space-y-4",children:[a&&e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"w-0.5 h-5 bg-gradient-to-b from-[#00f2ea] to-[#ff0050] rounded-full"}),e.jsx("h3",{className:"text-sm font-bold text-slate-900",children:r("verify.order_summary")})]}),e.jsxs("div",{className:"space-y-2 text-xs",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.platform")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.platform})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.service")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.serviceType})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.quantity")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.quantity.toLocaleString()})]}),a.isMembershipRequired&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.member_discount")}),e.jsx("span",{className:"font-semibold text-green-600",children:"-50%"})]}),e.jsx("div",{className:"border-t border-slate-100 pt-2 mt-2",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-bold text-slate-900 text-sm",children:r("verify.total")}),a.isMembershipRequired?e.jsxs("div",{className:"text-right",children:[e.jsxs("span",{className:"text-xs text-slate-400 line-through block",children:["$",a.originalPrice]}),e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",a.price]})]}):e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",a.price]})]})})]}),a.isMembershipRequired&&e.jsx("div",{className:"mt-3 bg-gradient-to-r from-amber-50 to-orange-50 border border-amber-200/80 rounded-lg p-2.5",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-gradient-to-br from-amber-400 to-orange-500 p-1 rounded-md",children:e.jsx(Vt,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-amber-900 text-[11px]",children:r("verify.signup_discount_title")}),e.jsxs("div",{className:"text-[10px] text-amber-700",children:["Sign up to get this package for $",a.price," instead of $",a.originalPrice,"."]})]})]})})]}),!m&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-[#00f2ea]/20 via-[#ff0050]/20 to-[#00f2ea]/20 rounded-xl blur"}),e.jsxs("div",{className:"relative bg-white rounded-xl border border-slate-200/80 p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[e.jsx("div",{className:"bg-black p-2 rounded-lg",children:e.jsx("svg",{className:"w-4 h-4 text-white",viewBox:"0 0 24 24",fill:"
1032currentColor",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z"})})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900 text-sm",children:r("verify.tiktok_username")}),e.jsx("p",{className:"text-[11px] text-slate-500",children:r("verify.enter_without_at")})]})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-[#00f2ea] via-[#ff0050] to-[#00f2ea] rounded-lg opacity-0 group-focus-within:opacity-100 blur transition duration-300"}),e.jsxs("div",{className:"relative flex items-center",children:[e.jsx("div",{className:"absolute left-3 text-slate-400 font-medium text-sm",children:"@"}),e.jsx("input",{type:"text",value:l,onChange:w=>n(w.target.value),onKeyPress:w=>w.key==="Enter"&&f(),placeholder:r("verify.username_placeholder"),disabled:i,className:"w-full pl-8 pr-3 py-3 bg-slate-50/80 border border-slate-200 rounded-lg focus:border-[#00f2ea] focus:bg-white focus:outline-none transition-all duration-300 text-sm font-medium text-slate-900 placeholder:text-slate-400 disabled:opacity-50 disabled:cursor-not-allowed"})]})]})]})]}),d&&e.jsx("div",{className:"bg-red-50 border border-red-200/80 rounded-xl p-3",children:e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"bg-red-500 p-1.5 rounded-lg flex-shrink-0",children:e.jsx(st,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-red-900 text-xs",children:r("verify.error_generic")}),e.jsx("div",{className:"text-xs text-red-700 mt-0.5",children:d})]})]})}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-emerald-50 border border-emerald-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx($t,{className:"w-3 h-3 text-emerald-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-emerald-800 whitespace-nowrap",children:r("checkout.no_password")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-cyan-50 border border-cyan-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(Ct,{className:"w-3 h-3 text-cyan-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-cyan-800 whitespace-nowrap",children:r("verify.public_only")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-amber-50 border border-amber-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(rt,{className:"w-3 h-3 text-amber-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-amber-800 whitespace-nowrap",children:r("package.instant_start")})]})]}),e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx("button",{onClick:s,disabled:i,className:"flex-1 bg-slate-100 hover:bg-slate-200 text-slate-700 py-2.5 rounded-lg font-semibold transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed border border-slate-200 text-sm",children:r("verify.cancel")}),e.jsxs("button",{onClick:f,disabled:i||!l.trim(),className:"group relative flex-1 overflow-hidden bg-gradient-to-r from-[#00f2ea] via-[#ff0050] to-[#00f2ea] text-white py-2.5 rounded-lg font-semibold shadow-md shadow-[#ff0050]/20 hover:shadow-lg hover:shadow-[#ff0050]/30 hover:scale-[1.01] transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 flex items-center justify-center gap-1.5 text-sm",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),i?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin relative"}),e.jsx("span",{className:"relative",children:r("verify.verifying")})]}):e.jsxs(e.Fragment,{children:[e.jsx(lt,{className:"w-4 h-4 relative"}),e.jsx("span",{className:"relative",children:r("verify.verify_profile")})]})]})]})]}),m&&e.jsxs("div",{className:"space-y-4 animate-in fade-in zoom-in duration-500",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 border border-[#00f2ea]/30 rounded-xl p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[m.profilePicUrl?e.jsx("img",{src:m.profilePicUrl,alt:m.fullName,className:"w-14 h-14 roun
1032ded-full border-2 border-[#00f2ea]/50 shadow-md object-cover",onError:w=>{const N=w.target;N.style.display="none";const v=N.parentElement;if(v&&!v.querySelector(".initials-avatar")){const j=(m.fullName||m.username).split(" ").map(p=>p[0]).join("").substring(0,2).toUpperCase(),b=document.createElement("div");b.className="initials-avatar w-14 h-14 rounded-full border-2 border-[#00f2ea]/50 shadow-md flex items-center justify-center bg-gradient-to-br from-[#00f2ea] to-[#ff0050] text-white text-lg font-bold",b.textContent=j,v.appendChild(b)}}}):e.jsx("div",{className:"w-14 h-14 rounded-full border-2 border-[#00f2ea]/50 shadow-md flex items-center justify-center bg-gradient-to-br from-[#00f2ea] to-[#ff0050] text-white text-lg font-bold",children:(m.fullName||m.username).charAt(0).toUpperCase()}),m.isVerified&&e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 bg-[#00f2ea] rounded-full p-0.5",children:e.jsx(ne,{className:"w-3 h-3 text-black"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-base font-bold text-white truncate",children:m.fullName||m.username}),e.jsxs("div",{className:"text-sm text-[#00f2ea]",children:["@",m.username]}),m.isPrivate&&e.jsxs("div",{className:"inline-flex items-center gap-1 bg-slate-700 px-2 py-0.5 rounded-full text-[10px] text-slate-300 mt-1",children:[e.jsx(lt,{className:"w-2.5 h-2.5"}),e.jsx("span",{children:"Private"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-1.5 mb-3",children:[e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(mt,{className:"w-3 h-3 text-[#00f2ea] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:g(m.followerCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:r("verify.followers")})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(Xr,{className:"w-3 h-3 text-[#ff0050] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:g(m.followingCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:r("verify.following")})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(ia,{className:"w-3 h-3 text-[#ff0050] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:g(m.heartCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:r("verify.likes")})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(Di,{className:"w-3 h-3 text-[#00f2ea] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:g(m.mediaCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:r("verify.videos")})]})]}),m.bio&&e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2.5 border border-slate-700",children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-400 mb-0.5",children:r("verify.bio")}),e.jsx("p",{className:"text-xs text-slate-300 leading-relaxed whitespace-pre-wrap line-clamp-2",children:m.bio})]})]}),m.isPrivate?e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(st,{className:"w-4 h-4 text-red-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-red-900 text-xs",children:r("verify.is_private")}),e.jsx("div",{className:"text-[11px] text-red-700 mt-0.5",children:r("verify.private_warning")})]})]})}):e.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-green-900 text-xs",children:r("verify.profile_found")}),e.jsx("div",{className:"text-[11px] text-green-700 mt-0.5",children:r("verify.confirm_profile")})]})]})}),e.jsxs("div",{className:"flex flex-col-reverse sm:flex-row gap-2.5",children:[e.jsx("button",{onClick:()=>{h(null),n(""),x("")},className:"flex-1 bg-slate-100 text-slate-700 py-2.5 rounded-lg font-semibold hover:bg-slate-200 transition-all duration-200 text-sm",children:r("verify.try_again")}),e.jsxs("button",{onClick:y,disabled:m.isPrivate,className:"flex-1 bg-gradient-to-r from-green-500 to-emerald-500 text-white py-2.5 rounded-lg font-semibold hover:shadow-lg hover:scale-[1.01] transition-all duration-200 flex items-center justify-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 text-sm shadow-md shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{children:r("verify.continue")})]})]})]})]})}const S4={TIKTOK_INVALID_URL:"Please enter a valid TikTok video link.",TIKTOK_INVALID_DOMAIN:"This does not look like a TikTok link. Please paste a link from TikTok.",TIKTOK_SHORT_URL_RESOLUTION_FAILED:"Could not resolve the TikTok short link. Please try pasting the full video URL from your browser.",TIKTOK_PRIVATE_ACCOUNT:"This TikTok account is private. Please make it public first.",TIKTOK_VIDEO_NOT_FOUND:"Video not found. Please check the URL and try again.",APIFY_TIMEOUT:"Verification timed out. Please try again.",APIFY_ERROR:"Verification service is temporarily unavailable. Please try again.",CONFIG_ERROR:"TikTok verification is not configured yet."};function C4(t){const s=t.trim(),a=s.match(/https?:\/\/[^\s]+tiktok\.com[^\s]*
1032/i);return a?a[0]:s}function I4({onVerified:t,onCancel:s,orderSummary:a,serviceType:r="likes"}){const{t:l}=os(),[n,i]=o.useState(""),[c,d]=o.useState(!1),[x,m]=o.useState(""),[h,f]=o.useState(null),[y,g]=o.useState(null),w=async()=>{const E=C4(n);if(!E){m("Please enter a video URL");return}d(!0),m(""),f(null),g(null);try{const S=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_tiktok_video",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({videoUrl:E})})).json();if(!S.success||!S.verified||!S.video){const k=S.code||"",J=S4[k]||S.error||"Failed to verify video. Please try again.";m(J);return}f(S.video),S.profileStats&&g(S.profileStats)}catch{m("Could not connect to the verification service. Please check your connection and try again.")}finally{d(!1)}},N=()=>{h&&t(n,h)},v=E=>E>=1e6?(E/1e6).toFixed(1)+"M":E>=1e3?(E/1e3).toFixed(1)+"K":E.toString(),j=E=>{const C=Math.floor(E/60),S=E%60;return`${C}:${S.toString().padStart(2,"0")}`},b=h&&(h.stats.playCount>0||h.stats.likeCount>0||h.stats.commentCount>0||h.stats.shareCount>0),p=h&&h.description;return e.jsxs("div",{className:"max-w-lg mx-auto space-y-4",children:[a&&e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"w-0.5 h-5 bg-gradient-to-b from-[#00f2ea] to-[#ff0050] rounded-full"}),e.jsx("h3",{className:"text-sm font-bold text-slate-900",children:l("verify.order_summary")})]}),e.jsxs("div",{className:"space-y-2 text-xs",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:l("verify.platform")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.platform})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:l("verify.service")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.serviceType})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:l("verify.quantity")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.quantity.toLocaleString()})]}),a.isMembershipRequired&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:l("verify.member_discount")}),e.jsx("span",{className:"font-semibold text-green-600",children:"-50%"})]}),e.jsx("div",{className:"border-t border-slate-100 pt-2 mt-2",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-bold text-slate-900 text-sm",children:l("verify.total")}),a.isMembershipRequired?e.jsxs("div",{className:"text-right",children:[e.jsxs("span",{className:"text-xs text-slate-400 line-through block",children:["$",a.originalPrice]}),e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",a.price]})]}):e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",a.price]})]})})]})]}),!h&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-[#00f2ea]/20 via-[#ff0050]/20 to-[#00f2ea]/20 rounded-xl blur"}),e.jsxs("div",{className:"relative bg-white rounded-xl border border-slate-200/80 p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[e.jsx("div",{className:"bg-black p-2 rounded-lg",children:e.jsx(Di,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900 text-sm",children:l("verify.tiktok_video_url")}),e.jsx("p",{className:"text-[11px] text-slate-500",children:l("verify.enter_video_link")})]})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-[#00f2ea] via-[#ff0050] to-[#00f2ea] rounded-lg opacity-0 group-focus-within:opacity-100 blur transition duration-300"}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"text",value:n,onChange:E=>i(E.target.value),onKeyPress:E=>E.key==="Enter"&&w(),placeholder:"https://vt.tiktok.com/... or https://tiktok.com/@user/video/...",disabled:c,
1032className:"w-full px-3 py-3 bg-slate-50/80 border border-slate-200 rounded-lg focus:border-[#00f2ea] focus:bg-white focus:outline-none transition-all duration-300 text-sm font-medium text-slate-900 placeholder:text-slate-400 disabled:opacity-50 disabled:cursor-not-allowed"})})]}),e.jsx("p",{className:"text-[11px] text-slate-400 mt-2",children:l("verify.copy_video_link")})]})]}),x&&e.jsx("div",{className:"bg-red-50 border border-red-200/80 rounded-xl p-3",children:e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"bg-red-500 p-1.5 rounded-lg flex-shrink-0",children:e.jsx(st,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-red-900 text-xs",children:l("verify.error_generic")}),e.jsx("div",{className:"text-xs text-red-700 mt-0.5",children:x})]})]})}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-emerald-50 border border-emerald-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx($t,{className:"w-3 h-3 text-emerald-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-emerald-800 whitespace-nowrap",children:l("checkout.no_password")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-cyan-50 border border-cyan-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(Ct,{className:"w-3 h-3 text-cyan-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-cyan-800 whitespace-nowrap",children:l("verify.public_only")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-amber-50 border border-amber-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(rt,{className:"w-3 h-3 text-amber-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-amber-800 whitespace-nowrap",children:l("package.instant_start")})]})]}),e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx("button",{onClick:s,disabled:c,className:"flex-1 bg-slate-100 hover:bg-slate-200 text-slate-700 py-2.5 rounded-lg font-semibold transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed border border-slate-200 text-sm",children:l("verify.cancel")}),e.jsxs("button",{onClick:w,disabled:c||!n.trim(),className:"group relative flex-1 overflow-hidden bg-gradient-to-r from-[#00f2ea] via-[#ff0050] to-[#00f2ea] text-white py-2.5 rounded-lg font-semibold shadow-md shadow-[#ff0050]/20 hover:shadow-lg hover:shadow-[#ff0050]/30 hover:scale-[1.01] transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 flex items-center justify-center gap-1.5 text-sm",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),c?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin relative"}),e.jsx("span",{className:"relative",children:l("verify.verifying")})]}):e.jsxs(e.Fragment,{children:[e.jsx(lt,{className:"w-4 h-4 relative"}),e.jsx("span",{className:"relative",children:l("verify.verify_video")})]})]})]})]}),h&&e.jsxs("div",{className:"space-y-4 animate-in fade-in zoom-in duration-500",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 border border-[#00f2ea]/30 rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"flex justify-center bg-black",children:e.jsxs("div",{className:"relative w-[140px] h-[248px]",children:[h.coverUrl?e.jsx("img",{src:h.coverUrl,alt:"Video thumbnail",className:"w-full h-full object-cover",onError:E=>{E.target.style.display="none"}}):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-gradient-to-b from-slate-800 to-slate-900 gap-3",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-gradient-to-br from-[#00f2ea]/20 to-[#ff0050]/20 flex items-center justify-center border border-slate-700",children:e.jsx(Di,{className:"w-7 h-7 text-slate-500"})}),e.jsxs("div",{className:"text-center px-2",children:[e.jsx("p",{className:"text-[10px] text-slate-500",children:"Video ID"}),e.jsx("p",{className:"text-[9px] text-slate-600 font-mono break-all",children:h.id})]})]}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-trans
1032parent to-transparent"}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[h.author.avatarUrl?e.jsx("img",{src:h.author.avatarUrl,alt:h.author.nickname,className:"w-6 h-6 rounded-full border border-white/30",onError:E=>{E.target.style.display="none"}}):e.jsx("div",{className:"w-6 h-6 rounded-full border border-white/30 bg-gradient-to-br from-[#00f2ea] to-[#ff0050] flex items-center justify-center text-white font-bold text-[9px]",children:(h.author.nickname||h.author.username||"?").charAt(0).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-semibold text-white text-[10px] truncate",children:h.author.nickname||h.author.username}),e.jsxs("div",{className:"text-[#00f2ea] text-[9px] truncate",children:["@",h.author.username]})]})]}),p&&e.jsx("p",{className:"text-white/80 text-[9px] line-clamp-2",children:h.description})]}),h.duration>0&&e.jsx("div",{className:"absolute top-1.5 right-1.5 bg-black/60 backdrop-blur-sm px-1 py-0.5 rounded",children:e.jsx("span",{className:"text-white text-[9px] font-medium",children:j(h.duration)})})]})}),e.jsx("div",{className:"p-3",children:b?e.jsxs("div",{className:"grid grid-cols-4 gap-1.5",children:[e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(zs,{className:"w-3 h-3 text-[#00f2ea] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:v(h.stats.playCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:l("verify.views")})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(ia,{className:"w-3 h-3 text-[#ff0050] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:v(h.stats.likeCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:l("verify.likes")})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(Ls,{className:"w-3 h-3 text-[#00f2ea] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:v(h.stats.commentCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:l("verify.comments")})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(Ki,{className:"w-3 h-3 text-[#ff0050] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:v(h.stats.shareCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:l("verify.shares")})]})]}):y?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-1.5",children:[e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(mt,{className:"w-3 h-3 text-[#00f2ea] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:v(y.followerCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:l("verify.followers")})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(ia,{className:"w-3 h-3 text-[#ff0050] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:v(y.likeCount)}),e.jsx("div",{className:"text-[9px] text-slate-400",children:l("verify.likes")})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-2 text-center border border-slate-700",children:[e.jsx(Di,{className:"w-3 h-3 text-[#00f2ea] mx-auto mb-0.5"}),e.jsx("div",{className:"text-sm font-bold text-white",children:y.videoCount}),e.jsx("div",{className:"text-[9px] text-slate-400",children:l("verify.videos")})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 px-1",children:[e.jsx(Xr,{className:"w-3 h-3 text-[#00f2ea] flex-shrink-0"}),e.jsx("p",{className:"text-[10px] text-slate-400",children:l("verify.profile_verified_video_accepted")})]})]}):e.jsxs("div",{className:"flex items-center gap-2 px-1 py-1",children:[e.jsx(ne,{className:"w-3.5 h-3.5 text-[#00f2ea] flex-shrink-0"}),e.jsx("p",{className:"text-[10px] text-slate-400",children:l("verify.video_url_verified")})]})})]}),e.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-green-900 text-xs",children:l("verify.video_verified")}),e.jsx("div",{className:"text-[11px] text-green-700 mt-0.5",children:l("verify.video_eligible")})]})]})}),e.jsxs("div",{className:"flex flex-col-reverse sm:flex-row gap-2.5",children:[e.jsx("button",{onClick:()=>{f(null),g(null),i(""),m("")},className:"flex-1 bg-slate-100 text-slate-700 py-2.5 rounded-lg font-semibold hover:bg-slate-200 transition-all duration-200 text-sm",children:l("verify.try_again")}),e.jsxs("button",{onClick:N,className:"flex-1 bg-gradient-to-r from-green-500 to-emerald-500 text-white py-2.5 rounded-lg font-semibold hover:shadow-lg hover:scale-[1.01] transition-all duration-200 flex items-center justify-center gap-1.5 text-sm shadow-md shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{children:l("verify.continue")})]})]})]})]})}function T4({onVerified:t,onCancel:s,orderSummary:a}){const{t:r}
1032=os(),[l,n]=o.useState(""),[i,c]=o.useState(!1),[d,x]=o.useState(""),[m,h]=o.useState(null),f=async()=>{if(!l.trim()){x("Please enter a channel URL or ID");return}c(!0),x(""),h(null);try{const N=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_youtube_channel",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({channelInput:l.trim()})})).json();if(!N.success)throw new Error(N.error||"Failed to verify channel");h(N.data)}catch(w){console.error("Verification error:",w),x(w instanceof Error?w.message:"An unexpected error occurred")}finally{c(!1)}},y=()=>{if(m){const w=`https://www.youtube.com/channel/${m.channelId}`;t(w,m)}},g=w=>w>=1e9?(w/1e9).toFixed(1)+"B":w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":w.toString();return e.jsxs("div",{className:"max-w-lg mx-auto space-y-4",children:[a&&e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"w-0.5 h-5 bg-gradient-to-b from-red-500 to-red-600 rounded-full"}),e.jsx("h3",{className:"text-sm font-bold text-slate-900",children:r("verify.order_summary")})]}),e.jsxs("div",{className:"space-y-2 text-xs",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.platform")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.platform})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.service")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.serviceType})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.quantity")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.quantity.toLocaleString()})]}),a.isMembershipRequired&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.member_discount")}),e.jsx("span",{className:"font-semibold text-green-600",children:"-50%"})]}),e.jsx("div",{className:"border-t border-slate-100 pt-2 mt-2",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-bold text-slate-900 text-sm",children:r("verify.total")}),a.isMembershipRequired?e.jsxs("div",{className:"text-right",children:[e.jsxs("span",{className:"text-xs text-slate-400 line-through block",children:["$",a.originalPrice]}),e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",a.price]})]}):e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",a.price]})]})})]}),a.isMembershipRequired&&e.jsx("div",{className:"mt-3 bg-gradient-to-r from-amber-50 to-orange-50 border border-amber-200/80 rounded-lg p-2.5",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-gradient-to-br from-amber-400 to-orange-500 p-1 rounded-md",children:e.jsx(Vt,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-amber-900 text-[11px]",children:r("verify.signup_discount_title")}),e.jsxs("div",{className:"text-[10px] text-amber-700",children:["Sign up to get this package for $",a.price," instead of $",a.originalPrice,"."]})]})]})})]}),!m&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-red-500/20 via-red-600/20 to-red-500/20 rounded-xl blur"}),e.jsxs("div",{className:"relative bg-white rounded-xl border border-slate-200/80 p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[e.jsx("div",{className:"bg-gradient-to-br from-red-500 to-red-600 p-2 rounded-lg",children:e.jsx(Qi,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900 text-sm",children:r("verify.youtube_channel")}),e.jsx("p",{className:"text-[11px] text-slate-500",children:r("verify.enter_channel_link")})]})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-red-500 via-red-600 to-red-500 rounded-lg opacity-0 group-focus-within:opacity-100 blur transition duration-300"}),e.jsx("div",{className:"relative flex items-center",children:e.jsx("input",{type:"text",value:l,onCh
1032ange:w=>n(w.target.value),onKeyPress:w=>w.key==="Enter"&&f(),placeholder:"@channel or youtube.com/channel/...",disabled:i,className:"w-full px-3 py-3 bg-slate-50/80 border border-slate-200 rounded-lg focus:border-red-500 focus:bg-white focus:outline-none transition-all duration-300 text-sm font-medium text-slate-900 placeholder:text-slate-400 disabled:opacity-50 disabled:cursor-not-allowed"})})]}),e.jsx("div",{className:"mt-2 text-[11px] text-slate-400",children:"@channelhandle / youtube.com/@handle / youtube.com/channel/UCxxxxx"})]})]}),d&&e.jsx("div",{className:"bg-red-50 border border-red-200/80 rounded-xl p-3",children:e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"bg-red-500 p-1.5 rounded-lg flex-shrink-0",children:e.jsx(st,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-red-900 text-xs",children:r("verify.error_generic")}),e.jsx("div",{className:"text-xs text-red-700 mt-0.5",children:d})]})]})}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-emerald-50 border border-emerald-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx($t,{className:"w-3 h-3 text-emerald-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-emerald-800 whitespace-nowrap",children:r("checkout.no_password")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-red-50 border border-red-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(Ct,{className:"w-3 h-3 text-red-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-red-800 whitespace-nowrap",children:r("verify.public_only")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-amber-50 border border-amber-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(rt,{className:"w-3 h-3 text-amber-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-amber-800 whitespace-nowrap",children:r("package.instant_start")})]})]}),e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx("button",{onClick:s,disabled:i,className:"flex-1 bg-slate-100 hover:bg-slate-200 text-slate-700 py-2.5 rounded-lg font-semibold transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed border border-slate-200 text-sm",children:r("verify.cancel")}),e.jsxs("button",{onClick:f,disabled:i||!l.trim(),className:"group relative flex-1 overflow-hidden bg-gradient-to-r from-red-500 via-red-600 to-red-500 text-white py-2.5 rounded-lg font-semibold shadow-md shadow-red-500/20 hover:shadow-lg hover:shadow-red-500/30 hover:scale-[1.01] transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 flex items-center justify-center gap-1.5 text-sm",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),i?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin relative"}),e.jsx("span",{className:"relative",children:r("verify.verifying")})]}):e.jsxs(e.Fragment,{children:[e.jsx(lt,{className:"w-4 h-4 relative"}),e.jsx("span",{className:"relative",children:r("verify.verify_channel")})]})]})]})]}),m&&e.jsxs("div",{className:"space-y-4 animate-in fade-in zoom-in duration-500",children:[e.jsxs("div",{className:"bg-gradient-to-br from-red-50 via-rose-50 to-white border border-red-200 rounded-xl overflow-hidden shadow-sm",children:[m.banner&&e.jsx("div",{className:"h-16 overflow-hidden",children:e.jsx("img",{src:m.banner,alt:"Channel banner",className:"w-full h-full object-cover"})}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[m.avatar?e.jsx("img",{src:m.avatar,alt:m.title,className:"w-14 h-14 rounded-full border-2 border-white shadow-md object-cover"}):e.jsx("div",{className:"w-14 h-14 rounded-full border-2 border-white shadow-md flex items-center justify-center bg-gradient-to-br from-red-500 to-red-600 text-white text-lg font-bold",children:m.title.charAt(0).toUpperCase()}),m.isVerified&&e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 bg-slate-800 rounded-full p-0.5",children:e.jsx(kl,{className:"w-3 h-3 text-white"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-base font-bold text-slate-900 truncate",children:m.title}),m.canonicalUrl&&e.jsx("div",{className:"text-xs text-slate-500 truncate",children:m.canonicalUrl}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 mt-1",children:[m.isVerified&&e.jsxs("div",{className:"inline-flex items-center gap-0.5 bg-slate-100 px-1.5 py-0.5 rounded-full text-[10px] text-slate-700",children:[e.jsx(kl,{className:"w-2.5 h-2.5"}),e.jsx("span",{children:r("verify.verified")})]}),m.country&&e.jsxs("div",{className:"inline-flex items-center gap-0.5 bg-slate-100 px-1.5 py-0.5 rounded-full text-[10px] text-slate-600",children:[e.jsx(wt,{className:"w-2.5 h-2.5"}),e.jsx("span",{children:m.country})]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3",children:[e.jsxs("div",{className:"bg-white/80 rounded-lg p-2.5 text-center",children:[e.jsx(mt,{className:"w-3.5 h-3.5 text-red-600 mx-auto mb-1"}),e.jsx("div",{className:"text-lg font-bold text-slate-900",children:g(m.subscriberCount)}),e.jsx("div",{className:"text-[11px] text-slate-500",children:r("verify.subscribers")})]}),e.jsxs("div",{className:"bg-white/80 rounded-lg p-2.5 text-center",children:[e.jsx(Ct,{className:"w-3.5 h-3.5 text-red-600 mx-auto mb-1"}),e.jsx("div",{className:"text-lg font-bold text-slate-900",children:g(m.viewCount)}),e.jsx("div",{className:"text-[11px] text-slate-500",children:r("verify.views")})]})]}),m.joinedDate&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-500 mb-2",children:[e.jsx(Ds,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:m.joinedDate})]}),m.description&&e.jsxs("div",{className:"bg-white/80 rounded-lg p-2.5",children:[e.jsx("div",{className:"text-[11px] font-semibold text-slate-600 mb-1",children:r("verify.about")}),e.jsx("p",{className:"text-xs text-slate-600 leading-relaxed whitespace-pre-wrap line-clamp-3",children:m.description})]})]})]}),e.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-green-900 text-xs",children:r("verify.channel_verified")}),e.jsx("div",{className:"text-[11px] text-green-700 mt-0.5",children:r("verify.confirm_channel")})]})]})}),e.jsxs("div",{className:"flex flex-col-reverse sm:flex-row gap-2.5",children:[e.jsx("button",{onClick:()=>{h(null),n(""),x("")},className:"flex-1 bg-slate-100 text-slate-700 py-2.5 rounded-lg font-semibold hover:bg-slate-200 transition-all duration-200 text-sm",children:r("verify.try_again")}),e.jsxs("button",{onClick:y,className:"flex-1 bg-gradient-to-r from-green-500 to-emerald-500 text-white py-2.5 rounded-lg font-semibold hover:shadow-lg hover:scale-[1.01] transition-all duration-200 flex items-center justify-center gap-1.5 text-sm shadow-md shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{children:r("verify.continue")})]})]})]})]})}function P4({onVerified:t,onCancel:s}){const{t:a}
1032=os(),[r,l]=o.useState(""),[n,i]=o.useState(!1),[c,d]=o.useState(""),[x,m]=o.useState(null),h=async()=>{var g,w;if(!r.trim()){d("Please enter a Facebook page URL or username");return}i(!0),d(""),m(null);try{const v=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_facebook_profile",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({username:r.trim()})})).json();if(!v||typeof v!="object")throw new Error("Invalid response from server.");if(v.success===!1)throw new Error(v.error||"Failed to verify profile.");if(!((g=v.data)!=null&&g.full_name)&&!((w=v.data)!=null&&w.username))throw new Error("Unable to verify profile. No data received.");m(v.data)}catch(N){const v=N instanceof Error?N.message:"An unexpected error occurred.";d(v)}finally{i(!1)}},f=()=>{x&&t(x.username||r.trim(),x)},y=g=>g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":g.toString();return e.jsx("div",{className:"max-w-lg mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-blue-700 px-5 py-4 text-white",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-white/20 p-2 rounded-xl backdrop-blur-sm",children:e.jsx(Vn,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold",children:a("verify.verify_profile")}),e.jsx("p",{className:"text-blue-100 text-sm",children:a("verify.enter_username")})]})]})}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-blue-50 rounded-xl p-3 border border-blue-100",children:[e.jsx(lt,{className:"w-4 h-4 text-blue-600 flex-shrink-0"}),e.jsx("p",{className:"text-xs text-blue-700",children:a("verify.security_notice")})]}),x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-50 to-white rounded-xl border border-blue-100 p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[x.profile_pic_url?e.jsx("img",{src:x.profile_pic_url,alt:x.full_name,className:"w-14 h-14 rounded-full border-2 border-blue-200 object-cover",onError:g=>{g.target.style.display="none"}}):e.jsx("div",{className:"w-14 h-14 rounded-full bg-blue-100 flex items-center justify-center border-2 border-blue-200",children:e.jsx(Vn,{className:"w-7 h-7 text-blue-600"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("h4",{className:"font-bold text-slate-900 truncate",children:x.full_name}),x.is_verified&&e.jsx(ne,{className:"w-4 h-4 text-blue-500 flex-shrink-0"})]}),x.username&&e.jsxs("p",{className:"text-sm text-slate-500 truncate",children:["@",x.username]}),x.category&&e.jsx("p",{className:"text-xs text-blue-600 mt-0.5",children:x.category})]}),e.jsx("div",{className:"bg-green-100 p-1.5 rounded-full",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"bg-white rounded-lg p-2.5 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(mt,{className:"w-3.5 h-3.5 text-blue-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("verify.followers")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-sm",children:y(x.follower_count)})]}),e.jsxs("div",{className:"bg-white rounded-lg p-2.5 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(nw,{className:"w-3.5 h-3.5 text-blue-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("verify.likes")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-sm",children:y(x.likes_count)})]})]})]}),e.jsxs("div",{className:"flex items-start gap-2 bg-green-50 rounded-xl p-3 border border-green-100",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-green-800",children:a("verify.profile_found")})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{m(null),l("")},className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",children:a("verify.try_again")}),e.jsxs("button",{onClick:f,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 rounded-xl transition-all shadow-lg shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4"}),a("verify.continue")]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:a("verify.facebook_page_url")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(wt,{className:"h-5 w-5 text-slate-400"})}),e.jsx("input",{type:"text",value:r,onChange:g=>{l(g.target.value),d("")},onKeyDown:g=>g.key==="Enter"&&!n&&h(),placeholder:"https://facebook.com/yourpage or username",className:"w-full pl-10 pr-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all text-sm",disabled:n})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-1.5",children:'Examples: facebook.com/nike, @nike, or just "nike"'})]}),c&&e.jsxs("div",{className:"flex items-start gap-2 bg-red-50 rounded-xl p-3 border border-red-100",children:[e.jsx(st,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-red-700",children:c})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:s,className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",disabled:n,children:a("verify.cancel")}),e.jsx("button",{onClick:h,disabled:n||!r.trim(),className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-blue-500/20",children:n?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"}),a("verify.verifying")]}):e.jsxs(e.Fragment,{children:[e.jsx(Vt,{className:"w-4 h-4"}),a("verify.verify_profile")]})})]})]})]})]})})}function A4({orderType:t="comments",onVerified:s,onCancel:a}){const{t:r}
1032=os(),[l,n]=o.useState(""),[i,c]=o.useState(!1),[d,x]=o.useState(""),[m,h]=o.useState(null),f=async()=>{if(!l.trim()){x("Please enter a Facebook post URL");return}if(!l.includes("facebook.com")&&!l.includes("fb.com")&&!l.includes("fb.watch")){x("Please enter a valid Facebook post URL");return}c(!0),x(""),h(null);try{const N=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_facebook_post",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({post_url:l.trim()})})).json();if(!N||N.success===!1)throw new Error((N==null?void 0:N.error)||"Failed to verify post.");if(!N.data)throw new Error("Unable to verify post. No data received.");h(N.data)}catch(w){const N=w instanceof Error?w.message:"An unexpected error occurred.";x(N)}finally{c(!1)}},y=()=>{m&&s(m.source_url,m)},g=w=>w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":w.toString();return e.jsx("div",{className:"max-w-lg mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-blue-700 px-5 py-4 text-white",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-white/20 p-2 rounded-xl backdrop-blur-sm",children:e.jsx(Vn,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold",children:r("verify.verify_post")}),e.jsx("p",{className:"text-blue-100 text-sm",children:r("verify.enter_post_link")})]})]})}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-blue-50 rounded-xl p-3 border border-blue-100",children:[e.jsx(lt,{className:"w-4 h-4 text-blue-600 flex-shrink-0"}),e.jsx("p",{className:"text-xs text-blue-700",children:r("verify.security_notice")})]}),m?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-50 to-white rounded-xl border border-blue-100 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"bg-blue-100 p-1.5 rounded-full",children:e.jsx(Vn,{className:"w-4 h-4 text-blue-600"})}),e.jsx("span",{className:"font-semibold text-slate-900 text-sm",children:m.page_name||"Facebook Post"}),e.jsx("div",{className:"ml-auto bg-green-100 p-1 rounded-full",children:e.jsx(ne,{className:"w-4 h-4 text-green-600"})})]}),m.text&&e.jsx("p",{className:"text-sm text-slate-700 mb-3 line-clamp-3 bg-white rounded-lg p-3 border border-slate-100",children:m.text}),e.jsx("div",{className:"flex items-center gap-1 mb-2",children:e.jsx("span",{className:"text-xs px-2 py-0.5 bg-blue-100 text-blue-700 rounded-full font-medium capitalize",children:m.media_type})}),e.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[e.jsxs("div",{className:"bg-white rounded-lg p-2 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(ia,{className:"w-3 h-3 text-red-500"}),e.jsx("span",{className:"text-[10px] text-slate-500",children:r("verify.likes")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-xs",children:g(m.likes_count)})]}),e.jsxs("div",{className:"bg-white rounded-lg p-2 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(Ls,{className:"w-3 h-3 text-blue-500"}),e.jsx("span",{className:"text-[10px] text-slate-500",children:r("verify.comments")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-xs",children:g(m.comments_count)})]}),e.jsxs("div",{className:"bg-white rounded-lg p-2 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(Ki,{className:"w-3 h-3 text-green-500"}),e.jsx("span",{className:"text-[10px] text-slate-500",children:r("verify.shares")}
1032)]}),e.jsx("p",{className:"font-bold text-slate-900 text-xs",children:g(m.shares_count)})]})]})]}),e.jsxs("div",{className:"flex items-start gap-2 bg-green-50 rounded-xl p-3 border border-green-100",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-green-800",children:r("verify.post_verified")})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{h(null),n("")},className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",children:r("verify.try_again")}),e.jsxs("button",{onClick:y,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 rounded-xl transition-all shadow-lg shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4"})," ",r("verify.continue")]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:r("verify.facebook_post_url")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(hn,{className:"h-5 w-5 text-slate-400"})}),e.jsx("input",{type:"text",value:l,onChange:w=>{n(w.target.value),x("")},onKeyDown:w=>w.key==="Enter"&&!i&&f(),placeholder:"https://www.facebook.com/.../posts/...",className:"w-full pl-10 pr-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all text-sm",disabled:i})]}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1.5",children:["Paste the full URL of the Facebook post you want ",t==="likes"?"likes":"comments"," on"]})]}),d&&e.jsxs("div",{className:"flex items-start gap-2 bg-red-50 rounded-xl p-3 border border-red-100",children:[e.jsx(st,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-red-700",children:d})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:a,className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",disabled:i,children:r("verify.cancel")}),e.jsx("button",{onClick:f,disabled:i||!l.trim(),className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-blue-500/20",children:i?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"})," ",r("verify.verifying")]}):e.jsxs(e.Fragment,{children:[e.jsx(Vt,{className:"w-4 h-4"})," ",r("verify.verify_post")]})})]})]})]})]})})}const cf=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})});function M4({onVerified:t,onCancel:s}){const{t:a}=os(),[r,l]=o.useState(""),[n,i]=o.useState(!1),[c,d]=o.useState(""),[x,m]=o.useState(null),h=async()=>{var g;if(!r.trim()){d("Please enter a Telegram channel or group link");return}i(!0),d(""),m(null);try{const N=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_telegram_channel",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({channel:r.trim()})})).json();if(!N||N.success===!1)throw new Error((N==null?void 0:N.error)||"Failed to verify channel.");if(!((g=N.data)!=null&&g.title))throw new Error("Unable to verify channel. No data received.");m(N.data)}catch(w){const N=w instanceof Error?w.message:"An unexpected error occurred.";d(N)}finally{i(!1)}},f=()=>{x&&t(x.username?`https://t.me/${x.username}`:r.trim(),x)},y=g=>g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":g.toString();return e.jsx("div",{className:"max-w-lg mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-sky-500 to-blue-500 px-5 py-4 text-white",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-white/20 p-2 rounded-xl backdrop-blur-sm",children:e.jsx(cf,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold",children:a("verify.verify_channel")}),e.jsx("p",{className:"text-sky-100 text-sm",children:a("verify.enter_channel_link")})]})]})}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-sky-50 rounded-xl p-3 border border-sky-100",children:[e.jsx(lt,{className:"w-4 h-4 text-sky-600 flex-shrink-0"}),e.jsx("p",{className:"text-xs text-sky-700",children:a("verify.security_notice")})]}),x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-gradient-to-br from-sky-50 to-white rounded-xl border border-sky-100 p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[x.photo_url?e.jsx("img",{src:x.photo_url,alt:x.title,className:"w-14 h-14 roun
1032ded-full border-2 border-sky-200 object-cover",onError:g=>{g.target.style.display="none"}}):e.jsx("div",{className:"w-14 h-14 rounded-full bg-sky-100 flex items-center justify-center border-2 border-sky-200",children:e.jsx(cf,{className:"w-7 h-7 text-sky-600"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("h4",{className:"font-bold text-slate-900 truncate",children:x.title}),x.is_verified&&e.jsx(ne,{className:"w-4 h-4 text-sky-500 flex-shrink-0"})]}),x.username&&e.jsxs("p",{className:"text-sm text-slate-500 truncate",children:["@",x.username]}),e.jsx("p",{className:"text-xs text-sky-600 mt-0.5 capitalize",children:x.channel_type})]}),e.jsx("div",{className:"bg-green-100 p-1.5 rounded-full",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})})]}),x.description&&e.jsx("p",{className:"text-xs text-slate-600 mb-3 line-clamp-2",children:x.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"bg-white rounded-lg p-2.5 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(mt,{className:"w-3.5 h-3.5 text-sky-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("verify.members")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-sm",children:y(x.member_count)})]}),e.jsxs("div",{className:"bg-white rounded-lg p-2.5 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(fc,{className:"w-3.5 h-3.5 text-sky-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("verify.type")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-sm capitalize",children:x.channel_type})]})]})]}),e.jsxs("div",{className:"flex items-start gap-2 bg-green-50 rounded-xl p-3 border border-green-100",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-green-800",children:a("verify.channel_verified")})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{m(null),l("")},className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",children:a("verify.try_again")}),e.jsxs("button",{onClick:f,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 rounded-xl transition-all shadow-lg shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4"})," ",a("verify.continue")]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:a("verify.telegram_channel_link")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(wt,{className:"h-5 w-5 text-slate-400"})}),e.jsx("input",{type:"text",value:r,onChange:g=>{l(g.target.value),d("")},onKeyDown:g=>g.key==="Enter"&&!n&&h(),placeholder:"https://t.me/yourchannel or @yourchannel",className:"w-full pl-10 pr-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-sky-500 focus:border-sky-500 transition-all text-sm",disabled:n})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-1.5",children:"Examples: t.me/durov, @telegram, or just the channel name"})]}),c&&e.jsxs("div",{className:"flex items-start gap-2 bg-red-50 rounded-xl p-3 border border-red-100",children:[e.jsx(st,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-red-700",children:c})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:s,className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",disabled:n,children:a("verify.cancel")}),e.jsx("button",{onClick:h,disabled:n||!r.trim(),className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-sky-500 to-blue-500 hover:from-sky-600 hover:to-blue-600 rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-sky-500/20",children:n?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"})," ",a("verify.verifying")]}):e.jsxs(e.Fragment,{children:[e.jsx(Vt,{className:"w-4 h-4"})," ",a("verify.verify_channel")]})})]})]})]})]})})}const df=({className:t})=>
1032e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z"})});function E4({onVerified:t,onCancel:s}){const{t:a}=os(),[r,l]=o.useState(""),[n,i]=o.useState(!1),[c,d]=o.useState(""),[x,m]=o.useState(null),h=async()=>{var g;if(!r.trim()){d("Please enter a Discord server invite link");return}i(!0),d(""),m(null);try{const N=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_discord_server",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({invite_url:r.trim()})})).json();if(!N||N.success===!1)throw new Error((N==null?void 0:N.error)||"Failed to verify server.");if(!((g=N.data)!=null&&g.name))throw new Error("Unable to verify server. No data received.");m(N.data)}catch(w){const N=w instanceof Error?w.message:"An unexpected error occurred.";d(N)}finally{i(!1)}},f=()=>{x&&t(r.trim(),x)},y=g=>g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":g.toString();return e.jsx("div",{className:"max-w-lg mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-indigo-500 to-violet-600 px-5 py-4 text-white",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-white/20 p-2 rounded-xl backdrop-blur-sm",children:e.jsx(df,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold",children:a("verify.verify_server")}),e.jsx("p",{className:"text-indigo-100 text-sm",children:a("verify.enter_server_link")})]})]})}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-indigo-50 rounded-xl p-3 border border-indigo-100",children:[e.jsx(lt,{className:"w-4 h-4 text-indigo-600 flex-shrink-0"}),e.jsx("p",{className:"text-xs text-indigo-700",children:a("verify.security_notice")})]}),x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-gradient-to-br from-indigo-50 to-white rounded-xl border border-indigo-100 p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[x.icon_url?e.jsx("img",{src:x.icon_url,alt:x.name,className:"w-14 h-14 rounded-full border-2 border-indigo-200 object-cover",onError:g=>{g.target.style.display="none"}}):e.jsx("div",{className:"w-14 h-14 rounded-full bg-indigo-100 flex items-center justify-center border-2 border-indigo-200",children:e.jsx(df,{className:"w-7 h-7 text-indigo-600"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("h4",{className:"font-bold text-slate-900 truncate",children:x.name}),x.is_verified&&e.jsx(ne,{className:"w-4 h-4 text-indigo-500 flex-shrink-0"})]}),x.server_id&&e.jsxs("p",{className:"text-sm text-slate-500 truncate",children:["ID: ",x.server_id]})]}),e.jsx("div",{className:"bg-green-100 p-1.5 rounded-full",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})})]}),x.description&&e.jsx("p",{className:"text-xs text-slate-600 mb-3 line-clamp-2",children:x.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"bg-white rounded-lg p-2.5 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(mt,{className:"w-3.5 h-3.5 text-indigo-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("verify.members")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-sm",children:y(x.member_count)})]}),e.jsxs("div",{className:"bg-white rounded-lg p-2.5 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(fc,{className:"w-3.5 h-3.5 text-green-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("verify.online")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-sm",children:y(x.online_count)})]})]})]}),e.jsxs("div",{className:"flex items-start gap-2 bg-green-50 rounded-xl p-3 border border-green-100",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-green-800",children:a("verify.server_verified")})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{m(null),l("")},className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",children:a("verify.try_again")}),e.jsxs("button",{onClick:f,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 rounded-xl transition-all shadow-lg shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4"})," ",a("verify.continue")]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:a("verify.discord_invite_link")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(wt,{className:"h-5 w-5 text-slate-400"})}),e.jsx("input",{type:"text",value:r,onChange:g=>{l(g.target.value),d("")},onKeyDown:g=>g.key==="Enter"&&!n&&h(),placeholder:"https://discord.gg/invite-code",className:"w-full pl-10 pr-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-all text-sm",disabled:n})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-1.5",children:"Examples: discord.gg/abcdef, https://discord.gg/invite-code"})]}),c&&e.jsxs("div",{className:"flex items-start gap-2 bg-red-50 rounded-xl p-3 border border-red-100",children:[e.jsx(st,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-red-700",children:c})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:s,className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",disabled:n,children:a("verify.cancel")}),e.jsx("button",{onClick:h,disabled:n||!r.trim(),className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-indigo-500 to-violet-600 hover:from-indigo-600 hover:to-violet-700 rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-indigo-500/20",children:n?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"})," ",a("verify.verifying")]}):e.jsxs(e.Fragment,{children:[e.jsx(Vt,{className:"w-4 h-4"})," ",a("verify.verify_server")]})})]})]})]})]})})}const mf=({className:t})=>
1032e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z"})});function D4({onVerified:t,onCancel:s}){const{t:a}=os(),[r,l]=o.useState(""),[n,i]=o.useState(!1),[c,d]=o.useState(""),[x,m]=o.useState(null),h=async()=>{var g;if(!r.trim()){d("Please enter a Twitch username or profile URL");return}i(!0),d(""),m(null);try{const N=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_twitch_profile",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({username:r.trim()})})).json();if(!N||N.success===!1)throw new Error((N==null?void 0:N.error)||"Failed to verify profile.");if(!((g=N.data)!=null&&g.username))throw new Error("Unable to verify profile. No data received.");m(N.data)}catch(w){const N=w instanceof Error?w.message:"An unexpected error occurred.";d(N)}finally{i(!1)}},f=()=>{x&&t(`https://www.twitch.tv/${x.username}`,x)},y=g=>g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":g.toString();return e.jsx("div",{className:"max-w-lg mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-purple-600 to-violet-700 px-5 py-4 text-white",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-white/20 p-2 rounded-xl backdrop-blur-sm",children:e.jsx(mf,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold",children:a("verify.verify_profile")}),e.jsx("p",{className:"text-purple-100 text-sm",children:a("verify.enter_username")})]})]})}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-purple-50 rounded-xl p-3 border border-purple-100",children:[e.jsx(lt,{className:"w-4 h-4 text-purple-600 flex-shrink-0"}),e.jsx("p",{className:"text-xs text-purple-700",children:a("verify.security_notice")})]}),x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-gradient-to-br from-purple-50 to-white rounded-xl border border-purple-100 p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[x.profile_image_url?e.jsx("img",{src:x.profile_image_url,alt:x.display_name,className:"w-14 h-14 rounded-full border-2 border-purple-200 object-cover",onError:g=>{g.target.style.display="none"}}):e.jsx("div",{className:"w-14 h-14 rounded-full bg-purple-100 flex items-center justify-center border-2 border-purple-200",children:e.jsx(mf,{className:"w-7 h-7 text-purple-600"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("h4",{className:"font-bold text-slate-900 truncate",children:x.display_name}),x.is_verified&&e.jsx(ne,{className:"w-4 h-4 text-purple-500 flex-shrink-0"})]}),e.jsxs("p",{className:"text-sm text-slate-500 truncate",children:["@",x.username]}),x.is_live&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-red-600 font-medium mt-0.5",children:[e.jsx("span",{className:"w-2 h-2 bg-red-500 rounded-full animate-pulse"}),"LIVE"]})]}),e.jsx("div",{className:"bg-green-100 p-1.5 rounded-full",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})})]}),x.description&&e.jsx("p",{className:"text-xs text-slate-600 mb-3 line-clamp-2",children:x.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"bg-white rounded-lg p-2.5 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(mt,{className:"w-3.5 h-3.5 text-purple-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("verify.followers")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-sm",children:y(x.follower_count)})]}),e.jsxs("div",{className:"bg-white rounded-lg p-2.5 text-center border border-slate-100",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 mb-0.5",children:[e.jsx(Ct,{className:"w-3.5 h-3.5 text-red-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("verify.viewers")})]}),e.jsx("p",{className:"font-bold text-slate-900 text-sm",children:x.is_live?y(x.viewer_count):a("verify.offline")})]})]})]}),e.jsxs("div",{className:"flex items-start gap-2 bg-green-50 rounded-xl p-3 border border-green-100",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-green-800",children:a("verify.profile_found")})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{m(null),l("")},className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",children:a("verify.try_again")}),e.jsxs("button",{onClick:f,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 rounded-xl transition-all shadow-lg shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4"})," ",a("verify.continue")]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:a("verify.twitch_username")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(wt,{className:"h-5 w-5 text-slate-400"})}),e.jsx("input",{type:"text",value:r,onChange:g=>{l(g.target.value),d("")},onKeyDown:g=>g.key==="Enter"&&!n&&h(),placeholder:"https://www.twitch.tv/username or username",className:"w-full pl-10 pr-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-all text-sm",disabled:n})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-1.5",children:"Examples: twitch.tv/shroud, shroud, or the full profile URL"})]}),c&&e.jsxs("div",{className:"flex items-start gap-2 bg-red-50 rounded-xl p-3 border border-red-100",children:[e.jsx(st,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-red-700",children:c})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:s,className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",disabled:n,children:a("verify.cancel")}),e.jsx("button",{onClick:h,disabled:n||!r.trim(),className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-purple-600 to-violet-700 hover:from-purple-700 hover:to-violet-800 rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-purple-500/20",children:n?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"})," ",a("verify.verifying")]}):e.jsxs(e.Fragment,{children:[e.jsx(Vt,{className:"w-4 h-4"})," ",a("verify.verify_profile")]})})]})]})]})]})})}const R4=({className:t})=>
1032e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})});function F4({onVerified:t,onCancel:s}){const{t:a}=os(),[r,l]=o.useState(""),[n,i]=o.useState(!1),[c,d]=o.useState(""),[x,m]=o.useState(""),[h,f]=o.useState(""),[y,g]=o.useState(!1),[w,N]=o.useState(!1),v=C=>{const S=C.trim(),k=[/open\.spotify\.com\/playlist\/([a-zA-Z0-9]+)/,/spotify\.com\/playlist\/([a-zA-Z0-9]+)/,/spotify:playlist:([a-zA-Z0-9]+)/];for(const J of k){const u=S.match(J);if(u)return u[1]}return/^[a-zA-Z0-9]{22}$/.test(S)?S:null},j=o.useCallback(async()=>{if(!r.trim()){d(a("verify.spotify_url_required")||"Please enter a Spotify playlist URL");return}if(!v(r)){d(a("verify.spotify_url_required")||"Please enter a valid Spotify playlist URL");return}i(!0),d(""),m(""),g(!1),N(!1);try{const k=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_spotify_playlist",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({url:r.trim()})})).json();if(!(k!=null&&k.success))throw new Error((k==null?void 0:k.error)||"Failed to verify playlist.");f(k.data.url),m(k.data.embed_url)}catch(S){d(S instanceof Error?S.message:"An unexpected error occurred."),i(!1)}},[r,a]),b=()=>{h&&t(h,{name:"Spotify Playlist",description:"",owner_name:"",track_count:0,follower_count:0,image_url:"",url:h,is_public:!0})},p=()=>{g(!0),i(!1)},E=()=>{N(!0),i(!1),d(a("verify.spotify_not_found")||"Spotify playlist not found. Please check the URL and make sure the playlist is public."),m("")};return e.jsx("div",{className:"max-w-lg mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-[#1DB954] to-[#1ed760] px-5 py-4 text-white",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-white/20 p-2 rounded-xl backdrop-blur-sm",children:e.jsx(R4,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold",children:a("verify.verify_spotify_playlist")||"Verify Playlist"}),e.jsx("p",{className:"text-green-100 text-sm",children:a("verify.enter_spotify_url")||"Enter your Spotify playlist URL"})]})]})}),e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-green-50 rounded-xl p-3 border border-green-100",children:[e.jsx(lt,{className:"w-4 h-4 text-green-600 flex-shrink-0"}),e.jsx("p",{className:"text-xs text-green-700",children:a("verify.security_notice")})]}),x?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rounded-xl overflow-hidden border border-green-100 bg-slate-50",children:[n&&!y&&e.jsxs("div",{className:"flex items-center justify-center py-16",children:[e.jsx(Ne,{className:"w-6 h-6 animate-spin text-green-500"}),e.jsx("span",{className:"ml-2 text-sm text-slate-500",children:a("verify.loading_playlist")||"Loading playlist..."})]}),e.jsx("iframe",{src:x,width:"100%",height:"352",frameBorder:"0",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",onLoad:p,onError:E,className:`rounded-xl ${n&&!y?"h-0 overflow-hidden":""}`,style:{borderRadius:"12px"}})]}),y&&e.jsxs("div",{className:"flex items-start gap-2 bg-green-50 rounded-xl p-3 border border-green-100",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-green-800",children:a("verify.playlist_found")||"Playlist verified successfully!"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>{m(""),l(""),g(!1),N(!1)},className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",children:a("verify.try_again")}),e.jsxs("button",{onClick:b,disabled:!y,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 rounded-xl transition-all shadow-lg shadow-green-500/20 disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(ne,{className:"w-4 h-4"})," ",a("verify.continue")]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1.5",children:a("verify.spotify_playlist_url")||"Spotify Playlist URL"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(wt,{className:"h-5 w-5 text-slate-400"})}),e.jsx("input",{type:"text",value:r,onChange:C=>{l(C.target.value),d("")},onKeyDown:C=>C.key==="Enter"&&!n&&j(),placeholder:"https://open.spotify.com/playlist/...",className:"w-full pl-10 pr-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-green-500 focus:border-green-500 transition-all text-sm",disabled:n})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-1.5",children:a("verify.spotify_url_hint")||"Paste the full Spotify playlist link"})]}),c&&e.jsxs("div",{className:"flex items-start gap-2 bg-red-50 rounded-xl p-3 border border-red-100",children:[e.jsx(st,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-red-700",children:c})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:s,className:"flex-1 px-4 py-3 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 rounded-xl transition-all",disabled:n,children:a("verify.cancel")}),e.jsx("button",{onClick:j,disabled:n||!r.trim(),className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-white bg-gradient-to-r from-[#1DB954] to-[#1ed760] hover:from-[#1a
1032a34a] hover:to-[#1bc756] rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-green-500/20",children:n?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"})," ",a("verify.verifying")]}):e.jsxs(e.Fragment,{children:[e.jsx(Vt,{className:"w-4 h-4"})," ",a("verify.verify_playlist")||"Verify Playlist"]})})]})]})]})]})})}function O4({onVerified:t,onCancel:s,orderSummary:a}){const{t:r}=os(),[l,n]=o.useState(""),[i,c]=o.useState(!1),[d,x]=o.useState(""),[m,h]=o.useState(null),f=async()=>{if(!l.trim()){x("Please enter a video URL");return}c(!0),x(""),h(null);try{const v=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/verify_youtube_video",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({videoInput:l.trim()})})).json();if(!v.success)throw new Error(v.error||"Failed to verify video");h(v.data)}catch(N){console.error("Verification error:",N),x(N instanceof Error?N.message:"An unexpected error occurred")}finally{c(!1)}},y=()=>{if(m){const N=`https://www.youtube.com/watch?v=${m.videoId}`;t(N,m)}},g=N=>N>=1e9?(N/1e9).toFixed(1)+"B":N>=1e6?(N/1e6).toFixed(1)+"M":N>=1e3?(N/1e3).toFixed(1)+"K":N.toString(),w=N=>{if(!N)return"";try{return new Date(N).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return N}};return e.jsxs("div",{className:"max-w-lg mx-auto space-y-4",children:[a&&e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"w-0.5 h-5 bg-gradient-to-b from-red-500 to-red-600 rounded-full"}),e.jsx("h3",{className:"text-sm font-bold text-slate-900",children:r("verify.order_summary")})]}),e.jsxs("div",{className:"space-y-2 text-xs",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.platform")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.platform})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.service")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.serviceType})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.quantity")}),e.jsx("span",{className:"font-semibold text-slate-900",children:a.quantity.toLocaleString()})]}),a.isMembershipRequired&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:r("verify.member_discount")}),e.jsx("span",{className:"font-semibold text-green-600",children:"-50%"})]}),e.jsx("div",{className:"border-t border-slate-100 pt-2 mt-2",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-bold text-slate-900 text-sm",children:r("verify.total")}),a.isMembershipRequired?e.jsxs("div",{className:"text-right",children:[e.jsxs("span",{className:"text-xs text-slate-400 line-through block",children:["$",a.originalPrice]}),e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",a.price]})]}):e.jsxs("span",{className:"text-lg font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:["$",a.price]})]})})]}),a.isMembershipRequired&&e.jsx("div",{className:"mt-3 bg-gradient-to-r from-amber-50 to-orange-50 border border-amber-200/80 rounded-lg p-2.5",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-gradient-to-br from-amber-400 to-orange-500 p-1 rounded-md",children:e.jsx(Vt,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-amber-900 text-[11px]",children:r("verify.signup_discount_title")}),e.jsxs("div",{className:"text-[10px] text-amber-700",children:["Sign up to get this package for $",a.price," instead of $",a.originalPrice,"."]})]})]})})]}),!m&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-red-500/20 via-red-600/20 to-red-500/20 rounded-xl blur"}),e.jsxs("div",{className:"relative bg-white rounded-xl border border-slate-200/80 p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[e.jsx("div",{className:"bg-gradient-to-br from-red-500 to-red-600 p-2 rounded-lg",children:e.jsx(zs,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900 text-sm",children:r("verify.youtube_video_link")}),e.jsx("p",{className:"text-[11px] text-slate-500",children:r("verify.enter_video_link")})]})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-red-500 via-red-600 to-red-500 rounded-lg opacity-0 group-focus-within:opacity-100 blur transition duration-300"}),e.jsx("div",{className:"relative flex items-center",children:e.jsx("input",{type:"text",value:l,onCh
1032ange:N=>n(N.target.value),onKeyPress:N=>N.key==="Enter"&&f(),placeholder:"https://www.youtube.com/watch?v=...",disabled:i,className:"w-full px-3 py-3 bg-slate-50/80 border border-slate-200 rounded-lg focus:border-red-500 focus:bg-white focus:outline-none transition-all duration-300 text-sm font-medium text-slate-900 placeholder:text-slate-400 disabled:opacity-50 disabled:cursor-not-allowed"})})]}),e.jsx("div",{className:"mt-2 text-[11px] text-slate-400",children:"youtube.com/watch?v=ID / youtu.be/ID / youtube.com/shorts/ID"})]})]}),d&&e.jsx("div",{className:"bg-red-50 border border-red-200/80 rounded-xl p-3",children:e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"bg-red-500 p-1.5 rounded-lg flex-shrink-0",children:e.jsx(st,{className:"w-3 h-3 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-red-900 text-xs",children:r("verify.error_generic")}),e.jsx("div",{className:"text-xs text-red-700 mt-0.5",children:d})]})]})}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-emerald-50 border border-emerald-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx($t,{className:"w-3 h-3 text-emerald-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-emerald-800 whitespace-nowrap",children:r("checkout.no_password")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-red-50 border border-red-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(Ct,{className:"w-3 h-3 text-red-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-red-800 whitespace-nowrap",children:r("verify.public_only")})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-amber-50 border border-amber-200/60 rounded-md px-1.5 py-1 flex-1 min-w-0",children:[e.jsx(rt,{className:"w-3 h-3 text-amber-600 flex-shrink-0"}),e.jsx("span",{className:"text-[10px] font-medium text-amber-800 whitespace-nowrap",children:r("package.instant_start")})]})]}),e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx("button",{onClick:s,disabled:i,className:"flex-1 bg-slate-100 hover:bg-slate-200 text-slate-700 py-2.5 rounded-lg font-semibold transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed border border-slate-200 text-sm",children:r("verify.cancel")}),e.jsxs("button",{onClick:f,disabled:i||!l.trim(),className:"group relative flex-1 overflow-hidden bg-gradient-to-r from-red-500 via-red-600 to-red-500 text-white py-2.5 rounded-lg font-semibold shadow-md shadow-red-500/20 hover:shadow-lg hover:shadow-red-500/30 hover:scale-[1.01] transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 flex items-center justify-center gap-1.5 text-sm",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),i?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin relative"}),e.jsx("span",{className:"relative",children:r("verify.verifying")})]}):e.jsxs(e.Fragment,{children:[e.jsx(lt,{className:"w-4 h-4 relative"}),e.jsx("span",{className:"relative",children:r("verify.verify_video")})]})]})]})]}),m&&e.jsxs("div",{className:"space-y-4 animate-in fade-in zoom-in duration-500",children:[e.jsxs("div",{className:"bg-gradient-to-br from-red-50 via-rose-50 to-white border border-red-200 rounded-xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:m.thumbnail,alt:m.title,className:"w-full aspect-video object-cover"}),e.jsx("div",{className:"absolute bottom-1.5 right-1.5 bg-black/80 text-white text-[10px] font-medium px-1.5 py-0.5 rounded",children:m.duration}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"bg-red-600/90 rounded-full p-2.5",children:e.jsx(zs,{className:"w-6 h-6 text-white fill-white"})})})]}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"text-sm font-bold text-slate-900 line-clamp-2 mb-1.5",children:m.title}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-600 mb-3",children:[e.jsx(ls,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"font-medium",children:m.author})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3",children:[e.jsxs("div",{className:"bg-white/80 rounded-lg p-2.5 text-center",children:[e.jsx(Ct,{className:"w-3.5 h-3.5 text-red-600 mx-auto mb-1"}),e.jsx("div",{className:"text-lg font-bold text-slate-900",children:g(m.viewCount)}),e.jsx("div",{className:"text-[11px] text-slate-500",children:r("verify.views")})]}),e.jsxs("div",{className:"bg-white/80 rounded-lg p-2.5 text-center",children:[e.jsx(Ze,{className:"w-3.5 h-3.5 text-red-600 mx-auto mb-1"}),e.jsx("div",{className:"text-lg font-bold text-slate-900",children:m.duration}),e.jsx("div",{className:"text-[11px] text-slate-500",children:r("verify.duration")})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.publishedTime&&e.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-slate-500",children:[e.jsx(Qi,{className:"w-3 h-3"}),e.jsx("span",{children:w(m.publishedTime)}
1032)]}),m.category&&e.jsx("div",{className:"bg-slate-100 px-2 py-0.5 rounded-full text-[10px] text-slate-600",children:m.category})]}),m.description&&e.jsxs("div",{className:"bg-white/80 rounded-lg p-2.5 mt-2",children:[e.jsx("div",{className:"text-[11px] font-semibold text-slate-600 mb-1",children:r("verify.description")}),e.jsx("p",{className:"text-xs text-slate-600 leading-relaxed whitespace-pre-wrap line-clamp-2",children:m.description})]})]})]}),e.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-green-900 text-xs",children:r("verify.video_verified")}),e.jsx("div",{className:"text-[11px] text-green-700 mt-0.5",children:r("verify.confirm_video")})]})]})}),e.jsxs("div",{className:"flex flex-col-reverse sm:flex-row gap-2.5",children:[e.jsx("button",{onClick:()=>{h(null),n(""),x("")},className:"flex-1 bg-slate-100 text-slate-700 py-2.5 rounded-lg font-semibold hover:bg-slate-200 transition-all duration-200 text-sm",children:r("verify.try_again")}),e.jsxs("button",{onClick:y,className:"flex-1 bg-gradient-to-r from-green-500 to-emerald-500 text-white py-2.5 rounded-lg font-semibold hover:shadow-lg hover:scale-[1.01] transition-all duration-200 flex items-center justify-center gap-1.5 text-sm shadow-md shadow-green-500/20",children:[e.jsx(ne,{className:"w-4 h-4 flex-shrink-0"}),e.jsx("span",{children:r("verify.continue")})]})]})]})]})}function z4({end:t,duration:s=2e3,suffix:a="",decimals:r=0,prefix:l=""}){const[n,i]=o.useState(0),[c,d]=o.useState(!1),x=o.useRef(null);o.useEffect(()=>{const f=new IntersectionObserver(y=>{y.forEach(g=>{g.isIntersecting&&!c&&(d(!0),m())})},{threshold:.1});return x.current&&f.observe(x.current),()=>{x.current&&f.unobserve(x.current)}},[c]);const m=()=>{const f=Date.now(),y=0,g=N=>N*(2-N),w=()=>{const v=Date.now()-f,j=Math.min(v/s,1),b=g(j),p=y+(t-y)*b;i(p),j<1?requestAnimationFrame(w):i(t)};requestAnimationFrame(w)},h=f=>r>0?f.toFixed(r):Math.floor(f).toString();return e.jsxs("span",{ref:x,children:[l,h(n),a]})}function $4(t){try{localStorage.removeItem(t)}catch{}}const Vy=o.createContext(void 0);function L4({children:t}){const{showAlert:s}=Vs(),[a,r]=o.useState(null),[l,n]=o.useState(null),[i,c]=o.useState(null),[d,x]=o.use
1032State(!0),[m,h]=o.useState(!1),f=async(j,b)=>{var p,E,C,S;try{const{data:k,error:J}=await Ye.from("users").select("*").eq("id",j).maybeSingle();if(J)throw J;if(!k){const A=b.user.email,T=((p=b.user.user_metadata)==null?void 0:p.full_name)||((E=b.user.user_metadata)==null?void 0:E.name)||(A==null?void 0:A.split("@")[0])||"User",{data:ae,error:P}=await Ye.from("users").upsert({id:j,email:A,full_name:T,balance:0,gift_balance:0,status:"active"},{onConflict:"id",ignoreDuplicates:!1}).select().single();if(P){if(P.code==="23505"||(C=P.message)!=null&&C.includes("duplicate")||(S=P.message)!=null&&S.includes("conflict")){const{data:z}=await Ye.from("users").select("*").eq("id",j).maybeSingle();if(z)return c(b),r(b.user),n(z),!0}return console.error("Error creating profile:",P),!1}return c(b),r(b.user),n(ae),!0}const u=localStorage.getItem("isImpersonating")==="true";return k.status==="banned"&&!u?(console.error("User is banned - signing out"),s(k.ban_reason||"Your account has been suspended. Please contact support.",{type:"error",title:"Account Suspended"}),!1):(u&&localStorage.removeItem("isImpersonating"),c(b),r(b.user),n(k),!0)}catch(k){return console.error("Error fetching profile:",k),!1}},y=async()=>{a&&i&&await f(a.id,i)};o.useEffect(()=>{let j=!0;(async()=>{try{$4("pendingCheckout")}catch{}j&&(r(null),n(null),c(null),x(!1))})();const{data:{subscription:p}}=Ye.auth.onAuthStateChange((E,C)=>{});return()=>{j=!1,p.unsubscribe()}},[m]);const g=async(j,b,p)=>({error:new Error("Registrations are currently disabled.")}),w=async(j,b)=>({error:new Error("Sign in is currently disabled. All orders are placed as guest.")}),N=async()=>({error:new Error("Sign in is currently disabled.")}),v=async()=>{await Ye.auth.signOut(),r(null),n(null),c(null)};return e.jsx(Vy.Provider,{value:{user:a,profile:l,session:i,loading:d,signUp:g,signIn:w,signInWithGoogle:N,signOut:v,refreshProfile:y},children:t})}function br(){const t=o.useContext(Vy);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}const B4={en:"Select Language",es:"Seleccionar idioma",pt:"Selecionar idioma",fr:"Choisir la langue",ar:"اختر اÙÙØºØ©",ru:"ÐÑбÑаÑÑ ÑзÑк",it:"Seleziona lingua",de:"Sprache wählen",tr:"Dil Seçin","zh-CN":"éæ©è¯è¨","zh-TW":"鏿èªè¨",ja:"è¨èªã鏿"};function U4(){const{language:t,setLanguage:s,languageInfo:a,dir:r}=os(),l=r==="rtl",[n,i]=o.useState(!1),c=o.useRef(null);o.useEffect(()=>{const x=m=>{c.current&&!c.current.contains(m.target)&&i(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const d=x=>{s(x),i(!1)};return e.jsxs("div",{className:"relative",ref:c,children:[e.jsxs("button",{onClick:()=>i(!n),className:"flex items-center gap-1.5 px-2.5 py-2 rounded-xl border border-slate-200/80 bg-white/80 hover:bg-slate-50 hover:border-slate-300 transition-all duration-200 group","aria-label":"Select language",children:[e.jsx("img",{src:`https://flagcdn.com/w40/${a.countryCode}.png`,alt:a.name,className:"w-5 h-3.5 object-cover rounded-[2px]",loading:"eager"}),e.jsx("span",{className:"text-sm font-medium text-slate-700 hidden sm:inline",children:a.code.toUpperCase()}),e.jsx(is,{className:`w-3.5 h-3.5 text-slate-400 transition-transform duration-200 ${n?"rotate-180":""}`})]}),e.jsxs("div",{className:`absolute ${l?"left-0 origin-top-left":"right-0 origin-top-right"} mt-2 w-56 bg-white rounded-xl shadow-2xl shadow-slate-900/15 border border-slate-200/80 overflow-hidden transition-all duration-200 z-50 ${n?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-2 pointer-events-none"}`,children:[e.jsx("div",{className:"p-2 border-b border-slate-100 bg-gradient-to-r from-slate-50 to-slate-100/50",children:e.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[e.jsx(wt,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:B4[t]||"Select Language"})]})}),e.jsx("div",{className:"p-1.5 max-h-80 overflow-y-auto",children:Io.map(x=>e.jsxs("button",{onClick:()=>d(x.code),className:`w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-all duration-150 ${t===x.c
1032ode?"bg-blue-50 text-blue-700":"hover:bg-slate-50 text-slate-700"}`,children:[e.jsx("img",{src:`https://flagcdn.com/w40/${x.countryCode}.png`,alt:x.name,className:"w-5 h-3.5 object-cover rounded-[2px]",loading:"lazy"}),e.jsxs("div",{className:`flex-1 ${l?"text-right":"text-left"}`,children:[e.jsx("span",{className:"font-medium block text-sm",children:x.name}),e.jsx("span",{className:"text-xs text-slate-500",children:x.nativeName})]}),t===x.code&&e.jsx(Lt,{className:"w-4 h-4 text-blue-600"})]},x.code))})]})]})}const q4=[{code:"USD",label:"$ USD",flag:"US"},{code:"GBP",label:"£ GBP",flag:"GB"},{code:"EUR",label:"⬠EUR",flag:"EU"},{code:"TRY",label:"TL",flag:"TR"}];function G4({className:t=""}){const{currency:s,setCurrency:a}=Nn();return e.jsxs("div",{className:`relative inline-flex items-center ${t}`,children:[e.jsx("select",{value:s,onChange:r=>a(r.target.value),className:"appearance-none bg-white/10 hover:bg-white/15 text-white text-xs font-medium cursor-pointer pl-2.5 pr-7 py-1.5 rounded-lg border border-white/10 hover:border-white/25 transition-all focus:outline-none focus:ring-1 focus:ring-white/20","aria-label":"Select currency",children:q4.map(r=>e.jsx("option",{value:r.code,className:"bg-slate-900 text-white",children:r.label},r.code))}),e.jsx(is,{className:"absolute right-1.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-white/60 pointer-events-none"})]})}const xf={pending:{key:"status.pending",color:"text-amber-600",bg:"bg-amber-50 border-amber-200",icon:Ze},paid:{key:"status.paid",color:"text-blue-600",bg:"bg-blue-50 border-blue-200",icon:us},processing:{key:"status.processing",color:"text-cyan-600",bg:"bg-cyan-50 border-cyan-200",icon:Ve},in_progress:{key:"status.in_progress",color:"text-teal-600",bg:"bg-teal-50 border-teal-200",icon:tt},completed:{key:"status.completed",color:"text-emerald-600",bg:"bg-emerald-50 border-emerald-200",icon:ne},partial:{key:"status.partial",color:"text-orange-600",bg:"bg-orange-50 border-orange-200",icon:nt},canceled:{key:"status.canceled",color:"text-red-600",bg:"bg-red-50 border-red-200",icon:st},cancelled:{key:"status.canceled",color:"text-red-600",bg:"bg-red-50 border-red-200",icon:st},refunded:{key:"status.refunded",color:"text-slate-600",bg:"bg-slate-50 border-slate-200",icon:st},failed:{key:"status.failed",color:"text-red-600",bg:"bg-red-50 border-red-200",icon:st},payment_failed:{key:"status.payment_failed",color:"text-red-600",bg:"bg-red-50 border-red-200",icon:st}},uf="followx_device_id";function Mx(){var t;try{let s=localStorage.getItem(uf);return s||(s=((t=crypto==null?void 0:crypto.randomUUID)==null?void 0:t.call(crypto))??`dev-${Date.now()}-${Math.random().toString(36).slice(2)}`,localStorage.setItem(uf,s)),s}catch{return""}}function J4({open:t,onClose:s}){const{t:a}=os(),{formatInCurrency:r}
1032=Nn(),[l,n]=o.useState(""),[i,c]=o.useState(!1),[d,x]=o.useState(!1),[m,h]=o.useState([]),[f,y]=o.useState(!1),[g,w]=o.useState(!1),[N,v]=o.useState(""),[j,b]=o.useState(!1),[p,E]=o.useState(null),[C,S]=o.useState({}),k=o.useRef(null),J=o.useRef(null),u=o.useCallback(async()=>{x(!0);try{const I="https://kdqsajuhvcmxsnttdetg.supabase.co",Z="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Q=Mx(),_=await fetch(`${I}/functions/v1/track_order_status`,{method:"POST",headers:{Authorization:`Bearer ${Z}`,"Content-Type":"application/json"},body:JSON.stringify({autoDetect:!0,deviceId:Q})}),M=await _.json();_.ok&&Array.isArray(M.orders)&&M.orders.length>0&&(h(M.orders),w(!0))}catch{}x(!1)},[]);o.useEffect(()=>{t?(setTimeout(()=>{var I;return(I=k.current)==null?void 0:I.focus()},300),u()):(n(""),h([]),y(!1),w(!1),v(""),J.current&&(clearInterval(J.current),J.current=null))},[t,u]);const A=o.useCallback(async I=>{const Z=(I||l).trim();if(Z){c(!0),v(""),w(!1);try{const M=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/track_order_status",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({query:Z})}),F=await M.json();!M.ok||F.error?(v(F.error||"Something went wrong"),h([])):h(F.orders||[]),y(!0)}catch{v(a("tracker.unable_connect")),h([]),y(!0)}finally{c(!1)}}},[l,a]),T=o.useCallback(async()=>{if(m.length!==0){b(!0);try{const I="https://kdqsajuhvcmxsnttdetg.supabase.co",Z="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Q=Mx(),_=l.trim()?{query:l.trim()}:{autoDetect:!0,deviceId:Q},M=await fetch(`${I}/functions/v1/track_order_status`,{method:"POST",headers:{Authorization:`Bearer ${Z}`,"Content-Type":"application/json"},body:JSON.stringify(_)}),F=await M.json();M.ok&&Array.isArray(F.orders)&&h(F.orders)}catch{}b(!1)}},[l,m.length]);o.useEffect(()=>{if(m.length>0)return J.current=setInterval(T,1e4),()=>{J.current&&clearInterval(J.current)}},[m.length,T]);const ae=I=>{I.preventDefault(),A()};o.useEffect(()=>{const I=[],Z={};for(const _ of m)if(_.last_refill_claim_at){const R=new Date(_.last_refill_claim_at).getTime()+48*60*60*1e3-Date.now();R>0&&(Z[_.id]=R)}S(Z);const Q=setInterval(()=>{S(_=>{const M={};let F=!1;for(const[R,X]of Object.entries(_)){const re=X-1e3;re>0?M[R]=re:F=!0,re!==X&&(F=!0)}return F?M:_})},1e3);return I.push(Q),()=>I.forEach(_=>clearInterval(_))},[m]);const P=async I=>{E(I);try{const Z="https://kdqsajuhvcmxsnttdetg.supabase.co",Q="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",_=Mx(),M=await fetch(`${Z}/functions/v1/submit_refill_claim`,{method:"POST",headers:{Authorization:`Bearer ${Q}`,"Content-Type":"application/json"},body:JSON.stringify({orderId:I,deviceId:_})}),F=await M.json();M.status===429?S(R=>({...R,[I]:F.remainMs||48*60*60*1e3})):M.ok&&F.success&&(S(R=>({...R,[I]:48*60*60*1e3})),T())}catch{}E(null)},z=I=>{const Z=Math.floor(I/36e5),Q=Math.floor(I%(1e3*60*60)/(1e3*60)),_=Math.floor(I%(1e3*60)/1e3);return`${Z.toString().padStart(2,"0")}:${Q.toString().padStart(2,"0")}:${_.toString().padStart(2,"0")}`};return t?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-[60] transition-opacity duration-300",onClick:s}),e.jsx("div",{className:`fixed z-[61] transition-all duration-300 ease-out 1033 md:inset-0 md:flex md:items-center md:justify-center md:p-4 1034 inset-x-0 bottom-0`,children:e.jsxs("div",{className:`bg-white shadow-2xl overflow-hidden 1035 md:rounded-2xl md:max-w-lg md:w-full md:max-h-[85vh] 1036 rounded-t-3xl w-full max-h-[90vh] 1037 animate-in slide-in-from-bottom duration-300 md:animate-in md:fade-in md:zoom-in-95`,onClick:I=>I.stopPropagation(),children:[e.jsx("div",{className:"md:hidden flex justify-center pt-3 pb-1",children:e.jsx("div",{className:"w-10 h-1 bg-slate-300 rounded-full"})}),e.jsxs("div",{className:"px-5 pt-4 pb-3 md:pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-slate-800 to-slate-900 rounded-xl shadow-lg",children:e.jsx(ws,{className:"w-4.5 h-4.5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-bold text-slate-900",children:a("tracker.title")}),e.jsx("p",{className:"text-xs text-slate-500",children:a("tracker.subtitle")})]})]}),e.jsx("button",{onClick:s,className:"p-2 hover:bg-slate-100 rounded-xl transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-slate-400"})})]}),e.jsx("form",{onSubmit:ae,className:"relative",children:e.jsxs("div",{className:"relative",children:[e.jsx(ws,{className:"absolute left-3.5 to
1037p-1/2 -translate-y-1/2 w-4.5 h-4.5 text-slate-400"}),e.jsx("input",{ref:k,type:"text",value:l,onChange:I=>n(I.target.value),placeholder:a("tracker.placeholder"),className:"w-full pl-10 pr-12 py-3.5 bg-slate-50 border border-slate-200 rounded-xl text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300 transition-all"}),e.jsx("button",{type:"submit",disabled:!l.trim()||i,className:"absolute right-2 top-1/2 -translate-y-1/2 p-2 bg-slate-900 hover:bg-slate-800 disabled:bg-slate-300 rounded-lg transition-all",children:i?e.jsx(Ne,{className:"w-4 h-4 text-white animate-spin"}):e.jsx(Yt,{className:"w-4 h-4 text-white"})})]})})]}),e.jsxs("div",{className:"px-5 pb-5 overflow-y-auto max-h-[calc(90vh-180px)] md:max-h-[calc(85vh-180px)]",children:[N&&e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-100 rounded-xl mt-2",children:[e.jsx(nt,{className:"w-4 h-4 text-red-500 shrink-0"}),e.jsx("span",{className:"text-sm text-red-600",children:N})]}),f&&!N&&m.length===0&&e.jsxs("div",{className:"text-center py-10",children:[e.jsx("div",{className:"w-14 h-14 bg-slate-100 rounded-full flex items-center justify-center mx-auto mb-3",children:e.jsx(us,{className:"w-7 h-7 text-slate-300"})}),e.jsx("p",{className:"text-slate-500 font-medium text-sm",children:a("tracker.no_orders")}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:a("tracker.try_different")})]}),m.length>0&&e.jsxs("div",{className:"space-y-3 mt-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-medium text-slate-500",children:g&&!f?a("tracker.detected_orders").replace("{count}",String(m.length)):a("tracker.orders_found").replace("{count}",String(m.length))}),e.jsxs("button",{onClick:T,disabled:j,className:"flex items-center gap-1 text-xs font-medium text-slate-500 hover:text-slate-700 transition-colors",children:[e.jsx(Ve,{className:`w-3 h-3 ${j?"animate-spin":""}`}),a(j?"tracker.syncing":"tracker.refresh")]})]}),m.map(I=>{const Z=xf[I.status]||xf.pending,Q=Z.icon,_=a(Z.key);return e.jsxs("div",{className:`p-4 rounded-xl border ${Z.bg} transition-all`,children:[I.admin_reply&&e.jsxs("div",{className:"flex items-start gap-2.5 px-3.5 py-3 mb-3 bg-red-50 border-2 border-red-400 rounded-xl animate-alert-flash",children:[e.jsx(nt,{className:"w-5 h-5 text-red-600 shrink-0 mt-0.5 animate-pulse"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-red-500 font-bold mb-1",children:a("tracker.admin_response")}),e.jsx("p",{className:"text-sm font-bold text-red-800 leading-snug",children:I.admin_reply}),I.admin_reply_at&&e.jsx("p",{className:"text-[10px] text-red-400 mt-1.5 font-medium",children:new Date(I.admin_reply_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]}),I.payment_confirmed&&!I.hide_progress&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 mb-3 bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-300 rounded-lg",children:[e.jsx(Sl,{className:"w-4 h-4 text-emerald-600 shrink-0"}),e.jsx("span",{className:"text-xs font-semibold text-emerald-800 leading-snug",children:a("tracker.payment_confirmed")})]}),I.queued&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 mb-3 bg-amber-100 border border-amber-300 rounded-lg",children:[e.jsx(Ar,{className:"w-4 h-4 text-amber-600 shrink-0 animate-pulse"}),e.jsx("span",{className:"text-xs font-semibold text-amber-700",children:a("tracker.waiting_queue")})]}),e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(Q,{className:`w-4.5 h-4.5 ${Z.color} shrink-0`}),e.jsx("span",{className:`text-sm font-bold ${Z.color}`,children:_})]}),e.jsx("span",{className:"text-[11px] text-slate-500 font-mono shrink-0",children:I.order_number})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-medium",children:a("tracker.platform")}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:I.platform})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-medium",children:a("tracker.service")}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:I.service_type})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-medium",children:a("tracker.quantity")}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:I.quantity.toLocaleStr
1037ing()})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-medium",children:a("tracker.amount")}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:r(I.price)})]}),I.start_count!==null&&I.start_count>0&&e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-medium",children:a("tracker.start_count")}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:I.start_count.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-medium",children:a("tracker.date")}),e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:new Date(I.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]})]}),(()=>{const M=["processing","in_progress","completed","partial"],F=I.status==="paid"&&!I.provider_order_id;if(!(I.hide_progress&&(I.status==="paid"||M.includes(I.status)))&&!F&&!M.includes(I.status))return null;const X=Number(I.quantity)||0;if(X<=0)return null;const re=I.status==="processing"||I.status==="in_progress"||F,U=I.remains!==null&&I.remains!==void 0?Number(I.remains):null,oe=U!==null&&U>0&&I.start_count!==null&&I.start_count>0;if(I.hide_progress||re&&!oe)return e.jsxs("div",{className:"mt-3 pt-3 border-t border-black/5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsxs("div",{className:"relative w-5 h-5 rounded-full bg-blue-100 flex items-center justify-center",children:[e.jsx("span",{className:"absolute inset-0 rounded-full bg-blue-400/30",style:{animation:"progressPulseGlow 2s ease-in-out infinite"}}),e.jsx(tt,{className:"w-3 h-3 text-blue-600"})]}),e.jsx("span",{className:"text-xs font-semibold text-slate-700",children:a("tracker.delivery_started")||"Delivery has started"})]}),e.jsx("p",{className:"text-[11px] text-slate-500 mb-2.5",children:a("tracker.delivery_in_progress_msg")||"Your order is currently being delivered"}),e.jsxs("div",{className:"relative h-2 bg-slate-100 rounded-full overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-200/40 via-teal-200/40 to-blue-200/40"}),e.jsx("div",{className:"absolute inset-y-0 left-0 w-[25%] rounded-full bg-gradient-to-r from-transparent via-blue-500 to-transparent opacity-80",style:{animation:"progressSlide 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"}}),e.jsx("div",{className:"absolute inset-y-0 left-0 w-[15%] rounded-full bg-gradient-to-r from-transparent via-teal-300 to-transparent opacity-50",style:{animation:"progressSlide 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite 0.6s"}})]})]});const ue=U!==null?Math.max(0,X-U):I.status==="completed"?X:null;if(ue===null)return null;const K=Math.min(100,Math.round(ue/X*100)),q=I.status==="completed"||K>=100;return e.jsxs("div",{className:"mt-3 pt-3 border-t border-black/5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-medium",children:a("tracker.delivery_progress")}),e.jsxs("span",{className:`text-xs font-bold tabular-nums ${q?"text-emerald-600":K>=50?"text-teal-600":"text-blue-600"}`,children:[K,"%"]})]}),e.jsxs("div",{className:"relative h-2.5 bg-slate-200/70 rounded-full overflow-hidden",children:[e.jsx("div",{className:`absolute inset-y-0 left-0 rounded-full transition-all duration-1000 ease-out ${q?"bg-gradient-to-r from-emerald-500 to-green-400":"bg-gradient-to-r from-blue-500 to-teal-400"}`,style:{width:`${K}%`}}),!q&&K>0&&K<100&&e.jsx("div",{className:"absolute inset-y-0 left-0 w-[15%] rounded-full bg-gradient-to-r from-transparent via-white/40 to-transparent",style:{animation:"progressSlide 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"}})]}),e.jsxs("div",{className:"flex items-center justify-between mt-1.5",children:[e.jsxs("span",{className:"text-[10px] text-slate-500",children:[e.jsx("span",{className:"font-semibold text-slate-700",children:ue.toLocaleString()})," / ",X.toLocaleString()," ",a("tracker.delivered")]}),U!==null&&U>0&&e.jsxs("span",{className:"text-[10px] text-slate-400",children:[U.toLocaleStr
1037ing()," ",a("tracker.remaining")]})]})]})})(),I.link&&e.jsxs("div",{className:"mt-2.5 pt-2.5 border-t border-black/5",children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-medium",children:a("tracker.target")}),e.jsx("p",{className:"text-xs text-slate-600 truncate mt-0.5",children:I.link})]}),I.refill_eligible&&(I.status==="completed"||I.status==="partial")&&(()=>{const M=C[I.id],F=M&&M>0,R=p===I.id;return e.jsx("div",{className:"mt-3 pt-3 border-t border-black/5",children:F?e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 bg-amber-50 border border-amber-200 rounded-xl",children:[e.jsx(Ze,{className:"w-4 h-4 text-amber-600 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs font-semibold text-amber-800",children:a("tracker.refill_processing")}),e.jsx("p",{className:"text-[10px] text-amber-600 mt-0.5",children:a("tracker.refill_time")})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("div",{className:"text-sm font-bold text-amber-700 font-mono tabular-nums",children:z(M)}),e.jsx("p",{className:"text-[9px] text-amber-500 font-medium",children:a("tracker.remaining_time")})]})]})}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>P(I.id),disabled:R,className:"flex-1 flex items-center justify-center gap-2 py-2.5 bg-gradient-to-r from-orange-500 to-amber-500 hover:from-orange-600 hover:to-amber-600 text-white text-xs font-bold rounded-xl shadow-sm hover:shadow-md transition-all disabled:opacity-50",children:[R?e.jsx(Ne,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Ve,{className:"w-3.5 h-3.5"}),a(R?"tracker.submitting":"tracker.request_refill")]}),e.jsx("span",{className:"text-[9px] text-slate-400 leading-tight shrink-0 max-w-[100px]",children:a("tracker.processing_time")})]})})})()]},I.id)})]}),!f&&!g&&!i&&e.jsxs("div",{className:"text-center py-8",children:[e.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-slate-100 to-slate-50 rounded-full flex items-center justify-center mx-auto mb-3 border border-slate-200/50",children:d?e.jsx(Ne,{className:"w-6 h-6 text-slate-400 animate-spin"}):e.jsx(ws,{className:"w-6 h-6 text-slate-400"})}),e.jsx("p",{className:"text-sm text-slate-500 font-medium",children:a(d?"tracker.looking_up":"tracker.enter_username")}),e.jsx("p",{className:"text-xs text-slate-400 mt-1",children:a(d?"tracker.detecting":"tracker.find_all")})]})]})]})})]}):null}function Ex({onOpenDashboard:t,onOpenDashboardWallet:s,onOpenSupport:a,onOpenAddFunds:r,onOpenSpinWheel:l,onOpenMysteryBox:n,onNavigateHome:i,cartItemCount:c=0}){const{user:d,profile:x,signOut:m,session:h,loading:f}=br(),{t:y}=os();o.useState(!1),o.useState("login");const[g,w]=o.useState(!1),[N,v]=o.useState(!1),[j,b]=o.useState(0),[p,E]=o.useState([]),[C,S]=o.useState(0),[k,J]=o.useState(!1),[u,A]=o.useState(!1),[T,ae]=o.useState(!1);o.useEffect(()=>{const _=()=>{v(window.scrollY>10)};return window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)},[]),o.useEffect(()=>{},[]),o.useEffect(()=>{const _=M=>{g&&!M.target.closest(".user-menu-container")&&w(!1)};return document.addEventListener("click",_),()=>document.removeEventListener("click",_)},[g]);const P=o.useCallback(async()=>{if(h!=null&&h.access_token)try{const M=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_unread_support_count",{headers:{Authorization:`Bearer ${h.access_token}`,"Content-Type":"application/json"}});if(M.ok){const F=await M.json();b(F.unreadCount||0)}}catch(_){console.error("Error fetching unread count:",_)}},[h==null?void 0:h.access_token]),z=o.useCallback(async()=>{if(h!=null&&h.access_token)try{const M=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_active_announcements",{headers:{Authorization:`Bearer ${h.access_token}`,"Content-Type":"application/json"}}),F=await M.json();M.ok&&(E(F.announcements||[]),S(F.unread_count||0))}catch(_){console.error("Error fetching announcements:",_)}},[h==null?void 0:h.access_token]),I=o.useCallback(async()=>
1037{if(h!=null&&h.access_token)try{const M=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_spin_status",{headers:{Authorization:`Bearer ${h.access_token}`,"Content-Type":"application/json"}});if(M.ok){const F=await M.json();A(F.can_spin||!1)}}catch(_){console.error("Error fetching spin status:",_)}},[h==null?void 0:h.access_token]),Z=async _=>{if(h!=null&&h.access_token)try{await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/mark_announcement_read",{method:"POST",headers:{Authorization:`Bearer ${h.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({announcement_id:_})}),E(F=>F.map(R=>R.id===_?{...R,is_read:!0}:R)),S(F=>Math.max(0,F-1))}catch(M){console.error("Error marking announcement read:",M)}};o.useEffect(()=>{if(d&&(h!=null&&h.access_token)){P(),z(),I();const _=setInterval(()=>{P(),z(),I()},3e4);return()=>clearInterval(_)}},[d,h==null?void 0:h.access_token,P,z,I]),o.useEffect(()=>{const _=()=>{A(!1),I()};return window.addEventListener("spinUsed",_),()=>window.removeEventListener("spinUsed",_)},[I]);const Q=async()=>{await m(),w(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:`fixed top-6 sm:top-7 left-0 right-0 z-40 transition-all duration-300 ${N?"bg-white/95 backdrop-blur-xl shadow-lg shadow-slate-900/5":"bg-white/80 backdrop-blur-lg"}`,children:[e.jsx("div",{className:"absolute inset-x-0 bottom-0 h-px bg-gradient-to-r from-transparent via-slate-200 to-transparent"}),e.jsx("div",{className:"container mx-auto px-3 sm:px-4 md:px-6",children:e.jsxs("div",{className:"flex items-center justify-between h-14 sm:h-16 md:h-[72px]",children:[e.jsx("div",{className:"flex items-center",children:e.jsx("a",{href:"/",className:"flex items-center group",children:e.jsx("img",{src:"https://static.wixstatic.com/media/b3ce96_af69a94144344c35a4117f6e6e31abd7~mv2.png/v1/fill/w_600,h_162,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/logox.png",alt:"Follx Logo",className:"h-7 sm:h-8 md:h-10 w-auto transition-transform duration-300 group-hover:scale-105"})})}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[e.jsxs("button",{onClick:()=>ae(!0),className:"flex items-center gap-1.5 px-2.5 sm:px-3 py-1.5 sm:py-2 hover:bg-slate-100 active:bg-slate-200 rounded-xl transition-all duration-200 group border border-slate-200/80",title:y("tracker.title"),children:[e.jsx(ws,{className:"w-4 h-4 text-slate-500 group-hover:text-slate-900 transition-colors"}),e.jsx("span",{className:"text-xs sm:text-sm font-medium text-slate-600 group-hover:text-slate-900 transition-colors",children:y("tracker.title")})]}),e.jsx(U4,{}),e.jsx(G4,{}),d&&x?e.jsxs(e.Fragment,{children:[c>0&&e.jsxs("button",{className:"relative p-2 sm:p-2.5 hover:bg-slate-100 active:bg-slate-200 rounded-xl transition-all duration-200 group",children:[e.jsx(Ws,{className:"w-5 h-5 text-slate-600 group-hover:text-slate-900 transition-colors"}),e.jsx("span",{className:"absolute -top-0.5 -right-0.5 bg-gradient-to-r from-red-500 to-rose-500 text-white text-[10px] sm:text-xs min-w-[18px] sm:min-w-[20px] h-[18px] sm:h-[20px] rounded-full flex items-center justify-center font-bold shadow-lg shadow-red-500/30",children:c})]}),e.jsxs("button",{onClick:s,className:"relative group",title:"Wallet",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-xl blur opacity-40 group-hover:opacity-60 transition-opacity"}),e.jsxs("div",{className:"relative flex items-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2 sm:py-2.5 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-xl hover:from-blue-700 hover:to-cyan-600 transition-all shadow-lg shadow-blue-500/25",children:[e.jsx(kt,{className:"w-4 h-4 text-white/90"}),e.jsxs("span",{className:"font-bold text-white text-sm tabular-nums",children:["$",((x.balance||0)+(x.refund_balance||0)).toFixed(2)]})]})]}),e.jsxs("div",{className:"relative user-menu-container",children:[e.jsx("button",{onClick:()=>{g||P(),w(!g)},className:`flex items-center gap-1.5 sm:gap-2 pl-2 sm:pl-2.5 pr-2 sm:pr-2.5 py-1.5
1037sm:py-2 rounded-xl sm:rounded-2xl transition-all duration-300 border ${g?"bg-slate-100 border-slate-200 shadow-inner":"bg-gradient-to-r from-slate-50 to-slate-100/80 border-slate-200/80 hover:border-slate-300 hover:shadow-md hover:shadow-slate-900/5"}`,children:e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-full blur-sm opacity-30"}),e.jsx("div",{className:"relative w-7 h-7 sm:w-8 sm:h-8 bg-gradient-to-br from-slate-800 to-slate-900 rounded-full flex items-center justify-center ring-2 ring-white shadow-lg",children:e.jsx(ls,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-white"})})]}),e.jsxs("div",{className:"hidden md:flex flex-col items-start",children:[e.jsx("span",{className:"font-semibold text-slate-800 text-sm leading-tight max-w-[100px] truncate",children:x.full_name}),e.jsx("span",{className:"text-[10px] text-slate-500 leading-tight",children:y("header.premium")})]}),e.jsx(is,{className:`w-3.5 h-3.5 sm:w-4 sm:h-4 text-slate-400 transition-transform duration-300 ${g?"rotate-180":""}`})]})}),e.jsxs("div",{className:`absolute right-0 mt-2 w-64 bg-white rounded-2xl shadow-2xl shadow-slate-900/15 border border-slate-200/80 overflow-hidden transition-all duration-300 origin-top-right ${g?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-2 pointer-events-none"}`,children:[e.jsx("div",{className:"p-3 bg-gradient-to-r from-slate-50 to-slate-100/50 border-b border-slate-100",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-slate-800 to-slate-900 rounded-xl flex items-center justify-center shadow-lg",children:e.jsx(ls,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-semibold text-slate-900 truncate",children:x.full_name}),e.jsx("p",{className:"text-xs text-slate-500 truncate",children:d.email})]})]})}),e.jsxs("div",{className:"p-1.5",children:[i&&e.jsxs("button",{onClick:()=>{i(),w(!1)},className:"w-full px-3 py-2.5 text-left hover:bg-slate-50 active:bg-slate-100 rounded-xl flex items-center gap-3 transition-all duration-200 group",children:[e.jsx("div",{className:"p-2 bg-emerald-100 rounded-lg group-hover:bg-emerald-200 transition-colors",children:e.jsx(cy,{className:"w-4 h-4 text-emerald-600"})}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-700 block",children:y("header.home")}),e.jsx("span",{className:"text-xs text-slate-500",children:y("header.back_to_home")})]})]}),e.jsxs("button",{onClick:()=>{t(),w(!1)},className:"w-full px-3 py-2.5 text-left hover:bg-slate-50 active:bg-slate-100 rounded-xl flex items-center gap-3 transition-all duration-200 group",children:[e.jsx("div",{className:"p-2 bg-blue-100 rounded-lg group-hover:bg-blue-200 transition-colors",children:e.jsx(Wv,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-700 block",children:y("header.dashboard")}),e.jsx("span",{className:"text-xs text-slate-500",children:y("header.orders_wallet")})]})]}),e.jsxs("button",{onClick:()=>{J(!0),w(!1)},className:"w-full px-3 py-2.5 text-left hover:bg-slate-50 active:bg-slate-100 rounded-xl flex items-center gap-3 transition-all duration-200 group",children:[e.jsxs("div",{className:"relative p-2 bg-amber-100 rounded-lg group-hover:bg-amber-200 transition-colors",children:[e.jsx(Ei,{className:"w-4 h-4 text-amber-600"}),C>0&&e.jsx("span",{className:"absolute -top-1 -right-1 min-w-[18px] h-[18px] bg-red-500 text-white text-[10px] font-bold rounded-full flex items-center justify-center px-1 shadow-lg animate-pulse",children:C>9?"9+":C})]}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-slate-700",children:y("header.announcements")}),C>0&&e.jsx("span",{className:"px-1.5 py-0.5 bg-red-500 text-white text-[10px] font-bold rounded-full animate-pulse",children:C})]}),e.jsx("span",{className:"text-xs text-slate-500",children:y("header.latest_updates")})]})]}),e.jsxs("button",{onClick:()=>{l(),w(!1)},className:"w-full px-3 py-2.5 text-left hover:bg-slate-50 active:bg-slate-100 rounded-xl flex items-center gap-3 transition-all duration-200 group",children:[e.jsxs("div",{className:"relative p-2 bg-gradient-to-br from-rose-100 to-pink-100 rounded-lg group-hover:from-rose-200 group-hover:to-pink-200 transition-colors",children:[e.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10.5",fill:"#fcd34d",stroke:"#b45309",strokeWidth:"0.8"}
1037),e.jsx("path",{d:"M12 1.5 A10.5 10.5 0 0 1 21.1 6.75 L12 12 Z",fill:"#ef4444",stroke:"#b91c1c",strokeWidth:"0.3"}),e.jsx("path",{d:"M21.1 6.75 A10.5 10.5 0 0 1 21.1 17.25 L12 12 Z",fill:"#f97316",stroke:"#c2410c",strokeWidth:"0.3"}),e.jsx("path",{d:"M21.1 17.25 A10.5 10.5 0 0 1 12 22.5 L12 12 Z",fill:"#facc15",stroke:"#a16207",strokeWidth:"0.3"}),e.jsx("path",{d:"M12 22.5 A10.5 10.5 0 0 1 2.9 17.25 L12 12 Z",fill:"#22c55e",stroke:"#15803d",strokeWidth:"0.3"}),e.jsx("path",{d:"M2.9 17.25 A10.5 10.5 0 0 1 2.9 6.75 L12 12 Z",fill:"#3b82f6",stroke:"#1d4ed8",strokeWidth:"0.3"}),e.jsx("path",{d:"M2.9 6.75 A10.5 10.5 0 0 1 12 1.5 L12 12 Z",fill:"#a855f7",stroke:"#7e22ce",strokeWidth:"0.3"}),e.jsx("circle",{cx:"12",cy:"12",r:"3",fill:"#fef3c7",stroke:"#b45309",strokeWidth:"0.5"}),e.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"#b45309"}),e.jsx("path",{d:"M12 0 L13.2 2.8 L10.8 2.8 Z",fill:"#dc2626",stroke:"#7f1d1d",strokeWidth:"0.3"})]}),u&&e.jsx("span",{className:"absolute -top-1 -right-1 w-3 h-3 bg-red-500 rounded-full shadow-lg animate-pulse"})]}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-slate-700",children:y("header.lucky_spin")}),e.jsx("span",{className:"px-1.5 py-0.5 bg-red-500 text-white text-[10px] font-bold rounded-full",children:"$5 FREE"})]}),e.jsx("span",{className:"text-xs text-slate-500 block",children:y("header.win_credits")})]})]}),e.jsxs("button",{onClick:()=>{n(),w(!1)},className:"w-full px-3 py-2.5 text-left hover:bg-slate-50 active:bg-slate-100 rounded-xl flex items-center gap-3 transition-all duration-200 group",children:[e.jsx("div",{className:"relative p-2 bg-gradient-to-br from-cyan-100 to-emerald-100 rounded-lg group-hover:from-cyan-200 group-hover:to-emerald-200 transition-colors",children:e.jsx(Im,{className:"w-4 h-4 text-cyan-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-slate-700",children:y("header.mystery_box")}),e.jsx("span",{className:"px-1.5 py-0.5 bg-gradient-to-r from-cyan-500 to-emerald-500 text-white text-[10px] font-bold rounded-full",children:"$5 NEW"})]}),e.jsx("span",{className:"text-xs text-slate-500 block",children:y("header.win_gift")})]})]}),e.jsxs("button",{onClick:()=>{a(),w(!1),setTimeout(P,2e3)},className:"w-full px-3 py-2.5 text-left hover:bg-slate-50 active:bg-slate-100 rounded-xl flex items-center gap-3 transition-all duration-200 group",children:[e.jsxs("div",{className:"relative p-2 bg-emerald-100 rounded-lg group-hover:bg-emerald-200 transition-colors",children:[e.jsx(Ls,{className:"w-4 h-4 text-emerald-600"}),j>0&&e.jsx("span",{className:"absolute -top-1 -right-1 min-w-[18px] h-[18px] bg-red-500 text-white text-[10px] font-bold rounded-full flex items-center justify-center px-1 shadow-lg",children:j>9?"9+":j})]}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-slate-700",children:y("header.support")}),j>0&&e.jsx("span",{className:"px-1.5 py-0.5 bg-red-500 text-white text-[10px] font-bold rounded-full",children:j})]}),e.jsx("span",{className:"text-xs text-slate-500",children:y("header.get_help")})]})]}),e.jsx("div",{className:"h-px bg-slate-100 my-1"}),e.jsxs("a",{href:"/affiliate",onClick:_=>{_.preventDefault(),window.history.pushState({},"","/affiliate"),window.dispatchEvent(new PopStateEvent("popstate")),w(!1)},className:"w-full px-3 py-2.5 text-left hover:bg-slate-50 active:bg-slate-100 rounded-xl flex items-center gap-3 transition-all duration-200 group",children:[e.jsx("div",{className:"p-2 bg-gradient-to-br from-blue-100 to-cyan-100 rounded-lg group-hover:from-blue-200 group-hover:to-cyan-200 transition-colors",children:e.jsx(mt,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-slate-700",children:y("affiliate.menu_title")}),e.jsx("span",{className:"px-1.5 py-0.5 bg-gradient-to-r from-blue-500 to-cyan-500 text-white text-[10px] font-bold rounded-full",children:"25%"})]}),e.jsx("span",{className:"text-xs text-slate-500",children:y("affiliate.menu_desc")})]})]}),e.jsx("div",{className:"h-px bg-slate-100 my-1"}),e.jsxs("button",{onClick:Q,className:"w-full px-3 py-2.5 text-left hover:bg-red-50 active:bg-red-100 rounded-xl flex items-center gap-3 transition-all duration-200 group",children:[e.jsx("div",{className:"p-2 bg-red-100 rounded-lg group-hover:bg-red-200 transition-colors",children:e.jsx(U0,{className:"w-4 h-4 text-red-600"})}),e.jsx("span",{className:"font-medium text-red-600",children:y("header.sign_out")})]})]})]})]})]}):null]})]})})]}),e.jsx(J4,{open:T,onClose:()=>ae(!1)}),k&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-lg max-h-[80vh] overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:[e.jsx("div",{className:"p-5 border-b border-slate-200 bg-gradient-to-r from-amber-50 to-orange-50",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-amber-500 to-orange-600 rounded-xl shadow-lg shadow-orange-500/30",children:e.jsx(Ei,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-slate-900",children:y("announcements.title")}),e.jsx("p",{className:"text-sm text-slate-500",children:y("announcements.stay_updated")})]})]}),e.jsx("button",{onClick:()=>J(!1),className:"p-2 hover:bg-white/80 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-slate-500"})})]})}),e.jsx("div",{className:"overflow-y-auto max-h-[calc(80vh-120px)]",children:p.length===0?e.jsxs("div",{className:"p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-slate-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(Ei,{className:"w-8 h-8 text-slate-300"})}),e.jsx("p",{className:"text-slate-500 font-medium",children:y("announcements.no_announcements")}),e.jsx("p",{className:"text-sm text-slate-400 mt-1",children:y("announcements.check_later")})]}):e.jsx("div",{className:"divide-y divide-slate-100",children:p.map(_=>{const F={info:{bg:"bg-blue-50",border:"border-blue-200",icon:hr,iconColor:"text-blue-600",iconBg:"bg-blue-100"},warning:{bg:"bg-amber-50",border:"border-amber-200",icon:nt,iconColor:"text-amber-600",iconBg:"bg-amber-100"},success:{bg:"bg-emerald-50",border:"border-emerald-200",icon:ne,iconColor:"text-emerald-600",iconBg:"bg-emerald-100"},error:{bg:"bg-red-50",border:"border-red-200",icon:st,iconColor:"text-red-600",iconBg:"bg-red-100"}}[_.type],R=F.icon;return e.jsx("div",{className:`p-4 transition-colors ${_.is_read?"hover:bg-slate-50":F.bg}`,children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:`p-2 rounded-lg ${F.iconBg}
1037 shrink-0`,children:e.jsx(R,{className:`w-4 h-4 ${F.iconColor}`})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h4",{className:"font-semibold text-slate-900 text-sm",children:_.title}),!_.is_read&&e.jsx("span",{className:"px-1.5 py-0.5 bg-red-500 text-white text-[10px] font-bold rounded-full",children:"NEW"})]}),e.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:_.content}),e.jsx("p",{className:"text-xs text-slate-400 mt-2",children:new Date(_.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]}),!_.is_read&&e.jsx("button",{onClick:()=>Z(_.id),className:"shrink-0 px-3 py-1.5 text-xs font-medium text-blue-600 hover:bg-blue-100 rounded-lg transition-colors",children:y("announcements.mark_read")})]})})]})},_.id)})})}),p.filter(_=>!_.is_read).length>0&&e.jsx("div",{className:"p-4 border-t border-slate-200 bg-slate-50",children:e.jsx("button",{onClick:()=>{p.filter(_=>!_.is_read).forEach(_=>Z(_.id))},className:"w-full py-2.5 text-sm font-medium text-blue-600 hover:bg-blue-100 rounded-xl transition-colors",children:y("announcements.mark_all_read")})})]})})]})}const hf={US:"https://flagcdn.com/w80/us.png",UK:"https://flagcdn.com/w80/gb.png",EU:"https://flagcdn.com/w80/eu.png"},W4=[{code:"US",currency:"USD",currencySymbol:"$"},{code:"UK",currency:"GBP",currencySymbol:"£"},{code:"EU",currency:"EUR",currencySymbol:"â¬"}];function H4({isOpen:t,onClose:s,giftBalance:a,onSuccess:r}){const{t:l}=os(),[n,i]=o.useState("region"),[c,d]=o.useState(""),[x,m]=o.useState(""),[h,f]=o.useState(""),[y,g]=o.useState(""),[w,N]=o.useState(""),[v,j]=o.useState(""),[b,p]=o.use
1037State(""),[E,C]=o.useState(!1),[S,k]=o.useState(""),[J,u]=o.useState(5);o.useEffect(()=>{t&&A()},[t]);const A=async()=>{try{const X=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_environment_value?key=withdrawal_min_payout",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}})).json();X.value&&u(parseFloat(X.value)||5)}catch{}};if(!t)return null;const T=()=>{i("region"),d(""),m(""),f(""),g(""),N(""),j(""),p(""),k("")},ae=()=>{T(),s()},P=R=>{d(R),i("form"),k("")},z=()=>{i("region"),k("")},I=parseFloat(b)||0,Z=I>=J&&I<=a,Q=()=>!x.trim()||!Z?!1:c==="US"?!!h.trim()&&!!y.trim():c==="UK"?!!h.trim()&&!!w.trim():c==="EU"?!!v.trim():!1,_=async()=>{var R;if(Q()){C(!0),k("");try{const{data:{session:X}}=await Ye.auth.getSession();if(!X){k("Please log in to withdraw"),C(!1);return}const U=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/create_withdrawal",{method:"POST",headers:{Authorization:`Bearer ${X.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({amount:I,region:c,holder_name:x.trim(),account_number:h.trim()||null,routing_number:y.trim()||null,sort_code:w.trim()||null,iban:v.trim()||null})}),oe=await U.json();if(!U.ok){(R=oe.error)!=null&&R.includes("Insufficient")?k(l("withdraw.insufficient_balance")):k(oe.error||l("withdraw.error")),C(!1);return}i("success"),r()}catch{k(l("withdraw.error"))}finally{C(!1)}}},M=()=>{p(a.toFixed(2))},F=l("withdraw.min_amount").replace("$1.00",`$${J.toFixed(2)}`);return gl.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:ae}),e.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto animate-in fade-in zoom-in-95 duration-200",children:[e.jsx("div",{className:"sticky top-0 z-10 bg-gradient-to-r from-emerald-600 to-teal-600 rounded-t-2xl px-5 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[n==="form"&&e.jsx("button",{onClick:z,className:"p-1 rounded-lg hover:bg-white/20 transition-colors",children:e.jsx(xr,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-bold text-white",children:l("withdraw.title")}),e.jsx("p",{className:"text-xs text-emerald-100",children:l("withdraw.subtitle")})]})]}),e.jsx("button",{onClick:ae,className:"p-1.5 rounded-lg hover:bg-white/20 transition-colors",children:e.jsx(ht,{className:"w-5 h-5 text-white"})})]})}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-center justify-between bg-emerald-50 border border-emerald-200 rounded-xl p-3.5 mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1.5 rounded-lg bg-emerald-100",children:e.jsx(Jt,{className:"w-4 h-4 text-emerald-600"})}),e.jsx("span",{className:"text-sm font-medium text-emerald-700",children:l("withdraw.available_balance")})]}),e.jsxs("span",{className:"text-lg font-bold text-emerald-800",children:["$",a.toFixed(2)]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 mb-5 px-1",children:[e.jsx(nt,{className:"w-3 h-3 text-amber-500 flex-shrink-0"}),e.jsx("span",{className:"text-[11px] text-amber-600 font-medium",children:F})]}),n==="region"&&e.jsxs("div",{className:"space-y-2.5",children:[e.jsx("p",{className:"text-sm font-semibold text-slate-700 mb-3",children:l("withdraw.select_region")}),W4.map(R=>e.jsxs("button",{onClick:()=>P(R.code),className:"w-full flex items-center gap-4 p-4 bg-white border border-slate-200 rounded-xl hover:border-emerald-300 hover:shadow-md transition-all group active:scale-[0.99]",children:[e.jsx("img",{src:hf[R.code],alt:R.code,className:"w-10 h-7 object-cover rounded-sm shadow-sm"}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx("div",{className:"text-sm font-bold text-slate-800 group-hover:text-emerald-700 transition-colors",children:l(`withdraw.region_${R.code.toLowerCase()}`)}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:R.currency})]}),e.jsx(ra,{className:"w-4 h-4 text-slate-300 group-hover:text-emerald-500 transition-colors"})]},R.code))]}),n==="form"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("img",{src:hf[c],alt:c,className:"w-7 h-5 object-cover rounded-sm"}),e.jsxs("span",{className:"text-sm font-semibold text-slate-700",children:[l("withdraw.bank_details")," - ",l(`withdraw.region_${c.toLowerCase()}`)]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1.5",children:l("withdraw.holder_name")}
1037),e.jsxs("div",{className:"relative",children:[e.jsx(Gi,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",value:x,onChange:R=>m(R.target.value),placeholder:l("withdraw.holder_name_placeholder"),className:"w-full pl-10 pr-4 py-3 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 outline-none transition-all"})]})]}),(c==="US"||c==="UK")&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1.5",children:l("withdraw.account_number")}),e.jsx("input",{type:"text",value:h,onChange:R=>f(R.target.value),placeholder:l("withdraw.account_number_placeholder"),className:"w-full px-4 py-3 border border-slate-200 rounded-xl text-sm font-mono focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 outline-none transition-all"})]}),c==="US"&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1.5",children:l("withdraw.routing_number")}),e.jsx("input",{type:"text",value:y,onChange:R=>g(R.target.value),placeholder:l("withdraw.routing_number_placeholder"),className:"w-full px-4 py-3 border border-slate-200 rounded-xl text-sm font-mono focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 outline-none transition-all"})]}),c==="UK"&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1.5",children:l("withdraw.sort_code")}),e.jsx("input",{type:"text",value:w,onChange:R=>N(R.target.value),placeholder:l("withdraw.sort_code_placeholder"),className:"w-full px-4 py-3 border border-slate-200 rounded-xl text-sm font-mono focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 outline-none transition-all"})]}),c==="EU"&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1.5",children:l("withdraw.iban")}),e.jsx("input",{type:"text",value:v,onChange:R=>j(R.target.value),placeholder:l("withdraw.iban_placeholder"),className:"w-full px-4 py-3 border border-slate-200 rounded-xl text-sm font-mono focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 outline-none transition-all"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1.5",children:l("withdraw.amount")}),e.jsxs("div",{className:"relative",children:[e.jsx(Jt,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"number",value:b,onChange:R=>p(R.target.value),placeholder:l("withdraw.amount_placeholder"),step:"0.01",min:J,max:a,className:"w-full pl-10 pr-20 py-3 border border-slate-200 rounded-xl text-sm font-mono focus:ring-2 focus:ring-emerald-500 focus:border-emerald-500 outline-none transition-all"}),e.jsx("button",{onClick:M,className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1.5 bg-emerald-100 hover:bg-emerald-200 text-emerald-700 text-xs font-bold rounded-lg transition-colors",children:"MAX"})]}),e.jsx("p",{className:"text-[11px] text-slate-400 mt-1",children:F}),I>0&&I<J&&e.jsxs("p",{className:"text-[11px] text-red-500 mt-1 flex items-center gap-1",children:[e.jsx(nt,{className:"w-3 h-3"}),F]}),I>a&&e.jsxs("p",{className:"text-[11px] text-red-500 mt-1 flex items-center gap-1",children:[e.jsx(nt,{className:"w-3 h-3"}),l("withdraw.insufficient_balance")]})]}),S&&e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-200 rounded-xl",children:[e.jsx(nt,{className:"w-4 h-4 text-red-500 flex-shrink-0"}),e.jsx("p",{className:"text-sm text-red-600",children:S})]}),e.jsx("button",{onClick:_,disabled:!Q()||E,className:"w-full bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 disabled:from-slate-300 disabled:to-slate-300 text-white py-3.5 rounded-xl font-bold transition-all flex items-center justify-center gap-2 shadow-lg shadow-emerald-500/25 disabled:shadow-none text-sm",children:E?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"}),l("withdraw.submitting")]}):e.jsxs(e.Fragment,{children:[e.jsx(an,{className:"w-4 h-4"}),l("withdraw.submit")," $",I>0?I.toFixed(2):"0.00"]})})]}),n==="success"&&e.jsxs("div",{className:"text-center py-6",children:[e.jsx("div",{className:"w-16 h-16 bg-emerald-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(ne,{className:"w-8 h-8 text-emerald-600"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-2",children:l("withdraw.success_title")}),e.jsx("p",{className:"text-sm text-slate-500 mb-6 leading-relaxed max-w-xs mx-auto",children:l("withdraw.success_message")}),e.jsx("button",{onClick:ae,className:"px-8 py-3 bg-emerald-600 hover:bg-emerald-700 text-white rounded-xl font-semibold transition-colors text-sm",children:l("withdraw.close")})]})]})]})]}),document.body)}const pf="user_session_id",ff="user_referrer";function Dx(){let t=sessionStorage.getItem(pf);return t||(t=`sess_${Date.now()}_${Math.random().toString(36).substring(2,15)}`,sessionStorage.setItem(pf,t)),t}function V4(){let t=sessionStorage.getItem(ff);return t===null&&(t=document.referrer||"",sessionStorage.setItem(ff,t)),t||null}function Y4(){const t=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(t)?/ipad|tablet/i.test(t)?"tablet":"mobile":"desktop"}function Yy(t){const{user:s}=br(),a=o.useRef((t==null?void 0:t.disabled)??!1);a.current=(t==null?void 0:t.disabled)??!1;const r=o.useRef({currentPage:"/",currentAction:"browsing"}),l=o.useRef(null),n=o.useCallback(async m=>{var h;if(!a.current)try{const f=Dx(),y="https://kdqsajuhvcmxsnttdetg.supabase.co",w={"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"};try{const{supabase:j}=await _s(async()=>{const{supabase:p}=await Promise.resolve().then(()=>rn);return{supabase:p}},void 0),b=await j.auth.getSession();(h=b.data.session)!=null&&h.access_token&&(w.Authorization=`Bearer ${b.data.session.access_token}`)}catch{}const N={...r.current.metadata||{},...(m==null?void 0:m.metadata)||{}},v={session_id:f,current_page:(m==null?void 0:m.currentPage)||r.current.currentPage,current_action:(m==null?void 0:m.currentAction)||r.current.currentAction,device_type:Y4(),referrer:V4(),metadata:N};m&&(r.current={...r.current,...m,metadata:N}),await fetch(`${y}/functions/v1/record_user_activity`,{method:"POST",headers:w,body:JSON.stringify(v)})}catch{}},[]),i=o.useCallback(m=>{n({currentPage:m,currentAction:"viewing"})},[n]),c=o.useCallback((m,h)=>{n({currentAction:m,metadata:h||void 0})},[n]),d=o.useCallback((...m)=>{if(r.current.metadata){const h={...r.current.metadata};for(const f of m)delete h[f];r.current.metadata=h}},[]),x=o.useCallback(async()=>{try{const m=Dx(),h="https://kdqsajuhvcmxsnttdetg.supabase.co",f="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc";navigator.sendBeacon(`${h}/functions/v1/record_user_activity`,JSON.stringify({session_id:m,action:"cleanup"}))}catch{}},[]);return o.useEffect(()=>{if(a.current)return;n({currentPage:window.location.pathname,currentAction:"browsing"}),l.current=window.setInterval(()=>{n()},3e4);const m=()=>{x()},h=()=>{document.visibilityState==="hidden"&&x()};return window.addEventListener("beforeunload",m),document.addEventListener("visibilitychange",h),()=>{l.current&&clearInterval(l.current),window.removeEventListener("beforeunload",m),document.removeEventListener("visibilitychange",h)}},[n,x,s]),{trackPageView:i,trackAction:c,clearMetadata:d,sendHeartbeat:n,sessionId:Dx()}}function Rx({isOpen:t,onClose:s,initialShowAddFunds:a,initialTab:r}){var kr;const{profile:l,refreshProfile:n}=br(),{t:i}=os(),{formatInCurrency:c}=Nn(),{showAlert:d}=Vs(),[x,m]=o.useState("orders"),[h,f]=o.useState([]),[y,g]=o.useState([]),[w,N]=o.useState("all"),[v,j]=o.useState(!0),[b,p]=o.use
1037State(!1),[E,C]=o.useState(!1),{trackAction:S}=Yy();o.useEffect(()=>{t&&b?S("add_funds"):t&&S("dashboard")},[t,b,S]),o.useEffect(()=>{t&&a&&(m("wallet"),p(!0),C(!0))},[t,a]),o.useEffect(()=>{t&&r&&m(r)},[t,r]);const[k,J]=o.useState(""),[u,A]=o.useState(!1),[T,ae]=o.useState(null),[P,z]=o.useState(""),[I,Z]=o.useState(null),[Q,_]=o.useState(null),[M,F]=o.useState(null),[R,X]=o.useState(null),[re,U]=o.useState(!1),[oe,ue]=o.useState(!1),K=o.useRef(null),[q,je]=o.useState("all"),[we,se]=o.useState(""),[Se,$]=o.useState(""),[ie,be]=o.useState(()=>new Date().toDateString()),[Pe,de]=o.useState(!1),[H,me]=o.useState(!1),[ee,Ae]=o.useState(null),[he,D]=o.useState(""),[O,fe]=o.useState(""),[W,_e]=o.useState(!1),[Re,ve]=o.useState([]),[Te,ze]=o.useState(""),[it,ke]=o.useState(!1),[Xe,ce]=o.useState(!1),[Le,Fe]=o.useState(!1),[Me,ft]=o.useState(null),[pe,dt]=o.useState(""),[ot,Mt]=o.useState(""),[hs,B]=o.useState(""),[V,Ce]=o.useState(""),[Ee,Oe]=o.useState(!1),[xt,Dt]=o.useState(""),[ts,bs]=o.useState(!1),[Tt,_t]=o.useState(0),[Bt,Ts]=o.useState(0);o.useState(!1);const[ps,Bs]=o.useState(!1),[Xt,lr]=o.useState([]),[Kt,Y]=o.useState(!1),[qe,ct]=o.useState(0),[gt,ds]=o.useState(0),[ys,Na]=o.useState("card"),[Ma,Ll]=o.useState(null),[at,Ea]=o.useState([]),[zr,qa]=o.useState("select"),[At,so]=o.useState([]),[fs,Bl]=o.useState(null),[Ul,ql]=o.useState(null),[kn,$r]=o.useState(1200),[sl,al]=o.useState(null),[Lr,Br]=o.useState(!1),[da,rl]=o.useState(!1),[ms,yr]=o.useState(!1),[Gl,jr]=o.useState(null),[ll,_n]=o.useState(null),[Sn,Cn]=o.useState(!1),[vr,nl]=o.useState("regions"),[Ga,la]=o.useState(null),[Ur,Ue]=o.useState([]),[G,le]=o.useState(null),[Be,He]=o.useState(!1),[bt,Rt]=o.useState(!1),[zt,ss]=o.useState(null),[ma,Ys]=o.useState(null),[Ja,il]=o.useState(""),[Ns,qr]=o.useState(null),[jc,ka]=o.useState(!1);o.useEffect(()=>{if(!t)return;const L=()=>{const Gt=new Date().toDateString();Gt!==ie&&(be(Gt),q==="today"&&($e(),Ke()))},ge=new Date,St=new Date(ge.getFullYear(),ge.getMonth(),ge.getDate()+1,0,0,1,0).getTime()-ge.getTime(),yt=setTimeout(()=>{L()},St),Pt=setInterval(L,6e4);return()=>{clearTimeout(yt),clearInterval(Pt)}},[t,ie,q]),o.useEffect(()=>{const L=ge=>{const Qe=ge.target;Pe&&!Qe.closest(".date-picker-container")&&de(!1)};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[Pe]),o.useEffect(()=>{t&&l&&($e(),Ke(),et(),jt())},[t,l]),o.useEffect(()=>{if(!t||!l)return;const ge=setInterval(()=>{document.visibilityState==="visible"&&($e(),Ke(),et(),jt(),n())},3e4),Qe=()=>{document.visibilityState==="visible"&&t&&l&&($e(),Ke(),et(),jt(),n())};return document.addEventListener("visibilitychange",Qe),()=>{clearInterval(ge),document.removeEventListener("visibilitychange",Qe)}},[t,l]),o.useEffect(()=>{(async()=>{try{const ge=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_active_payment_methods_public",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(ge.ok){const Qe=await ge.json();Ll(Qe)}}catch(ge){console.error("Failed to fetch payment methods:",ge)}})()},[]),o.useEffect(()=>{(async()=>{try{const ge=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_active_payment_methods_public",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({for_wallet:!0})});if(ge.ok){const Qe=await ge.json();Qe.success&&Qe.methods&&Ea(Qe.methods)}}catch(ge){console.error("Failed to fetch wallet payment methods:",ge)}})()},[]),o.useEffect(()=>{if(Ul&&sl){const L=setInterval(()=>{const ge=new Date,Qe=Math.max(0,Math.floor((sl.getTime()-ge.getTime())/1e3));$r(Qe),Qe===0&&(clearInterval(L),qa("select"),Bl(null),ql(null),d("Payment time expired. Please try again.",{type:"warning"}))},1e3);return()=>clearInterval(L)}},[Ul,sl]);const vc=async()=>{yr(!0);try{const{data:L,error:ge}=await Ye.from("crypto_wallets").select("*").eq("is_active",!0).order("crypto_type");!ge&&L&&so(L)}catch(L){console.error("Error fetching crypto wallets:",L)}finally{yr(!1)}},nr=["BNB","BTC","ETH","TRX"],Gr=async(L,ge)=>{if(!nr.includes(L))return{price:1,cryptoAmt:ge.toFixed(2)};Cn(!0);try{const Qe=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_crypto_price?crypto=${L}`,{headers:{apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(!Qe.ok)throw new Error("Failed to fetch price");const yt=(await Qe.json()).price_usd,Pt=(ge/yt).toFixed(6);return jr(yt),_n(Pt),{price:yt,cryptoAmt:Pt}}catch(Qe){return console.error("Error fetching crypto price:",Qe),null}finally{Cn(!1)}},wr=async()=>{fs&&await Gr(fs.crypto_type,parseFloat(k))},Fm=async L=>{yr(!0);try{const{data:{user:ge}}=await Ye.auth.getUser();if(!ge){d("Please log in to continue",{type:"warning"}),yr(!1);return}const Qe=parseFloat(k),St=await Gr(L.crypto_type,Qe);if(!St){d("Failed to fetch crypto price. Please try again.",{type:"error"}),yr(!1);return}const yt=new Date;yt.setMinutes(yt.getMinutes()+20);const{data:Pt,error:Gt}=await Ye.from("crypto_payments").insert({user_id:ge.id,wallet_id:L.id,amount:Qe,crypto_amount:St.cryptoAmt,wallet_address:L.wallet_address,crypto_type:L.crypto_type,network:L.network,expires_at:yt.toISOString(),status:"pending",platform:"wallet_deposit",service_type:"wallet_deposit"}).select().single();if(Gt){console.error("Error creating crypto payment:",Gt),d("Failed to create payment. Please try again.",{type:"error"}),yr(!1);return}Pt&&(ql(Pt.id),al(yt),$r(1200),Bl(L),qa("payment"))}catch(ge){console.error("Error creating crypto payment:",ge),d("Failed to create payment. Please try again.",{type:"error"})}finally{yr(!1)}},wc=()=>
1037{fs&&(navigator.clipboard.writeText(fs.wallet_address),Br(!0),setTimeout(()=>Br(!1),2e3))},Nc=async()=>{if(Ul){rl(!0);try{const{data:{session:L}}=await Ye.auth.getSession();if(!(L!=null&&L.access_token)){d("Please log in to continue",{type:"warning"}),rl(!1);return}const ge=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/submit_crypto_payment",{method:"POST",headers:{Authorization:`Bearer ${L.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({payment_id:Ul})}),Qe=await ge.json();ge.ok&&Qe.success?qa("submitted"):d(Qe.error||"Error submitting payment. Please try again.",{type:"error"})}catch(L){console.error("Error submitting crypto payment:",L),d("Error submitting payment. Please try again.",{type:"error"})}finally{rl(!1)}}},kc=L=>{const ge=Math.floor(L/60),Qe=L%60;return`${ge}:${Qe.toString().padStart(2,"0")}`},si=()=>{qa("select"),Bl(null),ql(null),al(null),$r(1200),jr(null),_n(null)},In=[{code:"US",flag:"ðºð¸",currency:"USD",currencySymbol:"$",label:"United States"},{code:"UK",flag:"ð¬ð§",currency:"GBP",currencySymbol:"£",label:"United Kingdom"},{code:"EU",flag:"ðªðº",currency:"EUR",currencySymbol:"â¬",label:"Europe"}],ao={US:"https://flagcdn.com/w80/us.png",UK:"https://flagcdn.com/w80/gb.png",EU:"https://flagcdn.com/w80/eu.png"},ro=()=>{nl("regions"),la(null),Ue([]),le(null),ss(null),il(""),qr(null)},_c=async L=>{var ge;He(!0),ss(null);try{const St=await(await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_bank_accounts_public?region=${L}`,{headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}})).json();St.success&&((ge=St.data)==null?void 0:ge.length)>0?(Ue(St.data),le(St.data[0].id)):Ue([])}catch{ss("Failed to load bank accounts")}finally{He(!1)}},Sc=async L=>{const ge=In.find(Qe=>Qe.code===L);if(!ge||ge.currency==="USD"){qr(1);return}ka(!0);try{const St=await(await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_exchange_rate?currency=${ge.currency}`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}})).json();St.rate&&qr(St.rate)}catch{qr(null)}finally{ka(!1)}},Cc=L=>{la(L),nl("details"),_c(L),Sc(L)},Ic=async()=>{if(!(!G||!k)){Rt(!0),ss(null);try{const{data:{session:L}}=await Ye.auth.getSession();if(!L)throw new Error("Please log in");const ge=parseFloat(k),Qe=In.find(Gt=>Gt.code===Ga),St=Ns&&(Qe==null?void 0:Qe.currency)!=="USD"?Math.ceil(ge*Ns*100)/100:null,Pt=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/submit_bank_transfer_deposit",{method:"POST",headers:{Authorization:`Bearer ${L.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({bankAccountId:G,amount:ge,senderName:Ja.trim(),localPrice:St,exchangeRateUsed:Ns})})).json();Pt.success?nl("submitted"):ss(Pt.error||"Failed to submit transfer")}catch(L){ss(L instanceof Error?L.message:"An error occurred")}finally{Rt(!1)}}},Tc=(L,ge)=>{navigator.clipboard.writeText(L),Ys(ge),setTimeout(()=>Ys(null),2e3)},te=o.useCallback(async()=>{if(!(!k||parseFloat(k)<5)){ue(!0),ae(null);try{const{data:{session:L}}=await Ye.auth.getSession();if(!L)throw new Error("Please log in");const ge=parseFloat(k),St=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/stripe_create_wallet_intent",{method:"POST",headers:{Authorization:`Bearer ${L.access_token}`,"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({amount:ge})}),yt=await St.json();if(!St.ok)throw new Error(yt.error||"Failed to initialize payment");if(!window.Stripe)throw new Error("Stripe is not loaded");const Pt=window.Stripe(yt.publishableKey);Z(Pt),F(yt.clientSecret),X(yt.paymentIntentId);const Gt=Pt.elements({clientSecret:yt.clientSecret,appearance:{theme:"stripe",variables:{colorPrimary:"#2563eb",borderRadius:"12px"}}}
1037),Wt=Gt.create("card",{style:{base:{fontSize:"16px",color:"#1e293b",fontFamily:"system-ui, -apple-system, sans-serif","::placeholder":{color:"#94a3b8"}},invalid:{color:"#ef4444"}}});_(Gt),setTimeout(()=>{K.current&&(Wt.mount(K.current),Wt.on("ready",()=>U(!0)),Wt.on("change",Tn=>{Tn.error?ae(Tn.error.message):ae(null)}))},100)}catch(L){ae(L instanceof Error?L.message:"Failed to initialize payment")}finally{ue(!1)}}},[k]),xe=async()=>{if(!I||!Q||!M){ae("Payment not initialized");return}const L=Q.getElement("card");if(!L){ae("Card element not found");return}A(!0),ae(null);try{const{error:ge,paymentIntent:Qe}=await I.confirmCardPayment(M,{payment_method:{card:L,billing_details:{name:P||void 0}}});if(ge)throw new Error(ge.message);if((Qe==null?void 0:Qe.status)==="succeeded"){const{data:{session:St}}=await Ye.auth.getSession();if(!St)throw new Error("Session expired");const yt=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/stripe_confirm_wallet_deposit",{method:"POST",headers:{Authorization:`Bearer ${St.access_token}`,"Content-Type":"application/json",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({paymentIntentId:R})}),Pt=await yt.json();if(!yt.ok)throw new Error(Pt.error||"Failed to confirm deposit");await n(),await Ke(),Ie(),p(!1),J(""),z(""),ct(Pt.amount),ds(Pt.newBalance),Y(!0)}else throw new Error("Payment was not successful")}catch(ge){ae(ge instanceof Error?ge.message:"Payment failed")}finally{A(!1)}},Ie=()=>{if(Q){const L=Q.getElement("card");L&&L.destroy()}Z(null),_(null),F(null),X(null),U(!1)},Ge=()=>{p(!0),J(""),z(""),ae(null),Ie()},De=()=>{if(p(!1),J(""),z(""),ae(null),Ie(),E){C(!1),s();return}si(),ro()},$e=async()=>{var L;if(!l){j(!1);return}try{const{data:{session:ge},error:Qe}=await Ye.auth.getSession();if(Qe||!ge)throw new Error("Please log in to view orders");const St=`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_user_orders?userId=${l.id}`,yt=await fetch(St,{headers:{Authorization:`Bearer ${ge.access_token}`,"Content-Type":"application/json"}});if(!yt.ok){const Wt=await yt.json();throw new Error(Wt.error||"Failed to fetch orders")}const Pt=await yt.json(),Gt=((L=Pt.data)==null?void 0:L.orders)||Pt.orders||[];f(Gt||[])}catch(ge){console.error("Error fetching orders:",ge),f([])}finally{j(!1)}},Ke=async()=>{if(l)try{const{data:L,error:ge}=await Ye.from("wallet_transactions").select("*").eq("user_id",l.id).neq("status","pending").order("created_at",{ascending:!1});if(ge)throw ge;g(L||[])}catch(L){console.error("Error fetching transactions:",L)}},et=async()=>{if(l)try{const{data:L,error:ge}=await Ye.from("refill_requests").select("*").eq("user_id",l.id).order("requested_at",{ascending:!1});if(ge)throw ge;ve(L||[])}catch(L){console.error("Error fetching refill requests:",L)}},jt=async()=>{if(l)try{const{data:{session:L}}=await Ye.auth.getSession();if(!L)return;const Qe=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_user_withdrawals",{headers:{Authorization:`Bearer ${L.access_token}`,"Content-Type":"application/json"}})).json();Qe.withdrawals&&lr(Qe.withdrawals)}catch(L){console.error("Error fetching withdrawals:",L)}},Et=L=>{const ge=Re.find(Pt=>Pt.order_id===L);if(!ge)return{canRequest:!0};if(ge.status==="pending"||ge.status==="processing")return{canRequest:!1,reason:"You already have a pending refill request for this order"};const Qe=new Date(ge.requested_at),yt=(new Date().getTime()-Qe.getTime())/(1e3*60*60);return yt<24?{canRequest:!1,reason:`Please wait ${Math.ceil(24-yt)} hour(s) before requesting another refill`}:{canRequest:!0}},xa=L=>Re.find(ge=>ge.order_id===L&&(ge.status==="pending"||ge.status==="processing")),Xs=L=>{const ge=Et(L.id);if(!ge.canRequest){ze(ge.reason||"Cannot request refill at this time");return}Ae(L),D(""),fe(""),ze(""),ke(!1),me(!0)},as=async()=>{if(!ee||!he||!l)return;const L=parseInt(he);if(isNaN(L)||L<=0){ze("Please enter a valid drop amount");return}if(L>ee.quantity){ze("Drop amount cannot exceed order quantity");return}_e(!0),ze("");try{const{data:{session:ge},error:Qe}=await Ye.auth.getSession();if(Qe||!ge)throw new Error("Please log in to submit refill request");const yt=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/submit_refill_request",{method:"POST",headers:{Authorization:`Bearer ${ge.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({order_id:ee.id,provider_order_id:ee.provider_order_id,claimed_drop_amount:L})}),Pt=await yt.json();if(!yt.ok)throw new Error(Pt.error||"Failed to submit refill request");await et(),me(!1),Ae(null),D(""),fe("")}catch(ge){console.error("Error submitting refill:",ge),ze(ge instanceof Error?ge.message:"Failed to submit refill request")}finally{_e(!1)}},Da=L=>{ft(L),dt(""),Mt(""),B(""),Ce(""),Dt(""),ce(!1),Fe(!0)},ol=async()=>
1037{if(!(!Me||!pe||!l)){if(ot==="refill"){const L=parseInt(hs);if(isNaN(L)||L<=0){Dt("Please enter a valid drop amount");return}if(L>Me.quantity){Dt("Drop amount cannot exceed order quantity");return}}Oe(!0),Dt("");try{const{data:{session:L},error:ge}=await Ye.auth.getSession();if(ge||!L)throw new Error("Please log in to submit refund request");if(ot==="money"){const St=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/submit_customer_refund_request",{method:"POST",headers:{Authorization:`Bearer ${L.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({order_id:Me.id,reason:pe})}),yt=await St.json();if(!St.ok)throw new Error(yt.error||"Failed to submit refund request");_t(yt.refundAmount||Me.price),Ts(yt.newBalance||0),Fe(!1),bs(!0),await $e(),await fetchWalletInfo()}else if(ot==="refill"){const St=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/submit_refill_request",{method:"POST",headers:{Authorization:`Bearer ${L.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({order_id:Me.id,provider_order_id:Me.provider_order_id,claimed_drop_amount:parseInt(hs),reason:pe})}),yt=await St.json();if(!St.ok)throw new Error(yt.error||"Failed to submit refill request");await et(),Fe(!1),ft(null)}}catch(L){console.error("Error submitting refund:",L),Dt(L instanceof Error?L.message:"Failed to submit request")}finally{Oe(!1)}}},vt=L=>{if(L.payment_method==="crypto"&&L.crypto_payment){const ge=L.crypto_payment.status;if(ge==="pending"||ge==="submitted")return"awaiting_verification";if(ge==="rejected")return"rejected"}return L.status==="failed"||L.status==="paid"||L.status==="queued"||L.status==="in_progress"?"processing":L.status},Nr=L=>{const ge="w-4 h-4";switch(L){case"completed":return e.jsx(ne,{className:`${ge} text-emerald-500`});case"processing":return e.jsx(Ze,{className:`${ge} text-blue-500 animate-pulse`});case"awaiting_verification":return e.jsx(Ze,{className:`${ge} text-orange-500 animate-pulse`});case"pending":case"paid":return e.jsx(Ze,{className:`${ge} text-amber-500`});case"partial":return e.jsx(nt,{className:`${ge} text-orange-500`});case"failed":case"canceled":case"cancelled":case"rejected":return e.jsx(nt,{className:`${ge} text-red-500`});case"refunded":return e.jsx(nt,{className:`${ge} text-slate-500`});default:return e.jsx(nt,{className:`${ge} text-slate-400`})}},Pc=L=>{switch(L){case"completed":return"bg-emerald-500/10 text-emerald-600 border-emerald-500/20";case"processing":return"bg-blue-500/10 text-blue-600 border-blue-500/20";case"awaiting_verification":return"bg-orange-500/10 text-orange-600 border-orange-500/20";case"pending":case"paid":return"bg-amber-500/10 text-amber-600 border-amber-500/20";case"partial":return"bg-orange-500/10 text-orange-600 border-orange-500/20";case"failed":case"canceled":case"cancelled":case"rejected":return"bg-red-500/10 text-red-600 border-red-500/20";case"refunded":return"bg-slate-500/10 text-slate-600 border-slate-500/20";default:return"bg-slate-100 text-slate-600 border-slate-200"}},Ac=L=>{switch(L){case"completed":return"bg-gradient-to-br from-emerald-50 to-teal-50 border-emerald-100";case"processing":return"bg-gradient-to-br from-blue-50 to-cyan-50 border-blue-100";case"awaiting_verification":return"bg-gradient-to-br from-orange-50 to-amber-50 border-orange-100";case"pending":case"paid":return"bg-gradient-to-br from-amber-50 to-yellow-50 border-amber-100";case"partial":return"bg-gradient-to-br from-orange-50 to-amber-50 border-orange-100";case"failed":case"canceled":case"cancelled":case"rejected":return"bg-gradient-to-br from-red-50 to-rose-50 border-red-100";case"refunded":return"bg-gradient-to-br from-slate-50 to-gray-50 border-slate-100";default:return"bg-slate-50 border-slate-100"}},cl=o.useMemo(()=>{if(q==="all")return h;const L=new Date;let ge,Qe=new Date(L.getFullYear(),L.getMonth(),L.getDate(),23,59,59,999);switch(q){case"today":ge=new Date(L.getFullYear(),L.getMonth(),L.getDate(),0,0,0,0);break;case"week":ge=new Date(L.getTime()-7*24*60*60*1e3),ge.setHours(0,0,0,0);break;case"month":ge=new Date(L.getFullYear(),L.getMonth(),1,0,0,0,0);break;
1037case"custom":if(!we)return h;ge=new Date(we),ge.setHours(0,0,0,0),Se&&(Qe=new Date(Se),Qe.setHours(23,59,59,999));break;default:return h}return h.filter(St=>{const yt=new Date(St.created_at);return yt>=ge&&yt<=Qe})},[h,q,we,Se,ie]),Mc=()=>{switch(q){case"today":return"Today";case"week":return"Last 7 days";case"month":return"This month";case"custom":return we&&Se?`${new Date(we).toLocaleDateString("en-US",{month:"short",day:"numeric"})} - ${new Date(Se).toLocaleDateString("en-US",{month:"short",day:"numeric"})}`:we?`From ${new Date(we).toLocaleDateString("en-US",{month:"short",day:"numeric"})}`:"Custom";default:return"All time"}};if(!t||!l)return null;const Ec=cl.filter(L=>L.status==="completed").length,Ft=cl.filter(L=>["paid","processing"].includes(L.status)).length;return e.jsxs("div",{className:`fixed inset-0 z-50 bg-slate-900/80 backdrop-blur-lg overflow-y-auto ${E&&b?"invisible":""}`,children:[e.jsx("div",{className:"min-h-full flex items-start justify-center p-0 sm:p-4 md:p-6",children:e.jsxs("div",{className:"bg-gradient-to-b from-slate-50 to-white sm:rounded-2xl md:rounded-3xl shadow-2xl w-full max-w-6xl relative overflow-hidden min-h-screen sm:min-h-0",children:[e.jsx("div",{className:"sticky top-0 z-20 bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 px-4 sm:px-6 md:px-10 py-4 sm:py-5 md:py-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 md:gap-4",children:[e.jsx("div",{className:"flex w-10 h-10 sm:w-11 sm:h-11 md:w-12 md:h-12 rounded-xl sm:rounded-2xl bg-gradient-to-br from-blue-500 to-cyan-400 items-center justify-center shadow-lg shadow-blue-500/30",children:e.jsx(kt,{className:"w-5 h-5 sm:w-5 sm:h-5 md:w-6 md:h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base sm:text-xl md:text-2xl font-bold text-white",children:i("dashboard.title")}),e.jsx("p",{className:"text-[11px] sm:text-sm text-slate-400",children:i("dashboard.subtitle")})]})]}),e.jsx("button",{onClick:s,className:"p-2 sm:p-2.5 rounded-xl bg-white/10 hover:bg-white/20 active:bg-white/30 text-white transition-all duration-200",children:e.jsx(ht,{className:"w-5 h-5 md:w-6 md:h-6"})})]})}),e.jsxs("div",{className:"p-4 sm:p-6 md:p-10",children:[e.jsxs("div",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-blue-600 via-blue-500 to-cyan-500 p-4 sm:p-5 md:p-6 text-white shadow-xl shadow-blue-500/25 mb-4 sm:mb-5 md:mb-6",children:[e.jsx("div",{className:"absolute top-0 right-0 w-40 h-40 bg-white/10 rounded-full -mr-20 -mt-20"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-32 h-32 bg-white/5 rounded-full -ml-16 -mb-16"}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 sm:mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1.5 sm:p-2 rounded-lg bg-white/20 backdrop-blur",children:e.jsx(kt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-white"})}),e.jsx("span",{className:"text-xs sm:text-sm font-medium text-white/80",children:i("dashboard.available_balance")})]}),(Ma==null?void 0:Ma.wallet_loading_enabled)!==!1&&e.jsxs("button",{onClick:Ge,className:"flex items-center gap-1.5 px-3 py-1.5 sm:px-4 sm:py-2 bg-white/20 hover:bg-white/30 active:bg-white/40 backdrop-blur rounded-lg sm:rounded-xl text-xs sm:text-sm font-semibold transition-all",children:[e.jsx(ns,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),e.jsx("span",{children:i("dashboard.add_funds")})]})]}),e.jsx("div",{className:"text-3xl sm:text-4xl md:text-5xl font-bold tracking-tight",children:c((l.balance||0)+(l.refund_balance||0))})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 sm:gap-3 md:gap-5 mb-5 sm:mb-6 md:mb-8",children:[e.jsxs("div",{className:"relative overflow-hidden rounded-xl sm:rounded-2xl bg-white border border-slate-200/80 p-3 sm:p-4 md:p-5 shadow-sm hover:shadow-md transition-all duration-300 group",children:[e.jsx("div",{className:"absolute top-0 right-0 w-16 sm:w-20 h-16 sm:h-20 bg-emerald-500/5 rounded-full -mr-8 sm:-mr-10 -mt-8 sm:-mt-10 group-hover:bg-emerald-500/10 transition-colors"}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 mb-1.5 sm:mb-2 md:mb-3",children:[e.jsx("div",{className:"p-1 sm:p-1.5 rounded-md sm:rounded-lg bg-emerald-100",children:e.jsx(us,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 md:w-4 md:h-4 text-emerald-600"})}),e.jsx("span",{className:"text-[10px] sm:text-xs md:text-sm font-medium text-slate-500",children:i("dashboard.total")})]}),e.jsx("div",{className:"text-lg sm:text-2xl md:text-3xl font-bold text-slate-900",children:cl.length})]})]}),e.jsxs("div",{className:"relative overflow-hidden rounded-xl sm:rounded-2xl bg-white border border-slate-200/80 p-3 sm:p-4 md:p-5 shadow-sm hover:shadow-md transition-all duration-300 group",children:[e.jsx("div",{className:"absolute top-0 right-0 w-16 sm:w-20 h-16 sm:h-20 bg-blue-500/5 rounded-full -mr-8 sm:-mr-10 -mt-8 sm:-mt-10 group-hover:bg-blue-500/10 transition-colors"}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 mb-1.5 sm:mb-2 md:mb-3",children:[e.jsx("div",{className:"p-1 sm:p-1.5 rounded-md sm:rounded-lg bg-blue-100",children:e.jsx(tt,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 md:w-4 md:h-4 text-blue-600"})}),e.jsx("span",{className:"text-[10px] sm:text-xs md:text-sm font-medium text-slate-500",children:i("dashboard.active")})]}),e.jsx("div",{className:"text-lg sm:text-2xl md:text-3xl font-bold text-slate-900",children:Ft})]})]}),e.jsxs("div",{className:"relative overflow-hidden rounded-xl sm:rounded-2xl bg-white border border-slate-200/80 p-3 sm:p-4 md:p-5 shadow-sm hover:shadow-md transition-all duration-300 group",children:[e.jsx("div",{className:"absolute top-0 right-0 w-16 sm:w-20 h-16 sm:h-20 bg-teal-500/5 rounded-full -mr-8 sm:-mr-10 -mt-8 sm:-mt-10 group-hover:bg-teal-500/10 transition-colors"}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 mb-1.5 sm:mb-2 md:mb-3",children:[e.jsx("div",{className:"p-1 sm:p-1.5 rounded-md sm:rounded-lg bg-teal-100",children:e.jsx(ne,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 md:w-4 md:h-4 text-teal-600"})}),e.jsx("span",{className:"text-[10px] sm:text-xs md:text-sm font-medium text-slate-500",children:i("dashboard.done")})]}),e.jsx("div",{className:"text-lg sm:text-2xl md:text-3xl font-bold text-slate-900",children:Ec})]})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 p-1 sm:p-1.5 bg-slate-100 rounded-xl mb-5 sm:mb-6 md:mb-8",children:[e.jsx("button",{onClick:()=>m("orders"),className:`flex-1 sm:flex-none px-4 sm:px-6 py-2.5 sm:py-2.5 rounded-lg text-xs sm:text-sm font-semibold transition-all duration-200 ${x==="orders"?"bg-white text-slate-900 shadow-sm":"text-slate-600 hover:text-slate-900 active:bg-white/50"}`,children:e.jsxs("span",{className:"flex items-center justify-center gap-1.5 sm:gap-2",children:[e.jsx(us,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),e.jsx("span",{children:i("dashboard.orders_tab")})]})}),e.jsx("button",{onClick:()=>m("wallet"),className:`flex-1 sm:flex-none px-4 sm:px-6 py-2.5 sm:py-2.5 rounded-lg text-xs sm:text-sm font-semibold transition-all duration-200 ${x==="wallet"?"bg-white text-slate-900 shadow-sm":"text-slate-600 hover:text-slate-900 active:bg-white/50"}`,children:e.jsxs("span",{className:"flex items-center justify-center gap-1.5 sm:gap-2",children:[e.jsx(kt,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),e.jsx("span",{children:i("dashboard.wallet_tab")})]})})]}),x==="orders"&&e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 mb-4",children:[e.jsxs("div",{className:"relative date-picker-container",children:[e.jsxs("button",{onClick:()=>de(!Pe),className:"flex items-center gap-2 px-3 py-2 bg-white border border-slate-200 rounded-xl text-sm font-medium text-slate-700 hover:border-slate-300 hover:bg-slate-50 transition-all w-full sm:w-auto",children:[e.jsx(Yn,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{children:Mc()}),e.jsx(is,{className:`w-4 h-4 text-slate-400 transition-transform ${Pe?"rotate-180":""}`})]}),Pe&&e.jsxs("div",{className:"absolute top-full left-0 mt-2 w-72 bg-white rounded-xl border border-slate-200 shadow-xl z-30 overflow-hidden",children:[e.jsx("div",{className:"p-2 border-b border-slate-100",children:e.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:[{value:"all",label:i("dashboard.all_time")},{value:"today",label:i("dashboard.today")},{value:"week",label:i("dashboard.last_7_days")},{value:"month",label:i("dashboard.this_month")}].map(L=>e.jsx("button",{onClick:()=>{je(L.value),L.value!=="custom"&&(se(""),$(""),de(!1))},className:`px-3 py-2 rounded-lg text-xs font-medium transition-all ${q===L.value?"bg-blue-500 text-white":"bg-slate-50 text-slate-600 hover:bg-slate-100"}`,children:L.label},L.value))})}),e.jsxs("div",{className:"p-3",children:[e.jsx("p",{className:"text-xs font-medium text-slate-500 mb-2",children:i("dashboard.custom_date_range")}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"text-[10px] text-slate-400 mb-1 block",children:i("dashboard.from")}),e.jsx("input",{type:"date",value:we,onChange:L=>{se(L.target.value),je("custom")},className:"w-full px-2.5 py-1.5 text-xs border border-slate-200 rounded-lg focus:border-blue-400 focus:outline-none"})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"text-[10px] text-slate-400 mb-1 block",children:i("dashboard.to")}),e.jsx("input",{type:"date",value:Se,onChange:L=>{$(L.target.value),je("custom")},min:we,className:"w-full px-2.5 py-1.5 text-xs border border-slate-200 rounded-lg focus:border-blue-400 focus:outline-none"})]})]}),e.jsx("button",{onClick:()=>de(!1),className:"w-full mt-3 py-2 bg-blue-500 text-white text-xs font-medium rounded-lg hover:bg-blue-600 transition-colors",children:i("dashboard.apply_filter")})]})]})]}),q!=="all"&&e.jsx("button",{onClick:()=>{je("all"),se(""),$("")},className:"text-xs text-blue-600 hover:text-blue-700 font-medium",children:i("dashboard.clear_filter")})]}),v?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 sm:py-16",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 border-3 border-slate-200 border-t-blue-600 rounded-full animate-spin mb
1037-3 sm:mb-4"}),e.jsx("p",{className:"text-sm text-slate-500",children:i("dashboard.loading_orders")})]}):h.length===0?e.jsxs("div",{className:"text-center py-10 sm:py-16 md:py-20",children:[e.jsx("div",{className:"inline-flex p-4 sm:p-5 rounded-2xl sm:rounded-3xl bg-slate-100 mb-4 sm:mb-5",children:e.jsx(us,{className:"w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 text-slate-400"})}),e.jsx("h3",{className:"text-base sm:text-lg md:text-xl font-semibold text-slate-900 mb-1.5 sm:mb-2",children:i("dashboard.no_orders")}),e.jsx("p",{className:"text-xs sm:text-sm md:text-base text-slate-500 max-w-md mx-auto px-4",children:i("dashboard.no_orders_desc")})]}):cl.length===0?e.jsxs("div",{className:"text-center py-10 sm:py-16",children:[e.jsx("div",{className:"inline-flex p-4 sm:p-5 rounded-2xl bg-slate-100 mb-4",children:e.jsx(Ds,{className:"w-8 h-8 sm:w-10 sm:h-10 text-slate-400"})}),e.jsx("h3",{className:"text-base sm:text-lg font-semibold text-slate-900 mb-1.5",children:i("dashboard.no_orders_period")}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-500 max-w-md mx-auto px-4",children:i("dashboard.no_orders_period_desc")})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("span",{className:"text-xs sm:text-sm text-slate-500",children:[cl.length," ",i("dashboard.orders_count")]}),e.jsx("span",{className:"text-[10px] sm:text-xs text-slate-400",children:i("dashboard.scroll_more")})]}),e.jsx("div",{className:"max-h-[400px] sm:max-h-[450px] md:max-h-[500px] overflow-y-auto pr-1 space-y-3 sm:space-y-4 scrollbar-thin scrollbar-thumb-slate-300 scrollbar-track-transparent hover:scrollbar-thumb-slate-400",style:{scrollbarWidth:"thin"},children:cl.map(L=>{var St,yt,Pt;const ge=vt(L),Qe=i(`status.${ge}`);return e.jsxs("div",{className:`relative overflow-hidden rounded-xl sm:rounded-2xl border p-3.5 sm:p-4 md:p-6 transition-all duration-300 active:scale-[0.99] ${Ac(ge)}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3 sm:mb-4",children:[e.jsxs("div",{className:"flex items-start gap-2.5 sm:gap-3 md:gap-4 min-w-0 flex-1",children:[e.jsx("div",{className:`flex-shrink-0 p-2 sm:p-2.5 md:p-3 rounded-xl ${ge==="completed"?"bg-emerald-100":ge==="processing"?"bg-blue-100":ge==="awaiting_verification"?"bg-orange-100":ge==="failed"||ge==="canceled"||ge==="cancelled"||ge==="rejected"?"bg-red-100":"bg-amber-100"}`,children:Nr(ge)}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-0.5 sm:mb-1",children:[e.jsx("h4",{className:"font-semibold text-slate-900 text-sm sm:text-base leading-tight line-clamp-2",children:L.service_name||`${L.platform} ${L.service_type}`}),L.payment_source==="gift_balance"&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-emerald-100 text-emerald-700 text-[10px] sm:text-xs font-semibold rounded-full",children:[e.jsx(Vt,{className:"w-3 h-3"}),i("dashboard.gift_order")]})]}),e.jsxs("p",{className:"text-xs sm:text-sm text-slate-500",children:[e.jsx("span",{className:"font-semibold text-slate-700",children:L.quantity.toLocaleString("en-US")})," ",L.service_type]})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-1.5 sm:gap-2 flex-shrink-0",children:[e.jsx("div",{className:"text-base sm:text-lg md:text-xl font-bold text-slate-900",children:c(typeof L.price=="number"?L.price:Number(L.price))}),ge==="partial"&&L.refund_amount!=null&&L.refund_amount>0&&e.jsxs("div",{className:"text-[10px] sm:text-xs font-semibold text-green-600 bg-green-50 px-2 py-0.5 rounded-full border border-green-200",children:["+",c(L.refund_amount)," refunded"]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[ge==="completed"&&L.payment_source!=="gift_balance"&&L.refund_eligible!==!1&&e.jsx("button",{onClick:Gt=>{Gt.stopPropagation(),Da(L)},className:"text-[10px] sm:text-xs font-bold px-3 sm:px-4 py-1 sm:py-1.5 rounded-lg bg-gradient-to-r from-red-500 to-rose-500 text-white shadow-md shadow-red-500/30 hover:from-red-600 hover:to-rose-600 hover:shadow-lg hover:shadow-red-500/40 active:scale-95 transition-all",children:i("dashboard.report_error")}),e.jsx("span",{className:`text-[10px] sm:text-xs font-semibold px-2 sm:px-2.5 py-0.5 sm:py-1 rounded-full border ${Pc(ge)}`,children:Qe})]})]})]}),L.customer_note&&e.jsx("div",{className:"mt-3 p-3 rounded-xl bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(nt,{className:"w-4 h-4 text-blue-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs font-semibold text-blue-700 block mb-1",children:"Admin Note"}),e.jsx("p",{className:"text-xs text-blue-600",children:L.customer_note})]})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3 md:gap-4 pt-3 sm:pt-4 border-t border-slate-200/60",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Gs,{className:"w-3.5 h-3.5 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-slate-400 block text-[10px] sm:text-xs font-medium",children:i("dashboard.target")}),e.jsx("span",{className:"text-slate-700 font-medium text-xs sm:text-sm truncate block",children:L.link||L.username})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Nt,{className:"w-3.5 h-3.5 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-slate-400 block text-[10px] sm:text-xs font-medium",children:i("dashboard.payment")}),e.jsx("span",{className:"text-slate-700 font-medium capitalize text-xs sm:text-sm",children:L.payment_method==="link_payment"?"Link Payment":L.payment_method})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Ds,{className:"w-3.5 h-3.5 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-slate-400 block text-[10px] sm:text-xs font-medium",children:i("dashboard.date")}),e.jsx("span",{className:"text-slate-700 font-medium text-xs sm:text-sm",children:new Date(L.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]})]}),(L.order_number||L.reseller_order_id)&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(fc,{className:"w-3.5 h-3.5 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-slate-400 block text-[10px] sm:text-xs font-medium",children:i("dashboard.order_id")}),e.jsx("span",{className:"text-slate-700 font-medium font-mono text-[10px] sm:text-xs truncate block",children:L.reseller_order_id?L.reseller_order_id.slice(0,8):L.order_number})]})]})]}),L.start_count!==void 0&&L.start_count!==null&&e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3 md:gap-4 pt-3 sm:pt-4 mt-2 border-t border-slate-200/60",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(zs,{className:"w-3.5 h-3.5 text-blue-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-slate-400 block text-[10px] sm:text-xs font-medium",children:i("dashboard.start_count")}),e.jsx("span",{className:"text-blue-600 font-semibold text-xs sm:text-sm",children:L.start_count.toLocaleStr
1037ing("en-US")})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Os,{className:"w-3.5 h-3.5 text-amber-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-slate-400 block text-[10px] sm:text-xs font-medium",children:i("dashboard.remains")}),e.jsx("span",{className:`font-semibold text-xs sm:text-sm ${L.remains===0?"text-emerald-600":"text-amber-600"}`,children:L.remains!==void 0&&L.remains!==null?L.remains.toLocaleString("en-US"):"-"})]})]})]}),L.payment_method==="crypto"&&L.crypto_payment&&e.jsxs("div",{className:`mt-3 sm:mt-4 p-3 sm:p-4 rounded-xl border ${L.crypto_payment.status==="confirmed"?"bg-emerald-50 border-emerald-200":L.crypto_payment.status==="rejected"?"bg-red-50 border-red-200":L.crypto_payment.status==="submitted"?"bg-orange-50 border-orange-200":"bg-amber-50 border-amber-200"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(kt,{className:`w-4 h-4 ${L.crypto_payment.status==="confirmed"?"text-emerald-600":L.crypto_payment.status==="rejected"?"text-red-600":L.crypto_payment.status==="submitted"?"text-orange-600":"text-amber-600"}`}),e.jsxs("span",{className:`text-xs sm:text-sm font-semibold ${L.crypto_payment.status==="confirmed"?"text-emerald-700":L.crypto_payment.status==="rejected"?"text-red-700":L.crypto_payment.status==="submitted"?"text-orange-700":"text-amber-700"}`,children:[L.crypto_payment.status==="confirmed"&&"Payment Confirmed - Order Processing",L.crypto_payment.status==="rejected"&&"Payment Rejected",L.crypto_payment.status==="submitted"&&"Payment Under Review",L.crypto_payment.status==="pending"&&"Awaiting Payment Confirmation"]})]}),e.jsxs("p",{className:`text-[10px] sm:text-xs ${L.crypto_payment.status==="confirmed"?"text-emerald-600":L.crypto_payment.status==="rejected"?"text-red-600":L.crypto_payment.status==="submitted"?"text-orange-600":"text-amber-600"}`,children:[L.crypto_payment.status==="confirmed"&&"Your crypto payment has been verified. Order is being processed.",L.crypto_payment.status==="rejected"&&(L.crypto_payment.rejection_reason||"Your payment was not approved. Please contact support."),L.crypto_payment.status==="submitted"&&"Your payment is being reviewed by our team. This may take a few minutes.",L.crypto_payment.status==="pending"&&"Please complete your crypto payment to start order processing."]})]}),(L.status==="refunded"||L.status==="partial"&&L.refund_amount&&L.refund_amount>0)&&L.refund_amount&&e.jsxs("div",{className:"mt-3 sm:mt-4 p-3 sm:p-4 rounded-xl bg-gradient-to-r from-emerald-50 to-teal-50 border border-emerald-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(kt,{className:"w-4 h-4 text-emerald-600"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold text-emerald-700",children:L.status==="partial"?i("dashboard.partial_refund")||"Partial Refund Credited":i("dashboard.refund_credited")||"Refund Credited"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-sm font-bold text-emerald-700",children:c(L.refund_amount)}),L.refund_reason&&e.jsxs("p",{className:"text-[10px] sm:text-xs text-slate-600",children:[e.jsxs("span",{className:"font-medium",children:[i("dashboard.reason")||"Reason",":"]})," ",L.refund_reason]}),e.jsx("div",{className:"mt-2 p-2 bg-emerald-100/50 rounded-lg border border-emerald-200/50",children:e.jsxs("p",{className:"text-[10px] sm:text-xs text-emerald-700",children:[e.jsxs("span",{className:"font-semibold",children:[i("dashboard.note")||"Note",":"]})," ",i("dashboard.refund_wallet_note")||"Refund amount has been credited to your wallet balance. You can use this balance for future orders."]})})]})]}),((St=L.platform)==null?void 0:St.toLowerCase())==="tiktok"&&((yt=L.service_type)==null?void 0:yt.toLowerCase().includes("follower"))&&ge!=="completed"&&ge!=="failed"&&ge!=="canceled"&&ge!=="cancelled"&&ge!=="rejected"&&e.jsx("div",{className:"mt-3 sm:mt-4 p-3 sm:p-4 rounded-xl bg-gradient-to-r from-slate-800 to-slate-900 border-2 border-slate-700",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-gradient-to-br from-cyan-500 to-teal-500 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-bold text-white",children:"Natural Delivery Speed"}),e.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-cyan-500/20 text-cyan-400 border border-cyan-500/30",children:"TikTok Followers"})]}),e.jsxs("div",{className:"mt-1.5 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-xs text-slate-400",children:"Daily Transfer Rate:"}),e.jsx("span",{className:"text-lg font-bold text-cyan-400",children:"800 - 1,000"}),e.jsx("span",{className:"text-xs text-slate-500",children:"followers/
1037day"})]})]})]})}),((Pt=L.platform)==null?void 0:Pt.toLowerCase())==="youtube"&&ge!=="completed"&&ge!=="failed"&&ge!=="canceled"&&ge!=="cancelled"&&ge!=="rejected"&&e.jsx("div",{className:"mt-3 sm:mt-4 p-3 sm:p-4 rounded-xl bg-gradient-to-r from-slate-800 to-slate-900 border-2 border-slate-700",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-gradient-to-br from-red-500 to-red-600 flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-bold text-white",children:"Natural Delivery Speed"}),e.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-red-500/20 text-red-400 border border-red-500/30",children:"YouTube"})]}),e.jsxs("div",{className:"mt-1.5 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-xs text-slate-400",children:"Daily Transfer Rate:"}),e.jsx("span",{className:"text-lg font-bold text-red-400",children:"100 - 150"}),e.jsx("span",{className:"text-xs text-slate-500",children:"per day"})]})]})]})}),L.status==="completed"&&(()=>{if(L.refill_blocked)return e.jsxs("div",{className:"mt-3 sm:mt-4 p-3 sm:p-4 rounded-xl bg-gradient-to-r from-red-50 to-rose-50 border border-red-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(cx,{className:"w-4 h-4 text-red-500"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold text-red-700",children:i("dashboard.refill_blocked")})]}),L.refill_blocked_reason&&e.jsx("p",{className:"text-[10px] sm:text-xs text-red-600 mt-1",children:L.refill_blocked_reason})]});const Gt=xa(L.id),Wt=Et(L.id);return Gt?e.jsxs("div",{className:"mt-3 sm:mt-4 p-3 sm:p-4 rounded-xl bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Ve,{className:`w-4 h-4 text-blue-600 ${Gt.status==="processing"?"animate-spin":""}`}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold text-blue-700",children:Gt.status==="pending"?i("dashboard.refill_pending"):i("dashboard.refill_processing")})]}),e.jsxs("p",{className:"text-[10px] sm:text-xs text-blue-600",children:[i("dashboard.requested"),": ",Gt.claimed_drop_amount.toLocaleString("en-US")," - ",new Date(Gt.requested_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})]})]}):e.jsxs("div",{className:"mt-3 sm:mt-4 pt-3 sm:pt-4 border-t border-slate-200/60",children:[e.jsxs("button",{onClick:()=>Xs(L),disabled:!Wt.canRequest,className:`w-full flex items-center justify-center gap-2 py-2.5 sm:py-3 rounded-xl font-semibold text-xs sm:text-sm transition-all ${Wt.canRequest?"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 text-white shadow-md hover:shadow-lg":"bg-slate-100 text-slate-400 cursor-not-allowed"}`,children:[e.jsx(Ve,{className:"w-4 h-4"}),i("dashboard.request_refill")]}),!Wt.canRequest&&Wt.reason&&e.jsx("p",{className:"text-[10px] text-center text-slate-500 mt-1.5",children:Wt.reason})]})})()]},L.id)})})]})]}),x==="wallet"&&e.jsxs("div",{children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4 sm:mb-5",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 rounded-2xl p-4 sm:p-5 text-white shadow-xl",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"p-1.5 sm:p-2 rounded-lg bg-white/10",children:e.jsx(kt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-cyan-400"})}),e.jsx("span",{className:"text-xs sm:text-sm text-slate-400 font-medium",children:i("dashboard.wallet_balance")})]}),e.jsx("div",{className:"text-2xl sm:text-3xl md:text-4xl font-bold mb-4",children:c((l.balance||0)+(l.refund_balance||0))}),(Ma==null?void 0:Ma.wallet_loading_enabled)!==!1&&e.jsxs("button",{onClick:Ge,className:"w-full bg-gradient-to-r from-blue-500 to-cyan-500 hover:from-blue-600 hover:to-cyan-600 text-white py-2.5 sm:py-3 rounded-xl font-semibold transition-all flex items-center justify-center gap-2 shadow-lg shadow-blue-500/30 text-sm",children:[e.jsx(ns,{className:"w-4 h-4"}),e.jsx("span",{children:i("dashboard.add_funds")})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-emerald-900 via-teal-800 to-emerald-900 rounded-2xl p-4 sm:p-5 text-white shadow-xl relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-emerald-400/10 rounded-full -translate-y-1/2 translate-x-1/2"}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"p-1.5 sm:p-2 rounded-lg bg-white/10",children:e.jsx(Vt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-emerald-400"})}),e.jsx("span",{className:"text-xs sm:text-sm text-emerald-300 font-medium",children:i("dashboard.gift_balance")})]}),e.jsxs("div",{className:"text-2xl sm:text-3xl md:text-4xl font-bold mb-1",children:["$",(l.gift_balance||0).toFixed(2)]}
1037),e.jsx("p",{className:"text-xs text-emerald-300/70 mb-3",children:i("dashboard.gift_credits")}),e.jsxs("button",{onClick:()=>Bs(!0),className:"w-full bg-gradient-to-r from-emerald-400 to-teal-400 hover:from-emerald-500 hover:to-teal-500 text-emerald-950 py-2.5 sm:py-3 rounded-xl font-semibold transition-all flex items-center justify-center gap-2 shadow-lg shadow-emerald-500/30 text-sm",children:[e.jsx(an,{className:"w-4 h-4"}),e.jsx("span",{children:i("withdraw.btn")})]})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl sm:rounded-2xl border border-slate-200 p-3 sm:p-4 md:p-5 mb-4 sm:mb-5",children:[e.jsx("h4",{className:"text-xs sm:text-sm font-semibold text-slate-900 mb-2 sm:mb-3",children:i("dashboard.quick_actions")}),e.jsxs("button",{onClick:Ge,className:"w-full flex items-center gap-3 p-3 sm:p-3.5 rounded-xl bg-slate-50 border border-slate-200 hover:border-blue-300 hover:bg-blue-50/50 active:bg-blue-100/50 transition-all text-left",children:[e.jsx("div",{className:"p-2 rounded-lg bg-blue-100",children:e.jsx(oc,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-medium text-slate-900 block",children:i("dashboard.deposit")}),e.jsx("span",{className:"text-xs text-slate-500",children:i("dashboard.deposit_desc")})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl sm:rounded-2xl border border-slate-200 overflow-hidden",children:[e.jsxs("div",{className:"p-3 sm:p-4 border-b border-slate-200",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h3",{className:"text-sm sm:text-base md:text-lg font-semibold text-slate-900",children:i("dashboard.transaction_history")}),e.jsxs("span",{className:"text-[10px] sm:text-xs text-slate-500 bg-slate-100 px-2 py-1 rounded-full",children:[y.length," ",i("dashboard.transactions_count")]})]}),e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:[{key:"all",label:i("dashboard.filter_all")},{key:"deposit",label:i("dashboard.filter_deposits")},{key:"purchase",label:i("dashboard.filter_purchases")},{key:"refund",label:i("dashboard.filter_refunds")},{key:"withdrawals",label:i("withdraw.history")}].map(L=>{const ge=L.key==="all"?y.length:L.key==="deposit"?y.filter(Qe=>Qe.transaction_type==="deposit"||Qe.transaction_type==="admin_credit").length:L.key==="withdrawals"?Xt.length:y.filter(Qe=>Qe.transaction_type===L.key).length;return e.jsxs("button",{onClick:()=>N(L.key),className:`px-3 py-1.5 rounded-lg text-xs sm:text-sm font-medium whitespace-nowrap transition-colors ${w===L.key?"bg-blue-600 text-white":"bg-slate-100 text-slate-600 hover:bg-slate-200"}`,children:[L.label," (",ge,")"]},L.key)})})]}),w==="withdrawals"?Xt.length===0?e.jsxs("div",{className:"text-center py-10 sm:py-12 md:py-16",children:[e.jsx("div",{className:"inline-flex p-3 sm:p-4 rounded-xl sm:rounded-2xl bg-slate-50 mb-3 sm:mb-4",children:e.jsx(an,{className:"w-6 h-6 sm:w-8 sm:h-8 text-slate-400"})}),e.jsx("h4",{className:"text-sm sm:text-base font-medium text-slate-900 mb-1",children:i("withdraw.no_withdrawals")}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-500",children:i("withdraw.no_withdrawals_desc")})]}):e.jsx("div",{className:"max-h-[400px] sm:max-h-[450px] overflow-y-auto divide-y divide-slate-100",children:Xt.map(L=>{const ge=L.status==="completed"?"emerald":L.status==="rejected"?"red":"amber";return e.jsxs("div",{className:"p-3 sm:p-4 flex items-center justify-between hover:bg-slate-50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:`p-2 rounded-lg bg-${ge}-100 flex-shrink-0`,children:e.jsx(an,{className:`w-4 h-4 sm:w-5 sm:h-5 text-${ge}-600`})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"font-medium text-slate-900 text-sm sm:text-base",children:i("withdraw.title")}),e.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-semibold ${L.status==="completed"?"bg-emerald-100 text-emerald-700":L.status==="rejected"?"bg-red-100 text-red-700":"bg-amber-100 text-amber-700"}`,children:i(`withdraw.status_${L.status}`)})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx("span",{className:"text-[10px] sm:text-xs text-slate-500",children:new Date(L.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}),e.jsxs("span",{className:"text-[10px] text-slate-400",children:[L.region==="US"?"ðºð¸":L.region==="UK"?"ð¬ð§":"ðªðº"," ",L.holder_name]})]}),L.admin_note&&e.jsx("p",{className:"text-[10px] text-slate-400 mt-0.5 truncate max-w-[200px]",children:L.admin_note})]})]}),e.jsx("div",{className:"text-right flex-shrink-0 ml-3",children:e.jsxs("div",{className:"text-sm sm:text-lg font-bold text-red-600",children:["-$",Number(L.amount).toFixed(2)]})})]},L.id)})}):y.length===0?e.jsxs("div",{className:"text-center py-10 sm:py-12 md:py-16",children:[e.jsx("div",{className:"inline-flex p-3 sm:p-4 roun
1037ded-xl sm:rounded-2xl bg-slate-50 mb-3 sm:mb-4",children:e.jsx(kt,{className:"w-6 h-6 sm:w-8 sm:h-8 text-slate-400"})}),e.jsx("h4",{className:"text-sm sm:text-base font-medium text-slate-900 mb-1",children:i("dashboard.no_transactions")}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-500",children:i("dashboard.no_transactions_desc")})]}):e.jsxs("div",{className:"max-h-[400px] sm:max-h-[450px] overflow-y-auto",children:[y.filter(L=>w==="all"?!0:w==="deposit"?L.transaction_type==="deposit"||L.transaction_type==="admin_credit":L.transaction_type===w).map(L=>{const ge=L.transaction_type==="deposit",Qe=L.transaction_type==="purchase",St=L.transaction_type==="refund",yt=L.transaction_type==="admin_credit",Pt=L.transaction_type==="admin_debit",Gt=()=>L.payment_method==="card"?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 text-blue-700 text-[10px] sm:text-xs font-medium rounded",children:[e.jsx(Nt,{className:"w-3 h-3"}),i("dashboard.tx_card")]}):L.payment_method==="paypal"?e.jsx("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-indigo-100 text-indigo-700 text-[10px] sm:text-xs font-medium rounded",children:i("dashboard.tx_paypal")}):L.payment_method==="wallet"||L.payment_method==="balance"?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-slate-100 text-slate-700 text-[10px] sm:text-xs font-medium rounded",children:[e.jsx(kt,{className:"w-3 h-3"}),i("dashboard.tx_balance")]}):null,Wt=()=>L.status==="completed"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] sm:text-xs text-emerald-600",children:[e.jsx(ne,{className:"w-3 h-3"}),i("dashboard.tx_completed")]}):L.status==="failed"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] sm:text-xs text-red-600",children:[e.jsx(nt,{className:"w-3 h-3"}),i("dashboard.tx_failed")]}):null;return e.jsxs("div",{className:"flex items-center justify-between p-3 sm:p-4 border-b border-slate-100 last:border-b-0 hover:bg-slate-50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:`p-2 sm:p-2.5 rounded-xl flex-shrink-0 ${Pt?"bg-orange-100":Qe?"bg-red-100":St?"bg-amber-100":"bg-emerald-100"}`,children:Pt?e.jsx(cx,{className:"w-4 h-4 sm:w-5 sm:h-5 text-orange-600"}):Qe?e.jsx(an,{className:"w-4 h-4 sm:w-5 sm:h-5 text-red-600"}):St?e.jsx(Ve,{className:"w-4 h-4 sm:w-5 sm:h-5 text-amber-600"}):yt?e.jsx(Vt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-emerald-600"}):e.jsx(oc,{className:"w-4 h-4 sm:w-5 sm:h-5 text-emerald-600"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"font-medium text-slate-900 capitalize text-sm sm:text-base",children:i(Pt?"dashboard.tx_admin_debit":ge?"dashboard.tx_wallet_deposit":St?"dashboard.tx_refund":yt?"dashboard.tx_bonus_credit":"dashboard.tx_purchase")}),Gt()]}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx("span",{className:"text-[10px] sm:text-xs text-slate-500",children:new Date(L.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}),Wt()]}),L.description&&e.jsx("p",{className:"text-[10px] sm:text-xs text-slate-400 mt-1 truncate max-w-[150px] sm:max-w-[250px]",children:L.description}),(Pt||yt)&&e.jsxs("span",{className:"inline-flex items-center gap-1 mt-1 px-1.5 py-0.5 bg-orange-50 text-orange-600 text-[9px] sm:text-[10px] font-medium rounded",children:[e.jsx(cx,{className:"w-2.5 h-2.5"}),i("dashboard.tx_admin_debit_notice")]})]})]}),e.jsxs("div",{className:"text-right flex-shrink-0 ml-3",children:[e.jsxs("div",{className:`text-sm sm:text-lg font-bold ${Pt?"text-orange-600":Qe?"text-red-600":"text-emerald-600"}`,children:[Qe||Pt?"-":"+","$",Math.abs(Number(L.amount)).toFixed(2)]}),(Pt||yt)&&L.balance_after!==void 0&&L.balance_after!==null&&Number(L.balance_after)>0&&e.jsxs("div",{className:"text-[10px] sm:text-xs space-y-0.5",children:[e.jsxs("div",{className:"text-slate-400",children:[i("dashboard.tx_balance_before"),": $",Pt?(Number(L.balance_after)+Math.abs(Number(L.amount))).toFixed(2):(Number(L.balance_after)-Math.abs(Number(L.amount))).toFixed(2)]}),e.jsxs("div",{className:"text-slate-500 font-medium",children:[i("dashboard.tx_balance_after"),": $",Number(L.balance_after).toFixed(2)]})]}),!(Pt||yt)&&L.balance_after!==void 0&&L.balance_after!==null&&e.jsxs("div",{className:"text-[10px] sm:text-xs text-slate-400",children:[i("dashboard.tx_balance_after"),": $",Number(L.balance_after).toFixed(2)]})]})]},L.id)}),y.filter(L=>w==="all"||L.transaction_type===w).length===0&&e.jsx("div",{className:"text-center py-8 text-slate-500 text-sm",children:i("dashboard.no_filtered_transactions")})]})]})]})]})]})}),e.jsx(H4,{isOpen:ps,onClose:()=>Bs(!1),giftBalance:(l==null?void 0:l.gift_balance)||0,onSuccess:()=>{n(),jt()}}),b&&(Ma==null?void 0:Ma.wallet_loading_enabled)!==!1&&gl.createPortal(e.jsx("div",{className:"fixed inset-0 z-[9999] bg-slate-900/80 backdrop-blur-lg overflow-y-auto",children:e.jsx("div",{className:"min-h-full flex items-center justify-center p-0 sm:p-4",children:e.jsxs("div",{className:"bg-white sm:rounded-2xl md:rounded-3xl shadow-2xl w-full sm:max-w-md relative max-h-[100dvh] sm:max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"bg-gradient-to-r from-blue-600 via-blue-500 to-cyan-500 px-5 sm:px-6 py-5 sm:py-6 sticky top-0 z-10",children:[e.jsx("button",{onClick:De,className:"absolute top-4 right-4 p-2 rounded-xl bg-white/20 hover:bg-white/30 active:bg-white/40 text-white transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-white/20 backdrop-blur",children:e.jsx(kt,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg sm:text-xl font-bold text-white",children:i("dashboard.add_funds_title")}),e.jsx("p",{className:"text-xs sm:text-sm text-white/80",children:i("dashboard.add_funds_desc")})]})]})]}),e.jsxs("div",{className:"p-5 sm:p-6 pb-8 sm:pb-6",children:[e.jsxs("div",{className:"mb-5",children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm font-semibold text-slate-700 mb-2",children:[e.jsx(Jt,{className:"w-4 h-4"}),i("dashboard.amount_usd")]}),e.jsx("input",{type:"number",min:"5",max:"10000",step:"0.01",value:k,onChange:L=>J(L.target.value),placeholder:i("dashboard.enter_amount"),className:"w-full px-4 py-3.5 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-lg font-medium"}),e.jsx("p",{className:"text-xs text-slate-500 mt-2",children:i("dashboard.min_max")})]}),k&&parseFloat(k)>=5&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200 rounded-xl p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-slate-600",children:i("dashboard.amount_to_add")}),e.jsxs("span",{className:"text-2xl font-bold text-blue-600",children:["$",parseFloat(k).toFixed(2)]})]})}),(()=>{const L=at.some(It=>It.code==="paypal"),ge=at.some(It=>It.code==="stripe"),Qe=at.some(It=>It.code==="crypto"),St=at.some(It=>It.code==="bank_transfer"),yt=L||ge;if(!yt&&!Qe&&!St)return e.jsxs("div",{className:"text-center py-6 text-slate-500 text-sm bg-amber-50 border border-amber-200 rounded-xl",children:[e.jsx(nt,{className:"w-6 h-6 text-amber-500 mx-auto mb-2"}),"Wallet deposits are currently unavailable. Please try again later."]});const Pt=[];yt&&Pt.push({key:"card",label:"Card",icon:"card",borderColor:"border-blue-500",bgColor:"bg-blue-50"}),Qe&&Pt.push({key:"crypto",label:"Crypto",icon:"crypto",borderColor:"border-orange-500",bgColor:"bg-orange-50"}),St&&Pt.push({key:"bank_transfer",label:"Bank Transfer",icon:"bank",borderColor:"border-emerald-500",bgColor:"bg-emerald-50"}),Pt.length===1&&ys!==Pt[0].key&&setTimeout(()=>Na(Pt[0].key),0);const Gt=Ur.find(It=>It.id===G),Wt=In.find(It=>It.code===Ga),Tn=Ns&&(Wt==null?void 0:Wt.currency)!=="USD"?Math.ceil(parseFloat(k)*Ns*100)/100:null;return e.jsxs(e.Fragment,{children:[Pt.length>1&&e.jsx("div",{className:`grid gap-2.5 mb-4 ${Pt.length===3?"grid-cols-3":"grid-cols-2"}`,children:Pt.map(It=>e.jsxs("button",{onClick:()=>Na(It.key),className:`p-3 rounded-xl border-2 transition-all text-center ${ys===It.key?`${It.borderColor} ${It.bgColor}`:"border-slate-200 hover:border-slate-300"}
1037`,children:[It.icon==="card"&&e.jsx(Nt,{className:"w-5 h-5 mx-auto mb-1 text-slate-700"}),It.icon==="crypto"&&e.jsx(Vt,{className:"w-5 h-5 mx-auto mb-1 text-slate-700"}),It.icon==="bank"&&e.jsx(Gi,{className:"w-5 h-5 mx-auto mb-1 text-slate-700"}),e.jsx("span",{className:`text-xs sm:text-sm font-medium text-slate-700 ${Pt.length===3?"block truncate":""}`,children:It.label})]},It.key))}),ys==="card"&&yt&&e.jsxs(e.Fragment,{children:[T&&e.jsxs("div",{className:"p-3 bg-red-50 border border-red-200 rounded-xl flex items-start gap-2",children:[e.jsx(nt,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-red-700 text-sm",children:T})]}),M?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:i("dashboard.cardholder_name")}),e.jsx("input",{type:"text",value:P,onChange:It=>z(It.target.value.toUpperCase()),placeholder:"JOHN DOE",className:"w-full px-4 py-3 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:outline-none transition uppercase tracking-wide"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Card Details"}),e.jsx("div",{ref:K,className:"px-4 py-3.5 border-2 border-slate-200 rounded-xl focus-within:border-blue-500 transition bg-white min-h-[48px]"})]}),e.jsx("button",{onClick:xe,disabled:u||!re,className:"w-full bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-4 rounded-xl font-bold text-lg shadow-xl hover:shadow-2xl hover:from-blue-700 hover:to-cyan-700 transition-all duration-300 disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-3",children:u?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:i("dashboard.processing")})]}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{className:"w-5 h-5"}),e.jsxs("span",{children:[i("dashboard.pay")," $",parseFloat(k).toFixed(2)]})]})})]}):e.jsx("button",{onClick:te,disabled:oe||!k||parseFloat(k)<5,className:"w-full bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-4 rounded-xl font-bold text-lg shadow-xl hover:shadow-2xl hover:from-blue-700 hover:to-cyan-700 transition-all duration-300 disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-3",children:oe?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Loading payment form..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{className:"w-5 h-5"}),e.jsx("span",{children:"Continue to Payment"})]})})]}),ys==="crypto"&&Qe&&e.jsx(e.Fragment,{children:zr==="submitted"?e.jsxs("div",{className:"text-center py-6 bg-gradient-to-br from-green-50 to-emerald-50 border border-green-200 rounded-xl",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-gradient-to-br from-green-500 to-emerald-500 flex items-center justify-center mx-auto mb-4",children:e.jsx(ne,{className:"w-7 h-7 text-white"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-2",children:"Payment Submitted!"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Your payment is pending admin approval. Once confirmed, your wallet balance will be updated."}),e.jsx("button",{onClick:()=>{si(),De()},className:"px-6 py-3 bg-gradient-to-r from-green-500 to-emerald-500 text-white font-semibold rounded-xl hover:from-green-600 hover:to-emerald-600 transition-all",children:"Done"})]}):zr==="payment"&&fs?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-gradient-to-r from-orange-50 to-red-50 rounded-xl p-4 border border-orange-200",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{className:"w-5 h-5 text-orange-600"}),e.jsx("span",{className:"text-sm font-medium text-slate-700",children:"Time Remaining"})]}),e.jsx("span",{className:`text-xl font-bold ${kn<300?"text-red-600":"text-orange-600"}`,children:kc(kn)})]}),e.jsx("p",{className:"text-xs text-slate-500",children:"Complete payment before timer expires"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-4 border-2 border-orange-200",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-orange-500 to-amber-500 rounded-lg flex items-center justify-center",children:e.jsx(kt,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-slate-900",children:fs.display_name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"px-2 py-0.5 bg-orange-100 text-orange-700 text-xs font-medium rounded",children:fs.crypto_type}),e.jsx("span",{className:"px-2 py-0.5 bg-amber-100 text-amber-700 text-xs font-medium rounded",children:fs.network})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-r from-amber-50 to-yellow-50 rounded-lg p-3 mb-4 border border-amber-200",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("p",{className:"text-sm text-slate-600",children:"Amount to Send"}),nr.includes(fs.crypto_type)&&e.jsxs("button",{onClick:wr,disabled:Sn,className:"flex items-center gap-1 text-xs text-amber-700 hover:text-amber-900 transition-colors",children:[e.jsx(Ve,{className:`w-3 h-3 ${Sn?"animate-spin":""}`}),"Refresh Price"]})]}),nr.includes(fs.crypto_type)&&ll?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("p",{className:"text-2xl font-bold text-amber-700",children:[ll," ",fs.crypto_type]}),e.jsx("button",{onClick:()=>{ll&&navigator.clipboard.writeText(ll)},className:"p-1.5 bg-amber-200 text-amber-800 rounded-lg hover:bg-amber-300 transition-colors",children:e.jsx(Ht,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[e.jsxs("p",{className:"text-sm text-slate-600",children:["$",parseFloat(k).toFixed(2)," USD"]}),Gl&&e.jsxs("span",{className:"text-xs text-slate-500",children:["(1 ",fs.crypto_type," = $",Gl.toLocaleStr
1037ing()," USD)"]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:["$",parseFloat(k).toFixed(2)," USD"]}),e.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:["= ",parseFloat(k).toFixed(2)," ",fs.crypto_type]})]})]}),fs.qr_code_url&&e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("img",{src:fs.qr_code_url,alt:"QR Code",className:"w-32 h-32 rounded-lg border-2 border-slate-200"})}),e.jsxs("div",{className:"mb-4",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Wallet Address:"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 p-3 bg-slate-100 rounded-lg text-xs font-mono text-slate-700 break-all",children:fs.wallet_address}),e.jsx("button",{onClick:wc,className:"p-2 bg-slate-200 hover:bg-slate-300 rounded-lg transition-colors",children:Lr?e.jsx(Lt,{className:"w-5 h-5 text-green-600"}):e.jsx(Ht,{className:"w-5 h-5 text-slate-600"})})]})]}),e.jsx("button",{onClick:Nc,disabled:da,className:"w-full bg-gradient-to-r from-orange-500 to-amber-500 text-white py-3 rounded-xl font-bold hover:from-orange-600 hover:to-amber-600 transition-all disabled:opacity-60 flex items-center justify-center gap-2",children:da?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Submitting..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-5 h-5"}),e.jsx("span",{children:"I've Made the Payment"})]})})]}),e.jsx("button",{onClick:si,className:"w-full py-2.5 border-2 border-slate-300 text-slate-700 font-medium rounded-xl hover:bg-slate-50 transition-colors text-sm",children:"Cancel"})]}):e.jsx("div",{className:"space-y-3",children:ms?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-orange-500"})}):At.length===0?e.jsxs("div",{className:"text-center py-4 bg-gradient-to-br from-orange-50 to-amber-50 border border-orange-200 rounded-xl",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-orange-500 to-amber-500 flex items-center justify-center mx-auto mb-3",children:e.jsx(Vt,{className:"w-5 h-5 text-white"})}),e.jsx("p",{className:"text-sm text-slate-600 mb-3",children:"Pay with USDT, USDC, BTC, or ETH"}),e.jsx("button",{onClick:vc,className:"px-5 py-2.5 bg-gradient-to-r from-orange-500 to-amber-500 text-white font-semibold rounded-xl hover:from-orange-600 hover:to-amber-600 transition-all text-sm",children:"Select Crypto Wallet"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-gradient-to-r from-orange-50 to-amber-50 rounded-xl p-3 border border-orange-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(kt,{className:"w-4 h-4 text-orange-600"}),e.jsx("span",{className:"font-semibold text-slate-900 text-sm",children:"Select Crypto Wallet"})]}),e.jsx("p",{className:"text-xs text-slate-500",children:"Choose a wallet to complete your deposit"})]}),At.map(It=>e.jsx("button",{onClick:()=>Fm(It),disabled:ms,className:"w-full bg-white border-2 border-slate-200 hover:border-orange-400 rounded-xl p-3 transition-all text-left group",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-orange-500 to-amber-500 rounded-lg flex items-center justify-center",children:e.jsx(kt,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-slate-900 group-hover:text-orange-600 transition-colors text-sm",children:It.display_name}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx("span",{className:"px-1.5 py-0.5 bg-orange-100 text-orange-700 text-xs font-medium rounded",children:It.crypto_type}),e.jsx("span",{className:"px-1.5 py-0.5 bg-amber-100 text-amber-700 text-xs font-medium rounded",children:It.network})]})]})]}),e.jsx(Gs,{className:"w-4 h-4 text-slate-400 group-hover:text-orange-600 transition-colors"})]})}
1037,It.id))]})})}),ys==="bank_transfer"&&St&&e.jsx(e.Fragment,{children:vr==="submitted"?e.jsxs("div",{className:"text-center py-6 bg-gradient-to-br from-green-50 to-emerald-50 border border-green-200 rounded-xl",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-gradient-to-br from-green-500 to-emerald-500 flex items-center justify-center mx-auto mb-4",children:e.jsx(ne,{className:"w-7 h-7 text-white"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-2",children:"Transfer Submitted!"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4 px-4",children:"Your bank transfer is pending verification. Once confirmed, your wallet balance will be updated."}),e.jsx("button",{onClick:()=>{ro(),De()},className:"px-6 py-3 bg-gradient-to-r from-green-500 to-emerald-500 text-white font-semibold rounded-xl hover:from-green-600 hover:to-emerald-600 transition-all",children:"Done"})]}):vr==="details"&&Ga?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>{nl("regions"),la(null),Ue([]),qr(null)},className:"p-1.5 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(xr,{className:"w-4 h-4 text-slate-500"})}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("img",{src:ao[Ga],alt:Ga,className:"w-8 h-6 object-cover rounded-sm shadow-sm"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-slate-800",children:Wt==null?void 0:Wt.label}),e.jsx("p",{className:"text-[10px] text-slate-400",children:"Back to regions"})]})]})]}),Be?e.jsxs("div",{className:"flex flex-col items-center justify-center py-10 gap-3",children:[e.jsx(Ne,{className:"w-7 h-7 text-emerald-500 animate-spin"}),e.jsx("span",{className:"text-sm text-slate-500",children:"Loading..."})]}):Ur.length===0?e.jsxs("div",{className:"text-center py-10",children:[e.jsx(sa,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-sm text-slate-500",children:"No bank accounts available for this region"})]}):e.jsxs(e.Fragment,{children:[Ur.length>1&&e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:Ur.map(It=>e.jsx("button",{onClick:()=>le(It.id),className:`flex-shrink-0 px-3.5 py-2 rounded-lg text-xs font-semibold transition-all ${G===It.id?"bg-emerald-600 text-white shadow-md":"bg-white border border-slate-200 text-slate-600 hover:border-emerald-300"}`,children:It.bank_name},It.id))}),Gt&&e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"bg-slate-50 px-4 py-3 border-b border-slate-100 flex items-center gap-2.5",children:[e.jsx(sa,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{className:"text-sm font-bold text-slate-700",children:Gt.bank_name}),e.jsx("span",{className:"ml-auto text-xs font-semibold bg-emerald-100 text-emerald-700 px-2 py-0.5 rounded-full",children:Gt.currency})]}),e.jsx("div",{className:"divide-y divide-slate-100",children:[{label:"Account Holder",value:Gt.account_holder,field:"holder"},{label:"Account Number",value:Gt.account_number,field:"number",mono:!0},...Gt.iban?[{label:"IBAN",value:Gt.iban,field:"iban",mono:!0}]:[],...Gt.routing_number?[{label:Ga==="UK"?"Sort Code":"Routing Number",value:Gt.routing_number,field:"routing",mono:!0}]:[],...Gt.swift_code?[{label:"SWIFT / BIC",value:Gt.swift_code,field:"swift",mono:!0}]:[]].map(It=>e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 group hover:bg-slate-50 transition-colors",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wide mb-0.5",children:It.label}),e.jsx("div",{className:`text-sm text-slate-800 font-semibold ${It.mono?"font-mono tracking-wide":""}`,children:It.value})]}),e.jsx("button",{onClick:()=>Tc(It.value,It.field),className:"flex items-center gap-1 px-2.5 py-1.5 bg-slate-100 hover:bg-emerald-100 rounded-lg text-xs font-medium text-slate-500 hover:text-emerald-600 transition-all flex-shrink-0 ml-3",children:ma===It.field?e.jsxs(e.Fragment,{children:[e.jsx(Lt,{className:"w-3.5 h-3.5 text-emerald-500"}),e.jsx("span",{className:"text-emerald-600",children:"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ht,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Copy"})]})})]},It.field))}),Gt.additional_info&&e.jsx("div",{className:"px-4 py-3 bg-amber-50 border-t border-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(hr,{className:"w-4 h-4 text-amber-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-amber-700 leading-relaxed",children:Gt.additional_info})]})})]}),e.jsxs("div",{className:"bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-200 rounded-xl p-3.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-semibold text-emerald-700",children:"Amount to send"}
1037),jc?e.jsx(Ne,{className:"w-5 h-5 text-emerald-500 animate-spin"}):Tn!==null&&(Wt==null?void 0:Wt.currency)!=="USD"?e.jsxs("span",{className:"text-xl font-bold text-emerald-700",children:[Wt==null?void 0:Wt.currencySymbol,Tn.toFixed(2)]}):e.jsxs("span",{className:"text-xl font-bold text-emerald-700",children:["$",parseFloat(k).toFixed(2)]})]}),Tn!==null&&(Wt==null?void 0:Wt.currency)!=="USD"&&Ns&&!jc&&e.jsxs("div",{className:"text-[11px] text-emerald-600/70 mt-1.5 text-right",children:["$",parseFloat(k).toFixed(2)," USD x ",Ns.toFixed(4)," = ",Wt==null?void 0:Wt.currencySymbol,Tn.toFixed(2)," ",Wt==null?void 0:Wt.currency]})]}),e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 space-y-3",children:[e.jsxs("h4",{className:"text-sm font-bold text-slate-700 flex items-center gap-2",children:[e.jsx(ls,{className:"w-4 h-4 text-slate-500"}),"Bank Holder Name"]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-500 mb-1 block",children:"Enter the name on your bank account"}),e.jsx("input",{type:"text",value:Ja,onChange:It=>il(It.target.value),placeholder:"John Doe",className:"w-full px-3.5 py-2.5 border-2 border-slate-200 rounded-lg focus:border-emerald-500 focus:outline-none focus:ring-2 focus:ring-emerald-100 transition text-sm font-medium"})]})]}),zt&&e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-3 text-sm text-red-700 font-medium",children:zt}),e.jsx("button",{onClick:Ic,disabled:bt||!G||!Ja.trim(),className:"w-full flex items-center justify-center gap-2.5 py-4 bg-gradient-to-r from-emerald-600 to-green-600 text-white rounded-xl text-sm font-bold disabled:opacity-50 transition-all active:scale-[0.99] shadow-lg hover:from-emerald-700 hover:to-green-700",children:bt?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Submitting..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-5 h-5"}),e.jsx("span",{children:"I've Made the Transfer"})]})}),e.jsxs("div",{className:"flex items-center gap-2.5 justify-center text-xs text-slate-400",children:[e.jsx(Ze,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Transfers are verified within 24 hours"})]})]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center gap-3 mb-1",children:e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-bold text-slate-800 flex items-center gap-2",children:[e.jsx(Gi,{className:"w-4 h-4 text-emerald-600"}),"Bank Transfer"]}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Select your region to see bank details"})]})}),e.jsx("div",{className:"bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-200 rounded-xl p-3.5",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Jt,{className:"w-5 h-5 text-emerald-600 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("span",{className:"text-xs font-medium text-emerald-600 uppercase tracking-wide",children:"Amount to deposit"}),e.jsxs("div",{className:"text-2xl font-bold text-emerald-700",children:["$",parseFloat(k).toFixed(2)]})]})]})}),e.jsx("p",{className:"text-sm font-semibold text-slate-700",children:"Select Region"}),e.jsx("div",{className:"space-y-2.5",children:In.map(It=>e.jsxs("button",{onClick:()=>Cc(It.code),className:"w-full flex items-center gap-4 p-4 bg-white border border-slate-200 rounded-xl hover:border-emerald-300 hover:shadow-md transition-all group active:scale-[0.99]",children:[e.jsx("img",{src:ao[It.code],alt:It.code,className:"w-10 h-7 object-cover rounded-sm shadow-sm"}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx("div",{className:"text-sm font-bold text-slate-800 group-hover:text-emerald-700 transition-colors",children:It.label}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:It.currency})]}),e.jsx(ra,{className:"w-4 h-4 text-slate-300 group-hover:text-emerald-500 transition-colors"})]},It.code))})]})})]})})()]}),(!k||parseFloat(k)<5)&&e.jsx("div",{className:"text-center py-6 text-slate-500 text-sm bg-slate-50 rounded-xl",children:i("dashboard.enter_min_amount")}),e.jsx("div",{className:"mt-4 pt-4 border-t border-slate-200",children:e.jsx("p",{className:"text-xs text-slate-500 text-center",children:i("dashboard.secure_payment")})})]})]})})}),document.body),H&&ee&&gl.createPortal(e.jsx("div",{className:"fixed inset-0 z-[9999] bg-slate-900/80 backdrop-blur-lg overflow-y-auto",children:e.jsx("div",{className:"min-h-full flex items-end sm:items-center justify-center p-0 sm:p-4",children:e.jsxs("div",{className:"bg-white rounded-t-3xl sm:rounded-2xl md:rounded-3xl shadow-2xl w-full sm:max-w-md relative overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-amber-500 px-5 sm:px-6 py-5 sm:py-6",children:[e.jsx("button",{onClick:()=>{me(!1),Ae(null),D(""),fe(""),ze(""),ke(!1)},className:"absolute top-4 right-4 p-2 rounded-xl bg-white/20 hover:bg-white/30 active:bg-white/40 text-white transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-white/20 backdrop-blur",children:e.jsx(Ve,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg sm:text-xl font-bold text-white",children:i("refund.request_refill_title")}),e.jsx("p",{className:"text-xs sm:text-sm text-white/80",children:i("refund.request_refill_subtitle")})]})]})]}),e.jsxs("div",{className:"p-5 sm:p-6 pb-8 sm:pb-6",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-slate-100 rounded-xl p-4 mb-5 border border-slate-200",children:[e.jsx("h3",{className:"text-sm font-semibold text-slate-900 mb-3",children:i("refund.order_info")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:i("refund.service")}),e.jsx("span",{className:"font-medium text-slate-900 text-right max-w-[60%] truncate",children:ee.service_name||ee.service_type})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:i("refund.order_quantity")}),e.jsx("span",{className:"font-medium text-slate-900",children:ee.quantity.toLocaleStr
1037ing("en-US")})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:i("refund.start_count")}),e.jsx("span",{className:"font-bold text-blue-600",children:((kr=ee.start_count)==null?void 0:kr.toLocaleString("en-US"))||"N/A"})]}),(ee.order_number||ee.reseller_order_id)&&e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:i("refund.order_id")}),e.jsx("span",{className:"font-mono text-xs text-slate-700",children:ee.reseller_order_id?ee.reseller_order_id.slice(0,8):ee.order_number})]})]})]}),ee.start_count!=null&&e.jsxs("div",{className:"bg-gradient-to-br from-blue-50 to-sky-50 rounded-xl p-4 mb-5 border border-blue-200",children:[e.jsxs("h3",{className:"text-sm font-semibold text-blue-900 mb-3 flex items-center gap-2",children:[e.jsx(tt,{className:"w-4 h-4"}),i("refund.expected_count_title")]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-blue-600",children:i("refund.start_count")}),e.jsx("span",{className:"font-semibold text-blue-900",children:ee.start_count.toLocaleString("en-US")})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-blue-600",children:i("refund.purchased_quantity")}),e.jsxs("span",{className:"font-semibold text-blue-900",children:["+ ",ee.quantity.toLocaleString("en-US")]})]}),e.jsx("div",{className:"border-t border-blue-200 pt-2 mt-2",children:e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"font-bold text-blue-800",children:i("refund.expected_count")}),e.jsx("span",{className:"font-bold text-lg text-blue-700",children:(ee.start_count+ee.quantity).toLocaleString("en-US")})]})})]}),e.jsx("p",{className:"text-xs text-blue-700 mt-3 bg-blue-100/60 rounded-lg p-2.5 leading-relaxed",children:i("refund.expected_count_info")})]}),e.jsxs("div",{className:"mb-5",children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm font-semibold text-slate-700 mb-2",children:[e.jsx(Os,{className:"w-4 h-4"}),i("refund.current_follower_count")]}),e.jsx("input",{type:"number",min:"0",value:O,onChange:L=>{const ge=L.target.value;if(fe(ge),ze(""),ge&&ee.start_count!=null){const Qe=parseInt(ge),St=ee.start_count+ee.quantity;!isNaN(Qe)&&Qe<St?D(String(St-Qe)):D("")}else D("")},placeholder:i("refund.enter_current_count"),className:"w-full px-4 py-3.5 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-amber-500 focus:bg-white focus:outline-none transition text-lg font-medium"}),e.jsx("p",{className:"text-xs text-slate-500 mt-2",children:i("refund.current_count_hint")})]}),O&&ee.start_count!=null&&(()=>{const L=parseInt(O),ge=ee.start_count+ee.quantity;return!isNaN(L)&&L>=ge?e.jsx("div",{className:"mb-4 p-3 rounded-xl bg-red-50 border border-red-200",children:e.jsxs("p",{className:"text-sm text-red-600 flex items-center gap-2",children:[e.jsx(nt,{className:"w-4 h-4"}),i("refund.too_many_followers")]})}):!isNaN(L)&&L<ge?e.jsx("div",{className:"mb-4 p-3 rounded-xl bg-emerald-50 border border-emerald-200",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-emerald-700",children:i("refund.calculated_drop")}),e.jsx("span",{className:"text-lg font-bold text-emerald-800",children:(ge-L).toLocaleString("en-US")})]})}):null})(),Te&&e.jsx("div",{className:"mb-4 p-3 rounded-xl bg-red-50 border border-red-200",children:e.jsxs("p",{className:"text-sm text-red-600 flex items-center gap-2",children:[e.jsx(nt,{className:"w-4 h-4"}),Te]})}),e.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 mb-5",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Ze,{className:"w-4 h-4 text-amber-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-amber-800 mb-1",children:i("refund.refill_policy_title")}),e.jsx("p",{className:"text-xs text-amber-700",children:i("refund.refill_policy_de
1037sc")})]})]})}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 mb-5",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(nt,{className:"w-4 h-4 text-red-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-red-800 mb-1",children:i("refund.refill_warning_title")}),e.jsx("p",{className:"text-xs text-red-700",children:i("refund.refill_warning_desc")})]})]})}),e.jsxs("label",{className:"flex items-start gap-3 mb-5 cursor-pointer select-none",children:[e.jsx("input",{type:"checkbox",checked:it,onChange:L=>ke(L.target.checked),className:"mt-0.5 w-5 h-5 rounded border-2 border-slate-300 text-amber-500 focus:ring-amber-500 focus:ring-offset-0 cursor-pointer"}),e.jsx("span",{className:"text-sm text-slate-700 font-medium",children:i("refund.refill_confirm_checkbox")})]}),(()=>{const L=parseInt(O),ge=ee.start_count!=null?ee.start_count+ee.quantity:null,Qe=ge!=null&&!isNaN(L)&&L>=ge,St=!isNaN(L)&&ge!=null&&L<ge,yt=W||!O||!St||Qe||!it;return e.jsx("button",{onClick:as,disabled:yt,className:`w-full py-3.5 rounded-xl font-semibold text-white flex items-center justify-center gap-2 transition-all ${yt?"bg-slate-300 cursor-not-allowed":"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 shadow-lg shadow-amber-500/30"}`,children:W?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),i("refund.submitting")]}):e.jsxs(e.Fragment,{children:[e.jsx(As,{className:"w-5 h-5"}),i("refund.submit_refill_request")]})})})()]})]})})}),document.body),Le&&Me&&gl.createPortal(e.jsx("div",{className:"fixed inset-0 z-[9999] bg-slate-900/80 backdrop-blur-lg overflow-y-auto",children:e.jsx("div",{className:"min-h-full flex items-end sm:items-center justify-center p-0 sm:p-4",children:e.jsxs("div",{className:"bg-white rounded-t-3xl sm:rounded-2xl md:rounded-3xl shadow-2xl w-full sm:max-w-md relative overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-red-500 via-rose-500 to-red-500 px-5 sm:px-6 py-5 sm:py-6",children:[e.jsx("button",{onClick:()=>{Fe(!1),ft(null),dt(""),Mt(""),B(""),Ce(""),Dt(""),ce(!1)},className:"absolute top-4 right-4 p-2 rounded-xl bg-white/20 hover:bg-white/30 active:bg-white/40 text-white transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-white/20 backdrop-blur",children:e.jsx(Ve,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg sm:text-xl font-bold text-white",children:i("refund.title")}),e.jsx("p",{className:"text-xs sm:text-sm text-white/80",children:i("refund.subtitle")})]})]})]}),e.jsxs("div",{className:"p-5 sm:p-6 pb-8 sm:pb-6",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-slate-100 rounded-xl p-4 mb-5 border border-slate-200",children:[e.jsx("h3",{className:"text-sm font-semibold text-slate-900 mb-3",children:i("refund.order_info")}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:i("refund.service")}),e.jsx("span",{className:"font-medium text-slate-900 text-right max-w-[60%] truncate",children:Me.service_name||Me.service_type})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:i("refund.order_quantity")}),e.jsx("span",{className:"font-medium text-slate-900",children:Me.quantity.toLocaleString("en-US")})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:i("refund.price")}),e.jsxs("span",{className:"font-bold text-slate-900",children:["$",Me.price.toFixed(2)]})]}),(Me.order_number||Me.reseller_order_id)&&e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:i("refund.order_id")}),e.jsx("span",{className:"font-mono text-xs text-slate-700",children:Me.reseller_order_id?Me.reseller_order_id.slice(0,8):Me.order_number})]})]})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-3",children:i("refund.why_refund")}),e.jsx("div",{className:"space-y-2",children:[{value:"not_completed",label:i("refund.reason_not_completed")},{value:"decreased",label:i("refund.reason_decreased")},{value:"not_satisfied",label:i("refund.reason_not_satisfied")}].map(L=>e.jsx("button",{onClick:()=>{dt(L.value),Mt(""),B(""),Ce("")},className:`w-full p-3 rounded-xl border-2 text-left transition-all ${pe===L.value?"border-red-500 bg-red-50 text-red-700":"border-slate-200 bg-slate-50 text-slate-700 hover:border-slate-300"}`,children:e.jsx("span",{className:"text-sm font-medium",children:L.label})},L.value))})]}),pe&&e.jsxs("div",{className:"mb-5",children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-3",children:i("refund.what_would_you_like")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("button",{onClick:()=>{Mt("refill"),B(""),Ce("")},className:`w-full p-3 rounded-xl border-2 text-left transition-all ${ot==="refill"?"border-amber-500 bg-amber-50 text-amber-700":"border-slate-200 bg-slate-50 text-slate-700 hover:border-slate-300"}`,children:e.jsx("span",{className:"text-sm font-medium",children:i("refund.want_free_refill")})}),Me.refund_eligible!==!1&&e.jsx("button",{onClick:()=>Mt("money"),className:`w-full p-3 rounded-xl border-2 text-left transition-all ${ot==="money"?"border-red-500 bg-red-50 text-red-700":"border-slate-200 bg-slate-50 text-slate-700 hover:border-slate-300"}`,children:e.jsx("span",{className:"text-sm font-medium",children:i("refund.want_money_refund")})}),Me.refund_eligible===!1&&e.jsx("div",{className:"w-full p-3 rounded-xl border-2 border-amber-200 bg-amber-50 text-amber-700",children:e.jsx("span",{className:"text-xs",children:i("refund.not_eligible_for_money_refund")})})]})]}),ot==="refill"&&e.jsxs("div",{className:"mb-5",children:[Me.start_count!=null&&e.jsxs("div",{className:"bg-gradient-to-br from-blue-50 to-sky-50 rounded-xl p-4 mb-5 border border-blue-200",children:[e.jsxs("h3",{className:"text-sm font-semibold text-blue-900 mb-3 flex items-center gap-2",children:[e.jsx(tt,{className:"w-4 h-4"}),i("refund.expected_count_title")]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-blue-600",children:i("refund.start_count")}),e.jsx("span",{className:"font-semibold text-blue-900",children:Me.start_count.toLocaleStr
1037ing("en-US")})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-blue-600",children:i("refund.purchased_quantity")}),e.jsxs("span",{className:"font-semibold text-blue-900",children:["+ ",Me.quantity.toLocaleString("en-US")]})]}),e.jsx("div",{className:"border-t border-blue-200 pt-2 mt-2",children:e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"font-bold text-blue-800",children:i("refund.expected_count")}),e.jsx("span",{className:"font-bold text-lg text-blue-700",children:(Me.start_count+Me.quantity).toLocaleString("en-US")})]})})]}),e.jsx("p",{className:"text-xs text-blue-700 mt-3 bg-blue-100/60 rounded-lg p-2.5 leading-relaxed",children:i("refund.expected_count_info")})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm font-semibold text-slate-700 mb-2",children:[e.jsx(Os,{className:"w-4 h-4"}),i("refund.current_follower_count")]}),e.jsx("input",{type:"number",min:"0",value:V,onChange:L=>{const ge=L.target.value;if(Ce(ge),Dt(""),ge&&Me.start_count!=null){const Qe=parseInt(ge),St=Me.start_count+Me.quantity;!isNaN(Qe)&&Qe<St?B(String(St-Qe)):B("")}else B("")},placeholder:i("refund.enter_current_count"),className:"w-full px-4 py-3.5 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-amber-500 focus:bg-white focus:outline-none transition text-lg font-medium"}),e.jsx("p",{className:"text-xs text-slate-500 mt-2",children:i("refund.current_count_hint")}),V&&Me.start_count!=null&&(()=>{const L=parseInt(V),ge=Me.start_count+Me.quantity;return!isNaN(L)&&L>=ge?e.jsx("div",{className:"mt-3 p-3 rounded-xl bg-red-50 border border-red-200",children:e.jsxs("p",{className:"text-sm text-red-600 flex items-center gap-2",children:[e.jsx(nt,{className:"w-4 h-4"}),i("refund.too_many_followers")]})}):!isNaN(L)&&L<ge?e.jsx("div",{className:"mt-3 p-3 rounded-xl bg-emerald-50 border border-emerald-200",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-emerald-700",children:i("refund.calculated_drop")}),e.jsx("span",{className:"text-lg font-bold text-emerald-800",children:(ge-L).toLocaleString("en-US")})]})}):null})()]}),ot==="refill"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 mb-5",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(nt,{className:"w-4 h-4 text-red-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-red-800 mb-1",children:i("refund.refill_warning_title")}),e.jsx("p",{className:"text-xs text-red-700",children:i("refund.refill_warning_desc")})]})]})}),e.jsxs("label",{className:"flex items-start gap-3 mb-5 cursor-pointer select-none",children:[e.jsx("input",{type:"checkbox",checked:Xe,onChange:L=>ce(L.target.checked),className:"mt-0.5 w-5 h-5 rounded border-2 border-slate-300 text-amber-500 focus:ring-amber-500 focus:ring-offset-0 cursor-pointer"}),e.jsx("span",{className:"text-sm text-slate-700 font-medium",children:i("refund.refill_confirm_checkbox")})]})]}),xt&&e.jsx("div",{className:"mb-4 p-3 rounded-xl bg-red-50 border border-red-200",children:e.jsxs("p",{className:"text-sm text-red-600 flex items-center gap-2",children:[e.jsx(nt,{className:"w-4 h-4"}),xt]})}),ot==="refill"&&(()=>{const L=parseInt(V),ge=Me.start_count!=null?Me.start_count+Me.quantity:null,Qe=ge!=null&&!isNaN(L)&&L>=ge,St=!isNaN(L)&&ge!=null&&L<ge,yt=Ee||!V||!St||Qe||!Xe;return e.jsx("button",{onClick:ol,disabled:yt,className:`w-full py-3.5 rounded-xl font-semibold text-white flex items-center justify-center gap-2 transition-all ${yt?"bg-slate-300 cursor-not-allowed":"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 shadow-lg shadow-amber-500/30"}`,children:Ee?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),i("refund.submitting")]}):e.jsxs(e.Fragment,{children:[e.jsx(Ve,{className:"w-5 h-5"}),i("refund.free_refill")]})})})(),ot==="money"&&e.jsx("button",{onClick:ol,disabled:Ee,className:`w-full py-3.5 rounded-xl font-semibold text-white flex items-center justify-center gap-2 transition-all ${Ee?"bg-slate-300 cursor-not-allowed":"bg-gradient-to-r from-red-500 to-rose-500 hover:from-red-600 hover:to-rose-600 shadow-lg shadow-red-500/30"}`,children:Ee?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),i("refund.processing")]}):`$${Me.price.toFixed(2)} ${i("refund.refund_button")}`})]})]})})})),ts&&(i("refund.success_title"),i("refund.wallet_credited"),Tt.toFixed(2),i("refund.new_balance"),Bt.toFixed(2),i("refund.wallet_info_title"),i("refund.wallet_info_message"),i("refund.thank_you"),i("refund.close"),document.body),Kt&&gl.createPortal(e.jsx("div",{className:"fixed inset-0 z-[9999] bg-slate-900/90 backdrop-blur-xl overflow-y-auto",children:e.jsx("div",{className:"min-h-full flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-gradient-to-b from-white via-slate-50 to-white rounded-3xl shadow-2xl w-full max-w-md relative overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-20 -right-20 w-64 h-64 bg-gradient-to-br from-emerald-400/20 to-teal-400/20 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute -bottom-20 -left-20 w-64 h-64 bg-gradient-to-br from-blue-400/20 to-cyan-400/20 rounded-full blur-3xl"})]}),e.jsxs("div",{className:"relative p-8 pt-10",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"relative inline-block mb-6",children:[e.jsx("div",{className:"absolute inset-0 bg-emerald-500 blur-3xl op
1037acity-30 rounded-full scale-150 animate-pulse"}),e.jsx("div",{className:"relative inline-flex p-5 rounded-full bg-gradient-to-br from-emerald-100 to-teal-100 shadow-2xl",children:e.jsx(ne,{className:"w-16 h-16 text-emerald-600"})}),e.jsx("div",{className:"absolute -bottom-1 -right-1 bg-gradient-to-r from-emerald-500 to-teal-500 text-white text-xs font-bold px-3 py-1.5 rounded-full shadow-lg animate-bounce",children:"Success!"})]}),e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-2",children:"Funds Added!"}),e.jsx("p",{className:"text-slate-600 mb-8",children:"Your wallet has been topped up successfully"})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 via-white to-slate-50 rounded-2xl p-5 border border-slate-200 shadow-lg mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4 pb-4 border-b border-slate-200",children:[e.jsx("div",{className:"w-1.5 h-6 rounded-full bg-gradient-to-b from-emerald-500 to-teal-500"}),e.jsx("h3",{className:"font-bold text-slate-900",children:"Transaction Details"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-slate-600",children:"Amount Added"}),e.jsxs("span",{className:"text-xl font-bold text-emerald-600",children:["+$",qe.toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between items-center bg-gradient-to-r from-emerald-50 to-teal-50 -mx-5 px-5 py-3",children:[e.jsx("span",{className:"text-sm text-slate-600 font-medium",children:"New Balance"}),e.jsxs("span",{className:"text-2xl font-bold text-slate-900",children:["$",gt.toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between items-center pt-2",children:[e.jsx("span",{className:"text-sm text-slate-600",children:"Payment Method"}),e.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium text-slate-900",children:[e.jsx(Nt,{className:"w-4 h-4 text-slate-500"}),"Credit Card"]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-slate-600",children:"Status"}),e.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium text-emerald-600",children:[e.jsx(kl,{className:"w-4 h-4"}),"Completed"]})]})]})]}),e.jsx("div",{className:"bg-gradient-to-br from-blue-50 to-cyan-50 border-2 border-blue-200 rounded-2xl p-4 mb-6",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"bg-gradient-to-br from-blue-500 to-cyan-500 p-2 rounded-xl shadow-lg flex-shrink-0",children:e.jsx(kt,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-blue-900 mb-0.5 text-sm",children:"Ready to Use"}),e.jsx("div",{className:"text-xs text-blue-700",children:"Your funds are now available. Use your balance to purchase any service instantly!"})]})]})}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-6",children:[e.jsxs("div",{className:"text-center bg-gradient-to-br from-emerald-50 to-teal-50 rounded-xl p-3 border border-emerald-100",children:[e.jsx(ne,{className:"w-5 h-5 text-emerald-600 mx-auto mb-1"}),e.jsx("div",{className:"text-[10px] font-bold text-slate-700",children:"Payment"})]}),e.jsxs("div",{className:"text-center bg-gradient-to-br from-blue-50 to-cyan-50 rounded-xl p-3 border border-blue-100",children:[e.jsx(rt,{className:"w-5 h-5 text-blue-600 mx-auto mb-1"}),e.jsx("div",{className:"text-[10px] font-bold text-slate-700",children:"Verified"})]}),e.jsxs("div",{className:"text-center bg-gradient-to-br from-teal-50 to-emerald-50 rounded-xl p-3 border border-teal-100",children:[e.jsx(kt,{className:"w-5 h-5 text-teal-600 mx-auto mb-1"}),e.jsx("div",{className:"text-[10px] font-bold text-slate-700",children:"Credited"})]})]}),e.jsxs("button",{onClick:()=>Y(!1),className:"w-full bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-700 hover:to-teal-700 text-white py-4 rounded-xl font-bold text-lg shadow-xl hover:shadow-2xl transition-all duration-300 flex items-center justify-center gap-2",children:[e.jsx("span",{children:"Done"}),e.jsx(ne,{className:"w-5 h-5"})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-4 text-center",children:"Your transaction has been recorded securely"})]})]})})}),document.body)]})}const gf={general:"General",billing:"Billing",technical:"Technical",order:"Order Issue"},X4={low:"Low",medium:"Medium",high:"High",urgent:"Urgent"};function K4(t){const s=[],a=t.split(` 1038`);return a.forEach((r,l)=>{const n=/\*\*(.+?)\*\*|\*(.+?)\*/g;let i=0,c;const d=[];let x=0;for(;(c=n.exec(r))!==null;)c.index>i&&d.push(r.substring(i,c.index)),d.push(e.jsx("strong",{className:"font-semibold",children:c[1]||c[2]},`bold-${l}-${x++}`)),i=c.index+c[0].length;i<r.length&&d.push(r.substring(i)),d.length===0&&d.push(""),s.push(e.jsxs("span",{children:[d,l<a.length-1&&e.jsx("br",{})]},`line-${l}`))}),s}function Fx({isOpen:t,onClose:s}){const{profile:a}
1038=br(),[r,l]=o.useState("list"),[n,i]=o.useState([]),[c,d]=o.useState(null),[x,m]=o.useState([]),[h,f]=o.useState(!0),[y,g]=o.useState(!1),[w,N]=o.useState(""),[v,j]=o.useState({subject:"",message:"",category:"general",priority:"medium",order_number:""}),b=o.useRef(null),p=o.useRef(null),[E,C]=o.useState(null),[S,k]=o.useState(!1),[J,u]=o.useState(null);o.useEffect(()=>{t&&a&&A()},[t,a]),o.useEffect(()=>{var R;(R=b.current)==null||R.scrollIntoView({behavior:"smooth"})},[x]);const A=async()=>{f(!0);try{const{data:{session:R}}=await Ye.auth.getSession();if(!R)return;const X=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_user_tickets",{headers:{Authorization:`Bearer ${R.access_token}`,"Content-Type":"application/json"}});if(X.ok){const re=await X.json();i(re.tickets||[])}}catch(R){console.error("Error fetching tickets:",R)}finally{f(!1)}},T=async R=>{try{const{data:{session:X}}=await Ye.auth.getSession();if(!X)return;const re=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_ticket_messages?ticketId=${R}`,{headers:{Authorization:`Bearer ${X.access_token}`,"Content-Type":"application/json"}});if(re.ok){const U=await re.json();m(U.messages||[])}}catch(X){console.error("Error fetching messages:",X)}},ae=async()=>{if(!(!v.subject.trim()||!v.message.trim())){g(!0);try{const{data:{session:R}}=await Ye.auth.getSession();if(!R)return;(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/create_support_ticket",{method:"POST",headers:{Authorization:`Bearer ${R.access_token}`,"Content-Type":"application/json"},body:JSON.stringify(v)})).ok&&(j({subject:"",message:"",category:"general",priority:"medium",order_number:""}),l("list"),await A())}catch(R){console.error("Error creating ticket:",R)}finally{g(!1)}}},P=R=>{var re;const X=(re=R.clipboardData)==null?void 0:re.items;if(X){for(let U=0;U<X.length;U++)if(X[U].type.indexOf("image")!==-1){R.preventDefault();const oe=X[U].getAsFile();if(oe){const ue=URL.createObjectURL(oe);C({file:oe,preview:ue})}break}}},z=R=>{var re;const X=(re=R.target.files)==null?void 0:re[0];if(X&&X.type.startsWith("image/")){const U=URL.createObjectURL(X);C({file:X,preview:U})}p.current&&(p.current.value="")},I=()=>{E&&(URL.revokeObjectURL(E.preview),C(null))},Z=async(R,X)=>{try{const re=R.name.split(".").pop()||"png",U=`support_${Date.now()}_${Math.random().toString(36).substring(7)}.${re}`,oe=new FormData;oe.append("file",R),oe.append("fileName",U);const ue=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/upload_support_attachment",{method:"POST",headers:{Authorization:`Bearer ${X.access_token}`},body:oe});return ue.ok?(await ue.json()).url:null}catch(re){return console.error("Error uploading image:",re),null}},Q=async()=>{if(!(!w.trim()&&!E||!c)){g(!0),k(!!E);try{const{data:{session:R}}=await Ye.auth.getSession();if(!R)return;let X=[];if(E){const oe=await Z(E.file,R);oe&&X.push({type:"image",url:oe,name:E.file.name})}const re=w.trim()||(X.length>0?"[Image]":"");(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/send_support_message",{method:"POST",headers:{Authorization:`Bearer ${R.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({ticketId:c.id,message:re,attachments:X.length>0?X:void 0})})).ok&&(N(""),I(),await T(c.id))}catch(R){console.error("Error sending message:",R)}finally{g(!1),k(!1)}}},_=async R=>{d(R),l("chat"),await T(R.id)},M=R=>{switch(R){case"open":return e.jsx(nt,{className:"w-4 h-4 text-blue-500"});case"in_progress":return e.jsx(Ze,{className:"w-4 h-4 text-amber-500"});case"resolved":return e.jsx(ne,{className:"w-4 h-4 text-emerald-500"});case"closed":return e.jsx(ne,{className:"w-4 h-4 text-slate-400"});default:return e.jsx(nt,{className:"w-4 h-4 text-slate-400"})}},F=R=>{switch(R){case"open":return"bg-blue-100 text-blue-700 border-blue-200";case"in_progress":return"bg-amber-100 text-amber-700 border-amber-200";case"resolved":return"bg-emerald-100 text-emerald-700 border-emerald-200";case"closed":return"bg-slate-100 text-slate-600 border-slate-200";default:return"bg-slate-100 text-slate-600 border-slate-200"}};return!t||!a?null:e.jsxs("div",{className:"fixed inset-0 z-50 bg-slate-900/80 backdrop-blur-lg overflow-hidden",children:[e.jsx("div",{className:"h-full flex items-center justify-center p-0 sm:p-4",children:e.jsxs("div",{className:"bg-white sm:rounded-2xl shadow-2xl w-full h-full sm:h-[90vh] sm:max-w-2xl flex flex-col overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-blue-600 via-blue-500 to-cyan-500 px-4 sm:px-6 py-4 sm:py-5 flex-shrink-0",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[r!=="list"&&e.jsx("button",{onClick:()=>{l("list"),d(null),m([])},className:"p-2 rounded-xl bg-white/20 hover:bg-white/30 text-white transition-colors",children:e.jsx(Ua,{className:"w-5 h-5"})}),e.jsx("div",{className:"p-2.5 rounded-xl bg-white/20 backdrop-blur",children:e.jsx(Ls,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg sm:text-xl font-bold text-white",children:r==="list"?"Support Center"
1038:r==="create"?"New Ticket":"Conversation"}),e.jsx("p",{className:"text-xs sm:text-sm text-white/80",children:r==="list"?"Get help from our team":r==="create"?"Describe your issue":c==null?void 0:c.subject})]})]}),e.jsx("button",{onClick:s,className:"p-2 rounded-xl bg-white/20 hover:bg-white/30 text-white transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[r==="list"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border-b border-slate-200 flex-shrink-0 space-y-3",children:[e.jsxs("button",{onClick:()=>l("create"),className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 text-white rounded-xl font-semibold transition-all shadow-lg shadow-blue-500/25",children:[e.jsx(ns,{className:"w-5 h-5"}),e.jsx("span",{children:"Create New Ticket"})]}),e.jsxs("a",{href:"https://wa.me/+447424750508",target:"_blank",rel:"noopener noreferrer",className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-green-500 to-emerald-500 hover:from-green-600 hover:to-emerald-600 text-white rounded-xl font-semibold transition-all shadow-lg shadow-green-500/25",children:[e.jsx(Ls,{className:"w-5 h-5"}),e.jsx("span",{children:"WhatsApp"})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:h?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[e.jsx(Ne,{className:"w-8 h-8 text-blue-600 animate-spin mb-3"}),e.jsx("p",{className:"text-sm text-slate-500",children:"Loading tickets..."})]}):n.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"inline-flex p-4 rounded-2xl bg-slate-100 mb-4",children:e.jsx(eh,{className:"w-10 h-10 text-slate-400"})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"No tickets yet"}),e.jsx("p",{className:"text-sm text-slate-500 max-w-xs mx-auto",children:"Need help? Create a new support ticket and we'll get back to you soon."})]}):e.jsx("div",{className:"space-y-3",children:n.map(R=>e.jsxs("button",{onClick:()=>_(R),className:"w-full text-left bg-white border border-slate-200 rounded-xl p-4 hover:border-blue-300 hover:shadow-md transition-all group",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[M(R.status),e.jsx("h4",{className:"font-semibold text-slate-900 truncate",children:R.subject}),R.unread_count>0&&e.jsx("span",{className:"flex-shrink-0 w-5 h-5 bg-blue-600 text-white text-xs font-bold rounded-full flex items-center justify-center",children:R.unread_count})]}),R.last_message&&e.jsxs("p",{className:"text-sm text-slate-500 line-clamp-1",children:[R.last_message.is_admin?"Support: ":"You: ",R.last_message.message]})]}),e.jsx(Yt,{className:"w-5 h-5 text-slate-400 group-hover:text-blue-600 transition-colors flex-shrink-0"})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full border ${F(R.status)}`,children:R.status.replace("_"," ")}),e.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1",children:[e.jsx(bn,{className:"w-3 h-3"}),gf[R.category]]}),e.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1",children:[e.jsx(Ds,{className:"w-3 h-3"}),new Date(R.created_at).toLocaleDateString()]})]})]},R.id))})})]}),r==="create"&&e.jsx("div",{className:"flex-1 overflow-y-auto p-4 sm:p-6",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Subject"}),e.jsx("input",{type:"text",value:v.subject,onChange:R=>j({...v,subject:R.target.value}),placeholder:"Brief description of your issue",className:"w-full px-4 py-3 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Category"}),e.jsxs("select",{value:v.category,onChange:R=>j({...v,category:R.target.value}),className:"w-full px-4 py-3 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm",children:[e.jsx("option",{value:"general",children:"General"}),e.jsx("option",{value:"billing",children:"Billing"}),e.jsx("option",{value:"technical",children:"Technical"}),e.jsx("option",{value:"order",children:"Order Issue"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Priority"}),e.jsxs("select",{value:v.priority,onChange:R=>j({...v,priority:R.target.value}),className:"w-full px-4 py-3 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm",children:[e.jsx("option",{value:"low",children:"Low"}),e.jsx("option",{value:"medium",children:"Medium"}),e.jsx("option",{value:"high",children:"High"}),e.jsx("option",{value:"urgent",children:"Urgent"})]})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:["Order Number ",e.jsx("span",{className:"text-slate-400 font-normal",children:"(optional)"})]}),e.jsx("input",{type:"text",value:v.order_number,onChange:R=>j({...v,order_number:R.target.value}),placeholder:"e.g. ORD-12345 or 1ac76391",className:"w-full px-4 py-3 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:"Message"}),e.jsx("textarea",{value:v.message,onChange:R=>j({...v,message:R.target.value}),placeholder:"Please describe your issue in detail...",rows:6,className:"w-full px-4 py-3 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm resize-none"})]}),e.jsx("button",{onClick:ae,disabled:y||!v.subject.trim()||!v.message.trim(),className:"w-full flex items-center justify-center gap-2 px-4 py-3.5 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 disabled:from-slate-400 disabled:to-slate-500 text-white rounded-xl font-semibold transition-all shadow-lg shadow-blue-500/25 disabled:shadow-none",children:y?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Creating..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(As,{className:"w-5 h-5"}),e.jsx("span",{children:"Submit Ticket"})]})})]})}),r==="chat"&&c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-4 py-3 bg-slate-50 border-b border-slate-200 flex-shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:`text-xs px-2.5 py-1 rounded-full border font-medium ${F(c.status)}`,children:c.status.replace("_"," ")}),e.jsxs("span",{className:"text-xs text-slate-500",children:[gf[c.category]," - ",X4[c.priority]," Priority"]})]})}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[x.map(R=>e.jsx("div",{className:`flex ${R.is_admin?"justify-start":"justify-end"}`,children:e.jsxs("div",{className:`max-w-[85%] rounded-2xl px-4 py-3 ${R.is_admin?"bg-slate-100 text-slate-900 rounded-bl-md":"bg-gradient-to-br from-blue-600 to-cyan-500 text-white rounded-br-md"}`,children:[R.attachments&&R.attachments.length>0&&e.jsx("div",{className:"mb-2 space-y-2",children:R.attachments.map((X,re)=>X.type==="image"&&e.jsxs("button",{onClick:()=>u(X.url),className:"relative group/img block max-w-[200px] rounded-lg overflow-hidden border-2 border-white/20 hover:border-white/40 transition-colors",children:[e.jsx("img",{src:X.url,alt:X.name||"Image",className:"w-full h-auto object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover/img:bg-black/30 transition-colors flex items-center justify-center",children:e.jsx(q0,{className:"w-6 h-6 text-white opacity-0 group-hover/img:opacity-100 transition-opacity"})})]},re))}),R.message&&R.message!=="[Image]"&&e.jsx("p",{className:"text-sm break-words",children:K4(R.message)}),e.jsxs("p",{className:`text-xs mt-1.5 ${R.is_admin?"text-slate-400":"text-white/70"}`,children:[R.is_admin&&e.jsx("span",{className:"font-medium",children:"Support - "}),new Date(R.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]})},R.id)),e.jsx("div",{ref:b})]}),c.status!=="closed"&&c.status!=="resolved"&&e.jsxs("div",{className:"p-4 border-t border-slate-200 bg-white flex-shrink-0",children:[E&&e.jsxs("div",{className:"mb-3 relative inline-block",children:[e.jsx("img",{src:E.preview,alt:"Pending",className:"max-h-24 rounded-lg border-2 border-blue-300"}),e.jsx("button",{onClick:I,className:"absolute -top-2 -right-2 p-1 bg-red-500 text-white rounded-full hover:bg-red-600 transition-colors",children:e.jsx(ht,{className:"w-3 h-3"})}),S&&e.jsx("div",{className:"absolute inset-0 bg-black/50 rounded-lg flex items-center justify-center",children:e.jsx(Ne,{className:"w-5 h-5 text-white animate-spin"})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"file",ref:p,onChange:z,accept:"image/*",className:"hidden"}),e.jsx("button",{onClick:()=>{var R;return(R=p.current)==null?void 0:R.click()},className:"px-3 py-3 bg-slate-100 hover:bg-slate-200 text-slate-600 rounded-xl transition-colors",title:"Attach image",children:e.jsx(tm,{className:"w-5 h-5"})}),e.jsx("input",{type:"text",value:w,onChange:R=>N(R.target.value),onKeyPress:R=>
1038R.key==="Enter"&&!R.shiftKey&&Q(),onPaste:P,placeholder:"Type your message... (Ctrl+V to paste image)",className:"flex-1 px-4 py-3 bg-slate-50 border-2 border-slate-200 rounded-xl focus:border-blue-500 focus:bg-white focus:outline-none transition text-sm"}),e.jsx("button",{onClick:Q,disabled:y||!w.trim()&&!E,className:"px-4 py-3 bg-gradient-to-r from-blue-600 to-cyan-500 hover:from-blue-700 hover:to-cyan-600 disabled:from-slate-400 disabled:to-slate-500 text-white rounded-xl transition-all",children:y?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(As,{className:"w-5 h-5"})})]})]}),(c.status==="closed"||c.status==="resolved")&&e.jsx("div",{className:"p-4 border-t border-slate-200 bg-slate-50 text-center flex-shrink-0",children:e.jsxs("p",{className:"text-sm text-slate-500",children:["This ticket has been ",c.status,". Create a new ticket if you need further assistance."]})})]})]})]})}),J&&e.jsxs("div",{className:"fixed inset-0 bg-black/90 z-[60] flex items-center justify-center p-4",onClick:()=>u(null),children:[e.jsx("button",{onClick:()=>u(null),className:"absolute top-4 right-4 p-2 bg-white/10 hover:bg-white/20 rounded-full transition-colors",children:e.jsx(ht,{className:"w-6 h-6 text-white"})}),e.jsx("img",{src:J,alt:"Full size",className:"max-w-full max-h-full object-contain rounded-lg",onClick:R=>R.stopPropagation()})]})]})}function bf({isOpen:t,onClose:s,initialMode:a="login"}){const[r,l]=o.useState(a),[n,i]=o.useState(""),[c,d]=o.useState(""),[x,m]=o.useState(""),[h,f]=o.useState(!1),[y,g]=o.useState(""),{signIn:w,signUp:N,signInWithGoogle:v}=br(),{t:j}
1038=os(),[b,p]=o.useState(!1);if(o.useEffect(()=>{t&&(l(a),g(""),i(""),d(""),m(""))},[t,a]),!t)return null;const E=async S=>{S.preventDefault(),g(""),f(!0);try{if(r==="signup"){if(!x.trim()){g("Full name is required"),f(!1);return}const{error:k}=await N(n,c,x);k?g(k.message||"Failed to sign up"):s()}else{const{error:k}=await w(n,c);k?g(k.message||"Failed to sign in"):s()}}catch(k){g(k.message||"An error occurred")}finally{f(!1)}},C=()=>{l(r==="login"?"signup":"login"),g("")};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-start sm:items-center justify-center p-4 py-8 bg-slate-900/70 backdrop-blur-md overflow-y-auto",children:e.jsxs("div",{className:"bg-white rounded-3xl shadow-2xl w-full max-w-md relative overflow-hidden animate-in fade-in zoom-in-95 duration-300 flex-shrink-0",children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-44 bg-gradient-to-br from-cyan-500 via-blue-500 to-teal-500"}),e.jsx("div",{className:"absolute top-0 left-0 right-0 h-44 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iMC4xIj48cGF0aCBkPSJNMzYgMzRjMC0yLjIgMS44LTQgNC00czQgMS44IDQgNC0xLjggNC00IDQtNC0xLjgtNC00eiIvPjwvZz48L2c+PC9zdmc+')] opacity-50"}),e.jsx("button",{onClick:s,className:"absolute top-4 right-4 z-10 p-2 rounded-full bg-white/20 backdrop-blur-sm text-white hover:bg-white/30 transition-all",children:e.jsx(ht,{className:"w-5 h-5"})}),e.jsxs("div",{className:"relative pt-8 pb-6 px-8",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-white/30 rounded-2xl blur-lg"}),e.jsx("div",{className:"relative bg-white/20 backdrop-blur-sm rounded-2xl p-4 border border-white/30",children:r==="login"?e.jsx(ls,{className:"w-8 h-8 text-white"}):e.jsx(rs,{className:"w-8 h-8 text-white"})})]})}),e.jsxs("div",{className:"text-center text-white",children:[e.jsx("h2",{className:"text-2xl font-bold drop-shadow-lg",children:j(r==="login"?"auth.welcome_back":"auth.create_account")}),e.jsx("p",{className:"text-white/80 text-sm mt-1",children:j(r==="login"?"auth.sign_in_continue":"auth.join_community")})]})]}),e.jsxs("div",{className:"px-8 pb-8 pt-4",children:[y&&e.jsxs("div",{className:`mb-4 p-4 rounded-xl text-sm ${y.toLowerCase().includes("suspended")||y.toLowerCase().includes("banned")?"bg-red-100 border-2 border-red-400 text-red-700":"bg-red-50 border border-red-200 text-red-600"}`,children:[(y.toLowerCase().includes("suspended")||y.toLowerCase().includes("banned"))&&e.jsxs("div",{className:"flex items-center gap-2 font-bold mb-2 text-red-800",children:[e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})}),"Account Suspended"]}),y]}),e.jsxs("form",{onSubmit:E,className:"space-y-4",children:[r==="signup"&&e.jsxs("div",{className:"group",children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:j("auth.full_name")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 p-1.5 bg-cyan-100 rounded-lg group-focus-within:bg-cyan-500 transition-colors",children:e.jsx(ls,{className:"w-4 h-4 text-cyan-600 group-focus-within:text-white transition-colors"})}),e.jsx("input",{type:"text",value:x,onChange:S=>m(S.target.value),className:"w-full pl-14 pr-4 py-3.5 bg-slate-50 border-2 border-slate-200 rounded-xl focus:bg-white focus:border-cyan-400 focus:ring-4 focus:ring-cyan-100 outline-none transition-all text-slate-900 placeholder:text-slate-400",placeholder:"John Doe",required:r==="signup"})]})]}),e.jsxs("div",{className:"group",children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:j("auth.email")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 p-1.5 bg-blue-100 rounded-lg group-focus-within:bg-blue-500 transition-colors",children:e.jsx(gs,{className:"w-4 h-4 text-blue-600 group-focus-within:text-white transition-colors"})}),e.jsx("input",{type:"email",value:n,onChange:S=>i(S.target.value),className:"w-full pl-14 pr-4 py-3.5 bg-slate-50 border-2 border-slate-200 rounded-xl focus:bg-white focus:border-blue-400 focus:ring-4 focus:ring-blue-100 outline-none transition-all text-slate-900 placeholder:text-slate-400",placeholder:"[email protected]",required:!0})]})]}),e.jsxs("div",{className:"group",children:[e.jsx("label",{className:"block text-sm font-semibold text-slate-700 mb-2",children:j("auth.password")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 p-1.5 bg-teal-100 rounded-lg group-focus-within:bg-teal-500 transition-colors",children:e.jsx($t,{className:"w-4 h-4 text-teal-600 group-focus-within:text-white transition-colors"})}),e.jsx("input",{type:"password",value:c,onChange:S=>d(S.target.value),className:"w-full pl-14 pr-4 py-3.5 bg-slate-50 border-2 border-slate-200 rounded-xl focus:bg-white focus:border-teal-400 focus:ring-4 focus:ring-teal-100 outline-none transition-all text-slate-900 placeholder:text-slate-400",placeholder:"Min. 6 characters",required:!0,minLength:6})]})]}),e.jsxs("button",{type:"submit",disabled:h,className:"relative w-full overflow-hidden bg-gradient-to-r from-cyan-500 via-blue-500 to-teal-500 text-white py-4 rounded-xl font-bold text-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center space-x-2 shadow-lg shadow-blue-500/30 hover:shadow-xl hover:shadow-blue-500/40 hover:scale-[1.02] active:scale-[0.98] group",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-cyan-400 via-blue-400 to-teal-400 opacity-0 group-hover:opacity-100 transition-opacity"}),e.jsx("div",{className:"relative flex items-center space-x-2",children:h?e.jsxs(e.Fragment,{children:[e.jsx(am,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:j(r==="login"?"auth.signing_in":"auth.creating_account")}
1038)]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r==="login"?j("header.login"):"Sign Up & 50% OFF"}),r==="signup"&&e.jsx(rs,{className:"w-5 h-5"})]})})]})]}),e.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[e.jsx("div",{className:"flex-1 h-px bg-slate-200"}),e.jsx("span",{className:"text-sm text-slate-400",children:j("auth.or_continue_with")||"or continue with"}),e.jsx("div",{className:"flex-1 h-px bg-slate-200"})]}),e.jsxs("button",{type:"button",onClick:async()=>{p(!0),g("");const{error:S}=await v();S&&(g(S.message||"Failed to sign in with Google"),p(!1))},disabled:b||h,className:"mt-4 w-full flex items-center justify-center gap-3 py-3.5 px-4 bg-white border-2 border-slate-200 rounded-xl hover:bg-slate-50 hover:border-slate-300 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[b?e.jsx(am,{className:"w-5 h-5 animate-spin text-slate-400"}):e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),e.jsx("span",{className:"font-semibold text-slate-700",children:b?j("auth.signing_in")||"Signing in...":j("auth.continue_with_google")||"Continue with Google"})]}),r==="signup"&&e.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-4 text-xs text-slate-500",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(lt,{className:"w-3.5 h-3.5 text-green-500"}),e.jsx("span",{children:"Secure"})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(rt,{className:"w-3.5 h-3.5 text-yellow-500"}),e.jsx("span",{children:"Instant"})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(rs,{className:"w-3.5 h-3.5 text-cyan-500"}),e.jsx("span",{children:"$5 Bonus"})]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-slate-500",children:[j(r==="login"?"auth.no_account":"auth.have_account")," ",e.jsx("button",{onClick:C,className:"text-transparent bg-clip-text bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 font-bold transition-all",children:j(r==="login"?"header.signup":"header.login")})]})})]})]})})}function Q4({onSuccess:t,checkoutState:s}){const[a,r]=o.useState("signup"),[l,n]=o.useState(""),[i,c]=o.useState(""),[d,x]=o.use
1038State(""),[m,h]=o.useState(!1),[f,y]=o.useState(!1),[g,w]=o.useState(""),[N,v]=o.useState(""),{signIn:j,signUp:b,signInWithGoogle:p}=br(),E=async()=>{if(!f){y(!0),w("");try{s&&EN("pendingCheckout",{...s,timestamp:Date.now()});const{error:S}=await p();S&&(w(S.message||"Failed to sign in with Google"),y(!1),tu("pendingCheckout"))}catch(S){w(S.message||"An error occurred"),y(!1),tu("pendingCheckout")}}},C=async S=>{if(S.preventDefault(),!m){w(""),v(""),h(!0);try{if(a==="signup"){if(!d.trim()){w("Full name is required"),h(!1);return}const{error:k}=await b(l,i,d);k?(w(k.message||"Failed to sign up"),h(!1)):(v("Account created successfully! Redirecting to checkout..."),h(!1))}else{const{error:k}=await j(l,i);k?(w(k.message||"Failed to sign in"),h(!1)):(v("Welcome back! Redirecting to checkout..."),h(!1))}}catch(k){w(k.message||"An error occurred"),h(!1)}}};return e.jsxs("div",{className:"max-w-lg mx-auto",children:[a==="signup"&&e.jsxs("div",{className:"relative mb-6 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-blue-500 to-teal-500 rounded-2xl"}),e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iMC4xIj48cGF0aCBkPSJNMzYgMzRjMC0yLjIgMS44LTQgNC00czQgMS44IDQgNC0xLjggNC00IDQtNC0xLjgtNC00eiIvPjwvZz48L2c+PC9zdmc+')] opacity-30"}),e.jsxs("div",{className:"relative px-4 sm:px-6 py-4 sm:py-5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center space-x-3 sm:space-x-4 min-w-0",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx("div",{className:"absolute inset-0 bg-white/30 rounded-full blur-md animate-pulse"}),e.jsx("div",{className:"relative bg-white/20 backdrop-blur-sm rounded-full p-2 sm:p-3 border border-white/30",children:e.jsx(rs,{className:"w-5 h-5 sm:w-7 sm:h-7 text-white"})})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center space-x-1 sm:space-x-2",children:[e.jsx("span",{className:"text-white/90 text-xs sm:text-sm font-medium uppercase tracking-wide",children:"Member Exclusive"}),e.jsx(Vt,{className:"w-3 h-3 sm:w-4 sm:h-4 text-yellow-300 animate-pulse flex-shrink-0"})]}),e.jsxs("div",{className:"flex items-baseline space-x-1 sm:space-x-2 mt-0.5 sm:mt-1",children:[e.jsx("span",{className:"text-2xl sm:text-4xl font-black text-white drop-shadow-lg",children:"50%"}),e.jsx("span",{className:"text-sm sm:text-lg font-bold text-cyan-100",children:"OFF"})]})]})]}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"bg-white/20 backdrop-blur-sm rounded-lg sm:rounded-xl px-2 sm:px-4 py-2 sm:py-3 border border-white/30",children:e.jsxs("div",{className:"text-white font-bold flex items-center space-x-1 sm:space-x-2 text-xs sm:text-base",children:[e.jsx(rs,{className:"w-4 h-4 sm:w-5 sm:h-5 text-yellow-300 flex-shrink-0"}),e.jsx("span",{className:"whitespace-nowrap",children:"+$5"})]})})})]}),e.jsxs("div",{className:"mt-3 sm:mt-4 flex items-center space-x-2 text-white/90 text-xs sm:text-sm",children:[e.jsx(rt,{className:"w-3 h-3 sm:w-4 sm:h-4 text-yellow-300 flex-shrink-0"}),e.jsxs("span",{children:["Sign up & unlock ",e.jsx("strong",{className:"text-white",children:"exclusive member pricing"})," on all packages!"]})]})]}),e.jsx("div",{className:"absolute -bottom-1 left-0 right-0 h-1 bg-gradient-to-r from-cyan-400 via-blue-400 to-teal-400"})]}),e.jsxs("div",{className:"text-center mb-6",children:[e.jsx("div",{className:"inline-flex p-4 rounded-2xl bg-gradient-to-br from-cyan-100 via-blue-100 to-teal-100 mb-4 shadow-lg shadow-cyan-200/50 border border-cyan-200/50",children:e.jsxs("div",{className:"relative",children:[e.jsx(ls,{className:"w-8 h-8 text-transparent bg-clip-text bg-gradient-to-br from-cyan-600 to-blue-600",style:{fill:"url(#user-gradient)"}}),e.jsx("svg",{width:"0",height:"0",children:e.jsx("defs",{children:e.jsxs("linearGradient",{id:"user-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[e.jsx("stop",{offset:"0%",stopColor:"#0891b2"}),e.jsx("stop",{offset:"100%",stopColor:"#2563eb"})]})})}),e.jsx(ls,{className:"w-8 h-8 text-cyan-600"})]})}),e.jsx("h2",{className:"text-3xl md:text-4xl font-bold bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 bg-clip-text text-transparent mb-2",children:a==="login"?"Welcome Back":"Create Your Account"}),e.jsx("p",{className:"text-slate-500",children:a==="login"?"Sign in to complete your purchase":"Quick signup to finalize your order"})]}),g&&e.jsxs("div",{className:`mb-4 p-4 rounded-xl text-sm ${g.toLowerCase().includes("suspended")||g.toLowerCase().includes("banned")?"bg-red-100 border-2 border-red-400 text-red-700":"bg-red-50 border border-red-200 text-red-600"}`,children:[(g.toLowerCase().includes("suspended")||g.toLowerCase().includes("banned"))&&e.jsxs("div",{className:"flex items-center gap-2 font-bold mb-2 text-red-800",children:[e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})}),"Account Suspended"]}),g]}),N&&e.jsxs("div",{className:"mb-4 p-3 bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-xl text-green-700 text-sm font-medium flex items-center space-x-2",children:[e.jsx(ne,{className:"w-4 h-4"}),e.jsx("span",{children:N})]}),e.jsxs("form",{onSubmit:C,className:"space-y-4",children:[a==="signup"&&e.jsxs("div",{className:"group bg-white rounded-xl p-4 border-2 border-slate-200 hover:border-cyan-300 focus-within:border-cyan-400 focus-within:ring-4 focus-within:ring-cyan-100 transition-all shadow-sm hover:shadow-md",children:[e.jsxs("label",{className:"flex items-center space-x-2 text-sm font-bold text-slate-700 mb-2",children:[e.jsx(ls,{className:"w-4 h-4 text-cyan-500"}),e.jsx("span",{children:"Full Name"})]}),e.jsx("input",{type:"text",value:d,onChange:S=>x(S.target.value),className:"w-full px-4 py-3 bg-slate-50 border-0 rounded-lg focus:bg-white focus:outline-none transition-all text-slate-900 placeholder:text-slate-400",placeholder:"John Doe",required:a==="signup"})]}),e.jsxs("div",{className:"group bg-white rounded-xl p-4 border-2 border-slate-200 hover:border-blue-300 focus-within:border-blue-400 focus-within:ring-4 focus-within:ring-blue-100 transition-all shadow-sm hover:shadow-md",children:[e.jsxs("label",{className:"flex items-center space-x-2 text-sm font-bold text-slate-700 mb-2",children:[e.jsx(gs,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{children:"Email"})]}
1038),e.jsx("input",{type:"email",value:l,onChange:S=>n(S.target.value),className:"w-full px-4 py-3 bg-slate-50 border-0 rounded-lg focus:bg-white focus:outline-none transition-all text-slate-900 placeholder:text-slate-400",placeholder:"[email protected]",required:!0})]}),e.jsxs("div",{className:"group bg-white rounded-xl p-4 border-2 border-slate-200 hover:border-teal-300 focus-within:border-teal-400 focus-within:ring-4 focus-within:ring-teal-100 transition-all shadow-sm hover:shadow-md",children:[e.jsxs("label",{className:"flex items-center space-x-2 text-sm font-bold text-slate-700 mb-2",children:[e.jsx($t,{className:"w-4 h-4 text-teal-500"}),e.jsx("span",{children:"Password"})]}),e.jsx("input",{type:"password",value:i,onChange:S=>c(S.target.value),className:"w-full px-4 py-3 bg-slate-50 border-0 rounded-lg focus:bg-white focus:outline-none transition-all text-slate-900 placeholder:text-slate-400",placeholder:"Min. 6 characters",required:!0,minLength:6})]}),e.jsxs("button",{type:"submit",disabled:m||f,className:"relative w-full overflow-hidden bg-gradient-to-r from-cyan-500 via-blue-500 to-teal-500 text-white py-4 rounded-xl font-bold text-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center space-x-2 shadow-lg shadow-blue-500/30 hover:shadow-xl hover:shadow-blue-500/40 hover:scale-[1.02] active:scale-[0.98] group",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-cyan-400 via-blue-400 to-teal-400 opacity-0 group-hover:opacity-100 transition-opacity"}),e.jsx("div",{className:"relative flex items-center space-x-2",children:m?e.jsxs(e.Fragment,{children:[e.jsx(am,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:a==="login"?"Signing In...":"Creating Account..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:a==="login"?"Sign In & Continue":"Sign Up & 50% OFF"}),a==="signup"?e.jsx(rs,{className:"w-5 h-5"}):e.jsx(ne,{className:"w-5 h-5"})]})})]}),e.jsxs("div",{className:"relative my-5",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t border-slate-200"})}),e.jsx("div",{className:"relative flex justify-center text-sm",children:e.jsx("span",{className:"px-4 bg-slate-50 text-slate-500",children:"or continue with"})})]}),e.jsxs("button",{type:"button",onClick:E,disabled:m||f,className:"w-full flex items-center justify-center space-x-3 bg-white border-2 border-slate-200 hover:border-slate-300 text-slate-700 py-3.5 rounded-xl font-semibold transition-all disabled:opacity-50 disabled:cursor-not-allowed hover:shadow-md hover:scale-[1.01] active:scale-[0.99]",children:[f?e.jsx(am,{className:"w-5 h-5 animate-spin text-slate-500"}):e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),e.jsx("span",{children:f?"Connecting...":"Continue with Google"})]})]}),e.jsx("div",{className:"mt-5 text-center",children:e.jsxs("p",{className:"text-slate-500",children:[a==="login"?"Don't have an account?":"Already have an account?"," ",e.jsx("button",{onClick:()=>r(a==="login"?"signup":"login"),className:"text-transparent bg-clip-text bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 font-semibold transition-all",children:a==="login"?"Sign Up":"Sign In"})]})}),e.jsxs("div",{className:"mt-6 bg-gradient-to-br from-slate-50 via-cyan-50/50 to-blue-50/50 border border-slate-200 rounded-xl p-5",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-slate-600",children:[e.jsx("div",{className:"p-1.5 bg-cyan-100 rounded-lg",children:e.jsx(Ze,{className:"w-4 h-4 text-cyan-600"})}),e.jsx("span",{children:"Real-time tracking"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-slate-600",children:[e.jsx("div",{className:"p-1.5 bg-blue-100 rounded-lg",children:e.jsx(kt,{className:"w-4 h-4 text-blue-600"})}),e.jsx("span",{children:"Wallet balance"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-slate-600",children:[e.jsx("div",{className:"p-1.5 bg-teal-100 rounded-lg",children:e.jsx(rt,{className:"w-4 h-4 text-teal-600"})}),e.jsx("span",{children:"Faster checkout"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-slate-600",children:[e.jsx("div",{className:"p-1.5 bg-green-100 rounded-lg",children:e.jsx(lt,{className:"w-4 h-4 text-green-600"})}),e.jsx("span",{children:"30-Day Guarantee"})]})]}),e.jsx("div",{className:"mt-4 pt-4 border-t border-slate-200",children:e.jsxs("div",{className:"flex items-start space-x-2 text-xs text-slate-500",children:[e.jsx(lt,{className:"w-4 h-4 text-green-500 mt-0.5 flex-shrink-0"}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-slate-700",children:"30-Day Money Back Guarantee"})," is available only for registered members. Your account ensures secure order tracking and refund eligibility."]})]})})]})]})}const cd=["BNB","BTC","ETH","TRX"],Z4={BTC:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/btc.png",ETH:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/eth.png",BNB:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/bnb.png",USDT:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/usdt.png",USDC:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/usdc.png",TRX:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/trx.png",SOL:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/sol.png",DOGE:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/doge.png",LTC:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/ltc.png",XRP:"https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/128/color/xrp.png"};function yf({cryptoType:t,size:s=36}){const a=Z4[t.toUpperCase()];return a?e.jsx("img",{src:a,alt:t,width:s,height:s,className:"rounded-full object-cover",style:{width:s,height:s}}):e.jsx("div",{className:"bg-gradient-to-br from-blue-500 to-blue-700 rounded-full flex items-center justify-center flex-shrink-0",style:{width:s,height:s},children:e.jsx(kt,{className:"text-white",style:{width:s*.5,height:s*.5}})})}const Ox=o.forwardRef(function({amount:s,originalAmount:a,fixedTryPrice:r,fixedTryOriginalPrice
1038:l,orderInfo:n,onSuccess:i,onCancel:c,guestName:d,guestEmail:x},m){const{t:h}=os(),[f,y]=o.useState([]),[g,w]=o.useState(null),[N,v]=o.useState(!0),[j,b]=o.useState(!1),[p,E]=o.useState(null),[C,S]=o.useState(1200),[k,J]=o.useState(!1),[u,A]=o.useState(null),[T,ae]=o.useState(null),[P,z]=o.useState(null),[I,Z]=o.useState(!1),[Q,_]=o.useState(x||""),[M,F]=o.useState(d||""),[R,X]=o.useState(null);o.useImperativeHandle(m,()=>({hasSelectedWallet:()=>g!==null,goBackToWallets:()=>{w(null),E(null),ae(null),z(null)}}),[g]),o.useEffect(()=>{x&&_(x)},[x]),o.useEffect(()=>{d&&F(d)},[d]),o.useEffect(()=>{re()},[]),o.useEffect(()=>{if(p&&u){const Se=setInterval(()=>{const $=new Date,ie=Math.max(0,Math.floor((u.getTime()-$.getTime())/1e3));S(ie),ie===0&&(clearInterval(Se),X({message:"Payment time expired. Please try again.",type:"error"}),c())},1e3);return()=>clearInterval(Se)}},[p,u,c]);const re=async()=>{v(!0);try{const Se=(await _s(async()=>{const{supabase:be}=await Promise.resolve().then(()=>rn);return{supabase:be}},void 0)).supabase,{data:$,error:ie}=await Se.from("crypto_wallets").select("*").eq("is_active",!0).order("sort_order",{ascending:!0});!ie&&$&&y($)}catch(Se){console.error("Error fetching wallets:",Se)}finally{v(!1)}},U=async Se=>{if(!cd.includes(Se))return{price:1,cryptoAmount:s.toFixed(2)};Z(!0);try{const $=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_crypto_price?crypto=${Se}`,{headers:{apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(!$.ok)throw new Error("Failed to fetch price");const be=(await $.json()).price_usd,Pe=(s/be).toFixed(6);return ae(be),z(Pe),{price:be,cryptoAmount:Pe}}catch($){return console.error("Error fetching crypto price:",$),null}finally{Z(!1)}},oe=async(Se,$)=>{try{const ie=(await _s(async()=>{const{supabase:ee}=await Promise.resolve().then(()=>rn);return{supabase:ee}},void 0)).supabase,{data:{user:be}}=await ie.auth.getUser(),Pe=new Date;Pe.setMinutes(Pe.getMinutes()+20);const de={wallet_id:Se.id,amount:s,crypto_amount:$,wallet_address:Se.wallet_address,crypto_type:Se.crypto_type,network:Se.network,expires_at:Pe.toISOString(),status:"pending",platform:n.platform,service_type:n.serviceType,username:n.username,quantity:n.quantity,link:n.link,service_id:n.serviceId,package_id:n.packageId||null};be?de.user_id=be.id:(de.guest_name=M||d||null,de.guest_email=Q||x||null);const{data:H,error:me}=await ie.from("crypto_payments").insert(de).select().single();return me?(console.error("Error creating payment:",me),X({message:"Failed to create payment. Please try again.",type:"error"}),!1):H?(E(H.id),A(Pe),S(1200),!0):!1}catch(ie){return console.error("Error creating payment:",ie),X({message:"Failed to create payment. Please try again.",type:"error"}),!1}},ue=async Se=>{await(await _s(async()=>{const{supabase:Pe}=await Promise.resolve().then(()=>rn);return{supabase:Pe}},void 0)).supabase.auth.getUser(),v(!0);const ie=await U(Se.crypto_type);if(!ie){X({message:"Failed to fetch current crypto price. Please try again.",type:"error"}),v(!1);return}await oe(Se,ie.cryptoAmount)&&w(Se),v(!1)},K=async()=>{g&&await U(g.crypto_type)},q=()=>{g&&(navigator.clipboard.writeText(g.wallet_address),b(!0),setTimeout(()=>b(!1),2e3))},je=()=>{P&&(navigator.clipboard.writeText(P),X({message:`Copied: ${P} ${g==null?void 0:g.crypto_type}`,type:"success"}))},we=async()=>{if(p){J(!0);try{const Se=(await _s(async()=>{const{supabase:de}=await Promise.resolve().then(()=>rn);return{supabase:de}},void 0)).supabase,{data:{session:$}}=await Se.auth.getSession(),ie=($==null?void 0:$.access_token)||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",be=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/submit_crypto_payment",{method:"POST",headers:{Authorization:`Bearer ${ie}`,"Content-Type":"application/json"},body:JSON.stringify({payment_id:p,guest_email:$?void 0:Q||x,device_id:typeof window<"u"&&window.localStorage&&window.localStorage.getItem("followx_device_id")||void 0})}),Pe=await be.json();be.ok&&Pe.success?i(p):X({message:Pe.error||"Error submitting payment. Please try again.",type:"error"})}catch(Se){console.error("Error submitting payment:",Se),X({message:"Error submitting payment. Please try again.",type:"error"})}finally{J(!1)}}},se=Se=>{const $=Math.floor(Se/60),ie=Se%60;return`${$}:${ie.toString().padStart(2,"0")}`};return N?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"w-8 h-8 border-4 border-blue-600 border-t-transparent roun
1038ded-full animate-spin"})}):f.length===0?e.jsxs("div",{className:"bg-white rounded-2xl p-8 text-center border border-slate-200",children:[e.jsx(nt,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-600 font-medium",children:"Crypto payment not available"}),e.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Please try another payment method"})]}):g?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2.5",children:[e.jsxs("div",{className:"bg-gradient-to-r from-orange-50 to-red-50 rounded-xl px-3.5 py-2.5 border border-orange-200 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{className:"w-4 h-4 text-orange-600"}),e.jsx("span",{className:"text-xs font-medium text-slate-700",children:"Payment expires in"})]}),e.jsx("span",{className:`text-lg font-bold ${C<300?"text-red-600":"text-orange-600"}`,children:se(C)})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3.5 border border-blue-200",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(yf,{cryptoType:g.crypto_type,size:32}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-sm text-slate-900",children:g.display_name}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"px-1.5 py-px bg-blue-50 text-blue-700 text-[10px] font-medium rounded",children:g.crypto_type}),e.jsx("span",{className:"px-1.5 py-px bg-slate-100 text-slate-600 text-[10px] font-medium rounded",children:g.network})]})]})]}),cd.includes(g.crypto_type)&&e.jsxs("button",{onClick:K,disabled:I,className:"flex items-center gap-1 text-[10px] text-amber-700 hover:text-amber-900 transition-colors",children:[e.jsx(Ve,{className:`w-3 h-3 ${I?"animate-spin":""}`}),"Refresh"]})]}),e.jsx("div",{className:"bg-gradient-to-br from-amber-50 to-yellow-50 rounded-lg p-3 mb-3 border border-amber-200",children:cd.includes(g.crypto_type)?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("p",{className:"text-xl font-bold text-amber-700",children:[P||"..."," ",g.crypto_type]}),P&&e.jsx("button",{onClick:je,className:"p-1 bg-amber-200 text-amber-800 rounded hover:bg-amber-300 transition-colors",children:e.jsx(Ht,{className:"w-3 h-3"})})]}),a&&a>s&&e.jsxs("span",{className:"flex items-center gap-0.5 bg-emerald-100 text-emerald-700 text-[10px] font-bold px-1.5 py-0.5 rounded",children:[e.jsx(bn,{className:"w-3 h-3"}),h("checkout.off_25")]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[e.jsxs("span",{className:"text-xs text-slate-600",children:["$",s.toFixed(2)]}),a&&a>s&&e.jsxs("span",{className:"text-xs text-slate-400 line-through",children:["$",a.toFixed(2)]}),T&&e.jsxs("span",{className:"text-[10px] text-slate-500",children:["(1 ",g.crypto_type," = $",T.toLocaleString(),")"]})]})]}):e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-xl font-bold text-slate-900",children:["$",s.toFixed(2)," USD"]}),e.jsxs("p",{className:"text-xs text-slate-500",children:["= ",s.toFixed(2)," ",g.crypto_type]})]}),a&&a>s&&e.jsxs("div",{className:"text-right",children:[e.jsxs("span",{className:"text-xs text-slate-400 line-through",children:["$",a.toFixed(2)]}),e.jsxs("span",{className:"flex items-center gap-0.5 bg-emerald-100 text-emerald-700 text-[10px] font-bold px-1.5 py-0.5 rounded mt-0.5",children:[e.jsx(bn,{className:"w-3 h-3"}),h("checkout.off_25")]})]})]})}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Wallet Address"}),e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("input",{type:"text",value:g.wallet_address,readOnly:!0,className:"flex-1 px-3 py-1.5 bg-slate-50 border border-slate-200 rounded-lg font-mono text-xs"}),e.jsx("button",{onClick:q,className:"px-3 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center",children:j?e.jsx(Lt,{className:"w-4 h-4"}):e.jsx(Ht,{className:"w-4 h-4"})})]})]}),g.qr_code_url&&e.jsx("div",{className:"mb-3 flex justify-center",children:e.jsx("div",{className:"bg-white p-2 rounded-lg border border-slate-200 inline-block",children:e.jsx("img",{src:g.qr_code_url,alt:"QR Code",className:"w-28 h-28"})})}),e.jsx("div",{className:"bg-blue-50 rounded-lg px-3 py-2 mb-3 border border-blue-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(nt,{className:"w-3.5 h-3.5 text-blue-600 shrink-0 mt-0.5"}),e.jsxs("ul",{className:"text-[11px] text-blue-800 space-y-0.5",children:[cd.includes(g.crypto_type)?e.jsxs("li",{children:["Send exactly ",e.jsxs("strong",{children:[P," ",g.crypto_type]})]}):e.jsxs("li",{children:["Send exactly ",e.jsxs("strong",{children:["$",s.toFixed(2)]})]}),e.jsxs("li",{children:["Use only ",e.jsx("strong",{children:g.network})," network"]}),e.jsx("li",{children:'Click "I Have Paid" after completing payment'})]})]})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:c,className:"flex-1 py-2 border border-slate-300 text-slate-600 font-medium text-sm rounded-xl hover:bg-slate-50 transition-colors",disabled:k,children:"Cancel"}),e.jsx("button",{onClick:we,disabled:k,className:"flex-1 py-2 bg-gradient-to-r from-green-600 to-emerald-700 text-white font-medium text-sm rounded-xl hover:from-green-700 hover:to-emerald-800 transition-all shadow-lg disabled:opacity-50 disabled:cursor-not-allowed",children:k?"Submitting...":"I Have Paid"})]})]})]}),R&&gl.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-end justify-center",onClick:()=>X(null),children:[e.jsx("div",{className:"absolute inset-0 bg-black/30"}),e.jsxs("div",{className:"relative bg-white rounded-t-2xl shadow-2xl w-full max-w-lg overflow-hidden",style:{animation:"modalSlideUp 0.25s ease-out",maxHeight:"50vh"},onClick:Se=>Se.stopPropagation(),children:[e.jsx("div",{className:"flex justify-center pt-2 pb-1",children:e.jsx("div",{className:"w-8 h-1 bg-slate-300 rounded-full"})}),e.jsxs("div",{className:"px-5 pb-5 pt-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:`flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center ${R.type==="error"?"bg-red-100":R.type==="success"?"bg-green-100":"bg-blue-100"}`,children:R.type==="error"?e.jsx(st,{className:"w-4 h-4 text-red-600"}):R.type==="success"?e.jsx(hl,{className:"w-4 h-4 text-green-600"}):e.jsx(hr,{className:"w-4 h-4 text-blue-600"})}),e.jsx("p",{className:"text-sm text-slate-700 flex-1",children:R.message})]}),e.jsx("button",{onClick:()=>X(null),className:`w-full py-2 rounded-xl text-sm font-medium text-white ${R.type==="error"?"bg-red-500":R.type==="success"?"bg-green-500":"bg-blue-500"}`,children:"OK"})]})]})]}),document.body)]}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-500 rounded-xl px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-lg flex items-center justify-center",children:e.jsx(kt,{className:"w-4 h-4 text-white"})}),e.jsx("span",{className:"text-sm font-bold text-white",children:h("crypto.select_wallet")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[a&&a>s&&e.jsxs("span",{className:"text-xs text-white/50 line-through",children:["$",a.toFixed(2)]}),e.jsxs("span",{className:"text-lg font-extrabold text-white",children:["$",s.toFixed(2)]}),a&&a>s&&e.jsx("span",{className:"bg-white/20 backdrop-blur-sm text-white text-[10px] font-bold px-2 py-0.5 rounded-full",children:"-25%"})]})]}),e.jsx("div",{className:"grid gap-2",children:f.map(Se=>e.jsx("button",{onClick:()=>ue(Se),className:"bg-white border border-slate-200 hover:border-blue-500 rounded-xl px-3 py-2.5 transition-all text-left group",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(yf,{cryptoType:Se.crypto_type,size:36}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-sm text-slate-900 group-hover:text-blue-600 transition-colors",children:Se.display_name}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx("span",{className:"px-1.5 py-px bg-blue-50 text-blue-700 text-[10px] font-medium rounded",children:Se.crypto_type}),e.jsx("span",{className:"px-1.5 py-px bg-slate-100 text-slate-600 text-[10px] font-medium rounded",children:Se.network})]})]})]}),e.jsx(Gs,{className:"w-4 h-4 text-slate-400 group-hover:text-blue-600 transition-colors"})]})},Se.id))}),R&&gl.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-end justify-center",onClick:()=>X(null),children:[e.jsx("div",{className:"absolute inset-0 bg-black/30"}),e.jsxs("div",{className:"relative bg-white rounded-t-2xl shadow-2xl w-full max-w-lg overflow-hidden",style:{animation:"modalSlideUp 0.25s ease-out",maxHeight:"50vh"},onClick:Se=>Se.stopPropagation(),children:[e.jsx("div",{className:"flex justify-center pt-2 pb-1",children:e.jsx("div",{className:"w-8 h-1 bg-slate-300 rounded-full"})}),e.jsxs("div",{className:"px-5 pb-5 pt-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:`flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center ${R.type==="error"?"bg-red-100":R.type==="success"?"bg-green-100":"bg-blue-100"}`,children:R.type==="error"?e.jsx(st,{className:"w-4 h-4 text-red-600"}):R.type==="success"?e.jsx(hl,{className:"w-4 h-4 text-green-600"}):e.jsx(hr,{className:"w-4 h-4 text-blue-600"})}),e.jsx("p",{className:"text-sm text-slate-700 flex-1",children:R.message})]}),e.jsx("button",{onClick:()=>X(null),className:`w-full py-2 rounded-xl text-sm font-medium text-white ${R.type==="error"?"bg-red-500":R.type==="success"?"bg-green-500":"bg-blue-500"}`,children:"OK"})]})]})]}),document.body)]})}),e3=[{amount:.01,label:"$0.01",color:"#FF6B6B"},{amount:.02,label:"$0.02",color:"#4ECDC4"},{amount:.05,label:"$0.05",color:"#FFE66D"},{amount:.03,label:"$0.03",color:"#95E1D3"},{amount:.1,label:"$0.10",color:"#F38181"},{amount:.02,label:"$0.02",color:"#AA96DA"},{amount:.01,label:"$0.01",color:"#FCBAD3"},{amount:.05,label:"$0.05",color:"#A8D8EA"}];function zx({onClose:t}
1038){const[s,a]=o.useState(!1),[r,l]=o.useState(0),[n,i]=o.useState(!0),[c,d]=o.useState(0),[x,m]=o.useState(0),[h,f]=o.useState([]),[y,g]=o.useState(!1),[w,N]=o.useState(0),[v,j]=o.useState(!1),[b,p]=o.useState(!0),E=o.useRef(null),C=o.useRef(null);o.useEffect(()=>(S(),()=>{C.current&&clearInterval(C.current)}),[]),o.useEffect(()=>(c>0&&!n&&(C.current=setInterval(()=>{d(A=>A<=1e3?(i(!0),C.current&&clearInterval(C.current),0):A-1e3)},1e3)),()=>{C.current&&clearInterval(C.current)}),[c,n]);const S=async()=>{try{const{data:{session:A}}=await Ye.auth.getSession();if(!A)return;const T=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_spin_status",{headers:{Authorization:`Bearer ${A.access_token}`,"Content-Type":"application/json"}}),ae=await T.json();T.ok&&(m(ae.gift_balance||0),i(ae.can_spin),d(ae.remaining_ms||0),f(ae.spin_history||[]))}catch(A){console.error("Error fetching spin status:",A)}finally{p(!1)}},k=async()=>{if(!(!n||s)){a(!0),g(!1);try{const{data:{session:A}}=await Ye.auth.getSession();if(!A)return;const T=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/spin_wheel",{method:"POST",headers:{Authorization:`Bearer ${A.access_token}`,"Content-Type":"application/json"}}),ae=await T.json();if(T.ok){const P=ae.result_index,z=360/8,I=360-P*z-z/2,Q=r+5*360+I+(360-r%360);l(Q),setTimeout(()=>{N(ae.amount_won),m(ae.new_balance),g(!0),a(!1),i(!1),d(60*60*1e3),S(),window.dispatchEvent(new Event("spinUsed"))},5e3)}else a(!1),ae.remaining_ms&&(i(!1),d(ae.remaining_ms))}catch(A){console.error("Error spinning wheel:",A),a(!1)}}},J=A=>{const T=Math.floor(A/6e4),ae=Math.floor(A%6e4/1e3);return`${T}:${ae.toString().padStart(2,"0")}`},u=A=>new Date(A).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return b?e.jsx("div",{className:"fixed inset-0 z-50 bg-slate-900/90 backdrop-blur-xl flex items-center justify-center",children:e.jsx("div",{className:"w-16 h-16 border-4 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):e.jsxs("div",{className:"fixed inset-0 z-50 bg-slate-900/95 backdrop-blur-xl flex flex-col",children:[e.jsx("div",{className:"sticky top-0 z-20 flex justify-end p-3 bg-gradient-to-b from-slate-900 to-transparent",children:e.jsx("button",{onClick:t,className:"p-2.5 bg-slate-800 hover:bg-slate-700 rounded-full border border-slate-600 transition-colors shadow-lg",children:e.jsx(ht,{className:"w-5 h-5 text-slate-300"})})}),e.jsx("div",{className:"flex-1 overflow-y-auto px-4 pb-4",children:e.jsx("div",{className:"w-full max-w-lg mx-auto",children:e.jsxs("div",{className:"bg-gradient-to-b from-slate-800 to-slate-900 rounded-3xl border border-slate-700 overflow-hidden shadow-2xl",children:[e.jsxs("div",{className:"relative px-6 py-5 bg-gradient-to-r from-cyan-500/20 via-blue-500/20 to-cyan-500/20 border-b border-slate-700",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxjaXJjbGUgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIgY3g9IjIwIiBjeT0iMjAiIHI9IjEiLz48L2c+PC9zdmc+')] opacity-50"}),e.jsxs("div",{className:"relative flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-gradient-to-br from-cyan-500 to-blue-600 shadow-lg shadow-cyan-500/25",children:e.jsx(rs,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Lucky Spin"}),e.jsx("p",{className:"text-sm text-cyan-300",children:"Win free credits!"})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-xs text-slate-400",children:"Game Balance"}),e.jsxs("p",{className:"text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-blue-400",children:["$",x.toFixed(2)]})]})]})]}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"relative flex justify-center mb-6",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 -translate-y-1 z-20",children:e.jsx("div",{className:"w-0 h-0 border-l-[12px] border-r-[12px] border-t-[20px] border-l-transparent border-r-transparent border-t-cyan-400 drop-shadow-[0_0_10px_rgba(34,211,238,0.5)]"})}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-4 bg-gradient-to-r from-cyan-500 via-blue-500 to-cyan-500 rounded-full opacity-20 blur-xl animate-pulse"}),e.jsxs("div",{className:"relative w-72 h-72 rounded-full bg-gradient-to-b from-slate-700 to-slate-800 p-2 shadow-2xl",children:[e.jsx("div",{className:"absolute inset-0 rounded-full overflow-hidden",children:[...Array(24)].map((A,T)=>e.jsx("div",{className:"absolute w-3 h-3 rounded-full bg-yellow-400 shadow-[0_0_10px_rgba(250,204,21,0.8)]",style:{to
1038p:"50%",left:"50%",transform:`rotate(${T*15}deg) translateY(-140px) translateX(-50%)`,animation:`pulse 1.5s ease-in-out ${T*.1}s infinite`}},T))}),e.jsx("div",{ref:E,className:"w-full h-full rounded-full overflow-hidden relative",style:{transform:`rotate(${r}deg)`,transition:s?"transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99)":"none"},children:e.jsxs("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:[e3.map((A,T)=>{const P=45*T-90,z=P+45,I=P*Math.PI/180,Z=z*Math.PI/180,Q=50+50*Math.cos(I),_=50+50*Math.sin(I),M=50+50*Math.cos(Z),F=50+50*Math.sin(Z),R=P+22.5,X=R*Math.PI/180,re=50+32*Math.cos(X),U=50+32*Math.sin(X);return e.jsxs("g",{children:[e.jsx("path",{d:`M 50 50 L ${Q} ${_} A 50 50 0 0 1 ${M} ${F} Z`,fill:A.color,stroke:"#1e293b",strokeWidth:"0.5"}),e.jsx("text",{x:re,y:U,fill:"#1e293b",fontSize:"6",fontWeight:"bold",textAnchor:"middle",dominantBaseline:"middle",transform:`rotate(${R+90}, ${re}, ${U})`,children:A.label})]},T)}),e.jsx("circle",{cx:"50",cy:"50",r:"12",fill:"url(#centerGradient)",stroke:"#0ea5e9",strokeWidth:"1"}),e.jsx("defs",{children:e.jsxs("radialGradient",{id:"centerGradient",children:[e.jsx("stop",{offset:"0%",stopColor:"#22d3ee"}),e.jsx("stop",{offset:"100%",stopColor:"#0284c7"})]})}),e.jsx("text",{x:"50",y:"51",fill:"white",fontSize:"5",fontWeight:"bold",textAnchor:"middle",dominantBaseline:"middle",children:"SPIN"})]})})]})]})]}),y&&e.jsx("div",{className:"mb-6 p-4 rounded-2xl bg-gradient-to-r from-emerald-500/20 to-cyan-500/20 border border-emerald-500/30 animate-pulse",children:e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsx(Vt,{className:"w-6 h-6 text-yellow-400"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm text-emerald-300",children:"Congratulations!"}),e.jsxs("p",{className:"text-2xl font-bold text-white",children:["You won $",w.toFixed(2),"!"]})]}),e.jsx(Vt,{className:"w-6 h-6 text-yellow-400"})]})}),e.jsx("button",{onClick:k,disabled:!n||s,className:`w-full py-4 px-6 rounded-2xl font-bold text-lg transition-all flex items-center justify-center gap-3 ${n&&!s?"bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-400 hover:to-blue-500 text-white shadow-lg shadow-cyan-500/25 hover:shadow-cyan-500/40 hover:scale-[1.02]":"bg-slate-700 text-slate-400 cursor-not-allowed"}`,children:s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-6 h-6 border-3 border-white/30 border-t-white rounded-full animate-spin"}),"Spinning..."]}):n?e.jsxs(e.Fragment,{children:[e.jsx(rt,{className:"w-6 h-6"}),"SPIN NOW"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ze,{className:"w-5 h-5"}),"Next spin in ",J(c)]})}),e.jsxs("button",{onClick:()=>j(!v),className:"w-full mt-3 py-3 px-4 rounded-xl bg-slate-800 hover:bg-slate-700 border border-slate-600 text-slate-300 font-medium transition-all flex items-center justify-center gap-2",children:[e.jsx(qi,{className:"w-5 h-5"}),v?"Hide History":"View Spin History",e.jsx(ra,{className:`w-4 h-4 transition-transform ${v?"rotate-90":""}`})]}),v&&e.jsx("div",{className:"mt-4 max-h-48 overflow-y-auto rounded-xl bg-slate-800/50 border border-slate-700",children:h.length===0?e.jsxs("div",{className:"p-6 text-center text-slate-400",children:[e.jsx(rs,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:"No spins yet"})]}):e.jsx("div",{className:"divide-y divide-slate-700",children:h.map(A=>e.jsxs("div",{className:"p-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-cyan-500 to-blue-600 flex items-center justify-center",children:e.jsx(rs,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-medium text-white",children:["Won $",A.amount_won.toFixed(2)]}),e.jsx("p",{className:"text-xs text-slate-400",children:u(A.created_at)})]})]}),e.jsxs("span",{className:"text-emerald-400 font-semibold",children:["+$",A.amount_won.toFixed(2)]})]},A.id))})})]}),e.jsxs("div",{className:"px-6 py-4 bg-slate-800/50 border-t border-slate-700",children:[e.jsx("p",{className:"text-xs text-slate-400 text-center mb-2",children:"Spin the wheel once every hour to win free promotional credits."}),e.jsx("p",{className:"text-xs text-slate-500 text-center",children:"Promotional credits are not linked to PayPal and cannot be withdrawn or c
1038onverted to cash. Credits can only be used to purchase digital services on our platform."})]})]})})}),e.jsx("style",{children:` 1039 @keyframes pulse { 1040 0%, 100% { opacity: 0.4; transform: scale(0.9); } 1041 50% { opacity: 1; transform: scale(1.1); } 1042 } 1043 `})]})}function $x({onClose:t}){const{formatInCurrency:s}=Nn(),[a,r]=o.useState(!0),[l,n]=o.useState(!0),[i,c]=o.useState(!1),[d,x]=o.useState(!1),[m,h]=o.useState(null),[f,y]=o.useState(0),[g,w]=o.useState(0),[N,v]=o.useState([]),[j,b]=o.useState([]),[p,E]=o.useState(null),[C,S]=o.useState(null),[k,J]=o.useState("idle"),[u,A]=o.useState(0),[T,ae]=o.useState(!1),[P,z]=o.useState(!1),[I,Z]=o.useState(null),Q=o.useRef(null),_=o.useRef(null),M=o.useCallback(async()=>{try{const{data:{session:re}}=await Ye.auth.getSession();if(!re)return;const U=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_mystery_box_status",{headers:{Authorization:`Bearer ${re.access_token}`,"Content-Type":"application/json"}}),oe=await U.json();if(!U.ok){console.error("Mystery Box status error:",oe),Z(oe.error||"Failed to load Mystery Box");return}if(oe.error){console.error("Mystery Box data error:",oe.error),Z(oe.error);return}n(oe.feature_enabled),c(oe.maintenance_mode||!1),x(oe.can_open),h(oe.reason),y(oe.remaining_ms||0),w(oe.gift_balance||0),v(oe.history||[]),b(oe.rewards||[]),E(oe.stats||null),S(oe.settings||null)}catch(re){console.error("Error fetching mystery box status:",re),Z("Failed to connect to server")}finally{r(!1)}},[]);o.useEffect(()=>{M()},[M]),o.useEffect(()=>(f>0&&!d&&(Q.current=setInterval(()=>{y(re=>re<=1e3?(x(!0),h(null),Q.current&&clearInterval(Q.current),0):re-1e3)},1e3)),()=>{Q.current&&clearInterval(Q.current)}),[f,d]);const F=re=>{const U=Math.floor(re/1e3),oe=Math.floor(U/3600),ue=Math.floor(U%3600/60),K=U%60;return oe>0?`${oe}h ${ue}m ${K}s`:ue>0?`${ue}m ${K}s`:`${K}s`},R=async()=>{if(!(!d||k!=="idle")){Z(null),J("shaking"),await new Promise(re=>setTimeout(re,800)),J("opening");try{const{data:{session:re}}=await Ye.auth.getSession();if(!re){Z("Please sign in to continue"),J("idle");return}const U=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/open_mystery_box",{method:"POST",headers:{Authorization:`Bearer ${re.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({device_fingerprint:navigator.userAgent})}),oe=await U.json();if(!U.ok){Z(oe.error||"Failed to open Mystery Box"),J("idle");return}await new Promise(K=>setTimeout(K,1500)),J("revealing"),A(oe.reward.amount),w(oe.new_balance),await new Promise(K=>setTimeout(K,500)),J("revealed"),x(!1),h("cooldown_active");const ue=24*60*60*1e3;y(ue),v(K=>[{id:crypto.randomUUID(),amount_won:oe.reward.amount,created_at:new Date().toISOString()},...K.slice(0,9)]),p&&E({...p,total_opens:p.total_opens+1,total_won:p.total_won+oe.reward.amount,opens_today:p.opens_today+1})}catch(re){console.error("Error opening mystery box:",re),Z("Network error. Please try again."),J("idle")}}},X=()=>{J("idle"),A(0)};return a?e.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-xl flex items-center justify-center z-50",children:e.jsx("div",{className:"w-16 h-16 border-4 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):l?i?e.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-xl flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-slate-900 rounded-3xl p-8 max-w-md w-full text-center border border-slate-700",children:[e.jsx("div",{className:"w-16 h-16 bg-amber-500/20 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(nt,{className:"w-8 h-8 text-amber-500"})}),e.jsx("h2",{className:"text-xl font-bold text-white mb-2",children:"Under Maintenance"}),e.jsx("p",{className:"text-slate-400 mb-6",children:"Mystery Box is temporarily unavailable. Please check back later."}),e.jsx("button",{onClick:t,className:"px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white rounded-xl transition-colors",children:"Close"})]})}):e.jsxs("div",{className:"fixed inset-0 bg-black/90 backdrop-blur-xl flex items-center justify-center z-50 p-4",children:[e.jsxs("div",{ref:_,className:"relative w-full max-w-lg bg-gradient-to-b from-slate-900 via-slate-900 to-slate-950 rounded-3xl overflow-hidden border border-slate-700/50 shadow-2xl",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-500/5 via-trans
1043parent to-emerald-500/5 pointer-events-none"}),e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-96 h-96 bg-cyan-500/10 rounded-full blur-3xl pointer-events-none"}),e.jsxs("div",{className:"relative p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-gradient-to-br from-cyan-500 to-emerald-500 rounded-xl shadow-lg shadow-cyan-500/30",children:e.jsx(rs,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-white text-lg",children:"Mystery Box"}),e.jsx("p",{className:"text-sm text-slate-400",children:"Win free Game Balance"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>z(!0),className:"p-2 text-slate-400 hover:text-white hover:bg-slate-800 rounded-lg transition-colors",children:e.jsx(hr,{className:"w-5 h-5"})}),e.jsx("button",{onClick:()=>ae(!0),className:"p-2 text-slate-400 hover:text-white hover:bg-slate-800 rounded-lg transition-colors",children:e.jsx(qi,{className:"w-5 h-5"})}),e.jsx("button",{onClick:t,className:"p-2 text-slate-400 hover:text-white hover:bg-slate-800 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"bg-slate-800/50 rounded-2xl p-4 mb-6 border border-slate-700/50",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-emerald-500/20 rounded-lg",children:e.jsx(kt,{className:"w-5 h-5 text-emerald-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wider",children:"Game Balance"}),e.jsx("p",{className:"text-xl font-bold text-white",children:s(g)})]})]}),p&&e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-xs text-slate-400",children:"Total Won"}),e.jsx("p",{className:"text-lg font-semibold text-emerald-400",children:s(p.total_won)})]})]})}),e.jsxs("div",{className:"relative flex items-center justify-center py-8",children:[e.jsxs("div",{className:` 1044 relative w-48 h-48 transition-all duration-300 1045 ${k==="shaking"?"animate-shake":""} 1046 ${k==="opening"?"scale-110":""} 1047 ${k==="revealing"||k==="revealed"?"scale-0 opacity-0":""} 1048 `,children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-500/20 to-emerald-500/20 rounded-3xl blur-xl"}),e.jsxs("div",{className:"relative w-full h-full",children:[e.jsxs("svg",{viewBox:"0 0 200 200",className:"w-full h-full",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"boxGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[e.jsx("stop",{offset:"0%",stopColor:"#06b6d4"}),e.jsx("stop",{offset:"100%",stopColor:"#10b981"})]}),e.jsxs("linearGradient",{id:"boxDark",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[e.jsx("stop",{offset:"0%",stopColor:"#0891b2"}),e.jsx("stop",{offset:"100%",stopColor:"#059669"})]}),e.jsxs("filter",{id:"glow",children:[e.jsx("feGaussianBlur",{stdDeviation:"3",result:"coloredBlur"}),e.jsxs("feMerge",{children:[e.jsx("feMergeNode",{in:"coloredBlur"}),e.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),e.jsx("rect",{x:"30",y:"70",width:"140",height:"100",rx:"8",fill:"url(#boxGradient)",filter:"url(#glow)"}),e.jsx("rect",{x:"30",y:"110",width:"140",height:"60",rx:"4",fill:"url(#boxDark)"}),e.jsx("rect",{x:"90",y:"70",width:"20",height:"100",fill:"#fbbf24"}),e.jsx("rect",{x:"30",y:"100",width:"140",height:"20",fill:"#fbbf24"}),e.jsx("path",{d:"M30 70 L100 40 L170 70",fill:"url(#boxGradient)"}),e.jsx("ellipse",{cx:"100",cy:"55",rx:"25",ry:"15",fill:"#fbbf24"}),e.jsx("ellipse",{cx:"100",cy:"55",rx:"18",ry:"10",fill:"#f59e0b"}),e.jsx("circle",{cx:"75",cy:"45",r:"12",fill:"#fbbf24"}),e.jsx("circle",{cx:"125",cy:"45",r:"12",fill:"#fbbf24"}),e.jsx("path",{d:"M75 45 Q60 25 75 30 Q90 35 75 45",fill:"#fbbf24"}),e.jsx("path",{d:"M125 45 Q140 25 125 30 Q110 35 125 45",fill:"#fbbf24"})]}),d&&k==="idle"&&e.jsx("div",{className:"absolute -top-2 -right-2",children:e.jsxs("span",{className:"flex h-6 w-6",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-6 w-6 bg-emerald-500 items-center justify-center",children:e.jsx(Vt,{className:"w-3 h-3 text-white"})})]})})]})]}),(k==="revealing"||k==="revealed")&&e.jsxs("div",{className:` 1049 absolute inset-0 flex flex-col items-center justify-center 1050 transition-all duration-500 1051 ${k==="revealed"?"opacity-100 scale-100":"opacity-0 scale-50"} 1052 `,children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-500 to-emerald-500 rounded-full blur-2xl opacity-50 animate-pulse"}),e.jsx("div",{className:"relative bg-gradient-to-br from-cyan-500 to-emerald-500 rounded-full p-8 shadow-2xl shadow-cyan-500/30",children:e.jsx(rs,{className:"w-12 h-12 text-white"})})]}),e.jsxs("div",{className:"mt-6 text-center",children:[e.jsx("p",{className:"text-slate-400 text-sm mb-1",children:(C==null?void 0:C.reward_reveal_text)||"Congratulations! You won"}),e.jsxs("p",{className:"text-4xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-emerald-400",children:["+",s(u)]}),e.jsx("p",{className:"text-emerald-400 text-sm mt-2",children:(C==null?void 0:C.success_notification_text)||"Game Balance added to your wallet!"})]})]}),k==="opening"&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"w-24 h-24 border-4 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})})]}),I&&e.jsx("div",{className:"mb-4 p-3 bg-red-500/10 border border-red-500/30 rounded-xl text-red-400 text-sm text-center",children:I}),e.jsx("div",{className:"space-y-3",children:k==="revealed"?e.jsx("button",{onClick:X,className:"w-full py-4 bg-slate-800 hover:bg-slate-700 text-white font-semibold rounded-xl transition-all duration-300",children:"Done"}):d&&k==="idle"?e.jsxs("button",{onClick:R,className:"relative w-full py-4 bg-gradient-to-r from-cyan-500 to-emerald-500 hover:from-cyan-400 hover:to-emerald-400 text-white font-semibold rounded-xl transition-all duration-300 shadow-lg shadow-cyan-500/30 hover:shadow-cyan-500/50 overflow-hidden group",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700"}),e.jsxs("span",{className:"relative flex items-center justify-center gap-2",children:[e.jsx(rs,{className:"w-5 h-5"}),(C==null?void 0:C.cta_button_text)||"Open Mystery Box"]})]}):e.jsx("div",{className:"text-center",children:m==="cooldown_active"&&f>0?e.jsxs("div",{className:"bg-slate-800/50 rounded-xl p-4 border border-slate-700/50",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 text-slate-400 mb-2",children:[e.jsx(Ze,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm",children:"Next box available in"})]}),e.jsx("p",{className:"text-2xl font-bold text-white font-mono",children:F(f)})]}):m==="daily_limit_reached"?e.jsxs("div",{className:"bg-slate-800/50 rounded-xl p-4 border border-slate-700/50",children:[e.jsx("p",{className:"text-slate-400 text-sm",children:"Daily limit reached"}),e.jsx("p",{className:"text-white font-semibold",children:"Come back tomorrow!"})]}):k!=="idle"?e.jsx("div",{className:"py-4",children:e.jsx("p",{className:"text-slate-400",children:"Opening..."})}):null})}),e.jsx("div",{className:"mt-6 pt-4 border-t border-slate-800",children:e.jsx("p",{className:"text-xs text-slate-500 text-center",children:"Promotional credits are not linked to PayPal and cannot be withdrawn or c
1052onverted to cash. Credits can only be used to purchase digital services on our platform."})})]}),T&&e.jsx("div",{className:"absolute inset-0 bg-slate-900/98 backdrop-blur-sm z-10",children:e.jsxs("div",{className:"p-6 h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-slate-800 rounded-lg",children:e.jsx(qi,{className:"w-5 h-5 text-cyan-400"})}),e.jsx("h3",{className:"font-bold text-white text-lg",children:"History"})]}),e.jsx("button",{onClick:()=>ae(!1),className:"p-2 text-slate-400 hover:text-white hover:bg-slate-800 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto space-y-2",children:N.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(rs,{className:"w-12 h-12 text-slate-600 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-400",children:"No history yet"}),e.jsx("p",{className:"text-slate-500 text-sm",children:"Open your first Mystery Box!"})]}):N.map(re=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-800/50 rounded-xl border border-slate-700/50",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-emerald-500/20 rounded-lg",children:e.jsx(rs,{className:"w-4 h-4 text-emerald-400"})}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-semibold text-white",children:["+",s(re.amount_won)]}),e.jsx("p",{className:"text-xs text-slate-400",children:new Date(re.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]}),e.jsx(ra,{className:"w-4 h-4 text-slate-500"})]},re.id))}),p&&e.jsx("div",{className:"mt-4 pt-4 border-t border-slate-800",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-800/50 rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-white",children:p.total_opens}),e.jsx("p",{className:"text-xs text-slate-400",children:"Total Opens"})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-emerald-400",children:s(p.total_won)}),e.jsx("p",{className:"text-xs text-slate-400",children:"Total Won"})]})]})})]})}),P&&e.jsx("div",{className:"absolute inset-0 bg-slate-900/98 backdrop-blur-sm z-10",children:e.jsxs("div",{className:"p-6 h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-slate-800 rounded-lg",children:e.jsx(hr,{className:"w-5 h-5 text-cyan-400"})}),e.jsx("h3",{className:"font-bold text-white text-lg",children:"How It Works"})]}),e.jsx("button",{onClick:()=>z(!1),className:"p-2 text-slate-400 hover:text-white hover:bg-slate-800 rounded-lg transition-colors",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto space-y-4",children:[e.jsxs("div",{className:"bg-slate-800/50 rounded-xl p-4 border border-slate-700/50",children:[e.jsxs("h4",{className:"font-semibold text-white mb-2 flex items-center gap-2",children:[e.jsx(rs,{className:"w-4 h-4 text-cyan-400"}),"Mystery Box"]}),e.jsx("p",{className:"text-slate-400 text-sm",children:"Open a Mystery Box once every 24 hours to win free Game Balance rewards!"})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-xl p-4 border border-slate-700/50",children:[e.jsx("h4",{className:"font-semibold text-white mb-3",children:"Possible Rewards"}),e.jsx("div",{className:"space-y-2",children:j.map(re=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"text-emerald-400 font-semibold",children:re.label})},re.id))})]}),e.jsxs("div",{className:"bg-slate-800/50 rounded-xl p-4 border border-slate-700/50",children:[e.jsxs("h4",{className:"font-semibold text-white mb-2 flex items-center gap-2",children:[e.jsx(kt,{className:"w-4 h-4 text-emerald-400"}),"About Game Balance"]}),e.jsxs("ul",{className:"text-slate-400 text-sm space-y-2",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-emerald-400 mt-1",children:"+"}),"Can be used to purchase any service"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-emerald-400 mt-1",children:"+"}),"Applied automatically at checkout"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-red-400 mt-1",children:"-"}),"Cannot be withdrawn or refunded"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-red-400 mt-1",children:"-"}),"Has no cash value"]})]})]})]}),e.jsx("div",{className:"mt-4 pt-4 border-t border-slate-800",children:e.jsx("p",{className:"text-xs text-slate-500 text-center",children:(C==null?void 0:C.disclaimer_text)||"Game Balance has no cash value and cannot be withdrawn."})})]})})]}),e.jsx("style",{children:` 1053 @keyframes shake { 1054 0%, 100% { transform: translateX(0) rotate(0); } 1055 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px) rotate(-2deg); } 1056 20%, 40%, 60%, 80% { transform: translateX(5px) rotate(2deg); } 1057 } 1058 .animate-shake { 1059 animation: shake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; 1060 } 1061 `})]}):e.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-xl flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-slate-900 rounded-3xl p-8 max-w-md w-full text-center border border-slate-700",children:[e.jsx(nt,{className:"w-16 h-16 text-slate-500 mx-auto mb-4"}),e.jsx("h2",{className:"text-xl font-bold text-white mb-2",children:"Mystery Box Unavailable"}),e.jsx("p",{className:"text-slate-400 mb-6",children:"This feature is currently disabled."}),e.jsx("button",{onClick:t,className:"px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white rounded-xl transition-colors",children:"Close"})]})})}function jf({amount:t,customerEmail:s,cart:a,onSuccess:r,onError:l,onCancel:n}){const[i,c]=o.useState("");o.useState("");
1061const[d,x]=o.useState(!1),[m,h]=o.useState(null),[f,y]=o.useState(!1),[g,w]=o.useState(!1),[N,v]=o.useState(null),j=o.useRef(null),b=o.useRef(null),p=o.useRef(null);o.useEffect(()=>{(async()=>{var S;try{const u=(S=(await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_active_payment_methods_public",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}})).json()).methods)==null?void 0:S.find(A=>A.code==="stripe");u!=null&&u.publishable_key&&v(u.publishable_key)}catch(k){console.error("Failed to fetch Stripe key:",k)}})()},[]),o.useEffect(()=>{if(!N)return;const C=()=>{if(window.Stripe){S();return}const k=document.createElement("script");k.src="https://js.stripe.com/v3/",k.async=!0,k.onload=S,document.head.appendChild(k)},S=()=>{if(!window.Stripe||!N)return;b.current=window.Stripe(N);const J=b.current.elements({appearance:{theme:"stripe",variables:{colorPrimary:"#3b82f6",colorBackground:"#f8fafc",colorText:"#0f172a",colorDanger:"#ef4444",fontFamily:"system-ui, sans-serif",spacingUnit:"4px",borderRadius:"12px"}}}).create("card",{style:{base:{fontSize:"16px",color:"#0f172a","::placeholder":{color:"#94a3b8"}},invalid:{color:"#ef4444"}},hidePostalCode:!0});j.current&&(J.mount(j.current),p.current=J,J.on("change",u=>{w(u.complete),u.error?h(u.error.message):h(null)}),y(!0))};return C(),()=>{p.current&&p.current.unmount()}},[N]);const E=async C=>{if(C.preventDefault(),h(null),!i.trim()){h("Please enter the cardholder name");return}if(!g){h("Please complete your card details");return}if(!b.current||!p.current){h("Payment system not ready. Please refresh and try again.");return}x(!0);try{const S=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/stripe_create_payment_intent",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({customerName:i,customerEmail:s||"",cart:a})}),k=await S.json();if(!S.ok)throw new Error(k.error||"Failed to create payment");const{error:J,paymentIntent:u}=await b.current.confirmCardPayment(k.clientSecret,{payment_method:{card:p.current,billing_details:{name:i}}});if(J){try{await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/stripe_confirm_card_payment",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({paymentIntentId:k.paymentIntentId,orderId:k.orderId})})}catch{}throw new Error(J.message)}if((u==null?void 0:u.status)==="succeeded"){const T=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/stripe_confirm_card_payment",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({paymentIntentId:k.paymentIntentId,orderId:k.orderId})})).json();if(T.success)r(k.orderId);
1061else throw new Error(T.error||"Payment confirmation failed")}else if((u==null?void 0:u.status)==="requires_action")h("This card requires additional authentication. Please try a different card.");else throw new Error("Payment was not successful")}catch(S){const k=S instanceof Error?S.message:"Payment failed. Please try again.";console.error("Stripe payment error:",S),h(k),l(k)}finally{x(!1)}};return e.jsxs("div",{className:"rounded-xl overflow-hidden",children:[e.jsx("div",{className:"bg-slate-50 border border-slate-200 rounded-xl px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"w-8 h-8 bg-slate-100 rounded-lg flex items-center justify-center",children:e.jsx(Nt,{className:"w-4 h-4 text-slate-700"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-slate-900",children:"Secure Payment"}),e.jsx("p",{className:"text-[11px] text-slate-500",children:"Enter your card details"})]})]}),e.jsxs("span",{className:"text-lg font-extrabold text-slate-900",children:["$",t.toFixed(2)]})]})}),e.jsxs("form",{onSubmit:E,className:"p-4 space-y-3.5",children:[m&&e.jsxs("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-2",children:[e.jsx(nt,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-red-700",children:m})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-xs font-medium text-slate-600 mb-1.5",children:[e.jsx(ls,{className:"w-3.5 h-3.5 inline mr-1.5"}),"Cardholder Name"]}),e.jsx("input",{type:"text",value:i,onChange:C=>c(C.target.value),placeholder:"Name on card",autoComplete:"cc-name",className:"w-full px-3.5 py-3 border border-slate-200 rounded-lg bg-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-xs font-medium text-slate-600 mb-1.5",children:[e.jsx(Nt,{className:"w-3.5 h-3.5 inline mr-1.5"}),"Card Details"]}),e.jsx("div",{ref:j,className:"px-3.5 py-3 border border-slate-200 rounded-lg bg-white min-h-[44px]"}),!f&&!N&&e.jsx("p",{className:"text-xs text-slate-400 mt-1.5",children:"Loading payment form..."})]}),e.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 bg-emerald-50 rounded-lg border border-emerald-200",children:[e.jsx(Sl,{className:"w-4 h-4 text-green-500 shrink-0"}),e.jsx("p",{className:"text-xs text-slate-500",children:"Your payment information is encrypted and secure"})]}),e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx("button",{type:"button",onClick:n,disabled:d,className:"w-[100px] shrink-0 py-2.5 border border-slate-200 text-slate-600 text-sm font-medium rounded-lg hover:bg-slate-50 transition disabled:opacity-50",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:d||!f,className:"flex-1 py-2.5 bg-gradient-to-r from-blue-600 to-cyan-600 text-white text-sm font-semibold rounded-lg hover:from-blue-500 hover:to-cyan-500 transition disabled:opacity-50 flex items-center justify-center gap-2",children:d?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 animate-spin"}),e.jsx("span",{children:"Processing..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4"}),e.jsxs("span",{children:["Pay $",t.toFixed(2)]})]})})]})]})]})}function vf({activePage:t,onClose:s}){if(!t)return null;const a=()=>{switch(t){case"about":return e.jsx(t3,{});case"contact":return e.jsx(s3,{});case"terms":return e.jsx(a3,{});case"privacy":return e.jsx(r3,{});default:return null}},r=()=>{switch(t){case"about":return"About Us";case"contact":return"Contact Us";case"terms":return"Terms of Service";case"privacy":return"Privacy Policy";default:return""}},l=()=>{switch(t){case"about":return e.jsx(mt,{className:"w-6 h-6 text-white"});case"contact":return e.jsx(gs,{className:"w-6 h-6 text-white"});case"terms":return e.jsx(ei,{className:"w-6 h-6 text-white"});case"privacy":return e.jsx(lt,{className:"w-6 h-6 text-white"});default:return null}};return e.jsx("div",{className:"fixed inset-0 z-50 bg-slate-900/80 backdrop-blur-lg overflow-y-auto",children:e.jsx("div",{className:"min-h-full flex items-start justify-center p-4 sm:p-6 md:p-8",children:e.jsxs("div",{className:"bg-white rounded-2xl md:rounded-3xl shadow-2xl w-full max-w-4xl relative overflow-hidden my-4",children:[e.jsx("div",{className:"sticky top-0 z-20 bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 px-6 md:px-8 py-5 md:py-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 md:gap-4",children:[e.jsx("div",{className:"flex w-10 h-10 md:w-12 md:h-12 rounded-xl md:rounded-2xl bg-gradient-to-br from-blue-500 to-cyan-400 items-center justify-center shadow-lg shadow-blue-500/30",children:l()}),e.jsx("h2",{className:"text-xl md:text-2xl font-bold text-white",children:r()})]}),e.jsx("button",{onClick:s,className:"p-2 md:p-2.5 rounded-xl bg-white/10 hover:bg-white/20 active:bg-white/30 text-white transition-all duration-200",children:e.jsx(ht,{className:"w-5 h-5 md:w-6 md:h-6"})})]})}),e.jsx("div",{className:"p-6 md:p-8 lg:p-10",children:a()})]})})})}function t3(){return e.jsxs("div",{className:"prose prose-slate max-w-none",children:[e.jsx("div",{className:"mb-8",children:e.jsx("p",{className:"text-lg text-slate-600 leading-relaxed",children:"Welcome to our platform - your trusted partner for social media growth services. We specialize in helping individuals, businesses, and influencers expand their online presence through high-quality engagement solutions."})}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-8",children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-50 to-cyan-50 rounded-2xl p-6 border border-blue-100",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 rounded-lg bg-blue-100",children:e.jsx(wt,{className:"w-5 h-5 text-blue-600"})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Our Mission"})]}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"To provide reliable, safe, and effective social media growth solutions that help our clients achieve their digital marketing goals and build authentic online communities."})]}),e.jsxs("div",{className:"bg-gradient-to-br from-emerald-50 to-teal-50 rounded-2xl p-6 border border-emerald-100",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 rounded-lg bg-emerald-100",children:e.jsx(ne,{className:"w-5 h-5 text-emerald-600"})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Our Promise"})]}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"We are committed to delivering quality services with fast delivery times, 24/7 customer support, and a satisfaction guarantee on all our offerings."})]})]}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-4",children:"Why Choose Us?"}),e.jsxs("div",{className:"space-y-4 mb-8",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-1 rounded-full bg-blue-100 mt-1",children:e.jsx(ne,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-slate-900",children:"Premium Quality Services"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"We deliver high-quality engagement from real accounts to ensure authentic growth for your social media profiles."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-1 rounded-full bg-blue-100 mt-1",children:e.jsx(ne,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-slate-900",children:"Fast & Reliable Delivery"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Our automated systems ensure quick order processing and delivery, typically starting within minutes of purchase."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-1 rounded-full bg-blue-100 mt-1",children:e.jsx(ne,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-slate-900",children:"Secure Payment Options"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Payments are processed via PayPal Checkout for digital services. We also accept cryptocurrency for your convenience and security."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-1 rounded-full bg-blue-100 mt-1",children:e.jsx(ne,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-slate-900",children:"24/7 Customer Support"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Our dedicated support team is available around the clock to assist you with any questions or concerns."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-1 rounded-full bg-blue-100 mt-1",children:e.jsx(ne,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-slate-900",children:"Refill Guarantee"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"We stand behind our services with a refill guarantee to ensure you get the results you paid for."})]})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6 border border-slate-200",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"Our C
1061ommitment"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"We are dedicated to maintaining the highest standards of service quality and customer satisfaction. Our team continuously works to improve our offerings and ensure that our clients receive the best possible experience. Your success is our success, and we are here to support your social media growth journey every step of the way."})]})]})}function s3(){return e.jsxs("div",{className:"prose prose-slate max-w-none",children:[e.jsx("p",{className:"text-lg text-slate-600 mb-8",children:"We're here to help! Reach out to us through any of the following channels and our team will respond as quickly as possible."}),e.jsx("div",{className:"grid md:grid-cols-1 gap-6 mb-8",children:e.jsxs("div",{className:"bg-gradient-to-br from-blue-50 to-cyan-50 rounded-2xl p-6 border border-blue-100",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-3 rounded-xl bg-blue-100",children:e.jsx(gs,{className:"w-6 h-6 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Email Support"}),e.jsx("p",{className:"text-sm text-slate-500",children:"For detailed inquiries"})]})]}),e.jsx("p",{className:"text-slate-600 text-sm mb-4",children:"Send us an email for detailed inquiries, partnership requests, or any other business-related matters."}),e.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium text-sm transition-colors",children:[e.jsx(gs,{className:"w-4 h-4"}),"Send Email"]})]})}),e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6 border border-slate-200 mb-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 rounded-lg bg-slate-200",children:e.jsx(Ze,{className:"w-5 h-5 text-slate-600"})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Support Hours"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:"Email Support"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"24/7 - Response within 24 hours"})]})]}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-4",children:"Frequently Asked Questions"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-slate-200",children:[e.jsx("h4",{className:"font-medium text-slate-900 mb-2",children:"How long does order delivery take?"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Most orders begin processing within minutes and are completed within 24-72 hours depending on the service and quantity ordered."})]}),e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-slate-200",children:[e.jsx("h4",{className:"font-medium text-slate-900 mb-2",children:"What payment methods do you accept?"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Payments are processed via PayPal Checkout for digital services. We accept credit cards, debit cards, and PayPal accounts through PayPal Checkout. We also accept various cryptocurrencies including USDT, Bitcoin, and Ethereum."})]}),e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-slate-200",children:[e.jsx("h4",{className:"font-medium text-slate-900 mb-2",children:"Do you offer refunds?"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Yes, we offer refunds for undelivered orders. Please contact our support team for assistance with refund requests."})]}),e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-slate-200",children:[e.jsx("h4",{className:"font-medium text-slate-900 mb-2",children:"Is my account safe?"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Yes, we never require your password. We only need your public username or post link to deliver our services safely."})]})]})]})}function a3(){return e.jsxs("div",{className:"prose prose-slate max-w-none",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-6",children:"Last updated: January 2025"}),e.jsx("p",{className:"text-slate-600 mb-6",children:"Please read these Terms of Service carefully before using our platform. By accessing or using our services, you agree to be bound by these terms."}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"1. Acceptance of Terms"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"By accessing and using this website and our services, you accept and agree to be bound by the terms and provisions of this agreement. If you do not agree to these terms, please do not use our services."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"2. Description of Services"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"We provide social media marketing services including but not limited to:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"Followers and subscribers for various social media platforms"}),e.jsx("li",{children:"Likes, views, and engagement for posts and content"}),e.jsx("li",{children:"Comments and other interaction services"}),e.jsx("li",{children:"Profile optimization and growth strategies"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"3. User Responsibilities"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"As a user of our services, you agree to:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"Provide accurate and complete information when placing orders"}),e.jsx("li",{children:"Ensure your account is set to public during service delivery"}),e.jsx("li",{children:"Not use our services for illegal or prohibited activities"}),e.jsx("li",{children:"Not resell our services without authorization"}),e.jsx("li",{children:"Comply with the terms of service of the social media platforms"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"4. Payment Terms"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"Payments are processed via PayPal Checkout for digital services. By making a purchase, you agree to:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"Pay all fees associated with your order"}),e.jsx("li",{children:"Provide valid payment information"}),e.jsx("li",{children:"Authorize us to charge your payment method for the total order amount"})]}),e.jsx("div",{className:"mt-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:e.jsxs("p",{className:"text-blue-800 text-sm",children:[e.jsx("strong",{children:"Payment Processing:"})," All payments are securely processed via PayPal Checkout. We accept credit cards, debit cards, and PayPal accounts through PayPal Checkout (Digital Services)."]})})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"5. Promotional Credits"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"Promotional site credits (including credits earned through games, bonuses, or promotions) have no cash value and cannot be withdrawn or c
1061onverted to cash. Promotional credits are not linked to PayPal and can only be used to purchase digital services on our platform."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"6. Refund Policy"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"We offer refunds under the following circumstances:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"Order not delivered within the specified timeframe"}),e.jsx("li",{children:"Service delivered is significantly different from what was ordered"}),e.jsx("li",{children:"Technical issues on our end preventing delivery"})]}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mt-3",children:"Refunds are not available for delivered orders or orders cancelled after delivery has begun. Refund requests must be submitted within 30 days of purchase."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"7. Service Delivery"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"We strive to deliver all orders as quickly as possible. Delivery times vary depending on the service type and quantity ordered. While we aim to complete orders within the estimated timeframe, delays may occur due to high demand or platform-related issues."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"8. Refill Policy"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"Certain services include a refill guarantee. If you experience a drop in the delivered count within the refill period, you may request a refill through your account dashboard. Refills are subject to availability and platform limitations."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"9. Limitation of Liability"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"We are not liable for any actions taken by social media platforms against your account. Users assume all risks associated with using social media marketing services. Our liability is limited to the amount paid for the specific service in question."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"10. Modifications to Terms"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"We reserve the right to modify these terms at any time. Changes will be effective immediately upon posting to the website. Your continued use of our services after any changes indicates your acceptance of the new terms."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"11. Contact Information"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"If you have any questions about these Terms of Service, please contact our support team through the Contact page."})]})]})]})}function r3(){return e.jsxs("div",{className:"prose prose-slate max-w-none",children:[e.jsx("p",{className:"text-sm text-slate-500 mb-6",children:"Last updated: January 2025"}),e.jsx("p",{className:"text-slate-600 mb-6",children:"Your privacy is important to us. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our services."}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"1. Information We Collect"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"We collect information that you provide directly to us, including:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"Account information (email address, name)"}),e.jsx("li",{children:"Order details (social media usernames, post links)"}),e.jsx("li",{children:"Payment information (processed securely by payment providers)"}),e.jsx("li",{children:"Communication records when you contact our support"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"2. Automatic Information Collection"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"When you access our website, we automatically collect certain information, including:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"IP address and location data"}),e.jsx("li",{children:"Browser type and version"}),e.jsx("li",{children:"Device information"}),e.jsx("li",{children:"Pages visited and time spent on site"}),e.jsx("li",{children:"Referring website addresses"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"3. How We Use Your Information"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"We use the collected information for the following purposes:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"To process and fulfill your orders"}),e.jsx("li",{children:"To communicate with you about your orders and account"}),e.jsx("li",{children:"To provide customer support"}),e.jsx("li",{children:"To improve our services and user experience"}),e.jsx("li",{children:"To detect and prevent fraud or abuse"}),e.jsx("li",{children:"To comply with legal obligations"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"4. Information Sharing"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"We do not sell your personal information. We may share your information with:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"Service providers who assist in delivering our services"}),e.jsx("li",{children:"Payment processors for transaction processing"}),e.jsx("li",{children:"Law enforcement when required by law"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"5. Data Security"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"We implement appropriate technical and organizational security measures to protect your personal information against unauthorized access, alteration, disclosure, or destruction. This includes encryption, secure servers, and regular security assessments."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"6. Cookies and Tracking"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"We use cookies and similar tracking technologies to enhance your experience on our website. Cookies help us remember your preferences, understand how you use our site, and improve our services. You can control cookie settings through your browser preferences."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"7. Data Retention"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"We retain your personal information for as long as necessary to fulfill the purposes outlined in this policy, unless a longer retention period is required by law. Order records are typically retained for accounting and legal compliance purposes."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"8. Your Rights"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mb-3",children:"You have the right to:"}),e.jsxs("ul",{className:"list-disc list-inside text-slate-600 text-sm space-y-1 ml-4",children:[e.jsx("li",{children:"Access your personal information"}),e.jsx("li",{children:"Correct inaccurate information"}
1061),e.jsx("li",{children:"Request deletion of your data"}),e.jsx("li",{children:"Object to processing of your information"}),e.jsx("li",{children:"Request data portability"})]}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed mt-3",children:"To exercise these rights, please contact our support team."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"9. Children's Privacy"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"Our services are not intended for individuals under the age of 18. We do not knowingly collect personal information from children. If you believe we have collected information from a minor, please contact us immediately."})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"10. Changes to This Policy"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:'We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page and updating the "Last updated" date. We encourage you to review this policy periodically.'})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"11. Contact Us"}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:"If you have any questions about this Privacy Policy or our data practices, please contact our support team through the Contact page."})]})]})]})}function l3({phoneNumber:t,trPhoneNumber:s,message:a,trMessage:r,countryCode:l}){const n=l==="TR",i=n&&s&&s.trim()?s.trim():t,c=n&&(r!=null&&r.trim())?r.trim():a==null?void 0:a.trim();if(!i)return null;const d=c?`?text=${encodeURIComponent(c)}`:"",x=`https://wa.me/${i.replace(/\D/g,"")}${d}`;return e.jsx("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"fixed bottom-6 right-6 z-40 flex items-center justify-center w-14 h-14 bg-[#25D366] rounded-full shadow-lg hover:bg-[#20BA5C] hover:scale-110 transition-all duration-300","aria-label":"Contact us on WhatsApp",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"w-7 h-7 text-white fill-current",children:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})})}function n3({onGetStarted:t}){const[s,a]=o.useState(""),[r,l]=o.useState(!1),n=m=>{m.preventDefault(),s&&(l(!0),t&&t())},i=[{icon:tt,title:"Growth Strategy",description:"Data-driven strategies to expand your brand reach and connect with your target audience effectively."},{icon:mt,title:"Audience Development",description:"Build a loyal community around your brand with targeted engagement and content strategies."},{icon:Ia,title:"Performance Analytics",description:"Comprehensive insights and reporting to measure your social media ROI and optimize campaigns."},{icon:sr,title:"Brand Positioning",description:"Strategic positioning to differentiate your brand and establish authority in your industry."},{icon:rt,title:"Content Optimization",description:"Maximize engagement with optimized content timing, formats, and messaging strategies."},{icon:wt,title:"Multi-Platform Management",description:"Unified management across Instagram, TikTok, YouTube, and other major platforms."}],c=[{name:"Sarah M.",role:"E-commerce Owner",content:"Our brand visibility increased significantly within weeks. The team really understands social media dynamics.",rating:5},{name:"David K.",role:"Marketing Director",content:"Professional service with measurable results. They helped us reach our target audience more effectively.",rating:5},{name:"Emily R.",role:"Content Creator",content:"Finally found a partner that delivers on their promises. My engagement rates have never been better.",rating:5}],d=[{value:"10K+",label:"Brands Served"},{value:"98%",label:"Client Satisfaction"},{value:"24/7",label:"Support Available"},{value:"50M+",label:"Reach Generated"}],x=["Dedicated Account Manager","Custom Growth Strategies","Real-Time Analytics Dashboard","Monthly Performance Reports","A/B Testing & Optimization","Competitor Analysis"];return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("header",{className:"bg-white border-b border-gray-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-600 to-cyan-500 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-gray-900",children:"GrowthMedia"})]}),e.jsxs("nav",{className:"hidden lg:flex items-center gap-6",children:[e.jsx("a",{href:"#services",className:"text-gray-600 hover:text-gray-900 transition-colors",children:"Services"}),e.jsx("a",{href:"#about",className:"text-gray-600 hover:text-gray-900 transition-colors",children:"About"}),e.jsx("a",{href:"#affiliate",className:"text-gray-600 hover:text-gray-900 transition-colors",children:"Affiliate"}),e.jsx("a",{href:"#smm-panel",className:"text-gray-600 hover:text-gray-900 transition-colors",children:"SMM Panel"}),e.jsx("a",{href:"#contact",className:"text-gray-600 hover:text-gray-900 transition-colors",children:"Contact"})]}),e.jsx("button",{onClick:t,className:"bg-blue-600 text-white px-5 py-2.5 rounded-lg font-medium hover:bg-blue-700 transition-colors",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-gray-50 to-blue-50 py-20 lg:py-32",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-blue-200 rounded-full opacity-20 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-cyan-200 rounded-full opacity-20 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-blue-100 text-blue-700 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx(qs,{className:"w-4 h-4"}),"Trusted by 10,000+ Brands Worldwide"]}),e.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-gray-900 leading-tight mb-6",children:["Elevate Your Brand's",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-cyan-500",children:" Digital Presence"})]}),e.jsx("p",{className:"text-xl text-gray-600 mb-8 leading-relaxed",children:"Strategic social media marketing solutions designed to increase your brand visibility, engage your target audience, and drive measurable business growth."}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-blue-600 text-white px-8 py-4 rounded-xl font-semibold hover:bg-blue-700 transition-all shadow-lg shadow-blue-600/25 flex items-center justify-center gap-2",children:["Start Your Growth Journey",e.jsx(Yt,{className:"w-5 h-5"})]}),e.jsx("a",{href:"#services",className:"w-full sm:w-auto bg-white text-gray-700 px-8 py-4 rounded-xl font-semibold hover:bg-gray-50 transition-all border border-gray-200 flex items-center justify-center gap-2",children:"Explore Services"})]})]})})]}),e.jsx("section",{className:"py-12 bg-white border-b border-gray-100",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8",children:d.map((m,h)=>e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-3xl sm:text-4xl font-bold text-gray-900 mb-1",children:m.value}),e.jsx("div",{className:"text-gray-500",children:m.label})]},h))})})}),e.jsx("section",{id:"services",className:"py-20 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-gray-900 mb-4",children:"Comprehensive Marketing Solutions"}),e.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:"Everything you need to build a powerful social media presence and connect with your audience."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:i.map((m,h)=>e.jsxs("div",{className:"bg-gray-50 rounded-2xl p-8 hover:bg-blue-50 transition-all group cursor-pointer border border-transparent hover:border-blue-100",children:[e.jsx("div",{className:"w-14 h-14 bg-blue-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-blue-600 transition-colors",children:e.jsx(m.icon,{className:"w-7 h-7 text-blue-600 group-hover:text-white transition-colors"})}),e.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-3",children:m.title}),e.jsx("p",{className:"text-gray-600 leading-relaxed",children:m.description})]},h))})]})}),e.jsx("section",{id:"about",className:"py-20 bg-gradient-to-br from-gray-900 to-gray-800 text-white",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold mb-6",children:"Why Brands Choose Us"}),e.jsx("p",{className:"text-gray-300 text-lg mb-8 leading-relaxed",children:"We combine industry expertise with innovative strategies to deliver results that matter. Our team of social media specialists works closely with each client to develop customized solutions that align with their unique goals and brand identity."}),e.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:x.map((m,h)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-400 flex-shrink-0"}),e.jsx("span",{className:"text-gray-200",children:m})]},h))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-6 border border-white/10",children:[e.jsx(lt,{className:"w-10 h-10 text-cyan-400 mb-4"}),e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Secure & Reliable"}),e.jsx("p",{className:"text-gray-400 text-sm",children:"Your data and campaigns are protected with enterprise-grade security."})]}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-6 border border-white/10",children:[e.jsx(Ze,{className:"w-10 h-10 text-cyan-400 mb-4"}),e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Fast Results"}),e.jsx("p",{className:"text-gray-400 text-sm",children:"See measurable improvements in your metrics within the first month."})]}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-6 border border-white/10",children:[e.jsx(Kn,{className:"w-10 h-10 text-cyan-400 mb-4"}),e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"24/7 Support"}),e.jsx("p",{className:"text-gray-400 text-sm",children:"Our team is always available to help you succeed."})]}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-6 border border-white/10",children:[e.jsx(Ia,{className:"w-10 h-10 text-cyan-400 mb-4"}),e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Data-Driven"}),e.jsx("p",{className:"text-gray-400 text-sm",children:"Every decision is backed by comprehensive analytics and insights."})]})]})]})})}),e.jsx("section",{id:"testimonials",className:"py-20 bg-gray-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-gray-900 mb-4",children:"What Our Clients Say"}),e.jsx("p",{className:"text-xl text-gray-600",children:"Join thousands of satisfied brands who've transformed their digital presence."})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:c.map((m,h)=>e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-sm border border-gray-100",children:[e.jsx("div",{className:"flex gap-1 mb-4",children:[...Array(m.rating)].map((f,y)=>e.jsx(Zt,{className:"w-5 h-5 text-amber-400 fill-amber-400"},y))}),e.jsxs("p",{className:"text-gray-600 mb-6 leading-relaxed",children:['"',m.content,'"']}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-full flex items-center justify-center text-white font-semibold",children:m.name[0]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-gray-900",children:m.name}),e.jsx("div",{className:"text-sm text-gray-500",children:m.role})]})]})]},h))})]})}),e.jsx("section",{id:"affiliate",className:"py-20 bg-white overflow-hidden",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-20 items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-green-100 text-green-700 px-4 py-2 rounded-full text-sm font-semibold mb-6",children:[e.jsx(Jt,{className:"w-4 h-4"}),"Affiliate Program"]}),e.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold text-gray-900 mb-6",children:["Earn Money by Sharing",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-green-600 to-emerald-500",children:" Your Success"})]}),e.jsx("p",{className:"text-lg text-gray-600 mb-8 leading-relaxed",children:"Join our affiliate program and earn generous commissions for every customer you refer. Share your unique link and start building passive income while helping others grow their social presence."}),e.jsxs("div",{className:"space-y-4 mb-8",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(Cd,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Up to 30% Commission"}),e.jsx("p",{className:"text-gray-600 text-sm",children:"Earn competitive commissions on every successful referral purchase."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(cc,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Unique Referral Link"}),e.jsx("p",{className:"text-gray-600 text-sm",children:"Get your personalized tracking link to share across all platforms."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(rs,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Instant Withdrawals"}),e.jsx("p",{className:"text-gray-600 text-sm",children:"Request payouts anytime via crypto (USDT) with
1061no minimum threshold."})]})]})]}),e.jsxs("button",{onClick:t,className:"bg-gradient-to-r from-green-600 to-emerald-500 text-white px-8 py-4 rounded-xl font-semibold hover:from-green-700 hover:to-emerald-600 transition-all shadow-lg shadow-green-600/25 flex items-center gap-2",children:["Join Affiliate Program",e.jsx(Yt,{className:"w-5 h-5"})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-green-200 to-emerald-200 rounded-3xl blur-3xl opacity-30 -z-10 transform rotate-6"}),e.jsxs("div",{className:"bg-gradient-to-br from-gray-900 to-gray-800 rounded-3xl p-8 text-white",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-12 h-12 bg-green-500 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-400 text-sm",children:"Your Earnings"}),e.jsx("p",{className:"text-2xl font-bold",children:"$2,450.00"})]})]}),e.jsxs("div",{className:"space-y-4 mb-8",children:[e.jsxs("div",{className:"bg-white/10 rounded-xl p-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-blue-500 rounded-full flex items-center justify-center text-sm font-bold",children:"JD"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"John D. signed up"}),e.jsx("p",{className:"text-xs text-gray-400",children:"2 minutes ago"})]})]}),e.jsx("span",{className:"text-green-400 font-semibold",children:"+$15.00"})]}),e.jsxs("div",{className:"bg-white/10 rounded-xl p-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-pink-500 rounded-full flex items-center justify-center text-sm font-bold",children:"SM"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Sarah M. purchased"}),e.jsx("p",{className:"text-xs text-gray-400",children:"15 minutes ago"})]})]}),e.jsx("span",{className:"text-green-400 font-semibold",children:"+$45.00"})]}),e.jsxs("div",{className:"bg-white/10 rounded-xl p-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-amber-500 rounded-full flex items-center justify-center text-sm font-bold",children:"MK"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Mike K. purchased"}),e.jsx("p",{className:"text-xs text-gray-400",children:"1 hour ago"})]})]}),e.jsx("span",{className:"text-green-400 font-semibold",children:"+$28.50"})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[e.jsxs("div",{className:"bg-white/5 rounded-xl p-3",children:[e.jsx("p",{className:"text-2xl font-bold text-green-400",children:"156"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Referrals"})]}),e.jsxs("div",{className:"bg-white/5 rounded-xl p-3",children:[e.jsx("p",{className:"text-2xl font-bold text-blue-400",children:"89%"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Conversion"})]}),e.jsxs("div",{className:"bg-white/5 rounded-xl p-3",children:[e.jsx("p",{className:"text-2xl font-bold text-amber-400",children:"$15.71"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Avg. Earning"})]})]})]})]})]})})}),e.jsx("section",{id:"smm-panel",className:"py-20 bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 text-white overflow-hidden",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-20 items-center",children:[e.jsx("div",{className:"order-2 lg:order-1",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyan-500 to-blue-500 rounded-3xl blur-3xl op
1061acity-20 -z-10 transform -rotate-6"}),e.jsxs("div",{className:"bg-white rounded-3xl p-6 md:p-8 text-slate-900 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-cyan-500 to-blue-500 rounded-xl flex items-center justify-center",children:e.jsx(Os,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"font-bold text-lg",children:"SMM Panel"})]}),e.jsx("span",{className:"px-3 py-1 bg-gradient-to-r from-slate-700 to-slate-900 text-white text-xs font-semibold rounded-full",children:"PRO"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-6",children:[e.jsxs("div",{className:"bg-gradient-to-br from-cyan-50 to-blue-50 rounded-xl p-4 border border-cyan-100",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Balance"}),e.jsx("p",{className:"text-xl font-bold text-slate-900",children:"$1,250.00"})]}),e.jsxs("div",{className:"bg-gradient-to-br from-green-50 to-emerald-50 rounded-xl p-4 border border-green-100",children:[e.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Total Savings"}),e.jsx("p",{className:"text-xl font-bold text-green-600",children:"$890.50"})]})]}),e.jsxs("div",{className:"space-y-3 mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-pink-100 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-pink-600 text-xs font-bold",children:"IG"})}),e.jsx("span",{className:"text-sm font-medium",children:"Instagram Followers"})]}),e.jsx("span",{className:"text-xs font-semibold text-green-600",children:"-40%"})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-black rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white text-xs font-bold",children:"TT"})}),e.jsx("span",{className:"text-sm font-medium",children:"TikTok Views"})]}),e.jsx("span",{className:"text-xs font-semibold text-green-600",children:"-35%"})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-red-100 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-red-600 text-xs font-bold",children:"YT"})}),e.jsx("span",{className:"text-sm font-medium",children:"YouTube Subscribers"})]}),e.jsx("span",{className:"text-xs font-semibold text-green-600",children:"-45%"})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-slate-200",children:[e.jsx("span",{className:"text-sm text-slate-500",children:"1000+ Services Available"}),e.jsxs("div",{className:"flex items-center gap-1 text-cyan-600",children:[e.jsx(Or,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-semibold",children:"Instant Delivery"})]})]})]})]})}),e.jsxs("div",{className:"order-1 lg:order-2",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-cyan-500/20 text-cyan-400 px-4 py-2 rounded-full text-sm font-semibold mb-6",children:[e.jsx(sa,{className:"w-4 h-4"}),"SMM Panel for Resellers"]}),e.jsxs("h2",{className:"text-3xl sm:text-4xl font-bold mb-6",children:["Wholesale Pricing for",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-blue-400",children:" Power Users"})]}),e.jsx("p",{className:"text-lg text-slate-300 mb-8 leading-relaxed",children:"Access our exclusive SMM Panel with wholesale pricing. Perfect for agencies, resellers, and power users who need bulk services at the most competitive rates in the industry."}),e.jsxs("div",{className:"space-y-4 mb-8",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-cyan-500/20 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(us,{className:"w-6 h-6 text-cyan-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-white mb-1",children:"Up to 50% Discount"}),e.jsx("p",{className:"text-slate-400 text-sm",children:"Get massive discounts on all services based on your tier level."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-cyan-500/20 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(Dr,{className:"w-6 h-6 text-cyan-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-white mb-1",children:"API A
1061ccess"}),e.jsx("p",{className:"text-slate-400 text-sm",children:"Integrate our services directly into your platform with full API support."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-cyan-500/20 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(Nt,{className:"w-6 h-6 text-cyan-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-white mb-1",children:"Credit Line Available"}),e.jsx("p",{className:"text-slate-400 text-sm",children:"Qualified resellers can access credit limits to scale faster."})]})]})]}),e.jsxs("button",{onClick:t,className:"bg-gradient-to-r from-cyan-500 to-blue-500 text-white px-8 py-4 rounded-xl font-semibold hover:from-cyan-600 hover:to-blue-600 transition-all shadow-lg shadow-cyan-500/25 flex items-center gap-2",children:["Access SMM Panel",e.jsx(Yt,{className:"w-5 h-5"})]})]})]})})}),e.jsx("section",{id:"contact",className:"py-20 bg-white",children:e.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"bg-gradient-to-br from-blue-600 to-cyan-500 rounded-3xl p-8 sm:p-12 text-center text-white",children:[e.jsx(Ls,{className:"w-12 h-12 mx-auto mb-6 opacity-90"}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold mb-4",children:"Ready to Grow Your Brand?"}),e.jsx("p",{className:"text-blue-100 text-lg mb-8 max-w-xl mx-auto",children:"Get a free consultation and discover how we can help you achieve your social media goals."}),r?e.jsxs("div",{className:"bg-white/20 backdrop-blur-sm rounded-xl p-6",children:[e.jsx(ne,{className:"w-12 h-12 mx-auto mb-3 text-white"}),e.jsx("p",{className:"text-lg font-medium",children:"Thank you! We'll be in touch soon."})]}):e.jsxs("form",{onSubmit:n,className:"flex flex-col sm:flex-row gap-3 max-w-md mx-auto",children:[e.jsx("input",{type:"email",value:s,onChange:m=>a(m.target.value),placeholder:"Enter your email",className:"flex-1 px-5 py-4 rounded-xl text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-white/50",required:!0}),e.jsx("button",{type:"submit",className:"bg-gray-900 text-white px-8 py-4 rounded-xl font-semibold hover:bg-gray-800 transition-colors whitespace-nowrap",children:"Get Started"})]})]})})}),e.jsx("footer",{className:"bg-gray-900 text-gray-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-600 to-cyan-500 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"GrowthMedia"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"Professional social media marketing solutions for brands looking to expand their digital presence."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition-colors",children:"Growth Strategy"})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition-colors",children:"Audience Development"})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition-colors",children:"Analytics & Reporting"})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition-colors",children:"Content Optimization"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"#about",className:"hover:text-white transition-colors",children:"About Us"})}),e.jsx("li",{children:e.jsx("a",{href:"#testimonials",className:"hover:text-white transition-colors",children:"Case Studies"})}),e.jsx("li",{children:e.jsx("a",{href:"#contact",className:"hover:text-white transition-colors",children:"Contact"})}),e.jsx("li",{children:e.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Careers"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-gray-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," GrowthMedia. All rights reserved."]})})]})})]})}/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */function wf(t,s){(s==null||s>t.length)&&(s=t.length);for(var a=0,r=Array(s);a<s;a++)r[a]=t[a];return r}function i3(t){if(Array.isArray(t))return t}function o3(t,s){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var r,l,n,i,c=[],d=!0,x=!1;try{if(n=(a=a.call(t)).next,s!==0)for(;!(d=(r=n.call(a)).done)&&(c.push(r.value),c.length!==s);d=!0);}catch(m){x=!0,l=m}
vendor: 6,833 bytes, lines 1061-1062
1061finally{try{if(!d&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(x)throw l}}return c}}function c3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1062In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function d3(t,s){return i3(t)||o3(t,s)||m3(t,s)||c3()}function m3(t,s){if(t){if(typeof t=="string")return wf(t,s);var a={}.toString.call(t).slice(8,-1);return a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set"?Array.from(t):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?wf(t,s):void 0}}const Xy=Object.entries,Nf=Object.setPrototypeOf,x3=Object.isFrozen,u3=Object.getPrototypeOf,h3=Object.getOwnPropertyDescriptor;let aa=Object.freeze,ca=Object.seal,ui=Object.create,Ky=typeof Reflect<"u"&&Reflect,au=Ky.apply,ru=Ky.construct;aa||(aa=function(s){return s});ca||(ca=function(s){return s});au||(au=function(s,a){for(var r=arguments.length,l=new Array(r>2?r-2:0),n=2;n<r;n++)l[n-2]=arguments[n];return s.apply(a,l)});ru||(ru=function(s){for(var a=arguments.length,r=new Array(a>1?a-1:0),l=1;l<a;l++)r[l-1]=arguments[l];return new s(...r)});const Rn=Hs(Array.prototype.forEach),p3=Hs(Array.prototype.lastIndexOf),kf=Hs(Array.prototype.pop),bo=Hs(Array.prototype.push),f3=Hs(Array.prototype.splice),Ri=Array.isArray,To=Hs(String.prototype.toLowerCase),Lx=Hs(String.prototype.toString),_f=Hs(String.prototype.match),yo=Hs(String.prototype.replace),Sf=Hs(String.prototype.indexOf),g3=Hs(String.prototype.trim),b3=Hs(Number.prototype.toString),y3=Hs(Boolean.prototype.toString),Cf=typeof BigInt>"u"?null:Hs(BigInt.prototype.toString),If=typeof Symbol>"u"?null:Hs(Symbol.prototype.toString),Ra=Hs(Object.prototype.hasOwnProperty),jo=Hs(Object.prototype.toString),ya=Hs(RegExp.prototype.test),Hl=j3(TypeError);function Hs(t){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),l=1;l<a;l++)r[l-1]=arguments[l];return au(t,s,r)}}function j3(t){return function(){for(var s=arguments.length,a=new Array(s),r=0;r<s;r++)a[r]=arguments[r];return ru(t,a)}}function Qt(t,s){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:To;if(Nf&&Nf(t,null),!Ri(s))return t;let r=s.length;for(;r--;){let l=s[r];if(typeof l=="string"){const n=a(l);n!==l&&(x3(s)||(s[r]=n),l=n)}t[l]=!0}return t}function v3(t){for(let s=0;s<t.length;s++)Ra(t,s)||(t[s]=null);return t}function Ha(t){const s=ui(null);for(const r of Xy(t)){var a=d3(r,2);const l=a[0],n=a[1];Ra(t,l)&&(Ri(n)?s[l]=v3(n):n&&typeof n=="object"&&n.constructor===Object?s[l]=Ha(n):s[l]=n)}return s}function w3(t){switch(typeof t){case"string":return t;case"number":return b3(t);case"boolean":return y3(t);case"bigint":return Cf?Cf(t):"0";case"symbol":return If?If(t):"Symbol()";case"undefined":return jo(t);case"function":case"object":{if(t===null)return jo(t);const s=t,a=ir(s,"toString");if(typeof a=="function"){const r=a(s);return typeof r=="string"?r:jo(r)}return jo(t)}default:return jo(t)}}function ir(t,s){for(;t!==null;){const r=h3(t,s);if(r){if(r.get)return Hs(r.get);if(typeof r.value=="function")return Hs(r.value)}t=u3(t)}function a(){return null}return a}function N3(t){try{return ya(t,""),!0}catch{return!1}}const Tf=aa(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bx=aa(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ux=aa(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k3=aa(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qx=aa(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_3=aa(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Pf=aa(["#text"]),Af=aa(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
1062spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Gx=aa(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Mf=aa(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),dd=aa(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),S3=ca(/{{[\w\W]*|^[\w\W]*}}/g),C3=ca(/<%[\w\W]*|^[\w\W]*%>/g),I3=ca(/\${[\w\W]*/g),T3=ca(/^data-[\-\w.\u00B7-\uFFFF]+$/),P3=ca(/^aria-[\-\w]+$/),Ef=ca(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),A3=ca(/^(?:\w+script|data):/i),M3=ca(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),E3=ca(/^html$/i),D3=ca(/^[a-z][.\w]*(-[.\w]+)+$/i),Df=ca(/<[/\w!]/g),Rf=ca(/<[/\w]/g),R3=ca(/<\/no(script|embed|frames)/i),F3=ca(/\/>/i),Wa={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Qy=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],O3=aa(Qt({},Qy)),z3=function(){const t={};return Rn(Qy,s=>{t[s]=ca(new RegExp("</"+s+"(?=[\\t\\n\\f\\r />])","i"))}),aa(t)}(),$3=function(){return typeof window>"u"?null:window},L3=function(s,a){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let r=null;
vendor: 4,342 bytes, line 1062
1062const l="data-tt-policy-suffix";a&&a.hasAttribute(l)&&(r=a.getAttribute(l));const n="dompurify"+(r?"#"+r:"");try{return s.createPolicy(n,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Ff=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Vl=function(s,a,r,l){return Ra(s,a)&&Ri(s[a])?Qt(l.base?Ha(l.base):{},s[a],l.transform):r},Jx=function(s,a,r){const l=Ra(s,a)?s[a]:void 0;return l&&typeof l=="object"?Ha(l):r()};function Zy(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$3();const s=Ue=>Zy(Ue);if(s.version="3.4.16",s.removed=[],!t||!t.document||t.document.nodeType!==Wa.document||!t.Element)return s.isSupported=!1,s;let a=t.document;const r=a,l=r.currentScript;t.DocumentFragment;const n=t.HTMLTemplateElement,i=t.Node,c=t.Element,d=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const x=t.DOMParser,m=t.trustedTypes,h=c.prototype,f=ir(h,"cloneNode"),y=ir(h,"remove"),g=ir(h,"removeAttributeNode"),w=ir(h,"nextSibling"),N=ir(h,"childNodes"),v=ir(h,"parentNode"),j=ir(h,"shadowRoot"),b=ir(h,"attributes"),p=i&&i.prototype?ir(i.prototype,"nodeType"):null,E=i&&i.prototype?ir(i.prototype,"nodeName"):null,C=i&&i.prototype?ir(i.prototype,"ownerDocument"):null,S=function(G){return p?p(G):G.nodeType},k=function(G){return E?E(G):G.nodeName};if(typeof n=="function"){const Ue=a.createElement("template");Ue.content&&Ue.content.ownerDocument&&(a=Ue.content.ownerDocument)}let J,u="",A,T=!1,ae=0;const P=function(){if(ae>0)throw Hl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(G){P(),ae++;try{return J.createHTML(G)}finally{ae--}},I=function(G){P(),ae++;try{return J.createScriptURL(G)}finally{ae--}},Z=function(){return T||(A=L3(m,l),T=!0),A},Q=a,_=Q.implementation,M=Q.createNodeIterator,F=Q.createDocumentFragment,R=Q.getElementsByTagName,X=r.importNode;let re=Ff();s.isSupported=typeof Xy=="function"&&typeof v=="function"&&_&&_.createHTMLDocument!==void 0;const U=S3,oe=C3,ue=I3,K=T3,q=P3,je=A3,we=M3,se=D3;let Se=Ef,$=null;const ie=Qt({},[...Tf,...Bx,...Ux,...qx,...Pf]);let be=null;const Pe=Qt({},[...Af,...Gx,...Mf,...dd]);let de=Object.seal(ui(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,me=null;const ee=Object.seal(ui(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ae=!0,he=!0,D=!1,O=!0,fe=!1,W=!0,_e=!1,Re=!1,ve=null,Te=null,ze=!1,it=!1,ke=!1,Xe=!1,ce=!0,Le=!1;const Fe="user-content-";let Me=!0,ft=!1,pe={},dt=null;const ot=Qt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Mt=null;const hs=Qt({},["audio","video","img","source","image","track"]);let B=null;const V=Qt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ce="http://www.w3.org/1998/Math/MathML",Ee="http://www.w3.org/2000/svg",Oe="http://www.w3.org/1999/xhtml";let xt=Oe,Dt=!1,ts=null;const bs=Qt({},[Ce,Ee,Oe],Lx),Tt=aa(["mi","mo","mn","ms","mtext"]);let _t=Qt({},Tt);const Bt=aa(["annotation-xml"]);let Ts=Qt({},Bt);const ps=Qt({},["title","style","font","a","script"]);let Bs=null;const Xt=["application/xhtml+xml","text/html"],lr="text/html";let Kt=null,Y=null;const qe=a.createElement("form"),ct=function(G){return G instanceof RegExp||G instanceof Function},gt=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Y&&Y===G)return;(!G||typeof G!="object")&&(G={}
vendor: 12,246 bytes, line 1062
1062),G=Ha(G),Bs=Xt.indexOf(G.PARSER_MEDIA_TYPE)===-1?lr:G.PARSER_MEDIA_TYPE,Kt=Bs==="application/xhtml+xml"?Lx:To,$=Vl(G,"ALLOWED_TAGS",ie,{transform:Kt}),be=Vl(G,"ALLOWED_ATTR",Pe,{transform:Kt}),ts=Vl(G,"ALLOWED_NAMESPACES",bs,{transform:Lx}),B=Vl(G,"ADD_URI_SAFE_ATTR",V,{transform:Kt,base:V}),Mt=Vl(G,"ADD_DATA_URI_TAGS",hs,{transform:Kt,base:hs}),dt=Vl(G,"FORBID_CONTENTS",ot,{transform:Kt}),H=Vl(G,"FORBID_TAGS",Ha({}),{transform:Kt}),me=Vl(G,"FORBID_ATTR",Ha({}),{transform:Kt}),pe=Ra(G,"USE_PROFILES")?G.USE_PROFILES&&typeof G.USE_PROFILES=="object"?Ha(G.USE_PROFILES):G.USE_PROFILES:!1,Ae=G.ALLOW_ARIA_ATTR!==!1,he=G.ALLOW_DATA_ATTR!==!1,D=G.ALLOW_UNKNOWN_PROTOCOLS||!1,O=G.ALLOW_SELF_CLOSE_IN_ATTR!==!1,fe=G.SAFE_FOR_TEMPLATES||!1,W=G.SAFE_FOR_XML!==!1,_e=G.WHOLE_DOCUMENT||!1,it=G.RETURN_DOM||!1,ke=G.RETURN_DOM_FRAGMENT||!1,Xe=G.RETURN_TRUSTED_TYPE||!1,ze=G.FORCE_BODY||!1,ce=G.SANITIZE_DOM!==!1,Le=G.SANITIZE_NAMED_PROPS||!1,Me=G.KEEP_CONTENT!==!1,ft=G.IN_PLACE||!1,Se=N3(G.ALLOWED_URI_REGEXP)?G.ALLOWED_URI_REGEXP:Ef,xt=typeof G.NAMESPACE=="string"?G.NAMESPACE:Oe,_t=Jx(G,"MATHML_TEXT_INTEGRATION_POINTS",()=>Qt({},Tt)),Ts=Jx(G,"HTML_INTEGRATION_POINTS",()=>Qt({},Bt));const le=Jx(G,"CUSTOM_ELEMENT_HANDLING",()=>ui(null));if(de=ui(null),Ra(le,"tagNameCheck")&&ct(le.tagNameCheck)&&(de.tagNameCheck=le.tagNameCheck),Ra(le,"attributeNameCheck")&&ct(le.attributeNameCheck)&&(de.attributeNameCheck=le.attributeNameCheck),Ra(le,"allowCustomizedBuiltInElements")&&typeof le.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=le.allowCustomizedBuiltInElements),ca(de),fe&&(he=!1),ke&&(it=!0),pe&&($=Qt({},Pf),be=ui(null),pe.html===!0&&(Qt($,Tf),Qt(be,Af)),pe.svg===!0&&(Qt($,Bx),Qt(be,Gx),Qt(be,dd)),pe.svgFilters===!0&&(Qt($,Ux),Qt(be,Gx),Qt(be,dd)),pe.mathMl===!0&&(Qt($,qx),Qt(be,Mf),Qt(be,dd))),ee.tagCheck=null,ee.attributeCheck=null,Ra(G,"ADD_TAGS")&&(typeof G.ADD_TAGS=="function"?ee.tagCheck=G.ADD_TAGS:Ri(G.ADD_TAGS)&&($===ie&&($=Ha($)),Qt($,G.ADD_TAGS,Kt))),Ra(G,"ADD_ATTR")&&(typeof G.ADD_ATTR=="function"?ee.attributeCheck=G.ADD_ATTR:Ri(G.ADD_ATTR)&&(be===Pe&&(be=Ha(be)),Qt(be,G.ADD_ATTR,Kt))),Ra(G,"ADD_FORBID_CONTENTS")&&Ri(G.ADD_FORBID_CONTENTS)&&(dt===ot&&(dt=Ha(dt)),Qt(dt,G.ADD_FORBID_CONTENTS,Kt)),Me&&($["#text"]=!0),_e&&Qt($,["html","head","body"]),$.table&&(Qt($,["tbody"]),delete H.tbody),G.TRUSTED_TYPES_POLICY){if(typeof G.TRUSTED_TYPES_POLICY.createHTML!="function")throw Hl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof G.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Hl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Be=J;J=G.TRUSTED_TYPES_POLICY;try{u=z("")}catch(He){throw J=Be,He}}else G.TRUSTED_TYPES_POLICY===null?(J=void 0,u=""):(J===void 0&&(J=Z()),J&&typeof u=="string"&&(u=z("")));aa&&aa(G),Y=G},ds=Qt({},[...Bx,...Ux,...k3]),ys=Qt({},[...qx,..._3]),Na=function(G,le,Be){return le.namespaceURI===Oe?G==="svg":le.namespaceURI===Ce?G==="svg"&&(Be==="annotation-xml"||_t[Be]):!!ds[G]},Ma=function(G,le,Be){return le.namespaceURI===Oe?G==="math":le.namespaceURI===Ee?G==="math"&&Ts[Be]:!!ys[G]},Ll=function(G,le,Be){return le.namespaceURI===Ee&&!Ts[Be]||le.namespaceURI===Ce&&!_t[Be]?!1:!ys[G]&&(ps[G]||!ds[G])},at=function(G){let le=v(G);(!le||!le.tagName)&&(le={namespaceURI:xt,tagName:"template"});const Be=To(G.tagName),He=To(le.tagName);return ts[G.namespaceURI]?G.namespaceURI===Ee?Na(Be,le,He):G.namespaceURI===Ce?Ma(Be,le,He):G.namespaceURI===Oe?Ll(Be,le,He):!!(Bs==="application/xhtml+xml"&&ts[G.namespaceURI]):!1},Ea=function(G){bo(s.removed,{element:G});try{v(G).removeChild(G)}catch{if(y(G),!v(G))throw Hl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},zr=function(G,le,Be){try{g(G,le)}catch{try{G.removeAttribute(Be)}catch{}}},qa=function(G){fs(G);const le=N(G);if(le){const He=[];Rn(le,bt=>{bo(He,bt)}),Rn(He,bt=>{try{y(bt)}catch{}})}const Be=b(G);if(Be)for(let He=Be.length-1;He>=0;--He){const bt=Be[He],Rt=bt&&bt.name;typeof Rt=="string"&&zr(G,bt,Rt)}},At=function(G,le,Be){if(!Be)try{Be=le.getAttributeNode(G)}catch{Be=null}bo(s.removed,{attribute:Be||null,from:le});try{Be?g(le,Be):le.removeAttribute(G)}catch{try{le.removeAttribute(G)}catch{}}if(G==="is")if(it||ke)try{Ea(le)}catch{}else try{le.setAttribute(G,"")}catch{}},so=function(G){const le=b(G);if(le)for(let Be=le.length-1;Be>=0;--Be){const He=le[Be],bt=He&&He.name;typeof bt!="string"||be[Kt(bt)]||zr(G,He,bt)}},fs=function(G){const le=[G];for(;le.length>0;){const Be=le.pop();S(Be)===Wa.element&&so(Be);const He=N(Be);if(He)for(let bt=He.length-1;bt>=0;--bt)le.push(He[bt])}},Bl=function(G,le){return W?G==="patchsrc"?!0:G==="for"&&le!=="label"&&le!=="output":!1},Ul=function(G){if(!W)return;const le=[G];for(;le.length>0;){const Be=le.pop(),He=S(Be);if(He===Wa.processingInstruction||He===Wa.comment&&ya(Rf,Be.data)){try{y(Be)}catch{}continue}if(He===Wa.element){const Rt=Be,zt=Kt(k(Be));try{Rt.hasAttribute&&Rt.hasAttribute("patchsrc")&&Rt.removeAttribute("patchsrc"),Rt.hasAttribute&&Rt.hasAttribute("for")&&Bl("for",zt)&&Rt.removeAttribute("for")}catch{}}const bt=N(Be);if(bt)for(let Rt=bt.length-1;Rt>=0;--Rt)le.push(bt[Rt])}},ql=function(G){let le=null,Be=null;if(ze)G="<remove></remove>"+G;else{const Rt=_f(G,/^[\r\n\t ]+/);Be=Rt&&Rt[0]}Bs==="application/xhtml+xml"&&xt===Oe&&(G='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+G+"</body></html>");const He=J?z(G):G;if(xt===Oe)try{le=new x().parseFromString(He,Bs)}catch{}if(!le||!le.documentElement){le=_.createDocument(xt,"template",null);try{le.documentElement.innerHTML=Dt?u:He}catch{}}const bt=le.body||le.documentElement;return G&&Be&&bt.insertBefore(a.createTextNode(Be),bt.childNodes[0]||null),xt===Oe?R.call(le,_e?"html":"body")[0]:_e?le.documentElement:bt},kn=function(G){const le=C?C(G):G.ownerDocument;return M.call(le||G,G,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},$r=function(G){return G=yo(G,U," "),G=yo(G,oe," "),G=yo(G,ue," "),G},sl=function(G){var le;G.normalize();const Be=C?C(G):G.ownerDocument,He=M.call(Be||G,G,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let bt=He.nextNode();for(;bt;)bt.data=$r(bt.data),bt=He.nextNode();const Rt=(le=G.querySelectorAll)===null||le===void 0?void 0:le.call(G,"template");Rt&&Rn(Rt,zt=>{Lr(zt.content)&&sl(zt.content)})},al=function(G){const le=E?E(G):null;return typeof le!="string"||Kt(le)!=="form"?!1:typeof G.nodeName!="string"||typeof G.textContent!="string"||typeof G.removeChild!="function"||G.attributes!==b(G)||typeof G.removeAttribute!="function"||typeof G.removeAttributeNode!="function"||typeof G.getAttributeNode!="function"||typeof G.setAttribute!="function"||typeof G.namespaceURI!="string"||typeof G.insertBefore!="function"||typeof G.hasChildNodes!="function"||G.nodeType!==p(G)||G.childNodes!==N(G)},Lr=function(G){if(!p||typeof G!="object"||G===null)return!1;try{return p(G)===Wa.documentFragment}catch{return!1}},Br=function(G){if(!p||typeof G!="object"||G===null)return!1;try{return typeof p(G)=="number"}catch{return!1}};function da(Ue,G,le){Ue.length!==0&&Rn(Ue,Be=>{Be.call(s,G,le,Y)})}const rl=function(G,le){return!!(W&&G.hasChildNodes()&&!Br(G.firstElementChild)&&ya(Df,G.textContent)&&ya(Df,G.innerHTML)||W&&G.namespaceURI===Oe&&O3[le]&&(Br(G.firstElementChild)||typeof G.textContent=="string"&&ya(z3[le],G.textContent))||G.nodeType===Wa.processingInstruction||W&&G.nodeType===Wa.comment&&ya(Rf,G.data))},ms=function(G,le){if(G instanceof RegExp)return ya(G,le);if(G instanceof Function){for(var Be=arguments.length,He=new Array(Be>2?Be-2:0),bt=2;bt<Be;bt++)He[bt-2]=arguments[bt];return!!G(le,...He)}return!1},yr=function(G,le,Be){if(!H[le]&&Cn(le)&&ms(de.tagNameCheck,le))return!1;if(Me&&!dt[le]){const He=v(G),bt=N(G);if(bt&&He){const Rt=bt.length;for(let zt=Rt-1;zt>=0;--zt){const ss=G===Be?f(bt[zt],!0):bt[zt];He.insertBefore(ss,w(G))}}}return Ea(G),!0},Gl=function(G,le,Be,He){return G.length===0?le:le===Be||le===He?Ha(le):le},jr=function(G,le){return G===le||v(G)!==null?!1:(ft&&fs(G),!0)},ll=function(G,le){if(da(re.beforeSanitizeElements,G,null),jr(G,le))return!0;if(al(G))return Ea(G),!0;const Be=Kt(k(G));if($=Gl(re.uponSanitizeElement,$,ie,ve),da(re.uponSanitizeElement,G,{tagName:Be,allowedTags:$}),jr(G,le))return!0;if(rl(G,Be))return Ea(G),!0;if(H[Be]||!(ee.tagCheck instanceof Function&&ee.tagCheck(Be))&&!$[Be]){const He=yr(G,Be,le);return He===!1&&(da(re.afterSanitizeElements,G,null),jr(G,le))?!0:He}if(S(G)===Wa.element&&!at(G)||(Be==="noscript"||Be==="noembed"||Be==="noframes")&&ya(R3,G.innerHTML))return Ea(G),!0;if(fe&&G.nodeType===Wa.text){const He=$r(G.textContent);G.textContent!==He&&(bo(s.removed,{element:G.cloneNode()}),G.textContent=He)}return da(re.afterSanitizeElements,G,null),jr(G,le)},_n=function(G,le,Be){if(me[le]||Bl(le,G)||ce&&(le==="id"||le==="name")&&(Be in a||Be in qe))return!1;const He=be[le]||ee.attributeCheck instanceof Function&&ee.attributeCheck(le,G);return he&&ya(K,le)||Ae&&ya(q,le)?!0:He?B[le]||ya(Se,yo(Be,we,""))||(le==="src"||le==="xlink:href"||le==="href")&&G!=="script"&&Sf(Be,"data:")===0&&Mt[G]||D&&!ya(je,yo(Be,we,""))?!0:!Be:Cn(G)&&ms(de.tagNameCheck,G)&&ms(de.attributeNameCheck,le,G)||le==="is"&&de.allowCustomizedBuiltInElements&&ms(de.tagNameCheck,Be)},Sn=Qt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Cn=function(G){return!Sn[To(G)]&&ya(se,G)},vr=function(G,le,Be,He){if(J&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!Be)switch(m.getAttributeType(G,le)){case"TrustedHTML":return z(He);case"TrustedScriptURL":return I(He)}return He},nl=function(G,le,Be,He){try{return Be?G.setAttributeNS(Be,le,He):G.setAttribute(le,He),al(G)?(Ea(G),!1):!0}catch{return At(le,G),!1}},Ga=function(G,le){if(da(re.beforeSanitizeAttributes,G,null),jr(G,le))return;const Be=G.attributes;if(!Be||al(G))return;be=Gl(re.uponSanitizeAttribute,be,Pe,Te);const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be,forceKeepAttr:void 0};let bt=Be.length;const Rt=Kt(G.nodeName);for(;bt--;){const zt=Be[bt],ss=zt.name,ma=zt.namespaceURI,Ys=zt.value,Ja=Kt(ss),il=Ys;let Ns=ss==="value"?il:g3(il),qr=!1;if(He.attrName=Ja,He.attrValue=Ns,He.keepAttr=!0,He.forceKeepAttr=void 0,da(re.uponSanitizeAttribute,G,He),Ns=He.attrValue,Le&&(Ja==="id"||Ja==="name")&&Sf(Ns,Fe)!==0&&(At(ss,G,zt),Ns=Fe+Ns,qr=!0),W&&ya(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ns)){At(ss,G,zt);continue}if(Ja==="attributename"&&_f(Ns,"href")){At(ss,G,zt);continue}if(!He.forceKeepAttr){if(!He.keepAttr){At(ss,G,zt);continue}if(!O&&ya(F3,Ns)){At(ss,G,zt);continue}if(fe&&(Ns=$r(Ns)),!_n(Rt,Ja,Ns)){At(ss,G,zt);continue}Ns=vr(Rt,Ja,ma,Ns),Ns!==il&&nl(G,ss,ma,Ns)&&qr&&kf(s.removed)}}da(re.afterSanitizeAttributes,G,null),jr(G,le)},la=function(G){let le=null;const Be=kn(G);for(da(re.beforeSanitizeShadowDOM,G,null);le=Be.nextNode();)if(da(re.uponSanitizeShadowNode,le,null),ll(le,G),Ga(le,G),Lr(le.content)&&la(le.content),S(le)===Wa.element){const He=j(le);Lr(He)&&(Ur(He),la(He))}da(re.afterSanitizeShadowDOM,G,null)},Ur=function(G){const le=[{node:G,shadow:null}];for(;le.length>0;){const Be=le.pop();if(Be.shadow){la(Be.shadow);continue}const He=Be.node,bt=S(He)===Wa.element,Rt=N(He);if(Rt)for(let zt=Rt.length-1;zt>=0;--zt)le.push({node:Rt[zt],shadow:null});if(bt){const zt=E?E(He):null;if(typeof zt=="string"&&Kt(zt)==="template"){const ss=He.content;Lr(ss)&&le.push({node:ss,shadow:null})}}if(bt){const zt=j(He);Lr(zt)&&le.push({node:null,shadow:zt},{node:zt,shadow:null})}}};return s.sanitize=function(Ue){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=null,Be=null,He=null,bt=null;if(Dt=!Ue,Dt&&(Ue="<!-->"),typeof Ue!="string"&&!Br(Ue)&&(Ue=w3(Ue),typeof Ue!="string"))throw Hl("dirty is not a string, aborting");if(!s.isSupported)return Ue;Re?($=ve,be=Te):gt(G),(re.uponSanitizeElement.length>0||re.uponSanitizeAttribute.length>0)&&($=Ha($)),re.uponSanitizeAttribute.length>0&&(be=Ha(be)),s.removed=[];const Rt=ft&&typeof Ue!="string"&&Br(Ue);if(Rt){Ul(Ue);const ma=k(Ue);
vendor: 2,111 bytes, lines 1062-1063
1062if(typeof ma=="string"){const Ys=Kt(ma);if(!$[Ys]||H[Ys])throw qa(Ue),Hl("root node is forbidden and cannot be sanitized in-place")}if(al(Ue))throw qa(Ue),Hl("root node is clobbered and cannot be sanitized in-place");try{Ur(Ue)}catch(Ys){throw qa(Ue),Ys}}else if(Br(Ue))le=ql("<!---->"),Be=le.ownerDocument.importNode(Ue,!0),Be.nodeType===Wa.element&&Be.nodeName==="BODY"||Be.nodeName==="HTML"?le=Be:le.appendChild(Be),Ur(le);else{if(!it&&!fe&&!_e&&Ue.indexOf("<")===-1)return J&&Xe?z(Ue):Ue;if(le=ql(Ue),!le)return it?null:Xe?u:""}le&&ze&&Ea(le.firstChild);const zt=Rt?Ue:le;try{const ma=kn(zt);for(;He=ma.nextNode();)ll(He,zt),Ga(He,zt),Lr(He.content)&&la(He.content)}catch(ma){throw Rt&&(qa(Ue),Rn(s.removed,Ys=>{Ys.element&&fs(Ys.element)})),ma}if(Rt){let ma=!1;if(Rn(s.removed,Ys=>{Ys.element&&(Ys.element===Ue&&(ma=!0),fs(Ys.element))}),ma)throw Hl("a node selected for removal could not be safely returned; refusing to sanitize in place");return fe&&sl(Ue),Ue}if(it){if(fe&&sl(le),ke)for(bt=F.call(le.ownerDocument);le.firstChild;)bt.appendChild(le.firstChild);else bt=le;return(be.shadowroot||be.shadowrootmode)&&(bt=X.call(r,bt,!0)),bt}let ss=_e?le.outerHTML:le.innerHTML;return _e&&$["!doctype"]&&le.ownerDocument&&le.ownerDocument.doctype&&le.ownerDocument.doctype.name&&ya(E3,le.ownerDocument.doctype.name)&&(ss="<!DOCTYPE "+le.ownerDocument.doctype.name+`> 1063`+ss),fe&&(ss=$r(ss)),J&&Xe?z(ss):ss},s.setConfig=function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gt(Ue),Re=!0,ve=$,Te=be},s.clearConfig=function(){Y=null,Re=!1,ve=null,Te=null,J=A,u=""},s.isValidAttribute=function(Ue,G,le){Y||gt({});const Be=Kt(Ue),He=Kt(G);return _n(Be,He,le)},s.addHook=function(Ue,G){typeof G=="function"&&Ra(re,Ue)&&bo(re[Ue],G)},s.removeHook=function(Ue,G){if(Ra(re,Ue)){if(G!==void 0){const le=p3(re[Ue],G);return le===-1?void 0:f3(re[Ue],le,1)[0]}return kf(re[Ue])}},s.removeHooks=function(Ue){Ra(re,Ue)&&(re[Ue]=[])},s.removeAllHooks=function(){re=Ff()},s}var B3=Zy();function U3({onBack:t,initialSlug:s}){const[a,r]=o.useState([]),[l,n]=o.useState(null),[i,c]=o.useState(!0),[d,x]=o.use
1063State(""),[m,h]=o.useState("all"),f=["all","instagram","tiktok","business","tips"];o.useEffect(()=>{s?g(s):y()},[s]),o.useEffect(()=>{l?document.title=l.meta_title||`${l.title} | Follx Blog`:document.title="Blog - Tips & Guides to Buy Followers | Follx"},[l]);const y=async()=>{c(!0);try{let j="https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_blog_posts?limit=20";m&&m!=="all"&&(j+=`&category=${m}`);const b=await fetch(j,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(b.ok){const p=await b.json();r(p.posts||[])}}catch(j){console.error("Failed to fetch blog posts:",j)}finally{c(!1)}},g=async j=>{c(!0);try{const b=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_blog_posts?slug=${j}`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(b.ok){const p=await b.json();p.post?n(p.post):y()}}catch(b){console.error("Failed to fetch blog post:",b),y()}finally{c(!1)}},w=j=>{h(j),n(null),y()},N=j=>new Date(j).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),v=a.filter(j=>j.title.toLowerCase().includes(d.toLowerCase())||j.excerpt.toLowerCase().includes(d.toLowerCase()));return i?e.jsxs("div",{className:"min-h-screen bg-slate-50",children:[e.jsx("div",{className:"bg-white border-b border-slate-200 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:e.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 transition-colors",children:[e.jsx(xr,{className:"w-5 h-5"}),"Back to Home"]})})}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(j=>e.jsxs("div",{className:"animate-pulse bg-white rounded-2xl overflow-hidden",children:[e.jsx("div",{className:"h-48 bg-slate-200"}),e.jsxs("div",{className:"p-6 space-y-4",children:[e.jsx("div",{className:"h-6 bg-slate-200 rounded w-3/4"}),e.jsx("div",{className:"h-4 bg-slate-200 rounded"}),e.jsx("div",{className:"h-4 bg-slate-200 rounded w-2/3"})]})]},j))})})]}):l?e.jsxs("div",{className:"min-h-screen bg-slate-50",children:[e.jsx("div",{className:"bg-white border-b border-slate-200 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:e.jsxs("button",{onClick:()=>n(null),className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 transition-colors",children:[e.jsx(xr,{className:"w-5 h-5"}),"Back to Blog"]})})}),e.jsxs("article",{itemScope:!0,itemType:"https://schema.org/BlogPosting",className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm text-slate-500 mb-4",children:[e.jsx("span",{className:"bg-blue-100 text-blue-700 px-3 py-1 rounded-full font-medium capitalize",children:l.category}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-4 h-4"}),N(l.published_at)]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ct,{className:"w-4 h-4"}),l.view_count," views"]})]}),e.jsx("h1",{itemProp:"name",className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-slate-900 mb-6 leading-tight",children:l.title}),e.jsx("p",{className:"text-xl text-slate-600 leading-relaxed mb-8",children:l.excerpt}),e.jsxs("div",{className:"flex items-center gap-3 pb-8 border-b border-slate-200",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-full flex items-center justify-center text-white font-bold",children:l.author_name.charAt(0)}),e.jsxs("div",{children:[e.jsx("div",{itemProp:"author",className:"font-semibold text-slate-900",children:l.author_name}),e.jsxs("div",{className:"text-sm text-slate-500 flex items-center gap-1",children:[e.jsx(Ze,{className:"w-3 h-3"}),Math.ceil(l.content.length/1e3)," min read"]})]})]})]}),l.featured_image&&e.jsx("img",{itemProp:"image",src:l.featured_image,alt:l.title,className:"w-full h-auto rounded-2xl mb-8 shadow-lg"}),e.jsx("div",{itemProp:"articleBody",className:"prose prose-lg prose-slate max-w-none",dangerouslySetInnerHTML:{__html:B3.sanitize(l.content)}}),l.tags&&l.tags.length>0&&e.jsx("div",{className:"mt-12 pt-8 border-t border-slate-200",children:e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(bn,{className:"w-5 h-5 text-slate-400"}),l.tags.map(j=>e.jsxs("span",{className:"bg-slate-100 text-slate-600 px-3 py-1 rounded-full text-sm",children:["#",j]},j))]})}),e.jsxs("div",{className:"mt-12 p-6 bg-slate-50 rounded-xl border border-slate-200",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-3",children:"Related Comparisons"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-3",children:["Users comparing different platforms often look for detailed reviews. Our"," ",e.jsx("a",{href:"/buzzoid-vs-follx",className:"text-blue-600 hover:text-blue-700 underline",children:"Buzzoid vs Follx comparison"})," ","explains the key differences in safety, delivery speed, and follower quality."]}),e.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["For those evaluating alternatives, our"," ",e.jsx("a",{href:"/stormlikes-vs-follx",className:"text-blue-600 hover:text-blue-700 underline",children:"Stormlikes vs Follx guide"})," ","provides a clear breakdown of which service is better for USA users."]})]}),e.jsxs("div",{className:"mt-12 bg-gradient-to-br from-blue-600 to-cyan-500 rounded-2xl p-8 text-white text-center",children:[e.jsx("h3",{className:"text-2xl font-bold mb-4",children:"Ready to Grow Your Following?"}),e.jsx("p",{className:"text-blue-100 mb-6 max-w-xl mx-auto",children:"Join thousands of satisfied customers who have boosted their social media presence with our trusted services."}),e.jsx("button",{onClick:t,className:"bg-white text-blue-600 px-8 py-3 rounded-xl font-semibold hover:bg-blue-50 transition-colors",children:"Get Started Now"})]})]})]}):e.jsxs("div",{className:"min-h-screen bg-slate-50",children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-600 via-cyan-600 to-teal-600 text-white",children:[e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:e.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-white/80 hover:text-white transition-colors",children:[e.jsx(xr,{className:"w-5 h-5"}),"Back to Home"]})}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 text-center",children:[e.jsx("h1",{className:"text-4xl sm:text-5xl font-bold mb-6",children:"Blog & Guides"}),e.jsx("p",{className:"text-xl text-blue-100 max-w-2xl mx-auto mb-8",children:"Tips, guides, and insights on how to buy followers safely and grow your social media presence."}),e.jsxs("div",{className:"max-w-xl mx-auto relative",children:[e.jsx(ws,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search articles...",value:d,onChange:j=>x(j.target.value),className:"w-full pl-12 pr-4 py-4 rounded-xl text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-4 focus:ring-white/30"})]})]})]}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsx("div",{className:"flex items-center gap-2 overflow-x-auto pb-4 mb-8",children:f.map(j=>e.jsx("button",{onClick:()=>w(j),className:`px-4 py-2 rounded-lg font-medium capitalize whitespace-nowrap transition-colors ${m===j?"bg-blue-600 text-white":"bg-white text-slate-600 hover:bg-slate-100 border border-slate-200"}`,children:j==="all"?"All Posts":j},j))}),v.length===0?e.jsx("div",{className:"text-center py-16",children:e.jsx("p",{className:"text-slate-600 text-lg",children:d?"No articles found. Try a different search term.":"Check back soon for new content!"})}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:v.map(j=>e.jsxs("article",{itemScope:!0,itemType:"https://schema.org/BlogPosting",onClick:()=>{g(j.slug),window.scrollTo(0,0)},className:"bg-white rounded-2xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300 cursor-pointer group",children:[j.featured_image&&e.jsxs("div",{className:"relative h-48 overflow-hidden",children:[e.jsx("img",{itemProp:"image",src:j.featured_image,alt:j.title,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}),e.jsx("div",{className:"absolute top-4 left-4",children:e.jsx("span",{className:"bg-white/90 backdrop-blur-sm text-blue-600 px-3 py-1 rounded-full text-sm font-medium capitalize",children:j.category})})]}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-slate-500 mb-3",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-4 h-4"}),N(j.published_at)]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ct,{className:"w-4 h-4"}),j.view_count]})]}),e.jsx("h2",{itemProp:"headline",className:"text-xl font-bold text-slate-900 mb-3 group-hover:text-blue-600 transition-colors line-clamp-2",children:j.title}),e.jsx("p",{itemProp:"description",className:"text-slate-600 mb-4 line-clamp-3",children:j.excerpt}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ls,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{itemProp:"author",className:"text-sm text-slate-500",children:j.author_name})]}),e.jsxs("span",{className:"text-blue-600 font-medium text-sm flex items-center gap-1 group-hover:gap-2 transition-all",children:["Read more",e.jsx(ra,{className:"w-4 h-4"})]})]})]})]},j.id))})]})]})}function Wx(){const{t}
1063=os(),[s,a]=o.useState(null),[r,l]=o.useState(!0),n=o.useRef(null);o.useEffect(()=>{const x=async()=>{try{const h=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_live_seo_stats",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(h.ok){const f=await h.json();a(f)}}catch(h){console.error("Failed to fetch live stats:",h),a({orders_24h:247,followers_24h:125e3,total_orders:5e4,total_followers:5e7,total_users:1e5})}finally{l(!1)}};x();const m=setInterval(x,6e4);return()=>clearInterval(m)},[]);const i=x=>x>=1e6?(x/1e6).toFixed(1)+"M+":x>=1e3?(x/1e3).toFixed(0)+"K+":x.toString();if(r)return e.jsx("div",{className:"h-6 sm:h-7 bg-slate-900"});const c=[{icon:us,value:"2,847",label:t("live_stats.orders_today"),color:"text-emerald-400",bgColor:"bg-emerald-500/20"},{icon:tt,value:i(((s==null?void 0:s.followers_24h)||125e3)*10),label:t("live_stats.delivered_today"),color:"text-cyan-400",bgColor:"bg-cyan-500/20"},{icon:mt,value:"500K+",label:t("live_stats.happy_customers"),color:"text-blue-400",bgColor:"bg-blue-500/20"},{icon:Vt,value:i(((s==null?void 0:s.total_followers)||5e7)*10),label:t("live_stats.total_delivered"),color:"text-amber-400",bgColor:"bg-amber-500/20"},{icon:rt,value:"< 5min",label:t("live_stats.avg_start_time"),color:"text-rose-400",bgColor:"bg-rose-500/20"},{icon:lt,value:"100%",label:t("live_stats.secure_payments"),color:"text-green-400",bgColor:"bg-green-500/20"},{icon:Ze,value:"24/7",label:t("live_stats.support_available"),color:"text-sky-400",bgColor:"bg-sky-500/20"},{icon:Zt,value:"4.9/5",label:t("live_stats.customer_rating"),color:"text-yellow-400",bgColor:"bg-yellow-500/20"}],d=[...c,...c];return e.jsxs("div",{className:"relative bg-slate-900 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900"}),e.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(59,130,246,0.05)_1px,transparent_1px),linear-gradient(to_bottom,rgba(59,130,246,0.05)_1px,transparent_1px)] bg-[size:40px_40px]"}),e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-16 sm:w-24 bg-gradient-to-r from-slate-900 to-transparent z-10 pointer-events-none"}),e.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-16 sm:w-24 bg-gradient-to-l from-slate-900 to-transparent z-10 pointer-events-none"}),e.jsx("div",{className:"relative py-1 sm:py-1.5",children:e.jsx("div",{ref:n,className:"flex animate-scroll-x",style:{width:"fit-content"},children:d.map((x,m)=>e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 px-3 sm:px-4 whitespace-nowrap",children:[e.jsx("div",{className:`flex items-center justify-center w-4 h-4 sm:w-5 sm:h-5 rounded ${x.bgColor}`,children:e.jsx(x.icon,{className:`w-2.5 h-2.5 sm:w-3 sm:h-3 ${x.color}`})}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-1.5",children:[e.jsx("span",{className:"font-bold text-white text-[11px] sm:text-xs tabular-nums",children:x.value}),e.jsx("span",{className:"text-slate-400 text-[10px] sm:text-xs font-medium",children:x.label})]}),e.jsx("div",{className:"w-px h-3 bg-slate-700 ml-1.5 sm:ml-3"})]},m))})}),e.jsx("style",{children:` 1064 @keyframes scroll-x { 1065 0% { 1066 transform: translateX(0); 1067 } 1068 100% { 1069 transform: translateX(-50%); 1070 } 1071 } 1072 .animate-scroll-x { 1073 animation: scroll-x 40s linear infinite; 1074 } 1075 .animate-scroll-x:hover { 1076 animation-play-state: paused; 1077 } 1078 `})]})}const q3=[{qKey:"faq.q1",aKey:"faq.a1"},{qKey:"faq.q2",aKey:"faq.a2"},{qKey:"faq.q3",aKey:"faq.a3"},{qKey:"faq.q4",aKey:"faq.a4"},{qKey:"faq.q5",aKey:"faq.a5"},{qKey:"faq.q6",aKey:"faq.a6"},{qKey:"faq.q7",aKey:"faq.a7"},{qKey:"faq.q8",aKey:"faq.a8"}];function Of({limit:t=8,showTitle:s=!0}){const{t:a}=os(),[r,l]=o.useState(null),n=q3.slice(0,t).map((c,d)=>({id:String(d),question:a(c.qKey),answer:a(c.aKey)})),i={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(c=>
1078({"@type":"Question",name:c.question,acceptedAnswer:{"@type":"Answer",text:c.answer}}))};return e.jsxs("section",{id:"faq",className:"py-16 bg-slate-50",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(i).replace(/</g,"\\u003c")}}),e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[s&&e.jsxs("div",{className:"text-center mb-12",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-blue-100 text-blue-700 px-4 py-2 rounded-full text-sm font-medium mb-4",children:[e.jsx(oy,{className:"w-4 h-4"}),a("faq.badge")]}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:a("faq.title_full")}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:a("faq.desc")})]}),e.jsx("div",{className:"space-y-4",children:n.map((c,d)=>e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden shadow-sm hover:shadow-md transition-shadow",children:[e.jsxs("button",{onClick:()=>l(r===d?null:d),className:"w-full px-6 py-5 flex items-center justify-between text-left",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:c.question}),e.jsx(is,{className:`w-5 h-5 text-slate-400 transition-transform flex-shrink-0 ${r===d?"rotate-180":""}`})]}),e.jsx("div",{className:`px-6 overflow-hidden transition-all duration-300 ${r===d?"pb-5 max-h-96":"max-h-0"}`,children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:c.answer})})]},c.id))})]})]})}const G3=[{id:"1",customer_name:"Jessica Williams",customer_role_key:"testimonials.role_blogger",customer_avatar:"https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?auto=compress&cs=tinysrgb&w=150&h=150&fit=crop",content_key:"testimonials.review1",rating:5,platform:"Instagram",followers:"25K followers"},{id:"2",customer_name:"Michael Torres",customer_role_key:"testimonials.role_ecommerce",customer_avatar:"https://images.pexels.com/photos/1222271/pexels-photo-1222271.jpeg?auto=compress&cs=tinysrgb&w=150&h=150&fit=crop",content_key:"testimonials.review2",rating:5,platform:"Instagram",followers:"50K followers"},{id:"3",customer_name:"Sophia Anderson",customer_role_key:"testimonials.role_fitness",customer_avatar:"https://images.pexels.com/photos/1239291/pexels-photo-1239291.jpeg?auto=compress&cs=tinysrgb&w=150&h=150&fit=crop",content_key:"testimonials.review3",rating:5,platform:"Instagram",followers:"100K+ followers"},{id:"4",customer_name:"David Kim",customer_role_key:"testimonials.role_music",customer_avatar:"https://images.pexels.com/photos/2379004/pexels-photo-2379004.jpeg?auto=compress&cs=tinysrgb&w=150&h=150&fit=crop",content_key:"testimonials.review4",rating:5,platform:"Instagram",followers:"75K followers"},{id:"5",customer_name:"Emma Roberts",customer_role_key:"testimonials.role_travel",customer_avatar:"https://images.pexels.com/photos/1542085/pexels-photo-1542085.jpeg?auto=compress&cs=tinysrgb&w=150&h=150&fit=crop",content_key:"testimonials.review5",rating:5,platform:"Instagram",followers:"120K followers"},{id:"6",customer_name:"James Wilson",customer_role_key:"testimonials.role_marketer",customer_avatar:"https://images.pexels.com/photos/1516680/pexels-photo-1516680.jpeg?auto=compress&cs=tinysrgb&w=150&h=150&fit=crop",content_key:"testimonials.review6",rating:5,platform:"Instagram",followers:"45K followers"}];function zf({limit:t=6}){const{t:s}=os(),a=G3.slice(0,t);return e.jsx("section",{id:"reviews",className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-green-100 text-green-700 px-4 py-2 rounded-full text-sm font-medium mb-4",children:[e.jsx(ne,{className:"w-4 h-4"}),s("testimonials.badge")]}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:s("testimonials.title")}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:s("testimonials.desc")})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:a.slice(0,4).map(r=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 border border-slate-200 shadow-sm hover:shadow-xl transition-all duration-300 relative group",children:[e.jsx("div",{className:"flex gap-1 mb-4",children:[...Array(5)].map((l,n)=>e.jsx(Zt,{className:`w-5 h-5 ${n<r.rating?"text-amber-400 fill-amber-400":"text-slate-200"}`},n))}),e.jsxs("p",{className:"text-slate-600 mb-6 leading-relaxed text-sm min-h-[100px]",children:['"',s(r.content_key),'"']}),e.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-slate-100",children:[e.jsx("img",{src:r.customer_avatar,alt:r.customer_name,className:"w-12 h-12 rounded-full object-cover ring-2 ring-slate-100"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-semibold text-slate-900 truncate",children:r.customer_name}),e.jsx("div",{className:"text-xs text-slate-500 truncate",children:s(r.customer_role_key)})]}),e.jsx("div",{className:"text-right",children:e.jsx("div",{className:"text-sm font-semibold text-rose-500",children:r.followers})})]})]},r.id))})]})})}function J3(){const{t}
1078=os(),[s,a]=o.useState([]),[r,l]=o.useState(0),[n,i]=o.useState(!1),[c,d]=o.useState(!1);o.useEffect(()=>{if(sessionStorage.getItem("social_proof_dismissed")==="true"){d(!0);return}(async()=>{try{const v=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_recent_purchases?limit=20",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(v.ok){const j=await v.json();a(j.purchases||[])}}catch(v){console.error("Failed to fetch recent purchases:",v)}})()},[]),o.useEffect(()=>{if(s.length===0||c)return;const w=setTimeout(()=>{i(!0)},5e3);return()=>clearTimeout(w)},[s,c]),o.useEffect(()=>{if(!n||s.length===0)return;const w=setTimeout(()=>{i(!1),setTimeout(()=>{l(N=>(N+1)%s.length),i(!0)},2e3)},5e3);return()=>clearTimeout(w)},[n,r,s.length]);const x=()=>{i(!1),d(!0),sessionStorage.setItem("social_proof_dismissed","true")},m=w=>{const N=[2,3,5,7,8,11,13,15,17,19,22,24,27,29,31,34,36,38,41,43,45,47,49,52,54,56,58];return`${N[w%N.length]} ${t("social.min_ago")}`},h=w=>w>=1e3?(w/1e3).toFixed(w>=1e4?0:1)+"K":w.toString(),f=w=>{switch(w.toLowerCase()){case"instagram":return"from-pink-500 to-purple-600";case"tiktok":return"from-slate-800 to-slate-900";
1078case"youtube":return"from-red-500 to-red-600";case"twitter":case"x":return"from-slate-800 to-slate-900";case"facebook":return"from-blue-600 to-blue-700";case"spotify":return"from-green-500 to-green-600";case"twitch":return"from-purple-500 to-purple-600";case"telegram":return"from-sky-400 to-sky-500";case"threads":return"from-slate-800 to-slate-900";default:return"from-blue-500 to-cyan-500"}},y=w=>{const N="w-4 h-4";switch(w.toLowerCase()){case"instagram":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"})});case"tiktok":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z"})});case"youtube":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})});case"twitter":case"x":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})});case"facebook":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})});case"spotify":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})});case"twitch":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z"})});case"telegram":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"
1078currentColor",children:e.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})});case"threads":return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.96-.065-1.182.408-2.256 1.332-3.023.88-.73 2.105-1.146 3.456-1.17 1.112-.024 2.138.125 3.066.446l-.003-.204c-.043-1.063-.207-1.858-.564-2.377-.379-.55-1.003-.826-1.912-.846-1.375.02-2.312.673-2.872 1.164l-.005.004-.024.021-1.323-1.505.043-.038c.967-.845 2.47-1.76 4.222-1.76h.045c1.603.034 2.836.556 3.665 1.552.757.91 1.142 2.178 1.176 3.89v.084c.003.088.003.177.002.267 1.167.543 2.063 1.326 2.621 2.291.782 1.355.946 3.067.454 4.71-.65 2.181-2.012 3.87-4.06 5.03-1.837 1.04-4.103 1.565-6.739 1.565zm1.785-6.097c1.08-.064 1.91-.49 2.468-1.27.493-.69.774-1.632.89-2.8-1.992-.773-4.328-.623-5.476.37-.548.473-.767 1.038-.734 1.636.036.65.403 1.217 1.033 1.596.582.35 1.3.507 2.078.5l-.259-.032z"})});default:return e.jsx("svg",{className:N,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"})})}};if(c||s.length===0)return null;const g=s[r];return e.jsx("div",{className:`fixed bottom-3 left-3 z-50 transition-all duration-400 ${n?"translate-y-0 opacity-100":"translate-y-4 opacity-0 pointer-events-none"}`,children:e.jsxs("div",{className:"bg-white/95 backdrop-blur-md rounded-lg shadow-lg border border-slate-200/80 px-3 py-2 max-w-[260px] relative group",children:[e.jsx("button",{onClick:x,className:"absolute -top-1.5 -right-1.5 w-5 h-5 bg-slate-100 hover:bg-slate-200 rounded-full flex items-center justify-center text-slate-400 hover:text-slate-600 transition-colors opacity-0 group-hover:opacity-100","aria-label":"Dismiss",children:e.jsx(ht,{className:"w-3 h-3"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-8 h-8 rounded-lg bg-gradient-to-br ${f(g.platform)} flex items-center justify-center text-white flex-shrink-0`,children:y(g.platform)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-[11px] text-slate-700 leading-tight",children:[e.jsx("span",{className:"font-semibold text-slate-900",children:g.display_name})," ",t("social.just_bought")," ",e.jsx("span",{className:"font-bold text-slate-900",children:h(g.quantity)})," ",g.product]}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5 text-[10px] text-slate-400",children:[e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(Fr,{className:"w-2.5 h-2.5"}),g.location]}),e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(Ze,{className:"w-2.5 h-2.5"}),m(r)]})]})]})]}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-slate-100 rounded-b-lg overflow-hidden",children:e.jsx("div",{className:`h-full bg-gradient-to-r ${f(g.platform)} transition-all duration-[5000ms] ease-linear`,style:{width:n?"100%":"
10780%"}})})]})})}function $f({variant:t="inline",onSuccess:s}){const{t:a}=os(),[r,l]=o.useState(""),[n,i]=o.useState(!1),[c,d]=o.useState(!1),[x,m]=o.useState(null),h=async f=>{if(f.preventDefault(),!(!r||n)){i(!0),m(null);try{const g=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/subscribe_newsletter",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({email:r,source:t})})).json();g.success?(d(!0),l(""),s==null||s()):m(g.error||a("newsletter.failed"))}catch{m(a("newsletter.error"))}finally{i(!1)}}};return t==="footer"?e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-bold text-lg text-white",children:a("newsletter.stay_updated")}),e.jsx("p",{className:"text-slate-400 text-sm",children:a("newsletter.footer_desc")}),c?e.jsxs("div",{className:"flex items-center gap-2 text-green-400",children:[e.jsx(ne,{className:"w-5 h-5"}),e.jsx("span",{children:a("newsletter.thanks")})]}):e.jsxs("form",{onSubmit:h,className:"space-y-2",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"email",value:r,onChange:f=>l(f.target.value),placeholder:a("newsletter.enter_email"),className:"flex-1 px-4 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:border-blue-500",required:!0}),e.jsx("button",{type:"submit",disabled:n,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50",children:n?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(gs,{className:"w-5 h-5"})})]}),x&&e.jsx("p",{className:"text-red-400 text-sm",children:x})]})]}):e.jsxs("section",{className:"py-16 bg-gradient-to-br from-slate-900 via-blue-900 to-slate-900 relative overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 opacity-10",children:[e.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-blue-500 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-cyan-500 rounded-full blur-3xl"})]}),e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-blue-500/20 text-blue-300 px-4 py-2 rounded-full text-sm font-medium mb-4",children:[e.jsx(rs,{className:"w-4 h-4"}),a("newsletter.badge")]}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:a("newsletter.title")}),e.jsx("p",{className:"text-blue-200 text-lg max-w-xl mx-auto",children:a("newsletter.desc")})]}),c?e.jsxs("div",{className:"bg-green-500/20 border border-green-500/30 rounded-2xl p-8 text-center max-w-md mx-auto",children:[e.jsx(ne,{className:"w-16 h-16 text-green-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:a("newsletter.success_title")}),e.jsx("p",{className:"text-green-200",children:a("newsletter.success_desc")})]}):e.jsxs("form",{onSubmit:h,className:"max-w-md mx-auto",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(gs,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"email",value:r,onChange:f=>l(f.target.value),placeholder:a("newsletter.enter_email_full"),className:"w-full pl-12 pr-4 py-4 bg-white/10 backdrop-blur-sm border border-white/20 rounded-xl text-white placeholder-slate-400 focus:outline-none focus:border-blue-400 focus:ring-2 focus:ring-blue-400/20",required:!0})]}),e.jsx("button",{type:"submit",disabled:n,className:"px-8 py-4 bg-gradient-to-r from-blue-500 to-cyan-500 text-white font-semibold rounded-xl hover:from-blue-600 hover:to-cyan-600 transition-all shadow-lg shadow-blue-500/25 disabled:opacity-50 flex items-center justify-center gap-2",children:n?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsxs(e.Fragment,{children:[a("newsletter.subscribe"),e.jsx(rs,{className:"w-5 h-5"})]})})]}),x&&e.jsx("p",{className:"text-red-400 text-sm mt-3 text-center",children:x}),e.jsx("p",{className:"text-slate-400 text-xs mt-4 text-center",children:a("newsletter.privacy")})]})]})]})}const W3=({className:t})=>
1078e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-5.2 1.74 2.89 2.89 0 012.31-4.64 2.93 2.93 0 01.88.13V9.4a6.84 6.84 0 00-1-.05A6.33 6.33 0 005 20.1a6.34 6.34 0 0010.86-4.43v-7a8.16 8.16 0 004.77 1.52v-3.4a4.85 4.85 0 01-1-.1z"})}),H3=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.217-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0z"})}),V3=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})}),Y3=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M13.54 12a6.8 6.8 0 01-6.77 6.82A6.8 6.8 0 010 12a6.8 6.8 0 016.77-6.82A6.8 6.8 0 0113.54 12zM20.96 12c0 3.54-1.51 6.42-3.38 6.42-1.87 0-3.39-2.88-3.39-6.42s1.52-6.42 3.39-6.42 3.38 2.88 3.38 6.42M24 12c0 3.17-.53 5.75-1.19 5.75-.66 0-1.19-2.58-1.19-5.75s.53-5.75 1.19-5.75C23.47 6.25 24 8.83 24 12z"})}),X3=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M14.563 24c-5.093 0-7.031-3.756-7.031-6.411V9.747H5.116V6.648c3.63-1.313 4.512-4.596 4.71-6.469C9.84.05 9.941 0 10.037 0h3.887v6.091h5.089v3.656h-5.089v7.291c.015 1.042.406 2.461 2.266 2.461.639 0 1.477-.148 1.899-.396l1.277 3.357c-.403.457-2.097 1.246-4.042 1.246-.045 0-.089-.001-.134-.002z"})}),K3=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M23.977 6.416c-.105 2.338-1.739 5.543-4.894 9.609-3.268 4.247-6.026 6.37-8.29 6.37-1.409 0-2.578-1.294-3.553-3.881L5.322 11.4C4.603 8.816 3.834 7.522 3.01 7.522c-.179 0-.806.378-1.881 1.132L0 7.197c1.185-1.044 2.351-2.084 3.501-3.128C5.08 2.701 6.266 1.984 7.055 1.91c1.867-.18 3.016 1.1 3.447 3.838.465 2.953.789 4.789.971 5.507.539 2.45 1.131 3.674 1.776 3.674.502 0 1.256-.796 2.265-2.385 1.004-1.589 1.54-2.797 1.612-3.628.144-1.371-.395-2.061-1.614-2.061-.574 0-1.167.121-1.777.391 1.186-3.868 3.434-5.757 6.762-5.637 2.473.06 3.628 1.664 3.493 4.797l-.013.01z"})}),Q3=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M6.938 4.503c.702 0 1.34.06 1.92.188.577.13 1.07.33 1.485.61.41.28.733.65.96 1.12.225.47.34 1.05.34 1.73 0 .74-.17 1.36-.507 1.86-.338.5-.837.9-1.502 1.22.906.26 1.576.72 2.022 1.37.448.66.665 1.45.665 2.36 0 .75-.13 1.39-.41 1.93-.28.55-.
107867 1-1.16 1.35-.48.348-1.05.6-1.67.767-.61.165-1.252.254-1.91.254H0V4.51h6.938v-.007zM6.545 9.64c.543 0 .97-.142 1.284-.436.314-.294.465-.69.465-1.2 0-.3-.05-.554-.154-.762a1.316 1.316 0 0 0-.43-.514 1.82 1.82 0 0 0-.678-.287 3.96 3.96 0 0 0-.89-.09H3.363v3.29h3.182zm.238 5.69c.348 0 .67-.038.97-.115.3-.08.558-.2.768-.378.21-.175.377-.4.494-.676.12-.272.18-.604.18-.994 0-.768-.227-1.32-.686-1.664-.46-.34-1.07-.514-1.83-.514H3.364v4.34h3.42zm10.118-1.49c.343.36.847.55 1.51.55.477 0 .888-.118 1.238-.353.35-.234.57-.465.66-.688h2.19c-.353 1.075-.87 1.84-1.55 2.3-.68.463-1.51.69-2.49.69-.653 0-1.24-.097-1.77-.294a3.95 3.95 0 0 1-1.36-.844 3.782 3.782 0 0 1-.87-1.347c-.21-.53-.31-1.12-.31-1.77 0-.617.105-1.19.32-1.716a3.95 3.95 0 0 1 .89-1.35 4.09 4.09 0 0 1 1.37-.886c.53-.21 1.11-.314 1.74-.314.69 0 1.3.12 1.83.37.527.25.97.6 1.33 1.05.36.454.62.99.79 1.604.17.615.22 1.29.16 2.02h-6.54c.037.86.288 1.45.63 1.81v-.003zm2.64-4.19c-.27-.315-.7-.47-1.31-.47-.4 0-.73.065-1 .2-.27.13-.48.295-.65.49-.16.19-.27.4-.32.615-.05.22-.083.4-.1.55h4.04c-.09-.58-.38-1.06-.66-1.39v.004zm-2.37-4.08h5.21v1.36h-5.21V5.57z"})}),Z3=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.395-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.428 6.8.265 7.14.33-.02-2.42-.88-4.64-2.31-6.38z"})}),e6=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})}),t6=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1.175 12.225c-.051 0-.094.046-.101.1l-.233 2.154.233 2.105c.007.058.05.098.101.098.05 0 .09-.04.099-.098l.255-2.105-.27-2.154c-.009-.06-.049-.1-.084-.1zm-.899 1.02c-.051 0-.09.037-.099.085l-.183 1.148.183 1.136c.009.05.048.085.099.085.05 0 .09-.035.099-.085l.207-1.136-.207-1.148c-.009-.05-.049-.085-.099-.085zm1.86-1.058c-.061 0-.112.054-.119.114l-.194 2.268.194 2.186c.007.068.058.118.119.118.061 0 .112-.05.12-.118l.22-2.186-.22-2.268c-.008-.068-.059-.114-.12-.114zm.947-.051c-.073 0-.131.06-.139.13l-.168 2.319.168 2.218c.008.077.066.132.139.132.072 0 .13-.055.138-.132l.19-2.218-.19-2.319c-.008-.077-.066-.13-.138-.13zm.99.112c-.084 0-.152.066-.159.146l-.143 2.207.143 2.142c.007.09.075.15.159.15.083 0 .151-.06.158-.15l.162-2.142-.162-2.207c-.007-.09-.075-.146-.158-.146zm.988-.177c-.094 0-.17.075-.176.162l-.117 2.222.117 2.071c.006.097.082.167.176.167.093 0 .169-.07.176-.167l.132-2.071-.132-2.222c-.007-.097-.083-.162-.176-.162zm1.058-.236c-.104 0-.189.083-.195.18l-.091 2.278.091 2.002c.006.105.091.185.195.185s.189-.08.195-.185l.104-2.002-.104-2.278c-.006-.105-.091-.18-.195-.18zm2.985-1.725c-.057 0-.112.01-.165.028-.105.034-.185.103-.235.202-.057-.005-.108-.008-.164-.008-1.07 0-1.937.896-1.937 2.002 0 1.106.867 2.002 1.937 2.002h4.66c.904 0 1.637-.756 1.637-1.688 0-.932-.733-1.688-1.637-1.688-.266 0-.515.07-.731.193-.366-1.17-1.433-2.023-2.701-2.023-.269 0-.529.038-.779.109-.139.04-.17.08-.174.152v7.785c.004.07.057.134.126.146h4.218c1.489 0 2.698-1.247 2.698-2.784 0-1.537-1.209-2.784-2.698-2.784-.288 0-.565.049-.828.138-.471-1.447-1.802-2.493-3.381-2.493-.326 0-.643.045-.947.127-.173.047-.212.095-.217.183v9.451c.005.086.069.165.153.184h5.22c1.893 0 3.428-1.586 3.428-3.544 0-1.957-1.535-3.543-3.428-3.543-.444 0-.867.09-1.256.249-.653-2.01-2.51-3.467-4.704-3.467-.363 0-.717.04-1.059.117-.194.043-.237.109-.244.203v11.766c.008.106.08.198.183.218h6.82c2.296 0 4.159-1.921 4.159-4.291 0-2.371-1.863-4.292-4.159-4.292z"})}),s6=({className:t})=>
1078e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})}),a6=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),r6=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),l6=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z"})}),n6=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1.333 0h21.334C23.403 0 24 .597 24 1.333v21.334c0 .736-.597 1.333-1.333 1.333H1.333C.597 24 0 23.403 0 22.667V1.333C0 .597.597 0 1.333 0zM8 6v12h2.667V14L14 18h3.333l-4-6 4-6H14l-3.333 4V6H8z"})}),i6=({className:t})=>e.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.
107818zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.969-.982z"})}),Lf={Instagram:Za,TikTok:W3,YouTube:Qi,X:yl,"X (Twitter)":yl,Twitter:yl,Facebook:Vn,Pinterest:H3,Reddit:V3,Medium:Y3,Tumblr:X3,Vimeo:K3,LinkedIn:th,GitHub:iy,Behance:Q3,Dribbble:Z3,Spotify:e6,SoundCloud:t6,Telegram:s6,Discord:a6,WhatsApp:r6,Twitch:l6,Kick:n6,WeChat:i6},o6={Users:mt,Heart:ia,MessageCircle:Ls,Play:zs,Share2:Ki,Eye:Ct,Star:Zt},c6={Instagram:{gradient:"from-pink-500 to-purple-600",glow:"shadow-pink-500/25",border:"border-pink-400/60",text:"text-pink-600"},TikTok:{gradient:"from-slate-900 to-pink-600",glow:"shadow-slate-900/20",border:"border-slate-700/50",text:"text-slate-900"},YouTube:{gradient:"from-red-500 to-red-600",glow:"shadow-red-500/25",border:"border-red-400/60",text:"text-red-600"},X:{gradient:"from-slate-800 to-slate-900",glow:"shadow-slate-800/20",border:"border-slate-700/50",text:"text-slate-800"},"X (Twitter)":{gradient:"from-slate-800 to-slate-900",glow:"shadow-slate-800/20",border:"border-slate-700/50",text:"text-slate-800"},Twitter:{gradient:"from-slate-800 to-slate-900",glow:"shadow-slate-800/20",border:"border-slate-700/50",text:"text-slate-800"},Facebook:{gradient:"from-blue-500 to-blue-700",glow:"shadow-blue-500/25",border:"border-blue-400/60",text:"text-blue-600"},Telegram:{gradient:"from-sky-400 to-blue-500",glow:"shadow-sky-400/25",border:"border-sky-400/60",text:"text-sky-500"},Spotify:{gradient:"from-green-500 to-green-600",glow:"shadow-green-500/25",border:"border-green-400/60",text:"text-green-600"}},d6={gradient:"from-slate-500 to-slate-700",glow:"shadow-slate-500/20",border:"border-slate-400/50",text:"text-slate-600"};function m6({onSelectPackage:t,packagesData:s}){const{t:a,language:r}=os(),{formatInCurrency:l,formatRaw:n,detectedCountry:i}=Nn(),c=_=>{const M={Followers:a("category.followers"),Likes:a("category.likes"),Views:a("category.views"),Shares:a("category.shares"),Retweets:a("category.retweets"),Comments:a("verify.comments"),Subscribers:a("verify.subscribers"),Members:a("verify.members"),"Instant Delivery":a("home.instant_delivery"),"Real Followers":a("home.high_quality"),"No Password":a("home.no_password"),"No Password Required":a("home.no_password"),"24/7 Support":a("home.support_24_7"),"Real & High-Quality":a("storefront.real_high_quality"),"Real & High-Quality Services":a("storefront.real_high_quality_services"),"Premium Quality":a("storefront.premium_quality"),"Natural Delivery":a("storefront.natural_delivery"),"Super Fast 5min Instant Delivery":a("storefront.super_fast_delivery"),Instant:a("package.instant_start"),"Active Followers":a("storefront.active_followers"),"24/7 VIP Support":a("storefront.vip_support"),"Fast Delivery":a("package.fast_delivery"),"High Quality":a("home.high_quality"),"Today's Deals!":a("storefront.todays_deals"),"Real Active":a("package.real_active"),"Instant Start":a("package.instant_start"),"No Drop (Life Time)":a("package.no_drop_lifetime")};if(M[_])return M[_];const F=[["High-Quality",a("home.high_quality")],["Followers",a("category.followers")],["Subscribers",a("verify.subscribers")],["Members",a("verify.members")],["Comments",a("verify.comments")],["Retweets",a("category.retweets")],["Likes",a("category.likes")],["Views",a("category.views")],["Shares",a("category.shares")],["Premium",a("storefront.premium_quality")],["Mixed",a("storefront.mixed")],["VIP","VIP"],["Instant",a("package.instant_start")],["Real",a("package.real_active")]];let R=_;for(const[re,U]of F)R.includes(re)&&(R=R.split(re).join(U));const X=["Instagram","TikTok","YouTube","Twitter","Facebook","Spotify","Telegram","Discord","Twitch","Threads","LinkedIn","Pinterest","Snapchat","X"];return r!=="en"&&R===_&&/^[A-Za-z\s&\-\/]+$/.test(_)&&!X.some(re=>_.includes(re))?"":R},d=_=>{const M=_.match(/(\d+)%\s*OFF/);return M?`${M[1]}% ${a("storefront.off")}`:_},[x,m]=o.useState([]),[h,f]=o.useState({}),[y,g]=o.useState(null),[w,N]=o.useState(!0),[v,j]=o.useState(!1),[b,p]=o.use
1078State({}),[E,C]=o.useState(!1),[S,k]=o.useState(null),J=o.useRef(null),u=o.useRef({}),[A,T]=o.useState("followers");o.useEffect(()=>{const _=()=>{C(window.innerWidth<768)};return _(),window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[]);const ae=_=>{p(M=>{const F=M[_]??!0;return F||k(_),{...M,[_]:!F}})},P=o.useCallback(_=>{k(_),p(M=>({...M,[_]:!0})),requestAnimationFrame(()=>{const M=u.current[_];M&&M.scrollIntoView({behavior:"smooth",block:"start"})})},[]);o.useEffect(()=>{if(!S||!J.current)return;const _=J.current.querySelector(`[data-group-id="${S}"]`);_&&_.scrollIntoView({inline:"center",block:"nearest",behavior:"smooth"})},[S]),o.useEffect(()=>{I()},[]);const z=o.useRef(!1);o.useEffect(()=>{if(i==="TR"&&x.length>0&&!z.current){const _=x.findIndex(M=>M.name.toLowerCase().includes("instagram"));if(_>0){z.current=!0;const M=[x[_],...x.filter((F,R)=>R!==_)];m(M),k(M[0].id),p(F=>({...F,[M[0].id]:!0}))}else _===0&&(z.current=!0,k(x[0].id),p(M=>({...M,[x[0].id]:!0})))}},[i,x.length]);const I=async()=>{try{const M=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_sales_boost_featured",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}})).json();if(M.success&&M.groups&&M.groups.length>0){let F=M.groups;if(i==="TR"){const U=M.groups.findIndex(oe=>oe.name.toLowerCase().includes("instagram"));U>0&&(F=[M.groups[U],...M.groups.filter((oe,ue)=>ue!==U)])}m(F);const R={},X={},re=window.innerWidth<768;
1078if(F.forEach(U=>{var oe;(oe=U.tabs)!=null&&oe[0]&&(R[U.id]=U.tabs[0].id),X[U.id]=re?U.default_expanded_mobile??!0:U.default_expanded_desktop??!0}),i==="TR"){const U=F.find(oe=>oe.name.toLowerCase().includes("instagram"));U&&(X[U.id]=!0)}f(R),p(X),F.length>0&&k(F[0].id),j(!1)}else j(!0)}catch(_){console.error("Error fetching featured groups:",_),j(!0)}finally{N(!1)}},Z=()=>{if(s!=null&&s.Instagram){const M=A==="followers"?"Followers":A==="likes"?"Likes":"Views",F=s.Instagram[M];if(F&&F.length>0)return F.slice(0,4).map(R=>({quantity:R.quantity,price:R.price,originalPrice:R.originalPrice,priceTry:R.priceTry||null,originalPriceTry:R.originalPriceTry||null,popular:R.bestSeller||!!R.badgeText,badgeText:R.badgeText,savings:R.originalPrice?`${Math.round((1-R.price/R.originalPrice)*100)}% OFF`:void 0,serviceId:R.serviceId,service_categories:R.service_categories}))}return{followers:[{quantity:1500,price:5.49,originalPrice:10.99,popular:!1,savings:"50% OFF"},{quantity:2500,price:9.99,originalPrice:19.99,popular:!1,savings:"50% OFF"},{quantity:6500,price:19.99,originalPrice:39.99,popular:!1,savings:"50% OFF"},{quantity:12500,price:24.99,originalPrice:49.99,popular:!0,badgeText:"Today's Deals!",savings:"50% OFF"}],likes:[{quantity:100,price:1.99,originalPrice:3.99,popular:!1,savings:"50% OFF"},{quantity:500,price:6.99,originalPrice:9.99,popular:!0,savings:"30% OFF"},{quantity:1e3,price:11.99,originalPrice:16.99,popular:!1,savings:"29% OFF"},{quantity:2500,price:24.99,originalPrice:34.99,popular:!1,savings:"29% OFF"}],views:[{quantity:1e3,price:2.99,originalPrice:4.99,popular:!1,savings:"40% OFF"},{quantity:5e3,price:11.99,originalPrice:16.99,popular:!0,savings:"29% OFF"},{quantity:1e4,price:19.99,originalPrice:27.99,popular:!1,savings:"29% OFF"},{quantity:25e3,price:39.99,originalPrice:54.99,popular:!1,savings:"27% OFF"}]}[A]},Q=(_,M)=>{t(_,M)};if(w)return e.jsxs("div",{className:"bg-white/95 backdrop-blur-xl rounded-3xl shadow-2xl border border-slate-200/60 overflow-hidden animate-pulse",children:[e.jsx("div",{className:"h-24 bg-gradient-to-r from-slate-200 to-slate-300"}),e.jsxs("div",{className:"p-6",children:[e.jsx("div",{className:"h-12 bg-slate-200 rounded-xl mb-6"}),e.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[1,2,3,4].map(_=>e.jsx("div",{className:"h-48 bg-slate-100 rounded-2xl"},_))})]})]});if(v||x.length===0){const _=Z(),M=[{id:"followers",label:a("category.followers"),icon:mt},{id:"likes",label:a("category.likes"),icon:Zt},{id:"views",label:a("category.views"),icon:tt}];return e.jsxs("div",{className:"bg-white/95 backdrop-blur-xl rounded-3xl shadow-2xl border border-slate-200/60 overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-pink-500 via-rose-500 to-purple-600 px-6 py-3.5 text-white relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxjaXJjbGUgY3g9IjIwIiBjeT0iMjAiIHI9IjIiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4xKSIvPjwvZz48L3N2Zz4=')] opacity-30"}),e.jsxs("div",{className:"relative flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-white/20 p-3 rounded-xl backdrop-blur-sm",children:e.jsx(Za,{className:"w-8 h-8"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-2xl font-bold",children:a("storefront.instagram_growth")}),e.jsx("p",{className:"text-white/80 text-sm",children:a("storefront.real_high_quality_services")})]})]}),e.jsxs("div",{className:"hidden sm:flex items-center gap-2 bg-white/20 px-4 py-2 rounded-full backdrop-blur-sm",children:[e.jsx(wp,{className:"w-4 h-4 text-yellow-300"}),e.jsx("span",{className:"text-sm font-semibold",children:a("storefront.limited_time_offer")})]})]})]}),e.jsxs("div",{className:"px-6 pb-6 pt-1",children:[e.jsx("div",{className:"flex gap-1 border-b border-slate-200 mb-4",children:M.map(F=>e.jsxs("button",{onClick:()=>T(F.id),className:`flex items-center justify-center gap-1.5 py-2 px-5 text-sm font-medium transition-all duration-200 border-b-2 -mb-px ${A===F.id?"border-slate-900 text-slate-900":"border-transparent text-slate-400 hover:text-slate-600"}`,children:[e.jsx(F.icon,{className:"w-3.5 h-3.5"}),F.label]},F.id))}),e.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 md:gap-4",children:_.map((F,R)=>e.jsxs("div",{onMouseEnter:()=>g(`fallback-${R}`),onMouseLeave:()=>g(null),className:`relative rounded-2xl border-2 transition-all duration-300 overflow-hidden flex flex-col ${F.popular?"border-pink-500 bg-gradient-to-b from-pink-50 to-white shadow-lg scale-[1.02]":y===`fallback-${R}`?"border-slate-300 bg-slate-50 shadow-md":"border-slate-200 bg-white"}`,children:[F.popular&&e.jsxs("div",{className:"bg-gradient-to-r from-pink-500 to-rose-500 text-white text-[9px] md:text-xs font-bold py-1 md:py-1.5 flex items-center justify-center gap-1 md:gap-2 px-2 overflow-hidden",children:[e.jsx("span",{className:"truncate",children:F.badgeText?c(F.badgeText):a("storefront.todays_deals")}),F.savings&&e.jsx("span",{className:"bg-white/25 text-white text-[8px] md:text-[10px] font-bold px-1 md:px-1.5 py-0.5 rounded-full whitespace-nowrap flex-shrink-0",children:d(F.savings)})]}),e.jsxs("div",{className:"p-2.5 md:p-3 flex flex-col items-center justify-center flex-1",children:[!F.popular&&F.savings&&e.jsx("div",{className:"bg-green-500 text-white text-[9px] md:text-[10px] font-bold px-1.5 md:px-2 py-0.5 rounded-full mb-1 self-center",children:d(F.savings)}),e.jsxs("div",{className:"text-center mb-1",children:[e.jsx("div",{className:"text-xl md:text-2xl font-black text-slate-900 leading-tight",children:Ya(F.quantity)}),e.jsx("div",{className:"text-[10px] md:text-xs text-slate-500 capitalize",children:A==="followers"&&i==="TR"&&r==="tr"?`Türk ${c("Followers")}`:c(A.charAt(0).toUpperCase()+A.slice(1))})]}),e.jsx("div",{className:"text-center mb-1.5 md:mb-2",children:i==="TR"&&F.priceTry?e.jsxs(e.Fragment,{children:[F.originalPriceTry&&e.jsx("div",{className:"text-[10px] md:text-xs text-slate-400 line-through",children:n(F.originalPriceTry,"TRY")}),e.jsx("div",{className:`text-lg md:text-xl font-bold ${F.popular?"text-pink-600":"text-slate-900"}`,children:n(F.priceTry,"TRY")}),e.jsx("div",{className:"text-[9px] md:text-[10px] text-slate-400 line-through",children:l(F.price)})]}):e.jsxs(e.Fragment,{children:[F.originalPrice&&e.jsx("div",{className:"text-[10px] md:text-xs text-slate-400 line-through",children:l(F.originalPrice)}),e.jsx("div",{className:`text-lg md:text-xl font-bold ${F.popular?"text-pink-600":"text-slate-900"}`,children:l(F.price)})]})}),e.jsxs("button",{onClick:()=>Q(F,A==="followers"?"Followers":A==="likes"?"Likes":"Views"),className:`group w-full py-1.5 md:py-2 rounded-xl font-bold text-xs md:text-sm transition-all duration-300 flex items-center justify-center gap-1.5 md:gap-2 relative overflow-hidden mt-auto ${F.popular?"bg-gradient-to-r from-pink-500 via-rose-500 to-pink-600 text-white shadow-lg shadow-pink-500/30 hover:shadow-xl hover:shadow-
1078pink-500/40 hover:scale-[1.02]":"bg-gradient-to-r from-cyan-500 via-blue-500 to-cyan-600 text-white shadow-md shadow-cyan-500/25 hover:shadow-lg hover:shadow-cyan-500/35 hover:scale-[1.02]"}`,children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),e.jsx("span",{className:"relative",children:a("package.buy_now")}),e.jsx(Yt,{className:"w-3.5 h-3.5 md:w-4 md:h-4 relative group-hover:translate-x-1 transition-transform"})]})]})]},R))}),e.jsxs("div",{className:"flex items-center justify-center gap-2 md:gap-4 mt-4 md:mt-6 pt-4 md:pt-6 border-t border-slate-100",children:[e.jsxs("div",{className:"flex items-center gap-1 md:gap-2 text-[11px] md:text-sm text-slate-600",children:[e.jsx("div",{className:"bg-green-100 p-1 md:p-1.5 rounded-full",children:e.jsx(rt,{className:"w-3 h-3 md:w-3.5 md:h-3.5 text-green-600"})}),e.jsx("span",{children:a("trust.instant")})]}),e.jsxs("div",{className:"flex items-center gap-1 md:gap-2 text-[11px] md:text-sm text-slate-600",children:[e.jsx("div",{className:"bg-blue-100 p-1 md:p-1.5 rounded-full",children:e.jsx(lt,{className:"w-3 h-3 md:w-3.5 md:h-3.5 text-blue-600"})}),e.jsx("span",{children:a("trust.no_password")})]}),e.jsxs("div",{className:"flex items-center gap-1 md:gap-2 text-[11px] md:text-sm text-slate-600",children:[e.jsx("div",{className:"bg-amber-100 p-1 md:p-1.5 rounded-full",children:e.jsx(Ze,{className:"w-3 h-3 md:w-3.5 md:h-3.5 text-amber-600"})}),e.jsx("span",{children:"24/7"})]})]})]})]})}return e.jsxs("div",{className:"space-y-6",children:[x.length>1&&e.jsx("div",{className:"bg-white/90 backdrop-blur-xl rounded-2xl border border-slate-200/60 shadow-lg p-2 sm:p-2.5",children:e.jsx("div",{ref:J,className:"flex gap-1.5 sm:gap-2 overflow-x-auto scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:x.map(_=>{const M=Lf[_.icon]||Za,F=S===_.id,R=c6[_.icon]||d6;return e.jsxs("button",{"data-group-id":_.id,onClick:()=>P(_.id),className:`flex items-center gap-1.5 sm:gap-2 px-3 sm:px-4 py-2 sm:py-2.5 rounded-xl text-xs sm:text-sm font-semibold whitespace-nowrap transition-all duration-200 flex-shrink-0 ${F?`bg-gradient-to-r ${R.gradient} text-white shadow-lg ${R.glow} scale-[1.02]`:"bg-white border border-slate-200 text-slate-600 hover:border-slate-300 hover:bg-slate-50 hover:shadow-sm hover:-translate-y-px"}`,children:[e.jsx(M,{className:`w-4 h-4 sm:w-[18px] sm:h-[18px] flex-shrink-0 ${F?"":R.text}`}),e.jsx("span",{children:c(_.name)})]},_.id)})})}),x.map(_=>{var re;const M=Lf[_.icon]||Za,F=_.tabs.find(U=>U.id===h[_.id])||_.tabs[0],R=E?_.default_expanded_mobile:_.default_expanded_desktop,X=b[_.id]??R??!0;return e.jsxs("div",{ref:U=>{u.current[_.id]=U},className:"bg-white/95 backdrop-blur-xl rounded-3xl shadow-2xl border border-slate-200/60 overflow-hidden scroll-mt-[140px]",children:[e.jsxs("div",{className:"px-4 md:px-6 py-2.5 text-white relative overflow-hidden cursor-pointer",style:{background:`linear-gradient(135deg, ${_.gradient_from}, ${_.gradient_to})`},onClick:()=>ae(_.id),children:[e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxjaXJjbGUgY3g9IjIwIiBjeT0iMjAiIHI9IjIiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4xKSIvPjwvZz48L3N2Zz4=')] opacity-30"}),e.jsxs("div",{className:"relative flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"bg-white/20 p-2 rounded-lg backdrop-blur-sm",children:e.jsx(M,{className:"w-5 h-5 md:w-6 md:h-6"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg md:text-xl font-bold leading-tight",children:c(_.name)}),_.subtitle&&e.jsx("p",{className:"text-white/80 text-xs",children:c(_.subtitle)})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[_.badge_text&&e.jsxs("div",{className:"hidden sm:flex items-center gap-1.5 bg-white/20 px-3 py-1 rounded-full backdrop-blur-sm",children:[e.jsx(wp,{className:"w-3.5 h-3.5 text-yellow-300"}),e.jsx("span",{className:"text-xs font-semibold",children:c(_.badge_text)})]}),e.jsx("div",{className:"bg-white/20 p-1.5 rounded-full backdrop-blur-sm",children:e.jsx(is,{className:`w-4 h-4 transition-transform duration-300 ${X?"rotate-180":""}`})})]})]})]}),e.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-in-out ${X?"max-h-[2000px]":"max-h-0"}`,children:e.jsxs("div",{className:"px-6 pb-6 pt-1",children:[_.tabs.length>1&&e.jsx("div",{className:"flex gap-1 border-b border-slate-200 mb-4 overflow-x-auto scrollbar-hide",children:_.tabs.map(U=>{const oe=o6[U.icon]||mt;return e.jsxs("button",{onClick:()=>f(ue=>({...ue,[_.id]:U.id})),className:`flex items-center justify-center gap-1.5 py-2 px-3 md:px-5 text-xs md:text-sm font-medium whitespace-nowrap transition-all duration-200 border-b-2 -mb-px ${(F==null?void 0:F.id)===U.id?"border-slate-900 text-slate-900":"border-transparent text-slate-400 hover:text-slate-600"}`,children:[e.jsx(oe,{className:"w-3.5 h-3.5"}),c(U.name)]},U.id)})}),e.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 md:gap-4",children:(re=F==null?void 0:F.featured_packages)==null?void 0:re.map((U,oe)=>{const ue=U.package;if(!ue)return null;const K=U.is_highlighted,q=y===U.id,je=ue.features&&ue.features.length>0;return e.jsxs("div",{onMouseEnter:()=>g(U.id),onMouseLeave:()=>g(null),className:`relative rounded-2xl border-2 transition-all duration-300 overflow-hidden flex flex-col ${K?"border-pink-500 bg-gradient-to-b from-pink-50 to-white shadow-lg scale-[1.02]":q?"border-slate-300 bg-slate-50 shadow-md":"border-slate-200 bg-white"}`,children:[K&&e.jsxs("div",{className:"text-white text-[9px] md:text-xs font-bold py-1 md:py-1.5 flex items-center justify-center gap-1 md:gap-2 px-2 overflow-hidden",style:{background:`linear-gradient(135deg, ${_.gradient_from}, ${_.gradient_to})`},children:[e.jsx("span",{className:"truncate",children:U.custom_label?c(U.custom_label):a("storefront.todays_deals")}),e.jsxs("span",{className:"bg-white/25 text-white text-[8px] md:text-[10px] font-bold px-1 md:px-1.5 py-0.5 rounded-full whitespace-nowrap flex-shrink-0",children:[U.discount_percentage,"% ",a("storefront.off")]})]}),e.jsxs("div",{className:`p-2.5 md:p-3 flex flex-col flex-1 ${je?"":"items-center justify-center"}`,children:[!K&&e.jsxs("div",{className:"bg-green-500 text-white text-[9px] md:text-[10px] font-bold px-1.5 md:px-2 py-0.5 rounded-full mb-1 self-center",children:[U.discount_percentage,"% ",a("storefront.off")]}),e.jsxs("div",{className:"text-center mb-1",children:[e.jsx("div",{className:"text-xl md:text-2xl font-black text-slate-900 leading-tight",children:Ya(ue.quantity)}),e.jsx("div",{className:"text-[10px] md:text-xs text-slate-500",children:(()=>{var Se;const we=(F==null?void 0:F.name)||((Se=ue.category)==null?void 0:Se.name)||"",se=c(we);return we==="Followers"&&_.icon==="Instagram"&&i==="TR"&&r==="tr"?`Türk ${se}`:se})()})]}),e.jsx("div",{className:"text-center mb-1.5 md:mb-2",children:i==="TR"&&ue.price_try?e.jsxs(e.Fragment,{children:[ue.original_price_try&&e.jsx("div",{className:"text-[10px] md:text-xs text-slate-400 line-through",children:n(ue.original_price_try,"TRY")}),e.jsx("div",{className:`text-lg md:text-xl font-bold ${K?"text-pink-600":"text-slate-900"}`,children:n(ue.price_try,"TRY")}),e.jsx("div",{className:"text-[9px] md:text-[10px] text-slate-400 line-through",children:l(ue.price)})]}):e.jsxs(e.Fragment,{children:[ue.original_price&&ue.original_price>ue.price&&e.jsx("div",{className:"text-[10px] md:text-xs text-slate-400 line-through",children:l(ue.original_price)}),e.jsx("div",{className:`text-lg md:text-xl font-bold ${K?"text-pink-600":"text-slate-900"}`,children:l(ue.price)})]})}),je&&e.jsx("div",{className:"mb-1.5 md:mb-2 pt-1.5 md:pt-2 border-t border-slate-100",children:e.jsx("div",{className:"space-y-0.5 md:space-y-1",children:ue.features.slice(0,E?3:4).map((we,se)=>{const Se=c(we);return Se?e.jsxs("div",{className:`flex items-center gap-1.5 md:gap-2 px-1.5 md:px-2 py-0.5 md:py-1 rounded-md transition-all ${K?"bg-gradient-to-r from-pink-50 to-rose-50 border border-pink-100":"bg-gradient-to-r from-slate-50 to-slate-100/80 border border-slate-100"}`,children:[e.jsx("div",{className:`w-3.5 h-3.5 md:w-4 md:h-4 roun
1078ded-full flex items-center justify-center flex-shrink-0 shadow-sm ${K?"bg-gradient-to-br from-pink-500 to-rose-500 text-white":"bg-gradient-to-br from-emerald-500 to-teal-500 text-white"}`,children:e.jsx("svg",{className:"w-2 h-2 md:w-2.5 md:h-2.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),e.jsx("span",{className:`text-[9px] md:text-[11px] font-medium leading-tight ${K?"text-pink-700":"text-slate-700"}`,children:Se})]},se):null})})}),e.jsxs("button",{onClick:()=>{var we,se,Se,$;return Q({quantity:ue.quantity,price:ue.price,originalPrice:ue.original_price,popular:K,badgeText:U.custom_label||void 0,savings:`${U.discount_percentage}% OFF`,serviceId:ue.provider_service_id,platformName:_.name||((se=(we=ue.category)==null?void 0:we.platform)==null?void 0:se.name),categoryName:(Se=ue.category)==null?void 0:Se.name,service_categories:ue.category?{id:ue.category.id,name:ue.category.name,slug:ue.category.slug,input_type:ue.category.input_type,input_label:ue.category.input_label,input_placeholder:ue.category.input_placeholder,requires_post_verification:ue.category.requires_post_verification,requires_profile_verification:ue.category.requires_profile_verification,video_only:ue.category.video_only}:void 0},(($=ue.category)==null?void 0:$.name)||(F==null?void 0:F.name)||"Service")},className:`group w-full py-1.5 md:py-2 rounded-xl font-bold text-xs md:text-sm transition-all duration-300 flex items-center justify-center gap-1.5 md:gap-2 relative overflow-hidden mt-auto ${K?"text-white shadow-lg hover:shadow-xl hover:scale-[1.02]":"bg-gradient-to-r from-cyan-500 via-blue-500 to-cyan-600 text-white shadow-md shadow-cyan-500/25 hover:shadow-lg hover:shadow-cyan-500/35 hover:scale-[1.02]"}`,style:K?{background:`linear-gradient(135deg, ${_.gradient_from}, ${_.gradient_to})`,boxShadow:`0 10px 25px -5px ${_.gradient_from}40`}:void 0,children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/20 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),e.jsx("span",{className:"relative",children:a("package.buy_now")}),e.jsx(Yt,{className:"w-3.5 h-3.5 md:w-4 md:h-4 relative group-hover:translate-x-1 transition-transform"})]})]})]},U.id)})}),e.jsxs("div",{className:"flex items-center justify-center gap-2 md:gap-4 mt-4 md:mt-6 pt-4 md:pt-6 border-t border-slate-100",children:[e.jsxs("div",{className:"flex items-center gap-1 md:gap-2 text-[11px] md:text-sm text-slate-600",children:[e.jsx("div",{className:"bg-green-100 p-1 md:p-1.5 rounded-full",children:e.jsx(rt,{className:"w-3 h-3 md:w-3.5 md:h-3.5 text-green-600"})}),e.jsx("span",{children:a("trust.instant")})]}),e.jsxs("div",{className:"flex items-center gap-1 md:gap-2 text-[11px] md:text-sm text-slate-600",children:[e.jsx("div",{className:"bg-blue-100 p-1 md:p-1.5 rounded-full",children:e.jsx(lt,{className:"w-3 h-3 md:w-3.5 md:h-3.5 text-blue-600"})}),e.jsx("span",{children:a("trust.no_password")})]}),e.jsxs("div",{className:"flex items-center gap-1 md:gap-2 text-[11px] md:text-sm text-slate-600",children:[e.jsx("div",{className:"bg-amber-100 p-1 md:p-1.5 rounded-full",children:e.jsx(Ze,{className:"w-3 h-3 md:w-3.5 md:h-3.5 text-amber-600"})}),e.jsx("span",{children:"24/7"})]})]})]})})]},_.id)})]})}function x6(){const{t}=os();return e.jsx("div",{className:"fixed bottom-20 left-4 z-40 hidden lg:block",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl border border-slate-200 p-4 space-y-3 max-w-[180px]",children:[e.jsx("div",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:t("trust.why_choose_us")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-green-100 p-1.5 rounded-lg",children:e.jsx(ne,{className:"w-4 h-4 text-green-600"})}),e.jsx("span",{className:"text-xs text-slate-600",children:t("trust.happy_customers")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-amber-100 p-1.5 rounded-lg",children:e.jsx(Zt,{className:"w-4 h-4 text-amber-500 fill-amber-500"})}),e.jsx("span",{className:"text-xs text-slate-600",children:t("trust.rating")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-blue-100 p-1.5 rounded-lg",children:e.jsx(mt,{className:"w-4 h-4 text-blue-600"})}),e.jsx("span",{className:"text-xs text-slate-600",children:t("trust.real_active_users")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-purple-100 p-1.5 rounded-lg",children:e.jsx(rt,{className:"w-4 h-4 text-purple-600"})}),e.jsx("span",{className:"text-xs text-slate-600",children:t("trust.live_support")})]}),e.jsxs("div",{className:"pt-2 border-t border-slate-100",children:[e.jsx("div",{className:"flex items-center justify-center gap-1",children:[...Array(5)].map((s,a)=>e.jsx(Zt,{className:"w-3.5 h-3.5 text-amber-400 fill-amber-400"},a))}),e.jsx("div",{className:"text-[10px] text-slate-500 text-center mt-1",children:t("trust.based_on_reviews")})]})]})})}function u6(){var be,Pe,de,H,me;const{t,language:s}=os(),{loading:a,user:r}
1078=br(),[l,n]=o.useState(null),[i,c]=o.useState([]),[d,x]=o.useState([]),[m,h]=o.useState([]),[f,y]=o.useState(!0),[g,w]=o.useState(!1),[N,v]=o.useState("overview"),[j,b]=o.useState(!1),[p,E]=o.useState(""),[C,S]=o.useState(!1),[k,J]=o.useState("30"),[u,A]=o.useState(!1),[T,ae]=o.useState(!1),[P,z]=o.useState(""),[I,Z]=o.useState(""),[Q,_]=o.useState(!1),[M,F]=o.useState(!1),[R,X]=o.useState({defaultCommissionRate:10,defaultCookieDays:30,minPayout:5});o.useEffect(()=>{!a&&r?re():!a&&!r&&y(!1)},[a,r]);const re=async()=>{try{const{data:{user:ee}}=await Ye.auth.getUser();if(!ee)return;const[Ae,he]=await Promise.all([Ye.from("affiliates").select(` 1079 *, 1080 tier:affiliate_tiers(*) 1081 `).eq("user_id",ee.id).maybeSingle(),Ye.from("environment_settings").select("key, value").in("key",["affiliate_default_commission_rate","affiliate_default_cookie_days","affiliate_min_payout"])]);if(he.data){const O={};he.data.forEach(fe=>{O[fe.key]=fe.value}),X({defaultCommissionRate:parseInt(O.affiliate_default_commission_rate||"10"),defaultCookieDays:parseInt(O.affiliate_default_cookie_days||"30"),minPayout:parseInt(O.affiliate_min_payout||"5")})}let D=Ae.data;if(!D){const{data:{session:O}}=await Ye.auth.getSession();if(O!=null&&O.access_token&&(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/affiliate_register",{method:"POST",headers:{Authorization:`Bearer ${O.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({payout_method:"crypto",payout_details:{}})})).ok){const{data:W}=await Ye.from("affiliates").select(` 1082 *, 1083 tier:affiliate_tiers(*) 1084 `).eq("user_id",ee.id).maybeSingle();D=W}}D&&(n(D),Z(D.usdt_wallet_address||""),oe(D.id),ue(D.id),K(D.id))}catch(ee){console.error("Error loading affiliate data:",ee)}finally{y(!1)}},U=async()=>{if(l){_(!0),F(!1);try{const{error:ee}=await Ye.from("affiliates").update({usdt_wallet_address:I||null}).eq("id",l.id);ee||(n({...l,usdt_wallet_address:I||null}),F(!0),setTimeout(()=>F(!1),3e3))}catch(ee){console.error("Error saving wallet address:",ee)}finally{_(!1)}}},oe=async ee=>{const{data:Ae}=await Ye.from("referral_conversions").select("*").eq("affiliate_id",ee).order("created_at",{ascending:!1}).limit(50);Ae&&c(Ae)},ue=async ee=>{const{data:Ae}=await Ye.from("affiliate_payouts").select("*").eq("affiliate_id",ee).order("created_at",{ascending:!1});Ae&&x(Ae)},K=async ee=>{const Ae=parseInt(k),he=new Date;he.setDate(he.getDate()-Ae);const{data:D}=await Ye.from("referral_clicks").select("created_at, converted").eq("affiliate_id",ee).gte("created_at",he.toISOString());if(D){const O={};D.forEach(W=>{const _e=new Date(W.created_at).toISOString().split("T")[0];O[_e]||(O[_e]={clicks:0,conversions:0}),O[_e].clicks++,W.converted&&O[_e].conversions++});const fe=Object.entries(O).map(([W,_e])=>({date:W,..._e})).sort((W,_e)=>W.date.localeCompare(_e.date));h(fe)}},q=async()=>{if(!(!T||!P)){A(!0);try{const{data:{session:ee}}=await Ye.auth.getSession();if(!(ee!=null&&ee.access_token)){console.error("No session found");return}const Ae=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/affiliate_register",{method:"POST",headers:{Authorization:`Bearer ${ee.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({payout_method:"crypto",payout_details:{wallet_address:P,network:"TRC20"}})});if(Ae.ok)re();else{const he=await Ae.json().catch(()=>({}));console.error("Registration failed:",he)}}catch(ee){console.error("Error registering:",ee)}finally{A(!1)}}},je=()=>{if(!l)return;const ee=`https://follx.com/?ref=${l.custom_slug||l.affiliate_code}`;navigator.clipboard.writeText(ee),w(!0),setTimeout(()=>w(!1),2e3)},we=async()=>{if(!l||!p)return;const ee=parseFloat(p);if(!(ee<l.min_payout_threshold)&&!(ee>l.pending_commission)){S(!0);try{const{error:Ae}=await Ye.from("affiliate_payouts").insert({affiliate_id:l.id,amount:ee,payout_method:l.payout_method,payout_details:l.payout_details});Ae||(b(!1),E(""),ue(l.id),re())}catch(Ae){console.error("Error requesting payout:",Ae)}finally{S(!1)}}},se=ee=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(ee),Se=ee=>{const Ae=s==="en"?"en-US":s==="de"?"de-DE":s==="fr"?"fr-FR":s==="es"?"es-ES":s==="it"?"it-IT":s==="pt"?"pt-PT":s==="ru"?"ru-RU":s==="ar"?"ar-SA":"en-US";return new Date(ee).toLocaleDateString(Ae,{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})},$=ee=>({pending:"bg-amber-100 text-amber-700",approved:"bg-blue-100 text-blue-700",paid:"bg-green-100 text-green-700",rejected:"bg-red-100 text-red-700",processing:"bg-purple-100 text-purple-700",completed:"bg-green-100 text-green-700"})[ee]||"bg-slate-100 text-slate-700",ie=l&&l.total_clicks>0?(l.total_conversions/l.total_clicks*100).toFixed(2):"0.00";return f||a?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx(Ne,{className:"w-8 h-8 animate-spin text-blue-600"})}):l?l.status==="pending"?e.jsx("div",{className:"max-w-2xl mx-auto",children:e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-2xl p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-amber-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(Ze,{className:"w-8 h-8 text-amber-600"})}),e.jsx("h2",{className:"text-xl font-bold text-slate-900 mb-2",children:t("affiliate.application_review")}),e.jsx("p",{className:"text-slate-600 mb-4",children:t("affiliate.application_review_desc")}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-amber-100 text-amber-700 rounded-lg text-sm font-medium",children:[e.jsx(Ze,{className:"w-4 h-4"}),t("affiliate.awaiting_approval")]})]})}):l.status==="suspended"||l.status==="rejected"?e.jsx("div",{className:"max-w-2xl mx-auto",children:e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-2xl p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(st,{className:"w-8 h-8 text-red-600"})}),e.jsx("h2",{className:"text-xl font-bold text-slate-900 mb-2",children:l.status==="suspended"?t("affiliate.account_suspended"):t("affiliate.application_rejected")}),e.jsx("p",{className:"text-slate-600",children:t("affiliate.contact_support")})]})}):e.jsxs("div",{className:"space-y-6 pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:t("affiliate.panel_title")}),e.jsx("p",{className:"text-slate-600",children:t("affiliate.panel_subtitle")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[l.tier&&e.jsxs("span",{className:"px-3 py-1.5 bg-gradient-to-r from-amber-500 to-orange-500 text-white text-sm font-semibold rounded-lg flex items-center gap-1.5",children:[e.jsx(qs,{className:"w-4 h-4"}),l.tier.name]}),e.jsx("button",{onClick:re,className:"p-2 text-slate-600 hover:text-slate-900 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(Ve,{className:"w-5 h-5"})})]})]}),e.jsxs("div",{className:"bg-gradient-to-r from-blue-600 to-cyan-600 rounded-2xl p-6 text-white",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-lg flex items-center justify-center",children:e.jsx(cc,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-blue-100",children:t("affiliate.referral_link")}),e.jsxs("p",{className:"font-mono text-lg",children:["follx.com/?ref=",l.custom_slug||l.affiliate_code]})]})]}),e.jsxs("button",{onClick:je,className:"flex items-center gap-2 px-4 py-2 bg-white/20 hover:bg-white/30 rounded-lg transition-colors",children:[g?e.jsx(Lt,{className:"w-5 h-5"}):e.jsx(Ht,{className:"w-5 h-5"}),t(g?"affiliate.copied":"affiliate.copy")]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-blue-100",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(sr,{className:"w-4 h-4"}),"%",((be=l.tier)==null?void 0:be.commission_rate)||R.defaultCommissionRate," ",t("affiliate.commission")]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-4 h-4"}),((Pe=l.tier)==null?void 0:Pe.cookie_days)||R.defaultCookieDays," ",t("affiliate.cookie_duration")]}),((de=l.tier)==null?void 0:de.lifetime_attribution)&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(rt,{className:"w-4 h-4"}),t("affiliate.lifetime_attribution")]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center",children:e.jsx(my,{
1084className:"w-5 h-5 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:t("affiliate.total_clicks")}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:l.total_clicks.toLocaleString()})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:t("affiliate.signups")}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:l.total_signups.toLocaleString()})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-10 h-10 bg-purple-100 rounded-lg flex items-center justify-center",children:e.jsx(Ws,{className:"w-5 h-5 text-purple-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:t("affiliate.conversions")}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:l.total_conversions.toLocaleString()})]})]})}),e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 p-4",children:e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-10 h-10 bg-cyan-100 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-cyan-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:t("affiliate.conversion_rate")}),e.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:["%",ie]})]})]})})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center justify-between mb-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 bg-amber-100 rounded-lg flex items-center justify-center",children:e.jsx(Ze,{className:"w-4 h-4 text-amber-600"})}),e.jsx("span",{className:"text-sm text-slate-600",children:t("affiliate.pending")})]})}),e.jsx("p",{className:"text-3xl font-bold text-slate-900",children:se(l.pending_commission)})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-5",children:[e.jsx("div",{className:"flex items-center justify-between mb-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 bg-green-100 rounded-lg flex items-center justify-center",children:e.jsx(ne,{className:"w-4 h-4 text-green-600"})}),e.jsx("span",{className:"text-sm text-slate-600",children:t("affiliate.paid")})]})}),e.jsx("p",{className:"text-3xl font-bold text-slate-900",children:se(l.paid_commission)})]}),e.jsxs("div",{className:"bg-gradient-to-br from-green-500 to-emerald-600 rounded-xl p-5 text-white",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 bg-white/20 rounded-lg flex items-center justify-center",children:e.jsx(kt,{className:"w-4 h-4"})}),e.jsx("span",{className:"text-sm text-green-100",children:t("affiliate.withdrawable")})]}),e.jsx("button",{onClick:()=>b(!0),disabled:l.pending_commission<l.min_payout_threshold,className:"px-3 py-1.5 bg-white/20 hover:bg-white/30 rounded-lg text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:t("affiliate.withdraw")})]}),e.jsx("p",{className:"text-3xl font-bold",children:se(l.pending_commission)}),e.jsxs("p",{className:"text-sm text-green-100 mt-1",children:[t("affiliate.minimum")," ",se(l.min_payout_threshold)]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:[e.jsx("div",{className:"border-b border-slate-200",children:e.jsx("div",{className:"flex",children:["overview","conversions","payouts","settings"].map(ee=>e.jsxs("button",{onClick:()=>v(ee),className:`px-6 py-4 text-sm font-medium transition-colors ${N===ee?"text-blue-600 border-b-2 border-blue-600 bg-blue-50/50":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,children:[ee==="overview"&&t("affiliate.overview"),ee==="conversions"&&t("affiliate.conversions_tab"),ee==="payouts"&&t("affiliate.payouts"),ee==="settings"&&t("affiliate.settings")]},ee))})}),e.jsxs("div",{className:"p-6",children:[N==="overview"&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:t("affiliate.performance_chart")}),e.jsxs("select",{value:k,onChange:ee=>{J(ee.target.value),l&&K(l.id)},className:"px-3 py-2 border border-slate-300 rounded-lg text-sm",children:[e.jsx("option",{value:"7",children:t("affiliate.last_7_days")}),e.jsx("option",{value:"30",children:t("affiliate.last_30_days")}),e.jsx("option",{value:"90",children:t("affiliate.last_90_days")})]})]}),m.length>0?e.jsx("div",{className:"h-64 flex items-end gap-1",children:m.slice(-30).map((ee,Ae)=>{const he=Math.max(...m.map(O=>O.clicks),1),D=ee.clicks/he*100;return e.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1",children:[e.jsx("div",{className:"w-full flex flex-col justify-end h-48",children:e.jsx("div",{className:"w-full bg-gradient-to-t from-blue-500 to-cyan-400 rounded-t transition-all",style:{height:`${D}%`,minHeight:ee.clicks>0?"4px":"0"}})}),Ae%5===0&&e.jsx("span",{className:"text-[10px] text-slate-400",children:new Date(ee.date).getDate()})]},Ae)})}):e.jsx("div",{className:"h-64 flex items-center justify-center text-slate-400",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Ia,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:t("affiliate.no_data")})]})}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("h4",{className:"font-medium text-slate-900 mb-3",children:t("affiliate.quick_stats")}
1084),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-slate-600",children:t("affiliate.total_revenue_generated")}),e.jsx("span",{className:"font-semibold text-slate-900",children:se(l.total_revenue)})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-slate-600",children:t("affiliate.average_order")}),e.jsx("span",{className:"font-semibold text-slate-900",children:l.total_conversions>0?se(l.total_revenue/l.total_conversions):"-"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-slate-600",children:t("affiliate.commission_rate_label")}),e.jsxs("span",{className:"font-semibold text-slate-900",children:["%",((H=l.tier)==null?void 0:H.commission_rate)||R.defaultCommissionRate]})]})]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("h4",{className:"font-medium text-slate-900 mb-3",children:t("affiliate.next_level")}),(me=l.tier)!=null&&me.priority&&l.tier.priority<4?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-slate-600",children:t("affiliate.current_level")}),e.jsx("span",{className:"font-semibold text-slate-900",children:l.tier.name})]}),e.jsx("div",{className:"w-full bg-slate-200 rounded-full h-2",children:e.jsx("div",{className:"bg-gradient-to-r from-blue-500 to-cyan-500 h-2 rounded-full transition-all",style:{width:`${Math.min(l.total_conversions/50*100,100)}%`}})}),e.jsxs("p",{className:"text-xs text-slate-500",children:[Math.max(50-l.total_conversions,0)," ",t("affiliate.conversions_needed")]})]}):e.jsxs("div",{className:"text-center py-4",children:[e.jsx(qs,{className:"w-8 h-8 text-amber-500 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-slate-600",children:t("affiliate.highest_level")})]})]})]})]}),N==="conversions"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:t("affiliate.conversion_history")}),e.jsxs("button",{className:"flex items-center gap-2 px-3 py-2 text-sm text-slate-600 hover:text-slate-900 hover:bg-slate-100 rounded-lg transition-colors",children:[e.jsx(_l,{className:"w-4 h-4"}),t("affiliate.download")]})]}),i.length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.date")}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.type")}),e.jsx("th",{className:"text-right text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.order_amount")}),e.jsx("th",{className:"text-right text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.commission_amount")}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.status")})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:i.map(ee=>e.jsxs("tr",{className:"hover:bg-slate-50",children:[e.jsx("td",{className:"px-4 py-3 text-sm text-slate-600",children:Se(ee.created_at)}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${ee.conversion_type==="purchase"?"bg-green-100 text-green-700":"bg-blue-100 text-blue-700"}`,children:ee.conversion_type==="purchase"?t("affiliate.purchase"):t("affiliate.signup")})}),e.jsx("td",{className:"px-4 py-3 text-sm text-right font-medium text-slate-900",children:se(ee.order_amount)}),e.jsxs("td",{className:"px-4 py-3 text-sm text-right font-medium text-green-600",children:["+",se(ee.commission_amount)]}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${$(ee.status)}`,children:[ee.status==="pending"&&t("affiliate.status_pending"),ee.status==="approved"&&t("affiliate.status_approved"),ee.status==="paid"&&t("affiliate.status_paid"),ee.status==="rejected"&&t("affiliate.status_rejected")]})})]},ee.id))})]})}):e.jsxs("div",{className:"text-center py-12 text-slate-400",children:[e.jsx(Ws,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),e.jsx("p",{children:t("affiliate.no_conversions")}),e.jsx("p",{className:"text-sm mt-1",children:t("affiliate.no_conversions_desc")})]})]}),N==="payouts"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:t("affiliate.payout_history")})}),d.length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.date")}),e.jsx("th",{className:"text-right text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.amount")}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.method")}),e.jsx("th",{className:"text-left text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.transaction_id")}),e.jsx("th",{className:"text-center text-xs font-semibold text-slate-500 uppercase tracking-wider px-4 py-3",children:t("affiliate.status")})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:d.map(ee=>e.jsxs("tr",{className:"hover:bg-slate-50",children:[e.jsx("td",{className:"px-4 py-3 text-sm text-slate-600",children:Se(ee.created_at)}),e.jsx("td",{className:"px-4 py-3 text-sm text-right font-semibold text-slate-900",children:se(ee.amount)}),e.jsx("td",{className:"px-4 py-3 text-sm text-slate-600",children:ee.payout_method==="crypto"?t("affiliate.crypto_trc20"):t("affiliate.bank_transfer")}),e.jsx("td",{className:"px-4 py-3 text-sm font-mono text-slate-500",children:ee.transaction_id||"-"}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${$(ee.status)}`,children:[ee.status==="pending"&&t("affiliate.status_pending"),ee.status==="processing"&&t("affiliate.status_processing"),ee.status==="completed"&&t("affiliate.status_completed"),ee.status==="rejected"&&t("affiliate.status_rejected")]})})]},ee.id))})]})}):e.jsxs("div",{className:"text-center py-12 text-slate-400",children:[e.jsx(kt,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),e.jsx("p",{children:t("affiliate.no_payouts")})]})]}),N==="settings"&&e.jsxs("div",{className:"space-y-6 max-w-xl",children:[e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-4",children:t("affiliate.withdraw_settings")}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:"USDT Wallet Address (TRC20)"}),e.jsx("input",{type:"text",value:I,onChange:ee=>Z(ee.target.value),placeholder:"T...",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 font-mono text-sm"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:t("affiliate.trc20_network_hint")})]}),e.jsx("button",{onClick:U,disabled:Q,className:"w-full py-3 bg-gradient-to-r from-blue-600 to-cyan-600 text-white font-semibold rounded-xl hover:from-blue-700 hover:to-cyan-700 transition-all disabled:opacity-50 flex items-center justify-center gap-2",children:Q?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):M?e.jsxs(e.Fragment,{children:[e.jsx(Lt,{className:"w-5 h-5"}),t("affiliate.saved")]}):e.jsxs(e.Fragment,{children:[e.jsx(kt,{className:"w-5 h-5"}),t("affiliate.save_wallet")]})})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:t("affiliate.affiliate_code")}),e.jsx("input",{type:"text",value:l.affiliate_code,className:"w-full px-4 py-3 border border-slate-300 rounded-xl bg-slate-50 font-mono",disabled:!0})]}),e.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4",children:[e.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:t("affiliate.important_info")}),e.jsxs("ul",{className:"text-sm text-blue-700 space-y-1",children:[e.jsxs("li",{children:["- ",t("affiliate.min_payout_info")," ",se(l.min_payout_threshold)]}),e.jsxs("li",{children:["- ",t("affiliate.commission_active_info")]}),e.jsxs("li",{children:["- ",t("affiliate.payout_schedule")]}),e.jsxs("li",{children:["- ",t("affiliate.self_referral_forbidden")]})]})]})]})]})]}),j&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl max-w-md w-full p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:t("affiliate.payout_request")}),e.jsx("button",{onClick:()=>b(!1),className:"text-slate-400 hover:text-slate-600",children:e.jsx(ht,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-2",children:t("affiliate.withdraw_amount")}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400",children:"$"}),e.jsx("input",{type:"number",value:p,onChange:ee=>E(ee.target.value),placeholder:"0.00",min:l.min_payout_threshold,max:l.pending_commission,className:"w-full pl-8 pr-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500"})]}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[t("affiliate.withdrawable_amount")," ",se(l.pending_commission)," |",t("affiliate.minimum")," ",se(l.min_payout_threshold)]})]}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm text-slate-600 mb-1",children:t("affiliate.payout_address")}),e.jsx("p",{className:"font-mono text-sm text-slate-900 break-all",children:l.usdt_wallet_address||"-"}),!l.usdt_wallet_address&&e.jsx("p",{className:"text-xs text-amber-600 mt-2",children:t("affiliate.add_wallet_first")})]}),e.jsx("button",{onClick:we,disabled:C||!p||!l.usdt_wallet_address||parseFloat(p)<l.min_payout_threshold||parseFloat(p)>l.pending_commission,className:"w-full py-3 bg-gradient-to-r from-green-500 to-emerald-600 text-white font-semibold rounded-xl hover:from-green-600 hover:to-emerald-700 transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:C?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(As,{className:"w-5 h-5"}),t("affiliate.request_payout")]})})]})]})})]}):e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-600 to-cyan-600 rounded-2xl p-8 text-white mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(mt,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold",children:t("affiliate.title")}),e.jsx("p",{className:"text-blue-100",children:t("affiliate.subtitle")})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-white/10 rounded-xl p-4 text-center",children:[e.jsx("p",{className:"text-3xl font-bold",children:"%10-20"}),e.jsx("p",{className:"text-sm text-blue-100",children:t("affiliate.commission_rate")})]}),e.jsxs("div",{className:"bg-white/10 rounded-xl p-4 text-center",children:[e.jsx("p",{className:"text-3xl font-bold",children:"30+"}),e.jsx("p",{className:"text-sm text-blue-100",children:t("affiliate.cookie_days")})]}),e.jsxs("div",{className:"bg-white/10 rounded-xl p-4 text-center",children:[e.jsx("p",{className:"text-3xl font-bold",children:"$50"}),e.jsx("p",{className:"text-sm text-blue-100",children:t("affiliate.min_payout")})]})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg border border-slate-200 p-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-4",children:t("affiliate.register_title")}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:t("affiliate.wallet_address")}),e.jsx("input",{type:"text",value:P,onChange:ee=>z(ee.target.value),placeholder:"T...",className:"w-full px-4 py-3 border border-slate-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:T,onChange:ee=>ae(ee.target.checked),className:"mt-1 w-5 h-5 text-blue-600 rounded focus:ring-blue-500"}),e.jsx("span",{className:"text-sm text-slate-600",children:t("affiliate.terms_text")})]}),e.jsx("button",{onClick:q,disabled:!T||!P||u,className:"w-full py-3 bg-gradient-to-r from-blue-600 to-cyan-600 text-white font-semibold rounded-xl hover:from-blue-700 hover:to-cyan-700 transition-all disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:u?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(rt,{className:"w-5 h-5"}),t("affiliate.apply_now")]})})]})]})]})}const Bf={US:"https://flagcdn.com/w80/us.png",UK:"https://flagcdn.com/w80/gb.png",EU:"https://flagcdn.com/w80/eu.png",TR:"https://flagcdn.com/w80/tr.png"}
1084,md=[{code:"US",flag:"ðºð¸",currency:"USD",currencySymbol:"$"},{code:"UK",flag:"ð¬ð§",currency:"GBP",currencySymbol:"£"},{code:"EU",flag:"ðªðº",currency:"EUR",currencySymbol:"â¬"},{code:"TR",flag:"ð¹ð·",currency:"TRY",currencySymbol:"âº"}],Hx=o.forwardRef(({t,packageId:s,username:a,link:r,price:l,originalPrice:n,fixedTryPrice:i,fixedTryOriginalPrice:c,serviceColor:d,user:x,guestName:m,guestEmail:h,onSuccess:f,onBack:y},g)=>{var Ae;const{formatInCurrency:w,convertFromUsd:N,currency:v,formatRaw:j,detectedCountry:b}=Nn(),[p,E]=o.useState("regions"),[C,S]=o.useState(null),[k,J]=o.useState([]),[u,A]=o.useState(null),[T,ae]=o.useState(!1),[P,z]=o.useState(!1),[I,Z]=o.useState(null),[Q,_]=o.useState(null),[M,F]=o.useState(null),[R,X]=o.useState(null),[re,U]=o.useState(!1),[oe,ue]=o.useState(m||""),[K,q]=o.useState(h||""),[je,we]=o.useState(""),[se,Se]=o.useState(null);o.useImperativeHandle(g,()=>({hasSelectedRegion:()=>p==="details",goBackToRegions:()=>{E("regions"),S(null),J([]),X(null),Se(null)}})),o.useEffect(()=>{let he=!1;return(async()=>{try{const D=b?`?visitor_country=${b}`:"",fe=await(await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_bank_accounts_public${D}`,{headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}})).json();if(he)return;if(fe.success&&Array.isArray(fe.data)){const W=Array.from(new Set(fe.data.map(_e=>_e.region)));A(W)}else A([])}catch{he||A([])}})(),()=>{he=!0}},[b]),o.useEffect(()=>{C&&($(C),ie(C),Se(C==="TR"?be():null))},[C]),o.useEffect(()=>{if(!u||C||p!=="regions"||!b)return;const he=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","NO","IS","CH","LI","AL","BA","ME","MK","RS","XK","MD","UA","BY"];let D=null;b==="TR"&&u.includes("TR")?D="TR":b==="US"&&u.includes("US")?D="US":b==="GB"&&u.includes("UK")?D="UK":he.includes(b)&&u.includes("EU")&&(D="EU"),D&&(S(D),E("details"))},[u,b]);const $=async he=>{var D;ae(!0),_(null);try{const fe=await(await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_bank_accounts_public?region=${he}`,{headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}})).json();fe.success&&((D=fe.data)==null?void 0:D.length)>0?(J(fe.data),F(fe.data[0].id)):J([])}catch{_(t("bank_transfer.error"))}finally{ae(!1)}},ie=async he=>{const D=md.find(O=>O.code===he);if(!D||D.currency==="USD"){X(1);return}U(!0);try{const fe=await(await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_exchange_rate?currency=${D.currency}`,{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}})).json();fe.rate&&X(fe.rate)}catch{X(null)}finally{U(!1)}},be=()=>{const he=new Uint32Array(1);return crypto.getRandomValues(he),String(1e7+he[0]%9e7)},Pe=R?C==="TR"&&i?i:C==="TR"?Math.floor(l*R/10)*10:Math.ceil(l*R*100)/100:C==="TR"&&i?i:null,de=async()=>{if(M){z(!0),_(null);try{const{supabase:he}=await _s(async()=>{const{supabase:_e}=await Promise.resolve().then(()=>rn);return{supabase:_e}},void 0),{data:{session:D}}=await he.auth.getSession(),O={"Content-Type":"application/json"};D!=null&&D.access_token?O.Authorization=`Bearer ${D.access_token}`:O.Authorization="Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc";const W=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/submit_bank_transfer",{method:"POST",headers:O,body:JSON.stringify({bankAccountId:M,packageId:s,username:a,link:r||a,guestName:x?void 0:oe||m,guestEmail:x?void 0:K||h,senderName:x?je.trim():(oe||m||"").trim(),localPrice
1084:Pe,exchangeRateUsed:R,transferReference:C==="TR"?se:void 0,deviceId:typeof window<"u"&&window.localStorage&&window.localStorage.getItem("followx_device_id")||void 0})})).json();W.success?E("submitted"):_(W.error||t("bank_transfer.error"))}catch{_(t("bank_transfer.error"))}finally{z(!1)}}},H=(he,D)=>{navigator.clipboard.writeText(he),Z(D),setTimeout(()=>Z(null),2e3)},me=k.find(he=>he.id===M),ee=md.find(he=>he.code===C);return p==="submitted"?e.jsxs("div",{className:"space-y-5 animate-in fade-in duration-300",children:[e.jsxs("div",{className:"text-center py-6",children:[e.jsx("div",{className:"w-20 h-20 mx-auto mb-5 bg-amber-50 rounded-full flex items-center justify-center border-2 border-amber-200",children:e.jsx(Zu,{className:"w-9 h-9 text-amber-500 animate-pulse"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-800 mb-2",children:t("bank_transfer.pending_title")}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed max-w-sm mx-auto",children:t("bank_transfer.pending_message")})]}),e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(hr,{className:"w-5 h-5 text-blue-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-blue-700 leading-relaxed",children:t("bank_transfer.pending_note")})]})}),e.jsx("button",{onClick:f,className:"w-full py-3.5 bg-slate-800 hover:bg-slate-900 text-white rounded-xl text-sm font-semibold transition-all",children:"OK"})]}):p==="regions"?e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("button",{onClick:y,className:"p-1.5 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(xr,{className:"w-4 h-4 text-slate-500"})}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-base font-bold text-slate-800 flex items-center gap-2",children:[e.jsx(Gi,{className:"w-4.5 h-4.5 text-slate-600"}),t("bank_transfer.title")]}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:t("bank_transfer.subtitle")})]})]}),e.jsx("div",{className:"bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-200 rounded-xl p-3.5",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Jt,{className:"w-5 h-5 text-emerald-600 flex-shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("span",{className:"text-xs font-medium text-emerald-600 uppercase tracking-wide",children:t("bank_transfer.amount_to_send")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-emerald-700",children:i?j(i,"TRY"):w(l)}),n&&n!==l&&e.jsx("span",{className:"text-base text-slate-400 line-through",children:c?j(c,"TRY"):w(n)})]})]}),n&&n!==l&&e.jsx("span",{className:"bg-gradient-to-r from-red-500 to-orange-500 text-white text-[11px] font-extrabold px-2.5 py-1 rounded-full shadow-sm whitespace-nowrap",children:t("checkout.off_25")})]})}),e.jsx("p",{className:"text-sm font-semibold text-slate-700",children:t("bank_transfer.select_region")}),e.jsx("div",{className:"space-y-2.5",children:u===null?e.jsxs("div",{className:"flex items-center justify-center py-8 text-slate-500 text-sm",children:[e.jsx(Ne,{className:"w-4 h-4 mr-2 animate-spin"})," Loading..."]}):u.length===0?e.jsx("div",{className:"flex items-center justify-center py-8 text-slate-500 text-sm",children:"No bank accounts are currently available."}):md.filter(he=>u.includes(he.code)).map(he=>e.jsxs("button",{onClick:()=>{S(he.code),E("details")},className:"w-full flex items-center gap-4 p-4 bg-white border border-slate-200 rounded-xl hover:border-blue-300 hover:shadow-md transition-all group active:scale-[0.99]",children:[e.jsx("img",{src:Bf[he.code],alt:he.code,className:"w-10 h-7 object-cover rounded-sm shadow-sm",onError:D=>{var O;D.target.style.display="none",(O=D.target.nextElementSibling)==null||O.classList.remove("hidden")}}),e.jsx("span",{className:"hidden text-2xl leading-none",children:he.flag}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx("div",{className:"text-sm font-bold text-slate-800 group-hover:text-blue-700 transition-colors",children:t(`bank_transfer.region_${he.code.toLowerCase()}`)}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:he.currency})]}),e.jsx(ra,{className:"w-4 h-4 text-slate-300 group-hover:text-blue-500 transition-colors"})]},he.code))})]}):e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("button",{onClick:()=>{E("regions"),S(null),J([]),Se(null)},className:"p-1.5 hover:bg-slate-100 rounded-lg transition-colors",children:e.jsx(xr,{className:"w-4 h-4 text-slate-500"})}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[C&&e.jsxs(e.Fragment,{children:[e.jsx("img",{src:Bf[C],alt:C,className:"w-8 h-6 object-cover rounded-sm shadow-sm",onError:he=>{var D;he.target.style.display="none",(D=he.target.nextElementSibling)==null||D.classList.remove("hidden")}}),e.jsx("span",{className:"hidden text-xl leading-none",children:(Ae=md.find(he=>he.code===C))==null?void 0:Ae.flag})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-bold text-slate-800",children:t(`bank_transfer.region_${C==null?void 0:C.toLowerCase()}`)}),e.jsx("p",{className:"text-xs text-slate-400",children:t("bank_transfer.back_to_regions")})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2.5 bg-gradient-to-r from-emerald-50 to-teal-50 border border-emerald-200 rounded-xl px-3.5 py-2.5",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-emerald-100 flex items-center justify-center flex-shrink-0",children:e.jsx(Ze,{className:"w-4 h-4 text-emerald-600"})}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-bold text-emerald-700",children:["24/7 ",t("bank_transfer.instant_automatic")]}),e.jsx("p",{className:"text-[10px] text-emerald-600/80 mt-0.5",children:t("bank_transfer.instant_automatic_desc")})]})]}),T?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3",children:[e.jsx(Ne,{className:"w-7 h-7 text-blue-500 animate-spin"}),e.jsx("span",{className:"text-sm text-slate-500",children:"Loading..."})]}):k.length===0?e.jsxs("div",{className:"text-center py-10",children:[e.jsx(sa,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-sm text-slate-500",children:t("bank_transfer.no_accounts")})]}):e.jsxs(e.Fragment,{children:[k.length>1&&e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1",children:k.map(he=>e.jsx("button",{onClick:()=>F(he.id),className:`flex-shrink-0 px-3.5 py-2 rounded-lg text-xs font-semibold transition-all ${M===he.id?"bg-blue-600 text-white shadow-md":"bg-white border border-slate-200 text-slate-600 hover:border-blue-300"}`,children:he.bank_name},he.id))}),me&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl overflow-hidden",children:[e.jsxs("div",{className:"bg-slate-50 px-4 py-3 border-b border-slate-100 flex items-center gap-2.5",children:[e.jsx(sa,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{className:"text-sm font-bold text-slate-700",children:me.bank_name}),e.jsx("span",{className:"ml-auto text-xs font-semibold bg-blue-100 text-blue-700 px-2 py-0.5 rounded-full",children:me.currency})]}),e.jsxs("div",{className:"divide-y divide-slate-100",children:[e.jsx(vo,{label:t("bank_transfer.account_holder"),value:me.account_holder,field:"holder",copiedField:I,onCopy:H,copyLabel:t
1084("bank_transfer.copy"),copiedLabel:t("bank_transfer.copied"),breakAll:!0}),me.account_number&&e.jsx(vo,{label:t("bank_transfer.account_number"),value:me.account_number,field:"number",copiedField:I,onCopy:H,copyLabel:t("bank_transfer.copy"),copiedLabel:t("bank_transfer.copied"),mono:!0,breakAll:!0}),me.iban&&e.jsx(vo,{label:t("bank_transfer.iban"),value:me.iban,field:"iban",copiedField:I,onCopy:H,copyLabel:t("bank_transfer.copy"),copiedLabel:t("bank_transfer.copied"),mono:!0,breakAll:!0}),me.routing_number&&e.jsx(vo,{label:t(C==="UK"?"bank_transfer.sort_code":"bank_transfer.routing_number"),value:me.routing_number,field:"routing",copiedField:I,onCopy:H,copyLabel:t("bank_transfer.copy"),copiedLabel:t("bank_transfer.copied"),mono:!0,breakAll:!0}),me.swift_code&&e.jsx(vo,{label:t("bank_transfer.swift_code"),value:me.swift_code,field:"swift",copiedField:I,onCopy:H,copyLabel:t("bank_transfer.copy"),copiedLabel:t("bank_transfer.copied"),mono:!0,breakAll:!0})]}),me.additional_info&&e.jsx("div",{className:"px-4 py-3 bg-amber-50 border-t border-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(hr,{className:"w-4 h-4 text-amber-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-amber-700 leading-relaxed",children:me.additional_info})]})})]}),C==="TR"&&se&&e.jsx("div",{className:"mt-3 rounded-xl border-2 border-amber-300 bg-amber-50 p-4 shadow-sm",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5 flex h-8 w-8 min-w-[2rem] items-center justify-center rounded-full bg-amber-500 text-white",children:e.jsx(hr,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs font-extrabold uppercase tracking-wide text-amber-900",children:"Ãnemli: Havale açıklaması"}),e.jsx("p",{className:"mt-1 text-xs font-semibold leading-relaxed text-amber-800",children:"Açıklama kısmına sadece bu sipariÅ numaranızı yazınız."}),e.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2 rounded-lg border border-amber-200 bg-white px-3 py-2.5",children:[e.jsx("span",{className:"font-mono text-lg font-black tracking-[0.15em] text-slate-900 break-all",children:se}),e.jsxs("button",{type:"button",onClick:()=>H(se,"transfer-reference"),className:"flex flex-shrink-0 items-center gap-1 rounded-lg bg-amber-100 px-2 py-1.5 text-xs font-bold text-amber-900 transition hover:bg-amber-200 whitespace-nowrap",children:[I==="transfer-reference"?e.jsx(Lt,{className:"h-3.5 w-3.5"}):e.jsx(Ht,{className:"h-3.5 w-3.5"}),I==="transfer-reference"?"Kopyalandı":"Kopyala"]})]})]})]})})]}),e.jsxs("div",{className:"bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-200 rounded-xl p-3.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-semibold text-emerald-700 whitespace-nowrap",children:t("bank_transfer.amount_to_send")}),n&&n!==l&&e.jsx("span",{className:"bg-gradient-to-r from-red-500 to-orange-500 text-white text-[10px] font-extrabold px-2 py-0.5 rounded-full whitespace-nowrap",children:t("checkout.off_25")})]}),re?e.jsx(Ne,{className:"w-5 h-5 text-emerald-500 animate-spin"}):Pe!==null&&(ee==null?void 0:ee.currency)!=="USD"?e.jsxs("div",{className:"text-right",children:[e.jsxs("span",{className:"text-xl font-bold text-emerald-700",children:[ee==null?void 0:ee.currencySymbol,C==="TR"?Pe.toLocaleString("tr-TR"):Pe.toFixed(2)]}),n&&n!==l&&e.jsxs("span",{className:"text-sm text-slate-400 line-through ml-2",children:[ee==null?void 0:ee.currencySymbol,(()=>{const he=C==="TR"&&c?c:R?C==="TR"?Math.floor(n*R/10)*10:Math.ceil(n*R*100)/100:n;return C==="TR"?he.toLocaleString("tr-TR"):he.toFixed(2)})()]})]}):e.jsxs("div",{className:"text-right",children:[e.jsxs("span",{className:"text-xl font-bold text-emerald-700",children:["$",l.toFixed(2)]}),n&&n!==l&&e.jsxs("span",{className:"text-sm text-slate-400 line-through ml-2",children:["$",n.toFixed(2)]})]})]}),(ee==null?void 0:ee.currency)==="USD"&&v!=="USD"&&!re&&e.jsxs("div",{className:"text-[11px] text-emerald-600/70 mt-1.5 text-right break-all",children:[w(l)," = $",l.toFixed(2)," USD"]}),Pe!==null&&(ee==null?void 0:ee.currency)!=="USD"&&!re&&!(C==="TR"&&i)&&R&&e.jsxs("div",{className:"text-[11px] text-emerald-600/70 mt-1.5 text-right break-all",children:[w(l)," x ",R.toFixed(4)," = ",ee==null?void 0:ee.currencySymbol,C==="TR"?Pe.toLocaleStr
1084ing("tr-TR"):Pe.toFixed(2)," ",ee==null?void 0:ee.currency]})]}),x?e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 space-y-3",children:[e.jsxs("h4",{className:"text-sm font-bold text-slate-700 flex items-center gap-2",children:[e.jsx(ls,{className:"w-4 h-4 text-slate-500"}),t("bank_transfer.holder_name_title")]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-500 mb-1 block",children:t("bank_transfer.enter_holder_name")}),e.jsx("input",{type:"text",value:je,onChange:he=>we(he.target.value),placeholder:"John Doe",className:"w-full px-3.5 py-2.5 border-2 border-slate-200 rounded-lg focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition text-sm font-medium"})]})]}):e.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-4 space-y-3",children:[e.jsxs("h4",{className:"text-sm font-bold text-slate-700 flex items-center gap-2",children:[e.jsx(ls,{className:"w-4 h-4 text-slate-500"}),t("bank_transfer.contact_info")]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-500 mb-1 block",children:t("bank_transfer.full_name_label")}),e.jsx("input",{type:"text",value:oe,onChange:he=>ue(he.target.value),placeholder:t("bank_transfer.full_name_placeholder"),className:"w-full px-3.5 py-2.5 border-2 border-slate-200 rounded-lg focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition text-sm font-medium"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-slate-500 mb-1 block",children:t("bank_transfer.email_label")}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"email",value:K,onChange:he=>q(he.target.value),placeholder:"[email protected]",className:"w-full px-3.5 py-2.5 border-2 border-slate-200 rounded-lg focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-100 transition text-sm font-medium"}),e.jsx(gs,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"})]})]})]}),Q&&e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-3 text-sm text-red-700 font-medium",children:Q}),e.jsx("button",{onClick:de,disabled:P||!M||(x?!je.trim():!oe.trim()||!K.trim()),className:`w-full flex items-center justify-center gap-2.5 py-4 bg-gradient-to-r ${d} text-white rounded-xl text-sm font-bold disabled:opacity-50 transition-all active:scale-[0.99] shadow-lg`,children:P?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-5 h-5 animate-spin"}),t("bank_transfer.submitting")]}):e.jsxs(e.Fragment,{children:[e.jsx(Sl,{className:"w-5 h-5"}),t("bank_transfer.i_have_paid")]})}),e.jsxs("div",{className:"flex items-center gap-2.5 justify-center text-xs text-slate-400",children:[e.jsx(Ze,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:t("bank_transfer.pending_note")})]})]})]})});function vo({label:t,value:s,field:a,copiedField:r,onCopy:l,mono:n,copyLabel:i,copiedLabel:c,breakAll:d}){return e.jsxs("div",{className:"px-4 py-3 group hover:bg-slate-50 transition-colors",children:[e.jsx("div",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wide mb-1",children:t}),e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:`text-sm text-slate-800 font-semibold min-w-0 flex-1 ${n?"font-mono tracking-wide":""} ${d?"break-all":""}`,children:s}),e.jsx("button",{onClick:()=>l(s,a),className:"flex items-center gap-1 px-2.5 py-1.5 bg-slate-100 hover:bg-blue-100 rounded-lg text-xs font-medium text-slate-500 hover:text-blue-600 transition-all flex-shrink-0",children:r===a?e.jsxs(e.Fragment,{children:[e.jsx(Lt,{className:"w-3.5 h-3.5 text-emerald-500"}),e.jsx("span",{className:"text-emerald-600",children:c||"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ht,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:i||"Copy"})]})})]})]})}function ua({children:t,rootMargin:s="200px",className:a=""}){const[r,l]=o.useState(!1),n=o.useRef(null);return o.useEffect(()=>{const i=n.current;if(!i)return;const c=new IntersectionObserver(([d])=>{d.isIntersecting&&(l(!0),c.disconnect())},{rootMargin:s});return c.observe(i),()=>c.disconnect()},[s]),e.jsx("div",{ref:n,className:a,children:r?e.jsx("div",{className:"animate-lazy-fade-in",children:t}):e.jsx("div",{className:"min-h-[100px]"})})}function h6({currentStep:t,totalSteps:s}){return e.jsxs("div",{className:"mb-4 sm:mb-8",children:[e.jsx("div",{className:"flex gap-1 sm:gap-1.5",children:Array.from({length:s},(a,r)=>e.jsx("div",{className:"flex-1 h-1 sm:h-1.5 rounded-full overflow-hidden",children:r<t?e.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-sky-4
108400 to-cyan-400 w-full transition-all duration-500 ease-out"}):e.jsx("div",{className:"h-full w-full rounded-full",style:{backgroundImage:"repeating-linear-gradient(90deg, #e2e8f0 0px, #e2e8f0 6px, transparent 6px, transparent 12px)"}})},r))}),e.jsxs("p",{className:"text-[10px] sm:text-xs text-slate-400 mt-1.5 sm:mt-2 font-medium",children:["Step ",Math.max(t,1)," of ",s]})]})}function xd({step:t,label:s,placeholder:a,options:r,value:l,onChange:n,disabled:i=!1,renderOption:c}){const[d,x]=o.useState(!1),[m,h]=o.useState(""),[f,y]=o.useState({}),g=o.useRef(null),w=o.useRef(null),N=o.useRef(null),v=o.useRef(null);o.useEffect(()=>{const E=C=>{g.current&&!g.current.contains(C.target)&&v.current&&!v.current.contains(C.target)&&(x(!1),h(""))};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]);const j=()=>{if(!w.current)return;const E=w.current.getBoundingClientRect(),C=c?400:300,S=window.innerHeight-E.bottom-8,k=E.top-8,J=S<C&&k>S;y(J?{position:"fixed",left:E.left,width:E.width,bottom:window.innerHeight-E.top+6,maxHeight:Math.min(C,k),zIndex:9999}:{position:"fixed",left:E.left,width:E.width,top:E.bottom+6,maxHeight:Math.min(C,S),zIndex:9999})};o.useLayoutEffect(()=>{d&&j()},[d]),o.useEffect(()=>{if(!d)return;const E=()=>j();return window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}},[d]);const b=r.find(E=>E.value===l),p=m?r.filter(E=>E.label.toLowerCase().includes(m.toLowerCase())):r;return e.jsxs("div",{className:"mb-4 sm:mb-5",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-2.5 mb-1.5 sm:mb-2",children:[e.jsx("span",{className:"w-5 h-5 sm:w-6 sm:h-6 rounded-full bg-gradient-to-br from-sky-400 to-cyan-400 text-white text-[10px] sm:text-xs font-bold flex items-center justify-center shadow-sm",children:t}),e.jsx("span",{className:"text-[10px] sm:text-xs font-semibold text-slate-400 uppercase tracking-wider",children:s})]}),e.jsxs("div",{ref:g,className:"relative",children:[e.jsxs("button",{ref:w,type:"button",disabled:i,onClick:()=>{i||(x(!d),setTimeout(()=>{var E;return(E=N.current)==null?void 0:E.focus()},50))},className:` 1085 w-full flex items-center gap-2 sm:gap-3 px-3 sm:px-4 py-3 sm:py-3.5 rounded-xl border text-left transition-all 1086 ${i?"bg-slate-50 border-slate-100 cursor-not-allowed text-slate-300":d?"bg-white border-sky-300 ring-2 ring-sky-100 shadow-sm":"bg-slate-50/80 border-slate-200 hover:border-slate-300 text-slate-700"} 1087 `,children:[b!=null&&b.icon?e.jsx("span",{className:"shrink-0",children:b.icon}):e.jsx(wt,{className:`w-4 h-4 shrink-0 ${i?"text-slate-300":"text-slate-400"}`}),e.jsx("span",{className:`flex-1 text-sm truncate ${b?"text-slate-800 font-medium":i?"text-slate-300":"text-slate-400"}`,children:b?b.label:a}),e.jsx(is,{className:`w-4 h-4 shrink-0 transition-transform ${d?"rotate-180":""} ${i?"text-slate-300":"text-slate-400"}`})]}),d&&!i&&gl.createPortal(e.jsxs("div",{ref:v,className:"bg-white rounded-xl border border-slate-200 shadow-2xl overflow-hidden animate-fadeIn flex flex-col",style:f,children:[r.length>6&&e.jsx("div",{className:"p-2 border-b border-slate-100 shrink-0",children:e.jsx("input",{ref:N,type:"text",value:m,onChange:E=>h(E.target.value),placeholder:"Search...",className:"w-full px-3 py-2 text-sm bg-slate-50 border border-slate-200 rounded-lg outline-none focus:border-sky-300 focus:ring-1 focus:ring-sky-100"})}),e.jsx("div",{className:"overflow-y-auto flex-1 min-h-0",children:p.length===0?e.jsx("div",{className:"px-4 py-3 text-sm text-slate-400 text-center",children:"No results found"}):p.map(E=>{const C=E.value===l;return e.jsx("button",{type:"button",onClick:()=>{n(E.value),x(!1),h("")},className:` 1088 w-full text-left transition-colors 1089 ${c?`border-b border-slate-100 last:border-b-0 ${C?"bg-sky-50/60":"hover:bg-slate-50"}`:`px-4 py-2.5 text-sm flex items-center gap-2.5 ${C?"bg-sky-50 text-sky-700 font-medium":"text-slate-700 hover:bg-slate-50"}`} 1090 `,children:c?c(E,C):e.jsxs(e.Fragment,{children:[E.icon&&e.jsx("span",{className:"shrink-0",children:E.icon}),e.jsx("span",{className:"truncate flex-1",children:E.label}),E.badge!==void 0&&e.jsx("span",{className:"shrink-0 text-xs text-slate-400 font-medium tabular-nums",children:E.badge.toLocaleStr
1090ing()})]})},E.value)})})]}),document.body)]})]})}function Uf({step:t,label:s,placeholder:a,value:r,onChange:l,type:n="text",disabled:i=!1,min:c,max:d,error:x}){return e.jsxs("div",{className:"mb-4 sm:mb-5",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-2.5 mb-1.5 sm:mb-2",children:[e.jsx("span",{className:"w-5 h-5 sm:w-6 sm:h-6 rounded-full bg-gradient-to-br from-sky-400 to-cyan-400 text-white text-[10px] sm:text-xs font-bold flex items-center justify-center shadow-sm",children:t}),e.jsx("span",{className:"text-[10px] sm:text-xs font-semibold text-slate-400 uppercase tracking-wider",children:s})]}),e.jsx("input",{type:n,value:r,onChange:m=>l(m.target.value),placeholder:a,disabled:i,min:c,max:d,className:` 1091 w-full px-3 sm:px-4 py-3 sm:py-3.5 rounded-xl border text-sm transition-all outline-none 1092 ${i?"bg-slate-50 border-slate-100 text-slate-300 cursor-not-allowed":x?"bg-white border-red-300 ring-2 ring-red-100 text-slate-800":"bg-slate-50/80 border-slate-200 hover:border-slate-300 focus:border-sky-300 focus:ring-2 focus:ring-sky-100 text-slate-800"} 1093 placeholder:text-slate-400 1094 `}),x&&e.jsx("p",{className:"mt-1.5 text-xs text-red-500 font-medium",children:x})]})}const e1="w-4 h-4",Ks=(t,s,a="0 0 24 24")=>e.jsx("svg",{className:e1,viewBox:a,fill:s,xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:t})}),p6={Instagram:Ks("M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z","#E4405F"),TikTok:Ks("M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z","#000000"),YouTube:Ks("M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z","#FF0000"),Facebook:Ks("M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z","#1877F2"),"Twitter / X":Ks("M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z","#000000"),Telegram:Ks("M11.944 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0a12 12 0 00-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 01.171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.479.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z","#26A5E4"),Spotify:Ks("M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z","#1DB954"),LinkedIn:Ks("M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z","#0A66C2"),Twitch:Ks("M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z","#9146FF"),Discord:Ks("M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363
10940 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286z","#5865F2"),Pinterest:Ks("M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12.017 24c6.624 0 11.99-5.367 11.99-11.988C24.007 5.367 18.641 0 12.017 0z","#BD081C"),Snapchat:Ks("M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12.017 24c6.624 0 11.99-5.367 11.99-11.988C24.007 5.367 18.641 0 12.017 0z","#FFFC00"),Reddit:Ks("M12 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 01-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 01.042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 014.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 01.14-.197.35.35 0 01.238-.042l2.906.617a1.214 1.214 0 011.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 00-.231.094.33.33 0 000 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 00.029-.463.33.33 0 00-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 00-.232-.095z","#FF4500"),WhatsApp:Ks("M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z","#25D366"),SoundCloud:Ks("M1.175 12.225c-.051 0-.094.046-.101.1l-.233 2.154.233 2.105c.007.058.05.098.101.098.05 0 .09-.04.099-.098l.255-2.105-.27-2.154c-.009-.057-.05-.1-.1-.1m-.899.828c-.06 0-.091.037-.104.094L0 14.479l.172 1.308c.013.06.045.094.104.094.057 0 .09-.037.104-.094l.21-1.308-.21-1.334c-.014-.057-.047-.09-.104-.09m1.8-1.
109418c-.065 0-.116.053-.122.117l-.217 2.49.217 2.387c.006.064.057.117.122.117s.116-.053.122-.117l.247-2.387-.247-2.49c-.006-.064-.057-.117-.122-.117m.901-.558c-.073 0-.129.06-.135.13l-.2 3.048.2 2.906c.006.07.062.13.135.13.074 0 .13-.06.136-.13l.226-2.906-.226-3.048c-.006-.07-.062-.13-.136-.13m.91-.286c-.08 0-.142.067-.147.147l-.184 3.334.184 3.118c.005.08.066.147.147.147.08 0 .14-.067.147-.147l.208-3.118-.208-3.334c-.007-.08-.067-.147-.147-.147m.907-.198c-.088 0-.155.074-.16.159l-.168 3.532.168 3.274c.005.085.072.159.16.159.086 0 .154-.074.16-.159l.19-3.274-.19-3.532c-.006-.085-.074-.159-.16-.159m.896-.329c-.094 0-.166.08-.172.172l-.152 3.86.152 3.337c.006.093.078.172.172.172.093 0 .166-.08.172-.172l.172-3.337-.172-3.86c-.006-.093-.079-.172-.172-.172m.912 0c-.102 0-.18.085-.185.186l-.137 3.86.137 3.34c.005.102.083.186.185.186.102 0 .18-.084.185-.186l.155-3.34-.155-3.86c-.005-.101-.083-.186-.185-.186m.907-.163c-.108 0-.19.092-.195.198l-.122 4.023.122 3.324c.005.107.087.198.195.198.109 0 .19-.091.196-.198l.139-3.324-.139-4.023c-.006-.106-.087-.198-.196-.198m.896-.162c-.116 0-.202.098-.207.21l-.106 4.185.106 3.31c.005.113.091.21.207.21.117 0 .203-.098.208-.21l.12-3.31-.12-4.185c-.005-.112-.091-.21-.208-.21m.89-.163c-.12 0-.21.104-.215.222l-.091 4.348.091 3.286c.005.119.095.222.215.222.121 0 .21-.103.216-.222l.104-3.286-.104-4.348c-.006-.118-.095-.222-.216-.222m3.609-.48c-.15 0-.27.12-.275.267l-.08 4.828.08 3.164c.005.149.125.267.275.267.15 0 .27-.118.275-.267l.09-3.164-.09-4.828c-.005-.147-.125-.267-.275-.267m-2.697.174c-.127 0-.222.11-.226.235l-.092 4.654.092 3.256c.004.126.099.235.226.235.128 0 .223-.11.228-.235l.104-3.256-.104-4.654c-.005-.125-.1-.235-.228-.235m.9-.08c-.133 0-.232.117-.237.247l-.075 4.734.075 3.235c.005.13.104.247.237.247.134 0 .233-.117.238-.247l.085-3.235-.085-4.734c-.005-.13-.104-.247-.238-.247m.897-.044c-.14 0-.243.123-.247.26l-.06 4.778.06 3.218c.004.137.107.26.247.26.14 0 .243-.123.248-.26l.068-3.218-.068-4.778c-.005-.137-.108-.26-.248-.26m.9.041c-.147 0-.253.13-.257.272l-.045 4.737.045 3.197c.004.143.11.272.257.272.146 0 .252-.129.257-.272l.052-3.197-.052-4.737c-.005-.142-.111-.272-.257-.272m.9-.128c-.153 0-.262.135-.266.283l-.037 4.865.037 3.156c.004.15.113.283.266.283.152 0 .262-.134.267-.283l.042-3.156-.042-4.865c-.005-.148-.115-.283-.267-.283m.89.08c-.157 0-.27.14-.274.296l-.022 4.785.022 3.11c.004.156.117.296.274.296.157 0 .27-.14.275-.296l.025-3.11-.025-4.785c-.005-.155-.118-.296-.275-.296M21.098 7.39c-.206 0-.37.164-.374.37l-.015 7.12.015 3.07c.004.206.168.37.374.37.207 0 .371-.164.375-.37l.018-3.07-.018-7.12c-.004-.206-.168-.37-.375-.37m.9 0c-.213 0-.384.17-.387.383l-.008 7.12.008 3.053c.003.212.174.383.387.383.212 0 .384-.171.387-.383l.009-3.053-.009-7.12c-.003-.213-.175-.383-.387-.383m.9.173c-.22 0-.397.177-.4.396l0 6.947 0 3.017c.003.22.18.396.4.396.219 0 .396-.177.4-.396V14.91v-6.95c-.004-.22-.181-.397-.4-.397","#FF5500"),Kick:Ks("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l7 4.5-7 4.5z","#53FC18"),Google:Ks("M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z","#4285F4"),VK:Ks("M15.684 0H8.316C1.592 0 0 1.592 0 8.316v7.368C0 22.408 1.592 24 8.316 24h7.368C22.408 24 24 22.408 24 15.684V8.316C24 1.592 22.391 0 15.684 0zm3.692 17.123h-1.744c-.66 0-.862-.525-2.049-1.714-1.033-1.01-1.49-1.135-1.744-1.135-.356 0-.458.102-.458.593v1.575c0 .424-.135.678-1.253.678-1.846 0-3.896-1.12-5.339-3.202-2.17-3.058-2.763-5.35-2.763-5.834 0-.254.102-.491.593-.491h1.744c.44 0 .61.203.78.677.863 2.49 2.303 4.675 2.896 4.675.22 0 .322-.102.322-.66V9.721c-.068-1.186-.695-1.287-.695-1.71 0-.203.17-.407.44-.407h2.744c.373 0 .508.203.508.643v3.473c0 .372.17.508.271.508.22 0 .407-.136.813-.542 1.27-1.422 2.18-3.61 2.18-3.61.119-.254.322-.491.763-.491h1.744c.525 0 .644.27.525.643-.22 1.017-2.354 4.031-2.354 4.031-.186.305-.254.44 0 .78.186.254.796.779 1.203 1.253.745.847 1.32 1.558 1.473 2.049.17.49-.085.744-.576.744z","#0077FF"),Threads:Ks("M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.01
10947c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.96-.065-1.187.408-2.228 1.33-2.932.88-.672 2.072-1.055 3.555-1.145 1.086-.066 2.097.017 3.015.244-.043-1.452-.494-2.567-1.27-3.235-.815-.7-1.89-1.035-3.203-.998l-.029-2.04c1.868-.05 3.428.461 4.637 1.498 1.225 1.05 1.9 2.595 1.966 4.533.499.234.945.513 1.334.838 1.304 1.085 2.107 2.72 2.39 4.866.283 2.134-.326 4.093-1.713 5.508-1.792 1.828-4.052 2.626-7.316 2.587zm.286-7.97c-1.197.073-2.63.345-2.63 1.612.022.492.231.856.603 1.053.42.222.95.306 1.456.276 1.078-.058 1.885-.479 2.396-1.242.348-.518.586-1.21.684-2.042-.78-.159-1.628-.24-2.51-.188v.53z","#000000")},f6=e.jsxs("svg",{className:e1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),e.jsx("path",{d:"M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"})]});function Vx(t){return p6[t]||f6}const ud="https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_smm_panel_data",hd={Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"};function g6({onOpenWallet:t,isGuest:s=!1,onAuthRequired:a}){const{user:r,profile:l,session:n,refreshProfile:i}=br(),{showAlert:c}
1094=Vs(),[d,x]=o.useState([]),[m,h]=o.useState([]),[f,y]=o.useState([]),[g,w]=o.useState([]),[N,v]=o.useState(!0),[j,b]=o.useState(!1),[p,E]=o.useState(!1),[C,S]=o.useState(!1),[k,J]=o.useState(!1),[u,A]=o.useState(""),[T,ae]=o.useState(""),[P,z]=o.useState(""),[I,Z]=o.useState(""),[Q,_]=o.useState(""),[M,F]=o.useState(""),[R,X]=o.useState("");o.useEffect(()=>{re()},[]);const re=async()=>{v(!0);try{const ve=await fetch(`${ud}?action=platforms`,{headers:hd});if(ve.ok){const Te=await ve.json();x(Te.platforms||[])}}catch(ve){console.error("Failed to fetch platforms:",ve)}finally{v(!1)}},U=o.useCallback(async ve=>{b(!0),h([]);try{const Te=await fetch(`${ud}?action=types&platform=${encodeURIComponent(ve)}`,{headers:hd});if(Te.ok){const ze=await Te.json();h(ze.types||[])}}catch(Te){console.error("Failed to fetch types:",Te)}finally{b(!1)}},[]),oe=o.useCallback(async ve=>{E(!0),y([]);try{const Te=await fetch(`${ud}?action=categories&category_ids=${encodeURIComponent(ve.join(","))}`,{headers:hd});if(Te.ok){const ze=await Te.json();y(ze.categories||[])}}catch(Te){console.error("Failed to fetch categories:",Te)}finally{E(!1)}},[]),ue=o.useCallback(async ve=>{S(!0),w([]);try{const Te=[];await Promise.all(ve.map(async ze=>{const it=await fetch(`${ud}?action=services&category_id=${encodeURIComponent(ze)}`,{headers:hd});if(it.ok){const ke=await it.json();Te.push(...ke.services||[])}})),w(Te)}catch(Te){console.error("Failed to fetch services:",Te)}finally{S(!1)}},[]),K=o.useMemo(()=>g.find(ve=>ve.id===I),[g,I]);o.useMemo(()=>m.find(ve=>ve.name===T),[m,T]);const q=(K==null?void 0:K.min_quantity)||0,je=(K==null?void 0:K.max_quantity)||1e6,we=o.useMemo(()=>{if(!K||!M)return 0;const ve=parseInt(M,10);return isNaN(ve)||ve<=0?0:K.price_per_1k/1e3*ve},[K,M]),se=Q.trim().length>0,Se=(()=>{if(!M)return!1;const ve=parseInt(M,10);return!isNaN(ve)&&ve>=q&&ve<=je})(),$=o.useMemo(()=>{let ve=0;return u&&ve++,T&&ve++,P&&ve++,I&&ve++,se&&ve++,Se&&ve++,we>0&&ve++,ve},[u,T,P,I,se,Se,we]),ie=o.useMemo(()=>{const ve={};return g.forEach(Te=>{ve[Te.id]=Te}),ve},[g]),be=ve=>{A(ve),ae(""),z(""),Z(""),_(""),F(""),X(""),h([]),y([]),w([]),ve&&U(ve)},Pe=ve=>{ae(ve),z(""),Z(""),_(""),F(""),X(""),w([]);const Te=m.find(ze=>ze.name===ve);Te&&Te.category_ids.length>0?oe(Te.category_ids):y([])},de=ve=>{var ze;z(ve),Z(""),_(""),F(""),X("");const Te=(ze=fe[ve])==null?void 0:ze.ids;Te&&Te.length>0?ue(Te):w([])},H=ve=>{Z(ve),_(""),F(""),X("");const Te=g.find(ze=>ze.id===ve);Te&&F(Te.min_quantity.toString())};o.useEffect(()=>{if(!M||!K){X("");return}const ve=parseInt(M,10);isNaN(ve)?X("Enter a valid number"):ve<q?X(`Minimum: ${Ya(q)}`):ve>je?X(`Maximum: ${Ya(je)}`):X("")},[M,K,q,je]);const me=u&&T&&P&&I&&se&&Se&&we>0&&!k,ee=async()=>{if(!me||!K)return;if(s||!r||!n){a&&a();return}if(((l==null?void 0:l.balance)||0)+((l==null?void 0:l.refund_balance)||0)<we){c("Insufficient balance. Please add funds to your wallet.",{type:"warning"}),t();return}J(!0);try{let Te=null;const{data:ze}=await Ye.auth.refreshSession();if(Te=ze==null?void 0:ze.session,!Te){const{data:Xe}=await Ye.auth.getSession();Te=Xe==null?void 0:Xe.session}if(!Te)throw new Error("Not authenticated");const it=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/process_wallet_payment",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Te.access_token}`},body:JSON.stringify({customerName:Q.trim(),customerEmail:(l==null?void 0:l.email)||"",paymentSource:"smm_panel",cart:[{platform:u,service_type:P||"",quantity:parseInt(M,10),price:we,service_id:K.provider_service_id,provider_id:K.provider_id,link:Q.trim()}]})}),ke=await it.json();if(!it.ok||ke.error)throw it.status===503||ke.code==="STALE_PRICING"||ke.code==="PRICE_BELOW_COST"?new Error("Service prices are being updated. Please wait a moment and try again."):new Error(ke.error||ke.message||"Order failed");await i(),c(`Order placed successfully! Order #${ke.orderNumber||""}`,{type:"success"}),A(""),ae(""),z(""),Z(""),h([]),y([]),w([]),_(""),F("")}catch(Te){c(Te.message||"Failed to place order",{type:"error"})}finally{J(!1)}};if(N)return e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(Ne,{className:"w-6 h-6 animate-spin text-sky-500"})});const Ae=u?Vx(u):null,he=d.map(ve=>({value:ve.name,label:`${ve.name} (${ve.category_count}
1094)`,icon:Vx(ve.name)})),D=m.map(ve=>({value:ve.name,label:ve.name,icon:Ae||void 0,badge:ve.service_count})),O=(ve,Te)=>{let ze=ve;return Te&&(ze=ze.replace(new RegExp(`\\s*\\[${Te.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\]`,"gi"),"")),ze=ze.replace(/\s*\[[^\]]{1,40}\]\s*$/g,""),ze.trim()},fe={};f.forEach(ve=>{const Te=O(ve.name,ve.provider_name);fe[Te]||(fe[Te]={ids:[],totalCount:0}),fe[Te].ids.push(ve.id),fe[Te].totalCount+=ve.service_count});const W=Object.entries(fe).map(([ve,Te])=>({value:ve,label:ve,badge:Te.totalCount,icon:u?Vx(u):void 0})),_e=g.map(ve=>({value:ve.id,label:`${O(ve.name,ve.provider_name)} - ${pt(ve.price_per_1k)}/1K`})),Re=(ve,Te)=>{const ze=ie[ve.value];if(!ze)return e.jsx("span",{className:"px-3 py-2 text-sm",children:ve.label});const it=O(ze.name,ze.provider_name);return e.jsx("div",{className:`px-3 py-2.5 ${Te?"text-sky-800":"text-slate-700"}`,children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-[10px] text-slate-400 font-mono",children:["#",ze.provider_service_id]}),e.jsxs("p",{className:"text-xs sm:text-sm font-medium leading-snug mt-0.5",children:[it," ","[Max: ",Ya(ze.max_quantity),"]",ze.average_time?` [Start Time: ${ze.average_time}]`:"",ze.refill?" [Refill: 30D]":""," ","[Speed: Up to ",Ya(ze.max_quantity),"/D]"]}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[e.jsx(Lv,{className:`w-3 h-3 ${ze.refill?"text-blue-500":"text-slate-300"}`}),e.jsx(rt,{className:`w-3 h-3 ${ze.cancel?"text-amber-500":"text-slate-300"}`}),ze.refill&&e.jsx("span",{className:"text-[10px] font-semibold text-blue-600",children:"Refill"}),ze.cancel&&e.jsx("span",{className:"text-[10px] font-semibold text-red-500 ml-1",children:"Cancel"})]})]}),e.jsx("span",{className:"text-sm sm:text-base font-bold text-emerald-600 shrink-0 tabular-nums",children:pt(ze.price_per_1k)})]})})};return e.jsxs("div",{children:[e.jsx(h6,{currentStep:$,totalSteps:7}),e.jsx("div",{className:"animate-step-reveal",children:e.jsx(xd,{step:1,label:"Platform",placeholder:"Select platform...",options:he,value:u,onChange:be})}),u&&e.jsx("div",{className:"animate-step-reveal",children:e.jsx(xd,{step:2,label:"Type",placeholder:j?"Loading types...":"Select type...",options:D,value:T,onChange:Pe,disabled:j})},`type-${u}`),T&&e.jsx("div",{className:"animate-step-reveal",children:e.jsx(xd,{step:3,label:"Category",placeholder:p?"Loading categories...":"Select category...",options:W,value:P,onChange:de,disabled:p})},`cat-${T}`),P&&e.jsx("div",{className:"animate-step-reveal",children:e.jsx(xd,{step:4,label:"Service",placeholder:C?"Loading services...":"Select service...",options:_e,value:I,onChange:H,disabled:C,renderOption:Re})},`svc-${P}`),K&&e.jsx("div",{className:"animate-step-reveal",children:e.jsxs("div",{className:"mb-4 sm:mb-5 ml-0 sm:ml-8 bg-gradient-to-r from-sky-50 to-cyan-50 border border-sky-200/60 rounded-xl p-3 sm:p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 sm:mb-3",children:[e.jsx(hr,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-sky-500"}),e.jsx("span",{className:"text-[10px] sm:text-xs font-semibold text-sky-700 uppercase tracking-wider",children:"Service Details"})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 sm:gap-3",children:[e.jsxs("div",{className:"bg-white/70 rounded-lg px-2.5 sm:px-3 py-1.5 sm:py-2",children:[e.jsx("p",{className:"text-[9px] sm:text-[10px] uppercase text-slate-400 font-semibold tracking-wide",children:"Price / 1K"}),e.jsx("p",{className:"text-xs sm:text-sm font-bold text-slate-800",children:pt(K.price_per_1k)})]}),e.jsxs("div",{className:"bg-white/70 rounded-lg px-2.5 sm:px-3 py-1.5 sm:py-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Sm,{className:"w-2.5 h-2.5 sm:w-3 sm:h-3 text-slate-400"}),e.jsx("p",{className:"text-[9px] sm:text-[10px] uppercase text-slate-400 font-semibold tracking-wide",children:"Min"})]}),e.jsx("p",{className:"text-xs sm:text-sm font-bold text-slate-800",children:Ya(q)})]}),e.jsxs("div",{className:"bg-white/70 rounded-lg px-2.5 sm:px-3 py-1.5 sm:py-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Cm,{className:"w-2.5 h-2.5 sm:w-3 sm:h-3 text-slate-400"}),e.jsx("p",{className:"text-[9px] sm:text-[10px] uppercase text-slate-400 font-semibold tracking-wide",children:"Max"})]}),e.jsx("p",{className:"text-xs sm:text-sm font-bold text-slate-800",children:Ya(je)})]}),e.jsxs("div",{className:"bg-white/70 rounded-lg px-2.5 sm:px-3 py-1.5 sm:py-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(qv,{className:"w-2.5 h-2.5 sm:w-3 sm:h-3 text-slate-400"}),e.jsx("p",{className:"text-[9px] sm:text-[10px] uppercase text-slate-400 font-semibold tracking-wide",children:"Speed"})]}),e.jsx("p",{className:"text-xs sm:text-sm font-bold text-slate-800",children:K.average_time||"Instant"})]})]})]})},`info-${I}`),I&&e.jsx("div",{className:"animate-step-reveal",children:e.jsx(Uf,{step:5,label:"Link",placeholder:"https://...",value:Q,onChange:_,type:"url"})},`link-${I}`),se&&I&&e.jsx("div",{className:"animate-step-reveal",children:e.jsx(Uf,{step:6,label:"Quantity",placeholder:"Enter quantity",value:M,onChange:F,type:"number",min:q,max:je,error:R})},`qty-${I}`),Se&&we>0&&e.jsx("div",{className:"animate-step-reveal",children:e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-2",children:[e.jsx("span",{className:"w-6 h-6 rounded-full bg-gradient-to-br from-sky-4
109400 to-cyan-400 text-white text-xs font-bold flex items-center justify-center shadow-sm",children:"7"}),e.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:"Amount"})]}),e.jsx("div",{className:"bg-slate-50/80 border border-slate-200 rounded-xl px-4 py-4",children:e.jsx("p",{className:"text-2xl font-bold text-slate-800",children:pt(we)})})]})},"amount"),e.jsxs("button",{onClick:ee,disabled:!me,className:` 1095 w-full flex items-center justify-center gap-2 sm:gap-2.5 py-3 sm:py-4 rounded-xl text-xs sm:text-sm font-semibold transition-all duration-200 1096 ${me?"bg-[#1e293b] text-white hover:bg-[#0f172a] shadow-lg hover:shadow-xl active:scale-[0.99]":"bg-slate-300/80 text-slate-400 cursor-not-allowed"} 1097 `,children:[k?e.jsx(Ne,{className:"w-5 h-5 animate-spin"}):e.jsx(Ws,{className:"w-5 h-5"}),k?"Processing...":"Place Order"]})]})}const b6={completed:{label:"COMPLETED",color:"text-emerald-700",bgColor:"bg-emerald-50 border-emerald-200",icon:ne},processing:{label:"PROCESSING",color:"text-sky-700",bgColor:"bg-sky-50 border-sky-200",icon:zs},in_progress:{label:"IN PROGRESS",color:"text-sky-700",bgColor:"bg-sky-50 border-sky-200",icon:zs},pending:{label:"PENDING",color:"text-amber-700",bgColor:"bg-amber-50 border-amber-200",icon:Zu},paid:{label:"PAID",color:"text-blue-700",bgColor:"bg-blue-50 border-blue-200",icon:Ze},refunded:{label:"REFUNDED",color:"text-red-700",bgColor:"bg-red-50 border-red-200",icon:oc},partial:{label:"PARTIAL",color:"text-orange-700",bgColor:"bg-orange-50 border-orange-200",icon:nt},canceled:{label:"CANCELED",color:"text-slate-700",bgColor:"bg-slate-50 border-slate-200",icon:st},failed:{label:"FAILED",color:"text-red-700",bgColor:"bg-red-50 border-red-200",icon:st}};function qf(t){return b6[t]||{label:t.toUpperCase(),color:"text-slate-700",bgColor:"bg-slate-50 border-slate-200",icon:Ze}}function y6(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function j6(t){return new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}function v6(){const{user:t,session:s}=br(),[a,r]=o.useState([]),[l,n]=o.useState(!0),[i,c]=o.useState(!1),[d,x]=o.use
1097State("all");o.useEffect(()=>{t&&m()},[t]),o.useEffect(()=>{if(!t)return;const w=setInterval(()=>{document.visibilityState==="visible"&&m()},3e4),N=()=>{document.visibilityState==="visible"&&t&&m()};return document.addEventListener("visibilitychange",N),()=>{clearInterval(w),document.removeEventListener("visibilitychange",N)}},[t]);const m=async()=>{var w;if(!(!(s!=null&&s.access_token)||!(t!=null&&t.id)))try{const N=await fetch(`https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_user_orders?userId=${t.id}`,{headers:{Authorization:`Bearer ${s.access_token}`,"Content-Type":"application/json"}});if(N.ok){const v=await N.json();r(((w=v.data)==null?void 0:w.orders)||[])}}catch(N){console.error("Failed to fetch orders:",N)}finally{n(!1)}},h=async()=>{c(!0),await m(),c(!1)},f=d==="all"?a:a.filter(w=>w.status===d),y=a.reduce((w,N)=>(w[N.status]=(w[N.status]||0)+1,w),{}),g=[{value:"all",label:"All",count:a.length},...Object.entries(y).map(([w,N])=>({value:w,label:qf(w).label,count:N}))];return l?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(Ne,{className:"w-6 h-6 animate-spin text-sky-500"})}):e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:g.map(w=>e.jsxs("button",{onClick:()=>x(w.value),className:` 1098 px-3.5 py-1.5 rounded-full text-xs font-semibold transition-all 1099 ${d===w.value?"bg-[#1e293b] text-white shadow-md":"bg-slate-100 text-slate-500 hover:bg-slate-200"} 1100 `,children:[w.label," (",w.count,")"]},w.value))}),e.jsx("button",{onClick:h,disabled:i,className:"p-2 rounded-lg bg-slate-100 hover:bg-slate-200 text-slate-500 transition-colors",children:e.jsx(Ve,{className:`w-4 h-4 ${i?"animate-spin":""}`})})]}),f.length===0?e.jsxs("div",{className:"text-center py-16 text-slate-400",children:[e.jsx(us,{className:"w-12 h-12 mx-auto mb-3 opacity-40"}),e.jsx("p",{className:"text-lg font-medium",children:"No orders found"}),e.jsx("p",{className:"text-sm mt-1",children:"Your order history will appear here"})]}):e.jsx("div",{className:"space-y-3",children:f.map(w=>{const N=qf(w.status),v=N.icon;return e.jsxs("div",{className:"bg-white border border-slate-100 rounded-xl p-4 hover:shadow-md transition-shadow",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(fc,{className:"w-3.5 h-3.5 text-slate-400"}),e.jsx("span",{className:"text-xs font-mono text-slate-400",children:w.payment_source==="smm_panel"?w.id.slice(0,8):w.order_number||w.id.slice(0,8)})]}),e.jsx("p",{className:"text-sm font-semibold text-slate-800 truncate",children:w.service_type||w.service_name||"Service"}),e.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:w.platform})]}),e.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-1 rounded-full border text-xs font-semibold ${N.bgColor} ${N.color}`,children:[e.jsx(v,{className:"w-3 h-3"}),N.label]})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase text-slate-400 font-semibold tracking-wide",children:"Quantity"}),e.jsx("p",{className:"text-sm font-semibold text-slate-700",children:Ya(w.quantity)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase text-slate-400 font-semibold tracking-wide",children:"Price"}),e.jsx("p",{className:"text-sm font-semibold text-slate-700",children:pt(w.price)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase text-slate-400 font-semibold tracking-wide",children:"Start Count"}),e.jsx("p",{className:"text-sm font-semibold text-slate-700",children:w.start_count!=null?Ya(w.start_count):"-"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase text-slate-400 font-semibold tracking-wide",children:"Remains"}),e.jsx("p",{className:"text-sm font-semibold text-slate-700",children:w.remains!=null?Ya(w.remains):"-"})]})]}),w.status==="refunded"&&w.refund_amount&&e.jsxs("div",{className:"flex items-center gap-2 bg-emerald-50 border border-emerald-200 rounded-lg px-3 py-2 mb-3",children:[e.jsx(oc,{className:"w-3.5 h-3.5 text-emerald-600"}),e.jsxs("span",{className:"text-xs font-semibold text-emerald-700",children:["Refund: +",pt(w.refund_amount)]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-slate-50",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[e.jsx(Ze,{className:"w-3 h-3"}
1100),y6(w.created_at)," at ",j6(w.created_at)]}),w.link&&e.jsxs("a",{href:w.link.startsWith("http")?w.link:`https://${w.link}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-sky-500 hover:text-sky-600 font-medium transition-colors",children:[e.jsx(Gs,{className:"w-3 h-3"}),w.username||w.link.slice(0,30)]})]})]},w.id)})})]})}function w6(t){return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function N6(t){return new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}function k6(t){switch(t){case"deposit":return{icon:kt,bg:"bg-emerald-100",color:"text-emerald-600"};case"purchase":return{icon:Ws,bg:"bg-sky-100",color:"text-sky-600"};case"refund":return{icon:oc,bg:"bg-amber-100",color:"text-amber-600"};default:return{icon:Jt,bg:"bg-slate-100",color:"text-slate-600"}}}function _6(t){switch(t.transaction_type){case"deposit":return"Balance Deposit";case"purchase":return"Order Payment";case"refund":return"Refund";case"gift_transfer":return"Gift Balance Transfer";default:return t.transaction_type.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase())}}function S6(){const{user:t,session:s}=br(),[a,r]=o.useState([]),[l,n]=o.useState(!0),[i,c]=o.useState("all");o.useEffect(()=>{t&&d()},[t]),o.useEffect(()=>{if(!t)return;const f=setInterval(()=>{document.visibilityState==="visible"&&d()},3e4),y=()=>{document.visibilityState==="visible"&&t&&d()};return document.addEventListener("visibilitychange",y),()=>{clearInterval(f),document.removeEventListener("visibilitychange",y)}},[t]);const d=async()=>{if(t!=null&&t.id)try{const{data:f,error:y}=await Ye.from("wallet_transactions").select("*").eq("user_id",t.id).order("created_at",{ascending:!1}).limit(100);!y&&f&&r(f)}catch(f){console.error("Failed to fetch transactions:",f)}finally{n(!1)}},x=o.useMemo(()=>{const f=a.filter(N=>N.status==="completed"),y=f.filter(N=>N.transaction_type==="deposit").reduce((N,v)=>N+Math.abs(v.amount),0),g=f.filter(N=>N.transaction_type==="purchase").reduce((N,v)=>N+Math.abs(v.amount),0),w=f.filter(N=>N.transaction_type==="refund").reduce((N,v)=>N+Math.abs(v.amount),0);return{deposits:y,spent:g,refunds:w}},[a]),m=o.useMemo(()=>i==="all"?a:a.filter(f=>f.transaction_type===i),[a,i]),h=[{value:"all",label:"All"},{value:"deposit",label:"Deposits"},{value:"purchase",label:"Payments"},{value:"refund",label:"Refunds"}];return l?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(Ne,{className:"w-6 h-6 animate-spin text-sky-500"})}):e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-bold text-slate-800 mb-5",children:"Transaction History"}),e.jsx("div",{className:"flex items-center gap-2 mb-5 flex-wrap",children:h.map(f=>e.jsx("button",{onClick:()=>c(f.value),className:` 1101 px-4 py-2 rounded-full text-xs font-semibold transition-all 1102 ${i===f.value?"bg-[#1e293b] text-white shadow-md":"bg-slate-100 text-slate-500 hover:bg-slate-200"} 1103 `,children:f.label},f.value))}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-white border border-slate-100 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-emerald-100 flex items-center justify-center",children:e.jsx(tt,{className:"w-4 h-4 text-emerald-600"})}),e.jsx("span",{className:"text-xs text-slate-400 font-semibold uppercase tracking-wide",children:"Total Deposits"})]}),e.jsx("p",{className:"text-xl font-bold text-emerald-600",children:pt(x.deposits)})]}),e.jsxs("div",{className:"bg-white border border-slate-100 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-sky-100 flex items-center justify-center",children:e.jsx(Nt,{className:"w-4 h-4 text-sky-600"})}),e.jsx("span",{className:"text-xs text-slate-400 font-semibold uppercase tracking-wide",children:"Total Spent"})]}),e.jsx("p",{className:"text-xl font-bold text-sky-600",children:pt(x.spent)})]}),e.jsxs("div",{className:"bg-white border border-slate-100 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-amber-100 flex items-center justify-center",children:e.jsx(Ve,{className:"w-4 h-4 text-amber-600"})}),e.jsx("span",{className:"text-xs text-slate-400 font-semibold uppercase tracking-wide",children:"Total Refunds"})]}),e.jsx("p",{className:"text-xl font-bold text-amber-600",children:pt(x.refunds)})]})]}),m.length===0?e.jsxs("div",{className:"text-center py-12 text-slate-400",children:[e.jsx(Jt,{className:"w-12 h-12 mx-auto mb-3 opacity-40"}),e.jsx("p",{className:"text-lg font-medium",children:"No transactions yet"}),e.jsx("p",{className:"text-sm mt-1",children:"Your transaction history will appear here"})]}):e.jsx("div",{className:"space-y-1",children:m.map(f=>{const y=k6(f.transaction_type),g=y.icon,w=f.transaction_type==="deposit"||f.transaction_type==="refund"||f.transaction_type==="gift_transfer";return e.jsxs("div",{className:"flex items-center gap-3 px-3 py-3 rounded-xl hover:bg-slate-50 transition-colors",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl ${y.bg} flex items-center justify-center shrink-0`,children:e.jsx(g,{className:`w-4.5 h-4.5 ${y.color}`})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-slate-800",children:_6(f)}),e.jsx("p",{className:"text-xs text-slate-400 truncate",children:f.description||f.payment_method})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsxs("p",{className:`text-sm font-bold ${w?"text-emerald-600":"text-slate-800"}`,children:[w?"+":"-",pt(Math.abs(f.amount))]}),e.jsxs("p",{className:"text-[10px] text-slate-400",children:[w6(f.created_at)," ",N6(f.created_at)]})]})]},f.id)})})]})}const C6=[{id:"new-order",label:"New Order",icon:Ws},{id:"order-history",label:"Order History",icon:Ze,authRequired:!0},{id:"overview",label:"Overview",icon:Ia,authRequired:!0}],I6=[{id:"new-order",label:"New Order",icon:Ws},{id:"order-history",label:"Order History",icon:Ze},{id:"overview",label:"Overview",icon:Ia}];function Gf({onOpenWallet:t,onAuthRequired:s,isGuest:a=!1}){const[r,l]=o.useState("new-order");o.useState("new-order"),br();const n=a?C6:I6,i=c=>{if(c.authRequired&&a&&s){s();return}l(c.id)};return e.jsx("div",{className:"w-full max-w-5xl mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-sm border border-slate-100",children:[e.jsx("div",{className:"px-3 sm:px-6 pt-3 sm:pt-5 pb-1.5 sm:pb-3",children:e.jsx("div",{className:"flex items-center gap-1 sm:gap-3",children:n.map(c=>{const d=c.icon,x=r===c.id;return e.jsxs("button",{onClick:()=>i(c),className:` 1104 flex items-center gap-1.5 sm:gap-2 px-3.5 sm:px-6 py-2 sm:py-3 rounded-full text-xs sm:text-sm font-semibold whitespace-nowrap transition-all 1105 ${x?"bg-[#1e3a5f] text-white shadow-md":"text-slate-500 hover:text-slate-700 hover:bg-slate-50"} 1106 `,children:[e.jsx(d,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"}),c.label]},c.id)})})}),e.jsxs("div",{className:"p-3 sm:p-5 md:p-6",children:[r==="new-order"&&e.jsx(g6,{onOpenWallet:t,isGuest:a,onAuthRequired:s}
1106),r==="order-history"&&!a&&e.jsx(v6,{}),r==="overview"&&!a&&e.jsx(S6,{})]})]})})}function T6({onGetStarted:t}){o.useEffect(()=>{document.title="Buy Instagram Followers USA â Real & Safe Followers | Follx";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","Buy real Instagram followers in the USA with instant delivery. 100% safe, no password required, trusted Instagram growth service.")},[]);const s=[{count:"100",price:"$2.99",popular:!1},{count:"500",price:"$9.99",popular:!1},{count:"1,000",price:"$14.99",popular:!0},{count:"5,000",price:"$49.99",popular:!1},{count:"10,000",price:"$89.99",popular:!1}],a=[{icon:lt,title:"Safe & Secure",description:"Your account security is our priority. No password required."},{icon:rt,title:"Instant Delivery",description:"Start receiving followers within minutes of your order."},{icon:mt,title:"Real Followers",description:"Active users from the USA who engage with content."},{icon:qs,title:"Trusted Service",description:"Over 500,000 satisfied customers worldwide."},{icon:Ze,title:"24/7 Support",description:"Our team is always ready to help you succeed."},{icon:$t,title:"Privacy Protected",description:"Your information is never shared with third parties."}],r=[{question:"Is it safe to buy Instagram followers in the USA?",answer:"Yes, buying Instagram followers from Follx is completely safe. We use secure methods that comply with platform guidelines. Your account information is never at risk, and we never ask for your password."},{question:"How fast will I receive my followers?",answer:"Delivery begins within minutes of completing your order. Most orders are fully delivered within 1-24 hours depending on the package size. We use gradual delivery to ensure natural-looking growth."},{question:"Are the followers real people from the USA?",answer:"Yes, we provide real Instagram followers from active accounts. Our USA-focused packages specifically target users located in the United States to help you build a relevant audience."},{question:"Do you need my Instagram password?",answer:"No, we never ask for your password. We only need your Instagram username or profile link to deliver followers. Your account security remains completely in your control."},{question:"What if my followers drop?",answer:"Our followers have a very low drop rate. However, if you experience any drops within 30 days, we offer free refills to ensure you maintain your follower count."},{question:"Is there a money-back guarantee?",answer:"Yes, we offer a 30-day money-back guarantee on all purchases. If you are not satisfied with our service or do not receive your followers, we will provide a full refund."}],l={"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer}}))};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-50 to-rose-50 py-16 lg:py-24",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-rose-200 rounded-full opacity-20 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-pink-200 rounded-full opacity-20 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-rose-100 text-rose-700 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx(wt,{className:"w-4 h-4"}
1106),"Trusted by 500,000+ USA Customers"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-slate-900 leading-tight mb-6",children:"Buy Real Instagram Followers in the USA"}),e.jsx("p",{className:"text-xl text-slate-600 mb-8 leading-relaxed",children:"Grow your Instagram presence with real, active followers from the United States. Instant delivery, no password required, and 100% safe service."}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-gradient-to-r from-rose-500 to-pink-600 text-white px-8 py-4 rounded-xl font-semibold hover:from-rose-600 hover:to-pink-700 transition-all shadow-lg shadow-rose-500/25 flex items-center justify-center gap-2",children:["Buy Instagram Followers Now",e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsxs("div",{className:"flex items-center justify-center gap-6 mt-8 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"No Password Required"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"Instant Delivery"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"30-Day Guarantee"]})]})]})})]}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Why Buy Instagram Followers in the USA?"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"A strong follower count builds credibility and attracts more organic growth. USA-based followers help you reach your target audience effectively."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:a.map((n,i)=>e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-8 hover:bg-rose-50 transition-all group",children:[e.jsx("div",{className:"w-14 h-14 bg-rose-100 rounded-xl flex items-center justify-center mb-6 group-hover:bg-rose-500 transition-colors",children:e.jsx(n.icon,{className:"w-7 h-7 text-rose-600 group-hover:text-white transition-colors"})}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-3",children:n.title}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:n.description})]},i))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Real & Active Instagram Followers"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"We deliver authentic followers who have real profiles and genuine activity. No bots, no fake accounts, just real growth for your Instagram."})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Authentic Profiles"}),e.jsx("p",{className:"text-slate-600",children:"Every follower has a complete profile with posts and activity."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"USA-Based Users"}),e.jsx("p",{className:"text-slate-600",children:"Followers from the United States for targeted growth."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Gradual Delivery"}),e.jsx("p",{className:"text-slate-600",children:"Natural-looking growth that mimics organic patterns."})]})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-rose-500 to-pink-600 rounded-full flex items-center justify-center",children:e.jsx(mt,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-slate-900",children:"500,000+"}),e.jsx("div",{className:"text-sm text-slate-500",children:"Satisfied Customers"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Customer Satisfaction"}),e.jsx("span",{className:"font-semibold text-slate-900",children:"98%"})]}),e.jsx("div",{className:"w-full bg-slate-100 rounded-full h-2",children:e.jsx("div",{className:"bg-gradient-to-r from-rose-500 to-pink-600 h-2 rounded-full",style:{width:"98%"}})}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Delivery Success Rate"}),e.jsx("span",{className:"font-semibold text-slate-900",children:"99.9%"})]}),e.jsx("div",{className:"w-full bg-slate-100 rounded-full h-2",children:e.jsx("div",{className:"bg-gradient-to-r from-rose-500 to-pink-600 h-2 rounded-full",style:{width:"99.9%"}})})]})]})]})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Instant Delivery â No Password Required"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Your security matters. We deliver followers using only your public username. Start seeing results within minutes of placing your order."})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-rose-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:e.jsx("span",{className:"text-2xl font-bold text-rose-600",children:"1"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Choose Your Package"}),e.jsx("p",{className:"text-slate-600",children:"Select the follower package that fits your goals and budget."})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-rose-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:e.jsx("span",{className:"text-2xl font-bold text-rose-600",children:"2"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Enter Your Username"}),e.jsx("p",{className:"text-slate-600",children:"Provide your Instagram username. No password needed."})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-rose-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:e.jsx("span",{className:"text-2xl font-bold text-rose-600",children:"3"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Receive Followers"}),e.jsx("p",{className:"text-slate-600",children:"Watch your follower count grow within minutes."})]})]})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-br from-slate-900 to-slate-800",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Trusted Instagram Growth Service"}),e.jsx("p",{className:"text-lg text-slate-300 max-w-2xl mx-auto",children:"Join hundreds of thousands who have trusted Follx for their Instagram growth."})]}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-6",children:[e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-6 text-center",children:[e.jsx("div",{className:"text-3xl font-bold text-white mb-2",children:"500K+"}),e.jsx("div",{className:"text-slate-300",children:"Happy Customers"})]}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-6 text-center",children:[e.jsx("div",{className:"text-3xl font-bold text-white mb-2",children:"50M+"}),e.jsx("div",{className:"text-slate-300",children:"Followers Delivered"})]}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-6 text-center",children:[e.jsx("div",{className:"text-3xl font-bold text-white mb-2",children:"24/7"}),e.jsx("div",{className:"text-slate-300",children:"Customer Support"})]}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-6 text-center",children:[e.jsx("div",{className:"text-3xl font-bold text-white mb-2",children:"30-Day"}),e.jsx("div",{className:"text-slate-300",children:"Money-Back Guarantee"})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Pricing & Packages"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Affordable packages for every budget. All plans include instant delivery and 24/7 support."})]}
1106),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-5 gap-4",children:s.map((n,i)=>e.jsxs("div",{className:`relative rounded-2xl p-6 ${n.popular?"bg-gradient-to-br from-rose-500 to-pink-600 text-white shadow-xl scale-105":"bg-white border border-slate-200"}`,children:[n.popular&&e.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-amber-400 text-amber-900 text-xs font-bold px-3 py-1 rounded-full",children:"MOST POPULAR"}),e.jsx("div",{className:`text-3xl font-bold mb-1 ${n.popular?"text-white":"text-slate-900"}`,children:n.count}),e.jsx("div",{className:`text-sm mb-4 ${n.popular?"text-rose-100":"text-slate-500"}`,children:"Followers"}),e.jsx("div",{className:`text-2xl font-bold mb-4 ${n.popular?"text-white":"text-slate-900"}`,children:n.price}),e.jsx("button",{onClick:t,className:`w-full py-2.5 rounded-lg font-medium transition-all ${n.popular?"bg-white text-rose-600 hover:bg-rose-50":"bg-rose-500 text-white hover:bg-rose-600"}`,children:"Buy Now"})]},i))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Frequently Asked Questions"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Everything you need to know about buying Instagram followers in the USA."})]}),e.jsx("div",{className:"space-y-4",children:r.map((n,i)=>e.jsx("div",{className:"bg-slate-50 rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:n.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:n.answer})})]})},i))})]})}),e.jsx("section",{className:"py-12 bg-slate-100",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsxs("p",{className:"text-slate-600 mb-4",children:["Looking for comparisons? See how Follx performs against other platforms:"," ",e.jsx("a",{href:"/buzzoid-vs-follx",className:"text-rose-600 hover:text-rose-700 underline",children:"Follx vs Buzzoid"})," and"," ",e.jsx("a",{href:"/stormlikes-vs-follx",className:"text-rose-600 hover:text-rose-700 underline",children:"Follx vs Stormlikes"}),"."]}),e.jsxs("p",{className:"text-slate-600",children:["Many users compare multiple platforms before choosing a service. Our guide to the"," ",e.jsx("a",{href:"/best-instagram-growth-service-alternatives",className:"text-rose-600 hover:text-rose-700 underline",children:"best Instagram growth service alternatives"})," ","explains the safest and most trusted options for USA users."]})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-rose-500 to-pink-600",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Ready to Grow Your Instagram?"}),e.jsx("p",{className:"text-lg text-rose-100 mb-8 max-w-2xl mx-auto",children:"Join 500,000+ satisfied customers. Get real USA Instagram followers today."}),e.jsxs("button",{onClick:t,className:"bg-white text-rose-600 px-8 py-4 rounded-xl font-semibold hover:bg-rose-50 transition-all shadow-lg flex items-center justify-center gap-2 mx-auto",children:["Buy Instagram Followers Now",e.jsx(Yt,{className:"w-5 h-5"})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"The trusted Instagram growth service for influencers, brands, and businesses in the USA."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-usa",className:"hover:text-white transition-colors",children:"Instagram Followers USA"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/instagram-growth-service",className:"hover:text-white transition-colors",children:"Instagram Growth Service"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"})}),e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition-colors",children:"Blog"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function P6({onGetStarted:t}){o.useEffect(()=>{document.title="Buy Real Instagram Followers â #1 Safe & Authentic Growth | Follx 2025";const n=document.querySelector('meta[name="description"]');if(n&&n.setAttribute("content","Get real and active Instagram followers with safe delivery. No bots, no password, instant results with Follx. 100% authentic followers. Trusted by 500K+ customers. 30-day refill guarantee."),!document.querySelector('meta[name="keywords"]')){const d=document.createElement("meta");d.name="keywords",d.content="real instagram followers, buy real followers, authentic instagram followers, active instagram followers, real followers instagram",document.head.appendChild(d)}if(!document.querySelector('link[rel="canonical"]')){const d=document.createElement("link");d.rel="canonical",d.href="https://follx.com/real-instagram-followers",document.head.appendChild(d)}},[]);const s=[{icon:mt,title:"Influencers",description:"Build credibility and attract brand partnerships with a larger audience."},{icon:sr,title:"Businesses",description:"Increase brand awareness and reach more potential customers."},{icon:ia,title:"Content Creators",description:"Grow your community and get your content seen by more people."}
1106,{icon:Vt,title:"Artists & Musicians",description:"Expand your fan base and share your creative work with the world."}],a=[{count:"100",price:"$2.99"},{count:"500",price:"$9.99"},{count:"1,000",price:"$14.99",popular:!0},{count:"2,500",price:"$29.99"},{count:"5,000",price:"$49.99"}],r=[{question:"What are real Instagram followers?",answer:"Real Instagram followers are authentic users with genuine profiles, posts, and activity. Unlike bots or fake accounts, real followers have complete profiles with photos, bios, and regular engagement. At Follx, we only deliver real followers to ensure your account grows safely and naturally."},{question:"How do real followers benefit my account?",answer:"Real followers provide genuine engagement, improve your credibility, and help attract more organic followers. They contribute to higher engagement rates, better algorithmic performance, and increased visibility. Real followers also help build trust with brands for potential partnerships."},{question:"Do you need my password to deliver followers?",answer:"No, we never ask for your password. We only need your public Instagram username to deliver followers. Your account security remains completely under your control, and we follow safe practices that comply with platform guidelines."},{question:"How long does delivery take?",answer:"Delivery begins within minutes of your order. Most packages are fully delivered within 1-24 hours depending on size. We use gradual delivery to ensure natural-looking growth that mimics organic patterns."},{question:"Are there any risks to my account?",answer:"No, buying real followers from Follx is completely safe. We use methods that comply with platform guidelines and never put your account at risk. We have delivered followers to over 500,000 accounts without any issues."},{question:"What if I lose followers?",answer:"Real followers have a very low drop rate. However, if you experience any drops within 30 days, we provide free refills at no additional cost. Our goal is to ensure you are completely satisfied with your purchase."}],l={"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer}}))};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-50 to-emerald-50 py-16 lg:py-24",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-emerald-200 rounded-full opacity-20 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-teal-200 rounded-full opacity-20 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-emerald-100 text-emerald-700 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx(ne,{className:"w-4 h-4"}),"100% Real & Active Followers"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-slate-900 leading-tight mb-6",children:"Buy Real Instagram Followers"}),e.jsx("p",{className:"text-xl text-slate-600 mb-8 leading-relaxed",children:"Grow your Instagram with authentic, active followers. No bots, no fake accounts. Safe delivery with no password required."}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-gradient-to-r from-emerald-500 to-teal-600 text-white px-8 py-4 rounded-xl font-semibold hover:from-emerald-600 hover:to-teal-700 transition-all shadow-lg shadow-emerald-500/25 flex items-center justify-center gap-2",children:["Get Real Instagram Followers",e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsxs("div",{className:"flex items-center justify-center gap-6 mt-8 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"Real Active Users"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"No Bots"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}
1106),"Safe & Secure"]})]})]})})]}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"What Are Real Instagram Followers?"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-3xl mx-auto",children:"Real Instagram followers are authentic users with genuine profiles, posts, and regular activity. Unlike bots or fake accounts that can harm your engagement, real followers provide value to your account."})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-emerald-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(mt,{className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Complete Profiles"}),e.jsx("p",{className:"text-slate-600",children:"Every follower has a real profile picture, bio, posts, and followers of their own."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-emerald-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(ia,{className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Genuine Activity"}),e.jsx("p",{className:"text-slate-600",children:"Real users who actively use Instagram and engage with content regularly."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-emerald-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(lt,{className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Safe for Your Account"}),e.jsx("p",{className:"text-slate-600",children:"No risk to your account. Our methods comply with platform guidelines."})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-emerald-500 to-teal-600 rounded-2xl p-8 text-white",children:[e.jsx("h3",{className:"text-2xl font-bold mb-6",children:"Real vs Fake Followers"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-emerald-200"}),e.jsx("span",{children:"Real followers improve engagement rates"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-emerald-200"}),e.jsx("span",{children:"Real followers stay on your account longer"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-emerald-200"}),e.jsx("span",{children:"Real followers help attract organic growth"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-emerald-200"}),e.jsx("span",{children:"Real followers build credibility with brands"})]})]})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Benefits of Real Followers for Your Account"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Real followers provide long-term value and help your Instagram grow organically."})]}),e.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[e.jsx("div",{className:"w-12 h-12 bg-emerald-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(tt,{className:"w-6 h-6 text-emerald-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Higher Engagement"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Real followers interact with your content, boosting your engagement rate."})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[e.jsx("div",{className:"w-12 h-12 bg-emerald-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(qs,{className:"w-6 h-6 text-emerald-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Increased Credibility"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"A larger follower count builds trust with visitors and potential partners."})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[e.jsx("div",{className:"w-12 h-12 bg-emerald-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(sr,{className:"w-6 h-6 text-emerald-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Better Visibility"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"More followers help your posts reach the Explore page and new audiences."})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm",children:[e.jsx("div",{className:"w-12 h-12 bg-emerald-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(Vt,{className:"w-6 h-6 text-emerald-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Organic Growth"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Real followers attract more real followers through social proof."})]})]})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Safe Instagram Growth Without Password"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"We never ask for your password. Your account security is always protected."})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-emerald-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:e.jsx($t,{className:"w-8 h-8 text-emerald-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"No Password Required"}),e.jsx("p",{className:"text-slate-600",children:"We only need your public username to deliver followers."})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-emerald-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:e.jsx(lt,{className:"w-8 h-8 text-emerald-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Secure Methods"}),e.jsx("p",{className:"text-slate-600",children:"Our delivery methods comply with platform guidelines."})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-emerald-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:e.jsx(rt,{className:"w-8 h-8 text-emerald-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Instant Delivery"}),e.jsx("p",{className:"text-slate-600",children:"Start receiving followers within minutes of your order."})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Who Is This Service For?"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Real Instagram followers benefit everyone looking to grow their presence."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:s.map((n,i)=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 hover:shadow-lg transition-shadow",children:[e.jsx("div",{className:"w-12 h-12 bg-emerald-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(n.icon,{className:"w-6 h-6 text-emerald-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:n.title}),e.jsx("p",{className:"text-slate-600 text-sm",children:n.description})]},i))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Pricing Options"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Choose the package that fits your goals. All include real followers and instant delivery."})]}
1106),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-5 gap-4",children:a.map((n,i)=>e.jsxs("div",{className:`relative rounded-2xl p-6 ${n.popular?"bg-gradient-to-br from-emerald-500 to-teal-600 text-white shadow-xl scale-105":"bg-slate-50 border border-slate-200"}`,children:[n.popular&&e.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-amber-400 text-amber-900 text-xs font-bold px-3 py-1 rounded-full",children:"BEST VALUE"}),e.jsx("div",{className:`text-3xl font-bold mb-1 ${n.popular?"text-white":"text-slate-900"}`,children:n.count}),e.jsx("div",{className:`text-sm mb-4 ${n.popular?"text-emerald-100":"text-slate-500"}`,children:"Followers"}),e.jsx("div",{className:`text-2xl font-bold mb-4 ${n.popular?"text-white":"text-slate-900"}`,children:n.price}),e.jsx("button",{onClick:t,className:`w-full py-2.5 rounded-lg font-medium transition-all ${n.popular?"bg-white text-emerald-600 hover:bg-emerald-50":"bg-emerald-500 text-white hover:bg-emerald-600"}`,children:"Buy Now"})]},i))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"FAQs"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Common questions about buying real Instagram followers."})]}),e.jsx("div",{className:"space-y-4",children:r.map((n,i)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:n.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:n.answer})})]})},i))})]})}),e.jsx("section",{className:"py-12 bg-white",children:e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:e.jsxs("p",{className:"text-slate-600",children:["Choosing the right growth service matters. For a comprehensive overview of trusted options, explore our list of"," ",e.jsx("a",{href:"/best-instagram-growth-service-alternatives",className:"text-emerald-600 hover:text-emerald-700 underline",children:"Instagram growth service alternatives"})," ","to help you make an informed decision."]})})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-emerald-500 to-teal-600",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Get Real Instagram Followers Today"}),e.jsx("p",{className:"text-lg text-emerald-100 mb-8 max-w-2xl mx-auto",children:"Start growing with authentic followers. Safe, fast, and trusted by 500,000+ customers."}),e.jsxs("button",{onClick:t,className:"bg-white text-emerald-600 px-8 py-4 rounded-xl font-semibold hover:bg-emerald-50 transition-all shadow-lg flex items-center justify-center gap-2 mx-auto",children:["Get Real Instagram Followers",e.jsx(Yt,{className:"w-5 h-5"})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"The trusted source for real Instagram followers. Safe, fast, and reliable."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-usa",className:"hover:text-white transition-colors",children:"Instagram Followers USA"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/instagram-growth-service",className:"hover:text-white transition-colors",children:"Instagram Growth Service"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"})}),e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition-colors",children:"Blog"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function A6({onGetStarted:t}){o.useEffect(()=>{document.title="Cheap Instagram Followers â Affordable & Safe Growth | Follx";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","Buy cheap Instagram followers with fast delivery. Affordable pricing, real users, and safe Instagram growth service.")},[]);const s=[{count:"100",price:"$1.99",pricePerFollower:"$0.02"},{count:"500",price:"$7.99",pricePerFollower:"$0.016"},{count:"1,000",price:"$12.99",pricePerFollower:"$0.013",popular:!0},{count:"2,500",price:"$24.99",pricePerFollower:"$0.01"},{count:"5,000",price:"$39.99",pricePerFollower:"$0.008"},{count:"10,000",price:"$69.99",pricePerFollower:"$0.007"}],a=[{cheap:"Real profiles with photos and bios",fake:"Empty profiles or bots"},{cheap:"Gradual, natural delivery",fake:"Instant mass delivery that looks suspicious"},{cheap:"Stay on your account long-term",fake:"Drop quickly after delivery"},{cheap:"Safe for your account",fake:"Can trigger account flags"},{cheap:"Help improve engagement",fake:"Hurt your engagement rate"}],r=[{question:"Are cheap Instagram followers real?",answer:"Yes, at Follx our
1106cheap Instagram followers are real users with authentic profiles. We offer affordable pricing through efficient delivery systems, not by compromising on quality. You get the same real followers at a better price."},{question:"What is the difference between cheap and fake followers?",answer:"Cheap followers from Follx are real users offered at competitive prices. Fake followers are bots or inactive accounts that can harm your engagement rate and potentially trigger account issues. We only deliver real, active followers regardless of the price point."},{question:"Why are your prices so affordable?",answer:"We have built an efficient delivery system that allows us to offer competitive prices while maintaining quality. Our scale and experience help us keep costs low and pass the savings to our customers."},{question:"Is it safe to buy cheap followers?",answer:"Buying cheap followers from Follx is completely safe. We use the same secure delivery methods for all our packages. Your account security is never compromised, and we never ask for your password."},{question:"How fast will I receive my followers?",answer:"Delivery begins within minutes of your order. We use gradual delivery to ensure natural-looking growth. Most orders are completed within 1-24 hours depending on the package size."},{question:"Do you offer bulk discounts?",answer:"Yes, our per-follower price decreases as you buy larger packages. For example, our 10,000 follower package costs less than $0.01 per follower, making it one of the best values available."}],l={"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer}}))};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-50 to-amber-50 py-16 lg:py-24",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-amber-200 rounded-full opacity-20 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-orange-200 rounded-full opacity-20 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-amber-100 text-amber-700 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx(Jt,{className:"w-4 h-4"}),"Starting at Just $1.99"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-slate-900 leading-tight mb-6",children:"Cheap Instagram Followers That Are Safe & Real"}),e.jsx("p",{className:"text-xl text-slate-600 mb-8 leading-relaxed",children:"Affordable Instagram growth without compromising quality. Get real followers at the best prices with instant delivery."}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-gradient-to-r from-amber-500 to-orange-600 text-white px-8 py-4 rounded-xl font-semibold hover:from-amber-600 hover:to-orange-700 transition-all shadow-lg shadow-amber-500/25 flex items-center justify-center gap-2",children:["Buy Cheap Instagram Followers",e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsxs("div",{className:"flex items-center justify-center gap-6 mt-8 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"Real Followers"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"Best Prices"]}
1106),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"Safe Delivery"]})]})]})})]}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Affordable Instagram Growth Solutions"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"We believe Instagram growth should be accessible to everyone. Our efficient systems allow us to offer the best prices without sacrificing quality."})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-amber-50 rounded-2xl p-8 text-center",children:[e.jsx("div",{className:"w-14 h-14 bg-amber-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:e.jsx(Jt,{className:"w-7 h-7 text-amber-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Budget-Friendly"}),e.jsx("p",{className:"text-slate-600",children:"Packages starting from just $1.99 for any budget."})]}),e.jsxs("div",{className:"bg-amber-50 rounded-2xl p-8 text-center",children:[e.jsx("div",{className:"w-14 h-14 bg-amber-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:e.jsx(mt,{className:"w-7 h-7 text-amber-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Real Followers"}),e.jsx("p",{className:"text-slate-600",children:"Authentic users with complete profiles, not bots."})]}),e.jsxs("div",{className:"bg-amber-50 rounded-2xl p-8 text-center",children:[e.jsx("div",{className:"w-14 h-14 bg-amber-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:e.jsx(rt,{className:"w-7 h-7 text-amber-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Instant Delivery"}),e.jsx("p",{className:"text-slate-600",children:"Start receiving followers within minutes."})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Cheap vs Fake Followers (Important Difference)"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Not all affordable followers are the same. Here is what sets us apart."})]}),e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[e.jsx("div",{className:"bg-green-100 rounded-xl p-4 text-center",children:e.jsx("span",{className:"font-semibold text-green-800",children:"Cheap (Follx)"})}),e.jsx("div",{className:"bg-red-100 rounded-xl p-4 text-center",children:e.jsx("span",{className:"font-semibold text-red-800",children:"Fake (Others)"})})]}),a.map((n,i)=>e.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-3",children:[e.jsxs("div",{className:"bg-white rounded-xl p-4 flex items-center gap-3 border border-green-200",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0"}),e.jsx("span",{className:"text-slate-700 text-sm",children:n.cheap})]}),e.jsxs("div",{className:"bg-white rounded-xl p-4 flex items-center gap-3 border border-red-200",children:[e.jsx(Fs,{className:"w-5 h-5 text-red-500 flex-shrink-0"}),e.jsx("span",{className:"text-slate-700 text-sm",children:n.fake})]})]},i))]})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Safe & Budget-Friendly Packages"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Every package includes real followers, instant delivery, and our 30-day guarantee."})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(lt,{className:"w-8 h-8 text-amber-500"}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"100% Safe"})]}),e.jsx("p",{className:"text-slate-600",children:"No password required. Your account security is never at risk."})]}),e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(Ze,{className:"w-8 h-8 text-amber-500"}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"30-Day Guarantee"})]}),e.jsx("p",{className:"text-slate-600",children:"Free refills if you experience any drops within 30 days."})]}),e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(qs,{className:"w-8 h-8 text-amber-500"}),e.jsx("h3",{className:"font-semibold text-slate-900",children:"Quality Guaranteed"})]}),e.jsx("p",{className:"text-slate-600",children:"Real followers with complete profiles, regardless of price."})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Instant Delivery Explained"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Our efficient system delivers followers quickly while maintaining natural growth patterns."})]}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-6 text-center",children:[e.jsxs("div",{children:[e.jsx("div",{className:"w-12 h-12 bg-amber-500 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:"1"}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Place Order"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Select your package and enter your username."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"w-12 h-12 bg-amber-500 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:"2"}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Processing"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"We verify your profile and prepare delivery."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"w-12 h-12 bg-amber-500 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:"3"}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Delivery Starts"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Followers begin arriving within minutes."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"w-12 h-12 bg-amber-500 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:"4"}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:"Complete"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Full delivery within 1-24 hours."})]})]})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-br from-amber-500 to-orange-600",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Pricing Table"}),e.jsx("p",{className:"text-lg text-amber-100 max-w-2xl mx-auto",children:"The best value for Instagram followers. Bigger packages = bigger savings."})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map((n,i)=>e.jsxs("div",{className:`relative rounded-2xl p-6 ${n.popular?"bg-white shadow-xl scale-105":"bg-white/90"}`,children:[n.popular&&e.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-rose-500 text-white text-xs font-bold px-3 py-1 rounded-full",children:"MOST POPULAR"}),e.jsx("div",{className:"text-3xl font-bold text-slate-900 mb-1",children:n.count}),e.jsx("div",{className:"text-sm text-slate-500 mb-2",children:"Followers"}),e.jsx("div",{className:"text-2xl font-bold text-amber-600 mb-1",children:n.price}),e.jsxs("div",{className:"text-xs text-slate-400 mb-4",children:[n.pricePerFollower," per follower"]}),e.jsx("button",{onClick:t,className:"w-full py-2.5 bg-gradient-to-r from-amber-500 to-orange-600 text-white rounded-lg font-medium hover:from-amber-600 hover:to-orange-700 transition-all",children:"Buy Now"})]},i))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"FAQs"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Common questions about cheap Instagram followers."})]}),e.jsx("div",{className:"space-y-4",children:r.map((n,i)=>e.jsx("div",{className:"bg-slate-50 rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:n.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:n.answer})})]})},i))})]})}),e.jsx("section",{className:"py-12 bg-white",children:e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:e.jsxs("p",{className:"text-slate-600",children:["Want to compare pricing and features across providers? Our guide to the"," ",e.jsx("a",{href:"/best-instagram-growth-service-alternatives",className:"text-amber-600 hover:text-amber-700 underline",children:"best Instagram growth service alternatives"})," ","covers the safest and most affordable options available in the USA market."]})})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-amber-500 to-orange-600",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Start Growing for Less"}),e.jsx("p",{className:"text-lg text-amber-100 mb-8 max-w-2xl mx-auto",children:"Affordable, safe, and real. Get the best value for Instagram followers today."}),e.jsxs("button",{onClick:t,className:"bg-white text-amber-600 px-8 py-4 rounded-xl font-semibold hover:bg-amber-50 transition-all shadow-lg flex items-center justify-center gap-2 mx-auto",children:["Buy Cheap Instagram Followers",e.jsx(Yt,{className:"w-5 h-5"})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"Affordable Instagram growth with real followers. Quality service at budget prices."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-usa",className:"hover:text-white transition-colors",children:"Instagram Followers USA"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/instagram-growth-service",className:"hover:text-white transition-colors",children:"Instagram Growth Service"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"})}),e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition-colors",children:"Blog"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function M6({onGetStarted:t}){o.useEffect(()=>{document.title="Instagram Growth Service â #1 Real Followers & Safe Growth | Follx 2025";const i=document.querySelector('meta[name="description"]');if(i&&i.setAttribute("content","Professional Instagram growth service with real followers. Trusted by 500K+ users worldwide. No password required. Instant delivery. 30-day guarantee. Best Instagram growth service since 2019."),!document.querySelector('meta[name="keywords"]')){const x=document.createElement("meta");x.name="keywords",x.content="instagram growth service, instagram growth, grow instagram, instagram followers service, instagram marketing, social media growth",document.head.appendChild(x)}if(!document.querySelector('link[rel="canonical"]')){const x=document.createElement("link");x.rel="canonical",x.href="https://follx.com/instagram-growth-service",document.head.appendChild(x)}},[]);
1106const s=[{step:"01",title:"Choose Your Plan",description:"Select a growth package that matches your goals and budget."},{step:"02",title:"Enter Your Username",description:"Provide your Instagram username. No password needed."},{step:"03",title:"We Start Growing",description:"Our system begins delivering real followers to your account."},{step:"04",title:"Watch Your Growth",description:"See your follower count increase with real, active users."}],a=[{icon:Zt,title:"Influencers",description:"Build your personal brand and attract sponsorship opportunities."},{icon:sa,title:"Brands",description:"Increase brand awareness and reach more potential customers."},{icon:sr,title:"Businesses",description:"Drive sales and grow your customer base through Instagram."},{icon:Vt,title:"Content Creators",description:"Get your creative work seen by a larger audience."}],r=[{name:"Starter",followers:"1,000",price:"$14.99",features:["Real Followers","Instant Delivery","24/7 Support"]},{name:"Growth",followers:"5,000",price:"$49.99",features:["Real Followers","Priority Delivery","24/7 Support","30-Day Guarantee"],popular:!0},{name:"Professional",followers:"10,000",price:"$89.99",features:["Real Followers","Priority Delivery","VIP Support","30-Day Guarantee","Free Refills"]}],l=[{question:"How does your Instagram growth service work?",answer:"Our Instagram growth service delivers real followers to your account through safe, platform-compliant methods. Simply provide your username, choose a package, and we handle the rest. No password is ever required, and delivery begins within minutes."},{question:"Is your growth service organic?",answer:"We use organic-like growth strategies that deliver real followers gradually over time. This mimics natural growth patterns and keeps your account safe. The followers we deliver are real users with authentic profiles."},{question:"Do you need access to my Instagram account?",answer:"No, we never need access to your account. We only require your public Instagram username. Your password and login credentials are never requested, ensuring your account remains completely secure."},{question:"How long does it take to see results?",answer:"Results begin within minutes of placing your order. We use gradual delivery to ensure natural growth patterns, with most orders completing within 1-24 hours depending on package size."},{question:"Is this service safe for my account?",answer:"Yes, our Instagram growth service is completely safe. We use methods that comply with platform guidelines and have successfully helped over 500,000 accounts grow without any issues."},{question:"Do you offer ongoing growth services?",answer:"Yes, many customers use our service regularly to maintain consistent growth. Our packages can be purchased as needed, and we offer volume discounts for larger orders."}],n={"@context":"https://schema.org","@type":"FAQPage",mainEntity:l.map(i=>({"@type":"Question",name:i.question,acceptedAnswer:{"@type":"Answer",text:i.answer}}))};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-900 to-slate-800 py-16 lg:py-24",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-blue-500 rounded-full opacity-10 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-cyan-500 rounded-full opacity-10 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-blue-500/20 text-blue-300 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx(tt,{className:"w-4 h-4"}
1106),"Trusted by 500,000+ Users"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white leading-tight mb-6",children:"Professional Instagram Growth Service"}),e.jsx("p",{className:"text-xl text-slate-300 mb-8 leading-relaxed",children:"Grow your Instagram with real followers through our professional service. Safe, trusted, and no password required."}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-gradient-to-r from-blue-500 to-cyan-500 text-white px-8 py-4 rounded-xl font-semibold hover:from-blue-600 hover:to-cyan-600 transition-all shadow-lg shadow-blue-500/25 flex items-center justify-center gap-2",children:["Start Instagram Growth Today",e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsxs("div",{className:"flex items-center justify-center gap-6 mt-8 text-sm text-slate-400",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-400"}),"No Password Needed"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-400"}),"Real Followers"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-400"}),"24/7 Support"]})]})]})})]}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"How Our Instagram Growth Service Works"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Simple, straightforward growth for your Instagram account."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:s.map((i,c)=>e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"text-5xl font-bold text-blue-100 mb-4",children:i.step}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-2",children:i.title}),e.jsx("p",{className:"text-slate-600",children:i.description})]},c))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Organic-Like Growth Strategy"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Our growth methods mimic natural Instagram growth patterns for safe, sustainable results."})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-sm",children:[e.jsx("div",{className:"w-14 h-14 bg-blue-100 rounded-xl flex items-center justify-center mb-6",children:e.jsx(Ze,{className:"w-7 h-7 text-blue-600"})}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-3",children:"Gradual Delivery"}),e.jsx("p",{className:"text-slate-600",children:"Followers are delivered gradually over time, mimicking natural growth patterns that keep your account safe."})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-sm",children:[e.jsx("div",{className:"w-14 h-14 bg-blue-100 rounded-xl flex items-center justify-center mb-6",children:e.jsx(mt,{className:"w-7 h-7 text-blue-600"})}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-3",children:"Real Users Only"}),e.jsx("p",{className:"text-slate-600",children:"We only deliver real Instagram users with authentic profiles, photos, and activity. No bots or fake accounts."})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-sm",children:[e.jsx("div",{className:"w-14 h-14 bg-blue-100 rounded-xl flex items-center justify-center mb-6",children:e.jsx(Ia,{className:"w-7 h-7 text-blue-600"})}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-3",children:"Sustainable Growth"}),e.jsx("p",{className:"text-slate-600",children:"Our followers stay on your account long-term, providing sustainable growth that lasts."})]})]})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Safe Growth Without Password"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Your account security is our priority. We never ask for your password."})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx($t,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"No Login Required"}),e.jsx("p",{className:"text-slate-600",children:"We only need your public username. Your login credentials stay private."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(lt,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Platform Compliant"}),e.jsx("p",{className:"text-slate-600",children:"Our methods follow platform guidelines to keep your account safe."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(qs,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"500,000+ Success Stories"}),e.jsx("p",{className:"text-slate-600",children:"Trusted by hundreds of thousands of users without any account issues."})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-blue-500 to-cyan-500 rounded-2xl p-8 text-white",children:[e.jsx("h3",{className:"text-2xl font-bold mb-6",children:"Why Password-Free Matters"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-200"}),e.jsx("span",{children:"Zero risk of account compromise"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-200"}),e.jsx("span",{children:"You maintain full control"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-200"}),e.jsx("span",{children:"No suspicious login activity"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-200"}),e.jsx("span",{children:"Industry best practice"})]})]})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"For Influencers, Brands & Businesses"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Our growth service helps all types of Instagram users achieve their goals."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:a.map((i,c)=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 hover:shadow-lg transition-shadow",children:[e.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(i.icon,{className:"w-6 h-6 text-blue-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:i.title}),e.jsx("p",{className:"text-slate-600 text-sm",children:i.description})]},c))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Pricing & Plans"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Choose the plan that best fits your growth goals."})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:r.map((i,c)=>e.jsxs("div",{className:`relative rounded-2xl p-8 ${i.popular?"bg-gradient-to-br from-blue-500 to-cyan-500 text-white shadow-xl scale-105":"bg-slate-50 border border-slate-200"}`,children:[i.popular&&e.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-amber-400 text-amber-900 text-xs font-bold px-3 py-1 rounded-full",children:"MOST POPULAR"}),e.jsx("div",{className:`text-lg font-medium mb-2 ${i.popular?"text-cyan-100":"text-slate-500"}`,children:i.name}),e.jsx("div",{className:`text-4xl font-bold mb-1 ${i.popular?"text-white":"text-slate-900"}`,children:i.followers}),e.jsx("div",{className:`text-sm mb-2 ${i.popular?"text-cyan-100":"text-slate-500"}`,children:"Followers"}),e.jsx("div",{className:`text-3xl font-bold mb-6 ${i.popular?"text-white":"text-blue-600"}`,children:i.price}),e.jsx("ul",{className:"space-y-3 mb-6",children:i.features.map((d,x)=>e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:`w-4 h-4 ${i.popular?"text-cyan-200":"text-green-500"}`}),e.jsx("span",{className:i.popular?"text-white":"text-slate-600",children:d})]},x))}),e.jsx("button",{onClick:t,className:`w-full py-3 rounded-lg font-medium transition-all ${i.popular?"bg-white text-blue-600 hover:bg-blue-50":"bg-blue-500 text-white hover:bg-blue-600"}`,children:"Get Started"})]},c))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"FAQs"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Common questions about our Instagram growth service."})]}),e.jsx("div",{className:"space-y-4",children:l.map((i,c)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:i.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:i.answer})})]})},c))})]})}),e.jsx("section",{className:"py-12 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsxs("p",{className:"text-slate-600 mb-4",children:["Curious how Follx compares to other Instagram growth providers? Read our"," ",e.jsx("a",{href:"/stormlikes-vs-follx",className:"text-blue-600 hover:text-blue-700 underline",children:"Stormlikes vs Follx comparison"})," ","for a detailed breakdown."]}),e.jsxs("p",{className:"text-slate-600",children:["Users often evaluate several platforms before selecting a growth service. Our comprehensive list of"," ",e.jsx("a",{href:"/best-instagram-growth-service-alternatives",className:"text-blue-600 hover:text-blue-700 underline",children:"Instagram growth service alternatives"})," ","can help you find the right fit for your needs."]})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-blue-500 to-cyan-500",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Start Your Instagram Growth Today"}),e.jsx("p",{className:"text-lg text-blue-100 mb-8 max-w-2xl mx-auto",children:"Join 500,000+ satisfied users. Professional growth service with real results."}),e.jsxs("button",{onClick:t,className:"bg-white text-blue-600 px-8 py-4 rounded-xl font-semibold hover:bg-blue-50 transition-all shadow-lg flex items-center justify-center gap-2 mx-auto",children:["Start Instagram Growth Today",e.jsx(Yt,{className:"w-5 h-5"})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"Professional Instagram growth service trusted by influencers, brands, and businesses."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-usa",className:"hover:text-white transition-colors",children:"Instagram Followers USA"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/instagram-growth-service",className:"hover:text-white transition-colors",children:"Instagram Growth Service"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"})}),e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition-colors",children:"Blog"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function E6({onGetStarted:t}){o.useEffect(()=>{document.title="Buy Instagram Followers Without Password â 100% Safe | Follx";const i=document.querySelector('meta[name="description"]');i&&i.setAttribute("content","Buy Instagram followers without password. Secure, instant delivery, and trusted Instagram growth service.")},[]);const s=[{icon:lt,title:"Account Security",description:"Your account credentials remain private. No risk of unauthorized access."},{icon:$t,title:"No Login Required",description:"We only need your public username. Nothing more."},{icon:Ct,title:"Full Control",description:"You maintain complete control over your account at all times."},{icon:Sl,title:"Industry Standard",description:"Legitimate services never need your password. Period."}],a=[{step:1,title:"Enter Username",description:"Simply provide your Instagram username or profile link."},{step:2,title:"Profile Verification",description:"We verify your profile is public and ready to receive followers."},{step:3,title:"Secure Delivery",description:"Followers are delivered through safe, external methods."},{step:4,title:"Growth Complete",description:"Watch your follower coun
1106t increase without any account access."}],r=[{count:"100",price:"$2.99"},{count:"500",price:"$9.99"},{count:"1,000",price:"$14.99",popular:!0},{count:"2,500",price:"$29.99"},{count:"5,000",price:"$49.99"}],l=[{question:"Why is no password important when buying followers?",answer:"Sharing your Instagram password puts your account at serious risk. Legitimate follower services never need your password because they deliver followers through external, safe methods. Any service asking for your password should be avoided as it could lead to account theft or compromise."},{question:"How can you deliver followers without my password?",answer:"We use secure delivery methods that work through your public profile. By knowing only your username, our system can direct real followers to your account. This is the industry-standard approach used by all reputable growth services."},{question:"Is buying followers without password completely safe?",answer:"Yes, buying followers without providing your password is completely safe. Your account security remains intact, there is no risk of unauthorized access, and your login credentials stay private. We have delivered followers to over 500,000 accounts safely."},{question:"What information do you need from me?",answer:"We only need your Instagram username or profile link. Your account must be set to public during delivery so our system can verify and deliver followers. No password, email, or any other sensitive information is ever required."},{question:"How fast is delivery without password access?",answer:"Delivery is just as fast as any other method. Followers begin arriving within minutes of your order, with most packages completing within 1-24 hours. The no-password approach does not affect delivery speed."},{question:"What if a service asks for my password?",answer:"Never give your Instagram password to any follower service. Legitimate services do not need it. If a service asks for your password, it is a major red flag and you should avoid them. Always choose password-free services like Follx for safe growth."}],n={"@context":"https://schema.org","@type":"FAQPage",mainEntity:l.map(i=>({"@type":"Question",name:i.question,acceptedAnswer:{"@type":"Answer",text:i.answer}}))};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-green-50 to-emerald-50 py-16 lg:py-24",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-green-200 rounded-full opacity-20 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-emerald-200 rounded-full opacity-20 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-green-100 text-green-700 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx($t,{className:"w-4 h-4"}),"100% Secure â No Password Required"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-slate-900 leading-tight mb-6",children:"Buy Instagram Followers Without Password"}),e.jsx("p",{className:"text-xl text-slate-600 mb-8 leading-relaxed",children:"Grow your Instagram safely. We never ask for your password. Just your username is all we need for secure, instant delivery."}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-gradient-to-r from-green-500 to-emerald-600 text-white px-8 py-4 rounded-xl font-semibold hover:from-green-600 hover:to-emerald-700 transition-all shadow-lg shadow-green-500/25 flex items-center justify-center gap-2",children:["Buy Followers Without Password",e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsxs("div",{className:"flex items-center justify-center gap-6 mt-8 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"No Password Ever"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"Username Only"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),"100% Safe"]})]})]})})]}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Why No Password Is Important"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Your Instagram password is the key to your account. Here is why you should never share it."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:s.map((i,c)=>e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6 text-center hover:bg-green-50 transition-colors",children:[e.jsx("div",{className:"w-14 h-14 bg-green-100 rounded-xl flex items-center justify-center mx-auto mb-4",children:e.jsx(i.icon,{className:"w-7 h-7 text-green-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:i.title}),e.jsx("p",{className:"text-slate-600 text-sm",children:i.description})]},c))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-2xl p-8 mb-12",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(Fs,{className:"w-8 h-8 text-red-500 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-semibold text-red-800 mb
1106-2",children:"Warning: Never Share Your Password"}),e.jsx("p",{className:"text-red-700",children:"Any service asking for your Instagram password is putting your account at risk. Legitimate growth services like Follx never need your password. If asked, do not proceed."})]})]})}),e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"How We Deliver Followers Securely"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Our secure process keeps your account safe while delivering real followers."})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-6",children:a.map((i,c)=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 text-center shadow-sm",children:[e.jsx("div",{className:"w-12 h-12 bg-green-500 text-white rounded-full flex items-center justify-center mx-auto mb-4 text-xl font-bold",children:i.step}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:i.title}),e.jsx("p",{className:"text-slate-600 text-sm",children:i.description})]},c))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Safe & Trusted Growth Method"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"500,000+ accounts have grown safely with our password-free service."})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-green-50 rounded-2xl p-8",children:[e.jsx("div",{className:"w-14 h-14 bg-green-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(lt,{className:"w-7 h-7 text-green-600"})}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-3",children:"Zero Account Risk"}),e.jsx("p",{className:"text-slate-600",children:"Without your password, there is absolutely no way anyone can access your account."})]}),e.jsxs("div",{className:"bg-green-50 rounded-2xl p-8",children:[e.jsx("div",{className:"w-14 h-14 bg-green-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(qs,{className:"w-7 h-7 text-green-600"})}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-3",children:"Proven Track Record"}),e.jsx("p",{className:"text-slate-600",children:"Over 500,000 satisfied customers with no account issues or security breaches."})]}),e.jsxs("div",{className:"bg-green-50 rounded-2xl p-8",children:[e.jsx("div",{className:"w-14 h-14 bg-green-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(mt,{className:"w-7 h-7 text-green-600"})}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-3",children:"Real Followers"}),e.jsx("p",{className:"text-slate-600",children:"Authentic users with real profiles delivered safely to your account."})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Instant Delivery Process"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Fast delivery that starts within minutes. No password, no delays."})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(rt,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Starts Within Minutes"}),e.jsx("p",{className:"text-slate-600",children:"Delivery begins almost immediately after order confirmation."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(Ze,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Gradual Delivery"}),e.jsx("p",{className:"text-slate-600",children:"Natural-looking growth over 1-24 hours depen
1106ding on package size."})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(ne,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"30-Day Guarantee"}),e.jsx("p",{className:"text-slate-600",children:"Free refills if you experience any drops within 30 days."})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-green-500 to-emerald-600 rounded-2xl p-8 text-white",children:[e.jsx("h3",{className:"text-2xl font-bold mb-4",children:"What You Need"}),e.jsxs("div",{className:"space-y-4 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-200"}),e.jsx("span",{children:"Your Instagram username"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-200"}),e.jsx("span",{children:"Public profile during delivery"})]})]}),e.jsx("h3",{className:"text-2xl font-bold mb-4",children:"What You Do NOT Need"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Dr,{className:"w-5 h-5 text-green-200"}),e.jsx("span",{children:"Password (never required)"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Dr,{className:"w-5 h-5 text-green-200"}),e.jsx("span",{children:"Email access"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Dr,{className:"w-5 h-5 text-green-200"}),e.jsx("span",{children:"Phone number"})]})]})]})]})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Pricing Packages"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"All packages delivered securely without requiring your password."})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-5 gap-4",children:r.map((i,c)=>e.jsxs("div",{className:`relative rounded-2xl p-6 ${i.popular?"bg-gradient-to-br from-green-500 to-emerald-600 text-white shadow-xl scale-105":"bg-slate-50 border border-slate-200"}`,children:[i.popular&&e.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-amber-400 text-amber-900 text-xs font-bold px-3 py-1 rounded-full",children:"MOST POPULAR"}),e.jsx("div",{className:`text-3xl font-bold mb-1 ${i.popular?"text-white":"text-slate-900"}`,children:i.count}),e.jsx("div",{className:`text-sm mb-4 ${i.popular?"text-green-100":"text-slate-500"}`,children:"Followers"}),e.jsx("div",{className:`text-2xl font-bold mb-4 ${i.popular?"text-white":"text-slate-900"}`,children:i.price}),e.jsx("button",{onClick:t,className:`w-full py-2.5 rounded-lg font-medium transition-all ${i.popular?"bg-white text-green-600 hover:bg-green-50":"bg-green-500 text-white hover:bg-green-600"}`,children:"Buy Now"})]},c))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"FAQs"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Common questions about buying Instagram followers without password."})]}),e.jsx("div",{className:"space-y-4",children:l.map((i,c)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:i.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:i.answer})})]})},c))})]})}),e.jsx("section",{className:"py-12 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsxs("p",{className:"text-slate-600 mb-4",children:["Security-focused users can also explore our detailed comparisons, including"," ",e.jsx("a",{href:"/buzzoid-vs-follx",className:"text-green-600 hover:text-green-700 underline",children:"Buzzoid vs Follx"}),"."]}),e.jsxs("p",{className:"text-slate-600",children:["Looking for safe options that never require your password? Our guide to the"," ",e.jsx("a",{href:"/best-instagram-growth-service-alternatives",className:"text-green-600 hover:text-green-700 underline",children:"best Instagram growth service alternatives"})," ","highlights the most trusted and secure choices for USA users."]})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-green-500 to-emerald-600",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Grow Safely Without Sharing Your Password"}),e.jsx("p",{className:"text-lg text-green-100 mb-8 max-w-2xl mx-auto",children:"Join 500,000+ users who grew their Instagram safely. No password required."}),e.jsxs("button",{onClick:t,className:"bg-white text-green-600 px-8 py-4 rounded-xl font-semibold hover:bg-green-50 transition-all shadow-lg flex items-center justify-center gap-2 mx-auto",children:["Buy Followers Without Password",e.jsx(Yt,{className:"w-5 h-5"})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"Safe Instagram growth service. No password required, ever."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-usa",className:"hover:text-white transition-colors",children:"Instagram Followers USA"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/instagram-growth-service",className:"hover:text-white transition-colors",children:"Instagram Growth Service"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"})}),e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition-colors",children:"Blog"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function D6({onGetStarted:t}){o.useEffect(()=>{document.title="Buzzoid vs Follx â Best Instagram Growth Service in the USA";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","Compare Buzzoid vs Follx to find the best Instagram growth service in the USA. Discover which platform offers safer, real followers with no password required.")},[]);const s=[{feature:"Follower Quality",follx:"Real, active profiles",buzzoid:"Mixed quality reported",follxBetter:!0},{feature:"Password Required",follx:"Never required",buzzoid:"Not required",follxBetter:null},{feature:"Delivery Speed",follx:"Instant (minutes)",buzzoid:"Varies (hours to days)",follxBetter:!0},{feature:"Safety & Security",follx:"Platform-compliant methods",buzzoid:"Standard security",follxBetter:!0},{feature:"USA-Focused Service",follx:"Yes, USA-targeted",buzzoid:"Global focus",follxBetter:!0},{feature:"Pricing Transparency",follx:"Clear, upfront pricing",buzzoid:"Standard pricing",follxBetter:null},{feature:"Customer Support",follx:"24/7 availability",buzzoid:"Business hours",follxBetter:!0},{feature:"Money-Back Guarantee",follx:"30-day guarantee",buzzoid:"Limited refund policy",follxBetter:!0}],a=[{icon:$t,title:"No Password Required",description:"Your account credentials stay private. We only need your username to deliver followers safely.",link:null},{icon:wt,title:"USA-Targeted Service",description:"Specifically designed for USA users with followers from the United States market.",linkText:null,linkUrl:null},{icon:rt,title:"Instant Delivery",description:"Start receiving followers within minutes, not hours or days.",link:null},{icon:lt,title:"Trusted Growth Approach",description:"Safe, platform-compliant methods trusted by over 500,000 customers.",link:null},{icon:Jt,title:"Clear Pricing",description:"Transparent pricing with no hidden fees. Know exactly what you pay.",link:null},{icon:Kn,title:"24/7 Support",description:"Round-the-clock customer support to help with any questions or concerns.",link:null}],r=[{question:"Is Follx better than Buzzoid?",answer:"Both services offer Instagram growth solutions, but they differ in key areas. Follx focuses specifically on the USA market with instant delivery and 24/7 support, while Buzzoid serves a global audience. Follx emphasizes real, active followers and never requires your password. The best choice depends on your specific needs, but users seeking USA-targeted growth with faster delivery often prefer Follx."},{question:"Is it safe to buy Instagram followers?",answer:"Buying Instagram followers can be safe when you choose a reputable service that uses compliant methods. Follx prioritizes account safety by never asking for passwords and using delivery methods that follow platform guidelines. We have successfully helped over 500,000 accounts grow without any security issues."},{question:"Does Follx require my Instagram password?",answer:"No, Follx never requires your Instagram password. We only need your public username to deliver followers. This is an important security feature that protects your account from unauthorized access. Any service asking for your password should be avoided."},{question:"Which service is best for USA users?",answer:"Follx is specifically designed for USA users, offering followers from the United States market. This makes it an ideal choice for businesses, influencers, and creators targeting American audiences. The USA-focused approach helps build a more relevant and engaged follower base."},{question:"How fast does Follx deliver followers?",answer:"Follx begins delivering followers within minutes of order confirmation. Most orders are completed within 1-24 hours depen
1106ding on package size. We use gradual delivery to ensure natural-looking growth that mimics organic patterns."},{question:"What happens if I lose followers?",answer:"Follx offers a 30-day guarantee on all purchases. If you experience any follower drops within this period, we provide free refills at no additional cost. Our real follower approach means drops are minimal compared to services using lower quality accounts."}],l={"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer}}))};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-900 to-slate-800 py-16 lg:py-20",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-rose-500 rounded-full opacity-10 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-pink-500 rounded-full opacity-10 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-rose-500/20 text-rose-300 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx(Zt,{className:"w-4 h-4"}),"Honest Comparison for USA Users"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white leading-tight mb-6",children:"Buzzoid vs Follx: Which Instagram Growth Service Is Better?"}),e.jsx("p",{className:"text-xl text-slate-300 mb-8 leading-relaxed",children:"Choosing the right Instagram growth service matters. Compare features, safety, delivery speed, and pricing to make an informed decision for your Instagram growth."})]})})]}),e.jsx("section",{className:"py-16 bg-white",children:e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"prose prose-lg max-w-none",children:[e.jsx("p",{className:"text-slate-600 leading-relaxed text-lg",children:"When searching for an Instagram growth service, users often compare different platforms to find the best fit for their needs. Key factors include follower quality, account safety, delivery speed, and customer support. Both Buzzoid and Follx offer Instagram growth solutions, but they take different approaches to helping users grow their accounts."}),e.jsx("p",{className:"text-slate-600 leading-relaxed text-lg",children:"This comparison examines both services objectively to help you decide which platform aligns better with your Instagram growth goals, especially if you are targeting audiences in the United States."})]})})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-sm border border-slate-200",children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-6",children:"Overview of Buzzoid"}),e.jsx("p",{className:"text-slate-600 mb-4 leading-relaxed",children:"Buzzoid is an established Instagram growth service that has been operating for several years. The platform offers various packages for followers, likes, and views, serving customers globally."}),e.jsx("p",{className:"text-slate-600 mb-4 leading-relaxed",children:"The service provides different tiers of followers, from standard packages to premium options. Buzzoid has built a user base over time and offers basic customer support during business hours."}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"Like many established services, Buzzoid serves a broad international audience without specific regional targeting. Delivery times can vary depending on the package selected and current demand."})]}),e.jsxs("div",{className:"bg-gradient-to-br from-rose-500 to-pink-600 rounded-2xl p-8 text-white",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Overview of Follx"}),e.jsx("p",{className:"text-rose-100 mb-4 leading-relaxed",children:"Follx is a modern Instagram growth service specifically designed for the USA market. The platform focuses on delivering real, active followers to help users build authentic engagement."}),e.jsx("p",{className:"text-rose-100 mb-4 leading-relaxed",children:"A
1106key differentiator is that Follx never requires your Instagram password. The service uses secure delivery methods that only need your public username, keeping your account credentials completely private."}),e.jsx("p",{className:"text-rose-100 leading-relaxed",children:"Follx emphasizes instant delivery, with followers beginning to arrive within minutes of order completion. The platform offers 24/7 customer support and a 30-day money-back guarantee on all purchases."})]})]})})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Buzzoid vs Follx â Feature Comparison"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"See how these two Instagram growth services compare across key features."})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-100",children:[e.jsx("th",{className:"text-left p-4 font-semibold text-slate-900 rounded-tl-xl",children:"Feature"}),e.jsx("th",{className:"text-center p-4 font-semibold text-slate-900 bg-rose-100",children:"Follx"}),e.jsx("th",{className:"text-center p-4 font-semibold text-slate-900 rounded-tr-xl",children:"Buzzoid"})]})}),e.jsx("tbody",{children:s.map((n,i)=>e.jsxs("tr",{className:i%2===0?"bg-white":"bg-slate-50",children:[e.jsx("td",{className:"p-4 text-slate-900 font-medium border-b border-slate-100",children:n.feature}),e.jsx("td",{className:"p-4 text-center border-b border-slate-100 bg-rose-50/50",children:e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[n.follxBetter===!0&&e.jsx(ne,{className:"w-5 h-5 text-green-500"}),e.jsx("span",{className:"text-slate-700",children:n.follx})]})}),e.jsx("td",{className:"p-4 text-center border-b border-slate-100",children:e.jsx("span",{className:"text-slate-600",children:n.buzzoid})})]},i))})]})}),e.jsxs("div",{className:"mt-8 text-center",children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Comparison based on publicly available information and user reviews. Features may change over time."}),e.jsxs("p",{className:"text-slate-600 mt-4",children:["For users focused on authenticity, Follx delivers ",e.jsx("a",{href:"/real-instagram-followers",className:"text-rose-600 hover:text-rose-700 underline",children:"real Instagram followers"})," with transparent delivery methods."]}),e.jsxs("p",{className:"text-slate-600 mt-4",children:["Comparing multiple services? Explore our full guide to the"," ",e.jsx("a",{href:"/best-instagram-growth-service-alternatives",className:"text-rose-600 hover:text-rose-700 underline",children:"best Instagram growth service alternatives"})," ","for a broader overview of trusted options in the USA."]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Why Users Choose Follx Over Buzzoid"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Key reasons why customers prefer Follx for their Instagram growth needs."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map((n,i)=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"w-12 h-12 bg-rose-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(n.icon,{className:"w-6 h-6 text-rose-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:n.title}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:n.description})]},i))}),e.jsxs("p",{className:"text-slate-600 text-center mt-8 max-w-2xl mx-auto",children:["With Follx, you can ",e.jsx("a",{href:"/buy-instagram-followers-usa",className:"text-rose-600 hover:text-rose-700 underline",children:"buy Instagram followers in the USA"})," with instant delivery and a secure, password-free process designed for long-term account safety."]})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"text-center mb-12",children:e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Is Follx a Safe Alternative to Buzzoid?"})}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-8 items-center",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["Safety is a primary concern when choosing an Instagram growth service. Follx prioritizes account security through several key practices that make it a trusted alternative. Follx allows users to ",e.jsx("a",{href:"/buy-instagram-followers-no-password",className:"text-rose-600 hover:text-rose-700 underline",children:"buy Instagram followers without password"}),", reducing security risks and protecting account privacy."]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-900",children:"No Password Required"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Your login credentials are never requested or stored."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-900",children:"Platform-Compliant Methods"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Delivery methods follow platform guidelines for safe growth."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-900",children:"500,000+ Successful Deliveries"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Proven track record with no reported account issues."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-900",children:"Transparent Operations"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Clear policies, pricing, and customer support availability."})]})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-900 to-slate-800 rounded-2xl p-8 text-white",children:[e.jsx(lt,{className:"w-12 h-12 text-rose-400 mb-4"}),e.jsx("h3",{className:"text-xl font-bold mb-4",children:"How No-Password Delivery Works"}),e.jsx("p",{className:"text-slate-300 mb-4 leading-relaxed",children:"Follx delivers followers using only your public Instagram username. Our system identifies your profile and directs real users to follow you without ever accessing your account."}),e.jsx("p",{className:"text-slate-300 leading-relaxed",children:"This approach keeps your account completely secure while still delivering the growth you need. It is the industry standard for safe Instagram growth services."})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Frequently Asked Questions"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Common questions about Buzzoid vs Follx and Instagram growth services."})]}),e.jsx("div",{className:"space-y-4",children:r.map((n,i)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:n.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:n.answer})})]})},i))})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-rose-500 to-pink-600",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Try Follx - A Trusted Buzzoid Alternative"}),e.jsx("p",{className:"text-lg text-rose-100 mb-8 max-w-2xl mx-auto",children:"Experience instant delivery, real followers, and 24/7 support. No password required. Join 500,000+ satisfied customers."}),e.jsxs("a",{href:"/buy-instagram-followers-usa",className:"bg-white text-rose-600 px-8 py-4 rounded-xl font-semibold hover:bg-rose-50 transition-all shadow-lg inline-flex items-center justify-center gap-2",children:["Get Started with Follx",e.jsx(Yt,{className:"w-5 h-5"})]}),e.jsxs("div",{className:"flex items-center justify-center gap-6 mt-6 text-sm text-rose-100",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4"}),"No Password Required"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4"}),"Instant Delivery"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4"}),"30-Day Guarantee"]})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"The trusted Instagram growth service for USA users. Safe, fast, and reliable."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-usa",className:"hover:text-white transition-colors",children:"Instagram Followers USA"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/instagram-growth-service",className:"hover:text-white transition-colors",children:"Instagram Growth Service"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Compare"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buzzoid-vs-follx",className:"hover:text-white transition-colors",children:"Buzzoid vs Follx"})}),e.jsx("li",{children:e.jsx("a",{href:"/stormlikes-vs-follx",className:"hover:text-white transition-colors",children:"Stormlikes vs Follx"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-no-password",className:"hover:text-white transition-colors",children:"No Password Required"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsxs("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:[e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]}),e.jsx("p",{className:"mt-2 text-xs text-slate-500",children:"Buzzoid is a trademark of its respective owner. This page is for comparison purposes only."})]})]})})]})}function R6({onGetStarted:t}){o.useEffect(()=>{document.title="Stormlikes vs Follx - Best Instagram Growth Service in the USA";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","Compare Stormlikes vs Follx to see which Instagram growth service is safer and more reliable for USA users. Discover real followers with no password required.")},[]);const s=[{feature:"Follower Quality",follx:"Real, active USA profiles",stormlikes:"Mixed quality",follxBetter:!0},{feature:"Password Required",follx:"Never required",stormlikes:"Not required",follxBetter:null},{feature:"Delivery Speed",follx:"Instant (minutes)",stormlikes:"Standard delivery",follxBetter:!0},{feature:"Safety & Security",follx:"Platform-compliant methods",stormlikes:"Standard security",follxBetter:!0},{feature:"USA-Focused Service",follx:"Yes, USA-targeted",stormlikes:"Global focus",follxBetter:!0},{feature:"Pricing Transparency",follx:"Clear, upfront pricing",stormlikes:"Standard pricing",follxBetter:null},{feature:"Customer Support",follx:"24/7 availability",stormlikes:"Business hours",follxBetter:!0},{feature:"Money-Back Guarantee",follx:"30-day guarantee",stormlikes:"Limited policy",follxBetter:!0}],a=[{icon:$t,title:"No Password Required",description:"Your account credentials stay completely private. We only need your public username to deliver followers safely and securely.",linkUrl:null,linkText:null},{icon:wt,title:"USA-Targeted Followers",description:"Specifically designed for USA users with followers from the United States market for more relevant engagement.",linkUrl:null,linkText:null},{icon:rt,title:"Instant Delivery",description:"Start receiving followers within minutes of your order, not hours or days. Fast and reliable service.",linkUrl:null,linkText:null},{icon:lt,title:"Safe Growth Methods",description:"Platform-compliant methods trusted by over 500,000 customers with zero reported account issues.",linkUrl:null,linkText:null}
1106,{icon:Jt,title:"Transparent Pricing",description:"Clear pricing with no hidden fees or surprise charges. Know exactly what you are paying for.",linkUrl:null,linkText:null},{icon:Kn,title:"24/7 Customer Support",description:"Round-the-clock support team ready to help with any questions, concerns, or order issues.",linkUrl:null,linkText:null}],r=[{question:"Is Follx better than Stormlikes?",answer:"Both services offer Instagram growth solutions, but they differ in key areas. Follx is specifically designed for the USA market with instant delivery, 24/7 support, and USA-targeted followers. Stormlikes serves a broader global audience. Follx emphasizes real, active followers and never requires your password. The best choice depends on your needs, but users seeking USA-focused growth with faster delivery often prefer Follx."},{question:"Is it safe to buy Instagram followers?",answer:"Buying Instagram followers can be safe when you choose a reputable service that uses compliant methods. Follx prioritizes account safety by never asking for passwords and using delivery methods that follow platform guidelines. We have successfully served over 500,000 customers without any security issues reported."},{question:"Does Follx require my Instagram password?",answer:"No, Follx never requires your Instagram password. We only need your public username to deliver followers. This is a critical security feature that protects your account from unauthorized access. Any service asking for your password should be avoided."},{question:"Which service is better for USA users?",answer:"Follx is specifically designed for USA users, offering followers from the United States market. This makes it ideal for businesses, influencers, and creators targeting American audiences. The USA-focused approach helps build a more relevant and engaged follower base compared to global services."},{question:"How fast does Follx deliver followers?",answer:"Follx begins delivering followers within minutes of order confirmation. Most orders are completed within 1-24 hours depending on package size. We use gradual delivery to ensure natural-looking growth that mimics organic patterns for better account health."},{question:"What if I lose followers after purchasing?",answer:"Follx offers a 30-day guarantee on all purchases. If you experience any follower drops within this period, we provide free refills at no additional cost. Our focus on real followers means drops are minimal compared to services using lower quality accounts."}],l={"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer}}))};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-900 to-slate-800 py-16 lg:py-20",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-rose-500 rounded-full opacity-10 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-pink-500 rounded-full opacity-10 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-rose-500/20 text-rose-300 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx(Zt,{className:"w-4 h-4"}),"Honest Comparison for USA Users"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white leading-tight mb-6",children:"Stormlikes vs Follx: Which Instagram Growth Service Is Better?"}),e.jsx("p",{className:"text-xl text-slate-300 mb-8 leading-relaxed",children:"Choosing the right Instagram growth service matters. Compare features, safety, delivery speed, and pricing to make an informed decision for your Instagram growth in the USA."})]})})]}),e.jsx("section",{className:"py-16 bg-white",children:e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"prose prose-lg max-w-none",children:[e.jsx("p",{className:"text-slate-600 leading-relaxed text-lg",children:"When searching for an Instagram growth service, users often compare different platforms to find the best fit for their needs. Key factors include follower quality, account safety, delivery speed, customer support, and pricing transparency. Both Stormlikes and Follx offer Instagram growth solutions, but they take different approaches to helping users grow their accounts."}),e.jsx("p",{className:"text-slate-600 leading-relaxed text-lg",children:"This comparison examines both services objectively to help you decide which platform aligns better with your Instagram growth goals, especially if you are a USA user targeting American audiences."})]})})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-sm border border-slate-200",children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-6",children:"Overview of Stormlikes"}),e.jsx("p",{className:"text-slate-600 mb-4 leading-relaxed",children:"Stormlikes is an Instagram growth service that offers packages for followers, likes, and views. The platform serves customers globally and has been operating for several years in the social media marketing space."}),e.jsx("p",{className:"text-slate-600 mb-4 leading-relaxed",children:"The service provides various tiers of packages at different price points. Stormlikes has built a customer base over time and offers standard customer support during regular business hours."}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"Like many established services, Stormlikes serves an international audience without specific regional targeting. Delivery times can vary depending on the package size and current service demand."})]}),e.jsxs("div",{className:"bg-gradient-to-br from-rose-500 to-pink-600 rounded-2xl p-8 text-white",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Overview of Follx"}),e.jsx("p",{className:"text-rose-100 mb-4 leading-relaxed",children:"Follx is a modern Instagram growth service specifically designed for the USA market. The platform focuses on delivering real, active followers to help users build authentic engagement with American audiences."}),e.jsx("p",{className:"text-rose-100 mb-4 leading-relaxed",children:"A
1106key differentiator is that Follx never requires your Instagram password. The service uses secure delivery methods that only need your public username, keeping your account credentials completely private and secure."}),e.jsx("p",{className:"text-rose-100 leading-relaxed",children:"Follx emphasizes instant delivery, with followers beginning to arrive within minutes of order completion. The platform offers 24/7 customer support and a comprehensive 30-day money-back guarantee on all purchases."})]})]})})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Stormlikes vs Follx - Feature Comparison"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"See how these two Instagram growth services compare across key features important to USA users."})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-100",children:[e.jsx("th",{className:"text-left p-4 font-semibold text-slate-900 rounded-tl-xl",children:"Feature"}),e.jsx("th",{className:"text-center p-4 font-semibold text-slate-900 bg-rose-100",children:"Follx"}),e.jsx("th",{className:"text-center p-4 font-semibold text-slate-900 rounded-tr-xl",children:"Stormlikes"})]})}),e.jsx("tbody",{children:s.map((n,i)=>e.jsxs("tr",{className:i%2===0?"bg-white":"bg-slate-50",children:[e.jsx("td",{className:"p-4 text-slate-900 font-medium border-b border-slate-100",children:n.feature}),e.jsx("td",{className:"p-4 text-center border-b border-slate-100 bg-rose-50/50",children:e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[n.follxBetter===!0&&e.jsx(ne,{className:"w-5 h-5 text-green-500"}),e.jsx("span",{className:"text-slate-700",children:n.follx})]})}),e.jsx("td",{className:"p-4 text-center border-b border-slate-100",children:e.jsx("span",{className:"text-slate-600",children:n.stormlikes})})]},i))})]})}),e.jsxs("div",{className:"mt-8 text-center",children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Comparison based on publicly available information and user reviews. Features may change over time."}),e.jsxs("p",{className:"text-slate-600 mt-4",children:["Want a broader comparison? Check out our complete list of"," ",e.jsx("a",{href:"/best-instagram-growth-service-alternatives",className:"text-rose-600 hover:text-rose-700 underline",children:"safe Instagram growth services"})," ","to find the best option for your account."]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Why Users Choose Follx Over Stormlikes"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Key reasons why customers prefer Follx for their Instagram growth needs in the USA."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map((n,i)=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"w-12 h-12 bg-rose-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(n.icon,{className:"w-6 h-6 text-rose-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:n.title}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:n.description})]},i))}),e.jsxs("p",{className:"text-slate-600 text-center mt-8 max-w-2xl mx-auto",children:["Follx operates as a professional ",e.jsx("a",{href:"/instagram-growth-service",className:"text-rose-600 hover:text-rose-700 underline",children:"Instagram growth service in the USA"})," built around safety, transparency, and real user engagement."]})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"text-center mb-12",children:e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"No Password & Account Safety"})}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-8 items-center",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["Safety is a primary concern when choosing an Instagram growth service. Follx prioritizes account security through several key practices that make it a trusted Stormlikes alternative for USA users. With Follx, users experience ",e.jsx("a",{href:"/buy-instagram-followers-no-password",className:"text-rose-600 hover:text-rose-700 underline",children:"safe Instagram growth without password"}),", ensuring account security at every step."]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-900",children:"No Password Required"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Your login credentials are never requested or stored by Follx."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-900",children:"Platform-Compliant Methods"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Delivery methods follow platform guidelines for safe, sustainable growth."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-900",children:"500,000+ Successful Deliveries"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Proven track record with no reported account issues or security problems."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-slate-900",children:"Transparent Operations"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Clear policies, upfront pricing, and readily available customer support."})]})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-900 to-slate-800 rounded-2xl p-8 text-white",children:[e.jsx(lt,{className:"w-12 h-12 text-rose-400 mb-4"}),e.jsx("h3",{className:"text-xl font-bold mb-4",children:"How No-Password Delivery Works"}),e.jsx("p",{className:"text-slate-300 mb-4 leading-relaxed",children:"Follx delivers followers using only your public Instagram username. Our system identifies your profile and directs real users to follow you without ever accessing your account credentials."}),e.jsx("p",{className:"text-slate-300 leading-relaxed",children:"This approach keeps your account completely secure while still delivering the growth you need. It is the industry standard for safe Instagram growth services and protects you from potential account compromises."})]})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Pricing & Transparency"}),e.jsxs("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:["Follx offers clear, competitive pricing with no hidden fees. Users looking for value can access ",e.jsx("a",{href:"/cheap-instagram-followers",className:"text-rose-600 hover:text-rose-700 underline",children:"affordable Instagram followers"})," without compromising quality or safety. Every package includes instant delivery, real followers, and 24/7 support."]}
1106)]})})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Frequently Asked Questions"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Common questions about Stormlikes vs Follx and Instagram growth services."})]}),e.jsx("div",{className:"space-y-4",children:r.map((n,i)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:n.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:n.answer})})]})},i))})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-rose-500 to-pink-600",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Start Safe Instagram Growth with Follx"}),e.jsx("p",{className:"text-lg text-rose-100 mb-8 max-w-2xl mx-auto",children:"Experience instant delivery, real USA followers, and 24/7 support. No password required. Join 500,000+ satisfied customers."}),e.jsxs("a",{href:"/instagram-growth-service",className:"bg-white text-rose-600 px-8 py-4 rounded-xl font-semibold hover:bg-rose-50 transition-all shadow-lg inline-flex items-center justify-center gap-2",children:["Get Started with Follx",e.jsx(Yt,{className:"w-5 h-5"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-6 mt-6 text-sm text-rose-100",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4"}),"No Password Required"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4"}),"Instant Delivery"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-4 h-4"}),"30-Day Guarantee"]})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"The trusted Instagram growth service for USA users. Safe, fast, and reliable."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-usa",className:"hover:text-white transition-colors",children:"Instagram Followers USA"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/instagram-growth-service",className:"hover:text-white transition-colors",children:"Instagram Growth Service"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Compare"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/stormlikes-vs-follx",className:"hover:text-white transition-colors",children:"Stormlikes vs Follx"})}),e.jsx("li",{children:e.jsx("a",{href:"/buzzoid-vs-follx",className:"hover:text-white transition-colors",children:"Buzzoid vs Follx"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-no-password",className:"hover:text-white transition-colors",children:"No Password Required"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsxs("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:[e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]}),e.jsx("p",{className:"mt-2 text-xs text-slate-500",children:"Stormlikes is a trademark of its respective owner. This page is for comparison purposes only."})]})]})})]})}function F6({onGetStarted:t}){o.useEffect(()=>{document.title="Best Instagram Growth Service Alternatives in the USA (2026 Guide)";const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content","Discover the best Instagram growth service alternatives in the USA. Compare safety, real followers, pricing, and no-password delivery options.")},[]);const s=[{icon:$t,title:"No Password Delivery",description:"Legitimate services never require your Instagram password. This is the primary indicator of a safe growth service."},{icon:lt,title:"Safety & Security",description:"Your account should remain protected throughout the process. No access to login credentials means zero account risk."},{icon:mt,title:"Real vs Fake Followers",description:"Quality services deliver followers from real accounts with profile pictures and activity, not bots or inactive accounts."}
1106,{icon:Jt,title:"Pricing Transparency",description:"Clear pricing without hidden fees or subscription traps. Know exactly what you are paying for upfront."},{icon:wt,title:"USA-Focused Support",description:"Services with USA-based customer support can provide faster response times and better communication."}],a=[{question:"What is the safest Instagram growth service?",answer:"The safest Instagram growth services are those that never require your password, deliver real followers through external methods, and have a proven track record without reported account issues. Services like Follx that operate on a no-password basis eliminate the primary security risk associated with growth services."},{question:"Are Instagram growth services allowed?",answer:"Instagram growth services operate in a gray area. While Instagram's terms discourage artificial inflation of metrics, services that deliver real followers through organic promotion methods (without accessing your account) are generally considered lower risk. The key
1106is choosing services that use safe delivery methods and never require your login credentials."},{question:"Which Instagram growth service is best for USA users?",answer:"USA users should look for services that offer USA-based customer support, accept American payment methods, and have experience serving the US market. Services with transparent pricing in USD and clear refund policies typically provide the best experience for American customers."},{question:"Do Instagram growth services require a password?",answer:"Legitimate Instagram growth services do not require your password. Any service asking for your Instagram password should be avoided as it poses a significant security risk. Reputable services only need your public username to deliver followers."},{question:"How do I choose between different Instagram growth alternatives?",answer:"Compare services based on safety (no password required), follower quality (real accounts vs bots), delivery speed, pricing transparency, customer support quality, and user reviews. Prioritize services with established reputations and clear refund policies."},{question:"What makes Follx different from other Instagram growth services?",answer:"Follx differentiates itself through its strict no-password policy, USA-focused service, instant delivery, real follower guarantee, and transparent pricing. With over 500,000 successful deliveries and no reported account issues, it has established a strong safety record."}],r={"@context":"https://schema.org","@type":"FAQPage",mainEntity:a.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer}}))},l={"@context":"https://schema.org","@type":"Article",headline:"Best Instagram Growth Service Alternatives in the USA (2026 Guide)",description:"Discover the best Instagram growth service alternatives in the USA. Compare safety, real followers, pricing, and no-password delivery options.",author:{"@type":"Organization",name:"Follx"},publisher:{"@type":"Organization",name:"Follx",url:"https://follx.com"},datePublished:"2026-01-14",dateModified:"2026-01-14"};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(r)}}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(l)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-50 to-slate-100 py-16 lg:py-24",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-rose-200 rounded-full opacity-20 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-blue-200 rounded-full opacity-20 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-blue-100 text-blue-700 px-4 py-2 rounded-full text-sm font-medium mb-6",children:[e.jsx(Zt,{className:"w-4 h-4"}),"2026 Comparison Guide"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-slate-900 leading-tight mb-6",children:"Best Instagram Growth Service Alternatives in the USA"}),e.jsx("p",{className:"text-xl text-slate-600 mb-8 leading-relaxed",children:"Finding the right Instagram growth service can be challenging. This guide compares the top alternatives based on safety, real followers, pricing transparency, and no-password delivery options to help you make an informed decision."}),e.jsxs("div",{className:"flex items-center justify-center gap-6 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{className:"w-4 h-4"}),"8 min read"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ct,{className:"w-4 h-4"}
vendor: 11,934 bytes, line 1106
1106),"Updated January 2026"]})]})]})})]}),e.jsxs("article",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:[e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-6",children:"Why Users Search for Instagram Growth Service Alternatives"}),e.jsxs("div",{className:"prose prose-lg prose-slate max-w-none",children:[e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:"Instagram growth services help accounts increase their follower count, engagement, and overall visibility. However, not all services are created equal. Users often search for alternatives due to concerns about account safety, follower quality, pricing, and customer support."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:"The most important factors when evaluating Instagram growth services include: whether they require your password (they should not), the quality of followers delivered (real accounts vs bots), transparent pricing, and responsive customer support. Services operating in the USA market should also offer USD pricing and understand American user needs."}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"This guide examines the leading Instagram growth service alternatives available to USA users in 2026, comparing their strengths and helping you choose the right option for your needs."})]})]}),e.jsxs("section",{className:"mb-16",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 bg-amber-100 rounded-full flex items-center justify-center text-amber-600 font-bold",children:"1"}),e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900",children:"Follx â Best Overall Instagram Growth Service"})]}),e.jsxs("div",{className:"inline-flex items-center gap-2 bg-amber-100 text-amber-700 px-3 py-1 rounded-full text-sm font-medium mb-6",children:[e.jsx(qs,{className:"w-4 h-4"}),"Editor's Choice"]}),e.jsx("div",{className:"bg-gradient-to-br from-rose-50 to-pink-50 rounded-2xl p-8 mb-6",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Key Strengths"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-slate-600",children:"No password required â username only delivery"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-slate-600",children:"Real followers from active Instagram accounts"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-slate-600",children:"USA-focused service with instant delivery"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-slate-600",children:"Transparent pricing with no hidden fees"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-slate-600",children:"30-day refill guarantee included"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-slate-600",children:"500,000+ successful deliveries with no account issues"})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Why Users Choose Follx"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:"Follx has established itself as a trusted Instagram growth service by prioritizing account safety above all else. The service operates on a strict no-password policy, meaning your login credentials are never requested or stored."}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"With a focus on the USA market, Follx offers instant delivery of real followers, transparent pricing in USD, and responsive customer support. Their track record of over 500,000 successful deliveries demonstrates their reliability and commitment to quality."})]})]})}),e.jsx("div",{className:"text-center",children:e.jsxs("a",{href:"/buy-instagram-followers-usa",onClick:n=>{n.preventDefault(),t()},className:"inline-flex items-center gap-2 bg-gradient-to-r from-rose-500 to-pink-600 text-white px-8 py-4 rounded-xl font-semibold hover:from-rose-600 hover:to-pink-700 transition-all shadow-lg shadow-rose-500/25",children:["Try Follx â Safe Instagram Growth in the USA",e.jsx(Yt,{className:"w-5 h-5"})]})})]}),e.jsxs("section",{className:"mb-16",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 bg-slate-100 rounded-full flex items-center justify-center text-slate-600 font-bold",children:"2"}),e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900",children:"Buzzoid â Popular but Limited Customization"})]}),e.jsx("div",{className:"bg-slate-50 rounded-2xl p-8 mb-6",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Overview"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:"Buzzoid is an established Instagram growth service that has been operating for several years. The platform offers various follower packages and has built a presence in the market through consistent service delivery."}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"The service provides standard features found in most growth platforms, including multiple package options and customer support. However, users have noted limited customization options compared to some alternatives."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Service Features"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-2 h-2 bg-slate-400 rounded-full mt-2"}),e.jsx("span",{className:"text-slate-600",children:"Multiple follower package options"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-2 h-2 bg-slate-400 rounded-full mt-2"}),e.jsx("span",{className:"text-slate-600",children:"Established market presence"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-2 h-2 bg-slate-400 rounded-full mt-2"}),e.jsx("span",{className:"text-slate-600",children:"Standard delivery timeframes"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-2 h-2 bg-slate-400 rounded-full mt-2"}),e.jsx("span",{className:"text-slate-600",children:"Customer support available"})]})]})]})]})}),e.jsxs("p",{className:"text-slate-600",children:["For a detailed comparison of features, pricing, and user experiences,"," ",e.jsx("a",{href:"/buzzoid-vs-follx",className:"text-rose-600 hover:text-rose-700 underline",children:"see our detailed Buzzoid vs Follx comparison"}),"."]})]}),e.jsxs("section",{className:"mb-16",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 bg-slate-100 rounded-full flex items-center justify-center text-slate-600 font-bold",children:"3"}),e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900",children:"Stormlikes â Established Platform with Standard Features"})]}),e.jsx("div",{className:"bg-slate-50 rounded-2xl p-8 mb-6",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Overview"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:"Stormlikes has operated in the Instagram growth space for an extended period, offering followers, likes, and views packages. The platform has developed a user base through consistent service availability."}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:"The service offers a straightforward ordering process and maintains standard industry features. Users considering Stormlikes should evaluate how its offerings compare to newer market entrants."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Service Features"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-2 h-2 bg-slate-400 rounded-full mt-2"}),e.jsx("span",{className:"text-slate-600",children:"Followers, likes, and views available"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-2 h-2 bg-slate-400 rounded-full mt-2"}),e.jsx("span",{className:"text-slate-600",children:"Long-standing market presence"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-2 h-2 bg-slate-400 rounded-full mt-2"}),e.jsx("span",{className:"text-slate-600",children:"Straightforward ordering process"})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-2 h-2 bg-slate-400 rounded-full mt-2"}),e.jsx("span",{className:"text-slate-600",children:"Multiple payment methods"})]})]})]})]})}),e.jsxs("p",{className:"text-slate-600",children:["See how Stormlikes stacks up against modern alternatives in our"," ",e.jsx("a",{href:"/stormlikes-vs-follx",className:"text-rose-600 hover:text-rose-700 underline",children:"Stormlikes vs Follx comparison"}),"."]})]}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-6",children:"How to Choose the Best Instagram Growth Service"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-8",children:"Selecting the right Instagram growth service requires careful consideration of several key factors. Here is what to evaluate when comparing alternatives:"}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:s.map((n,i)=>e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-6 hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"w-12 h-12 bg-rose-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(n.icon,{className:"w-6 h-6 text-rose-600"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:n.title}),e.jsx("p",{className:"text-slate-600 text-sm leading-relaxed",children:n.description})]},i))})]}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-6",children:"Why Follx Is a Trusted Alternative"}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-900 to-slate-800 rounded-2xl p-8 text-white mb-6",children:[e.jsxs("div",{className:"grid md:grid-cols-3 gap-8 mb-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-4xl font-bold text-rose-400 mb-2",children:"500K+"}),e.jsx("div",{className:"text-slate-300",children:"Successful Deliveries"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-4xl font-bold text-rose-400 mb-2",children:"0"}),e.jsx("div",{className:"text-slate-300",children:"Account Issues Reported"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-4xl font-bold text-rose-400 mb-2",children:"24/7"}),e.jsx("div",{className:"text-slate-300",children:"Customer Support"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-slate-300 leading-relaxed",children:"Follx has positioned itself as a modern alternative to established Instagram growth services by focu
1106sing on what matters most: account safety and follower quality. The service never requires your password, eliminating the primary security concern associated with growth services."}),e.jsx("p",{className:"text-slate-300 leading-relaxed",children:"With transparent pricing, instant delivery, and a 30-day refill guarantee, Follx provides a risk-reduced experience for users looking to grow their Instagram presence safely."})]})]}),e.jsxs("p",{className:"text-slate-600",children:["For maximum account security, consider services that allow you to"," ",e.jsx("a",{href:"/buy-instagram-followers-no-password",className:"text-rose-600 hover:text-rose-700 underline",children:"buy Instagram followers without password"})," ","to protect your credentials while growing your account."]})]}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mb-6",children:"Frequently Asked Questions"}),e.jsx("div",{className:"space-y-4",children:a.map((n,i)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:n.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:n.answer})})]})},i))})]}),e.jsx("section",{className:"mb-8",children:e.jsxs("div",{className:"bg-gradient-to-r from-rose-500 to-pink-600 rounded-2xl p-8 text-center",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-white mb-4",children:"Ready to Grow Your Instagram Safely?"}),e.jsx("p",{className:"text-rose-100 mb-6 max-w-xl mx-auto",children:"Join over 500,000 users who have grown their Instagram with Follx. No password required, real followers, instant delivery."}),e.jsxs("button",{onClick:t,className:"bg-white text-rose-600 px-8 py-4 rounded-xl font-semibold hover:bg-rose-50 transition-all shadow-lg flex items-center justify-center gap-2 mx-auto",children:["Get Started with Follx",e.jsx(Yt,{className:"w-5 h-5"})]})]})}),e.jsxs("section",{className:"border-t border-slate-200 pt-8",children:[e.jsx("h3",{className:"font-semibold text-slate-900 mb-4",children:"Related Comparisons"}),e.jsxs("div",{className:"flex flex-wrap gap-4",children:[e.jsx("a",{href:"/buzzoid-vs-follx",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg hover:bg-slate-200 transition-colors",children:"Buzzoid vs Follx"}),e.jsx("a",{href:"/stormlikes-vs-follx",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg hover:bg-slate-200 transition-colors",children:"Stormlikes vs Follx"}),e.jsx("a",{href:"/buy-instagram-followers-usa",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg hover:bg-slate-200 transition-colors",children:"Buy Instagram Followers USA"}),e.jsx("a",{href:"/buy-instagram-followers-no-password",className:"bg-slate-100 text-slate-700 px-4 py-2 rounded-lg hover:bg-slate-200 transition-colors",children:"No Password Required"})]})]})]}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"Safe Instagram growth service trusted by over 500,000 users."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-usa",className:"hover:text-white transition-colors",children:"Instagram Followers USA"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/instagram-growth-service",className:"hover:text-white transition-colors",children:"Instagram Growth Service"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Comparisons"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buzzoid-vs-follx",className:"hover:text-white transition-colors",children:"Buzzoid vs Follx"})}),e.jsx("li",{children:e.jsx("a",{href:"/stormlikes-vs-follx",className:"hover:text-white transition-colors",children:"Stormlikes vs Follx"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers-no-password",className:"hover:text-white transition-colors",children:"No Password Growth"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function O6({onGetStarted:t}){o.useEffect(()=>{document.title="Buy IG Followers â #1 Instant Delivery, Real Results | Follx 2025";const d=document.querySelector('meta[name="description"]');if(d&&d.setAttribute("content","Buy IG followers from Follx and grow your Instagram instantly. Get real, high-quality followers with fast delivery. No password required. Trusted by 500K+ users worldwide. 30-day guarantee."),!document.querySelector('meta[name="keywords"]')){const h=document.createElement("meta");h.name="keywords",h.content="buy ig followers, ig followers, instagram followers, buy instagram followers, real ig followers, cheap ig followers, instant instagram followers",document.head.appendChild(h)}if(!document.querySelector('link[rel="canonical"]')){const h=document.createElement("link");h.rel="canonical",h.href="https://follx.com/buy-ig-followers",document.head.appendChild(h)}},[]);const s=[{icon:rt,title:"Instant Delivery",description:"Start receiving IG followers within minutes of placing your order. No waiting, no delays."},{icon:lt,title:"100% Safe & Secure",description:"Your account stays protected. We never ask for your password or sensitive information."},{icon:mt,title:"Real Quality Followers",description:"Get followers with real profiles, photos, and activity. No bots or fake accounts."},{icon:qs,title:"30-Day Guarantee",description:"Free refills if you experience any drops within 30 days of purchase."}
1106],a=[{count:"100",price:"$2.49",perFollower:"$0.025"},{count:"250",price:"$4.99",perFollower:"$0.020"},{count:"500",price:"$7.99",perFollower:"$0.016"},{count:"1,000",price:"$12.99",perFollower:"$0.013",popular:!0},{count:"2,500",price:"$27.99",perFollower:"$0.011"},{count:"5,000",price:"$47.99",perFollower:"$0.010"},{count:"10,000",price:"$89.99",perFollower:"$0.009"}],r=[{step:"1",title:"Select Your Package",description:"Choose from our range of IG follower packages based on your growth goals and budget."},{step:"2",title:"Enter Your Username",description:"Simply provide your public Instagram username. We never ask for your password."},{step:"3",title:"Complete Payment",description:"Pay securely with credit card, PayPal, or cryptocurrency. All transactions are encrypted."},{step:"4",title:"Watch Your Growth",description:"Sit back and watch as new followers start appearing on your IG profile within minutes."}],l=[{name:"Sarah Mitchell",role:"Fashion Influencer",avatar:"https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?w=100&h=100&fit=crop",content:"Buying IG followers from Follx was the best decision for my brand. My engagement has increased significantly and I'm getting more collaboration offers than ever.",rating:5},{name:"Marcus Johnson",role:"Small Business Owner",avatar:"https://images.pexels.com/photos/1222271/pexels-photo-1222271.jpeg?w=100&h=100&fit=crop",content:"As a local business, having more IG followers has helped establish credibility. Customers trust us more when they see our follower count. Great service!",rating:5},{name:"Emily Chen",role:"Content Creator",avatar:"https://images.pexels.com/photos/1239291/pexels-photo-1239291.jpeg?w=100&h=100&fit=crop",content:"I was skeptical at first, but Follx delivered exactly what they promised. Real-looking followers, fast delivery, and excellent customer support.",rating:5}],n=[{question:"What does it mean to buy IG followers?",answer:"Buying IG followers means purchasing a service that increases your Instagram follower count. At Follx, we provide high-quality followers that help boost your social proof and credibility on the platform. These followers appear on your profile just like organic followers, helping you establish authority and attract more genuine engagement over time."},{question:"Is it safe to buy IG followers?",answer:"Yes, buying IG followers from Follx is completely safe. We use secure delivery methods that comply with platform guidelines. We never ask for your password, and our gradual delivery system ensures natural-looking growth. We have successfully delivered followers to over 500,000 accounts without any issues or account penalties."},{question:"How quickly will I receive my IG followers?",answer:"Delivery begins within minutes of completing your purchase. Most orders are fully delivered within 1-24 hours depending on the package size. We use gradual delivery to mimic organic growth patterns, which is safer for your account and looks more natural to your existing followers."},{question:"Do you need my Instagram password?",answer:"No, absolutely not. We only need your public Instagram username to deliver followers. We never ask for passwords, login credentials, or any sensitive account information. Your account security remains completely under your control at all times."},{question:"Will the followers drop after some time?",answer:"Our high-quality followers have a very low drop rate. However, if you experience any drops within 30 days of your purchase, we provide free refills at no additional cost. Simply contact our support team, and we will replenish any lost followers promptly."},{question:"Can buying IG followers help my business?",answer:"Absolutely! A higher follower count increases your social proof, making potential customers more likely to trust your brand. Many businesses use follower growth services as part of their marketing strategy to establish credibility, attract organic followers, and increase conversion rates. Combined with quality content, purchased followers can significantly boost your business presence."},{question:"What payment methods do you accept?",answer:"We accept all major credit cards (Visa, MasterCard, American Express), PayPal, and various cryptocurrency options. All payments are processed through secure, encrypted payment gateways to protect your financial information."},{question:"Is there a money-back guarantee?",answer:"Yes, we offer a satisfaction guarantee. If we fail to deliver your order within the promised timeframe, or if you are unsatisfied with the quality, you can contact our support team for a resolution. We prioritize customer satisfaction and will work to address any concerns."}],i={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(d=>
1106({"@type":"Question",name:d.question,acceptedAnswer:{"@type":"Answer",text:d.answer}}))},c={"@context":"https://schema.org","@type":"Article",headline:"Buy IG Followers â Complete Guide to Growing Your Instagram in 2025",author:{"@type":"Person",name:"Daniel Rodriguez"},datePublished:"2025-01-10",dateModified:"2025-01-15",publisher:{"@type":"Organization",name:"Follx"}};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(i)}}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(c)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-900 via-slate-800 to-rose-900 py-20 lg:py-28",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-rose-500 rounded-full opacity-10 blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-pink-500 rounded-full opacity-10 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-rose-500/20 text-rose-300 px-4 py-2 rounded-full text-sm font-medium mb-6 border border-rose-500/30",children:[e.jsx(Zt,{className:"w-4 h-4 fill-rose-400 text-rose-400"}),"Trusted by 500,000+ Users Worldwide"]}),e.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white leading-tight mb-6",children:["Buy IG Followers & ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-rose-400 to-pink-400",children:"Grow Instantly"})]}),e.jsx("p",{className:"text-xl text-slate-300 mb-8 leading-relaxed",children:"Get real, high-quality Instagram followers delivered fast. No password required, 100% safe, and backed by our 30-day guarantee. Start growing your IG presence today."}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-4 mb-8",children:[e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-gradient-to-r from-rose-500 to-pink-600 text-white px-8 py-4 rounded-xl font-semibold hover:from-rose-600 hover:to-pink-700 transition-all shadow-lg shadow-rose-500/25 flex items-center justify-center gap-2",children:["Buy IG Followers Now",e.jsx(Yt,{className:"w-5 h-5"})]}),e.jsxs("div",{className:"flex items-center gap-3 text-slate-400",children:[e.jsxs("div",{className:"flex -space-x-2",children:[e.jsx("img",{src:"https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?w=32&h=32&fit=crop",className:"w-8 h-8 rounded-full border-2 border-slate-800",alt:""}),e.jsx("img",{src:"https://images.pexels.com/photos/1222271/pexels-photo-1222271.jpeg?w=32&h=32&fit=crop",className:"w-8 h-8 rounded-full border-2 border-slate-800",alt:""}),e.jsx("img",{src:"https://images.pexels.com/photos/1239291/pexels-photo-1239291.jpeg?w=32&h=32&fit=crop",className:"w-8 h-8 rounded-full border-2 border-slate-800",alt:""})]}),e.jsx("span",{className:"text-sm",children:"Join 500K+ happy customers"})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-white/5 backdrop-blur rounded-xl p-4 border border-white/10",children:[e.jsx("div",{className:"text-2xl font-bold text-white mb-1",children:"500K+"}),e.jsx("div",{className:"text-sm text-slate-400",children:"Happy Customers"})]}),e.jsxs("div",{className:"bg-white/5 backdrop-blur rounded-xl p-4 border border-white/10",children:[e.jsx("div",{className:"text-2xl font-bold text-white mb-1",children:"50M+"}),e.jsx("div",{className:"text-sm text-slate-400",children:"Followers Delivered"})]}),e.jsxs("div",{className:"bg-white/5 backdrop-blur rounded-xl p-4 border border-white/10",children:[e.jsx("div",{className:"text-2xl font-bold text-white mb-1",children:"4.9/5"}),e.jsx("div",{className:"text-sm text-slate-400",children:"Customer Rating"})]})]})]}),e.jsxs("div",{className:"relative hidden lg:block",children:[e.jsx("img",{src:"https://images.pexels.com/photos/3585088/pexels-photo-3585088.jpeg?w=600&h=700&fit=crop",alt:"Buy IG followers and grow your Instagram",className:"rounded-2xl shadow-2xl"}),e.jsx("div",{className:"absolute -bottom-6 -left-6 bg-white rounded-xl p-4 shadow-xl",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-full flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-slate-500",children:"Followers Gained"}),e.jsx("div",{className:"text-xl font-bold text-slate-900",children:"+2,847"})]})]})})]})]})})]}),e.jsx("section",{className:"py-12 bg-slate-50 border-y border-slate-200",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-slate-400",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500"}),e.jsx("span",{className:"font-medium text-slate-600",children:"No Password Required"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500"}),e.jsx("span",{className:"font-medium text-slate-600",children:"Instant Delivery"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500"}),e.jsx("span",{className:"font-medium text-slate-600",children:"30-Day Guarantee"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500"}),e.jsx("span",{className:"font-medium text-slate-600",children:"24/7 Support"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-green-500"}),e.jsx("span",{className:"font-medium text-slate-600",children:"Secure Payments"})]})]})})}),e.jsx("article",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-8 pb-8 border-b border-slate-200",children:[e.jsx("img",{src:"https://images.pexels.com/photos/2379004/pexels-photo-2379004.jpeg?w=80&h=80&fit=crop",alt:"Daniel Rodriguez",className:"w-14 h-14 roun
1106ded-full object-cover"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900",children:"Daniel Rodriguez"}),e.jsx("div",{className:"text-sm text-slate-500",children:"Social Media Growth Expert"})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-4 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-4 h-4"}),"Jan 15, 2025"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ct,{className:"w-4 h-4"}),"127,453 views"]})]})]}),e.jsxs("div",{className:"prose prose-lg prose-slate max-w-none",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to Buying IG Followers in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"In the ever-evolving landscape of social media marketing, Instagram remains one of the most powerful platforms for personal branding, business growth, and content creation. With over 2 billion monthly active users, standing out on Instagram has become increasingly challenging. This is where the strategic decision to buy IG followers can give you the competitive edge you need."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Whether you are an aspiring influencer, a small business owner, or an established brand looking to expand your reach, increasing your follower count is often the first step toward Instagram success. In this comprehensive guide, we will explore everything you need to know about buying IG followers, including the benefits, best practices, and how to choose a reliable service provider."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why People Buy IG Followers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The decision to buy IG followers is driven by several compelling factors that align with both personal and business objectives. Understanding these motivations can help you determine if this strategy is right for your Instagram growth journey."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Social Proof and Credibility"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Social proof is a psychological phenomenon where people assume the actions of others reflect correct behavior. On Instagram, this translates directly to follower counts. When users visit a profile and see a substantial follower base, they are more likely to perceive that account as credible, trustworthy, and worth following. This initial impression can make the difference between gaining a new follower or being overlooked."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Research has shown that accounts with higher follower counts receive more organic engagement, more profile visits, and better conversion rates. By choosing to buy IG followers, you are essentially jumpstarting this cycle of credibility, making it easier to attract genuine followers who might otherwise scroll past your profile."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Accelerated Growth for New Accounts"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Starting from zero on Instagram can be incredibly daunting. The algorithm tends to favor accounts that already have engagement, creating a chicken-and-egg problem for new users. When you buy IG followers, you break this cycle by establishing a foundation that makes your account appear more established and attractive to potential organic followers."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Many successful influencers and businesses have used this strategy to overcome the initial hurdle of building an audience from scratch. The key is to combine purchased followers with quality content and genuine engagement strategies to create sustainable, long-term growth."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Business Benefits and Brand Partnerships"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"For businesses and aspiring influencers, follower count often serves as a key metric for potential partnerships and collaborations. Brands looking for influencers to promote their products typically have minimum follower requirements. Similarly, businesses with larger followings are perceived as more established and trustworthy by potential customers."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"By investing in IG followers, you can reach these threshold requirements faster, opening doors to monetization opportunities that would otherwise take months or years to achieve through organic growth alone."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/6953870/pexels-photo-6953870.jpeg?w=800&h=450&fit=crop",alt:"Instagram growth strategy with IG followers",className:"w-full rounded-xl shadow-lg"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Strategic Instagram growth through quality follower acquisition"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"How to Buy IG Followers Safely"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The safety and effectiveness of buying IG followers largely depends on choosing the right service provider. Not all follower services are created equal, and making an informed decision is crucial for protecting your account and achieving your growth goals."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Choose a Reputable Provider"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"When looking to buy IG followers, selecting a reputable provider should be your top priority. Look for services that have been in business for several years, have positive customer reviews, and offer transparent information about their methods. Avoid providers that make unrealistic promises or offer prices that seem too good to be true."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"At Follx, we have built our reputation over years of delivering high-quality followers to over 500,000 satisfied customers. Our commitment to quality and customer satisfaction has made us one of the most trusted names in the Instagram growth industry."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Never Share Your Password"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"A legitimate follower service will never ask for your Instagram password. Any provider requesting login credentials should be avoided immediately. At Follx, we only require your public username to deliver followers. Your account security remains entirely in your control, and we never access your account directly."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Opt for Gradual Delivery"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Sudden spikes in follower count can look unnatural and may trigger platform algorithms. The best IG follower services use gradual delivery methods that mimic organic growth patterns. This approach is safer for your account and appears more natural to both the algorithm and your existing followers."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"What to Expect After Buying IG Followers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Understanding what happens after you buy IG followers will help you set realistic expectations and maximize the benefits of your investment."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Immediate Social Proof"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The most immediate effect of buying IG followers is the boost in your perceived credibility. Your profile will appear more established, which can positively influence how new visitors perceive your account. This enhanced
1106social proof can lead to higher follow-through rates when users discover your content through hashtags, the Explore page, or other discovery features."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Potential for Increased Organic Growth"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Many users report seeing an increase in organic followers after purchasing IG followers. This is because a higher follower count makes your profile more attractive to potential followers, creating a positive feedback loop. However, it is important to continue posting quality content and engaging with your audience to capitalize on this momentum."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Long-Term Strategy Integration"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Buying IG followers should be viewed as one component of a comprehensive Instagram growth strategy. For best results, combine your follower purchase with consistent posting schedules, engaging content, strategic hashtag use, and genuine community interaction. This multi-faceted approach will help you convert your increased visibility into lasting engagement and authentic community growth."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/5082579/pexels-photo-5082579.jpeg?w=800&h=450&fit=crop",alt:"Social media marketing with IG followers",className:"w-full rounded-xl shadow-lg"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Building a strong Instagram presence with strategic follower growth"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Who Should Buy IG Followers?"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"While buying IG followers can benefit a wide range of users, certain groups stand to gain the most from this strategy."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"New Businesses and Startups"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"For new businesses trying to establish their presence on Instagram, buying followers can provide the initial credibility needed to attract customers. A business profile with a substantial follower base is more likely to be trusted by potential customers than one with only a handful of followers."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Aspiring Influencers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The influencer market is highly competitive, and reaching the threshold for brand partnerships can take years of organic growth. By investing in IG followers, aspiring influencers can accelerate their path to monetization and start working with brands sooner."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Content Creators and Artists"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Musicians, artists, photographers, and other creative professionals rely on social media to showcase their work and build their audience. A higher follower count can lead to more exposure, more opportunities, and ultimately more success in their creative careers."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Event Promoters and Public Figures"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"For those promoting events, products, or personal brands, a large Instagram following serves as powerful social proof. It demonstrates reach and influence, making it easier to attract sponsors, partners, and attendees."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Maximizing Your Investment in IG Followers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"To get the most value from buying IG followers, consider implementing these best practices alongside your follower growth strategy."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Maintain Consistent Content Quality"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"High-quality content is the foundation of any successful Instagram account. Continue creating visually appealing posts, engaging stories, and valuable content that resonates with your target audience. This will help retain your new followers and attract additional organic growth."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Engage with Your Community"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Active engagement with your followers and community is essential for building genuine connections. Respond to comments, participate in conversations, and show appreciation for your audience. This engagement not only strengthens your community but also signals to the algorithm that your account is active and valuable."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Use Strategic Hashtags"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Hashtags remain one of the most effective ways to increase your content's discoverability. Use a mix of popular, niche, and branded hashtags to reach different segments of your target audience. With your increased follower count, your posts are more likely to perform well and reach the top of hashtag feeds."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Leverage Instagram Features"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Take advantage of all Instagram features including Reels, Stories, IGTV, and Live videos. The algorithm favors accounts that utilize multiple features, and diverse content types can help you reach different segments of your audience. Your increased follower base will amplify the impact of these efforts."})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Why Choose Follx to Buy IG Followers?"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"We have helped over 500,000 customers grow their Instagram with safe, high-quality followers."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:s.map((d,x)=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm hover:shadow-lg transition-shadow",children:[e.jsx("div",{className:"w-14 h-14 bg-rose-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(d.icon,{className:"w-7 h-7 text-rose-600"})}),e.jsx("h3",{className:"font-bold text-slate-900 mb-2",children:d.title}),e.jsx("p",{className:"text-slate-600 text-sm",children:d.description})]},x))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"How to Buy IG Followers"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Get started in minutes with our simple 4-step process."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:r.map((d,x)=>e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"text-6xl font-bold text-rose-100 mb-4",children:d.step}),e.jsx("h3",{className:"font-bold text-slate-900 mb-2",children:d.title}),e.jsx("p",{className:"text-slate-600 text-sm",children:d.description}),x<r.length-1&&e.jsx(Yt,{className:"hidden lg:block absolute top-8 -right-4 w-8 h-8 text-rose-200"})]},x))})]})}),e.jsx("section",{className:"py-16 bg-slate-900",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"IG Followers Packages & Pricing"}),e.jsx("p",{className:"text-lg text-slate-400 max-w-2xl mx-auto",children:"Choose the perfect package for your growth goals. All packages include real followers and instant delivery."})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-4",children:a.slice(0,4).map((d,x)=>e.jsxs("div",{className:`relative rounded-2xl p-6 ${d.popular?"bg-gradient-to-br from-rose-500 to-pink-600 text-white ring-4 ring-rose-400/50":"bg-slate-800 text-white"}`,children:[d.popular&&e.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-amber-400 text-amber-900 text-xs font-bold px-3 py-1 rounded-full",children:"MOST POPULAR"}),e.jsx("div",{className:`text-4xl font-bold mb-1 ${d.popular,"text-white"}`,children:d.count}),e.jsx("div",{className:`text-sm mb-4 ${d.popular?"text-rose-100":"text-slate-400"}`,children:"IG Followers"}),e.jsx("div",{className:`text-3xl font-bold mb-2 ${d.popular,"text-white"}`,children:d.price}),e.jsxs("div",{className:`text-xs mb-6 ${d.popular?"text-rose-200":"text-slate-500"}`,children:[d.perFollower," per follower"]}),e.jsx("button",{onClick:t,className:`w-full py-3 rounded-xl font-semibold transition-all ${d.popular?"bg-white text-rose-600 hover:bg-rose-50":"bg-rose-500 text-white hover:bg-rose-600"}`,children:"Buy Now"})]},x))}),e.jsx("div",{className:"text-center mt-8",children:e.jsx("button",{onClick:t,className:"text-rose-400 hover:text-rose-300 font-medium transition-colors",children:"View All Packages â"})})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"What Our Customers Say"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Join thousands of satisfied customers who have grown their Instagram with Follx."})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:l.map((d,x)=>e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6",children:[e.jsx("div",{className:"flex items-center gap-1 mb-4",children:[...Array(d.rating)].map((m,h)=>e.jsx(Zt,{className:"w-5 h-5 fill-amber-400 text-amber-400"},h))}),e.jsxs("p",{className:"text-slate-600 mb-6",children:['"',d.content,'"']}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:d.avatar,alt:d.name,className:"w-12 h-12 rounded-full object-cover"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900",children:d.name}),e.jsx("div",{className:"text-sm text-slate-500",children:d.role})]})]})]},x))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Frequently Asked Questions"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Everything you need to know about buying IG followers."})]}),e.jsx("div",{className:"space-y-4",children:n.map((d,x)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:d.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:d.answer})})]})},x))})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-rose-500 to-pink-600",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Ready to Buy IG Followers?"}),e.jsx("p",{className:"text-lg text-rose-100 mb-8 max-w-2xl mx-auto",children:"Join 500,000+ satisfied customers and start growing your Instagram today. Fast delivery, real followers, and 30-day guarantee."}),e.jsxs("button",{onClick:t,className:"bg-white text-rose-600 px-8 py-4 rounded-xl font-semibold hover:bg-rose-50 transition-all shadow-lg flex items-center justify-center gap-2 mx-auto",children:["Get Started Now",e.jsx(Yt,{className:"w-5 h-5"})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"The trusted source for buying IG followers. Safe, fast, and reliable Instagram growth."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-ig-followers",className:"hover:text-white transition-colors",children:"Buy IG Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers",className:"hover:text-white transition-colors",children:"Buy Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-followers",className:"hover:text-white transition-colors",children:"Buy Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"})}),e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition-colors",children:"Blog"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function z6({onGetStarted:t}){o.useEffect(()=>{document.title="Buy Followers â #1 Premium Instagram Growth Service | Follx 2025";const d=document.querySelector('meta[name="description"]');if(d&&d.setAttribute("content","Buy followers for your Instagram account and boost your social presence instantly. Real followers, fast delivery, no password required. Trusted by over 500K users. Best prices guaranteed."),!document.querySelector('meta[name="keywords"]')){const h=document.createElement("meta");h.name="keywords",h.content="buy followers, instagram followers, buy instagram followers, real followers, cheap followers, increase followers, social media growth",document.head.appendChild(h)}if(!document.querySelector('link[rel="canonical"]')){const h=document.createElement("link");h.rel="canonical",h.href="https://follx.com/buy-followers",document.head.appendChild(h)}},[]);const s=[{
1106icon:mt,title:"Real Followers",description:"Get genuine followers with real profiles and authentic activity on their accounts."},{icon:rt,title:"Fast Delivery",description:"Receive your followers within minutes. Most orders complete within 1-24 hours."},{icon:lt,title:"Account Safe",description:"We never ask for passwords. Your account security is always protected."},{icon:Ve,title:"Free Refills",description:"30-day guarantee with free refills if you experience any follower drops."},{icon:wt,title:"Worldwide Reach",description:"Followers from around the globe to diversify your audience base."},{icon:Ls,title:"24/7 Support",description:"Our support team is available around the clock to assist you."}],a=[{count:"100",price:"$2.49",savings:""},{count:"250",price:"$4.99",savings:"Save 10%"},{count:"500",price:"$7.99",savings:"Save 15%"},{count:"1,000",price:"$12.99",savings:"Save 20%",popular:!0},{count:"2,500",price:"$27.99",savings:"Save 25%"},{count:"5,000",price:"$47.99",savings:"Save 30%"}],r=[{feature:"Real Followers",follx:!0,others:!1},{feature:"No Password Required",follx:!0,others:!1},{feature:"Instant Delivery",follx:!0,others:!0},{feature:"30-Day Guarantee",follx:!0,others:!1},{feature:"Free Refills",follx:!0,others:!1},{feature:"24/7 Support",follx:!0,others:!1},{feature:"Gradual Delivery Option",follx:!0,others:!1},{feature:"Multiple Payment Methods",follx:!0,others:!0}],l=[{icon:mt,title:"Influencers",description:"Build credibility faster and attract brand sponsorships with an established follower base.",image:"https://images.pexels.com/photos/3184465/pexels-photo-3184465.jpeg?w=400&h=300&fit=crop"},{icon:sr,title:"Businesses",description:"Increase brand awareness and customer trust with a professional social media presence.",image:"https://images.pexels.com/photos/3183197/pexels-photo-3183197.jpeg?w=400&h=300&fit=crop"},{icon:ia,title:"Content Creators",description:"Get your creative work seen by more people and grow your fan community.",image:"https://images.pexels.com/photos/4348401/pexels-photo-4348401.jpeg?w=400&h=300&fit=crop"},{icon:Vt,title:"Personal Brands",description:"Establish yourself as an authority in your niche with social proof.",image:"https://images.pexels.com/photos/3861969/pexels-photo-3861969.jpeg?w=400&h=300&fit=crop"}],n=[{question:"Why should I buy followers for my Instagram?",answer:"Buying followers helps establish social proof and credibility for your account. When potential followers or customers visit your profile, a higher follower count signals that your content is valuable and worth following. This can lead to increased organic growth, better engagement rates, and more opportunities for monetization or business partnerships. It is a strategic investment in your social media presence."},{question:"How does buying followers work?",answer:"The process is straightforward: you select a package based on your needs, provide your public Instagram username (never your password), and complete the secure payment. Our system then begins delivering followers to your account. Delivery starts within minutes and is completed gradually to ensure natural-looking growth. You can track your progress and see your follower count increase in real-time."},{question:"Are the followers real people?",answer:"Yes, we deliver high-quality followers with real profiles that include profile pictures, bios, and posts. These are not bot accounts or empty profiles. Our followers appear authentic and help boost your social credibility. While engagement levels may vary, the followers we provide contribute to your overall social proof and can help attract more organic followers."},{question:"Is it safe to buy followers?",answer:"Absolutely. At Follx, we use safe and secure methods that do not violate platform guidelines or put your account at risk. We never ask for your password, use only your public username for delivery, and employ gradual delivery methods to mimic organic growth. We have delivered followers to over 500,000 accounts without any issues."},{question:"How quickly will I receive my followers?",answer:"Delivery begins within minutes of your purchase. Most orders are fully completed within 1-24 hours depen
1106ding on the package size. Larger orders may take slightly longer as we use gradual delivery to ensure natural growth patterns. You will see your follower count increasing throughout the delivery period."},{question:"What happens if followers drop?",answer:"While our followers have an industry-leading retention rate, some natural fluctuation is normal. We offer a 30-day guarantee with free refills. If you notice any significant drops within this period, simply contact our support team and we will replenish your followers at no additional cost."},{question:"Can buying followers help my business?",answer:"Yes, many businesses use follower growth services as part of their marketing strategy. A larger follower count increases social proof, making potential customers more likely to trust and engage with your brand. Combined with quality content and products, bought followers can contribute to increased visibility, customer acquisition, and overall business growth."},{question:"What payment methods do you accept?",answer:"We accept all major credit cards (Visa, MasterCard, American Express, Discover), PayPal, Apple Pay, Google Pay, and various cryptocurrency options including Bitcoin and Ethereum. All transactions are processed through secure, encrypted payment gateways."}],i={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(d=>({"@type":"Question",name:d.question,acceptedAnswer:{"@type":"Answer",text:d.answer}}))},c={"@context":"https://schema.org","@type":"Article",headline:"Buy Followers â The Ultimate Guide to Instagram Growth in 2025",author:{"@type":"Person",name:"Alexandra Thompson"},datePublished:"2025-01-08",dateModified:"2025-01-15",publisher:{"@type":"Organization",name:"Follx"}};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(i)}}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(c)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-blue-600 via-blue-700 to-cyan-700 py-20 lg:py-28",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute top-1/4 left-0 w-72 h-72 bg-blue-400 rounded-full opacity-20 blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-cyan-400 rounded-full opacity-15 blur-3xl"}),e.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-blue-300 rounded-full opacity-10 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/10 backdrop-blur text-white px-4 py-2 rounded-full text-sm font-medium mb-6 border border-white/20",children:[e.jsx(qs,{className:"w-4 h-4"}),"#1 Rated Follower Growth Service"]}),e.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white leading-tight mb-6",children:["Buy Followers & Transform Your ",e.jsx("span",{className:"text-cyan-300",children:"Instagram Presence"})]}),e.jsx("p",{className:"text-xl text-blue-100 mb-8 leading-relaxed max-w-3xl mx-auto",children:"Boost your Instagram with real, high-quality followers. No password required, instant delivery, and backed by our industry-leading 30-day guarantee. Join 500,000+ satisfied customers."}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 mb-10",children:[e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-white text-blue-600 px-8 py-4 rounded-xl font-semibold hover:bg-blue-50 transition-all shadow-lg shadow-blue-900/20 flex items-center justify-center gap-2",children:["Buy Followers Now",e.jsx(Yt,{className:"w-5 h-5"})]}),e.jsx("a",{href:"#pricing",className:"w-full sm:w-auto bg-white/10 backdrop-blur text-white px-8 py-4 rounded-xl font-semibold hover:bg-white/20 transition-all border border-white/20 flex items-center justify-center gap-2",children:"View Pricing"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-4 text-sm text-blue-100",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-400"}),e.jsx("span",{children:"500K+ Happy Customers"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-400"}),e.jsx("span",{children:"Instant Delivery"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-400"}),e.jsx("span",{children:"30-Day Guarantee"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"w-5 h-5 text-cyan-400"}),e.jsx("span",{children:"24/7 Support"})]})]})]})})]}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Why Buy Followers From Follx?"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"We offer the safest and most reliable follower growth service in the industry."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:s.map((d,x)=>e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6 hover:shadow-lg transition-all hover:-translate-y-1",children:[e.jsx("div",{className:"w-14 h-14 bg-blue-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(d.icon,{className:"w-7 h-7 text-blue-600"})}),e.jsx("h3",{className:"font-bold text-slate-900 text-lg mb-2",children:d.title}),e.jsx("p",{className:"text-slate-600",children:d.description})]},x))})]})}),e.jsx("article",{className:"py-16 bg-slate-50",children:e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-sm p-8 md:p-12",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-8 pb-8 border-b border-slate-200",children:[e.jsx("img",{src:"https://images.pexels.com/photos/1181686/pexels-photo-1181686.jpeg?w=80&h=80&fit=crop",alt:"Alexandra Thompson",className:"w-14 h-14 roun
1106ded-full object-cover"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900",children:"Alexandra Thompson"}),e.jsx("div",{className:"text-sm text-slate-500",children:"Digital Marketing Strategist"})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-4 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-4 h-4"}),"Jan 15, 2025"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ct,{className:"w-4 h-4"}),"189,672 views"]})]})]}),e.jsxs("div",{className:"prose prose-lg prose-slate max-w-none",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Ultimate Guide to Buying Followers in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"In today's digital age, social media presence has become a crucial factor in personal branding, business success, and online influence. Instagram, with its visual-centric platform and over 2 billion monthly active users, offers unparalleled opportunities for growth. However, building an organic following from scratch can take years of consistent effort. This is why many forward-thinking individuals and businesses choose to buy followers as a strategic accelerator for their social media growth."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Whether you are launching a new business, trying to break into the influencer space, or simply want to enhance your personal brand, understanding how to effectively buy followers can give you a significant advantage. In this comprehensive guide, we will explore every aspect of purchasing Instagram followers, from the benefits and considerations to best practices for maximizing your investment."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Understanding the Value of Social Proof"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Before diving into the mechanics of buying followers, it is essential to understand why follower count matters in the first place. The concept of social proof, first introduced by psychologist Robert Cialdini, explains that people tend to follow the actions and choices of others when making decisions. On social media, this manifests as users being more likely to follow, engage with, and trust accounts that already have a substantial following."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"When someone visits your Instagram profile, one of the first things they notice is your follower count. A profile with 500 followers sends a different signal than one with 50,000 followers. The larger account is perceived as more credible, more established, and more worth following. This perception can significantly impact whether new visitors decide to follow you, engage with your content, or do business with you."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Research has consistently shown that accounts with higher follower counts receive more engagement, attract more organic followers, and are more likely to be featured on the Explore page. By choosing to buy followers, you are essentially kickstarting this positive feedback loop, giving your account the initial momentum it needs to thrive."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/5935791/pexels-photo-5935791.jpeg?w=800&h=450&fit=crop",alt:"Social media growth and follower engagement",className:"w-full rounded-xl shadow-lg"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Strategic follower growth leads to increased visibility and engagement"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"The Strategic Benefits of Buying Followers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The decision to buy followers is a strategic one that can yield numerous benefits when executed correctly. Here are the key advantages that make this approach so attractive to individuals and businesses alike."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Accelerated Growth Trajectory"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"One of the most significant challenges on Instagram is the initial growth phase. Starting from zero, it can take months or even years to build a meaningful following organically. Every successful account had to overcome this hurdle, but modern growth strategies offer a faster path. When you buy followers, you compress this timeline dramatically, allowing you to focus on creating content and engaging with your audience rather than struggling to gain initial traction."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Enhanced Credibility and Trust"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Credibility is currency on social media. A higher follower count signals to potential followers, customers, and partners that your account is worth their attention. This enhanced credibility can open doors to opportunities that might otherwise be closed to accounts with smaller followings. Brands looking for influencers, customers researching businesses, and potential collaborators all factor follower count into their decisions."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Competitive Advantage"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"In virtually every niche, you are competing against other accounts for attention and followers. Many of your competitors may already be using growth services to boost their numbers. By buying followers, you level the playing field and ensure that your profile does not appear less established or credible in comparison."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Improved Algorithm Performance"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Instagram's algorithm considers various factors when deciding which content to promote. While engagement rate is crucial, the overall size of your audience also plays a role. Accounts with larger followings often have more absolute engagement, which can help content reach the Explore page and appear in more hashtag feeds. This increased visibility can drive organic growth and engagement over time."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Faster Monetization"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"For those looking to monetize their Instagram presence, follower count is often a gating factor. Brand partnerships typically have minimum follower requirements, and affiliate programs may be more accessible to accounts with established audie
1106nces. By investing in followers, you can reach these thresholds sooner and start generating revenue from your social media presence."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/7688336/pexels-photo-7688336.jpeg?w=800&h=450&fit=crop",alt:"Instagram marketing and business growth",className:"w-full rounded-xl shadow-lg"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Businesses leverage follower growth for increased market presence"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"How to Buy Followers Safely and Effectively"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"While the benefits of buying followers are clear, it is essential to approach this strategy thoughtfully and work with reputable providers. Here is what you need to know to buy followers safely and maximize your results."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Choose a Reputable Provider"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The quality of the followers you receive depends entirely on the provider you choose. Look for services that have been in business for several years, have verifiable customer reviews, and are transparent about their methods. Avoid providers that promise impossibly low prices or overnight delivery of massive follower counts. At Follx, we have built our reputation over years of delivering quality followers to over 500,000 satisfied customers."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Never Share Your Password"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"A legitimate follower service will never need your Instagram password. All delivery should be done using only your public username. Any service requesting login credentials should be avoided immediately. At Follx, we only ask for your username and never compromise your account security."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Prioritize Quality Over Quantity"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Not all followers are created equal. Low-quality bot followers can actually harm your account by skewing your engagement metrics and potentially triggering platform scrutiny. Always choose providers that offer high-quality followers with real-looking profiles. While these may cost slightly more, the investment in quality pays dividends in terms of account safety and perceived credibility."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Opt for Gradual Delivery"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Sudden spikes in follower count can look suspicious and may draw unwanted attention. The best providers offer gradual delivery options that mimic organic growth patterns. This approach is safer for your account and appears more natural to your existing followers and anyone who visits your profile."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Maximizing Your Investment in Followers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Buying followers is most effective when combined with a comprehensive Instagram strategy. Here are best practices for maximizing the value of your follower investment."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Continue Creating Quality Content"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Your content remains the foundation of your Instagram success. The followers you buy provide social proof and initial credibility, but quality content is what will attract and retain organic followers over time. Maintain a consistent posting schedule and focus on creating visually appealing, valuable content that resonates with your target audience."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Engage Authentically with Your Audience"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Engagement is the lifeblood of Instagram success. Respond to comments, participate in conversations, and show genuine interest in your followers. This authentic engagement not only builds community but also signals to the algorithm that your account is active and valuable, potentially boosting your visibility."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Leverage Your Increased Credibility"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Your larger follower count opens new doors. Use this enhanced credibility to reach out to brands for partnerships, collaborate with other creators, and promote your products or services more effectively. The social proof you have established makes these outreach efforts more likely to succeed."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Monitor and Analyze Your Growth"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Track your Instagram analytics to understand how your account is performing. Pay attention to metrics like engagement rate, reach, and organic follower growth. This data will help you refine your strategy and ensure you are getting the most value from both your bought followers and organic growth efforts."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Common Concerns and Misconceptions"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Many people have questions and concerns about buying followers. Let us address some of the most common misconceptions."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Will My A
1106ccount Get Banned?"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"When you work with a reputable provider like Follx, the risk to your account is minimal. We use safe delivery methods that do not violate platform terms of service. Our gradual delivery system mimics organic growth patterns, and we have delivered followers to over 500,000 accounts without any bans or penalties."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Will People Know I Bought Followers?"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"High-quality followers from reputable providers are indistinguishable from organic followers. They have real-looking profiles with pictures, bios, and posts. There is no indicator on your profile that shows where your followers came from. As long as you maintain good engagement with quality content, your bought followers will blend seamlessly with your organic audience."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Is Buying Followers Unethical?"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Buying followers is simply a marketing strategy, similar to paid advertising. Just as businesses invest in ads to increase visibility, investing in followers increases social proof and credibility. What matters is how you use this boost. If you provide genuine value to your audience and operate your account authentically, buying followers is simply a tool for accelerated growth."})]})]})})}),e.jsx("section",{id:"pricing",className:"py-16 bg-gradient-to-b from-blue-600 to-blue-700",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Buy Followers Packages"}),e.jsx("p",{className:"text-lg text-blue-100 max-w-2xl mx-auto",children:"Choose the perfect package for your growth goals. All packages include real followers and instant delivery."})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map((d,x)=>e.jsxs("div",{className:`relative rounded-2xl p-6 ${d.popular?"bg-white ring-4 ring-cyan-400":"bg-white/10 backdrop-blur border border-white/20"}`,children:[d.popular&&e.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-gradient-to-r from-cyan-400 to-blue-400 text-white text-xs font-bold px-4 py-1 rounded-full shadow-lg",children:"BEST VALUE"}),d.savings&&e.jsx("div",{className:`text-xs font-medium mb-2 ${d.popular?"text-cyan-600":"text-cyan-300"}`,children:d.savings}),e.jsx("div",{className:`text-4xl font-bold mb-1 ${d.popular?"text-slate-900":"text-white"}`,children:d.count}),e.jsx("div",{className:`text-sm mb-4 ${d.popular?"text-slate-500":"text-blue-200"}`,children:"Followers"}),e.jsx("div",{className:`text-3xl font-bold mb-6 ${d.popular?"text-slate-900":"text-white"}`,children:d.price}),e.jsx("button",{onClick:t,className:`w-full py-3 rounded-xl font-semibold transition-all ${d.popular?"bg-gradient-to-r from-blue-600 to-cyan-600 text-white hover:from-blue-700 hover:to-cyan-700":"bg-white/20 text-white hover:bg-white/30"}`,children:"Buy Now"})]},x))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Who Should Buy Followers?"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Our service is perfect for anyone looking to grow their Instagram presence quickly and safely."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:l.map((d,x)=>e.jsxs("div",{className:"group relative overflow-hidden rounded-2xl",children:[e.jsx("img",{src:d.image,alt:d.title,className:"w-full h-64 object-cover group-hover:scale-105 transition-transform duration-300"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-900/90 via-slate-900/50 to-transparent"}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-6",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 backdrop-blur rounded-lg flex items-center justify-center mb-3",children:e.jsx(d.icon,{className:"w-5 h-5 text-white"})}),e.jsx("h3",{className:"font-bold text-white text-lg mb-1",children:d.title}),e.jsx("p",{className:"text-sm text-slate-300",children:d.description})]})]},x))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Why Follx Is Different"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"See how we compare to other follower services."})]}),e.jsx("div",{className:"bg-white rounded-2xl shadow-sm overflow-hidden",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-50",children:[e.jsx("th",{className:"px-6 py-4 text-left text-sm font-semibold text-slate-900",children:"Feature"}),e.jsx("th",{className:"px-6 py-4 text-center text-sm font-semibold text-blue-600",children:"Follx"}),e.jsx("th",{className:"px-6 py-4 text-center text-sm font-semibold text-slate-400",children:"Others"})]})}),e.jsx("tbody",{children:r.map((d,x)=>e.jsxs("tr",{className:"border-t border-slate-100",children:[e.jsx("td",{className:"px-6 py-4 text-sm text-slate-600",children:d.feature}),e.jsx("td",{className:"px-6 py-4 text-center",children:d.follx?e.jsx(ne,{className:"w-5 h-5 text-green-500 mx-auto"}):e.jsx("span",{className:"w-5 h-5 block mx-auto text-slate-300",children:"-"})}),e.jsx("td",{className:"px-6 py-4 text-center",children:d.others?e.jsx(ne,{className:"w-5 h-5 text-slate-300 mx-auto"}):e.jsx("span",{className:"w-5 h-5 block mx-auto text-slate-300",children:"-"})})]},x))})]})})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Frequently Asked Questions"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Everything you need to know about buying followers."})]}),e.jsx("div",{className:"space-y-4",children:n.map((d,x)=>e.jsx("div",{className:"bg-slate-50 rounded-xl overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:d.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:d.answer})})]})},x))})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-blue-600 to-cyan-600",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Ready to Buy Followers?"}),e.jsx("p",{className:"text-lg text-blue-100 mb-8 max-w-2xl mx-auto",children:"Join over 500,000 satisfied customers who have transformed their Instagram presence with Follx. Real followers, instant delivery, and a 30-day guarantee."}),e.jsxs("button",{onClick:t,className:"bg-white text-blue-600 px-8 py-4 rounded-xl font-semibold hover:bg-blue-50 transition-all shadow-lg flex items-center justify-center gap-2 mx-auto",children:["Get Started Now",e.jsx(Yt,{className:"w-5 h-5"})]})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"The trusted source for buying Instagram followers. Safe, fast, and reliable growth."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-followers",className:"hover:text-white transition-colors",children:"Buy Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-ig-followers",className:"hover:text-white transition-colors",children:"Buy IG Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers",className:"hover:text-white transition-colors",children:"Buy Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"})}),e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition-colors",children:"Blog"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function $6({onGetStarted:t}){o.useEffect(()=>{document.title="Buy Instagram Followers â #1 Trusted Service | Instant Delivery | Follx";
1106const m=document.querySelector('meta[name="description"]');if(m&&m.setAttribute("content","Buy Instagram followers from the most trusted provider. Real followers, instant delivery, no password required. 500K+ satisfied customers. 30-day money-back guarantee. Best prices since 2019."),!document.querySelector('meta[name="keywords"]')){const y=document.createElement("meta");y.name="keywords",y.content="buy instagram followers, instagram followers, buy followers instagram, real instagram followers, cheap instagram followers, instant followers, grow instagram, instagram growth service",document.head.appendChild(y)}if(!document.querySelector('link[rel="canonical"]')){const y=document.createElement("link");y.rel="canonical",y.href="https://follx.com/buy-instagram-followers",document.head.appendChild(y)}},[]);const s=[{value:"500K+",label:"Satisfied Customers"},{value:"75M+",label:"Followers Delivered"},{value:"4.9/5",label:"Customer Rating"},{value:"24/7",label:"Customer Support"}],a=[{icon:kl,title:"Premium Quality",description:"High-quality followers with complete profiles, profile pictures, and authentic activity."},{icon:rt,title:"Instant Start",description:"Delivery begins within minutes of your order. See results fast."},{icon:lt,title:"100% Safe",description:"No password required. Your account security is never compromised."},{icon:Ve,title:"30-Day Guarantee",description:"Free refills if you experience any drops within 30 days."},{icon:wt,title:"Global Delivery",description:"Followers from around the world for diverse audience growth."},{icon:Ta,title:"VIP Support",description:"Priority support available for all customers."}],r=[{count:"100",price:"$1.99",original:"$2.99",tag:"Starter"},{count:"500",price:"$6.99",original:"$9.99",tag:"Growth"},{count:"1,000",price:"$11.99",original:"$16.99",tag:"Popular",popular:!0},{count:"2,500",price:"$24.99",original:"$34.99",tag:"Business"},{count:"5,000",price:"$44.99",original:"$64.99",tag:"Pro"},{count:"10,000",price:"$79.99",original:"$119.99",tag:"Enterprise"}],l=[{step:1,title:"Choose Package",description:"Select the Instagram follower package that matches your goals and budget.",icon:Os},{step:2,title:"Enter Username",description:"Provide your public Instagram username. We never ask for your password.",icon:mt},{step:3,title:"Secure Checkout",description:"Complete your purchase through our encrypted payment system.",icon:$t},{step:4,title:"Watch Growth",description:"Sit back and watch your Instagram following grow within minutes.",icon:Or}],n=[{name:"Jessica Williams",role:"Lifestyle Blogger",avatar:"https://images.pexels.com/photos/1065084/pexels-photo-1065084.jpeg?w=100&h=100&fit=crop",content:"I bought Instagram followers from Follx to kickstart my new lifestyle blog. Within days, I started getting organic followers too. The social proof really works!",rating:5,followers:"25K"},{name:"Michael Torres",role:"E-commerce Owner",avatar:"https://images.pexels.com/photos/614810/pexels-photo-614810.jpeg?w=100&h=100&fit=crop",content:"Our online store needed credibility on Instagram. Buying followers from Follx was the best marketing investment we made. Sales increased by 40% after.",rating:5,followers:"50K"},{name:"Sophia Anderson",role:"Fitness Influencer",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"As a fitness influencer, having a large following is essential for brand deals. Follx helped me reach 100K and now I work with top fitness brands.",rating:5,followers:"100K+"},{name:"David Kim",role:"Music Producer",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"Getting my music heard was tough with a small following. After buying Instagram followers, my reach exploded and I got signed to a label.",rating:5,followers:"75K"}],i=[{question:"What happens when I buy Instagram followers?",answer:"When you buy Instagram followers from Follx, our system begins delivering followers to your account within minutes of your purchase. You will see your follower count increase gradually over the delivery period (typically 1-24 hours depen
1106ding on package size). The followers appear on your profile just like organic followers, complete with profile pictures and usernames. Your account remains safe throughout the process as we never access it directly or require your password."},{question:"Are the Instagram followers real?",answer:"Yes, we provide high-quality followers with real-looking profiles. Each follower account has a profile picture, bio, and posts. They are designed to appear as authentic Instagram users and contribute to your social proof. While they may not actively engage with your content like your organic audience, they significantly boost your credibility and help attract more genuine followers who see your high follower count as a sign of quality."},{question:"Is buying Instagram followers safe for my account?",answer:"Absolutely. Buying Instagram followers from Follx is completely safe. We use secure delivery methods that comply with platform guidelines. We never ask for your password - only your public username. Our gradual delivery system mimics organic growth patterns to avoid any flags. We have delivered over 75 million followers to 500,000+ accounts without any bans, penalties, or security issues."},{question:"How long does delivery take?",answer:"Delivery begins within 0-15 minutes of completing your purchase. Most orders are fully delivered within 1-24 hours depending on the package size. Larger orders use gradual delivery spread over several hours to ensure natural-looking growth. You can track your delivery progress by monitoring your follower count in real-time."},{question:"Will my followers drop after purchase?",answer:"Our followers have an industry-leading retention rate. However, minor fluctuations are normal on any social media platform. We offer a comprehensive 30-day guarantee with free refills. If you notice any significant drops within this period, simply contact our support team and we will replenish your followers at no additional cost. This guarantee ensures you always get the full value of your purchase."},{question:"Can people tell I bought Instagram followers?",answer:"No, there is no way for others to tell that you bought followers. Our followers look like regular Instagram accounts with profile pictures, bios, and posts. They blend in naturally with your organic following. Your engagement rate is the only potential indicator, which is why we recommend combining follower purchases with quality content and genuine engagement strategies for the best results."},{question:"Will buying followers help me get verified?",answer:"While follower count alone does not guarantee verification, a larger following is one factor Instagram considers. More importantly, buying followers helps establish the social proof and credibility that can lead to press coverage, brand partnerships, and other factors that support verification applications. Many of our customers have gone on to get verified after building their presence with our help."},{question:"Do you offer followers for private accounts?",answer:"Our service works best with public Instagram accounts, as this allows us to deliver followers without requiring any login credentials. If your account is private, we recommend temporarily switching to public during the delivery period. You can set your account back to private after delivery is complete, and all your new followers will remain."},{question:"What payment methods do you accept?",answer:"We accept all major credit and debit cards (Visa, MasterCard, American Express, Discover), PayPal, Apple Pay, Google Pay, and various cryptocurrencies including Bitcoin, Ethereum, and USDT. All transactions are processed through secure, PCI-compliant payment gateways with SSL encryption to protect your financial information."},{question:"Can I buy Instagram followers for someone else?",answer:"Yes, you can purchase followers for any public Instagram account. Simply enter the username of the account you want to grow during checkout. This makes our service perfect for gifting, managing client accounts, or growing business pages. The account owner does not need to do anything - they will simply see their follower count increase."}],c={"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(m=>
1106({"@type":"Question",name:m.question,acceptedAnswer:{"@type":"Answer",text:m.answer}}))},d={"@context":"https://schema.org","@type":"Article",headline:"Buy Instagram Followers â The Complete 2025 Guide to Growing Your Account",author:{"@type":"Person",name:"Christopher Blake"},datePublished:"2025-01-05",dateModified:"2025-01-16",publisher:{"@type":"Organization",name:"Follx"}},x={"@context":"https://schema.org","@type":"Product",name:"Instagram Followers",description:"Buy high-quality Instagram followers with instant delivery",brand:{"@type":"Brand",name:"Follx"},offers:{"@type":"AggregateOffer",lowPrice:"1.99",highPrice:"79.99",priceCurrency:"USD"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.9",reviewCount:"15847"}};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(c)}}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(d)}}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(x)}}),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center",children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:t,className:"bg-gradient-to-r from-rose-500 to-pink-600 text-white px-5 py-2.5 rounded-lg font-medium hover:from-rose-600 hover:to-pink-700 transition-all",children:"Get Started"})]})})}),e.jsxs("section",{className:"relative overflow-hidden py-20 lg:py-28",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-orange-500 via-pink-500 to-rose-600"}),e.jsx("div",{className:"absolute inset-0 bg-[url('https://images.pexels.com/photos/3585089/pexels-photo-3585089.jpeg?w=1920&h=1080&fit=crop')] bg-cover bg-center opacity-10"}),e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-96 h-96 bg-white rounded-full opacity-10 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-96 h-96 bg-yellow-400 rounded-full opacity-10 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur text-white px-4 py-2 rounded-full text-sm font-medium mb-6 border border-white/30",children:[e.jsx(Ta,{className:"w-4 h-4"}),"#1 Instagram Growth Service 2025"]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white leading-tight mb-6",children:"Buy Instagram Followers"}),e.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:"Join 500,000+ satisfied customers who have grown their Instagram with real, high-quality followers. Instant delivery, no password required, and backed by our 30-day guarantee."}),e.jsx("div",{className:"flex flex-col sm:flex-row items-start gap-4 mb-10",children:e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-white text-rose-600 px-8 py-4 rounded-xl font-bold hover:bg-rose-50 transition-all shadow-xl shadow-rose-900/20 flex items-center justify-center gap-2 text-lg",children:["Buy Instagram Followers",e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:s.map((m,h)=>e.jsxs("div",{className:"bg-white/10 backdrop-blur rounded-xl p-3 border border-white/20 text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-white",children:m.value}),e.jsx("div",{className:"text-xs text-white/70",children:m.label})]},h))})]}),e.jsx("div",{className:"relative hidden lg:block",children:e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:"https://images.pexels.com/photos/5082581/pexels-photo-5082581.jpeg?w=500&h=600&fit=crop",alt:"Buy Instagram followers and grow your account",className:"rounded-2xl shadow-2xl"}),e.jsx("div",{className:"absolute -bottom-6 -right-6 bg-white rounded-2xl p-5 shadow-xl",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-green-400 to-emerald-500 rounded-full flex items-center justify-center",children:e.jsx(tt,{className:"w-7 h-7 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-slate-500",children:"New Followers"}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:"+10,458"})]})]})}),e.jsx("div",{className:"absolute -top-4 -left-4 bg-white rounded-xl p-3 shadow-lg",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex -sp
1106ace-x-2",children:[e.jsx("img",{src:"https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?w=32&h=32&fit=crop",className:"w-8 h-8 rounded-full border-2 border-white",alt:""}),e.jsx("img",{src:"https://images.pexels.com/photos/1222271/pexels-photo-1222271.jpeg?w=32&h=32&fit=crop",className:"w-8 h-8 rounded-full border-2 border-white",alt:""}),e.jsx("img",{src:"https://images.pexels.com/photos/1239291/pexels-photo-1239291.jpeg?w=32&h=32&fit=crop",className:"w-8 h-8 rounded-full border-2 border-white",alt:""})]}),e.jsx("span",{className:"text-sm font-medium text-slate-600",children:"+500K customers"})]})})]})})]})})]}),e.jsx("section",{className:"py-4 bg-slate-900",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 text-slate-400",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{children:"No Password Needed"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-slate-400",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{children:"Real Followers"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-slate-400",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{children:"Instant Delivery"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-slate-400",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{children:"30-Day Guarantee"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-slate-400",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{children:"Secure Payment"})]})]})})}),e.jsx("section",{id:"packages",className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Buy Instagram Followers Packages"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Choose from our range of packages designed for every budget and growth goal. All packages include real followers and instant delivery."})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:r.map((m,h)=>e.jsxs("div",{className:`relative rounded-2xl p-6 transition-all hover:-translate-y-1 hover:shadow-xl ${m.popular?"bg-gradient-to-br from-rose-500 to-pink-600 text-white ring-4 ring-rose-300":"bg-white border-2 border-slate-200"}`,children:[m.popular&&e.jsxs("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-yellow-400 text-yellow-900 text-xs font-bold px-4 py-1 rounded-full shadow-lg flex items-center gap-1",children:[e.jsx(Zt,{className:"w-3 h-3 fill-yellow-900"}),"MOST POPULAR"]}),e.jsx("div",{className:`text-xs font-semibold uppercase tracking-wider mb-2 ${m.popular?"text-rose-200":"text-rose-500"}`,children:m.tag}),e.jsx("div",{className:`text-5xl font-bold mb-1 ${m.popular?"text-white":"text-slate-900"}`,children:m.count}),e.jsx("div",{className:`text-sm mb-4 ${m.popular?"text-rose-100":"text-slate-500"}`,children:"Instagram Followers"}),e.jsxs("div",{className:"flex items-baseline gap-2 mb-6",children:[e.jsx("span",{className:`text-3xl font-bold ${m.popular?"text-white":"text-slate-900"}`,children:m.price}),e.jsx("span",{className:`text-lg line-through ${m.popular?"text-rose-200":"text-slate-400"}`,children:m.original})]}),e.jsxs("ul",{className:`space-y-2 mb-6 text-sm ${m.popular?"text-rose-100":"text-slate-600"}`,children:[e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:`w-4 h-4 ${m.popular?"text-rose-200":"text-green-500"}`}),"Real High-Quality Followers"]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:`w-4 h-4 ${m.popular?"text-rose-200":"text-green-500"}`}),"Instant Delivery Start"]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:`w-4 h-4 ${m.popular?"text-rose-200":"text-green-500"}`}),"30-Day Guarantee"]})]}),e.jsx("button",{onClick:t,className:`w-full py-3 rounded-xl font-semibold transition-all ${m.popular?"bg-white text-rose-600 hover:bg-rose-50":"bg-gradient-to-r from-rose-500 to-pink-600 text-white hover:from-rose-600 hover:to-pink-700"}`,children:"Buy Now"})]},h))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"How to Buy Instagram Followers"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Get started in just 4 simple steps. No complicated setup required."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:l.map((m,h)=>e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm h-full",children:[e.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-rose-500 to-pink-600 rounded-xl flex items-center justify-center mb-4 text-white font-bold text-xl",children:m.step}),e.jsx("h3",{className:"font-bold text-slate-900 text-lg mb-2",children:m.title}),e.jsx("p",{className:"text-slate-600",children:m.description})]}),h<l.length-1&&e.jsx(Yt,{className:"hidden lg:block absolute top-1/2 -right-4 w-8 h-8 text-rose-300 -translate-y-1/2"})]},h))})]})}),e.jsx("article",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-8 pb-8 border-b border-slate-200",children:[e.jsx("img",{src:"https://images.pexels.com/photos/2182970/pexels-photo-2182970.jpeg?w=80&h=80&fit=crop",alt:"Christopher Blake",className:"w-14 h-14 roun
1106ded-full object-cover"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900",children:"Christopher Blake"}),e.jsx("div",{className:"text-sm text-slate-500",children:"Instagram Growth Specialist"})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-4 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-4 h-4"}),"Jan 16, 2025"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ct,{className:"w-4 h-4"}),"247,891 views"]})]})]}),e.jsxs("div",{className:"prose prose-lg prose-slate max-w-none",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to Buying Instagram Followers in 2025"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["Instagram has evolved from a simple photo-sharing app into one of the most powerful platforms for personal branding, business marketing, and digital influence. With over 2 billion monthly active users and counting, the competition for attention has never been fiercer. In this environment, the decision to buy Instagram followers has become a strategic choice for millions of users looking to accelerate their growth and establish credibility quickly. Combined with services like ",e.jsx("a",{href:"/buy-instagram-likes",className:"text-rose-600 hover:text-rose-700 font-medium",children:"Instagram likes"})," and ",e.jsx("a",{href:"/buy-instagram-views",className:"text-rose-600 hover:text-rose-700 font-medium",children:"Instagram views"}),", a comprehensive growth strategy can transform your profile."]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Whether you are a business owner looking to expand your customer base, an influencer seeking brand partnerships, or a content creator wanting to share your work with a wider audience, understanding how to effectively buy Instagram followers can be a game-changer for your social media success."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why Buy Instagram Followers?"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The decision to buy Instagram followers is rooted in the fundamental psychology of social proof. When users encounter your profile, your follower count is one of the first metrics they evaluate. A profile with 50,000 followers immediately commands more attention and respect than one with 500 followers, regardless of content quality. This perception creates a self-reinforcing cycle where larger accounts continue to grow while smaller ones struggle for visibility."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"The Power of First Impressions"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Research in consumer psychology shows that users make judgments about social media profiles within seconds. A higher follower count triggers positive associations including credibility, popularity, and trustworthiness. When someone is deciding whether to follow you, purchase from your business, or engage with your content, that first impression based on your follower count can be decisive."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"By choosing to buy Instagram followers, you are essentially investing in a stronger first impression. You are giving visitors a reason to take you seriously and engage with your content, rather than scrolling past to the next profile that appears more established."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Breaking the Algorithm Barrier"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:`Instagram's algorithm is designed to promote content that is already performing well. Accounts with larger followings tend to receive more engagement, which signals to the algorithm that their content is valuable and worth promoting. This creates what many marketers call the "Instagram paradox" - you need engagement to get visibility, but you need visibility to get engagement.`}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"When you buy Instagram followers, you help break this cycle by establishing a baseline of social proof that makes your account more attractive to both the algorithm and organic users. Your posts are more likely to appear in hashtag feeds and the Explore page, leading to more organic discovery and growth."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/607812/pexels-photo-607812.jpeg?w=800&h=450&fit=crop",alt:"Instagram marketing strategy for follower growth",className:"w-full rounded-xl shadow-lg"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Strategic follower growth enhances your Instagram marketing effectiveness"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"The Benefits of Buying Instagram Followers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Understanding the specific benefits of buying Instagram followers can help you make an informed decision about whether this strategy aligns with your goals."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Instant Credibility Boost"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The most immediate benefit of buying Instagram followers is the instant boost to your credibility. Within hours of your purchase, your profile will display a follower count that positions you as an established presence in your niche. This credibility extends to all aspects of your Instagram activity - your posts will be taken more seriously, your comments will carry more weight, and your profile will attract more organic visitors."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Accelerated Growth Momentum"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"One of the most powerful effects of buying Instagram followers is the momentum it creates. A larger follower count attracts more organic followers because people are naturally drawn to popular accounts. This snowball effect means that your initial investment in followers can continue to pay dividends long after the purchased followers are delivered, as organic growth accelerates."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Business and Monetization Opportunities"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["For businesses and aspiring influencers, follower count often determines access to opportunities. Brands looking for influencer partnerships typically have minimum follower requirements. Aff
1106iliate programs may be more accessible to accounts with established audiences. E-commerce businesses see higher conversion rates when their social proof is strong. By buying Instagram followers, you fast-track your access to these monetization opportunities. This applies across platforms too - growing your ",e.jsx("a",{href:"/buy-tiktok-followers",className:"text-rose-600 hover:text-rose-700 font-medium",children:"TikTok followers"}),", ",e.jsx("a",{href:"/buy-youtube-subscribers",className:"text-rose-600 hover:text-rose-700 font-medium",children:"YouTube subscribers"}),", and ",e.jsx("a",{href:"/buy-twitter-followers",className:"text-rose-600 hover:text-rose-700 font-medium",children:"Twitter followers"})," creates a powerful multi-platform presence."]}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Competitive Positioning"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"In virtually every niche on Instagram, you are competing against others for attention and followers. Many successful accounts have used growth services to establish their position. By buying Instagram followers, you ensure that your profile does not appear inferior to competitors who may have had a head start or used similar strategies."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Time and Resource Efficiency"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Growing an Instagram following organically requires significant time and effort. Creating content, engaging with followers, researching hashtags, and staying consistent can take hours every day for months or years. When you buy Instagram followers, you compress this timeline and can focus your energy on creating great content and serving your audience rather than grinding for growth."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/6476589/pexels-photo-6476589.jpeg?w=800&h=450&fit=crop",alt:"Business growth through Instagram followers",className:"w-full rounded-xl shadow-lg"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Businesses leverage Instagram follower growth for increased market presence"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"How to Buy Instagram Followers Safely"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The safety and effectiveness of buying Instagram followers depends largely on choosing the right provider and following best practices. Here is what you need to know to buy followers safely."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Select a Reputable Provider"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The most important factor in buying Instagram followers safely is choosing a reputable provider with a proven track record. Look for companies that have been in business for several years, have verifiable customer reviews, and are transparent about their methods. Avoid providers offering suspiciously low prices or making unrealistic promises. At Follx, we have built our reputation over years of delivering high-quality followers to over 500,000 satisfied customers."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Protect Your Account Security"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"A legitimate Instagram follower service will never need your password. All delivery should be accomplished using only your public username. Any service requesting login credentials should be avoided immediately, as this is a major red flag for potential scams or account compromise. At Follx, we only ask for your Instagram username and never access your account directly."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Choose Gradual Delivery"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The best providers offer gradual delivery that mimics organic growth patterns. Sudden spikes in follower count can look suspicious and may trigger platform scrutiny. Gradual delivery ensures your growth appears natural and reduces any potential risks to your account. Our delivery system at Follx is designed to provide steady, natural-looking growth."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Look for Quality Guarantees"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Reputable providers stand behind their service with guarantees. Look for services that offer refills if followers drop and have clear policies for customer satisfaction. At Follx, we provide a comprehensive 30-day guarantee with free refills, ensuring you always re
1106ceive the full value of your purchase."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Maximizing Results After Buying Instagram Followers"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Buying Instagram followers is most effective when integrated into a comprehensive growth strategy. Here are best practices for maximizing your results."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Create Compelling Content"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Your content remains the foundation of your Instagram success. With your new follower count establishing credibility, focus on creating high-quality content that provides value to your audience. This will help attract and retain organic followers who discover your profile."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Engage Authentically"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Active engagement with your community is essential. Respond to comments, participate in conversations, and show genuine interest in your followers. This engagement builds loyalty and signals to the algorithm that your account is active and valuable."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Utilize All Instagram Features"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Take advantage of all Instagram features including Reels, Stories, IGTV, and Live videos. The algorithm favors accounts that use multiple features, and diverse content types help you reach different segments of your audience. Your larger follower base will amplify the impact of these efforts."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Maintain Consistency"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Consistency is key to Instagram success. Maintain a regular posting schedule, consistent visual branding, and reliable engagement with your community. This consistency builds trust with your audience and keeps your account active in the eyes of the algorithm."})]})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Why Choose Follx?"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"We have helped over 500,000 customers grow their Instagram safely and effectively."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map((m,h)=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm hover:shadow-lg transition-all",children:[e.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-rose-100 to-pink-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(m.icon,{className:"w-7 h-7 text-rose-600"})}),e.jsx("h3",{className:"font-bold text-slate-900 text-lg mb-2",children:m.title}),e.jsx("p",{className:"text-slate-600",children:m.description})]},h))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Success Stories"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"See what our customers have achieved after buying Instagram followers."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:n.map((m,h)=>e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6",children:[e.jsx("div",{className:"flex items-center gap-1 mb-4",children:[...Array(m.rating)].map((f,y)=>e.jsx(Zt,{className:"w-4 h-4 fill-amber-400 text-amber-400"},y))}),e.jsxs("p",{className:"text-slate-600 text-sm mb-4 leading-relaxed",children:['"',m.content,'"']}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:m.avatar,alt:m.name,className:"w-10 h-10 rounded-full object-cover"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900 text-sm",children:m.name}),e.jsx("div",{className:"text-xs text-slate-500",children:m.role})]})]}),e.jsxs("div",{className:"text-xs font-medium text-rose-500",children:[m.followers," followers"]})]})]},h))})]})}),e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Frequently Asked Questions"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Everything you need to know about buying Instagram followers."})]}),e.jsx("div",{className:"space-y-4",children:i.map((m,h)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:m.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:m.answer})})]})},h))})]})}),e.jsx("section",{className:"py-16 bg-gradient-to-r from-rose-500 via-pink-500 to-orange-500",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:"Ready to Buy Instagram Followers?"}),e.jsx("p",{className:"text-lg text-white/90 mb-8 max-w-2xl mx-auto",children:"Join over 500,000 satisfied customers and start growing your Instagram today. Real followers, instant delivery, and our 30-day money-back guarantee."}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:e.jsxs("button",{onClick:t,className:"w-full sm:w-auto bg-white text-rose-600 px-8 py-4 rounded-xl font-bold hover:bg-rose-50 transition-all shadow-lg flex items-center justify-center gap-2",children:["Buy Instagram Followers Now",e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsx("p",{className:"text-white/70 text-sm mt-6",children:"No password required. 100% safe and secure."})]})}),e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-rose-500 to-pink-600 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:"The #1 trusted service to buy Instagram followers. Safe, fast, and reliable growth for your account."})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Instagram"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers",className:"hover:text-white transition-colors",children:"Buy Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-likes",className:"hover:text-white transition-colors",children:"Buy Instagram Likes"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-views",className:"hover:text-white transition-colors",children:"Buy Instagram Views"})}),e.jsx("li",{children:e.jsx("a",{href:"/real-instagram-followers",className:"hover:text-white transition-colors",children:"Real Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-instagram-followers",className:"hover:text-white transition-colors",children:"Cheap Instagram Followers"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Other Platforms"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-tiktok-followers",className:"hover:text-white transition-colors",children:"Buy TikTok Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-youtube-subscribers",className:"hover:text-white transition-colors",children:"Buy YouTube Subscribers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-twitter-followers",className:"hover:text-white transition-colors",children:"Buy Twitter Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/best-smm-panel",className:"hover:text-white transition-colors",children:"Best SMM Panel"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-smm-panel",className:"hover:text-white transition-colors",children:"Cheap SMM Panel"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Resources"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/smm-panel-api",className:"hover:text-white transition-colors",children:"SMM Panel API"})}),e.jsx("li",{children:e.jsx("a",{href:"/smm-panel-reseller",className:"hover:text-white transition-colors",children:"SMM Reseller"})}),e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function Il({children:t,title:s,metaDescription:a,metaKeywords:r,canonicalUrl:l,schemas:n,accentColor:i,onGetStarted:c}){o.useEffect(()=>{document.title=s;
1106const m=document.querySelector('meta[name="description"]');m&&m.setAttribute("content",a);let h=document.querySelector('meta[name="keywords"]');h||(h=document.createElement("meta"),h.name="keywords",document.head.appendChild(h)),h.setAttribute("content",r);let f=document.querySelector('link[rel="canonical"]');f||(f=document.createElement("link"),f.rel="canonical",document.head.appendChild(f)),f.href=l;let y=document.querySelector('meta[property="og:title"]');y||(y=document.createElement("meta"),y.setAttribute("property","og:title"),document.head.appendChild(y)),y.setAttribute("content",s);let g=document.querySelector('meta[property="og:description"]');g||(g=document.createElement("meta"),g.setAttribute("property","og:description"),document.head.appendChild(g)),g.setAttribute("content",a);let w=document.querySelector('meta[property="og:url"]');w||(w=document.createElement("meta"),w.setAttribute("property","og:url"),document.head.appendChild(w)),w.setAttribute("content",l);let N=document.querySelector('meta[property="og:type"]');N||(N=document.createElement("meta"),N.setAttribute("property","og:type"),document.head.appendChild(N)),N.setAttribute("content","website");let v=document.querySelector('meta[name="twitter:card"]');v||(v=document.createElement("meta"),v.name="twitter:card",document.head.appendChild(v)),v.setAttribute("content","summary_large_image");let j=document.querySelector('meta[name="twitter:title"]');j||(j=document.createElement("meta"),j.name="twitter:title",document.head.appendChild(j)),j.setAttribute("content",s);let b=document.querySelector('meta[name="twitter:description"]');b||(b=document.createElement("meta"),b.name="twitter:description",document.head.appendChild(b)),b.setAttribute("content",a)},[s,a,r,l]);const d={rose:"from-rose-500 to-pink-600",blue:"from-blue-500 to-cyan-600",teal:"from-teal-500 to-emerald-600",red:"from-red-500 to-rose-600",sky:"from-sky-500 to-blue-600",amber:"from-amber-500 to-orange-600",emerald:"from-emerald-500 to-teal-600",slate:"from-slate-700 to-slate-900"},x=d[i]||d.rose;return e.jsxs("div",{className:"min-h-screen bg-white",children:[n.map((m,h)=>e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(m)}},h)),e.jsx("header",{className:"bg-white border-b border-slate-100 sticky top-0 z-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-10 h-10 bg-gradient-to-br ${x} rounded-xl flex items-center justify-center`,children:e.jsx(tt,{className:"w-6 h-6 text-white"})}),e.jsx("span",{className:"text-xl font-bold text-slate-900",children:"Follx"})]}),e.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[e.jsx("a",{href:"/",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Home"}),e.jsx("a",{href:"/pricing",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Pricing"}),e.jsx("a",{href:"/smm-panel-reseller",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Reseller"}),e.jsx("a",{href:"/smm-panel-api",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"API"}),e.jsx("a",{href:"/blog",className:"text-slate-600 hover:text-slate-900 transition-colors",children:"Blog"})]}),e.jsx("button",{onClick:c,className:`bg-gradient-to-r ${x} text-white px-5 py-2.5 rounded-lg font-medium hover:opacity-90 transition-all`,children:"Get Started"})]})})}),t,e.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:`w-8 h-8 bg-gradient-to-br ${x} rounded-lg flex items-center justify-center`,children:e.jsx(tt,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:"text-lg font-bold text-white",children:"Follx"})]}),e.jsxs("p",{className:"text-sm leading-relaxed",children:["The #1 trusted ",e.jsx("a",{href:"/",className:"text-slate-300 hover:text-white",children:"SMM Panel"})," for social media growth. Safe, fast, and reliable services for Instagram, TikTok, YouTube, and Twitter."]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Services"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-followers",className:"hover:text-white transition-colors",children:"Buy Instagram Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-likes",className:"hover:text-white transition-colors",children:"Buy Instagram Likes"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-instagram-views",className:"hover:text-white transition-colors",children:"Buy Instagram Views"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-tiktok-followers",className:"hover:text-white transition-colors",children:"Buy TikTok Followers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-youtube-subscribers",className:"hover:text-white transition-colors",children:"Buy YouTube Subscribers"})}),e.jsx("li",{children:e.jsx("a",{href:"/buy-twitter-followers",className:"hover:text-white transition-colors",children:"Buy Twitter Followers"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"SMM Panel"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/smm-panel-reseller",className:"hover:text-white transition-colors",children:"SMM Panel Reseller"})}),e.jsx("li",{children:e.jsx("a",{href:"/smm-panel-api",className:"hover:text-white transition-colors",children:"SMM Panel API"})}),e.jsx("li",{children:e.jsx("a",{href:"/cheap-smm-panel",className:"hover:text-white transition-colors",children:"Cheap SMM Panel"})}),e.jsx("li",{children:e.jsx("a",{href:"/best-smm-panel",className:"hover:text-white transition-colors",children:"Best SMM Panel"})}),e.jsx("li",{children:e.jsx("a",{href:"/",className:"hover:text-white transition-colors",children:"Home"})}),e.jsx("li",{children:e.jsx("a",{href:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"})})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-white font-semibold mb-4",children:"Legal"}),e.jsxs("ul",{className:"space-y-2 text-sm",children:[e.jsx("li",{children:e.jsx("a",{href:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund",className:"hover:text-white transition-colors",children:"Refund Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition-colors",children:"Blog"})})]})]})]}),e.jsx("div",{className:"border-t border-slate-800 pt-8 text-sm text-center",children:e.jsxs("p",{children:["© ",new Date().getFullYear()," Follx. All rights reserved."]})})]})})]})}function Tl({badge:t,h1:s,subtitle:a,ctaText:r,trustIndicators:l,heroImage:n,heroImageAlt:i,overlayStatLabel:c,overlayStatValue:d,gradient:x,bgImage:m,onGetStarted:h}){return e.jsxs("section",{className:"relative overflow-hidden py-20 lg:py-28",children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${x}`}),e.jsx("div",{className:"absolute inset-0 bg-cover bg-center opacity-10",style:{backgroundImage:`url('${m}')`}}),e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-96 h-96 bg-white rounded-full opacity-10 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-96 h-96 bg-yellow-400 rounded-full opacity-10 blur-3xl"})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur text-white px-4 py-2 rounded-full text-sm font-medium mb-6 border border-white/30",children:[e.jsx(Ta,{className:"w-4 h-4"}),t]}),e.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white leading-tight mb-6",children:s}),e.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:a}),e.jsx("div",{className:"flex flex-col sm:flex-row items-start gap-4 mb-10",children:e.jsxs("button",{onClick:h,className:"w-full sm:w-auto bg-white text-slate-900 px-8 py-4 rounded-xl font-bold hover:bg-slate-50 transition-all shadow-xl flex items-center justify-center gap-2 text-lg",children:[r,e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:l.map((f,y)=>e.jsxs("div",{className:"bg-white/10 backdrop-blur rounded-xl p-3 border border-white/20 text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-white",children:f.value}),e.jsx("div",{className:"text-xs text-white/70",children:f.label})]},y))})]}),e.jsx("div",{className:"relative hidden lg:block",children:e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:n,alt:i,className:"rounded-2xl shadow-2xl",loading:"eager"}),e.jsx("div",{className:"absolute -bottom-6 -right-6 bg-white rounded-2xl p-5 shadow-xl",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-green-400 to-emerald-500 rounded-full flex items-center justify-center",children:e.jsx("svg",{className:"w-7 h-7 text-white",f
1106ill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-slate-500",children:c}),e.jsx("div",{className:"text-2xl font-bold text-slate-900",children:d})]})]})})]})})]})})]})}function Pl({authorName:t,authorRole:s,authorImage:a,date:r,views:l,children:n}){return e.jsx("article",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-8 pb-8 border-b border-slate-200",children:[e.jsx("img",{src:a,alt:t,className:"w-14 h-14 rounded-full object-cover",loading:"lazy"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900",children:t}),e.jsx("div",{className:"text-sm text-slate-500",children:s})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-4 text-sm text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ds,{className:"w-4 h-4"}),r]}),e.jsxs("div",{className:"hidden sm:flex items-center gap-1",children:[e.jsx(Ct,{className:"w-4 h-4"}),l]})]})]}),e.jsx("div",{className:"prose prose-lg prose-slate max-w-none",children:n})]})})}function Al({items:t}){return e.jsx("section",{className:"py-4 bg-slate-900",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-2 text-sm",children:t.map((s,a)=>e.jsxs("div",{className:"flex items-center gap-2 text-slate-400",children:[e.jsx(ne,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{children:s})]},a))})})})}function yc({title:t,subtitle:s,packages:a,itemLabel:r,accentGradient:l,accentBg:n,accentText:i,onGetStarted:c}){return e.jsx("section",{id:"packages",className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:t}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:s})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map((d,x)=>e.jsxs("div",{className:`relative rounded-2xl p-6 transition-all hover:-translate-y-1 hover:shadow-xl ${d.popular?`bg-gradient-to-br ${l} text-white ring-4 ring-opacity-30`:"bg-white border-2 border-slate-200"}`,style:d.popular?{boxShadow:"0 8px 30px rgba(0,0,0,0.12)"}:void 0,children:[d.popular&&e.jsxs("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-yellow-400 text-yellow-900 text-xs font-bold px-4 py-1 rounded-full shadow-lg flex items-center gap-1",children:[e.jsx(Zt,{className:"w-3 h-3 fill-yellow-900"}),"MOST POPULAR"]}),e.jsx("div",{className:`text-xs font-semibold uppercase tracking-wider mb-2 ${d.popular?"text-white/70":i}`,children:d.tag}),e.jsx("div",{className:`text-5xl font-bold mb-1 ${d.popular?"text-white":"text-slate-900"}`,children:d.count}),e.jsx("div",{className:`text-sm mb-4 ${d.popular?"text-white/80":"text-slate-500"}`,children:r}),e.jsxs("div",{className:"flex items-baseline gap-2 mb-6",children:[e.jsx("span",{className:`text-3xl font-bold ${d.popular?"text-white":"text-slate-900"}`,children:d.price}),e.jsx("span",{className:`text-lg line-through ${d.popular?"text-white/50":"text-slate-400"}`,children:d.original})]}),e.jsxs("ul",{className:`space-y-2 mb-6 text-sm ${d.popular?"text-white/80":"text-slate-600"}`,children:[e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:`w-4 h-4 ${d.popular?"text-white/70":"text-green-500"}`}),"Premium Quality"]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:`w-4 h-4 ${d.popular?"text-white/70":"text-green-500"}`}),"Instant Delivery Start"]}),e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx(ne,{className:`w-4 h-4 ${d.popular?"text-white/70":"text-green-500"}`}),"30-Day Guarantee"]})]}),e.jsx("button",{onClick:c,className:`w-full py-3 rounded-xl font-semibold transition-all ${d.popular?"bg-white text-slate-900 hover:bg-slate-50":`bg-gradient-to-r ${l} text-white hover:opacity-90`}`,children:"Buy Now"})]},x))})]})})}function Ml({title:t,subtitle:s,steps:a,accentGradient:r}){return e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:t}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:s})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:a.map((l,n)=>e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm h-full",children:[e.jsx("div",{className:`w-14 h-14 bg-gradient-to-br ${r} rounded-xl flex items-center justify-center mb-4 text-white font-bold text-xl`,children:l.step}),e.jsx("h3",{className:"font-bold text-slate-900 text-lg mb-2",children:l.title}),e.jsx("p",{className:"text-slate-600",children:l.description})]}),n<a.length-1&&e.jsx(Yt,{className:"hidden lg:block absolute top-1/2 -right-4 w-8 h-8 text-slate-300 -translate-y-1/2"})]},n))})]})})}function El({title:t,subtitle:s,features:a,accentBg:r,accentText:l}){return e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:t}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:s})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map((n,i)=>e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-sm hover:shadow-lg transition-all",children:[e.jsx("div",{className:`w-14 h-14 ${r} rounded-xl flex items-center justify-center mb-4`,children:e.jsx(n.icon,{className:`w-7 h-7 ${l}`})}),e.jsx("h3",{className:"font-bold text-slate-900 text-lg mb-2",children:n.title}),e.jsx("p",{className:"text-slate-600",children:n.description})]},i))})]})})}function Dl({testimonials:t,accentText:s}){return e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"What Our Clients Say"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Trusted by thousands of users worldwide."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:t.map((a,r)=>
1106e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6",children:[e.jsx("div",{className:"flex items-center gap-1 mb-4",children:[...Array(a.rating)].map((l,n)=>e.jsx(Zt,{className:"w-4 h-4 fill-amber-400 text-amber-400"},n))}),e.jsxs("p",{className:"text-slate-600 text-sm mb-4 leading-relaxed",children:['"',a.content,'"']}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:a.avatar,alt:a.name,className:"w-10 h-10 rounded-full object-cover",loading:"lazy"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900 text-sm",children:a.name}),e.jsx("div",{className:"text-xs text-slate-500",children:a.role})]})]}),e.jsx("div",{className:`text-xs font-medium ${s}`,children:a.stat})]})]},r))})]})})}function Rl({title:t,subtitle:s,faqs:a}){return e.jsx("section",{className:"py-16 bg-slate-50",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:t}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:s})]}),e.jsx("div",{className:"space-y-4",children:a.map((r,l)=>e.jsx("div",{className:"bg-white rounded-xl border border-slate-200 overflow-hidden",children:e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"flex items-center justify-between px-6 py-5 cursor-pointer list-none",children:[e.jsx("span",{className:"font-semibold text-slate-900 pr-4",children:r.question}),e.jsx("span",{className:"text-slate-400 group-open:rotate-180 transition-transform flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:"px-6 pb-5",children:e.jsx("p",{className:"text-slate-600 leading-relaxed",children:r.answer})})]})},l))})]})})}function Fl({title:t,subtitle:s,ctaText:a,gradient:r,onGetStarted:l}){return e.jsx("section",{className:`py-16 bg-gradient-to-r ${r}`,children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-white mb-4",children:t}),e.jsx("p",{className:"text-lg text-white/90 mb-8 max-w-2xl mx-auto",children:s}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:e.jsxs("button",{onClick:l,className:"w-full sm:w-auto bg-white text-slate-900 px-8 py-4 rounded-xl font-bold hover:bg-slate-50 transition-all shadow-lg flex items-center justify-center gap-2",children:[a,e.jsx(Yt,{className:"w-5 h-5"})]})}),e.jsx("p",{className:"text-white/70 text-sm mt-6",children:"No password required. 100% safe and secure."})]})})}function Ol({title:t,subtitle:s,rows:a,accentGradient:r}){return e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:t}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:s})]}),e.jsx("div",{className:"overflow-x-auto rounded-2xl border border-slate-200",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:`bg-gradient-to-r ${r}`,children:[e.jsx("th",{className:"text-left text-white font-semibold px-6 py-4",children:"Feature"}),e.jsx("th",{className:"text-center text-white font-semibold px-6 py-4",children:"Follx"}),e.jsx("th",{className:"text-center text-white font-semibold px-6 py-4",children:"Others"})]})}),e.jsx("tbody",{children:a.map((l,n)=>e.jsxs("tr",{className:n%2===0?"bg-slate-50":"bg-white",children:[e.jsx("td",{className:"px-6 py-4 text-slate-700 font-medium",children:l.feature}),e.jsx("td",{className:"px-6 py-4 text-center",children:typeof l.us=="boolean"?l.us?e.jsx(ne,{className:"w-5 h-5 text-green-500 mx-auto"}):e.jsx("span",{className:"text-slate-400",children:"-"}):e.jsx("span",{className:"font-semibold text-green-600",children:l.us})}),e.jsx("td",{className:"px-6 py-4 text-center",children:typeof l.others=="boolean"?l.others?e.jsx(ne,{className:"w-5 h-5 text-green-500 mx-auto"}):e.jsx("span",{className:"text-slate-400",children:"-"}):e.jsx("span",{className:"text-slate-500",children:l.others})})]},n))})]})})]})})}function zl({counters:t}){return e.jsx("section",{className:"py-12 bg-slate-900",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"text-center mb-8",children:e.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Trusted by Thousands of Users Worldwide"})}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:t.map((s,a)=>e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-3xl sm:text-4xl font-bold text-white mb-1",children:s.value}),e.jsx("div",{className:"text-sm text-slate-400",children:s.label})]},a))})]})})}function $l({items:t}){return e.jsx("nav",{className:"bg-slate-50 border-b border-slate-100","aria-label":"Breadcrumb",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3",children:e.jsx("ol",{className:"flex items-center gap-2 text-sm text-slate-500",children:t.map((s,a)=>e.jsxs("li",{className:"flex items-center gap-2",children:[a>0&&e.jsx("span",{children:"/"}),s.href?e.jsx("a",{href:s.href,className:"hover:text-slate-900 transition-colors",children:s.label}):e.jsx("span",{className:"text-slate-900 font-medium",children:s.label})]},a))})})})}function L6({onGetStarted:t}){const s=[{value:"500K+",label:"Satisfied Customers"},{value:"120M+",label:"Likes Delivered"},{value:"4.9/5",label:"Customer Rating"},{value:"24/7",label:"Customer Support"}
1106],a=[{count:"100",price:"$0.99",original:"$1.99",tag:"Starter"},{count:"500",price:"$3.99",original:"$5.99",tag:"Growth"},{count:"1,000",price:"$6.99",original:"$9.99",tag:"Popular",popular:!0},{count:"2,500",price:"$14.99",original:"$19.99",tag:"Business"},{count:"5,000",price:"$24.99",original:"$34.99",tag:"Pro"},{count:"10,000",price:"$44.99",original:"$64.99",tag:"Enterprise"}],r=[{step:1,title:"Choose Package",description:"Select an Instagram likes package that fits your engagement goals.",icon:Os},{step:2,title:"Enter Post URL",description:"Paste the URL of the Instagram post you want to boost.",icon:ia},{step:3,title:"Secure Checkout",description:"Complete your purchase through our encrypted payment system.",icon:$t},{step:4,title:"See Results",description:"Watch likes appear on your post within minutes.",icon:Or}],l=[{icon:kl,title:"Real-Looking Likes",description:"High-quality likes from accounts with profile pictures and authentic activity."},{icon:rt,title:"Instant Delivery",description:"Likes begin appearing on your post within minutes of your order."},{icon:lt,title:"Account Safe",description:"No password or login credentials required. Your account stays secure."},{icon:Ve,title:"Refill Guarantee",description:"Free refills if likes drop within 30 days of your purchase."},{icon:wt,title:"Worldwide Likes",description:"Likes from diverse global accounts for natural engagement patterns."},{icon:Ta,title:"Priority Support",description:"Dedicated support team available around the clock."}],n=[{name:"Emily Rodriguez",role:"Fashion Blogger",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"Buying Instagram likes from Follx transformed my engagement rate. My posts now reach so many more people through the Explore page.",rating:5,stat:"15K avg likes"},{name:"James Cooper",role:"Restaurant Owner",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?w=100&h=100&fit=crop",content:"Our food posts get way more traction now. The increased likes make our restaurant look much more popular and attract new customers.",rating:5,stat:"8K avg likes"},{name:"Natasha Kim",role:"Travel Creator",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"The likes look completely natural. My brand partners noticed the improved engagement and I landed bigger collaborations.",rating:5,stat:"25K avg likes"},{name:"Marcus Taylor",role:"Photographer",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"As a photographer, having high-like counts on my portfolio posts helps me book more clients. Great investment.",rating:5,stat:"12K avg likes"}],i=[{question:"What happens when I buy Instagram likes?",answer:"When you purchase Instagram likes from Follx, our system begins delivering likes to your selected post within minutes. The likes come from accounts with profile pictures and activity, appearing indistinguishable from organic engagement. Your post gains visibility and is more likely to appear on the Explore page."},{question:"Are the Instagram likes from real accounts?",answer:"Yes, our likes come from high-quality accounts with profile pictures, bios, and posts. They are designed to look and function like genuine Instagram engagement, contributing to your social proof and algorithmic visibility."},{question:"Is buying Instagram likes safe?",answer:"Buying Instagram likes from Follx is completely safe. We use gradual delivery methods that mimic
1106natural engagement patterns. We never ask for your password or login credentials. Over 500,000 customers have used our service without any account issues."},{question:"How quickly will I receive the likes?",answer:"Delivery starts within 0-15 minutes of purchase. Most orders are completed within 1-12 hours depending on package size. Larger orders use gradual delivery to maintain a natural appearance."},{question:"Will buying likes help my post reach the Explore page?",answer:"Higher like counts signal to the Instagram algorithm that your content is valuable and engaging. This increases the probability of your post appearing on the Explore page, in hashtag feeds, and in your followers' feeds. While not guaranteed, many of our customers report significantly improved reach after purchasing likes."},{question:"Can I buy likes for Instagram Reels?",answer:"Yes, our likes work on all types of Instagram content including regular posts, Reels, and carousel posts. Simply paste the URL of the content you want to boost during checkout."},{question:"What if the likes drop?",answer:"We offer a comprehensive 30-day guarantee with free refills. If you experience any significant drops, contact our support team and we will replenish your likes at no additional cost."},{question:"Can I split likes across multiple posts?",answer:"Each order is for a single post. If you want to boost multiple posts, you can place separate orders for each one. We also offer bulk pricing for customers who regularly purchase likes for their content."}],c=[{feature:"Delivery Speed",us:"Instant",others:"1-3 Days"},{feature:"Refill Guarantee",us:!0,others:!1},{feature:"No Password Required",us:!0,others:!1},{feature:"24/7 Support",us:!0,others:!1},{feature:"Works on Reels",us:!0,others:!1},{feature:"Gradual Delivery",us:!0,others:!1},{feature:"Starting Price",us:"$0.99",others:"$2.99+"}],d=[{value:"250,000+",label:"Orders Processed"},{value:"45,000+",label:"Active Clients"},{value:"120+",label:"Countries Served"},{value:"99.3%",label:"Order Completion Rate"}],x={"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(y=>({"@type":"Question",name:y.question,acceptedAnswer:{"@type":"Answer",text:y.answer}}))},m={"@context":"https://schema.org","@type":"Product",name:"Instagram Likes",description:"Buy high-quality Instagram likes with instant delivery",brand:{"@type":"Brand",name:"Follx"},offers:{"@type":"AggregateOffer",lowPrice:"0.99",highPrice:"44.99",priceCurrency:"USD"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.9",reviewCount:"12453"}},h={"@context":"https://schema.org","@type":"Article",headline:"Buy Instagram Likes - The Complete Guide to Boosting Engagement",author:{"@type":"Person",name:"Sarah Mitchell"},datePublished:"2025-01-10",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},f={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"Buy Instagram Likes",item:"https://follx.com/buy-instagram-likes"}]};return e.jsxs(Il,{title:"Buy Instagram Likes - Real Likes, Instant Delivery | Follx",metaDescription:"Buy Instagram likes from $0.99. Real likes, instant delivery, no password required. Boost your engagement and reach the Explore page. 500K+ satisfied customers.",metaKeywords:"buy instagram likes, instagram likes, cheap instagram likes, real instagram likes, instant likes, boost instagram engagement, buy likes for instagram",canonicalUrl:"https://follx.com/buy-instagram-likes",schemas:[x,m,h,f],accentColor:"rose",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"Buy Instagram Likes"}]}),e.jsx(Tl,{badge:"#1 Instagram Likes Service 2025",h1:"Buy Instagram Likes",subtitle:"Boost your engagement with real, high-quality Instagram likes. Instant delivery, no password needed, and backed by our 30-day guarantee.",ctaText:"Buy Instagram Likes",trustIndicators:s,heroImage:"https://images.pexels.com/photos/3585088/pexels-photo-3585088.jpeg?w=500&h=600&fit=crop",heroImageAlt:"Buy Instagram likes to boost engagement",overlayStatLabel:"New Likes Today",overlayStatValue:"+24,580",gradient:"from-rose-500 via-pink-500 to-red-600",bgImage:"https://images.pexels.com/photos/3585089/pexels-photo-3585089.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["No Password Needed","Real Likes","Instant Delivery","30-Day Guarantee","Secure Payment"]}),e.jsx(zl,{counters:d}
1106),e.jsx(yc,{title:"Buy Instagram Likes Packages",subtitle:"Choose from our range of like packages. All include real engagement and instant delivery.",packages:a,itemLabel:"Instagram Likes",accentGradient:"from-rose-500 to-pink-600",accentBg:"bg-rose-100",accentText:"text-rose-500",onGetStarted:t}),e.jsx(Ml,{title:"How to Buy Instagram Likes",subtitle:"Get started in 4 simple steps. No complicated setup required.",steps:r,accentGradient:"from-rose-500 to-pink-600"}),e.jsxs(Pl,{authorName:"Sarah Mitchell",authorRole:"Social Media Engagement Specialist",authorImage:"https://images.pexels.com/photos/1065084/pexels-photo-1065084.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"189,234 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to Buying Instagram Likes in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Instagram's algorithm prioritizes content that receives rapid engagement. When a post gets a surge of likes shortly after being published, the algorithm interprets this as a signal that the content is valuable and worth showing to more people. This is why buying Instagram likes has become a strategic tool for creators, businesses, and influencers looking to maximize the reach of every post they publish."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["Whether you are launching a new product, promoting an event, or simply want your creative work to be seen by more people, understanding how Instagram likes drive visibility is essential. When you ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-rose-600 hover:text-rose-700 font-medium",children:"buy Instagram followers"})," to build your base audience, combining that with strategic like purchases creates a powerful growth engine."]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why Instagram Likes Matter More Than You Think"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Likes are the most visible form of engagement on Instagram. While comments and shares are also valuable, likes serve as the immediate social proof that visitors see when they encounter your content. A post with 5,000 likes communicates authority and quality far more effectively than a post with 50 likes, regardless of the actual content quality."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The Instagram algorithm uses a complex ranking system that considers multiple engagement signals. Like velocity (how quickly a post accumulates likes after publishing) is one of the strongest signals. Posts that receive rapid early engagement are pushed to more feeds, hashtag pages, and the Explore tab. By purchasing likes, you are essentially giving your content the initial boost it needs to trigger this algorithmic amplification."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"How Buying Instagram Likes Boosts Your Reach"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The relationship between likes and reach is well-documented. When your post receives a high number of likes quickly, Instagram's algorithm identifies it as high-quality content and expands its distribution. This means your post appears in more hashtag feeds, gets recommended on the Explore page, and shows up higher in your followers' feeds."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/6476808/pexels-photo-6476808.jpeg?w=800&h=450&fit=crop",alt:"Instagram engagement growth through likes",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Strategic like purchases amplify your content's reach across Instagram"})]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"This creates a virtuous cycle: more likes lead to more reach, which leads to more organic likes, which leads to even more reach. For businesses, this translates directly into more profile visits, website clicks, and ultimately sales. For creators and influencers, higher engagement rates make them more attractive to brands looking for partnership opportunities."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Best Practices for Buying Instagram Likes"}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Time Your Purchases Strategically"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The most effective time to boost like
1106s is shortly after posting. When the algorithm detects early engagement, it is more likely to promote your content. Place your like order right after publishing for maximum algorithmic impact."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Combine with Quality Content"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Buying likes works best when your content is genuinely worth engaging with. The purchased likes give your post the initial visibility boost, but compelling content is what converts visitors into organic followers and customers. Invest in great visuals, engaging captions, and strategic hashtags alongside your like purchases."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Maintain Consistent Engagement"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["Rather than buying a massive number of likes on one post and nothing on others, maintain consistent engagement across your content. This creates a more natural growth pattern and helps the algorithm classify your account as consistently high-performing. Consider using our ",e.jsx("a",{href:"/cheap-smm-panel",className:"text-rose-600 hover:text-rose-700 font-medium",children:"cheap SMM panel"})," for regular engagement management."]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Instagram Likes and Business Growth"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"For businesses, Instagram likes directly correlate with conversion metrics. Studies show that posts with higher engagement receive 3-5x more profile visits, and profiles with consistently high-engagement content see 2-4x more website clicks. When potential customers see that your business's content is widely liked, they perceive your brand as popular, trustworthy, and worth their attention."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["E-commerce businesses particularly benefit from like purchases on product posts. A product photo with 10,000 likes serves as powerful social proof that influences purchasing decisions. Combined with ",e.jsx("a",{href:"/buy-instagram-views",className:"text-rose-600 hover:text-rose-700 font-medium",children:"Instagram views"})," on your Reels content, you create a comprehensive engagement profile that attracts both organic users and potential customers."]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why Choose Follx for Instagram Likes"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Follx has been a trusted name in social media growth since 2019. Our Instagram likes service stands apart because we focus on quality and safety above all else. Every like comes from an account with a profile picture and activity history, ensuring your engagement looks completely natural. Our gradual delivery system mimics organic engagement patterns, and our 30-day guarantee means you never have to worry about drops."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["Whether you are a solo creator, a growing business, or an established brand, our flexible packages cater to every need and budget. And with our ",e.jsx("a",{href:"/smm-panel-api",className:"text-rose-600 hover:text-rose-700 font-medium",children:"SMM panel API"}),", agencies and resellers can automate like delivery at scale for their clients."]})]}),e.jsx(Ol,{title:"Follx vs Other Like Services",subtitle:"See why thousands choose Follx for their Instagram engagement needs.",rows:c,accentGradient:"from-rose-500 to-pink-600"}),e.jsx(El,{title:"Why Choose Follx for Instagram Likes?",subtitle:"Industry-leading quality, speed, and support for all your engagement needs.",features:l,accentBg:"bg-gradient-to-br from-rose-100 to-pink-100",accentText:"text-rose-600"}),e.jsx(Dl,{testimonials:n,accentText:"text-rose-500"}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Everything you need to know about buying Instagram likes.",faqs:i}),e.jsx(Fl,{title:"Ready to Boost Your Instagram Engagement?",subt
1106itle:"Join over 500,000 satisfied customers. Real likes, instant delivery, and our 30-day money-back guarantee.",ctaText:"Buy Instagram Likes Now",gradient:"from-rose-500 via-pink-500 to-red-500",onGetStarted:t})]})}function B6({onGetStarted:t}){const s=[{value:"500K+",label:"Satisfied Customers"},{value:"200M+",label:"Views Delivered"},{value:"4.9/5",label:"Customer Rating"},{value:"24/7",label:"Customer Support"}],a=[{count:"1,000",price:"$0.99",original:"$1.99",tag:"Starter"},{count:"5,000",price:"$2.99",original:"$4.99",tag:"Growth"},{count:"10,000",price:"$4.99",original:"$7.99",tag:"Popular",popular:!0},{count:"25,000",price:"$9.99",original:"$14.99",tag:"Business"},{count:"50,000",price:"$17.99",original:"$24.99",tag:"Pro"},{count:"100,000",price:"$29.99",original:"$44.99",tag:"Enterprise"}],r=[{step:1,title:"Choose Package",description:"Select a views package that matches your reach goals.",icon:Os},{step:2,title:"Paste Reel URL",description:"Provide the URL of the Instagram Reel or video you want to boost.",icon:zs},{step:3,title:"Secure Checkout",description:"Complete payment through our encrypted system.",icon:$t},{step:4,title:"Go Viral",description:"Watch your view count surge and reach the Explore page.",icon:Or}],l=[{icon:kl,title:"Real Views",description:"Genuine-looking views that count toward Instagram analytics and reach metrics."},{icon:rt,title:"Lightning Fast",description:"Views start appearing within minutes. Most orders complete in under 6 hours."},{icon:lt,title:"Safe & Secure",description:"No password required. Zero risk to your account or content."},{icon:Ve,title:"Retention Guarantee",description:"If views drop, we refill them free within 30 days."},{icon:Bv,title:"All Content Types",description:"Works on Reels, IGTV, Stories, and regular video posts."},{icon:Ta,title:"Dedicated Support",description:"Round-the-clock support for any questions or concerns."}],n=[{name:"Olivia Chen",role:"Reels Creator",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"My Reels were getting 200-300 views. After buying views from Follx, the algorithm picked them up and now I regularly hit 50K+ organically.",rating:5,stat:"500K total views"},{name:"Ryan Peters",role:"Content Creator",avatar:"https://images.pexels.com/photos/614810/pexels-photo-614810.jpeg?w=100&h=100&fit=crop",content:"The view boost helped my content get featured on the Explore page. My follower growth tripled in just one month.",rating:5,stat:"1M+ views"},{name:"Aisha Johnson",role:"Beauty Influencer",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"Brands care about view counts on Reels. Since using Follx, I have been landing much better sponsorship deals.",rating:5,stat:"250K avg views"},{name:"Daniel Lee",role:"Small Business",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"Our product videos needed visibility. The views from Follx helped us reach thousands of potential customers.",rating:5,stat:"100K views"}],i=[{question:"What happens when I buy Instagram views?",answer:"When you purchase Instagram views from Follx, our delivery system begins sending views to your selected video or Reel within minutes. The views accumulate gradually to mimic organic growth patterns. You will see your view count increase in real-time on the Instagram app."},{question:"Do bought views help with the Instagram algorithm?",answer:"Yes. Instagram's algorithm heavily factors in view count and view velocity when deciding which content to promote. Higher view counts signal popular content, leading to more Explore page placements and recommendations. This creates a snowball effect where bought views attract organic views."},{question:"Is it safe to buy Instagram views?",answer:"Completely safe. We never require your password or login credentials. Our delivery methods are designed to look natural, and over 500,000 customers have used our service without any account issues."},{question:"Do the views work on Instagram Reels?",answer:"Yes, our views work perfectly on Instagram Reels, which is currently Instagram's highest-reach content format. Boosting Reel views is one of the most effective ways to increase your overall account visibility and follower growth."},{question:"How fast is the delivery?",answer:"Delivery begins within 0-15 minutes of purchase. Most orders are completed within 1-12 hours depen
1106ding on package size. We use gradual delivery to maintain a natural appearance."},{question:"Can I buy views for multiple videos?",answer:"Each order applies to one video. You can place separate orders for different videos. For regular view purchases across multiple posts, consider our SMM panel reseller program for bulk pricing."},{question:"Will my views drop?",answer:"Our views have industry-leading retention rates. In the rare case of any drops, our 30-day guarantee ensures free refills to maintain your view count."},{question:"What payment methods do you accept?",answer:"We accept all major credit cards, PayPal, Apple Pay, Google Pay, and cryptocurrencies including Bitcoin, Ethereum, and USDT. All transactions are secured with SSL encryption."}],c=[{feature:"Delivery Speed",us:"Instant",others:"1-3 Days"},{feature:"Works on Reels",us:!0,others:!1},{feature:"Refill Guarantee",us:!0,others:!1},{feature:"No Password Required",us:!0,others:!0},{feature:"Analytics Counted",us:!0,others:!1},{feature:"Starting Price",us:"$0.99",others:"$2.99+"}],d=[{value:"250,000+",label:"Orders Processed"},{value:"45,000+",label:"Active Clients"},{value:"120+",label:"Countries Served"},{value:"99.3%",label:"Order Completion Rate"}],x={"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(y=>({"@type":"Question",name:y.question,acceptedAnswer:{"@type":"Answer",text:y.answer}}))},m={"@context":"https://schema.org","@type":"Product",name:"Instagram Views",description:"Buy high-quality Instagram views with instant delivery",brand:{"@type":"Brand",name:"Follx"},offers:{"@type":"AggregateOffer",lowPrice:"0.99",highPrice:"29.99",priceCurrency:"USD"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.9",reviewCount:"9876"}},h={"@context":"https://schema.org","@type":"Article",headline:"Buy Instagram Views - Boost Your Reels and Video Content",author:{"@type":"Person",name:"Alex Turner"},datePublished:"2025-01-15",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},f={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"Buy Instagram Views",item:"https://follx.com/buy-instagram-views"}]};return e.jsxs(Il,{title:"Buy Instagram Views - Instant Delivery, Real Views | Follx",metaDescription:"Buy Instagram views from $0.99. Boost your Reels and videos with real views. Instant delivery, no password required. Reach the Explore page faster.",metaKeywords:"buy instagram views, instagram views, buy reels views, instagram reel views, cheap instagram views, instant views, boost instagram reels",canonicalUrl:"https://follx.com/buy-instagram-views",schemas:[x,m,h,f],accentColor:"blue",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"Buy Instagram Views"}]}),e.jsx(Tl,{badge:"#1 Instagram Views Service 2025",h1:"Buy Instagram Views",subtitle:"Supercharge your Reels and videos with real views. Instant delivery, no password required, and a 30-day money-back guarantee.",ctaText:"Buy Instagram Views",trustIndicators:s,heroImage:"https://images.pexels.com/photos/5082579/pexels-photo-5082579.jpeg?w=500&h=600&fit=crop",heroImageAlt:"Buy Instagram views to boost your Reels",overlayStatLabel:"Views Today",overlayStatValue:"+142,580",gradient:"from-blue-500 via-sky-500 to-cyan-600",bgImage:"https://images.pexels.com/photos/3585089/pexels-photo-3585089.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["No Password Needed","Real Views","Instant Delivery","30-Day Guarantee","Works on Reels"]}),e.jsx(zl,{counters:d}),e.jsx(yc,{title:"Buy Instagram Views Packages",subtitle:"Affordable packages for every budget. All include real views and instant delivery.",packages:a,itemLabel:"Instagram Views",accentGradient:"from-blue-500 to-cyan-600",accentBg:"bg-blue-100",accentText:"text-blue-500",onGetStarted:t}),e.jsx(Ml,{title:"How to Buy Instagram Views",subtitle:"Get more views on your Instagram content in 4 simple steps.",steps:r,accentGradient:"from-blue-500 to-cyan-600"}),e.jsxs(Pl,{authorName:"Alex Turner",authorRole:"Video Marketing Specialist",authorImage:"https://images.pexels.com/photos/2182970/pexels-photo-2182970.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"156,432 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to Buying Instagram Views in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Instagram Reels have become the platform's most powerful content format, with Instagram actively pushing video content to compete with TikTok. For creators and businesses, this means that view counts on Reels and videos are now one of the most important metrics for growth. Buying Instagram views has emerged as a proven strategy to kickstart the algorithmic amplification that turns good content into viral content."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why Video Views Drive Instagram Growth"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Instagram's algorithm gives significant weight to video performance. When a Reel or video receives a high
1106number of views quickly, the platform interprets this as a signal that the content is engaging and worth distributing to a wider audience. This is particularly true for Reels, which have their own dedicated feed and Explore presence."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The view count on a video serves as immediate social proof. When users see a Reel with 100,000 views versus one with 500 views, they are far more likely to watch, engage with, and share the higher-viewed content. This creates a compounding growth effect where initial views attract organic views, which attract more organic views."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/5082581/pexels-photo-5082581.jpeg?w=800&h=450&fit=crop",alt:"Instagram Reels views growth strategy",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Boosting Reel views triggers algorithmic amplification on Instagram"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Instagram Views and the Explore Page"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"One of the biggest benefits of buying Instagram views is the increased chance of landing on the Explore page. Instagram's Explore algorithm heavily weights engagement velocity, and view count is a primary metric for video content. When your Reel hits a high view count quickly, it signals to Instagram that your content should be shown to users who do not follow you yet."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["This is where the real growth happens. A single Explore page placement can drive thousands of new followers, profile visits, and engagement on your other content. Combined with a strategy to ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-blue-600 hover:text-blue-700 font-medium",children:"buy Instagram followers"})," and ",e.jsx("a",{href:"/buy-instagram-likes",className:"text-blue-600 hover:text-blue-700 font-medium",children:"buy Instagram likes"}),", view purchases create a comprehensive growth system."]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Maximizing ROI from Purchased Views"}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Focus on Reels Content"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Instagram Reels currently have the highest organic reach of any content format on the platform. When you buy views for Reels specifically, you are investing in the content format that has the best chance of being promoted to new audiences. This makes Reel view purchases one of the highest-ROI investments in social media marketing."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Create Share-Worthy Content"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Purchased views provide the initial visibility boost, but truly viral content needs to be worth sharing. Focus on creating Reels that educate, entertain, or inspire. Use trending audio, hooks in the first second, and clear calls to action. When your high-view-count content also delivers value, the organic amplification multiplies significantly."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Use Views Strategically for Business Content"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["For businesses, buying views on product demonstration videos, customer testimonial Reels, and behind-the-scenes content can dramatically increase brand awareness. High view counts on business content serve as social proof that builds consumer confidence. Consider integrating view purchases into your regular content strategy through our ",e.jsx("a",{href:"/smm-panel-reseller",className:"text-blue-600 hover:text-blue-700 font-medium",children:"SMM panel reseller"})," program for volume pricing."]})]}),e.jsx(Ol,{title:"Follx vs Other View Services",subtitle:"See why Follx is the preferred choice for Instagram views.",rows:c,accentGradient:"from-blue-500 to-cyan-600"}),e.jsx(El,{title:"Why Choose Follx for Instagram Views?",subtitle:"Trusted by 500,
1106000+ customers for fast, reliable view delivery.",features:l,accentBg:"bg-gradient-to-br from-blue-100 to-cyan-100",accentText:"text-blue-600"}),e.jsx(Dl,{testimonials:n,accentText:"text-blue-500"}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Everything you need to know about buying Instagram views.",faqs:i}),e.jsx(Fl,{title:"Ready to Boost Your Instagram Views?",subtitle:"Join over 500,000 satisfied customers. Real views, instant delivery, and our 30-day guarantee.",ctaText:"Buy Instagram Views Now",gradient:"from-blue-500 via-sky-500 to-cyan-500",onGetStarted:t})]})}function U6({onGetStarted:t}){const s=[{value:"300K+",label:"Satisfied Customers"},{value:"50M+",label:"Followers Delivered"},{value:"4.8/5",label:"Customer Rating"},{value:"24/7",label:"Customer Support"}],a=[{count:"100",price:"$1.99",original:"$3.99",tag:"Starter"},{count:"500",price:"$6.99",original:"$9.99",tag:"Growth"},{count:"1,000",price:"$11.99",original:"$16.99",tag:"Popular",popular:!0},{count:"2,500",price:"$24.99",original:"$34.99",tag:"Business"},{count:"5,000",price:"$44.99",original:"$64.99",tag:"Pro"},{count:"10,000",price:"$79.99",original:"$119.99",tag:"Enterprise"}],r=[{step:1,title:"Choose Package",description:"Select a TikTok followers package for your growth goals.",icon:Os},{step:2,title:"Enter Username",description:"Provide your TikTok username. No password needed.",icon:mt},{step:3,title:"Secure Payment",description:"Complete checkout through our encrypted payment gateway.",icon:$t},{step:4,title:"Watch Growth",description:"See your TikTok follower count rise within hours.",icon:Or}],l=[{icon:kl,title:"Premium Followers",description:"High-quality TikTok followers with profile pictures and authentic-looking activity."},{icon:rt,title:"Fast Delivery",description:"Followers start appearing within minutes of your purchase."},{icon:lt,title:"100% Safe",description:"No password required. Your TikTok account stays completely secure."},{icon:Ve,title:"30-Day Guarantee",description:"Free refills if you experience any follower drops."},{icon:wt,title:"Global Audience",description:"Followers from diverse worldwide locations for natural growth."},{icon:Ta,title:"VIP Support",description:"Dedicated support team available 24/7 for any questions."}],n=[{name:"Zara Williams",role:"TikTok Creator",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"Getting my first 10K followers through Follx helped me unlock TikTok Live. Now I earn from gifts and have landed brand deals.",rating:5,stat:"50K followers"},{name:"Tyler Brooks",role:"Comedy Creator",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?w=100&h=100&fit=crop",content:"The followers look completely real. My FYP reach increased dramatically after the initial boost.",rating:5,stat:"100K followers"},{name:"Priya Sharma",role:"Dance Creator",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"I was stuck at 2K followers for months. After using Follx, the algorithm started pushing my content to more people.",rating:5,stat:"75K followers"},{name:"Kevin Park",role:"Business Owner",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"TikTok is our main marketing channel. The follower boost helped establish credibility quickly.",rating:5,stat:"25K followers"}],i=[{question:"How does buying TikTok followers work?",answer:"When you purchase TikTok followers from Follx, our system delivers followers to your account gradually over several hours. Simply provide your public TikTok username and select your package. No password or login access is ever required."},{question:"Are the TikTok followers real?",answer:"Our followers are high-quality accounts with profile pictures, bios, and content. They are designed to appear authentic and contribute to your social proof. While they may not actively engage with every video, they significantly boost your credibility and help attract organic followers."},{question:"Will buying followers help me get on the FYP?",answer:"A higher follower count signals to TikTok that your account is established and worth promoting. While followers alone do not guarantee FYP placement, the increased credibility and algorithmic signals help your content reach a wider audience."},{question:"Is it safe to buy TikTok followers?",answer:"Yes, buying TikTok followers from Follx is completely safe. We use secure, gradual delivery methods and never access your account. Over 300,000 customers have used our TikTok services without any issues."},{question:"How quickly will I get the followers?",answer:"Delivery starts within 0-30 minutes of purchase. Most orders complete within 1-24 hours depen
1106ding on package size. We use gradual delivery to maintain natural growth patterns."},{question:"Can I buy TikTok followers for a business account?",answer:"Yes, our service works with all TikTok account types including personal, creator, and business accounts. Simply provide the username and we handle the rest."},{question:"Do you offer TikTok likes and views too?",answer:"Yes, we offer a full range of TikTok services including likes, views, shares, and comments. Visit our homepage to explore all available TikTok growth services."},{question:"What if my followers drop?",answer:"We provide a comprehensive 30-day guarantee with free refills. If you notice any significant drops, contact our support team and we will replenish your followers at no additional cost."}],c=[{feature:"Delivery Speed",us:"Instant",others:"1-3 Days"},{feature:"Refill Guarantee",us:!0,others:!1},{feature:"No Password Required",us:!0,others:!0},{feature:"24/7 Support",us:!0,others:!1},{feature:"Gradual Delivery",us:!0,others:!1},{feature:"Multiple Payment Methods",us:!0,others:!1},{feature:"Starting Price",us:"$1.99",others:"$3.99+"}],d=[{value:"250,000+",label:"Orders Processed"},{value:"45,000+",label:"Active Clients"},{value:"120+",label:"Countries Served"},{value:"99.3%",label:"Order Completion Rate"}],x={"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(y=>({"@type":"Question",name:y.question,acceptedAnswer:{"@type":"Answer",text:y.answer}}))},m={"@context":"https://schema.org","@type":"Product",name:"TikTok Followers",description:"Buy high-quality TikTok followers with instant delivery",brand:{"@type":"Brand",name:"Follx"},offers:{"@type":"AggregateOffer",lowPrice:"1.99",highPrice:"79.99",priceCurrency:"USD"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"8743"}},h={"@context":"https://schema.org","@type":"Article",headline:"Buy TikTok Followers - The Complete Guide to TikTok Growth",author:{"@type":"Person",name:"Marcus Rivera"},datePublished:"2025-01-12",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},f={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"Buy TikTok Followers",item:"https://follx.com/buy-tiktok-followers"}]};return e.jsxs(Il,{title:"Buy TikTok Followers - Real Followers, Fast Delivery | Follx",metaDescription:"Buy TikTok followers from $1.99. Real followers, instant delivery, no password required. Grow your TikTok presence and reach the FYP. 300K+ satisfied customers.",metaKeywords:"buy tiktok followers, tiktok followers, cheap tiktok followers, real tiktok followers, grow tiktok, tiktok growth service, buy tiktok fans",canonicalUrl:"https://follx.com/buy-tiktok-followers",schemas:[x,m,h,f],accentColor:"teal",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"Buy TikTok Followers"}]}),e.jsx(Tl,{badge:"#1 TikTok Growth Service 2025",h1:"Buy TikTok Followers",subtitle:"Accelerate your TikTok growth with real, high-quality followers. Instant delivery, no password needed, and backed by our 30-day guarantee.",ctaText:"Buy TikTok Followers",trustIndicators:s,heroImage:"https://images.pexels.com/photos/5081930/pexels-photo-5081930.jpeg?w=500&h=600&fit=crop",heroImageAlt:"Buy TikTok followers to grow your account",overlayStatLabel:"New Followers",overlayStatValue:"+8,240",gradient:"from-teal-500 via-emerald-500 to-green-600",bgImage:"https://images.pexels.com/photos/5082581/pexels-photo-5082581.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["No Password Needed","Real Followers","Fast Delivery","30-Day Guarantee","Secure Payment"]}),e.jsx(zl,{counters:d}),e.jsx(yc,{title:"Buy TikTok Followers Packages",subtitle:"Affordable packages for creators and businesses. All include real followers.",packages:a,itemLabel:"TikTok Followers",accentGradient:"from-teal-500 to-emerald-600",accentBg:"bg-teal-100",accentText:"text-teal-500",onGetStarted:t}),e.jsx(Ml,{title:"How to Buy TikTok Followers",subtitle:"Get started in 4 simple steps. No complicated setup.",steps:r,accentGradient:"from-teal-500 to-emerald-600"}),e.jsxs(Pl,{authorName:"Marcus Rivera",authorRole:"TikTok Growth Strategist",authorImage:"https://images.pexels.com/photos/614810/pexels-photo-614810.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"134,567 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to Buying TikTok Followers in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"TikTok has cemented itself as the world's fastest-growing social media platform with over 1.5 billion monthly active users. For creators, businesses, and brands, building a substantial TikTok following is now essential for digital marketing success. However, the platform's highly competitive For You Page (FYP) algorithm makes organic growth challenging without an initial audience base."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Buying TikTok followers has become a strategic accelerator used by creators at every level. From aspiring influencers looking to unlock features like TikTok Live (which requires 1,000 followers), to businesses wanting to establish credibility on the platform, purchased followers provide the social proof needed to attract organic growth."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why TikTok Follower Count Matters"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"On TikTok, follower count serves as a primary trust signal. When users discover your profile from the FYP, their decision to follow you is heavily influenced by your existing follower count. A profile with 50,000 followers appears authoritative and worth following, while a profile with 200 followers may be scrolled past regardless of content quality."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"TikTok also unlocks platform features based on follower milestones. At 1,000 followers, you gain access to TikTok Live streaming. At 10,000 followers, you unlock additional analytics. Higher follower counts also improve your chances of being accepted into the TikTok Creator Fund and brand partnership programs."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/5082579/pexels-photo-5082579.jpeg?w=800&h=450&fit=crop",alt:"TikTok growth strategy with followers",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Strategic follower growth accelerates your TikTok success"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"TikTok Algorithm and Social Proof"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"While TikTok's FYP algorithm is primarily content-based, account authority still plays a role. Accounts with larger followings tend to receive more initial distribution for new content, as TikTok's system recognizes them as established creators. This creates a compounding growth effect where each video reaches more people."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["The social proof effect is particularly strong on TikTok. When a video appears on the FYP from an account with 100K followers, users are more likely to wat
1106ch it through completion, like it, and follow the account. This engagement loop is what drives viral growth, and buying followers helps you enter this loop faster. For a comprehensive social media growth strategy, consider combining TikTok follower purchases with services like ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-teal-600 hover:text-teal-700 font-medium",children:"buying Instagram followers"})," to build cross-platform authority."]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Best Practices for TikTok Growth"}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Content First, Followers Follow"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The most successful TikTok creators combine purchased followers with consistent, high-quality content. Use trending sounds, participate in challenges, and post regularly. The purchased followers give you the credibility baseline, while great content drives organic growth. Think of it as priming the pump for your growth engine."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Leverage TikTok for Business"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["Businesses can use TikTok followers strategically to establish authority in their niche. Product demonstrations, behind-the-scenes content, and customer stories perform well on TikTok. With a solid follower base, this content reaches more potential customers. For agencies managing multiple TikTok accounts, our ",e.jsx("a",{href:"/smm-panel-api",className:"text-teal-600 hover:text-teal-700 font-medium",children:"SMM panel API"})," enables automated, scalable growth management."]}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Cross-Platform Strategy"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["The most effective creators maintain a presence across multiple platforms. Grow your TikTok alongside your Instagram, YouTube, and Twitter presence. Each platform feeds into the others, creating a network effect. Our ",e.jsx("a",{href:"/best-smm-panel",className:"text-teal-600 hover:text-teal-700 font-medium",children:"best SMM panel"})," offers services for all major platforms, making cross-platform growth management seamless and affordable."]})]}),e.jsx(Ol,{title:"Follx vs Other TikTok Services",subtitle:"See why creators choose Follx for TikTok growth.",rows:c,accentGradient:"from-teal-500 to-emerald-600"}),e.jsx(El,{title:"Why Choose Follx for TikTok Followers?",subtitle:"Trusted by 300,000+ TikTok creators and businesses worldwide.",features:l,accentBg:"bg-gradient-to-br from-teal-100 to-emerald-100",accentText:"text-teal-600"}),e.jsx(Dl,{testimonials:n,accentText:"text-teal-500"}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Everything you need to know about buying TikTok followers.",faqs:i}),e.jsx(Fl,{title:"Ready to Grow Your TikTok Following?",subtitle:"Join 300,000+ satisfied creators. Real followers, fast delivery, and our 30-day guarantee.",ctaText:"Buy TikTok Followers Now",gradient:"from-teal-500 via-emerald-500 to-green-500",onGetStarted:t})]})}function q6({onGetStarted:t}){const s=[{value:"200K+",label:"Channels Served"},{value:"30M+",label:"Subscribers Delivered"},{value:"4.8/5",label:"Customer Rating"},{value:"24/7",label:"Customer Support"}],a=[{count:"100",price:"$3.99",original:"$5.99",tag:"Starter"},{count:"500",price:"$14.99",original:"$19.99",tag:"Growth"},{count:"1,000",price:"$24.99",original:"$34.99",tag:"Popular",popular:!0},{count:"2,500",price:"$54.99",original:"$74.99",tag:"Business"},{count:"5,000",price:"$94.99",original:"$129.99",tag:"Pro"},{count:"10,000",price:"$169.99",original:"$229.99",tag:"Enterprise"}],r=[{step:1,title:"Choose Package",description:"Select a YouTube subscriber package for your channel goals.",icon:Os},{step:2,title:"Enter Channel URL",description:"Provide your YouTube channel link. No login needed.",icon:Qi},{step:3,title:"Secure Checkout",description:"Complete payment through our encrypted system.",icon:$t},{step:4,title:"Grow Your Channel",description:"Watch your subscriber count grow within hours.",icon:Or}],l=[{icon:kl,title:"Premium Subscribers",description:"High-quality YouTube subscribers with active-looking accounts and profile pictures."},{icon:rt,title:"Fast Delivery",description:"Subscribers start appearing within hours of your purchase."},{icon:lt,title:"Channel Safe",description:"No password or login access required. Your channel stays secure."},{icon:Ve,title:"30-Day Guarantee",description:"Free refills if you experience any subscriber drops."},{icon:wt,title:"Global Subscribers",description:"Subscribers from diverse countries for a natural audience profile."},{icon:Ta,title:"Dedicated Support",description:"Expert support team available around the clock."}],n=[{name:"Chris Martinez",role:"Tech YouTuber",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?w=100&h=100&fit=crop",content:"Hitting 1,000 subscribers was my biggest hurdle for monetization. Follx helped me reach the threshold and now I earn from AdSense.",rating:5,stat:"15K subscribers"},{name:"Lisa Chen",role:"Cooking Channel",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"The subscriber boost gave my cooking channel the credibility it needed. Organic growth has been much easier since.",rating:5,stat:"50K
1106subscribers"},{name:"Andre Johnson",role:"Fitness Channel",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"Brands only work with channels that have at least 10K subs. Follx helped me get there and now I have regular sponsorships.",rating:5,stat:"25K subscribers"},{name:"Emma Wilson",role:"Education Channel",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"My educational content was great but nobody saw it. The subscriber boost changed everything for my channel.",rating:5,stat:"100K subscribers"}],i=[{question:"How does buying YouTube subscribers work?",answer:"When you purchase YouTube subscribers from Follx, our system gradually delivers subscribers to your channel. Simply provide your YouTube channel URL and choose a package. We never require login credentials or access to your Google account."},{question:"Will bought subscribers help me reach 1,000 for monetization?",answer:"Yes, purchasing subscribers can help you reach the 1,000 subscriber threshold required for the YouTube Partner Program. However, you will also need 4,000 watch hours in the past 12 months or 10 million Shorts views in the last 90 days to qualify for monetization."},{question:"Are the subscribers real accounts?",answer:"Our subscribers come from accounts with profile pictures and activity. While they may not actively watch every video, they count toward your subscriber total and help establish social proof for your channel."},{question:"Is it safe to buy YouTube subscribers?",answer:"Yes, buying YouTube subscribers from Follx is safe. We use gradual delivery methods and never access your channel directly. Over 200,000 channels have used our service without any strikes or penalties."},{question:"How fast is delivery?",answer:"Delivery begins within 1-6 hours of purchase. YouTube subscriber delivery is typically more gradual than other platforms to maintain natural growth patterns. Most orders complete within 1-5 days."},{question:"Will the subscribers drop?",answer:"Our subscribers have strong retention rates. We provide a 30-day guarantee with free refills. If you experience any significant drops, our support team will replenish them at no cost."},{question:"Can I choose which country the subscribers are from?",answer:"Our standard packages include subscribers from a diverse range of countries. For targeted geographic subscribers, please contact our support team for custom packages."},{question:"Do you offer YouTube views and likes too?",answer:"Yes, we offer a complete range of YouTube services including views, likes, comments, and watch time. Visit our homepage to see all available YouTube growth services."}],c=[{feature:"Delivery Speed",us:"Same Day",others:"3-7 Days"},{feature:"Refill Guarantee",us:!0,others:!1},{feature:"No Login Required",us:!0,others:!0},{feature:"24/7 Support",us:!0,others:!1},{feature:"Gradual Delivery",us:!0,others:!1},{feature:"Starting Price",us:"$3.99",others:"$7.99+"}],d=[{value:"250,000+",label:"Orders Processed"},{value:"45,000+",label:"Active Clients"},{value:"120+",label:"Countries Served"},{value:"99.3%",label:"Order Completion Rate"}],x={"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(y=>({"@type":"Question",name:y.question,acceptedAnswer:{"@type":"Answer",text:y.answer}}))},m={"@context":"https://schema.org","@type":"Product",name:"YouTube Subscribers",description:"Buy high-quality YouTube subscribers with fast delivery",brand:{"@type":"Brand",name:"Follx"},offers:{"@type":"AggregateOffer",lowPrice:"3.99",highPrice:"169.99",priceCurrency:"USD"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"6234"}},h={"@context":"https://schema.org","@type":"Article",headline:"Buy YouTube Subscribers - Grow Your Channel Faster",author:{"@type":"Person",name:"David Chen"},datePublished:"2025-01-14",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},f={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"Buy YouTube Subscribers",item:"https://follx.com/buy-youtube-subscribers"}]};return e.jsxs(Il,{title:"Buy YouTube Subscribers - Real Subs, Fast Delivery | Follx",metaDescription:"Buy YouTube subscribers from $3.99. Real subscribers, fast delivery, no login required. Grow your channel and reach monetization faster. 200K+ channels served.",metaKeywords:"buy
1106youtube subscribers, youtube subscribers, cheap youtube subscribers, real youtube subscribers, grow youtube channel, youtube growth service",canonicalUrl:"https://follx.com/buy-youtube-subscribers",schemas:[x,m,h,f],accentColor:"red",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"Buy YouTube Subscribers"}]}),e.jsx(Tl,{badge:"#1 YouTube Growth Service 2025",h1:"Buy YouTube Subscribers",subtitle:"Grow your YouTube channel with real subscribers. Fast delivery, no login required, and backed by our 30-day guarantee.",ctaText:"Buy YouTube Subscribers",trustIndicators:s,heroImage:"https://images.pexels.com/photos/1092644/pexels-photo-1092644.jpeg?w=500&h=600&fit=crop",heroImageAlt:"Buy YouTube subscribers to grow your channel",overlayStatLabel:"New Subscribers",overlayStatValue:"+5,820",gradient:"from-red-500 via-red-600 to-rose-700",bgImage:"https://images.pexels.com/photos/1092644/pexels-photo-1092644.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["No Login Required","Real Subscribers","Fast Delivery","30-Day Guarantee","Secure Payment"]}),e.jsx(zl,{counters:d}),e.jsx(yc,{title:"Buy YouTube Subscribers Packages",subtitle:"Affordable packages for every channel. All include real subscribers.",packages:a,itemLabel:"YouTube Subscribers",accentGradient:"from-red-500 to-rose-600",accentBg:"bg-red-100",accentText:"text-red-500",onGetStarted:t}),e.jsx(Ml,{title:"How to Buy YouTube Subscribers",subtitle:"Get started in 4 simple steps.",steps:r,accentGradient:"from-red-500 to-rose-600"}),e.jsxs(Pl,{authorName:"David Chen",authorRole:"YouTube Growth Expert",authorImage:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"112,345 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to Buying YouTube Subscribers in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"YouTube remains the world's second-largest search engine and the dominant platform for long-form video content. With over 2.5 billion monthly active users, the opportunity for creators and businesses is enormous. However, building a YouTube subscriber base from zero is one of the most challenging aspects of content creation. The platform's monetization requirements (1,000 subscribers and 4,000 watch hours) create a significant barrier that can take months or years to overcome organically."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Buying YouTube subscribers has become a strategic tool for channels looking to overcome this initial growth hurdle. By establishing a credible subscriber base, creators can focus on what matters most: creating great content. The social proof of a healthy subscriber count attracts organic subscribers, sponsors, and opportunities that would otherwise be inaccessible to smaller channels."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why Subscriber Count Matters on YouTube"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"On YouTube, subscriber count is perhaps the most important single metric for channel perception. It appears prominently on your channel page, next to your channel name on every video, and influences whether viewers click on your content in search results and suggested videos. A channel with 10,000 subscribers appears 10x more credible than one with 1,000, even if the content quality is identical."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/1092644/pexels-photo-1092644.jpeg?w=800&h=450&fit=crop",alt:"YouTube channel growth with subscribers",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Building subscriber count is essential for YouTube channel credibility"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Reaching Monetization Milestones"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The YouTube Partner Program requires 1,000 subscribers as a baseline for monetization. For many creators, this is the most frustrating milestone because it requires building an audie
1106nce before seeing any revenue. Buying subscribers can help you reach this threshold faster, allowing you to start earning from your content while continuing to grow organically."}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Beyond monetization, subscriber milestones unlock additional features. At 1,000 subscribers, you can add custom thumbnails to your channel. Higher subscriber counts improve your standing in YouTube search results and make your channel more attractive to brand sponsors."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Combining Subscriber Growth with Content Strategy"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The most successful approach combines purchased subscribers with a strong content strategy. Focus on your niche, maintain a consistent upload schedule, and optimize your videos for search. The purchased subscribers provide the credibility foundation, while your content drives genuine engagement and organic growth."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["For multi-platform creators, building your YouTube alongside platforms like ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-red-600 hover:text-red-700 font-medium",children:"Instagram"})," and ",e.jsx("a",{href:"/buy-tiktok-followers",className:"text-red-600 hover:text-red-700 font-medium",children:"TikTok"})," creates a powerful cross-platform presence. Many successful creators use short-form content on TikTok and Instagram to drive traffic to their YouTube channels. Our ",e.jsx("a",{href:"/smm-panel-reseller",className:"text-red-600 hover:text-red-700 font-medium",children:"SMM panel reseller"})," program makes managing growth across all platforms affordable and efficient."]})]}),e.jsx(Ol,{title:"Follx vs Other YouTube Services",subtitle:"See why YouTube creators choose Follx.",rows:c,accentGradient:"from-red-500 to-rose-600"}),e.jsx(El,{title:"Why Choose Follx for YouTube Subscribers?",subtitle:"Trusted by 200,000+ YouTube channels worldwide.",features:l,accentBg:"bg-gradient-to-br from-red-100 to-rose-100",accentText:"text-red-600"}),e.jsx(Dl,{testimonials:n,accentText:"text-red-500"}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Everything you need to know about buying YouTube subscribers.",faqs:i}),e.jsx(Fl,{title:"Ready to Grow Your YouTube Channel?",subtitle:"Join 200,000+ channels. Real subscribers, fast delivery, and our 30-day guarantee.",ctaText:"Buy YouTube Subscribers Now",gradient:"from-red-500 via-rose-500 to-red-600",onGetStarted:t})]})}function G6({onGetStarted:t}){const s=[{value:"250K+",label:"Satisfied Customers"},{value:"40M+",label:"Followers Delivered"},{value:"4.8/5",label:"Customer Rating"},{value:"24/7",label:"Customer Support"}],a=[{count:"100",price:"$1.99",original:"$3.99",tag:"Starter"},{count:"500",price:"$6.99",original:"$9.99",tag:"Growth"},{count:"1,000",price:"$11.99",original:"$16.99",tag:"Popular",popular:!0},{count:"2,500",price:"$24.99",original:"$34.99",tag:"Business"},{count:"5,000",price:"$44.99",original:"$64.99",tag:"Pro"},{count:"10,000",price:"$79.99",original:"$119.99",tag:"Enterprise"}],r=[{step:1,title:"Choose Package",description:"Select a Twitter/X followers package that fits your goals.",icon:Os},{step:2,title:"Enter Profile URL",description:"Provide your Twitter/X profile link. No login needed.",icon:mt},{step:3,title:"Secure Checkout",description:"Complete payment through our encrypted system.",icon:$t},{step:4,title:"Grow Your Presence",description:"Watch your follower count increase within hours.",icon:Or}],l=[{icon:kl,title:"Quality Followers",description:"Followers with profile pictures, bios, and tweet history."},{icon:rt,title:"Fast Start",description:"Followers begin appearing within minutes of your order."},{icon:lt,title:"Account Safe",description:"No password required. Your account security is never compromised."},{icon:Ve,title:"30-Day Guarantee",description:"Free refills if you experience any follower drops."},{icon:wt,title:"Worldwide Followers",description:"Diverse global followers for natural audience composition."},{icon:Ta,title:"Expert Support",description:"Dedicated support team available 24 hours a day."}],n=[{name:"Rachel Green",role:"Tech Journalist",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"Having a strong Twitter following is essential for credibility in tech journalism. Follx helped me build that foundation quickly.",rating:5,stat:"35K followers"},{name:"Jason Wright",role:"Startup Founder",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?w=100&h=100&fit=crop",content:"Investors check Twitter presence. The follower boost from Follx gave our startup the social proof we needed during fundraising.",rating:5,stat:"20K followers"},{name:"Maria Santos",role:"Political Analyst",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"My political commentary gets taken more seriously now. The larger following meant more retweets and media appearances.",rating:5,stat:"50K followers"},{name:"Tom Bradley",role:"Author",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"As an author, Twitter is my main platform for connecting with readers. The follower boost helped my book launch go viral.",rating:5,stat:"15K followers"}],i=[{question:"How does buying Twitter/X followers work?",answer:"When you purchase Twitter followers from Follx, our system delivers followers to your profile gradually. Simply provide your public Twitter/X profile URL and select a package. No password or login access is ever required."},{question:"Are the Twitter followers real accounts?",answer:"Our followers are high-quality accounts with profile pictures, bios, and tweet activity. They are designed to appear as genuine Twitter users and contribute to your social proof."},{question:"Is it safe to buy Twitter followers?",answer:"Yes, buying Twitter followers from Follx is completely safe. We use gradual delivery methods and never access your account directly. Our service has been used by over 250,000 customers without any account suspensions."},{question:"Does this work with the new X platform?",answer:"Yes, our service works seamlessly with both Twitter and X (the rebranded platform). The follower delivery system is fully compatible with the latest platform updates."},{question:"How quickly will I get the followers?",answer:"Delivery starts within 0-30 minutes of purchase. Most orders complete within 1-24 hours depen
1106ding on package size. We use gradual delivery for natural-looking growth."},{question:"Will having more followers help my tweets get more engagement?",answer:"Accounts with larger followings tend to receive more impressions and engagement on their tweets. The social proof of a high follower count makes other users more likely to read, like, retweet, and reply to your content."},{question:"Can I buy followers for a brand or business account?",answer:"Yes, our service works with all types of Twitter/X accounts including personal, business, and organization accounts. Simply provide the profile URL during checkout."},{question:"What payment methods are accepted?",answer:"We accept all major credit cards, PayPal, Apple Pay, Google Pay, and various cryptocurrencies. All transactions are processed securely with SSL encryption."}],c=[{feature:"Delivery Speed",us:"Instant",others:"1-3 Days"},{feature:"Refill Guarantee",us:!0,others:!1},{feature:"No Password Required",us:!0,others:!0},{feature:"X/Twitter Compatible",us:!0,others:!0},{feature:"24/7 Support",us:!0,others:!1},{feature:"Starting Price",us:"$1.99",others:"$4.99+"}],d=[{value:"250,000+",label:"Orders Processed"},{value:"45,000+",label:"Active Clients"},{value:"120+",label:"Countries Served"},{value:"99.3%",label:"Order Completion Rate"}],x={"@context":"https://schema.org","@type":"FAQPage",mainEntity:i.map(y=>({"@type":"Question",name:y.question,acceptedAnswer:{"@type":"Answer",text:y.answer}}))},m={"@context":"https://schema.org","@type":"Product",name:"Twitter/X Followers",description:"Buy high-quality Twitter followers with instant delivery",brand:{"@type":"Brand",name:"Follx"},offers:{"@type":"AggregateOffer",lowPrice:"1.99",highPrice:"79.99",priceCurrency:"USD"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"5678"}},h={"@context":"https://schema.org","@type":"Article",headline:"Buy Twitter Followers - Grow Your X Presence",author:{"@type":"Person",name:"James Harrison"},datePublished:"2025-01-16",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},f={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"Buy Twitter Followers",item:"https://follx.com/buy-twitter-followers"}]};return e.jsxs(Il,{title:"Buy Twitter Followers - Real X Followers, Instant | Follx",metaDescription:"Buy Twitter/X followers from $1.99. Real followers, instant delivery, no password required. Build authority on Twitter. 250K+ satisfied customers.",metaKeywords:"buy twitter followers, twitter followers, buy x followers, cheap twitter followers, real twitter followers, grow twitter, x followers",canonicalUrl:"https://follx.com/buy-twitter-followers",schemas:[x,m,h,f],accentColor:"sky",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"Buy Twitter Followers"}]}),e.jsx(Tl,{badge:"#1 Twitter/X Growth Service 2025",h1:"Buy Twitter Followers",subtitle:"Build authority on Twitter/X with real followers. Instant delivery, no password needed, backed by our 30-day guarantee.",ctaText:"Buy Twitter Followers",trustIndicators:s,heroImage:"https://images.pexels.com/photos/607812/pexels-photo-607812.jpeg?w=500&h=600&fit=crop",heroImageAlt:"Buy Twitter followers to grow your presence on X",overlayStatLabel:"New Followers",overlayStatValue:"+6,340",gradient:"from-sky-500 via-blue-500 to-sky-700",bgImage:"https://images.pexels.com/photos/607812/pexels-photo-607812.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["No Password Needed","Real Followers","Instant Delivery","30-Day Guarantee","X Compatible"]}),e.jsx(zl,{counters:d}),e.jsx(yc,{title:"Buy Twitter/X Followers Packages",subtitle:"Affordable packages for individuals and businesses.",packages:a,itemLabel:"Twitter Followers",accentGradient:"from-sky-500 to-blue-600",accentBg:"bg-sky-100",accentText:"text-sky-500",onGetStarted:t}),e.jsx(Ml,{title:"How to Buy Twitter Followers",subtitle:"Get started in 4 simple steps.",steps:r,accentGradient:"from-sky-500 to-blue-600"}),e.jsxs(Pl,{authorName:"James Harrison",authorRole:"Social Media Strategist",authorImage:"https://images.pexels.com/photos/614810/pexels-photo-614810.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"98,765 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to Buying Twitter/X Followers in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Twitter, now rebranded as X, remains one of the most influential social media platforms for real-time communication, thought leadership, and brand building. With over 600 million monthly active users, the platform is essential for journalists, businesses, politicians, and thought leaders. In this competitive environment, follower count serves as a primary indicator of authority and influence."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"The Role of Followers on Twitter/X"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:`On Twitter, follower count directly impacts how your content is perceived and distributed. Tweets from accounts with larger followings receive more impressions, more engagement, and are more likely to appear in other users' "For You" feeds. This is especially true since X introduced the algorithmic feed, which prioritizes content from accounts that are perceived as authoritative.`}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The follower-to-following ratio is another important metric on Twitter. A high ratio signals that you are an authority figure that people want to follow, rather than someone who follows everyone to get follow-backs. By purchasing followers, you can quickly establish a healthy ratio that signals authority and attracts organic follows."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/607812/pexels-photo-607812.jpeg?w=800&h=450&fit=crop",alt:"Twitter growth strategy",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Building a strong Twitter following establishes authority and influence"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Twitter Followers for Business Growth"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Businesses increasingly rely on Twitter/X for brand communication, customer service, and thought leadership. A company's Twitter follower count is often checked by potential customers, partners, and investors. A robust following signals an established, trustworthy brand. Startups and growing businesses can accelerate this perception by purchasing followers while they build organic engagement."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["For individuals building a personal brand, Twitter followers are equally important. Whether you are a consultant, author, speaker, or job seeker, your Twitter following serves as a public credibility indicator. Combined with a strong presence on platforms like ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-sky-600 hover:text-sky-700 font-medium",children:"Instagram"})," and ",e.jsx("a",{href:"/buy-youtube-subscribers",className:"text-sky-600 hover:text-sky-700 font-medium",children:"YouTube"}),", a solid Twitter following creates a comprehensive digital footprint. Manage all your social growth efficie
1106ntly through our ",e.jsx("a",{href:"/cheap-smm-panel",className:"text-sky-600 hover:text-sky-700 font-medium",children:"cheap SMM panel"}),"."]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Best Practices for Twitter Growth"}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Engage in Conversations"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Twitter thrives on conversation. Reply to trending topics, engage with industry leaders, and participate in Twitter Spaces. Your purchased followers provide the credibility base that makes your contributions more impactful and noticeable."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Share Valuable Content Consistently"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The most successful Twitter accounts tweet multiple times daily with a mix of original thoughts, curated content, and engagement tweets. With a larger follower base, each tweet reaches more people, creating more opportunities for organic growth through retweets and quotes."})]}),e.jsx(Ol,{title:"Follx vs Other Twitter Services",subtitle:"See why professionals choose Follx for Twitter growth.",rows:c,accentGradient:"from-sky-500 to-blue-600"}),e.jsx(El,{title:"Why Choose Follx for Twitter Followers?",subtitle:"Trusted by 250,000+ Twitter users worldwide.",features:l,accentBg:"bg-gradient-to-br from-sky-100 to-blue-100",accentText:"text-sky-600"}),e.jsx(Dl,{testimonials:n,accentText:"text-sky-500"}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Everything you need to know about buying Twitter followers.",faqs:i}),e.jsx(Fl,{title:"Ready to Grow Your Twitter Presence?",subtitle:"Join 250,000+ satisfied customers. Real followers, instant delivery, and our 30-day guarantee.",ctaText:"Buy Twitter Followers Now",gradient:"from-sky-500 via-blue-500 to-sky-600",onGetStarted:t})]})}function J6({onGetStarted:t}){const s=[{value:"10K+",label:"API Integrations"},{value:"99.9%",label:"Uptime"},{value:"<100ms",label:"Avg Response Time"},{value:"24/7",label:"Technical Support"}],a=[{step:1,title:"Create Account",description:"Register on Follx and access your API dashboard.",icon:Os},{step:2,title:"Get API Key",description:"Generate your unique API key from the reseller panel.",icon:vp},{step:3,title:"Integrate",description:"Use our standard SMM panel API protocol to connect your system.",icon:er},{step:4,title:"Scale",description:"Start processing bulk orders automatically through the API.",icon:Or}],r=[{icon:vp,title:"Standard API Protocol",description:"Fully compatible with the industry-standard SMM panel API format. Easy integration with any panel."},{icon:rt,title:"Instant Processing",description:"Orders are processed and submitted to providers within seconds of API call."},{icon:er,title:"99.9% Uptime",description:"Enterprise-grade infrastructure ensures your business never experiences downtime."},{icon:lt,title:"Secure Authentication",description:"API key authentication with rate limiting and IP whitelisting options."},{icon:$v,title:"Real-Time Status",description:"Track order status, check balances, and monitor delivery in real-time via API."},{icon:Ta,title:"Dedicated API Support",description:"Technical support team specialized in API integration and troubleshooting."}],l=[{name:"Alex Thompson",role:"Panel Owner",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?w=100&h=100&fit=crop",content:"Follx API is the most reliable I have used. Zero downtime and instant order processing. My customers are happy and so am I.",rating:5,stat:"500K+ orders"},{name:"Sarah Kim",role:"Agency Director",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"We integrated Follx API into our client management system. The standardized protocol made integration effortless.",rating:5,stat:"200+ clients"},{name:"Robert Chen",role:"SMM Business Owner",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"The API response times are incredibly fast. Our automated ordering system processes thousands of orders daily without issues.",rating:5,stat:"1M+ orders"},{name:"Lisa Patel",role:"Tech Entrepreneur",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"Built my entire SMM platform on Follx API. The documentation is clear, the API is stable, and the pricing is unbeatable.",rating:5,stat:"50K users"}],n=[{question:"What is the SMM Panel API?",answer:"The Follx SMM Panel API allows you to programmatically place orders, check order status, view service lists, and manage your balance. It uses the industry-standard SMM panel API protocol, making it compatible with virtually any SMM panel software."},{question:"How do I integrate the API?",answer:"Integration is straightforward. After registering, you receive an API key and endpoint URL. The API accepts standard HTTP POST requests with parameters for actions like placing orders (action=add), checking status (action=status), and viewing services (action=services). Full documentation is provided in your dashboard."},{question:"What API actions are supported?",answer:"The API supports all standard SMM panel actions: services (list available services), add (place new order), status (check order status), multi-status (check multiple orders), cancel (cancel order), refill (request refill), and balance (check account balance)."},{question:"What is the API response time?",answer:"Our average API response time is under 100 milliseconds. Order processing and submission to providers typically happens within seconds of the API call. We maintain 99.9% uptime with redundant infrastru
1106cture."},{question:"Is there a minimum deposit for API access?",answer:"API access is available to all registered reseller accounts. There is a minimum deposit requirement which you can view on our pricing page. Bulk depositors receive additional discounts and priority processing."},{question:"Can I use the API with my own SMM panel?",answer:"Yes, our API is compatible with all major SMM panel scripts including Perfect Panel, JETOTP Panel, and custom-built solutions. Any system that supports the standard SMM panel API protocol can integrate with Follx."},{question:"Do you offer rate limiting?",answer:"We allow generous rate limits for API requests. Standard accounts can make up to 100 requests per minute. For higher volume needs, contact our support team for custom rate limit configurations."},{question:"How do I handle errors in the API?",answer:"The API returns standardized JSON responses with clear error codes and messages. Common scenarios include insufficient balance, invalid service ID, and invalid order ID. Our documentation covers all error codes and recommended handling approaches."}],i=[{feature:"API Uptime",us:"99.9%",others:"95-98%"},{feature:"Response Time",us:"<100ms",others:"500ms+"},{feature:"Standard Protocol",us:!0,others:!0},{feature:"Real-Time Status",us:!0,others:!1},{feature:"Auto Refill",us:!0,others:!1},{feature:"24/7 Tech Support",us:!0,others:!1},{feature:"Service Count",us:"5,000+",others:"500-2,000"}],c=[{value:"10,000+",label:"API Integrations"},{value:"5,000+",label:"Available Services"},{value:"99.9%",label:"API Uptime"},{value:"<100ms",label:"Avg Response Time"}],d={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(f=>({"@type":"Question",name:f.question,acceptedAnswer:{"@type":"Answer",text:f.answer}}))},x={"@context":"https://schema.org","@type":"Product",name:"SMM Panel API",description:"Enterprise-grade SMM Panel API for bulk social media services",brand:{"@type":"Brand",name:"Follx"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.9",reviewCount:"3456"}},m={"@context":"https://schema.org","@type":"Article",headline:"SMM Panel API - Complete Integration Guide",author:{"@type":"Person",name:"Michael Foster"},datePublished:"2025-01-18",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},h={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"SMM Panel API",item:"https://follx.com/smm-panel-api"}]};return e.jsxs(Il,{title:"SMM Panel API - Fastest Social Media API Provider | Follx",metaDescription:"Integrate Follx SMM Panel API for automated social media services. 5,000+ services, 99.9% uptime, instant processing. Standard API protocol compatible.",metaKeywords:"smm panel api, social media api, smm api provider, bulk api orders, smm api integration, reseller api panel, social media marketing api",canonicalUrl:"https://follx.com/smm-panel-api",schemas:[d,x,m,h],accentColor:"slate",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"SMM Panel API"}]}),e.jsx(Tl,{badge:"Enterprise-Grade SMM API",h1:"SMM Panel API",subtitle:"The fastest and most reliable SMM Panel API. 5,000+ services, 99.9% uptime, and instant order processing. Standard protocol compatible with any panel.",ctaText:"Get API Access",trustIndicators:s,heroImage:"https://images.pexels.com/photos/546819/pexels-photo-546819.jpeg?w=500&h=600&fit=crop",heroImageAlt:"SMM Panel API integration dashboard",overlayStatLabel:"API Orders Today",overlayStatValue:"+45,200",gradient:"from-slate-700 via-slate-800 to-slate-900",bgImage:"https://images.pexels.com/photos/546819/pexels-photo-546819.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["Standard API Protocol","99.9% Uptime","Instant Processing","5,000+ Services","24/7 Tech Support"]}),e.jsx(zl,{counters:c}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"API Endpoints"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Standard SMM Panel API actions for seamless integration."})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:[{method:"POST",action:"services",desc:"List all available services with pricing and details"},{method:"POST",action:"add",desc:"Place a new order with service, link, and quantity"},{method:"POST",action:"status",desc:"Check the current status of an existing order"},{method:"POST",action:"cancel",desc:"Request cancellation of a pending order"},{method:"POST",action:"refill",desc:"Request a refill for a completed order"},{method:"POST",action:"balance",desc:"Check your current account balance"}].map((f,y)=>e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6 border border-slate-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("span",{className:"px-2 py-1 bg-emerald-100 text-emerald-700 text-xs font-mono font-bold rounded",children:f.method}),e.jsxs("code",{className:"text-sm font-mono text-slate-700",children:["action=",f.action]})]}),e.jsx("p",{className:"text-slate-600 text-sm",children:f.desc})]},y))})]})}),e.jsx(Ml,{title:"How to Integrate the API",subtitle:"Get up and running in minutes with our standard protocol.",steps:a,accentGradient:"from-slate-700 to-slate-900"}),e.jsxs(Pl,{authorName:"Michael Foster",authorRole:"API Integration Specialist",authorImage:"https://images.pexels.com/photos/2182970/pexels-photo-2182970.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"87,
1106654 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"SMM Panel API: The Complete Integration Guide"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The Follx SMM Panel API provides programmatic access to over 5,000 social media services across all major platforms. Built on the industry-standard SMM panel API protocol, it integrates seamlessly with existing panel software, custom-built platforms, and automation tools. Whether you are running an SMM panel, managing client campaigns, or building a social media marketing platform, our API provides the infrastructure you need."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why Choose Follx API"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Reliability is the foundation of any successful API integration. Follx maintains 99.9% uptime with redundant infrastructure, automatic failover, and real-time monitoring. Our average response time of under 100 milliseconds ensures that your users experience instant order processing. This level of reliability is what separates Follx from other SMM panel API providers."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["With over 5,000 available services covering Instagram, TikTok, YouTube, Twitter, Facebook, Telegram, Spotify, and more, the API provides comprehensive coverage for any social media marketing need. Services include followers, likes, views, comments, shares, and specialized engagement packages. You can offer your customers services to ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-slate-700 hover:text-slate-900 font-medium",children:"buy Instagram followers"}),", ",e.jsx("a",{href:"/buy-tiktok-followers",className:"text-slate-700 hover:text-slate-900 font-medium",children:"buy TikTok followers"}),", and much more through a single API integration."]}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/546819/pexels-photo-546819.jpeg?w=800&h=450&fit=crop",alt:"SMM Panel API architecture",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Enterprise-grade API infrastructure powering thousands of integrations"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"API Integration Best Practices"}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Error Handling"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Implement robust error handling for all API calls. The API returns standardized JSON responses with error codes and descriptive messages. Handle common scenarios like insufficient balance, service unavailable, and rate limit exceeded gracefully to provide a smooth user experience on your platform."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Status Polling"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Use the status endpoint to poll for order updates. We recommend polling at 30-60 second intervals for active orders. The API returns real-time status information including order status, start count, and remaining count. For high-volume operations, use the multi-status endpoint to check multiple orders in a single request."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Building Your SMM Business"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["The API is the foundation for building a profitable SMM business. Set your own pricing, add your markup, and offer services to your customers through your own branded platform. Combine API integration with our ",e.jsx("a",{href:"/smm-panel-reseller",className:"text-slate-700 hover:text-slate-900 font-medium",children:"SMM panel reseller"})," program for the most competitive wholesale pricing. Whether you are building the ",e.jsx("a",{href:"/best-smm-panel",className:"text-slate-700 hover:text-slate-900 font-medium",children:"best SMM panel"})," or a ",e.jsx("a",{href:"/cheap-smm-panel",className:"text-slate-700 hover:text-slate-900 font-medium",children:"cheap SMM panel"}),", our API provides the backbone."]})]}),e.jsx(Ol,{title:"Follx API vs Other Providers",subtitle:"Enterprise-grade reliability at competitive pricing.",rows:i,accentGradient:"from-slate-700 to-slate-900"}),e.jsx(El,{title:"Why Developers Choose Follx API",subtitle:"Built for reliability, speed, and scale.",features:r,accentBg:"bg-gradient-to-br from-slate-100 to-slate-200",accentText:"text-slate-700"}),e.jsx(Dl,{testimonials:l,accentText:"text-slate-600"}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Technical details about the SMM Panel API.",faqs:n}),e.jsx(Fl,{title:"Ready to Integrate the Follx API?",subtitle:"Get your API key today and start processing orders in minutes.",ctaText:"Get API Access Now",gradient:"from-slate-700 via-slate-800 to-slate-900",onGetStarted:t})]})}function W6({onGetStarted:t}){const s=[{value:"15K+",label:"Active Resellers"},{value:"5,000+",label:"Available Services"},{value:"Up to 80%",label:"Profit Margin"},{value:"24/7",label:"Reseller Support"}],a=[{step:1,title:"Register",description:"Create your free Follx reseller account in minutes.",icon:mt},{step:2,title:"Add Funds",description:"Deposit funds to your wallet with multiple payment methods.",icon:Jt},{step:3,title:"Set Prices",description:"Choose services and set your own markup for maximum profit.",icon:Ia},{step:4,title:"Earn Profit",description:"Sell services to your clients and keep the profit margin.",icon:Or}],r=[{icon:Jt,title:"Wholesale Pricing",description:"Access the lowest wholesale prices in the industry. Higher deposits unlock deeper discounts."},{icon:Os,title:"5,000+ Services",description:"Complete service catalog covering Instagram, TikTok, YouTube, Twitter, Facebook, and more."},{icon:rt,title:"Instant Processing",description:"Orders are processed and delivered automatically. No manual intervention needed."},{icon:lt,title:"White Label",description:"Brand the experience as your own. Your clients see your brand, not ours."},{icon:Ia,title:"Reseller Dashboard",description:"Full analytics dashboard to track orders, revenue, and performance metrics."},{icon:Ta,title:"Priority Support",description:"Dedicated reseller support with faster response times and technical assistance."}],l=[{name:"Ahmed Hassan",role:"SMM Panel Owner",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?w=100&h=100&fit=crop",content:"Follx reseller program turned my side project into a full-time business. The wholesale prices leave plenty of room for profit.",rating:5,stat:"$10K+/month"},{name:"Maria Rodriguez",role:"Digital Agency",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"We white-label Follx services for our agency clients. The reliability and service variety is unmatched.",rating:5,stat:"300+ clients"},{name:"James Wilson",role:"Freelancer",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"Started reselling Follx services as a freelancer. Now I have a recurring income stream that grows every month.",rating:5,stat:"$5K/month"},{name:"Priya Kapoor",role:"Reseller",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"The API integration was seamless. I built my own panel using Follx as the backend and launched in two weeks.",rating:5,stat:"100K+ orders"}],n=[{question:"What is an SMM Panel Reseller?",answer:"An SMM panel reseller buys social media services at wholesale prices and resells them to clients at a markup. With Follx, you access 5,000+ services at wholesale rates, set your own prices, and keep the profit. It is a proven business model for earning income from social media marketing."},{question:"How much can I earn as a reseller?",answer:"Profit margins typically range from 30% to 80% depending on the services and your pricing strategy. Many of our top resellers earn $5,000-$20,000+ per month. Your earnings depend on your client base and sales volume."},{question:"Do I need technical skills?",answer:"No technical skills are required to get started. Our reseller dashboard is user-friendly and allows you to manage orders manually. If you want to build your own platform, our API makes integration straightforward even for beginners."},{question:"What is the minimum deposit?",answer:"You can start with a small minimum deposit. Higher deposit tiers unlock better wholesale pricing. Check our pricing page for current deposit minimums and tier discounts."},{question:"Can I use the API with my own website?",answer:"Yes, our standard SMM Panel API integrates with any website or panel software. You can build a fully branded SMM panel using Follx as the service provider. See our SMM Panel API page for te
1106chnical details."},{question:"Do you offer sub-accounts for my team?",answer:"Yes, our reseller dashboard supports sub-accounts with customizable permissions. You can create accounts for team members or sub-resellers with controlled access to services and features."},{question:"What services can I resell?",answer:"You can resell all 5,000+ services available on Follx, covering Instagram followers, likes, views, TikTok followers, YouTube subscribers, Twitter followers, and services for 20+ additional platforms."},{question:"How does order processing work?",answer:"Orders placed through your panel or API are automatically processed and delivered by our system. You do not need to manually fulfill any orders. The entire process from order placement to delivery is automated."}],i=[{feature:"Available Services",us:"5,000+",others:"500-2,000"},{feature:"Profit Margin",us:"Up to 80%",others:"20-40%"},{feature:"API Access",us:!0,others:!1},{feature:"White Label",us:!0,others:!1},{feature:"Sub-Accounts",us:!0,others:!1},{feature:"Auto Order Processing",us:!0,others:!1},{feature:"24/7 Reseller Support",us:!0,others:!1}],c=[{value:"15,000+",label:"Active Resellers"},{value:"5,000+",label:"Available Services"},{value:"$50M+",label:"Reseller Revenue"},{value:"120+",label:"Countries"}],d={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(f=>({"@type":"Question",name:f.question,acceptedAnswer:{"@type":"Answer",text:f.answer}}))},x={"@context":"https://schema.org","@type":"Product",name:"SMM Panel Reseller Program",description:"Start your own SMM business with wholesale pricing and API access",brand:{"@type":"Brand",name:"Follx"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.9",reviewCount:"4567"}},m={"@context":"https://schema.org","@type":"Article",headline:"SMM Panel Reseller - Start Your Social Media Business",author:{"@type":"Person",name:"Laura Bennett"},datePublished:"2025-01-20",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},h={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"SMM Panel Reseller",item:"https://follx.com/smm-panel-reseller"}]};return e.jsxs(Il,{title:"SMM Panel Reseller - Start Your Own SMM Business | Follx",metaDescription:"Become an SMM panel reseller with Follx. 5,000+ services, wholesale pricing, up to 80% profit margins. API access, white-label options, 24/7 support.",metaKeywords:"smm panel reseller, smm reseller, social media reseller, smm panel wholesale, start smm business, reseller panel, smm services reseller",canonicalUrl:"https://follx.com/smm-panel-reseller",schemas:[d,x,m,h],accentColor:"emerald",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"SMM Panel Reseller"}]}),e.jsx(Tl,{badge:"Start Your SMM Business Today",h1:"SMM Panel Reseller",subtitle:"Launch your own social media marketing business with wholesale pricing, 5,000+ services, and up to 80% profit margins. No technical skills required.",ctaText:"Become a Reseller",trustIndicators:s,heroImage:"https://images.pexels.com/photos/3184465/pexels-photo-3184465.jpeg?w=500&h=600&fit=crop",heroImageAlt:"SMM Panel Reseller dashboard",overlayStatLabel:"Monthly Revenue",overlayStatValue:"$15,200+",gradient:"from-emerald-500 via-teal-500 to-green-600",bgImage:"https://images.pexels.com/photos/3184465/pexels-photo-3184465.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["5,000+ Services","Up to 80% Profit","API Access","White Label","24/7 Support"]}),e.jsx(zl,{counters:c}),e.jsx(Ml,{title:"How to Start Reselling",subtitle:"Launch your SMM business in 4 simple steps.",steps:a,accentGradient:"from-emerald-500 to-teal-600"}),e.jsxs(Pl,{authorName:"Laura Bennett",authorRole:"SMM Business Consultant",authorImage:"https://images.pexels.com/photos/1065084/pexels-photo-1065084.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"145,678 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to SMM Panel Reselling in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The social media marketing industry is worth over $200 billion and growing rapidly. SMM panel reselling has emerged as one of the most accessible and profitable ways to participate in this growth. As a reseller, you purchase social media services at wholesale prices and sell them to clients at a markup, keeping the profit. With Follx, you get access to over 5,000 services, the lowest wholesale prices, and the infrastru
1106cture to scale your business."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Why SMM Panel Reselling is Profitable"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["The demand for social media services continues to grow as businesses, influencers, and creators invest in their online presence. Services like ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"Instagram followers"}),", ",e.jsx("a",{href:"/buy-instagram-likes",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"Instagram likes"}),", ",e.jsx("a",{href:"/buy-tiktok-followers",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"TikTok followers"}),", and ",e.jsx("a",{href:"/buy-youtube-subscribers",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"YouTube subscribers"})," are in constant demand. As a reseller, you sit at the intersection of supply and demand, earning profit on every transaction."]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Profit margins in SMM reselling typically range from 30% to 80%. Follx's wholesale pricing ensures that even with competitive retail pricing, you maintain healthy margins. Many of our top resellers earn $5,000 to $20,000+ monthly, and the business scales linearly with your client base."}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/3184465/pexels-photo-3184465.jpeg?w=800&h=450&fit=crop",alt:"SMM Panel Reseller business",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Reseller businesses built on Follx earn significant recurring revenue"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Building Your SMM Reseller Business"}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Option 1: Manual Reselling"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The simplest approach is to use the Follx reseller dashboard directly. Accept orders from clients through any channel (website, social media, messaging apps), place orders in your dashboard, and deliver results to clients. This approach requires no technical setup and works well for freelancers and small agencies."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Option 2: Build Your Own Panel"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["For more serious operations, use our ",e.jsx("a",{href:"/smm-panel-api",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"SMM Panel API"})," to build your own branded SMM panel. Popular panel scripts like Perfect Panel make this process straightforward. Clients create accounts on your panel, deposit funds, and place orders that are automatically fulfilled through the Follx API. This creates a fully automated, scalable business."]}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Option 3: Agency Model"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Digital marketing agencies can offer SMM services as part of their service packages. Use Follx wholesale pricing to deliver social media growth services to clients alongside SEO, content marketing, and advertising services. The white-label nature means clients see your brand exclusively."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Reseller Success Tips"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Focus on building recurring client relationships rather than one-time sales. Offer monthly packages, provide excellent customer service, and upsell related services. The most successful resellers treat this as a real business with proper marketing, client management, and growth strategies."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["Whether you are looking for a ",e.jsx("a",{href:"/cheap-smm-panel",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"cheap SMM panel"})," to start small or aiming to build the ",e.jsx("a",{href:"/best-smm-panel",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"best SMM panel"})," in your market, Follx provides the foundation. Our competitive pricing, reliable delivery, and comprehensive service catalog give you everything you need to succeed."]})]}),e.jsx(Ol,{title:"Follx Reseller vs Others",subtitle:"See why 15,000+ resellers choose Follx.",rows:i,accentGradient:"from-emerald-500 to-teal-600"}),e.jsx(El,{title:"Why Resellers Choose Follx",subtitle:"Everything you need to build a profitable SMM business.",features:r,accentBg:"bg-gradient-to-br from-emerald-100 to-teal-100",accentText:"text-emerald-600"}),e.jsx(Dl,{testimonials:l,accentText:"text-emerald-500"}),e.jsx("section",{className:"py-20 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Expand Your Social Media Services"}),e.jsx("p",{className:"text-slate-600 text-lg max-w-3xl mx-auto",children:"As a Follx reseller, you gain access to the full catalog of social media growth services. Each service category represents a revenue stream you can offer to your clients at your own markup."})]}),e.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-7 hover:shadow-lg hover:border-emerald-200 transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-100 to-pink-100 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-5 h-5 text-rose-600"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Instagram Followers"})]}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-4 text-sm",children:["Instagram follower packages are your highest-demand product. Resellers typically see 40-70% margins when they ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"buy Instagram followers at wholesale"})," through our platform and retail them to clients seeking audience growth."]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-7 hover:shadow-lg hover:border-emerald-200 transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-red-100 to-orange-100 rounded-lg flex items-center justify-center",children:e.jsx(ia,{className:"w-5 h-5 text-red-500"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Instagram Likes"})]}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-4 text-sm",children:["Engagement services drive recurring orders. Clients who ",e.jsx("a",{href:"/buy-instagram-likes",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"purchase Instagram likes"})," regularly for each new post create predictable, subscription-like revenue for your reseller business."]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-7 hover:shadow-lg hover:border-emerald-200 transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-sky-100 to-blue-100 rounded-lg flex items-center justify-center",children:e.jsx(Ia,{className:"w-5 h-5 text-sky-600"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Instagram Views"})]}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-4 text-sm",children:["With Reels dominating Instagram, view packages are increasingly popular. Offer clients the ability to ",e.jsx("a",{href:"/buy-instagram-views",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"boost their Instagram video views"})," to improve algorithmic reach and content performance."]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-7 hover:shadow-lg hover:border-emerald-200 transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-teal-100 to-cyan-100 rounded-lg flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-teal-600"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"TikTok Followers"})]}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-4 text-sm",children:["TikTok is the fastest-growing platform for reseller sales. Creators and brands actively ",e.jsx("a",{href:"/buy-tiktok-followers",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"buy TikTok followers"})," to meet monetization thresholds and secure brand partnerships, making this a high-conversion service."]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-7 hover:shadow-lg hover:border-emerald-200 transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-red-100 to-rose-100 rounded-lg flex items-center justify-center",children:e.jsx(wt,{className:"w-5 h-5 text-red-600"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"YouTube Subscribers"})]}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-4 text-sm",children:["YouTube monetization requires 1,000 subscribers, creating strong demand. Resellers profit by helping content creators ",e.jsx("a",{href:"/buy-youtube-subscribers",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"get YouTube subscribers"})," to unlock their channel's revenue potential."]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-7 hover:shadow-lg hover:border-emerald-200 transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-100 to-sky-100 rounded-lg flex items-center justify-center",children:e.jsx(tt,{className:"w-5 h-5 text-blue-500"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Twitter Followers"})]}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-4 text-sm",children:["X (Twitter) remains essential for B2B clients, thought leaders, and public figures. Offering clients the option to ",e.jsx("a",{href:"/buy-twitter-followers",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"grow their Twitter following"})," completes your multi-platform service portfolio."]})]})]}),e.jsx("div",{className:"mt-14 bg-gradient-to-br from-emerald-50 to-teal-50 border border-emerald-200 rounded-2xl p-8 text-center",children:e.jsxs("p",{className:"text-slate-700 leading-relaxed max-w-3xl mx-auto mb-4",children:["All services are available through the ",e.jsx("a",{href:"/smm-panel-api",className:"text-emerald-600 hover:text-emerald-700 font-semibold",children:"Follx SMM Panel API"})," for automated order processing. Whether you operate a ",e.jsx("a",{href:"/cheap-smm-panel",className:"text-emerald-600 hover:text-emerald-700 font-semibold",children:"budget-friendly SMM panel"})," or position yourself as the ",e.jsx("a",{href:"/best-smm-panel",className:"text-emerald-600 hover:text-emerald-700 font-semibold",children:"best SMM panel"}
1106)," in your market, our wholesale infrastructure scales with your business."]})})]})}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Common questions about the SMM Panel Reseller program.",faqs:n}),e.jsx(Fl,{title:"Ready to Start Your SMM Business?",subtitle:"Join 15,000+ resellers earning with Follx. Wholesale pricing, 5,000+ services, and 24/7 support.",ctaText:"Become a Reseller Now",gradient:"from-emerald-500 via-teal-500 to-green-500",onGetStarted:t})]})}function H6({onGetStarted:t}){const s=[{value:"500K+",label:"Happy Customers"},{value:"$0.001",label:"Starting Price"},{value:"5,000+",label:"Services"},{value:"24/7",label:"Customer Support"}],a=[{step:1,title:"Create Account",description:"Register for free on Follx in under a minute.",icon:mt},{step:2,title:"Add Funds",description:"Deposit any amount using your preferred payment method.",icon:Jt},{step:3,title:"Choose Service",description:"Browse 5,000+ services at the cheapest rates.",icon:Os},{step:4,title:"Get Results",description:"Orders start instantly. Track delivery in real-time.",icon:Or}],r=[{icon:bn,title:"Cheapest Rates",description:"The most affordable SMM panel prices in the industry. Starting from $0.001 per unit."},{icon:Os,title:"5,000+ Services",description:"Instagram, TikTok, YouTube, Twitter, Facebook, Telegram, Spotify, and 20+ more platforms."},{icon:rt,title:"Instant Processing",description:"Orders begin processing within seconds. No waiting, no delays."},{icon:lt,title:"Secure & Reliable",description:"SSL encrypted payments, secure order processing, and reliable delivery."},{icon:wt,title:"Global Coverage",description:"Services available for audiences in every country and region."},{icon:Ta,title:"Volume Discounts",description:"The more you deposit, the cheaper your rates get. Bulk pricing available."}],l=[{name:"Carlos Mendez",role:"Freelance Marketer",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?w=100&h=100&fit=crop",content:"Finally found an SMM panel that is genuinely cheap without sacrificing quality. Follx delivers every time.",rating:5,stat:"$200/mo saved"},{name:"Sophie Laurent",role:"Small Business",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"As a small business, budget matters. Follx gives me the cheapest rates for Instagram and TikTok growth.",rating:5,stat:"5K orders"},{name:"Raj Patel",role:"Agency Owner",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"We switched from three other panels to Follx. The prices are unbeatable and the service quality is better.",rating:5,stat:"50K+ orders"},{name:"Nina Kowalski",role:"Content Creator",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"I get more for my money here than anywhere else. The cheap prices do not mean cheap quality.",rating:5,stat:"100K followers"}],n=[{question:"Is Follx really the cheapest SMM panel?",answer:"Yes, Follx offers some of the lowest prices in the industry with services starting from $0.001 per unit. We maintain competitive pricing through our direct provider relationships and high order volume, passing the savings to our customers."},{question:"Does cheap mean low quality?",answer:"Not at all. Our cheap prices are the result of efficient operations, direct provider partnerships, and high volume. The service quality remains high with reliable delivery, real-looking accounts, and consistent results."},{question:"What services are available?",answer:"We offer over 5,000 services across all major platforms: Instagram (followers, likes, views, comments), TikTok (followers, likes, views), YouTube (subscribers, views, likes), Twitter (followers, likes, retweets), Facebook, Telegram, Spotify, and many more."},{question:"How do I get even cheaper rates?",answer:"Higher deposits unlock volume discounts. Our tiered pricing system rewards bulk purchases with progressively lower rates. Additionally, our reseller program offers wholesale pricing for business customers."},{question:"Is the panel safe to use?",answer:"Absolutely. All payments are SSL encrypted, and we never require social media passwords. Our services are delivered through safe, gradual methods that maintain your account security."},{question:"What payment methods do you accept?",answer:"We accept credit/debit cards, PayPal, Apple Pay, Google Pay, bank transfers, and cryptocurrencies (Bitcoin, Ethereum, USDT). All transactions are processed securely."},{question:"How fast is delivery?",answer:"Most services start delivering within 0-30 minutes of order placement. Delivery speeds vary by service type, but our panel is optimized for the fastest possible processing."},{question:"Do you offer an API for bulk orders?",answer:"Yes, our SMM Panel API allows automated bulk ordering at wholesale rates. This is ideal for agencies and resellers who process high volumes of orders."}],i=[{feature:"Starting Price",us:"$0.001",others:"$0.01+"},{feature:"Total Services",us:"5,000+",others:"500-2,000"},{feature:"Volume Discounts",us:!0,others:!1},{feature:"Instant Processing",us:!0,others:!1},{feature:"API Access",us:!0,others:!1},{feature:"Crypto Payments",us:!0,others:!1},{feature:"24/7 Support",us:!0,others:!1}],c=[{value:"500,000+",label:"Orders Processed"},{value:"45,000+",label:"Active Users"},{value:"120+",label:"Countries Served"},{value:"99.3%",label:"Order Completion"}],d={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(f=>
1106({"@type":"Question",name:f.question,acceptedAnswer:{"@type":"Answer",text:f.answer}}))},x={"@context":"https://schema.org","@type":"Product",name:"Cheap SMM Panel",description:"The most affordable SMM panel for social media marketing services",brand:{"@type":"Brand",name:"Follx"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.9",reviewCount:"18234"}},m={"@context":"https://schema.org","@type":"Article",headline:"Cheap SMM Panel - Most Affordable Social Media Services",author:{"@type":"Person",name:"Daniel Park"},datePublished:"2025-01-22",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},h={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"Cheap SMM Panel",item:"https://follx.com/cheap-smm-panel"}]};return e.jsxs(Il,{title:"Cheap SMM Panel - Cheapest Social Media Services | Follx",metaDescription:"The cheapest SMM panel with 5,000+ services from $0.001. Instagram, TikTok, YouTube, Twitter. Instant delivery, secure payments. Volume discounts available.",metaKeywords:"cheap smm panel, cheapest smm panel, affordable smm panel, cheap social media services, budget smm panel, low cost smm, smm panel cheap",canonicalUrl:"https://follx.com/cheap-smm-panel",schemas:[d,x,m,h],accentColor:"amber",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"Cheap SMM Panel"}]}),e.jsx(Tl,{badge:"Cheapest SMM Panel 2025",h1:"Cheap SMM Panel",subtitle:"The most affordable SMM panel in the industry. 5,000+ services starting from $0.001. No compromise on quality, speed, or reliability.",ctaText:"Get Started for Free",trustIndicators:s,heroImage:"https://images.pexels.com/photos/6476589/pexels-photo-6476589.jpeg?w=500&h=600&fit=crop",heroImageAlt:"Cheap SMM panel with affordable pricing",overlayStatLabel:"Orders Today",overlayStatValue:"+32,400",gradient:"from-amber-500 via-orange-500 to-amber-600",bgImage:"https://images.pexels.com/photos/6476589/pexels-photo-6476589.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["Cheapest Rates","5,000+ Services","Instant Delivery","Volume Discounts","Secure Payments"]}),e.jsx(zl,{counters:c}),e.jsx(Ml,{title:"How to Get Started",subtitle:"Start using the cheapest SMM panel in 4 steps.",steps:a,accentGradient:"from-amber-500 to-orange-600"}),e.jsxs(Pl,{authorName:"Daniel Park",authorRole:"Digital Marketing Analyst",authorImage:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"203,456 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"The Complete Guide to Finding the Cheapest SMM Panel in 2025"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"In the competitive world of social media marketing, finding an SMM panel that offers genuinely cheap prices without compromising on quality is a challenge. Many panels advertise low prices but deliver poor-quality services, slow processing, or unreliable support. Follx stands apart by offering the industry's most competitive pricing while maintaining the highest standards of service quality, reliability, and customer support."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"What Makes a Cheap SMM Panel Worth Using"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Price alone does not determine the value of an SMM panel. The cheapest panel is only valuable if it also delivers reliable services, processes orders quickly, and provides adequate customer support. A truly cheap SMM panel achieves low prices through operational efficiency, direct provider relationships, and high volume, rather than by cutting corners on service quality."}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["Follx achieves its industry-leading low prices through years of building direct relationships with service providers worldwide. Our high order volume allows us to negotiate the best wholesale rates, which we pass directly to our customers. Whether you need to ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-amber-600 hover:text-amber-700 font-medium",children:"buy Instagram followers"}),", ",e.jsx("a",{href:"/buy-tiktok-followers",className:"text-amber-600 hover:text-amber-700 font-medium",children:"buy TikTok followers"}),", or ",e.jsx("a",{href:"/buy-youtube-subscribers",className:"text-amber-600 hover:text-amber-700 font-medium",children:"buy YouTube subscribers"}),", you will find the cheapest rates here."]}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/6476589/pexels-photo-6476589.jpeg?w=800&h=450&fit=crop",alt:"Cheap SMM panel services dashboard",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Follx offers the cheapest rates without compromising on quality"})]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Services Available on Our Cheap SMM Panel"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Our panel offers over 5,000 services across every major social media platform. This includes Instagram followers, likes, views, and comments; TikTok followers, likes, and views; YouTube subscribers, views, and watch hours; Twitter followers and engagement; Facebook page likes and followers; Telegram members; Spotify plays; and much more. Each service is priced competitively with the lowest rates in the market."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"How to Maximize Savings"}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Volume Discounts"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Our tiered pricing system rewards higher deposits with lower rates. The more you deposit, the cheaper each service becomes. This makes Follx particularly attractive for agencies, resellers, and heavy users who process many orders."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Reseller Program"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["For the absolute cheapest rates, join our ",e.jsx("a",{href:"/smm-panel-reseller",className:"text-amber-600 hover:text-amber-700 font-medium",children:"SMM panel reseller"})," program. Resellers access wholesale pricing that is significantly below retail rates. Combined with our ",e.jsx("a",{href:"/smm-panel-api",className:"text-amber-600 hover:text-amber-700 font-medium",children:"SMM panel API"}),", you can automate your operations and maximize efficiency."]}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Smart Service Selection"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["With 5,000+ services, there are often multiple options for the same type of engagement at different price points. Budget-friendly options are available for every service category. Compare services based on price per 1,000 units and quality ratings to find the best value for your specific needs. For the overall best experience considering both price and quality, check out our ",e.jsx("a",{href:"/best-smm-panel",className:"text-amber-600 hover:text-amber-700 font-medium",children:"best SMM panel"})," recommendations."]})]}),e.jsx(Ol,{title:"Follx vs Other Cheap Panels",subtitle:"The cheapest does not mean the worst. See how we compare.",rows:i,accentGradient:"from-
1106amber-500 to-orange-600"}),e.jsx(El,{title:"Why Follx is the Cheapest SMM Panel",subtitle:"Low prices, high quality, unmatched reliability.",features:r,accentBg:"bg-gradient-to-br from-amber-100 to-orange-100",accentText:"text-amber-600"}),e.jsx(Dl,{testimonials:l,accentText:"text-amber-500"}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Common questions about our cheap SMM panel.",faqs:n}),e.jsx(Fl,{title:"Ready to Save on Social Media Marketing?",subtitle:"Join 500,000+ users on the cheapest SMM panel. Start from $0.001 per service.",ctaText:"Get Started Now",gradient:"from-amber-500 via-orange-500 to-amber-600",onGetStarted:t})]})}function V6({onGetStarted:t}){const s=[{value:"#1 Rated",label:"SMM Panel 2025"},{value:"500K+",label:"Users Worldwide"},{value:"5,000+",label:"Services"},{value:"4.9/5",label:"User Rating"}],a=[{step:1,title:"Create Account",description:"Register for free and access the best SMM panel instantly.",icon:mt},{step:2,title:"Explore Services",description:"Browse 5,000+ services for every social media platform.",icon:Os},{step:3,title:"Place Order",description:"Select your service, enter details, and checkout securely.",icon:$t},{step:4,title:"Get Results",description:"Instant processing and delivery. Track everything in real-time.",icon:Or}],r=[{icon:qs,title:"#1 Rated Panel",description:"Consistently rated the best SMM panel by users and industry reviewers."},{icon:Os,title:"5,000+ Services",description:"The most comprehensive service catalog covering all major social media platforms."},{icon:rt,title:"Fastest Processing",description:"Industry-leading order processing speeds. Most orders start within seconds."},{icon:lt,title:"Enterprise Security",description:"SSL encryption, secure authentication, and PCI-compliant payment processing."},{icon:wt,title:"Global Infrastructure",description:"Distributed infrastructure across multiple regions for maximum reliability."},{icon:Ta,title:"Premium Support",description:"24/7 expert support with average response time under 5 minutes."}],l=[{name:"Michael Chen",role:"Digital Agency CEO",avatar:"https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?w=100&h=100&fit=crop",content:"After testing dozens of SMM panels, Follx is hands down the best. Reliability, speed, and service quality are unmatched.",rating:5,stat:"1M+ orders"},{name:"Anna Petrov",role:"Marketing Director",avatar:"https://images.pexels.com/photos/1036623/pexels-photo-1036623.jpeg?w=100&h=100&fit=crop",content:"Follx is the only panel our agency trusts for enterprise clients. The consistency and quality are what set it apart.",rating:5,stat:"500+ clients"},{name:"David Okafor",role:"Influencer Manager",avatar:"https://images.pexels.com/photos/1040880/pexels-photo-1040880.jpeg?w=100&h=100&fit=crop",content:"Managing growth for 50+ influencers requires the best tools. Follx panel delivers exactly what we need every time.",rating:5,stat:"50+ influencers"},{name:"Sarah Thompson",role:"E-commerce Owner",avatar:"https://images.pexels.com/photos/1587009/pexels-photo-1587009.jpeg?w=100&h=100&fit=crop",content:"The best investment for our online store social media presence. Sales increased 60% since we started using Follx.",rating:5,stat:"+60% sales"}],n=[{question:"What makes Follx the best SMM panel?",answer:"Follx is rated #1 based on service quality, processing speed, platform coverage (5,000+ services), reliability (99.9% uptime), customer support (24/7 with under 5-minute response), pricing competitiveness, and user satisfaction (4.9/5 rating from 500,000+ users)."},{question:"How many services do you offer?",answer:"We offer over 5,000 services across 30+ social media platforms including Instagram, TikTok, YouTube, Twitter/X, Facebook, LinkedIn, Telegram, Spotify, SoundCloud, Twitch, and many more. Services include followers, likes, views, comments, shares, and platform-specific engagement types."},{question:"Is Follx suitable for agencies and businesses?",answer:"Follx is built for users at every level, from individual creators to large agencies. Our API, sub-account system, bulk ordering capabilities, and dedicated support make it the ideal choice for businesses of all sizes."},{question:"How does pricing compare to other panels?",answer:"Follx offers competitive pricing across all services. While not always the absolute cheapest for every individual service, our combination of price, quality, speed, and reliability delivers the best overall value. Volume discounts make pricing even more competitive for regular users."},{question:"Do you have an API?",answer:"Yes, our standard SMM Panel API allows automated order processing, status checking, and account management. It is compatible with all major panel scripts and custom integrations."},{question:"What makes the service quality better?",answer:"We curate our service providers rigorously, testing quality and retention rates regularly. Services that do not meet our quality standards are removed. This curation process ensures consistently high quality across all 5,000+ services."},{question:"Is there a refund policy?",answer:"Yes, we offer refunds for orders that are not delivered or do not meet the described specifications. We also provide free refills within 30 days for services that experience drops. Our goal is 100% customer satisfaction."},{question:"Can I try before committing?",answer:"Yes, you can start with a small deposit to test our services. There is no long-term commitment or subscription required. Pay as you go and scale up as you see results."}],i=[{feature:"Overall Rating",us:"4.9/5",others:"3.5-4.0/5"},{feature:"Total Services",us:"5,000+",others:"500-2,000"},{feature:"Processing Speed",us:"Instant",others:"Minutes-Hours"},{feature:"Uptime",us:"99.9%",others:"95-98%"},{feature:"API Access",us:!0,others:!1},{feature:"Sub-Accounts",us:!0,others:!1},{feature:"Support Response",us:"<5 min",others:"1-24 hours"}],c=[{value:"500,000+",label:"Active Users"},{value:"5,000+",label:"Available Services"},{value:"30+",label:"Platforms Covered"},{value:"4.9/5",label:"User Rating"}],d={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(f=>
1106({"@type":"Question",name:f.question,acceptedAnswer:{"@type":"Answer",text:f.answer}}))},x={"@context":"https://schema.org","@type":"Product",name:"Best SMM Panel",description:"The #1 rated SMM panel for social media marketing services",brand:{"@type":"Brand",name:"Follx"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.9",reviewCount:"23456"}},m={"@context":"https://schema.org","@type":"Article",headline:"Best SMM Panel 2025 - Complete Comparison and Review",author:{"@type":"Person",name:"Jennifer Walsh"},datePublished:"2025-01-25",dateModified:"2025-02-20",publisher:{"@type":"Organization",name:"Follx"}},h={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://follx.com/"},{"@type":"ListItem",position:2,name:"Best SMM Panel",item:"https://follx.com/best-smm-panel"}]};return e.jsxs(Il,{title:"Best SMM Panel 2025 - #1 Rated Social Media Panel | Follx",metaDescription:"Follx is the #1 rated best SMM panel in 2025. 5,000+ services, instant delivery, 99.9% uptime. Trusted by 500K+ users. Start for free today.",metaKeywords:"best smm panel, top smm panel, #1 smm panel, best social media panel, smm panel review, best smm panel 2025, reliable smm panel",canonicalUrl:"https://follx.com/best-smm-panel",schemas:[d,x,m,h],accentColor:"blue",onGetStarted:t,children:[e.jsx($l,{items:[{label:"Home",href:"/"},{label:"Best SMM Panel"}]}),e.jsx(Tl,{badge:"#1 Rated SMM Panel 2025",h1:"Best SMM Panel",subtitle:"Rated #1 by 500,000+ users. The most reliable, fastest, and most comprehensive SMM panel with 5,000+ services across 30+ platforms.",ctaText:"Try the Best Panel",trustIndicators:s,heroImage:"https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg?w=500&h=600&fit=crop",heroImageAlt:"Best SMM panel dashboard",overlayStatLabel:"Happy Users",overlayStatValue:"500K+",gradient:"from-blue-600 via-blue-700 to-blue-800",bgImage:"https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg?w=1920&h=1080&fit=crop",onGetStarted:t}),e.jsx(Al,{items:["#1 Rated Panel","5,000+ Services","99.9% Uptime","Instant Delivery","24/7 Support"]}),e.jsx(zl,{counters:c}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:"Platforms We Cover"}),e.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"5,000+ services across every major social media platform."})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4",children:[{name:"Instagram",services:"1,200+",color:"from-pink-500 to-rose-500"},{name:"TikTok",services:"800+",color:"from-teal-500 to-emerald-500"},{name:"YouTube",services:"600+",color:"from-red-500 to-red-600"},{name:"Twitter/X",services:"500+",color:"from-sky-500 to-blue-500"},{name:"Facebook",services:"400+",color:"from-blue-600 to-blue-700"},{name:"Telegram",services:"300+",color:"from-sky-400 to-sky-500"}].map((f,y)=>e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 text-center border border-slate-200 hover:shadow-md transition-shadow",children:[e.jsx("div",{className:`w-12 h-12 bg-gradient-to-br ${f.color} rounded-xl flex items-center justify-center mx-auto mb-3`,children:e.jsx("span",{className:"text-white font-bold text-lg",children:f.name[0]})}),e.jsx("div",{className:"font-semibold text-slate-900 text-sm",children:f.name}),e.jsxs("div",{className:"text-xs text-slate-500",children:[f.services," services"]})]},y))})]})}),e.jsx(Ml,{title:"How to Get Started",subtitle:"Experience the best SMM panel in 4 steps.",steps:a,accentGradient:"from-blue-600 to-blue-800"}),e.jsxs(Pl,{authorName:"Jennifer Walsh",authorRole:"Social Media Industry Analyst",authorImage:"https://images.pexels.com/photos/1065084/pexels-photo-1065084.jpeg?w=80&h=80&fit=crop",date:"Feb 20, 2025",views:"267,890 views",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 mb-6",children:"Best SMM Panel 2025: A Complete Review"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Choosing the best SMM panel is critical for anyone serious about social media marketing. The panel you choose determines the quality of services your clients or your own accounts receive, the speed of delivery, and the reliability of your operations. After extensive testing and analysis of over 50 SMM panels, Follx consistently ranks as the #1 choice for 2025 based on comprehensive evaluation criteria."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"What Makes the Best SMM Panel"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"The best SMM panel excels across multiple dimensions: service quality, platform coverage, processing speed, reliability, pricing, user experience, and customer support. While many panels may excel in one or tw
1106o areas, the best panels deliver consistently across all criteria. This is what separates Follx from the competition."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Service Quality and Coverage"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["With over 5,000 services spanning 30+ platforms, Follx offers the most comprehensive service catalog in the industry. This includes premium services for ",e.jsx("a",{href:"/buy-instagram-followers",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Instagram followers"}),", ",e.jsx("a",{href:"/buy-instagram-likes",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Instagram likes"}),", ",e.jsx("a",{href:"/buy-instagram-views",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Instagram views"}),", ",e.jsx("a",{href:"/buy-tiktok-followers",className:"text-blue-600 hover:text-blue-700 font-medium",children:"TikTok followers"}),", ",e.jsx("a",{href:"/buy-youtube-subscribers",className:"text-blue-600 hover:text-blue-700 font-medium",children:"YouTube subscribers"}),", and ",e.jsx("a",{href:"/buy-twitter-followers",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Twitter followers"}),". Each service is rigorously tested and monitored for quality."]}),e.jsxs("div",{className:"my-10",children:[e.jsx("img",{src:"https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg?w=800&h=450&fit=crop",alt:"Best SMM panel comparison",className:"w-full rounded-xl shadow-lg",loading:"lazy"}),e.jsx("p",{className:"text-sm text-slate-500 mt-3 text-center",children:"Follx ranks #1 among SMM panels for overall service quality and reliability"})]}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Speed and Reliability"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Speed matters in social media marketing. Follx processes orders within seconds and maintains 99.9% uptime. This reliability is backed by enterprise-grade infrastructure with automatic failover and real-time monitoring. When you place an order on the best SMM panel, you can trust that it will be processed immediately and delivered on schedule."}),e.jsx("h4",{className:"text-xl font-semibold text-slate-900 mt-8 mb-3",children:"Pricing Value"}),e.jsxs("p",{className:"text-slate-600 leading-relaxed mb-6",children:["While not always the absolute cheapest for every service, Follx delivers the best value when considering the complete package of quality, speed, reliability, and support. For those primarily focused on price, our ",e.jsx("a",{href:"/cheap-smm-panel",className:"text-blue-600 hover:text-blue-700 font-medium",children:"cheap SMM panel"})," offerings provide budget-friendly options. For resellers and agencies, our ",e.jsx("a",{href:"/smm-panel-reseller",className:"text-blue-600 hover:text-blue-700 font-medium",children:"reseller program"})," and ",e.jsx("a",{href:"/smm-panel-api",className:"text-blue-600 hover:text-blue-700 font-medium",children:"API access"})," unlock wholesale pricing."]}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Who Should Use the Best SMM Panel"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Follx serves a diverse user base: individual creators growing their personal brands, small businesses building social media presence, digital marketing agencies managing client campaigns, SMM resellers running their own panels, and enterprise brands executing large-scale social media strategies. The panel's flexible pricing, comprehensive API, and scalable infrastructure accommodate users at every level."}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900 mt-10 mb-4",children:"Making the Right Choice"}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-6",children:"Choosing the best SMM panel is an investment in your social media marketing success. While there are hundreds of panels available, the reliability and consistency of your chosen platform directly impacts your results and your reputation. With 500,000+ active users, a 4.9/5 rating, and years of proven performance, Follx has earned its position as the best SMM panel in 2025."})]}),e.jsx(Ol,{title:"Follx vs Other SMM Panels",subtitle:"See why Follx is rated #1 overall.",rows:i,accentGradient:"from-blue-600 to-blue-800"}),e.jsx(El,{title:"Why Follx is the Best SMM Panel",subtitle:"Excellence across every dimension that matters.",features:r,accentBg:"bg-gradient-to-br from-blue-100 to-sky-100",accentText:"text-blue-600"}),e.jsx(Dl,{testimonials:l,accentText:"text-blue-500"}),e.jsx(Rl,{title:"Frequently Asked Questions",subtitle:"Learn more about the best SMM panel.",faqs:n}
1106),e.jsx(Fl,{title:"Ready to Use the Best SMM Panel?",subtitle:"Join 500,000+ users who chose the #1 rated panel. Start for free today.",ctaText:"Get Started Free",gradient:"from-blue-600 via-blue-700 to-blue-800",onGetStarted:t})]})}function Jf(){const t=window.location.pathname,s=window.location.hash.slice(1);if(new Set(["/affiliate","/partners","/reseller","/wholesale","/smm","/smm-panel-api","/smm-panel-reseller","/cheap-smm-panel","/best-smm-panel"]).has(t)){try{window.history.replaceState({},"","/")}catch{}return"home"}return t==="/pricing"?"pricing":t==="/terms"?"terms":t==="/privacy"||t==="/privacy-policy"?"privacy":t==="/refund"||t==="/refund-policy"?"refund":t==="/landing"||t==="/services"||t==="/marketing"?"landing":t==="/blog"||t.startsWith("/blog/")?"blog":t==="/1234"?"home":t==="/buy-instagram-followers-usa"?"seo-usa":t==="/real-instagram-followers"?"seo-real":t==="/cheap-instagram-followers"?"seo-cheap":t==="/instagram-growth-service"?"seo-growth":t==="/buy-instagram-followers-no-password"?"seo-nopassword":t==="/buzzoid-vs-follx"?"seo-buzzoid":t==="/stormlikes-vs-follx"?"seo-stormlikes":t==="/best-instagram-growth-service-alternatives"?"seo-alternatives":t==="/buy-ig-followers"?"seo-ig-followers":t==="/buy-followers"?"seo-buy-followers":t==="/buy-instagram-followers"?"seo-buy-instagram-followers":t==="/buy-instagram-likes"?"seo-buy-instagram-likes":t==="/buy-instagram-views"?"seo-buy-instagram-views":t==="/buy-tiktok-followers"?"seo-buy-tiktok-followers":t==="/buy-youtube-subscribers"?"seo-buy-youtube-subscribers":t==="/buy-twitter-followers"?"seo-buy-twitter-followers":t==="/follxadmin"?"admin":(s==="admin"&&window.history.replaceState({},"","/"),"home")}function Y6(){var wc,Nc,kc,si,In,ao,ro,_c,Sc,Cc,Ic,Tc;const{user:t,profile:s}=br(),{t:a,language:r}=os(),{formatInCurrency:l,formatRaw:n,currency:i,rate:c,convertFromUsd:d,detectedCountry:x}=Nn(),{showAlert:m}=Vs(),h=Jf(),[f,y]=o.useState(h),{trackPageView:g,trackAction:w,clearMetadata:N,sessionId:v}=Yy({disabled:f==="admin"}),[j,b]=o.useState(!1),[p,E]=o.useState(null),[C,S]=o.useState("service"),[k,J]=o.useState(""),[u,A]=o.useState(null),[T,ae]=o.useState(""),[P,z]=o.useState(""),I=te=>{},[Z,Q]=o.useState(""),[_,M]=o.useState(""),[F,R]=o.useState(""),[X,re]=o.useState(null),[U,oe]=o.useState(!1),[ue,K]=o.useState(!1),q=o.useRef(null),je=o.useRef(null),[we,se]=o.useState(null),[Se,$]=o.useState(null),[ie,be]=o.useState(null),[Pe,de]=o.useState(null),[H,me]=o.useState(null),[ee,Ae]=o.useState(null),[he,D]=o.useState(null),[O,fe]=o.useState(null),[W,_e]=o.useState(null),[Re,ve]=o.useState(null),[Te,ze]=o.useState(!1),it=te=>{},[ke,Xe]=o.useState(void 0),[ce,Le]=o.useState(!1),[Fe,Me]=o.useState(!1),[ft,pe]=o.useState(!1),[dt,ot]=o.useState(!1),[Mt,hs]=o.useState(!1),B=te=>{},[V,Ce]=o.useState(null),[Ee,Oe]=o.useState("finby");o.useState(!1);const[xt,Dt]=o.useState(null),[ts,bs]=o.useState(null),[Tt,_t]=o.useState(!1),[Bt,Ts]=o.useState(0),[ps,Bs]=o.useState(0),[Xt,lr]=o.useState(!1),[Kt,Y]=o.useState([]),[qe,ct]=o.useState({show:!1,product:""}),[gt,ds]=o.useState({}),[ys,Na]=o.useState([]),[Ma,Ll]=o.useState(!1),[at,Ea]=o.useState(null),[zr,qa]=o.useState({}),[At,so]=o.useState(null),[fs,Bl]=o.useState([]),[Ul,ql]=o.useState("+447424750508"),[kn,$r]=o.useState(""),[sl,al]=o.useState(""),[Lr,Br]=o.useState("");o.useEffect(()=>{(async()=>{try{const[xe,Ie,Ge,De]=await Promise.all([fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_environment_value?key=whatsapp_phone",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}}),fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_environment_value?key=whatsapp_phone_tr",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}}),fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_environment_value?key=whatsapp_message",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}}),fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_environment_value?key=whatsapp_message_tr",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"}})]);if(xe.ok){const $e=await xe.json();$e.value&&ql($e.value)}if(Ie.ok){const $e=await Ie.json();$e.value&&$r($e.value)}if(Ge.ok){const $e=await Ge.json();$e.value&&al($e.value)}if(De.ok){const $e=await De.json();$e.value&&Br($e.value)}}catch{}})()},[]),o.useEffect(()=>{(async()=>{try{const xe=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_hero_content",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(xe.ok){const Ie=await xe.json();Ie.success&&Ie.data&&so(Ie.data),Ie.images&&Ie.images.length>0&&Bl(Ie.images)}}catch(xe){console.error("Error fetching hero content:",xe)}})()},[]),o.useEffect(()=>{(async()=>{try{const xe=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_sales_boost_settings",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(xe.ok){const Ie=await xe.json();if(Ie.success&&Ie.settings){const Ge={};
1106Ie.settings.forEach(De=>{Ge[De.setting_key]={is_enabled:De.is_enabled,setting_value:De.setting_value}}),qa(Ge)}}}catch(xe){console.error("Error fetching sales boost settings:",xe)}})()},[]),o.useEffect(()=>{j||g(f)},[f,g,j]),o.useEffect(()=>{const te=()=>{y(Jf())};return window.addEventListener("popstate",te),()=>window.removeEventListener("popstate",te)},[]),o.useEffect(()=>{const xe={home:"https://follx.com/",pricing:"https://follx.com/pricing",terms:"https://follx.com/terms",privacy:"https://follx.com/privacy",refund:"https://follx.com/refund",blog:"https://follx.com/blog",affiliate:"https://follx.com/affiliate",reseller:"https://follx.com/1234",landing:"https://follx.com/","paypal-demo":"https://follx.com/",admin:"https://follx.com/follxadmin","seo-usa":"https://follx.com/buy-instagram-followers-usa","seo-real":"https://follx.com/real-instagram-followers","seo-cheap":"https://follx.com/cheap-instagram-followers","seo-growth":"https://follx.com/instagram-growth-service","seo-nopassword":"https://follx.com/buy-instagram-followers-no-password","seo-buzzoid":"https://follx.com/buzzoid-vs-follx","seo-stormlikes":"https://follx.com/stormlikes-vs-follx","seo-alternatives":"https://follx.com/best-instagram-growth-service-alternatives","seo-ig-followers":"https://follx.com/buy-ig-followers","seo-buy-followers":"https://follx.com/buy-followers","seo-buy-instagram-followers":"https://follx.com/buy-instagram-followers","seo-buy-instagram-likes":"https://follx.com/buy-instagram-likes","seo-buy-instagram-views":"https://follx.com/buy-instagram-views","seo-buy-tiktok-followers":"https://follx.com/buy-tiktok-followers","seo-buy-youtube-subscribers":"https://follx.com/buy-youtube-subscribers","seo-buy-twitter-followers":"https://follx.com/buy-twitter-followers","seo-smm-panel-api":"https://follx.com/smm-panel-api","seo-smm-panel-reseller":"https://follx.com/smm-panel-reseller","seo-cheap-smm-panel":"https://follx.com/cheap-smm-panel","seo-best-smm-panel":"https://follx.com/best-smm-panel"}[f]||"https://follx.com/";let Ie=document.querySelector('link[rel="canonical"]');Ie?Ie.href=xe:(Ie=document.createElement("link"),Ie.rel="canonical",Ie.href=xe,document.head.appendChild(Ie))},[f]),o.useEffect(()=>{if((()=>{const Ie=window.location.hash,Ge=new URLSearchParams(window.location.search),De=new URLSearchParams(Ie.substring(1));return Ie.includes("access_token")||Ie.includes("error")||Ge.has("code")||Ge.has("error")||De.has("access_token")||De.has("refresh_token")})()&&sessionStorage.setItem("oauth_return","true"),Lp("pendingCheckout"))try{sessionStorage.setItem("oauth_return","true")}catch{}},[]),o.useEffect(()=>{const te=u?{platform:(p==null?void 0:p.platform)||"",service_type:k||"",package_name:u.name||`${u.quantity} ${k}`}:void 0;ft?w("lucky_spin"):Te?w("dashboard"):ce?w("support"):f==="reseller"?w("smm_panel"):j?U?w("bank_transfer",te):ue?w("crypto_payment",te):C==="checkout"?w("profile_verification",te):C==="auth"?w("signing_up",te):C==="payment"?w("checkout",te):C==="package"?w("selecting_package",te):w("browsing"):w(f==="home"||f==="/"?"ana_sayfa":"browsing"),j||N("platform","service_type","package_name")},[ft,Te,ce,j,C,U,ue,f,u,w,N]),o.useEffect(()=>{if(!xt)return;let te=null;try{te=new URL(xt).origin}catch{}const xe=async Ie=>{if(te&&Ie.origin!==te)return;const Ge=Ie.data;if(!Ge)return;const De=Ge.status==="success"||Ge.status==="completed"||Ge.statusCode===6||Ge.type==="payment_success"||Ge.event==="payment_success",$e=Ge.status==="failed"||Ge.status==="error"||Ge.statusCode===7||Ge.statusCode===8||Ge.statusCode===9||Ge.type==="payment_failed"||Ge.event==="payment_failed";De&&ts?(Dt(null),S("success"),R(ts),bs(null),fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/glodipay_verify_payment",{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"},body:JSON.stringify({orderId:ts})}).catch(()=>{})):$e&&(Dt(null),bs(null),m(a("checkout.payment_failed_retry"),{type:"error"}))};return window.addEventListener("message",xe),()=>window.removeEventListener("message",xe)},[xt,ts]),o.useEffect(()=>{const te=new URLSearchParams(window.location.search),xe=te.get("order_id");if(!xe||!xe.startsWith("FNB-"))return;const Ie=te.get("ResultCode")??te.get("resultCode")??te.get("resultcode"),Ge=te.get("error")==="1",De=te.get("cancelled")==="1";window.history.replaceState({},"","/");const $e="https://kdqsajuhvcmxsnttdetg.supabase.co",Ke="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc";if(Ge||De){fetch(`${$e}/functions/v1/finby_verify_payment`,{method:"POST",headers:{Authorization:`Bearer ${Ke}`,"Content-Type":"application/json"},body:JSON.stringify({orderId:xe,failed:!0})}).catch(()=>{}),m(a("checkout.payment_failed"),{type:"error"});return}R(xe),b(!0),fetch(`${$e}/functions/v1/finby_verify_payment`,{method:"POST",headers:{Authorization:`Bearer ${Ke}`,"Content-Type":"application/json"},body:JSON.stringify({orderId:xe,resultCode:Ie??void 0})}).then(et=>et.json()).then(et=>{et!=null&&et.success||(et==null?void 0:et.status)==="completed"||(et==null?void 0:et.status)==="pending"?S("success"):(m(a("checkout.payment_failed"),{type:"error"}),b(!1))}).catch(()=>{S("success")})},[]),o.useEffect(()=>{(async()=>{try{const xe=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_active_payment_methods_public",{headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc","Content-Type":"application/json"}});if(xe.ok){const Ie=await xe.json();if(Ea(Ie),Ie.success&&Ie.methods&&Ie.methods.length>0){const Ge=Ie.methods.some(Et=>Et.code==="stripe"),De=Ie.methods.some(Et=>Et.code==="paypal"),$e=Ie.methods.some(Et=>Et.code==="crypto"),Ke=Ie.methods.some(Et=>Et.code==="finby"),et=Ie.methods.some(Et=>Et.code==="payoup"),jt=Ie.methods.some(Et=>Et.code==="glodipay");Ke?Oe("finby"):Ge?Oe("stripe"):De?Oe("paypal"):et?Oe("payoup"):jt?Oe("glodipay"):$e?Oe("crypto"):Bt>0&&Oe("wallet")}}}catch(xe){console.error("Failed to fetch payment methods:",xe)}})()},[]),o.useEffect(()=>{(async()=>{try{const xe=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/get_packages");if(!xe.ok)return;const Ie=await xe.json(),Ge={Instagram:Za,Music2:$o,Twitter:yl},De={instagram:"from-pink-500 to-purple-600",tiktok:"from-black to-pink-600",twitter:"from-blue-400 to-blue-600"},$e=Ie.platforms.map(et=>({icon:Ge[et.icon]||Za,name:et.name,platform:et.name,color:De[et.slug]||"from-cyan-500 to-blue-600",colorFrom:et.color_from,colorTo:et.color_to,services:et.categories.map(jt=>jt.name),description:et.description,categories:et.categories,allowGuestPurchase:et.allow_guest_purchase!==!1})),Ke={};
1106Ie.platforms.forEach(et=>{Ke[et.name]={},et.categories.forEach(jt=>{Ke[et.name][jt.name]=jt.packages.map(Et=>({id:Et.id,quantity:Et.quantity,price:Et.price,originalPrice:Et.originalPrice,priceTry:Et.priceTry||null,originalPriceTry:Et.originalPriceTry||null,bestSeller:Et.isBestSeller,badgeText:Et.badgeText,providerServiceId:Et.providerServiceId,deliveryTime:Et.deliveryTime,quality:Et.quality,refillDays:Et.refillDays,linkPaymentEnabled:Et.linkPaymentEnabled||!1,linkPaymentUrl:Et.linkPaymentUrl||null,service_categories:{id:jt.id,name:jt.name,slug:jt.slug,input_type:jt.input_type,input_label:jt.input_label,input_placeholder:jt.input_placeholder,requires_post_verification:jt.requires_post_verification,requires_profile_verification:jt.requires_profile_verification,video_only:jt.video_only}}))})}),Na($e),ds(Ke),Ll(!0)}catch(xe){console.error("Error fetching packages:",xe),Ll(!0)}})()},[]),o.useEffect(()=>{sessionStorage.getItem("openDashboardAfterReload")==="true"&&sessionStorage.removeItem("openDashboardAfterReload")},[]),o.useEffect(()=>{var te,xe;if(t&&s){const Ie=Lp("pendingCheckout");let Ge=!1;try{Ge=sessionStorage.getItem("oauth_return")==="true"}catch{}if(Ie){try{const De=JSON.parse(Ie);if(!(Date.now()-De.timestamp>10*60*1e3)&&De.selectedPackage){E(De.selectedService),J(De.selectedServiceType),A(De.selectedPackage),ae(De.username),De.verifiedProfile&&re(De.verifiedProfile),De.verifiedPost&&se(De.verifiedPost),I(s.email),b(!0);const Ke=De.selectedPackage,et=(te=De.selectedService)==null?void 0:te.platform,jt=De.selectedServiceType;let Et=Ke==null?void 0:Ke.linkPaymentEnabled,xa=Ke==null?void 0:Ke.linkPaymentUrl;if(!Et&&et&&jt){const as=(((xe=gt[et])==null?void 0:xe[jt])||[]).find(Da=>Da.id===(Ke==null?void 0:Ke.id)||Da.quantity===(Ke==null?void 0:Ke.quantity)&&Math.abs(Da.price-(Ke==null?void 0:Ke.price))<.01);as!=null&&as.linkPaymentEnabled&&(Et=!0,xa=as.linkPaymentUrl,A(Da=>({...Da,linkPaymentEnabled:!0,linkPaymentUrl:as.linkPaymentUrl})))}S(Et&&xa?"link_payment":"payment")}}catch(De){console.error("Error restoring checkout state:",De)}tu("pendingCheckout");try{sessionStorage.removeItem("oauth_return")}catch{}}else if(Ge)try{sessionStorage.removeItem("oauth_return")}catch{}}},[t,s]),o.useEffect(()=>{t&&s&&C==="auth"&&(P||I(s.email),Rt())},[t,s,C]),o.useEffect(()=>{t&&s&&(C==="payment"||C==="checkout")&&((async()=>{var xe,Ie,Ge,De,$e;try{const{data:Ke,error:et}=await Ye.from("users").select("balance, refund_balance, gift_balance").eq("id",t.id).maybeSingle();if(!et&&Ke){const jt=parseFloat(((xe=Ke.balance)==null?void 0:xe.toString())||"0")||0,Et=parseFloat(((Ie=Ke.refund_balance)==null?void 0:Ie.toString())||"0")||0;Ts(jt+Et),Bs(parseFloat(((Ge=Ke.gift_balance)==null?void 0:Ge.toString())||"0")||0)}else Ts(parseFloat(s.balance.toString())||0),Bs(parseFloat(((De=s.gift_balance)==null?void 0:De.toString())||"0")||0)}catch{Ts(parseFloat(s.balance.toString())||0),Bs(parseFloat((($e=s.gift_balance)==null?void 0:$e.toString())||"0")||0)}})(),u&&(async()=>{var Ie;try{const De=(Ie=(await Ye.auth.getSession()).data.session)==null?void 0:Ie.access_token;if(!De)return;const Ke=await(await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/check_wallet_restrictions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${De}`,apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc"},body:JSON.stringify({cart:[{platform:u.platform,service_type:u.service_type}]})})).json();Ke.success&&Ke.restrictions?Y(Ke.restrictions):Y([])}catch{Y([])}})())},[t,s,C,u]),o.useEffect(()=>{C==="payment"&&!t&&(p==null?void 0:p.allowGuestPurchase)===!1&&S("auth")},[C,t,p]);const da=async()=>{if(!u||!t||!s)return;const te=u.price;if(Bt<te){m(a("checkout.insufficient_balance"),{type:"warning"});return}lr(!0);try{const{data:{session:xe}}=await Ye.auth.getSession();if(!xe)throw new Error("Not authenticated");const Ge=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/process_wallet_payment",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${xe.access_token}`},body:JSON.stringify({customerName:T,customerEmail:P||s.email,cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:te,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}]})});if(!Ge.ok){const $e=await Ge.json();if($e.error==="WALLET_RESTRICTED"){const Ke=$e.restricted_product?`${$e.restricted_product.platform} ${$e.restricted_product.service_type}`:`${u.platform} ${u.service_type}`;ct({show:!0,product:Ke});return}throw new Error($e.error||a("checkout.payment_processing_failed"))}const De=await Ge.json();R(De.orderNumber),S("success")}catch(xe){console.error("Wallet payment error:",xe),m(xe instanceof Error?xe.message:a("checkout.payment_processing_failed"),{type:"error"})}finally{lr(!1)}},rl=async()=>
1106{if(!u||!t||!s)return;const te=u.price;if(ps<te){m(a("checkout.insufficient_gift"),{type:"warning"});return}lr(!0);try{const{data:{session:xe}}=await Ye.auth.getSession();if(!xe)throw new Error("Not authenticated");const Ge=await fetch("https://kdqsajuhvcmxsnttdetg.supabase.co/functions/v1/process_wallet_payment",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${xe.access_token}`},body:JSON.stringify({customerName:T,customerEmail:P||s.email,paymentSource:"gift_balance",cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:te,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}]})});if(!Ge.ok){const $e=await Ge.json();throw new Error($e.error||a("checkout.payment_processing_failed"))}const De=await Ge.json();R(De.orderNumber),S("success")}catch(xe){console.error("Gift balance payment error:",xe),m(xe instanceof Error?xe.message:a("checkout.payment_processing_failed"),{type:"error"})}finally{lr(!1)}};if(f==="paypal-demo")return e.jsx(RN,{});if(f==="admin")return e.jsx(l4,{});if(f==="pricing")return e.jsx(n4,{});if(f==="terms")return e.jsx(i4,{});if(f==="privacy")return e.jsx(o4,{});if(f==="refund")return e.jsx(c4,{});if(f==="landing")return e.jsx(n3,{onGetStarted:()=>{window.history.pushState({},"","/"),y("home")}});if(f==="blog"){const xe=window.location.pathname.match(/^\/blog\/(.+)$/),Ie=xe?xe[1]:void 0;return e.jsx(U3,{onBack:()=>{window.history.pushState({},"","/"),y("home")},initialSlug:Ie})}if(f==="affiliate")return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-blue-50",children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 z-50",children:e.jsx(Wx,{})}),e.jsx(Ex,{onOpenDashboard:()=>it(),onOpenDashboardWallet:()=>{Me(!0)},onOpenSupport:()=>Le(!0),onOpenAddFunds:()=>{Me(!0)},onOpenSpinWheel:()=>pe(!0),onOpenMysteryBox:()=>{ot(!0),w("mystery_box")},onNavigateHome:()=>{window.history.pushState({},"","/"),y("home")}}),e.jsx("main",{className:"container mx-auto px-4 pb-4 pt-24 sm:pt-28",children:t?e.jsx(u6,{}):e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"bg-gradient-to-br from-blue-600 via-cyan-600 to-teal-500 rounded-3xl p-8 md:p-12 text-white mb-8 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmYiIGZpbGwtb3BhY2l0eT0iMC4xIj48cGF0aCBkPSJNMzYgMzRjMC0yLjIxLTEuNzktNC00LTRzLTQgMS43OS00IDQgMS43OSA0IDQgNCA0LTEuNzkgNC00eiIvPjwvZz48L2c+PC9zdmc+')] opacity-30"}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-14 h-14 bg-white/20 rounded-2xl flex items-center justify-center backdrop-blur-sm",children:e.jsx(mt,{className:"w-7 h-7"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold",children:a("affiliate.title")}),e.jsx("p",{className:"text-blue-100",children:a("affiliate.subtitle")})]})]}),e.jsx("p",{className:"text-lg text-blue-50 mb-8 max-w-2xl",children:a("affiliate.description")}),e.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-8",children:[e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-4 text-center",children:[e.jsx("p",{className:"text-3xl md:text-4xl font-bold",children:"20%"}),e.jsx("p",{className:"text-sm text-blue-100",children:a("affiliate.commission_rate")})]}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-4 text-center",children:[e.jsx("p",{className:"text-3xl md:text-4xl font-bold",children:"90"}),e.jsx("p",{className:"text-sm text-blue-100",children:a("affiliate.cookie_days")})]}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-4 text-center",children:[e.jsx("p",{className:"text-3xl md:text-4xl font-bold",children:"$50"}),e.jsx("p",{className:"text-sm text-blue-100",children:a("affiliate.min_payout")})]})]}),e.jsx("button",{onClick:()=>B(),className:"px-8 py-4 bg-white text-blue-600 font-bold rounded-xl hover:bg-blue-50 transition-all shadow-lg hover:shadow-xl transform hover:-translate-y-0.5",children:a("affiliate.apply_now")})]})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mb-8",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-slate-100",children:[e.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(tt,{className:"w-6 h-6 text-green-600"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-2",children:a("affiliate.high_commission")}),e.jsx("p",{className:"text-slate-600 text-sm",children:a("affiliate.high_commission_desc")})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-slate-100",children:[e.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(Ct,{className:"w-6 h-6 text-blue-600"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-2",children:a("affiliate.realtime_tracking")}),e.jsx("p",{className:"text-slate-600 text-sm",children:a("affiliate.realtime_tracking_desc")})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-slate-100",children:[e.jsx("div",{className:"w-12 h-12 bg-amber-100 rounded-xl flex items-center justify-center mb-4",children:e.jsx(kt,{className:"w-6 h-6 text-amber-600"})}),e.jsx("h3",{className:"text-lg font-bold text-slate-900 mb-2",children:a("affiliate.fast_payouts")}),e.jsx("p",{className:"text-slate-600 text-sm",children:a("affiliate.fast_payouts_desc")})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-lg border border-slate-100",children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-6",children:a("affiliate.how_it_works")}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 bg-blue-600 text-white rounded-full flex items-center justify-center text-xl font-bold mx-auto mb-3",children:"1"}),e.jsx("h4",{className:"font-semibold text-slate-900 mb-1",children:a("affiliate.step1_title")}),e.jsx("p",{className:"text-sm text-slate-500",children:a("affiliate.step1_desc")})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 bg-blue-600 text-white rounded-full flex items-center justify-center text-xl font-bold mx-auto mb-3",children:"2"}),e.jsx("h4",{className:"font-semibold text-slate-900 mb-1",children:a("affiliate.step2_title")}),e.jsx("p",{className:"text-sm text-slate-500",children:a("affiliate.step2_desc")})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 bg-blue-600 text-white rounded-full flex items-center justify-center text-xl font-bold mx-auto mb-3",children:"3"}),e.jsx("h4",{className:"font-semibold text-slate-900 mb-1",children:a("affiliate.step3_title")}),e.jsx("p",{className:"text-sm text-slate-500",children:a("affiliate.step3_desc")})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-12 h-12 bg-green-600 text-white rounded-full flex items-center justify-center text-xl font-bold mx-auto mb-3",children:"4"}),e.jsx("h4",{className:"font-semibold text-slate-900 mb-1",children:a("affiliate.step4_title")}),e.jsx("p",{className:"text-sm text-slate-500",children:a("affiliate.step4_desc")})]})]})]})]})}),Mt&&e.jsx(bf,{isOpen:Mt,onClose:()=>B()}),Te&&e.jsx(Rx,{isOpen:Te,onClose:()=>{Me(!1)},initialShowAddFunds:Fe,initialTab:ke}),ce&&e.jsx(Fx,{isOpen:ce,onClose:()=>Le(!1)}),ft&&e.jsx(zx,{onClose:()=>{pe(!1),window.location.reload()}}),dt&&e.jsx($x,{onClose:()=>{ot(!1),window.location.reload()}})]});if(f==="reseller"){const te=()=>{Me(!0)};return e.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-slate-50 via-white to-slate-50",children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 z-50",children:e.jsx(Wx,{})}),e.jsx(Ex,{onOpenDashboard:()=>it(),onOpenDashboardWallet:te,onOpenSupport:()=>Le(!0),onOpenAddFunds:te,onOpenSpinWheel:()=>pe(!0),onOpenMysteryBox:()=>{ot(!0),w("mystery_box")},onNavigateHome:()=>{window.history.pushState({},"","/"),y("home")}}),e.jsxs("main",{className:"relative overflow-x-hidden pt-[68px] sm:pt-[78px] md:pt-[88px] pb-10 sm:pb-16 px-3 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-50 via-blue-50 to-cyan-50 opacity-80"}),e.jsx("div",{className:"absolute top-1/4 left-0 w-96 h-96 bg-blue-200 rounded-full mix-blend-multiply filter blur-3xl op
1106acity-30 animate-float"}),e.jsx("div",{className:"absolute bottom-1/4 right-0 w-96 h-96 bg-cyan-200 rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-float",style:{animationDelay:"2s"}}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-gradient-to-r from-blue-100 to-teal-100 rounded-full mix-blend-multiply filter blur-3xl opacity-20"}),e.jsx("div",{className:"max-w-7xl mx-auto relative",children:e.jsxs("div",{className:"text-center mb-2 sm:mb-6",children:[e.jsxs("div",{className:"inline-flex items-center space-x-1.5 sm:space-x-2 bg-gradient-to-r from-blue-600/10 to-cyan-500/10 backdrop-blur-sm px-3 sm:px-5 py-1.5 sm:py-2 rounded-full shadow-lg mb-2 sm:mb-3 border border-blue-200/50 animate-bounce-slow",children:[e.jsxs("div",{className:"relative",children:[e.jsx(tt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),e.jsx("div",{className:"absolute inset-0 animate-ping",children:e.jsx(tt,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600 opacity-50"})})]}),e.jsx("span",{className:"text-xs sm:text-sm font-bold bg-gradient-to-r from-blue-600 via-cyan-500 to-blue-600 bg-clip-text text-transparent bg-[length:200%_auto] animate-gradient",children:At!=null&&At.badge_text?nr(At.badge_text):a("platform.premium_services")})]}),e.jsxs("h1",{className:"relative text-2xl sm:text-4xl md:text-5xl lg:text-7xl font-extrabold tracking-tight mb-2 sm:mb-4 hidden sm:block",children:[e.jsxs("span",{className:"relative inline-block",children:[e.jsx("span",{className:"absolute -inset-1 blur-2xl bg-gradient-to-r from-blue-600/30 via-cyan-500/30 to-teal-500/30 rounded-lg"}),e.jsx("span",{className:"relative text-slate-900",children:a("platform.smm_hero_title")})]}),e.jsx("br",{}),e.jsxs("span",{className:"relative inline-block mt-1 sm:mt-2",children:[e.jsx("span",{className:"absolute -inset-1 blur-xl bg-gradient-to-r from-cyan-500/40 via-blue-500/40 to-teal-500/40 rounded-lg animate-pulse"}),e.jsx("span",{className:"relative bg-gradient-to-r from-cyan-500 via-teal-400 to-cyan-400 bg-clip-text text-transparent",children:a("platform.smm_hero_subtitle")})]})]}),e.jsx("p",{className:"text-slate-500 text-sm sm:text-lg md:text-xl max-w-2xl mx-auto mb-2 sm:mb-3 px-2 sm:px-0 hidden sm:block",children:a("storefront.hero_desc")}),fs.length>0&&x!=="TR"&&e.jsx("div",{className:"mt-2 mb-2 flex items-center justify-center gap-4 flex-wrap",children:fs.map(xe=>{const Ie=e.jsx("img",{src:xe.image_url,alt:xe.alt_text||"Hero image",style:{width:xe.width,height:xe.height,objectFit:"cover"},className:"rounded-2xl shadow-2xl hover:scale-105 transition-transform duration-300"},xe.id);return xe.link_url?e.jsx("a",{href:xe.link_url,target:"_blank",rel:"noopener noreferrer",children:Ie},xe.id):Ie})}),e.jsx("div",{className:"flex items-center justify-center gap-1.5 sm:gap-3 md:gap-4 mt-2 sm:mt-3",children:((At==null?void 0:At.show_trust_badges)!==!1?(At==null?void 0:At.badge_items)||[{icon:"Check",text:a("home.no_password")},{icon:"Zap",text:a("home.instant_delivery")},{icon:"Users",text:a("home.high_quality")}]:[]).map((xe,Ie)=>{const Ge=["text-emerald-500","text-amber-500","text-rose-500","text-blue-500","text-cyan-500"],De=["bg-emerald-50","bg-amber-50","bg-rose-50","bg-blue-50","bg-cyan-50"],$e=Ge[Ie%Ge.length],Ke=De[Ie%De.length],et={Zap:rt,Users:mt,Headphones:Kn,Shield:lt,Star:Zt,Check:Lt,Clock:Ze,Award:qs,Heart:ia,TrendingUp:tt}[xe.icon]||Lt;return e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2 px-1.5 sm:px-4 py-0.5 sm:py-2.5 rounded-full bg-white border border-slate-200 shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:`w-3.5 h-3.5 sm:w-6 sm:h-6 rounded-full ${Ke} flex items-center justify-center flex-shrink-0`,children:e.jsx(et,{className:`w-2 h-2 sm:w-3.5 sm:h-3.5 ${$e}`})}),e.jsx("span",{className:"text-[9px] sm:text-sm font-medium text-slate-700 whitespace-nowrap",children:nr(xe.text)})]},Ie)})}),e.jsx("div",{className:"mt-2 sm:mt-4 flex flex-col items-center",children:e.jsxs("div",{className:"bg-white/80 rounded-2xl px-4 sm:px-6 py-3 sm:py-4 shadow-lg border border-slate-200 backdrop-blur-xl",children:[e.jsx("div",{className:"flex items-center justify-center mb-2 sm:mb-3",children:e.jsx("div",{className:"flex -sp
1106ace-x-2 sm:-space-x-3",children:[{src:"/1.jpg",ring:"ring-emerald-500/30",badge:"bg-emerald-500"},{src:"/2.jpg",ring:"ring-blue-500/30",badge:"bg-blue-500"},{src:"/3.jpg",ring:"ring-pink-500/30",badge:"bg-pink-500"},{src:"/4.jpg",ring:"ring-amber-500/30",badge:"bg-amber-500"},{src:"/6.jpg",ring:"ring-cyan-500/30",badge:"bg-cyan-500"},{src:"/658299643_18045022793758637_6570897496028279873_n.jpg",ring:"ring-rose-500/30",badge:"bg-rose-500"},{src:"/5.jpg",ring:"ring-violet-500/30",badge:"bg-violet-500"},{src:"/572788888_18538334263009054_604317892251926546_n.jpg",ring:"ring-teal-500/30",badge:"bg-teal-500"},{src:"/629903757_18560101549040963_6085054672349400730_n.jpg",ring:"ring-orange-500/30",badge:"bg-orange-500"},{src:"/656294835_18054512666709688_533543798225723777_n.jpg",ring:"ring-sky-500/30",badge:"bg-sky-500"}].map((xe,Ie)=>e.jsxs("div",{className:"relative group",children:[e.jsx("img",{src:xe.src,alt:"Creator",className:`w-8 h-8 sm:w-11 sm:h-11 rounded-full border-2 border-white object-cover ring-2 ${xe.ring} transition-transform group-hover:scale-110 group-hover:z-10`}),e.jsx("div",{className:`absolute -bottom-0.5 -right-0.5 sm:-bottom-1 sm:-right-1 w-3 h-3 sm:w-4 sm:h-4 ${xe.badge} rounded-full border-2 border-white flex items-center justify-center`,children:e.jsx(Lt,{className:"w-2 h-2 sm:w-2.5 sm:h-2.5 text-white"})})]},Ie))})}),e.jsxs("div",{className:"flex items-center justify-center gap-2 sm:gap-3 flex-nowrap",children:[e.jsxs("div",{className:"flex items-center gap-1 sm:gap-1.5 shrink-0",children:[e.jsxs("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),e.jsx("span",{className:"text-slate-800 font-bold text-base sm:text-lg",children:"4.98"})]}),e.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4,5].map(xe=>e.jsx(Zt,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-yellow-400 fill-yellow-400"},xe))}),e.jsx("span",{className:"text-slate-400 text-xs sm:text-sm whitespace-nowrap",children:a("checkout.from_reviews").replace("{count}","15485")})]})]})})]})}),e.jsx("div",{className:"max-w-7xl mx-auto relative",children:t?e.jsx(Gf,{onOpenWallet:te}):e.jsx(Gf,{onOpenWallet:te,isGuest:!0,onAuthRequired:()=>B()})})]}),e.jsx(ua,{children:e.jsx(zf,{featured:!0,limit:6})}),e.jsx(ua,{children:e.jsx("section",{className:"py-20 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:a("reseller.services_title")}),e.jsx("p",{className:"text-slate-600 text-lg max-w-3xl mx-auto",children:a("reseller.services_desc")})]}),e.jsxs("div",{className:"space-y-10",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg transition-shadow duration-300",children:[e.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-3 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-100 to-pink-100 rounded-lg flex items-center justify-center",children:e.jsx(mt,{className:"w-5 h-5 text-rose-600"})}),a("reseller.ig_followers_title")]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-2",children:a("reseller.ig_followers_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:a("reseller.ig_followers_p2")})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg transition-shadow duration-300",children:[e.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-3 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-red-100 to-orange-100 rounded-lg flex items-center justify-center",children:e.jsx(ia,{className:"w-5 h-5 text-red-500"})}),a("reseller.ig_likes_title")]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-2",children:a("reseller.ig_likes_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:a("reseller.ig_likes_p2")})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg transition-shadow duration-300",children:[e.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-3 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-sky-100 to-blue-100 rounded-lg flex items-center justify-center",children:e.jsx(Ct,{className:"w-5 h-5 text-sky-600"})}),a("reseller.ig_views_title")]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-2",children:a("reseller.ig_views_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:a("reseller.ig_views_p2")})]})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg transition-shadow duration-300",children:[e.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-3 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-teal-100 to-cyan-100 rounded-lg flex items-center justify-center",children:e.jsx(rt,{className:"w-5 h-5 text-teal-600"})}),a("reseller.tiktok_title")]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-2",children:a("reseller.tiktok_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:a("reseller.tiktok_p2")})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg transition-shadow duration-300",children:[e.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-3 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-red-100 to-rose-100 rounded-lg flex items-center justify-center",children:e.jsx(wt,{className:"w-5 h-5 text-red-600"})}),a("reseller.youtube_title")]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-2",children:a("reseller.youtube_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:a("reseller.youtube_p2")})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg transition-shadow duration-300",children:[e.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-3 flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-100 to-sky-100 rounded-lg flex items-center justify-center",children:e.jsx(Ia,{className:"w-5 h-5 text-blue-500"})}),a("reseller.twitter_title")]}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-2",children:a("reseller.twitter_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:a("reseller.twitter_p2")})]})]})]})]})})}),e.jsx(ua,{children:e.jsx("section",{className:"py-20 bg-gradient-to-br from-slate-50 to-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:a("smm.infra_title")}),e.jsx("p",{className:"text-slate-600 text-lg max-w-3xl mx-auto",children:a("smm.infra_desc")})]}),e.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl p-8 hover:shadow-xl transition-all duration-300 relative overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-emerald-500 to-teal-500"}),e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-emerald-100 to-teal-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(Os,{className:"w-6 h-6 text-emerald-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("smm.api_detail_title")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:a("smm.api_detail_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("smm.api_detail_p2")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("span",{className:"text-xs px-3 py-1.5 bg-emerald-50 text-emerald-700 rounded-full font-medium",children:a("smm.tag_rest_api")}),e.jsx("span",{className:"text-xs px-3 py-1.5 bg-emerald-50 text-emerald-700 rounded-full font-medium",children:a("smm.tag_auto_processing")}),e.jsx("span",{className:"text-xs px-3 py-1.5 bg-emerald-50 text-emerald-700 rounded-full font-medium",children:a("smm.tag_callbacks")})]})]}),e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl p-8 hover:shadow-xl transition-all duration-300 relative overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-blue-500 to-cyan-500"}),e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-100 to-cyan-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(Jt,{className:"w-6 h-6 text-blue-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("smm.cheap_detail_title")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:a("smm.cheap_detail_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("smm.cheap_detail_p2")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("span",{className:"text-xs px-3 py-1.5 bg-blue-50 text-blue-700 rounded-full font-medium",children:a("smm.tag_wholesale")}),e.jsx("span",{className:"text-xs px-3 py-1.5 bg-blue-50 text-blue-700 rounded-full font-medium",children:a("smm.tag_volume")}),e.jsx("span",{className:"text-xs px-3 py-1.5 bg-blue-50 text-blue-700 rounded-full font-medium",children:a("smm.tag_low_cost")})]})]}),e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl p-8 hover:shadow-xl transition-all duration-300 relative overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-amber-500 to-orange-500"}),e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-amber-100 to-orange-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(Ta,{className:"w-6 h-6 text-amber-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("smm.best_detail_title")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-3",children:a("smm.best_detail_p1")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("smm.best_detail_p2")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("span",{className:"text-xs px-3 py-1.5 bg-amber-50 text-amber-700 rounded-full font-medium",children:a("smm.tag_white_label")}),e.jsx("span",{className:"text-xs px-3 py-1.5 bg-amber-50 text-amber-700 rounded-full font-medium",children:a("smm.tag_uptime")}),e.jsx("span",{className:"text-xs px-3 py-1.5 bg-amber-50 text-amber-700 rounded-full font-medium",children:a("smm.tag_services")})]})]})]})]})})}),e.jsx(ua,{children:e.jsx(Of,{limit:8})}),e.jsx(ua,{children:e.jsx($f,{})}),e.jsx(ua,{children:e.jsx("section",{className:"py-16 bg-gradient-to-br from-blue-600 via-cyan-600 to-teal-600 text-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold mb-4",children:"Read Our Blog"}),e.jsx("p",{className:"text-blue-100 text-lg mb-8 max-w-2xl mx-auto",children:"Get expert tips and guides on how to grow your social media presence safely and effectively."}),e.jsx("button",{onClick:()=>{window.history.pushState({},"","/blog"),y("blog")},className:"bg-white text-blue-600 px-8 py-4 rounded-xl font-semibold hover:bg-blue-50 transition-colors shadow-lg",children:a("home.visit_blog")})]})})}),e.jsx(ua,{children:e.jsx("footer",{className:"bg-slate-900 text-white py-16 px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-5 ga
1106p-8 mb-12",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-3xl font-bold bg-gradient-to-r from-blue-400 to-cyan-400 bg-clip-text text-transparent mb-4",children:a("footer.brand")}),e.jsx("p",{className:"text-slate-400 mb-6 leading-relaxed",children:a("footer.brand_desc")}),e.jsxs("div",{className:"flex items-center space-x-2 bg-green-500/10 border border-green-500/20 px-4 py-3 rounded-lg",children:[e.jsx(lt,{className:"w-5 h-5 text-green-400"}),e.jsx("span",{className:"text-green-400 font-semibold",children:a("footer.money_back")})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-lg mb-4",children:a("footer.buy_followers")}),e.jsxs("ul",{className:"space-y-2 text-slate-400",children:[e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition",children:a("footer.buy_instagram")})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition",children:a("footer.buy_tiktok")})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition",children:a("footer.buy_
1106youtube")})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition",children:a("footer.buy_likes_views")})})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-lg mb-4",children:a("footer.resources")}),e.jsxs("ul",{className:"space-y-2 text-slate-400",children:[e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition",children:a("footer.blog_guides")})}),e.jsx("li",{children:e.jsx("a",{href:"#faq",className:"hover:text-white transition",children:a("faq.title")})}),e.jsx("li",{children:e.jsx("a",{href:"#reviews",className:"hover:text-white transition",children:a("footer.customer_reviews")})}),e.jsx("li",{children:e.jsx("button",{onClick:()=>Ce("contact"),className:"hover:text-white transition",children:a("footer.contact_us")})})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-lg mb-4",children:a("footer.legal")}),e.jsxs("ul",{className:"space-y-2 text-slate-400",children:[e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition",children:"Terms of Service"})}),e.jsx("li",{children:e.jsx("a",{href:"/privacy-policy",className:"hover:text-white transition",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx("a",{href:"/refund-policy",className:"hover:text-white transition",children:"Refund Policy"})})]})]})]}),e.jsxs("div",{className:"border-t border-slate-800 pt-8",children:[e.jsx("div",{className:"flex flex-col items-center gap-4 mb-8",children:e.jsxs("div",{className:"flex items-center gap-2 text-slate-300",children:[e.jsx(gs,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:a("footer.contact_label")}),e.jsx("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:text-blue-300 transition",children:"[email protected]"})]})}),e.jsx("p",{className:"text-slate-500 text-sm mb-6 text-center max-w-4xl mx-auto",children:a("footer.seo_desc")}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsx("p",{className:"text-slate-400 text-sm",children:a("footer.copyright")}),e.jsxs("div",{className:"flex items-center gap-6 text-sm text-slate-400",children:[e.jsx("a",{href:"/terms",className:"hover:text-white transition",children:"Terms"}),e.jsx("a",{href:"/privacy-policy",className:"hover:text-white transition",children:"Privacy"}),e.jsx("a",{href:"/refund-policy",className:"hover:text-white transition",children:"Refund"})]}),e.jsx("div",{className:"flex items-center space-x-6",children:e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-slate-400",children:[e.jsx($t,{className:"w-4 h-4"}),e.jsx("span",{children:a("footer.ssl_encrypted")})]})})]})]})]})})}),e.jsx(vf,{activePage:V,onClose:()=>Ce(null)}),Mt&&e.jsx(bf,{isOpen:Mt,onClose:()=>B()}),Te&&e.jsx(Rx,{isOpen:Te,onClose:()=>{Me(!1)},initialShowAddFunds:Fe,initialTab:ke}),ce&&e.jsx(Fx,{isOpen:ce,onClose:()=>Le(!1)}),ft&&e.jsx(zx,{onClose:()=>{pe(!1),window.location.reload()}}),dt&&e.jsx($x,{onClose:()=>{ot(!1),window.location.reload()}})]})}const ms=()=>{window.history.pushState({},"","/"),y("home")};if(f==="seo-usa")return e.jsx(T6,{onGetStarted:ms});if(f==="seo-real")return e.jsx(P6,{onGetStarted:ms});if(f==="seo-cheap")return e.jsx(A6,{onGetStarted:ms});if(f==="seo-growth")return e.jsx(M6,{onGetStarted:ms});if(f==="seo-nopassword")return e.jsx(E6,{onGetStarted:ms});if(f==="seo-buzzoid")return e.jsx(D6,{onGetStarted:ms});if(f==="seo-stormlikes")return e.jsx(R6,{onGetStarted:ms});if(f==="seo-alternatives")return e.jsx(F6,{onGetStarted:ms});if(f==="seo-ig-followers")return e.jsx(O6,{onGetStarted:ms});if(f==="seo-buy-followers")return e.jsx(z6,{onGetStarted:ms});if(f==="seo-buy-instagram-followers")return e.jsx($6,{onGetStarted:ms});if(f==="seo-buy-instagram-likes")return e.jsx(L6,{onGetStarted:ms});if(f==="seo-buy-instagram-views")return e.jsx(B6,{onGetStarted:ms});if(f==="seo-buy-tiktok-followers")return e.jsx(U6,{onGetStarted:ms});if(f==="seo-buy-youtube-subscribers")return e.jsx(q6,{onGetStarted:ms});if(f==="seo-buy-twitter-followers")return e.jsx(G6,{onGetStarted:ms});if(f==="seo-smm-panel-api")return e.jsx(J6,{onGetStarted:ms});if(f==="seo-smm-panel-reseller")return e.jsx(W6,{onGetStarted:ms});if(f==="seo-cheap-smm-panel")return e.jsx(H6,{onGetStarted:ms});if(f==="seo-best-smm-panel")return e.jsx(V6,{onGetStarted:ms});const yr=[{icon:Za,name:"Instagram",color:"from-pink-500 to-purple-600",services:["Followers","Likes","Views"],description:"Boost your Instagram presence with real, engaged followers"},{icon:$o,name:"TikTok",color:"from-black to-pink-600",services:["Followers","Likes","Views"],description:"Grow your TikTok account and reach millions of viewers"},{icon:yl,name:"X (Twitter)",color:"from-blue-400 to-blue-600",services:["Followers","Likes","Retweets"],description:"Expand your reach on X with authentic engagement"}],Gl=ys.length>0?ys:yr,jr=[{icon:rt,title:a("features.instant_delivery"),description:a("features.instant_delivery_desc")},{icon:lt,title:a("features.secure"),description:a("features.secure_desc")},{icon:qs,title:a("features.premium_quality"),description:a("features.premium_quality_desc")},{icon:Ze,title:a("features.support_247"),description:a("features.support_247_desc")}],ll=[{label:a("stats.happy_customers"),value:500,suffix:"K+"},{label:a("stats.orders_delivered"),value:2,suffix:"M+"},{label:a("stats.satisfaction"),value:99,suffix:"%"},{label:a("stats.years_business"),value:12,suffix:"+"}],_n={Instagram:{Followers:[{quantity:100,price:2.99,originalPrice
1106:3.99,deliveryTime:"0-24 hours",quality:"high",refillDays:30},{quantity:250,price:5.99,originalPrice:7.99,deliveryTime:"0-24 hours",quality:"high",refillDays:30},{quantity:500,price:9.99,originalPrice:12.99,bestSeller:!0,deliveryTime:"0-24 hours",quality:"high",refillDays:30},{quantity:1e3,price:17.99,originalPrice:22.99,deliveryTime:"0-48 hours",quality:"high",refillDays:30},{quantity:2500,price:39.99,originalPrice:49.99,deliveryTime:"1-3 days",quality:"high",refillDays:30},{quantity:5e3,price:69.99,originalPrice:89.99,deliveryTime:"2-5 days",quality:"high",refillDays:30},{quantity:1e4,price:129.99,originalPrice:159.99,deliveryTime:"3-7 days",quality:"high",refillDays:30}],Likes:[{quantity:100,price:1.99,originalPrice:2.99,deliveryTime:"0-1 hour",quality:"high",refillDays:0},{quantity:250,price:3.99,originalPrice:5.99,deliveryTime:"0-1 hour",quality:"high",refillDays:0},{quantity:500,price:6.99,originalPrice:9.99,bestSeller:!0,deliveryTime:"0-2 hours",quality:"high",refillDays:0},{quantity:1e3,price:11.99,originalPrice:15.99,deliveryTime:"0-4 hours",quality:"high",refillDays:0},{quantity:2500,price:24.99,originalPrice:32.99,deliveryTime:"0-12 hours",quality:"high",refillDays:0},{quantity:5e3,price:44.99,originalPrice:59.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0}],Views:[{quantity:1e3,price:2.99,originalPrice:3.99,deliveryTime:"0-1 hour",quality:"high",refillDays:0},{quantity:5e3,price:11.99,originalPrice:15.99,bestSeller:!0,deliveryTime:"0-2 hours",quality:"high",refillDays:0},{quantity:1e4,price:19.99,originalPrice:25.99,deliveryTime:"0-4 hours",quality:"high",refillDays:0},{quantity:25e3,price:39.99,originalPrice:52.99,deliveryTime:"0-12 hours",quality:"high",refillDays:0},{quantity:5e4,price:69.99,originalPrice:89.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:1e5,price:119.99,originalPrice:149.99,deliveryTime:"1-2 days",quality:"high",refillDays:0}]},TikTok:{Followers:[{quantity:100,price:3.99,originalPrice:5.99,deliveryTime:"0-24 hours",quality:"high",refillDays:30},{quantity:250,price:7.99,originalPrice:10.99,deliveryTime:"0-24 hours",quality:"high",refillDays:30},{quantity:500,price:12.99,originalPrice:17.99,bestSeller:!0,deliveryTime:"0-48 hours",quality:"high",refillDays:30},{quantity:1e3,price:22.99,originalPrice:29.99,deliveryTime:"1-3 days",quality:"high",refillDays:30},{quantity:2500,price:49.99,originalPrice:64.99,deliveryTime:"2-5 days",quality:"high",refillDays:30},{quantity:5e3,price:89.99,originalPrice:114.99,deliveryTime:"3-7 days",quality:"high",refillDays:30}],Likes:[{quantity:100,price:2.49,originalPrice:3.99,deliveryTime:"0-1 hour",quality:"high",refillDays:0},{quantity:250,price:4.99,originalPrice:7.49,deliveryTime:"0-2 hours",quality:"high",refillDays:0},{quantity:500,price:8.99,originalPrice:12.99,bestSeller:!0,deliveryTime:"0-4 hours",quality:"high",refillDays:0},{quantity:1e3,price:14.99,originalPrice:19.99,deliveryTime:"0-12 hours",quality:"high",refillDays:0},{quantity:2500,price:32.99,originalPrice:44.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:5e3,price:59.99,originalPrice:79.99,deliveryTime:"1-2 days",quality:"high",refillDays:0}],Views:[{quantity:1e3,price:2.99,originalPrice:3.99,deliveryTime:"0-1 hour",quality:"high",refillDays:0},{quantity:5e3,price:11.99,originalPrice:15.99,bestSeller:!0,deliveryTime:"0-2 hours",quality:"high",refillDays:0},{quantity:1e4,price:19.99,originalPrice:25.99,deliveryTime:"0-4 hours",quality:"high",refillDays:0},{quantity:25e3,price:39.99,originalPrice:52.99,deliveryTime:"0-12 hours",quality:"high",refillDays:0},{quantity:5e4,price:69.99,originalPrice:89.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:1e5,price:119.99,originalPrice:149.99,deliveryTime:"1-2 days",quality:"high",refillDays:0}]},"X (Twitter)":{Followers:[{quantity:100,price:2.99,originalPrice:3.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:250,price:5.99,originalPrice:7.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:500,price:9.99,originalPrice:12.99,bestSeller:!0,deliveryTime:"0-24 hours",quality:"high",refillDays:0}
1106,{quantity:1e3,price:17.99,originalPrice:22.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:2500,price:39.99,originalPrice:49.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0}],Likes:[{quantity:100,price:2.99,originalPrice:3.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:250,price:5.99,originalPrice:7.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:500,price:9.99,originalPrice:12.99,bestSeller:!0,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:1e3,price:17.99,originalPrice:22.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:2500,price:39.99,originalPrice:49.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0}],Retweets:[{quantity:100,price:2.99,originalPrice:3.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:250,price:5.99,originalPrice:7.99,bestSeller:!0,deliveryTime:"0-24 hours",quality:"high",refillDays:0},{quantity:500,price:9.99,originalPrice:12.99,deliveryTime:"0-24 hours",quality:"high",refillDays:0}]}},Sn=Object.keys(gt).length>0?gt:_n,Cn=(te,xe)=>{var Ke,et;const Ie=te.platformName||"Instagram",Ge=Gl.find(jt=>jt.name===Ie),De=Gl.find(jt=>jt.name==="Instagram"),$e=Ge||De;if($e){const jt=te.categoryName||xe,xa=(((Ke=gt[Ie])==null?void 0:Ke[jt])||((et=gt[Ie])==null?void 0:et[xe])||[]).find(Xs=>Xs.quantity===te.quantity&&Math.abs(Xs.price-te.price)<.01);E({platform:Ie,icon:$e.icon,color:$e.color||"from-pink-500 to-purple-600",services:$e.services,allowGuestPurchase:$e.allowGuestPurchase!==!1}),J(jt),A(xa?{...te,...xa}:te),S("checkout"),b(!0)}},vr=()=>{b(!1),S("service"),J(""),A(null),ae(""),Q(""),M(""),re(null),se(null),$(null),be(null),de(null),me(null),Ae(null),D(null),fe(null),_e(null),ve(null),setTimeout(()=>E(null),300)},nl=()=>{b(!1),S("service"),J(""),A(null),ae(""),Q(""),M(""),re(null),se(null),$(null),be(null),de(null),me(null),Ae(null),D(null),fe(null),_e(null),ve(null),E(null),sessionStorage.setItem("openDashboardAfterReload","true"),window.location.reload()},Ga=te=>te.toLocaleString("en-US"),la=(p==null?void 0:p.allowGuestPurchase)===!1,Ur=!t&&!la,Ue=.5,G=te=>Math.round(te/Ue*100)/100,le=te=>te,Be=te=>{J(te),S("package")},He=te=>{A(te),S("checkout")},bt=()=>{var te,xe;if(xt){Dt(null),bs(null);return}if(U){(te=je.current)!=null&&te.hasSelectedRegion()?je.current.goBackToRegions():oe(!1);return}if(ue){(xe=q.current)!=null&&xe.hasSelectedWallet()?q.current.goBackToWallets():K(!1);return}C==="link_payment"?S("auth"):C==="payment"?S(Ur?"checkout":"auth"):C==="auth"?S("checkout"):C==="checkout"?X||we||Se||ie||Pe?(re(null),se(null),$(null),be(null),de(null),me(null),Ae(null),D(null),fe(null),_e(null),ve(null),ae(""),oe(!1),K(!1)):(S("package"),A(null)):C==="package"&&(S("service"),J(""))},Rt=async te=>{var De,$e;const xe=T;let Ie=u==null?void 0:u.linkPaymentEnabled,Ge=u==null?void 0:u.linkPaymentUrl;if(!Ie&&u&&p){const et=(((De=gt[p.platform])==null?void 0:De[k])||[]).find(jt=>jt.id===u.id||jt.quantity===u.quantity&&Math.abs(jt.price-u.price)<.01);et&&(Ie=et.linkPaymentEnabled,Ge=et.linkPaymentUrl,Ie&&A(jt=>({...jt,linkPaymentEnabled:!0,linkPaymentUrl:Ge})))}if(Ie&&Ge)try{const Ke="https://kdqsajuhvcmxsnttdetg.supabase.co",{supabase:et}=await _s(async()=>{const{supabase:as}=await Promise.resolve().then(()=>rn);return{supabase:as}},void 0),{data:{session:jt}}=await et.auth.getSession(),Et=(jt==null?void 0:jt.access_token)||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Xs=await(await fetch(`${Ke}/functions/v1/create_link_payment`,{method:"POST",headers:{Authorization:`Bearer ${Et}`,"Content-Type":"application/json"},body:JSON.stringify({packageId:u.id,username:xe,link:xe,...!(jt!=null&&jt.access_token)&&{guestEmail:P||void 0,guestName:Z||void 0}})})).json();Xs.success&&Xs.paymentUrl?(window.open(Xs.paymentUrl,"_blank"),R("LINK-"+(($e=Xs.linkPaymentId)==null?void 0:$e.substring(0,8).toUpperCase())),M("link_payment"),S("success")):m(Xs.error||a("checkout.link_payment_error"),{type:"error"})}catch(Ke){console.error("Link payment error:",Ke),m(a("checkout.link_payment_error"),{type:"error"})}else S("payment")},zt=async()=>{var te;if(!u||!p)return!1;try{_t(!0);const xe="https://kdqsajuhvcmxsnttdetg.supabase.co",Ie="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ge=le(u.price),De=x==="TR"&&u.priceTry?u.priceTry:null,Ke=await(await fetch(`${xe}/functions/v1/glodipay_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${Ie}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:p.platform,service_type:k,quantity:u.quantity,price:Ge,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ge,...De?{amountTry:De,currencyOverride:"TRY"}:{},returnOrigin:window.location.origin})})).json();if(Ke!=null&&Ke.success&&Ke.paymentUrl)return window.location.href=Ke.paymentUrl,!0;const et=Ke!=null&&Ke.debug?` [HTTP ${Ke.debug.httpStatus}, keys: ${(te=Ke.debug.responseKeys)==null?void 0:te.join(",")}]`:"";return m(((Ke==null?void 0:Ke.error)||a("checkout.unable_start_payment"))+et,{type:"error"}),!1}catch(xe){return console.error("GlodiPay error:",xe),m(a("checkout.unable_start_retry"),{type:"error"}),!1}finally{_t(!1)}},ss=async()=>
1106{if(!u||!p)return!1;try{const te="https://kdqsajuhvcmxsnttdetg.supabase.co",xe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ie=le(u.price),Ge=x==="TR"&&u.priceTry?u.priceTry:null,$e=await(await fetch(`${te}/functions/v1/finby_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${xe}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:p.platform,service_type:k,quantity:u.quantity,price:Ie,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ie,...Ge?{amountTry:Ge,currencyOverride:"TRY"}:{},displayCurrency:i,returnOrigin:window.location.origin})})).json();return $e!=null&&$e.success&&$e.paymentUrl?(window.location.href=$e.paymentUrl,!0):(m(($e==null?void 0:$e.error)||a("checkout.unable_start_payment"),{type:"error"}),!1)}catch(te){return console.error("Finby error:",te),m(a("checkout.unable_start_retry"),{type:"error"}),!1}},ma=async()=>{if(!u||!p)return!1;try{const te="https://kdqsajuhvcmxsnttdetg.supabase.co",xe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ie=le(u.price),De=await(await fetch(`${te}/functions/v1/payoup_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${xe}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:p.platform,service_type:k,quantity:u.quantity,price:Ie,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ie,...x==="TR"&&u.priceTry?{amountTry:u.priceTry,currencyOverride:"TRY"}:{},returnOrigin:window.location.origin,countryCode:x})})).json();return De!=null&&De.success&&De.paymentUrl?(window.location.href=De.paymentUrl,!0):(m((De==null?void 0:De.error)||a("checkout.unable_start_payment"),{type:"error"}),!1)}catch(te){return console.error("Payoup error:",te),m(a("checkout.unable_start_retry"),{type:"error"}),!1}},Ys=async()=>{if(!T||!u){m(a("checkout.fill_all_fields"),{type:"warning"});return}if(X&&X.is_private){m(a("checkout.private_profile_error"),{type:"warning"});return}if(we&&k.toLowerCase()==="views"&&!we.has_video){m(a("checkout.views_video_only"),{type:"warning"});return}const te=(at==null?void 0:at.methods)||[],xe=["finby","glodipay","payoup"],Ie=xe.filter(De=>te.some($e=>$e.code===De)),Ge=te.some(De=>!xe.includes(De.code));if(Ie.length===1&&!Ge&&te.length===1){const De=Ie[0];if(De==="finby"){await ss();return}if(De==="glodipay"){await zt();return}if(De==="payoup"){await ma();return}}if(!t&&la){S("auth");return}if(!t&&!la){Rt();return}s&&!P&&I(s.email),Rt()},Ja=(te,xe)=>{M(te),xe&&R(xe),S("success")},il=te=>{m(a("checkout.payment_error_retry").replace("{error}",te),{type:"error",title:a("checkout.payment_error_title")})},Ns=(te,xe)=>{re(xe),ae(te)},qr=(te,xe)=>{se(xe),ae(te)},jc=(te,xe)=>{$(xe),ae(te)},ka=()=>{vr()},vc=te=>{switch(te){case"Followers":return mt;case"Likes":return ia;case"Views":return Ct;case"Comments":return Ls;case"Shares":return Ki;case"Retweets":return sw;default:return mt}},nr=te=>({Followers:a("category.followers"),Likes:a("category.likes"),Views:a("category.views"),Shares:a("category.shares"),Retweets:a("category.retweets"),Comments:a("verify.comments"),Subscribers:a("verify.subscribers"),Members:a("verify.members"),"Profile/Page Followers":a("category.followers"),"Instant Delivery":a("home.instant_delivery"),"Real Followers":a("home.high_quality"),"No Password":a("home.no_password"),"No Password Required":a("home.no_password"),"No Drop (Life Time)":a("package.no_drop_lifetime"),"24/7 Support":a("home.support_24_7"),"Buy Followers - Premium Services":a("platform.premium_services"),"Buy Followers â Premium Services":a("platform.premium_services"),"Buy Followers â Premium Services":a("platform.premium_services"),"Real & High-Quality Services":a("storefront.real_high_quality_services"),"Real & High-Quality":a("storefront.real_high_quality"),"Premium Quality":a("storefront.premium_quality"),"Natural Delivery":a("storefront.natural_delivery"),"Super Fast 5min Instant Delivery":a("storefront.super_fast_delivery"),Instant:a("package.instant_start"),"Active Followers":a("storefront.active_followers"),"24/7 VIP Support":a("storefront.vip_support"),"Fast Delivery":a("package.fast_delivery"),"High Quality":a("home.high_quality"),"Buy Instagram Followers":a("storefront.hero_line1"),"& TikTok Followers":a("storefront.hero_line2"),"Buy followers for Instagram, TikTok, YouTube and more. Instant delivery, real followers, best prices.":a("storefront.hero_desc"),"Buy followers for Instagram, TikTok, YouTube and more. Instant delivery, real followers, USA & Europe.":a("storefront.hero_desc")})[te]||te,Gr=(te,xe)=>{const Ie=nr(te);return xe==="Instagram"&&te==="Followers"&&x==="TR"&&r==="tr"?`Türk ${Ie}`:Ie},wr=C==="service"||C==="package"||C==="checkout"||C==="auth"||C==="payment"||C==="link_payment",Fm
1106=C==="checkout"&&u&&((p==null?void 0:p.platform)==="Instagram"&&!X&&!we||(p==null?void 0:p.platform)==="TikTok"&&k==="Followers"&&!X||(p==null?void 0:p.platform)==="TikTok"&&(k==="Likes"||k==="Views")&&!Se||(p==null?void 0:p.platform)==="YouTube"&&k==="Subscribers"&&!ie||(p==null?void 0:p.platform)==="YouTube"&&(k==="Views"||k==="Likes")&&!Pe||(p==null?void 0:p.platform)==="Facebook"&&k==="Profile/Page Followers"&&!H||(p==null?void 0:p.platform)==="Facebook"&&k==="Comments"&&!ee||(p==null?void 0:p.platform)==="Facebook"&&k==="Likes"&&!ee||(p==null?void 0:p.platform)==="Telegram"&&k==="Members"&&!he||(p==null?void 0:p.platform)==="Discord"&&k==="Members"&&!O||(p==null?void 0:p.platform)==="Twitch"&&k==="Followers"&&!W||(p==null?void 0:p.platform)==="Spotify"&&!Re);return e.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-slate-50 via-white to-slate-50",children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 z-50",children:e.jsx(Wx,{})}),e.jsx(Ex,{onOpenDashboard:()=>{Xe(void 0)},onOpenDashboardWallet:()=>{Me(!0)},onOpenSupport:()=>Le(!0),onOpenAddFunds:()=>{Me(!0)},onOpenSpinWheel:()=>pe(!0),onOpenMysteryBox:()=>{ot(!0),w("mystery_box")},cartItemCount:0}),e.jsxs("section",{id:"services",className:"relative overflow-hidden pt-28 sm:pt-32 md:pt-36 pb-16 sm:pb-24 px-4 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-50 via-blue-50 to-cyan-50 opacity-80"}),e.jsx("div",{className:"absolute top-1/4 left-0 w-96 h-96 bg-blue-200 rounded-full mix-blend-multiply filter blur-3xl op
1106acity-30 animate-float"}),e.jsx("div",{className:"absolute bottom-1/4 right-0 w-96 h-96 bg-cyan-200 rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-float",style:{animationDelay:"2s"}}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-gradient-to-r from-blue-100 to-teal-100 rounded-full mix-blend-multiply filter blur-3xl opacity-20"}),e.jsxs("div",{className:"max-w-7xl mx-auto relative",children:[e.jsxs("div",{className:"text-center mb-8 sm:mb-16",children:[e.jsxs("div",{className:"inline-flex items-center space-x-2 bg-gradient-to-r from-blue-600/10 to-cyan-500/10 backdrop-blur-sm px-5 py-2.5 rounded-full shadow-lg mb-4 sm:mb-8 border border-blue-200/50 animate-bounce-slow",children:[e.jsxs("div",{className:"relative",children:[e.jsx(tt,{className:"w-5 h-5 text-blue-600"}),e.jsx("div",{className:"absolute inset-0 animate-ping",children:e.jsx(tt,{className:"w-5 h-5 text-blue-600 opacity-50"})})]}),e.jsx("span",{className:"text-sm font-bold bg-gradient-to-r from-blue-600 via-cyan-500 to-blue-600 bg-clip-text text-transparent bg-[length:200%_auto] animate-gradient",children:At!=null&&At.badge_text?nr(At.badge_text):a("platform.premium_services")})]}),e.jsxs("div",{className:"sm:hidden mt-3 mb-1 relative overflow-hidden",children:[e.jsxs("h2",{className:"text-[28px] leading-tight font-extrabold tracking-tight text-center",children:[e.jsx("span",{style:{background:"linear-gradient(90deg, #3C58EB 0%, #7C3AED 50%, #D33DE7 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:a("hero.mobile_line1")}),e.jsx("br",{}),e.jsx("span",{style:{background:"linear-gradient(90deg, #3C58EB 0%, #7C3AED 50%, #D33DE7 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:a("hero.mobile_line2")})]}),e.jsx("div",{className:"absolute inset-0 pointer-events-none animate-hero-shimmer",style:{background:"linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.7) 50%, transparent 60%)",backgroundSize:"200% 100%"}})]}),e.jsxs("h1",{className:"relative text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-extrabold tracking-tight mb-6 hidden sm:block",children:[e.jsxs("span",{className:"relative inline-block",children:[e.jsx("span",{className:"absolute -inset-1 blur-2xl bg-gradient-to-r from-blue-600/30 via-cyan-500/30 to-teal-500/30 rounded-lg"}),e.jsx("span",{className:"relative text-slate-900",children:At!=null&&At.title_line1?nr(At.title_line1):a("platform.choose_platform").split("&")[0]})]}),e.jsx("br",{}),e.jsxs("span",{className:"relative inline-block mt-2",children:[e.jsx("span",{className:"absolute -inset-1 blur-xl bg-gradient-to-r from-cyan-500/40 via-blue-500/40 to-teal-500/40 rounded-lg animate-pulse"}),e.jsx("span",{className:"relative bg-gradient-to-r from-cyan-500 via-teal-400 to-cyan-400 bg-clip-text text-transparent",children:At!=null&&At.title_line2?nr(At.title_line2):`&${a("platform.choose_platform").split("&")[1]||""}`})]})]}),e.jsx("p",{className:"text-slate-500 text-lg sm:text-xl max-w-2xl mx-auto mb-8 hidden sm:block",children:At!=null&&At.description?nr(At.description):a("platform.enterprise_desc")}),fs.length>0&&x!=="TR"&&e.jsx("div",{className:"mt-4 sm:mt-8 mb-2 sm:mb-4 flex items-center justify-center gap-4 flex-wrap",children:fs.map(te=>{const xe=e.jsx("img",{src:te.image_url,alt:te.alt_text||"Hero image",style:{width:te.width,height:te.height,objectFit:"cover"},className:"rounded-2xl shadow-2xl hover:scale-105 transition-transform duration-300"},te.id);return te.link_url?e.jsx("a",{href:te.link_url,target:"_blank",rel:"noopener noreferrer",children:xe},te.id):xe})}),(At==null?void 0:At.hero_image_url)&&fs.length===0&&x!=="TR"&&e.jsx("div",{className:"mt-8 mb-4",children:e.jsx("img",{src:At.hero_image_url,alt:"Hero",className:"max-w-full h-auto mx-auto rounded-2xl shadow-2xl",style:{maxHeight:"400px"}})}),e.jsx("div",{className:"flex items-center justify-center gap-1.5 sm:gap-3 md:gap-4 mt-4 sm:mt-8 px-2 sm:px-0",children:((At==null?void 0:At.show_trust_badges)!==!1?(At==null?void 0:At.badge_items)||[{icon:"Check",text:a("home.no_password")},{icon:"Zap",text:a("home.instant_delivery")},{icon:"Users",text:a("home.high_quality")}
1106]:[]).map((te,xe)=>{const Ie=["text-emerald-500","text-amber-500","text-rose-500","text-blue-500","text-cyan-500"],Ge=["bg-emerald-50","bg-amber-50","bg-rose-50","bg-blue-50","bg-cyan-50"],De=Ie[xe%Ie.length],$e=Ge[xe%Ge.length],Ke={Zap:rt,Users:mt,Headphones:Kn,Shield:lt,Star:Zt,Check:Lt,Clock:Ze,Award:qs,Heart:ia,TrendingUp:tt}[te.icon]||Lt;return e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-1.5 sm:py-2.5 rounded-full bg-white border border-slate-200 shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:`w-4 h-4 sm:w-6 sm:h-6 rounded-full ${$e} flex items-center justify-center flex-shrink-0`,children:e.jsx(Ke,{className:`w-2.5 h-2.5 sm:w-3.5 sm:h-3.5 ${De}`})}),e.jsx("span",{className:"text-[11px] sm:text-sm font-medium text-slate-700 whitespace-nowrap",children:nr(te.text)})]},xe)})}),e.jsx("div",{className:"mt-6 sm:mt-12 flex flex-col items-center",children:e.jsxs("div",{className:"bg-white/80 rounded-2xl px-5 sm:px-8 py-4 sm:py-6 shadow-lg border border-slate-200 backdrop-blur-xl",children:[e.jsx("div",{className:"flex items-center justify-center mb-3 sm:mb-5",children:e.jsx("div",{className:"flex -space-x-3",children:[{src:"/1.jpg",ring:"ring-emerald-500/30",badge:"bg-emerald-500"},{src:"/2.jpg",ring:"ring-blue-500/30",badge:"bg-blue-500"},{src:"/3.jpg",ring:"ring-pink-500/30",badge:"bg-pink-500"},{src:"/4.jpg",ring:"ring-amber-500/30",badge:"bg-amber-500"},{src:"/6.jpg",ring:"ring-cyan-500/30",badge:"bg-cyan-500"},{src:"/658299643_18045022793758637_6570897496028279873_n.jpg",ring:"ring-rose-500/30",badge:"bg-rose-500"},{src:"/5.jpg",ring:"ring-violet-500/30",badge:"bg-violet-500"},{src:"/572788888_18538334263009054_604317892251926546_n.jpg",ring:"ring-teal-500/30",badge:"bg-teal-500"},{src:"/629903757_18560101549040963_6085054672349400730_n.jpg",ring:"ring-orange-500/30",badge:"bg-orange-500"},{src:"/656294835_18054512666709688_533543798225723777_n.jpg",ring:"ring-sky-500/30",badge:"bg-sky-500"}].map((te,xe)=>e.jsxs("div",{className:"relative group",children:[e.jsx("img",{src:te.src,alt:"Creator",className:`w-11 h-11 rounded-full border-2 border-white object-cover ring-2 ${te.ring} transition-transform group-hover:scale-110 group-hover:z-10`}),e.jsx("div",{className:`absolute -bottom-1 -right-1 w-4 h-4 ${te.badge} rounded-full border-2 border-white flex items-center justify-center`,children:e.jsx(Lt,{className:"w-2.5 h-2.5 text-white"})})]},xe))})}),e.jsxs("div",{className:"flex items-center justify-center gap-3 flex-nowrap",children:[e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),e.jsx("span",{className:"text-slate-800 font-bold text-lg",children:"4.98"})]}),e.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4,5].map(te=>e.jsx(Zt,{className:"w-4 h-4 text-yellow-400 fill-yellow-400"},te))}),e.jsx("span",{className:"text-slate-400 text-sm whitespace-nowrap",children:a("checkout.from_reviews").replace("{count}","15485")})]})]})})]}),((wc=zr.quick_pricing)==null?void 0:wc.is_enabled)!==!1&&e.jsx("div",{className:"mt-6 md:mt-14 mb-6 md:mb-14",children:e.jsx(m6,{onSelectPackage:Cn,packagesData:Sn})}),e.jsxs("div",{className:"mt-10 md:mt-16 flex flex-wrap justify-center gap-3 md:gap-6",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-white/80 backdrop-blur-sm rounded-full px-4 py-2 border border-slate-200/60 shadow-sm",children:[e.jsx("div",{className:"p-1.5 rounded-full bg-green-100",children:e.jsx(Lt,{className:"w-3.5 h-3.5 text-green-600"})}),e.jsx("span",{className:"text-sm font-medium text-slate-700",children:a("platform.no_password")})]}),e.jsxs("div",{className:"flex items-center gap-2 bg-white/80 backdrop-blur-sm rounded-full px-4 py-2 border border-slate-200/60 shadow-sm",children:[e.jsx("div",{className:"p-1.5 rounded-full bg-blue-100",children:e.jsx(rt,{className:"w-3.5 h-3.5 text-blue-600"})}),e.jsx("span",{className:"text-sm font-medium text-slate-700",children:a("platform.instant_start")})]}),e.jsxs("div",{className:"flex items-center gap-2 bg-white/80 backdrop-blur-sm rounded-full px-4 py-2 border border-slate-200/60 shadow-sm",children:[e.jsx("div",{className:"p-1.5 rounded-full bg-amber-100",children:e.jsx(qs,{className:"w-3.5 h-3.5 text-amber-600"})}),e.jsx("span",{className:"text-sm font-medium text-slate-700",children:a("platform.premium_quality")}
1106)]})]})]})]}),e.jsx("section",{className:"py-12 bg-white border-y border-slate-200",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8",children:ll.map((te,xe)=>e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-4xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent mb-2",children:e.jsx(z4,{end:te.value,suffix:te.suffix,duration:2500})}),e.jsx("div",{className:"text-slate-600 font-medium",children:te.label})]},xe))})})}),e.jsx(ua,{rootMargin:"300px",children:e.jsxs("section",{className:"py-24 px-4 sm:px-6 lg:px-8 relative overflow-hidden bg-gradient-to-b from-slate-50 to-white",children:[e.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-blue-200 rounded-full mix-blend-multiply filter blur-3xl opacity-20 animate-pulse"}),e.jsx("div",{className:"absolute bottom-0 right-1/4 w-96 h-96 bg-purple-200 rounded-full mix-blend-multiply filter blur-3xl opacity-20 animate-pulse delay-1000"}),e.jsxs("div",{className:"relative max-w-7xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center space-x-2 bg-white/80 backdrop-blur-sm px-4 py-2 rounded-full shadow-lg mb-6 border border-blue-100",children:[e.jsx(Zt,{className:"w-4 h-4 text-yellow-500 fill-yellow-500"}),e.jsx("span",{className:"text-sm font-semibold text-slate-700",children:a("home.trusted_by")})]}),e.jsxs("h2",{className:"text-2xl sm:text-4xl lg:text-5xl font-bold text-slate-900 mb-6 leading-tight",children:[a("home.hero_title"),e.jsx("br",{}),e.jsx("span",{className:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 bg-clip-text text-transparent",children:a("home.hero_subtitle")})]}),e.jsx("p",{className:"text-xl text-slate-600 mb-8 max-w-3xl mx-auto leading-relaxed",children:a("home.hero_description")}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 mb-12",children:[e.jsxs("button",{onClick:()=>{var te;return(te=document.getElementById("services"))==null?void 0:te.scrollIntoView({behavior:"smooth"})},className:"group bg-gradient-to-r from-blue-600 to-purple-600 text-white px-8 py-4 rounded-full font-bold text-lg hover:shadow-2xl hover:scale-105 transition-all duration-300 flex items-center space-x-2",children:[e.jsx("span",{children:a("home.start_growing")}),e.jsx(tt,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]}),e.jsx("button",{onClick:()=>{var te;return(te=document.getElementById("services"))==null?void 0:te.scrollIntoView({behavior:"smooth"})},className:"bg-white text-slate-700 px-8 py-4 rounded-full font-bold text-lg border-2 border-slate-200 hover:border-blue-600 hover:text-blue-600 transition-all duration-300",children:a("home.view_pricing")})]})]})]})}),e.jsx(ua,{rootMargin:"300px",children:e.jsx("section",{id:"why-us",className:"py-24 px-4 sm:px-6 lg:px-8 bg-gradient-to-b from-slate-50 to-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("h2",{className:"text-2xl sm:text-4xl font-bold text-slate-900 mb-4",children:a("platform.why_choose")}),e.jsx("p",{className:"text-base sm:text-xl text-slate-600 max-w-2xl mx-auto",children:a("platform.trusted_platform")})]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:jr.map((te,xe)=>e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-lg hover:shadow-xl transition-all duration-300 border border-slate-100 text-center",children:[e.jsx("div",{className:"inline-flex p-4 rounded-full bg-gradient-to-br from-blue-50 to-purple-50 mb-4",children:e.jsx(te.icon,{className:"w-8 h-8 text-blue-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:te.title}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:te.description})]},xe))})]})})}),e.jsx(ua,{rootMargin:"300px",children:e.jsxs("section",{className:"py-24 px-4 sm:px-6 lg:px-8 bg-gradient-to-br from-blue-600 via-cyan-600 to-teal-600 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAxMCAwIEwgMCAwIDAgMTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjEiIHN0cm9rZS13aWR0aD0iMSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmlkKSIvPjwvc3ZnPg==')] opacity-20"}),e.jsxs("div",{className:"relative max-w-4xl mx-auto text-center",children:[e.jsx("h2",{className:"text-2xl sm:text-4xl font-bold text-white mb-6",children:a("cta.title")}),e.jsx("p",{className:"text-base sm:text-xl text-white/90 mb-10 leading-relaxed",children:a("cta.description")}),e.jsxs("button",{onClick:()=>{var te;return(te=document.getElementById("services"))==null?void 0:te.scrollIntoView({behavior:"smooth"})},className:"bg-white text-slate-900 px-10 py-4 rounded-full font-bold text-lg hover:shadow-2xl hover:scale-105 transition-all duration-300 inline-flex items-center space-x-2",children:[e.jsx("span",{children:a("cta.button")}),e.jsx(tt,{className:"w-5 h-5"})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-center space-x-8 text-white/80 text-sm",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(lt,{className:"w-4 h-4"}),e.jsx("span",{children:a("features.secure")})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Lt,{className:"w-4 h-4"}),e.jsx("span",{children:a("platform.no_password")})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(qs,{className:"w-4 h-4"}),e.jsx("span",{children:a("features.premium_quality")}
1106)]})]})]})]})}),e.jsx(ua,{rootMargin:"300px",children:e.jsx(zf,{featured:!0,limit:6})}),e.jsx(ua,{rootMargin:"300px",children:e.jsx(Of,{limit:8})}),e.jsx(ua,{rootMargin:"300px",children:e.jsx($f,{})}),e.jsx(ua,{rootMargin:"300px",children:e.jsx("section",{className:"py-16 bg-gradient-to-br from-blue-600 via-cyan-600 to-teal-600 text-white",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold mb-4",children:a("home.read_blog")}),e.jsx("p",{className:"text-blue-100 text-lg mb-8 max-w-2xl mx-auto",children:a("home.blog_desc")}),e.jsx("button",{onClick:()=>{window.history.pushState({},"","/blog"),y("blog")},className:"bg-white text-blue-600 px-8 py-4 rounded-xl font-semibold hover:bg-blue-50 transition-colors shadow-lg",children:a("home.visit_blog")})]})})}),e.jsx(ua,{rootMargin:"300px",children:e.jsx("section",{className:"py-20 bg-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:a("home.social_growth_title")}),e.jsx("p",{className:"text-slate-600 text-lg max-w-3xl mx-auto",children:a("home.social_growth_desc")})]}),e.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg hover:border-blue-200 transition-all duration-300 group",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-rose-100 to-pink-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(mt,{className:"w-6 h-6 text-rose-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("services.buy_ig_followers")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("services.buy_ig_followers_desc")}),e.jsxs("a",{href:"/buy-instagram-followers",className:"inline-flex items-center text-rose-600 hover:text-rose-700 font-semibold transition-colors",children:[a("services.buy_ig_followers_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg hover:border-blue-200 transition-all duration-300 group",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-red-100 to-orange-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(ia,{className:"w-6 h-6 text-red-500"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("services.buy_ig_likes")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("services.buy_ig_likes_desc")}),e.jsxs("a",{href:"/buy-instagram-likes",className:"inline-flex items-center text-red-500 hover:text-red-600 font-semibold transition-colors",children:[a("services.buy_ig_likes_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg hover:border-blue-200 transition-all duration-300 group",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-sky-100 to-blue-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(Ct,{className:"w-6 h-6 text-sky-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("services.buy_ig_views")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("services.buy_ig_views_desc")}),e.jsxs("a",{href:"/buy-instagram-views",className:"inline-flex items-center text-sky-600 hover:text-sky-700 font-semibold transition-colors",children:[a("services.buy_ig_views_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg hover:border-blue-200 transition-all duration-300 group",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-teal-100 to-cyan-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(rt,{className:"w-6 h-6 text-teal-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("services.buy_tiktok")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("services.buy_tiktok_desc")}),e.jsxs("a",{href:"/buy-tiktok-followers",className:"inline-flex items-center text-teal-600 hover:text-teal-700 font-semibold transition-colors",children:[a("services.buy_tiktok_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg hover:border-blue-200 transition-all duration-300 group",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-red-100 to-rose-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(wt,{className:"w-6 h-6 text-red-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("services.buy_youtube")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("services.buy_youtube_desc")}),e.jsxs("a",{href:"/buy-youtube-subscribers",className:"inline-flex items-center text-red-600 hover:text-red-700 font-semibold transition-colors",children:[a("services.buy_youtube_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-slate-50 to-white border border-slate-200 rounded-2xl p-8 hover:shadow-lg hover:border-blue-200 transition-all duration-300 group",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-100 to-sky-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(Ia,{className:"w-6 h-6 text-blue-500"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("services.buy_twitter")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("services.buy_twitter_desc")}),e.jsxs("a",{href:"/buy-twitter-followers",className:"inline-flex items-center text-blue-500 hover:text-blue-600 font-semibold transition-colors",children:[a("services.buy_twitter_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]})]})]})})}),e.jsx(ua,{rootMargin:"300px",children:e.jsx("section",{className:"py-20 bg-gradient-to-br from-slate-50 to-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 mb-4",children:a("home.smm_solutions_title")}),e.jsx("p",{className:"text-slate-600 text-lg max-w-3xl mx-auto",children:a("home.smm_solutions_de
1106sc")})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl p-8 hover:shadow-xl hover:border-emerald-200 transition-all duration-300 group relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-emerald-500 to-teal-500"}),e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-emerald-100 to-teal-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(Os,{className:"w-6 h-6 text-emerald-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("smm.api_title")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("smm.api_desc")}),e.jsxs("a",{href:"/smm-panel-api",className:"inline-flex items-center text-emerald-600 hover:text-emerald-700 font-semibold transition-colors",children:[a("smm.api_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]}),e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl p-8 hover:shadow-xl hover:border-blue-200 transition-all duration-300 group relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-blue-500 to-cyan-500"}),e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-100 to-cyan-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(Jt,{className:"w-6 h-6 text-blue-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("smm.cheap_title")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("smm.cheap_desc")}),e.jsxs("a",{href:"/cheap-smm-panel",className:"inline-flex items-center text-blue-600 hover:text-blue-700 font-semibold transition-colors",children:[a("smm.cheap_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]}),e.jsxs("div",{className:"bg-white border border-slate-200 rounded-2xl p-8 hover:shadow-xl hover:border-amber-200 transition-all duration-300 group relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-amber-500 to-orange-500"}),e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-amber-100 to-orange-100 rounded-xl flex items-center justify-center mb-5 group-hover:scale-110 transition-transform",children:e.jsx(Ta,{className:"w-6 h-6 text-amber-600"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:a("smm.best_title")}),e.jsx("p",{className:"text-slate-600 leading-relaxed mb-4",children:a("smm.best_desc")}),e.jsxs("a",{href:"/best-smm-panel",className:"inline-flex items-center text-amber-600 hover:text-amber-700 font-semibold transition-colors",children:[a("smm.best_cta"),e.jsx(tt,{className:"w-4 h-4 ml-2"})]})]})]}),e.jsxs("div",{className:"mt-12 text-center",children:[e.jsx("p",{className:"text-slate-500 mb-6",children:a("home.reseller_desc")}),e.jsxs("a",{href:"/smm-panel-reseller",className:"inline-flex items-center bg-gradient-to-r from-emerald-500 to-teal-600 text-white px-8 py-4 rounded-xl font-semibold hover:shadow-lg hover:from-emerald-600 hover:to-teal-700 transition-all duration-300",children:[a("home.become_reseller"),e.jsx(tt,{className:"w-5 h-5 ml-2"})]})]})]})})}),e.jsx(ua,{rootMargin:"300px",children:e.jsx("footer",{className:"bg-slate-900 text-white py-16 px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-5 gap-8 mb-12",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-3xl font-bold bg-gradient-to-r from-blue-400 to-cyan-400 bg-clip-text text-transparent mb-4",children:a("footer.brand")}),e.jsx("p",{className:"text-slate-400 mb-6 leading-relaxed",children:a("footer.brand_desc")})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-lg mb-4",children:a("footer.buy_followers")}),e.jsxs("ul",{className:"space-y-2 text-slate-400",children:[e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition",children:a("footer.buy_instagram")})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition",children:a("footer.buy_tiktok")})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition",children:a("footer.buy_
1106youtube")})}),e.jsx("li",{children:e.jsx("a",{href:"#services",className:"hover:text-white transition",children:a("footer.buy_likes_views")})})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-lg mb-4",children:a("footer.resources")}),e.jsxs("ul",{className:"space-y-2 text-slate-400",children:[e.jsx("li",{children:e.jsx("a",{href:"/blog",className:"hover:text-white transition",children:a("footer.blog_guides")})}),e.jsx("li",{children:e.jsx("a",{href:"#faq",className:"hover:text-white transition",children:a("faq.title")})}),e.jsx("li",{children:e.jsx("a",{href:"#reviews",className:"hover:text-white transition",children:a("footer.customer_reviews")})}),e.jsx("li",{children:e.jsx("button",{onClick:()=>Ce("contact"),className:"hover:text-white transition",children:a("footer.contact_us")})})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-lg mb-4",children:a("footer.legal")}),e.jsxs("ul",{className:"space-y-2 text-slate-400",children:[e.jsx("li",{children:e.jsx("a",{href:"/terms",className:"hover:text-white transition",children:a("footer.terms_of_service")})}),e.jsx("li",{children:e.jsx("a",{href:"/privacy-policy",className:"hover:text-white transition",children:a("footer.privacy_policy")})}),e.jsx("li",{children:e.jsx("a",{href:"/refund-policy",className:"hover:text-white transition",children:a("footer.refund_policy")})})]})]})]}),e.jsxs("div",{className:"border-t border-slate-800 pt-8",children:[e.jsx("div",{className:"flex flex-col items-center gap-4 mb-8",children:e.jsxs("div",{className:"flex items-center gap-2 text-slate-300",children:[e.jsx(gs,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:a("footer.contact_label")}),e.jsx("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:text-blue-300 transition",children:"[email protected]"})]})}),e.jsx("p",{className:"text-slate-500 text-sm mb-6 text-center max-w-4xl mx-auto",children:a("footer.seo_desc")}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsx("p",{className:"text-slate-400 text-sm",children:a("footer.copyright")}),e.jsxs("div",{className:"flex items-center gap-6 text-sm text-slate-400",children:[e.jsx("a",{href:"/terms",className:"hover:text-white transition",children:a("footer.terms")}),e.jsx("a",{href:"/privacy-policy",className:"hover:text-white transition",children:a("footer.privacy")}),e.jsx("a",{href:"/refund-policy",className:"hover:text-white transition",children:a("footer.refund")})]}),e.jsx("div",{className:"flex items-center space-x-6",children:e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-slate-400",children:[e.jsx($t,{className:"w-4 h-4"}),e.jsx("span",{children:a("footer.ssl_encrypted")})]})})]})]})]})})}),j&&p&&e.jsx("div",{className:`fixed inset-0 z-50 flex items-end md:items-center justify-center md:p-4 ${wr?"bg-black/30 backdrop-blur-sm":"bg-gradient-to-br from-black/60 via-slate-900/60 to-black/60 backdrop-blur-md"}`,onClick:wr?void 0:C==="success"?nl:vr,children:e.jsx("div",{className:`rounded-t-2xl md:rounded-3xl w-full max-h-[92vh] md:max-h-[90vh] overflow-y-auto animate-[slideUp_0.3s_ease-out] md:animate-[fadeZoomIn_0.3s_ease-out] ${wr?"bg-transparent shadow-none border-0 max-w-lg":"bg-white shadow-2xl border border-slate-200/50 max-w-4xl"}`,onClick:te=>te.stopPropagation(),children:e.jsxs("div",{className:"relative",children:[!wr&&e.jsx("div",{className:"md:hidden flex justify-center pt-2 pb-1",children:e.jsx("div",{className:"w-10 h-1 rounded-full bg-slate-300"})}),!wr&&e.jsx("div",{className:`absolute top-0 left-0 right-0 h-1 bg-gradient-to-r ${p.color} rounded-t-2xl md:rounded-t-3xl hidden md:block`}),e.jsx("button",{onClick:C==="success"?nl:vr,className:`absolute top-3 right-3 md:top-6 md:right-6 p-2 md:p-2.5 rounded-xl transition-all z-10 group ${wr?"bg-white/10 backdrop-blur-sm hover:bg-white/20 text-white":"backdrop-blur-sm bg-white/50 shadow-lg hover:shadow-xl hover:bg-slate-100/80"}`,children:e.jsx(ht,{className:`w-5 h-5 md:w-6 md:h-6 group-hover:rotate-90 transition-all ${wr?"text-white/70 group-hover:text-white":"text-slate-600 group-hover:text-slate-900"}`})}),C!=="service"&&C!=="success"&&!Fm&&e.jsxs("button",{onClick:bt,className:`absolute top-3 left-3 md:top-6 md:left-6 p-2 md:p-2.5 rounded-xl transition-all z-10 flex items-center space-x-1.5 group ${wr?"bg-white/10 backdrop-blur-sm hover:bg-white/20 text-white/70 hover:text-white":"backdrop-blur-sm bg-white/50 shadow-lg hover:shadow-xl hover:bg-slate-100/80 text-slate-600 hover:text-slate-900"}`,children:[e.jsx(Ua,{className:"w-5 h-5 group-hover:-translate-x-0.5 transition-transform"}),e.jsx("span",{className:"text-sm font-bold",children:a("package.back")})]}),e.jsxs("div",{className:wr?"p-2 pt-12 md:p-4 md:pt-4":"p-4 md:p-6 lg:p-8",children:[C==="service"&&e.jsxs("div",{className:"bg-slate-900/80 backdrop-blur-xl rounded-2xl p-4 md:p-6 lg:p-8 border border-white/10",children:[e.jsxs("div",{className:"text-center mb-8 sm:mb-10",children:[e.jsxs("div",{className:"relative inline-block mb-5",children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-r ${p.color}
1106 blur-3xl opacity-30 rounded-full scale-150`}),e.jsx("div",{className:`relative inline-flex p-4 sm:p-5 rounded-2xl bg-gradient-to-br ${p.color} shadow-2xl ring-4 ring-white/20`,children:e.jsx(p.icon,{className:"w-10 h-10 sm:w-12 sm:h-12 text-white"})})]}),e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-white mb-2",children:p.platform}),e.jsx("p",{className:"text-sm sm:text-base text-slate-400 mb-4",children:a("package.choose_service")}),e.jsxs("div",{className:"inline-flex items-center gap-2 bg-emerald-500/10 px-4 py-2 rounded-full border border-emerald-500/20",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400 animate-pulse"}),e.jsx("span",{className:"text-xs sm:text-sm font-semibold text-emerald-400",children:a("package.fast_delivery")})]})]}),e.jsx("div",{className:"hidden sm:grid sm:grid-cols-2 gap-4 max-w-xl mx-auto",children:p.services.map((te,xe)=>{const Ie=vc(te),Ge=["from-blue-500 to-cyan-500","from-rose-500 to-pink-500","from-amber-500 to-orange-500","from-emerald-500 to-teal-500"],De=Ge[xe%Ge.length];return e.jsxs("button",{onClick:()=>Be(te),className:"group relative",children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${De} opacity-0 group-hover:opacity-100 transition-all duration-500 rounded-2xl blur-xl scale-95`}),e.jsxs("div",{className:"relative bg-white/5 border border-white/10 rounded-2xl p-5 group-hover:border-white/20 group-hover:bg-white/10 transition-all duration-300 group-hover:-translate-y-1 overflow-hidden",children:[e.jsx("div",{className:`absolute top-0 right-0 w-24 h-24 bg-gradient-to-br ${De} opacity-10 rounded-full -translate-y-1/2 translate-x-1/2 group-hover:scale-150 transition-transform duration-500`}),e.jsxs("div",{className:"relative flex items-center gap-4",children:[e.jsx("div",{className:`relative p-3.5 rounded-xl bg-gradient-to-br ${De} shadow-lg group-hover:scale-110 group-hover:rotate-3 transition-all duration-300`,children:e.jsx(Ie,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx("h3",{className:"font-bold text-lg text-white group-hover:text-white transition-colors",children:Gr(te,p.platform)}),e.jsxs("p",{className:"text-xs text-slate-400 flex items-center gap-1 mt-0.5",children:[e.jsx(rt,{className:"w-3 h-3"}),e.jsx("span",{children:a("category.instant_delivery")})]})]}),e.jsx("div",{className:`p-2 rounded-full bg-gradient-to-r ${De} opacity-0 group-hover:opacity-100 transition-all duration-300 group-hover:translate-x-0 -translate-x-2`,children:e.jsx(Yt,{className:"w-4 h-4 text-white"})})]})]})]},xe)})}),e.jsxs("div",{className:"sm:hidden",children:[e.jsx("div",{className:"flex gap-3 overflow-x-auto pb-4 px-1 -mx-1 scrollbar-hide snap-x snap-mandatory",children:p.services.map((te,xe)=>{const Ie=vc(te),Ge=["from-blue-500 to-cyan-500","from-rose-500 to-pink-500","from-amber-500 to-orange-500","from-emerald-500 to-teal-500"],De=Ge[xe%Ge.length];return e.jsx("button",{onClick:()=>Be(te),className:"group flex-shrink-0 snap-start",children:e.jsxs("div",{className:`relative bg-gradient-to-br ${De} rounded-2xl p-4 min-w-[140px] shadow-lg group-active:scale-95 transition-transform`,children:[e.jsx("div",{className:"absolute inset-0 bg-white/10 rounded-2xl opacity-0 group-active:opacity-100 transition-opacity"}),e.jsxs("div",{className:"relative flex flex-col items-center text-center gap-3",children:[e.jsx("div",{className:"p-3 rounded-xl bg-white/20 backdrop-blur-sm",children:e.jsx(Ie,{className:"w-7 h-7 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-white text-sm",children:Gr(te,p.platform)}),e.jsxs("p",{className:"text-[10px] text-white/70 mt-0.5 flex items-center justify-center gap-1",children:[e.jsx(rt,{className:"w-2.5 h-2.5"}),e.jsx("span",{children:a("category.instant_delivery")})]})]})]})]})},xe)})}),e.jsxs("p",{className:"text-center text-xs text-slate-400 mt-2 flex items-center justify-center gap-1",children:[e.jsx("span",{children:a("checkout.swipe_explore")}),e.jsx(Yt,{className:"w-3 h-3"})]})]})]}),C==="package"&&e.jsxs("div",{className:"bg-slate-900/80 backdrop-blur-xl rounded-2xl p-4 md:p-6 lg:p-8 border border-white/10",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsxs("div",{className:"inline-flex items-center space-x-3 bg-white/10 px-5 py-2.5 rounded-full mb-5 border border-white/10",children:[e.jsx("div",{className:`w-2 h-2 rounded-full bg-gradient-to-r ${p.color}`}),e.jsx("span",{className:"text-sm font-bold text-white/80",children:p.platform})]}),e.jsxs("h2",{className:"text-3xl md:text-4xl font-bold text-white mb-3",children:[Gr(k,p==null?void 0:p.platform)," ",a("package.packages")]}),e.jsx("p",{className:"text-lg text-slate-400",children:a("package.choose_package")})]}),e.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 lg:gap-4",children:(kc=(Nc=Sn[p.platform])==null?void 0:Nc[
1106k])==null?void 0:kc.map((te,xe)=>e.jsxs("button",{onClick:()=>He(te),className:`group relative ${te.badgeText||te.bestSeller?"lg:col-span-1 mt-3":""}`,children:[e.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${p.color} opacity-0 group-hover:opacity-10 transition-opacity rounded-2xl`}),e.jsxs("div",{className:`relative bg-gradient-to-br border-2 rounded-2xl hover:shadow-2xl transition-all duration-300 hover:-translate-y-2 h-full flex flex-col ${te.badgeText||te.bestSeller?"border-yellow-400/60 from-yellow-500/10 via-orange-500/5 to-white/5 shadow-lg shadow-yellow-500/10 pt-6 pb-4 px-4 lg:pt-7 lg:pb-5 lg:px-5":"border-white/10 from-white/5 to-white/[0.02] hover:border-white/20 p-4 lg:p-5"}`,children:[(te.badgeText||te.bestSeller)&&e.jsx("div",{className:"absolute -top-3 left-1/2 transform -translate-x-1/2 z-10",children:e.jsxs("div",{className:"bg-gradient-to-r from-yellow-400 via-orange-500 to-yellow-500 text-white text-[10px] sm:text-xs font-bold px-2.5 py-0.5 sm:px-3 sm:py-1 rounded-full shadow-lg flex items-center space-x-1 animate-pulse whitespace-nowrap",children:[e.jsx(Zt,{className:"w-3 h-3 fill-white flex-shrink-0"}),e.jsx("span",{children:te.badgeText||a("package.best_value")})]})}),e.jsxs("div",{className:"text-center flex-1 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-center space-x-1.5 mb-3",children:[e.jsx("div",{className:`w-1.5 h-1.5 rounded-full bg-gradient-to-r ${p.color}`}),e.jsx("div",{className:`text-xs font-bold bg-gradient-to-r ${p.color} bg-clip-text text-transparent uppercase tracking-wide`,children:p.platform})]}),e.jsxs("div",{className:"mb-3 flex-1",children:[e.jsx("div",{className:"text-xl lg:text-2xl font-bold text-white mb-1",children:Ga(te.quantity)}),e.jsx("div",{className:"text-xs text-slate-400 font-medium",children:Gr(k,p==null?void 0:p.platform)})]}),e.jsx("div",{className:"mb-3",children:x==="TR"&&te.priceTry?e.jsxs(e.Fragment,{children:[te.originalPriceTry&&e.jsx("div",{className:"text-base text-slate-500 line-through mb-0.5",children:n(te.originalPriceTry,"TRY")}),e.jsx("div",{className:"text-2xl lg:text-3xl font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:n(te.priceTry,"TRY")}),e.jsx("div",{className:"text-xs text-slate-400 line-through",children:l(te.price)})]}):la?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-base text-slate-500 line-through mb-0.5",children:l(te.originalPrice||G(te.price))}),e.jsx("div",{className:"text-2xl lg:text-3xl font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:l(te.price)}),e.jsxs("div",{className:"inline-flex items-center gap-1 bg-gradient-to-r from-red-500 to-orange-500 text-white text-[10px] font-bold px-2 py-0.5 rounded-full mt-1",children:[e.jsx(Vt,{className:"w-3 h-3"}),e.jsx("span",{children:a("packages.for_members_discount")})]})]}):e.jsx(e.Fragment,{children:e.jsx("div",{className:"text-2xl lg:text-3xl font-bold bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:l(te.price)})})}),e.jsxs("div",{className:`bg-gradient-to-r ${p.color} text-white px-4 py-2 rounded-xl text-sm font-bold group-hover:shadow-xl transition-all relative overflow-hidden`,children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex items-center justify-center space-x-1.5",children:[e.jsx("span",{children:a("package.buy_now")}),e.jsx(tt,{className:"w-3.5 h-3.5 group-hover:translate-x-1 transition-transform"})]})]})]})]})]},xe))}),e.jsxs("div",{className:"mt-6 grid grid-cols-3 gap-3 max-w-2xl mx-auto",children:[e.jsxs("div",{className:"text-center bg-emerald-500/10 rounded-xl p-3 border border-emerald-500/20",children:[e.jsx(ne,{className:"w-5 h-5 text-emerald-400 mx-auto mb-1.5"}),e.jsx("div",{className:"text-xs font-bold text-slate-300",children:a("package.instant_start")})]}),e.jsxs("div",{className:"text-center bg-blue-500/10 rounded-xl p-3 border border-blue-500/20",children:[e.jsx(lt,{className:"w-5 h-5 text-blue-400 mx-auto mb-1.5"}),e.jsx("div",{className:"text-xs font-bold text-slate-300",children:a("package.safe")})]}),e.jsxs("div",{className:"text-center bg-pink-500/10 rounded-xl p-3 border border-pink-500/20",children:[e.jsx(qs,{className:"w-5 h-5 text-pink-400 mx-auto mb-1.5"}),e.jsx("div",{className:"text-xs font-bold text-slate-300",children:a("package.premium_quality")}
1106)]})]})]}),C==="checkout"&&u&&e.jsx(e.Fragment,{children:(p==null?void 0:p.platform)==="Instagram"&&!X&&!we?e.jsx("div",{children:k==="Followers"||(si=u==null?void 0:u.service_categories)!=null&&si.requires_profile_verification?e.jsx(N4,{onVerified:Ns,onCancel:ka}):e.jsx(k4,{serviceType:k.toLowerCase(),onVerified:qr,onCancel:ka})}):(p==null?void 0:p.platform)==="TikTok"&&k==="Followers"&&!X?e.jsx("div",{children:e.jsx(_4,{onVerified:(te,xe)=>{re({username:xe.username,full_name:xe.fullName,profile_pic_url:xe.profilePicUrl,follower_count:xe.followerCount,following_count:xe.followingCount,biography:xe.bio,is_verified:xe.isVerified,is_private:xe.isPrivate}),ae(xe.username)},onCancel:ka})}):(p==null?void 0:p.platform)==="TikTok"&&(k==="Likes"||k==="Views")&&!Se?e.jsx("div",{children:e.jsx(I4,{serviceType:k.toLowerCase(),onVerified:jc,onCancel:ka})}):(p==null?void 0:p.platform)==="YouTube"&&k==="Subscribers"&&!ie?e.jsx("div",{children:e.jsx(T4,{onVerified:(te,xe)=>{be(xe),ae(te)},onCancel:ka})}):(p==null?void 0:p.platform)==="YouTube"&&(k==="Views"||k==="Likes")&&!Pe?e.jsx("div",{children:e.jsx(O4,{onVerified:(te,xe)=>{de(xe),ae(te)},onCancel:ka})}):(p==null?void 0:p.platform)==="Facebook"&&k==="Profile/Page Followers"&&!H?e.jsx("div",{children:e.jsx(P4,{onVerified:(te,xe)=>{me(xe),ae(xe.username||te)},onCancel:ka})}):(p==null?void 0:p.platform)==="Facebook"&&(k==="Comments"||k==="Likes")&&!ee?e.jsx("div",{children:e.jsx(A4,{orderType:k==="Likes"?"likes":"comments",onVerified:(te,xe)=>{Ae(xe),ae(te)},onCancel:ka})}):(p==null?void 0:p.platform)==="Telegram"&&k==="Members"&&!he?e.jsx("div",{children:e.jsx(M4,{onVerified:(te,xe)=>{D(xe),ae(xe.username?`@${xe.username}`:te)},onCancel:ka})}):(p==null?void 0:p.platform)==="Discord"&&k==="Members"&&!O?e.jsx("div",{children:e.jsx(E4,{onVerified:(te,xe)=>{fe(xe),ae(te)},onCancel:ka})}):(p==null?void 0:p.platform)==="Twitch"&&k==="Followers"&&!W?e.jsx("div",{children:e.jsx(D4,{onVerified:(te,xe)=>{_e(xe),ae(te)},onCancel:ka})}):(p==null?void 0:p.platform)==="Spotify"&&!Re?e.jsx("div",{children:e.jsx(F4,{onVerified:(te,xe)=>{ve(xe),ae(te)},onCancel:ka})}):e.jsxs("div",{className:"relative max-w-lg mx-auto space-y-4 bg-white rounded-2xl p-4 md:p-6 border border-slate-200 shadow-xl",children:[e.jsx("input",{type:"hidden",value:T}),!U&&!ue&&!xt&&e.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-slate-200/80 bg-gradient-to-br from-white via-slate-50 to-white shadow-sm",children:[e.jsx("div",{className:`absolute inset-x-0 top-0 h-1 bg-gradient-to-r ${p.color}`}),e.jsx("div",{className:`absolute -top-12 -right-12 w-40 h-40 rounded-full bg-gradient-to-br ${p.color} opacity-[0.07] blur-2xl`}),e.jsxs("div",{className:"relative p-4 md:p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:`flex items-center justify-center w-9 h-9 rounded-xl bg-gradient-to-br ${p.color} shadow-md ring-1 ring-white/60`,children:e.jsx(ah,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-bold text-sm text-slate-900 tracking-tight",children:a("checkout.order_summary")}),la&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md bg-red-50 border border-red-100",children:[e.jsx("span",{className:"w-1 h-1 rounded-full bg-red-500 animate-pulse"}),e.jsx("span",{className:"text-[10px] font-bold text-red-600 tracking-wide",children:"-50%"})]})]}),e.jsx("p",{className:"text-[11px] text-slate-500 font-medium mt-0.5",children:a("checkout.secure_one_time")}
1106)]})]}),e.jsx("div",{className:"text-right",children:x==="TR"&&u.priceTry?e.jsxs(e.Fragment,{children:[u.originalPriceTry&&e.jsx("div",{className:"text-[11px] text-slate-400 line-through leading-none mb-0.5",children:n(u.originalPriceTry,"TRY")}),e.jsx("div",{className:"text-2xl font-extrabold bg-gradient-to-r from-emerald-600 to-green-600 bg-clip-text text-transparent leading-none tracking-tight",children:n(u.priceTry,"TRY")}),e.jsx("div",{className:"text-[10px] text-slate-400 line-through",children:l(u.price)})]}):e.jsxs(e.Fragment,{children:[la&&e.jsx("div",{className:"text-[11px] text-slate-400 line-through leading-none mb-0.5",children:l(u.originalPrice||G(u.price))}),e.jsx("div",{className:"text-2xl font-extrabold bg-gradient-to-r from-emerald-600 to-green-600 bg-clip-text text-transparent leading-none tracking-tight",children:l(u.price)})]})})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[e.jsxs("div",{className:"relative bg-white rounded-xl border border-slate-200/70 px-3 py-2.5 hover:border-slate-300 transition-colors",children:[e.jsx("div",{className:"text-[9px] font-bold text-slate-400 tracking-wider uppercase mb-0.5",children:a("checkout.platform_label")}),e.jsx("div",{className:"text-xs font-semibold text-slate-900 truncate",children:p.platform})]}),e.jsxs("div",{className:"relative bg-white rounded-xl border border-slate-200/70 px-3 py-2.5 hover:border-slate-300 transition-colors",children:[e.jsx("div",{className:"text-[9px] font-bold text-slate-400 tracking-wider uppercase mb-0.5",children:a("checkout.service_label")}),e.jsx("div",{className:"text-xs font-semibold text-slate-900 truncate",children:Gr(k,p==null?void 0:p.platform)})]}),e.jsxs("div",{className:"relative bg-white rounded-xl border border-slate-200/70 px-3 py-2.5 hover:border-slate-300 transition-colors",children:[e.jsx("div",{className:"text-[9px] font-bold text-slate-400 tracking-wider uppercase mb-0.5",children:a("checkout.quantity_label")}),e.jsx("div",{className:"text-xs font-semibold text-slate-900 truncate",children:Ga(u.quantity)})]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-2 mt-3 pt-3 border-t border-dashed border-slate-200",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-medium text-slate-500",children:[e.jsx(Sl,{className:"w-3 h-3 text-emerald-500"}),e.jsx("span",{children:a("checkout.ssl_encrypted_short")})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-medium text-slate-500",children:[e.jsx(rt,{className:"w-3 h-3 text-amber-500"}),e.jsx("span",{children:a("checkout.instant_delivery_short")})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-medium text-slate-500",children:[e.jsx(Ve,{className:"w-3 h-3 text-blue-500"}),e.jsx("span",{children:a("checkout.auto_refill")})]})]})]})]}),!U&&!ue&&!xt&&t&&u&&(Kt.some(xe=>xe.platform.toLowerCase()===(u.platform||"").toLowerCase()&&xe.service_type.toLowerCase()===(u.service_type||"").toLowerCase())&&Bt>=u.price?e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-3 flex items-center gap-3",children:[e.jsx("div",{className:"bg-amber-100 p-1.5 rounded-lg",children:e.jsx(Fs,{className:"w-3.5 h-3.5 text-amber-600"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"font-semibold text-amber-800 text-xs",children:["Wallet (",l(Bt),")"]}),e.jsx($t,{className:"w-4 h-4 text-amber-400"})]}),e.jsx("p",{className:"text-[11px] text-amber-700 leading-snug mt-0.5",children:a("checkout.wallet_restricted_warning").replace("{product}",`${u.platform} ${u.service_type}`)})]})]}):Bt>=u.price?e.jsxs("button",{onClick:()=>{if(!T){m(a("checkout.fill_all_fields"),{type:"warning"});return}da()},disabled:!T||Xt,className:"w-full bg-gradient-to-r from-emerald-500 to-green-600 text-white py-3 rounded-xl font-bold text-sm shadow-lg hover:shadow-xl hover:scale-[1.01] transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group",children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex items-center justify-center gap-2",children:[e.jsx(kt,{className:"w-4 h-4"}),e.jsx("span",{children:Xt?a("checkout.processing"):a("checkout.pay_wallet").replace("${amount}",l(u.price))}),Xt&&e.jsx(Ne,{className:"w-4 h-4 animate-spin"})]})]}):Bt>0?e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-3 flex items-center gap-3",children:[e.jsx("div",{className:"bg-slate-100 p-1.5 rounded-lg",children:e.jsx(kt,{className:"w-3.5 h-3.5 text-slate-500"})}),e.jsx("span",{className:"text-xs text-slate-500",children:a("checkout.wallet_need_more").replace("${balance}",l(Bt)).replace("${needed}",l(u.price-Bt))})]}):null),!U&&!ue&&!xt&&t&&u&&ps>0&&ps>=u.price&&e.jsxs("button",{onClick:()=>
1106{if(!T){m(a("checkout.fill_all_fields"),{type:"warning"});return}rl()},disabled:!T||Xt,className:"w-full bg-gradient-to-r from-amber-500 to-orange-500 text-white py-3 rounded-xl font-bold text-sm shadow-lg hover:shadow-xl hover:scale-[1.01] transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group",children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex items-center justify-center gap-2",children:[e.jsx(rs,{className:"w-4 h-4"}),e.jsx("span",{children:Xt?a("checkout.processing"):a("checkout.pay_gift").replace("${amount}",l(u.price)).replace("{label}",a("checkout.gift_balance"))}),Xt&&e.jsx(Ne,{className:"w-4 h-4 animate-spin"})]})]}),(()=>{const te=(at==null?void 0:at.methods)||[],xe=te.some(vt=>vt.code==="finby"),Ie=te.some(vt=>vt.code==="payoup"),Ge=te.some(vt=>vt.code==="stripe"),De=te.some(vt=>vt.code==="paypal"),$e=te.some(vt=>vt.code==="glodipay"),Ke=!!(u!=null&&u.linkPaymentEnabled),et=[];xe&&et.push({code:"finby",label:a("checkout.visa_mastercard"),startFn:ss}),Ie&&et.push({code:"payoup",label:a("checkout.payoup_desc"),startFn:ma}),$e&&et.push({code:"glodipay",label:a("checkout.glodipay_desc"),startFn:zt});const jt=Ge||De,Et=et.length+(jt?1:0)+(Ke?1:0)>1;if(U||ue||xt||!T)return null;const Xs=(vt,Nr)=>e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:`absolute -inset-0.5 bg-gradient-to-r ${Nr?"from-blue-500 via-indigo-500 to-blue-600":"from-sky-400 via-blue-500 to-sky-600"} rounded-2xl opacity-70 group-hover:opacity-100 blur-sm transition-opacity duration-500`}),e.jsxs("button",{onClick:async()=>{if(!T||!u){m(a("checkout.fill_all_fields"),{type:"warning"});return}if(X&&X.is_private){m(a("checkout.private_profile_short"),{type:"warning"});return}await vt.startFn()},disabled:Xt||Tt,className:"w-full relative overflow-hidden bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 rounded-xl text-white transition-all duration-300 hover:shadow-2xl active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/[0.07] to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"}),e.jsxs("div",{className:"relative px-4 py-3",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2.5",children:[e.jsxs("svg",{className:"w-5 h-5 text-blue-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"}),e.jsx("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]}),e.jsx("span",{className:"font-bold text-sm tracking-wide",children:a("checkout.pay_with_card")}),e.jsx("svg",{className:"w-4 h-4 text-slate-400 group-hover:translate-x-1 group-hover:text-white transition-all duration-300",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})]}),e.jsxs("div",{className:"flex items-center justify-center gap-1.5 mt-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 bg-white/10 backdrop-blur-sm rounded-md px-2 py-0.5",children:[e.jsxs("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:[e.jsx("path",{d:"M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944 2.79A.72.72 0 0 1 5.655 2.2h6.486c2.14 0 3.628.563 4.423 1.673.373.52.622 1.1.727 1.738.11.665.055 1.46-.166 2.434l-.009.044v.39l.305.172c.523.274.94.597 1.254.975.44.53.726 1.2.844 1.99.123.815.076 1.785-.138 2.882-.244 1.263-.64 2.362-1.176 3.266a6.22 6.22 0 0 1-1.822 2.03c-.73.53-1.592.915-2.567 1.142
1106-.946.222-2.03.333-3.222.333H9.38a.896.896 0 0 0-.885.74l-.035.186-1.2 7.598-.024.151a.175.175 0 0 1-.16.127z",opacity:".4"}),e.jsx("path",{d:"M19.354 8.073c-.01.065-.023.13-.037.197-.8 4.1-3.533 5.517-7.024 5.517h-1.777a.865.865 0 0 0-.854.732l-.91 5.77-.258 1.634a.456.456 0 0 0 .45.525h3.16a.76.76 0 0 0 .75-.64l.03-.163.595-3.768.038-.207a.76.76 0 0 1 .75-.64h.474c3.057 0 5.452-1.242 6.152-4.835.293-1.5.141-2.754-.632-3.636a3.02 3.02 0 0 0-.867-.687z"})]}),e.jsx("svg",{className:"w-6 h-3",viewBox:"0 0 48 16",fill:"currentColor",children:e.jsx("path",{d:"M18.45 1.47l-5.67 13.06h-3.7L5.62 4.26c-.22-.84-.41-1.15-1.07-1.51C3.63 2.28 2.12 1.85.73 1.58l.06-.11h5.97c.76 0 1.45.51 1.62 1.39l1.48 7.85L13.5 1.47h3.67zm14.5 8.79c.01-3.44-4.77-3.63-4.73-5.17.01-.47.46-.97 1.43-1.09.48-.06 1.82-.11 3.34.58l.59-2.78A9.1 9.1 0 0 0 30.37.73c-3.47 0-5.92 1.84-5.94 4.48-.02 1.95 1.74 3.04 3.07 3.69 1.37.66 1.83 1.09 1.83 1.68-.01.91-1.1 1.31-2.11 1.32-1.77.03-2.79-.48-3.61-.86l-.64 2.98c.82.37 2.33.7 3.9.71 3.69 0 6.1-1.82 6.11-4.64zm9.15 4.8h3.24l-2.83-13.06h-2.99a1.6 1.6 0 0 0-1.5.99l-5.27 12.07h3.69l.73-2.03h4.5l.43 2.03zm-3.91-4.82l1.85-5.08 1.06 5.08h-2.91zM24.24 1.47l-2.9 13.06h-3.51l2.9-13.06h3.51z"})}),e.jsxs("svg",{className:"w-6 h-3.5",viewBox:"0 0 48 30",fill:"currentColor",children:[e.jsx("circle",{cx:"18",cy:"15",r:"14",fill:"#EB001B",opacity:"0.8"}),e.jsx("circle",{cx:"30",cy:"15",r:"14",fill:"#F79E1B",opacity:"0.8"}),e.jsx("path",{d:"M24 4.5a14 14 0 0 1 5.2 10.5A14 14 0 0 1 24 25.5 14 14 0 0 1 18.8 15 14 14 0 0 1 24 4.5z",fill:"#FF5F00",opacity:"0.9"})]})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 bg-white/10 backdrop-blur-sm rounded-md px-2 py-0.5",children:[e.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),e.jsx("span",{className:"text-[9px] font-semibold text-white/70 tracking-wide",children:a("checkout.apple_pay")})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 bg-white/10 backdrop-blur-sm rounded-md px-2 py-0.5",children:[e.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12.24 10.285V14.4h6.806c-.275 1.765-2.056 5.174-6.806 5.174-4.095 0-7.439-3.389-7.439-7.574s3.345-7.574 7.439-7.574c2.33 0 3.891.989 4.785 1.849l3.254-3.138C18.189 1.186 15.479 0 12.24 0c-6.635 0-12 5.365-12 12s5.365 12 12 12c6.926 0 11.52-4.869 11.52-11.726 0-.788-.085-1.39-.189-1.989H12.24z"})}),e.jsx("span",{className:"text-[9px] font-semibold text-white/70 tracking-wide",children:a("checkout.google_pay")})]})]})]})]})]},vt.code),as=(vt,Nr)=>e.jsxs("button",{onClick:async()=>{if(!T||!u){m(a("checkout.fill_all_fields"),{type:"warning"});return}if(X&&X.is_private){m(a("checkout.private_profile_short"),{type:"warning"});return}await vt.startFn()},disabled:Xt||Tt,className:`w-full bg-gradient-to-r ${Nr} text-white py-3 rounded-xl font-bold text-sm shadow-lg hover:shadow-xl hover:scale-[1.01] transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group`,children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex flex-col items-center justify-center leading-tight",children:[e.jsxs("span",{className:"flex items-center space-x-2",children:[e.jsx(Nt,{className:"w-4 h-4"}),e.jsx("span",{children:a("checkout.pay_with_card")}),e.jsx(tt,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]}),e.jsx("span",{className:"text-[10px] font-normal opacity-75 mt-0.5 tracking-wide",children:vt.label})]})]},vt.code);if(Et)return e.jsxs(e.Fragment,{children:[(t||!la)&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-1 h-px bg-slate-200"}),e.jsx("span",{className:"text-[10px] text-slate-400 font-medium uppercase tracking-wider",children:a("checkout.choose_payment")}),e.jsx("div",{className:"flex-1 h-px bg-slate-200"})]}),et.map((vt,Nr)=>vt.code==="finby"?Xs(vt,Nr===0):as(vt,Nr===0?p.color:"from-sky-500 to-blue-600")),(jt||Ke)&&e.jsxs("button",{onClick:Ys,disabled:!T||Xt||Tt,className:"w-full bg-gradient-to-r from-slate-600 to-slate-700 text-white py-3 rounded-xl font-bold text-sm shadow-lg hover:shadow-xl hover:scale-[1.01] transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group",children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex flex-col items-center justify-center leading-tight",children:[e.jsxs("span",{className:"flex items-center space-x-2",children:[e.jsx(Nt,{className:"w-4 h-4"}),e.jsx("span",{children:a("checkout.proceed_payment")}),e.jsx(tt,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]}),e.jsx("span",{className:"text-[10px] font-normal opacity-75 mt-0.5 tracking-wide",children:a("checkout.credit_card_subtitle")})]})]})]});if(et.length===1&&!jt&&!Ke){const vt=et[0];return vt.code==="finby"?Xs(vt,!0):as(vt,p.color)}return jt||Ke||et.length>0?e.jsxs(e.Fragment,{children:[t&&u&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-1 h-px bg-slate-200"}),e.jsx("span",{className:"text-[10px] text-slate-400 font-medium uppercase tracking-wider",children:a("checkout.or")}),e.jsx("div",{className:"flex-1 h-px bg-slate-200"})]}),e.jsxs("button",{onClick:Ys,disabled:!T||Xt||Tt,className:`w-full bg-gradient-to-r ${p.color} text-white py-3 rounded-xl font-bold text-sm shadow-lg hover:shadow-xl hover:scale-[1.01] transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group`,children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsx("span",{className:"relative flex flex-col items-center justify-center leading-tight",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"flex items-center space-x-2",children:[e.jsx(Nt,{className:"w-4 h-4"}),e.jsx("span",{children:a("checkout.proceed_payment")}),e.jsx(tt,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]}),e.jsx("span",{className:"text-[10px] font-normal opacity-75 mt-0.5 tracking-wide",children:a("checkout.credit_card_subtitle")})]}):la?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"flex items-center space-x-2",children:[e.jsx(Nt,{className:"w-4 h-4"}),e.jsx("span",{children:a("checkout.continue_account")}
1106),e.jsx(tt,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]}),e.jsx("span",{className:"text-[10px] font-normal opacity-75 mt-0.5 tracking-wide",children:a("checkout.credit_card_subtitle")})]}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"flex items-center space-x-2",children:[e.jsx(Nt,{className:"w-4 h-4"}),e.jsx("span",{children:a("checkout.proceed_payment")}),e.jsx(tt,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]}),e.jsx("span",{className:"text-[10px] font-normal opacity-75 mt-0.5 tracking-wide",children:a("checkout.credit_card_subtitle")})]})})]})]}):null})(),!U&&!ue&&!xt&&T&&(((In=at==null?void 0:at.methods)==null?void 0:In.some(te=>te.code==="bank_transfer"&&!0))||((ao=at==null?void 0:at.methods)==null?void 0:ao.some(te=>te.code==="crypto"&&!0)))&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-transparent via-slate-200 to-transparent"}),e.jsx("span",{className:"text-xs text-slate-400 font-medium",children:a("bank_transfer.or_pay_with_bank")}),e.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-transparent via-slate-200 to-transparent"})]}),!U&&!ue&&!xt&&T&&((ro=at==null?void 0:at.methods)==null?void 0:ro.some(te=>te.code==="bank_transfer"))&&e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-emerald-500 via-teal-500 to-cyan-500 rounded-2xl opacity-60 group-hover:opacity-100 blur-sm transition-opacity duration-500"}),e.jsxs("button",{onClick:()=>{oe(!0)},className:"w-full relative overflow-hidden flex items-center justify-center gap-3 py-4 bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600 rounded-xl text-white transition-all duration-300 hover:shadow-2xl active:scale-[0.98]",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/15 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"}),e.jsx("span",{className:"absolute top-0 right-0 bg-white/20 backdrop-blur-sm text-[10px] font-extrabold uppercase tracking-wider px-3 py-1 rounded-bl-lg rounded-tr-xl text-white",children:a("checkout.off_25")}),e.jsxs("div",{className:"relative flex items-center justify-center gap-3 w-full",children:[e.jsxs("svg",{className:"w-5 h-5 drop-shadow-sm flex-shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"3",y1:"22",x2:"21",y2:"22"}),e.jsx("line",{x1:"6",y1:"18",x2:"6",y2:"11"}),e.jsx("line",{x1:"10",y1:"18",x2:"10",y2:"11"}),e.jsx("line",{x1:"14",y1:"18",x2:"14",y2:"11"}),e.jsx("line",{x1:"18",y1:"18",x2:"18",y2:"11"}),e.jsx("polygon",{points:"12 2 20 7 4 7"})]}),e.jsxs("div",{className:"flex flex-col items-center leading-tight",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:"font-bold text-sm tracking-wide",children:a("bank_transfer.title")}),e.jsx("span",{className:"text-sm font-extrabold",children:u!=null&&u.priceTry&&x==="TR"?n(u.priceTry,"TRY"):l(u?u.price*.75:0)}),e.jsx("span",{className:"text-xs text-white/50 line-through",children:u!=null&&u.originalPriceTry&&x==="TR"?n(u.originalPriceTry,"TRY"):l(u?u.price:0)})]}),e.jsxs("span",{className:"text-[9px] font-semibold text-white/70 tracking-widest uppercase",children:["24/7 ",a("bank_transfer.instant_automatic")]})]})]})]})]}),!U&&!ue&&!xt&&T&&((_c=at==null?void 0:at.methods)==null?void 0:_c.some(te=>te.code==="crypto"))&&e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-500 rounded-2xl opacity-60 group-hover:opacity-100 blur-sm transition-opacity duration-500"}),e.jsxs("button",{onClick:()=>{K(!0)},className:"w-full relative overflow-hidden flex items-center justify-center gap-3 py-4 bg-gradient-to-r from-amber-600 via-orange-600 to-yellow-600 rounded-xl text-white transition-all duration-300 hover:shadow-2xl active:scale-[0.98]",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/15 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"}),e.jsx("span",{className:"absolute top-0 right-0 bg-white/20 backdrop-blur-sm text-[10px] font-extrabold uppercase tracking-wider px-3 py-1 rounded-bl-lg rounded-tr-xl text-white",children:a("checkout.off_25")}),e.jsxs("div",{className:"relative flex items-center justify-center gap-3 w-full",children:[e.jsx(gn,{className:"w-5 h-5 drop-shadow-sm flex-shrink-0"}),e.jsxs("div",{className:"flex flex-col items-center leading-tight",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:"font-bold text-sm tracking-wide",children:a("crypto.payment_title")}),e.jsx("span",{className:"text-sm font-extrabold",children:u!=null&&u.priceTry&&x==="TR"?n(u.priceTry,"TRY"):l(u?le(u.price)*.75:0)}),e.jsx("span",{className:"text-xs text-white/50 line-through",children:u!=null&&u.originalPriceTry&&x==="TR"?n(u.originalPriceTry,"TRY"):l(u?le(u.price):0)})]}),e.jsx("span",{className:"text-[9px] font-semibold text-white/70 tracking-widest uppercase",children:a("checkout.crypto_subtitle")})]})]})]})]}),!1,U&&u&&T&&e.jsx(Hx,{ref:je,t:a,packageId:u.id,username:T,link:T,price:M
1106ath.round(le(u.price)*.75*100)/100,originalPrice:le(u.price),fixedTryPrice:x==="TR"&&u.priceTry?u.priceTry:null,fixedTryOriginalPrice:x==="TR"&&u.originalPriceTry?u.originalPriceTry:null,serviceColor:p.color,user:t,guestName:Z,guestEmail:P,onSuccess:()=>{oe(!1),vr()},onBack:()=>oe(!1)}),ue&&u&&T&&e.jsx(Ox,{ref:q,amount:Math.round(le(u.price)*.75*100)/100,originalAmount:le(u.price),fixedTryPrice:x==="TR"&&u.priceTry?u.priceTry:null,fixedTryOriginalPrice:x==="TR"&&u.originalPriceTry?u.originalPriceTry:null,orderInfo:{platform:(p==null?void 0:p.platform)||"",serviceType:k,username:T,quantity:u.quantity,link:T,serviceId:(u==null?void 0:u.providerServiceId)||void 0,packageId:u==null?void 0:u.id},guestName:Z||void 0,guestEmail:P||void 0,onSuccess:te=>{K(!1),S("success"),R(`CRYPTO-${te.substring(0,8).toUpperCase()}`)},onCancel:()=>K(!1)}),xt&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>{Dt(null),bs(null)},className:"flex items-center gap-1.5 text-sm text-slate-500 hover:text-slate-700 transition",children:[e.jsx(Ua,{className:"w-4 h-4"}),a("common.back")]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-emerald-600",children:[e.jsx($t,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"font-medium",children:a("checkout.secure_payment")})]})]}),e.jsx("div",{className:"rounded-xl overflow-hidden border border-slate-200 shadow-sm bg-white",children:e.jsx("iframe",{src:xt,className:"w-full border-0",style:{height:"480px",minHeight:"400px"},allow:"payment",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-top-navigation",title:a("checkout.glodipay_iframe_title")})}),e.jsx("p",{className:"text-[10px] text-slate-400 text-center",children:a("checkout.glodipay_secure")})]}),la&&!t&&e.jsx("div",{className:"bg-amber-50 border-2 border-amber-200 rounded-2xl p-5",children:e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx("div",{className:"bg-gradient-to-br from-amber-500 to-orange-500 p-2.5 rounded-xl shadow-lg",children:e.jsx(Vt,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-bold text-amber-800 mb-1",children:a("storefront.signup_discount")}),e.jsx("div",{className:"text-sm text-amber-700",children:a("checkout.signup_discount_text").replace("{discounted}",l(le(u.price))).replace("{original}",l(G(u.price)))})]})]})}),e.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-[10px] sm:text-xs text-slate-400 flex-nowrap whitespace-nowrap",children:[e.jsx(lt,{className:"w-3 h-3 text-green-500 flex-shrink-0"}),e.jsx("span",{children:a("checkout.paypal_checkout")}),e.jsx("span",{className:"text-slate-300 mx-0.5",children:"|"}),e.jsx($t,{className:"w-3 h-3 text-blue-500 flex-shrink-0"}),e.jsx("span",{children:a("checkout.no_password")}),e.jsx("span",{className:"text-slate-300 mx-0.5",children:"|"}),e.jsx(rt,{className:"w-3 h-3 text-amber-500 flex-shrink-0"}),e.jsx("span",{children:a("checkout.instant_delivery")})]})]})}),C==="auth"&&u&&e.jsx("div",{className:"bg-white rounded-2xl p-4 md:p-6 border border-slate-200 shadow-xl",children:e.jsx(Q4,{onSuccess:()=>Rt(),checkoutState:{selectedService:p,selectedServiceType:k,selectedPackage:u,username:T,verifiedProfile:X,verifiedPost:we}})}),C==="link_payment"&&u&&t&&e.jsxs("div",{className:"bg-white rounded-2xl p-4 md:p-6 border border-slate-200 shadow-xl text-center space-y-6",children:[e.jsx("div",{className:"w-16 h-16 mx-auto bg-amber-50 rounded-2xl flex items-center justify-center mb-4 border border-amber-200",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-8 h-8 text-amber-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900",children:a("checkout.payment")}),e.jsx("p",{className:"text-slate-500 text-sm max-w-sm mx-auto",children:a("checkout.link_payment_description")}),e.jsxs("div",{className:"bg-slate-50 rounded-xl p-4 text-left space-y-3 border border-slate-200",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-slate-500",children:a("checkout.platform")}),e.jsx("span",{className:"text-sm font-medium text-slate-900",children:p==null?void 0:p.platform})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-slate-500",children:a("checkout.service")}),e.jsx("span",{className:"text-sm font-medium text-slate-900",children:Gr(k,p==null?void 0:p.platform)})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-slate-500",children:a("checkout.quantity")}),e.jsx("span",{className:"text-sm font-medium text-slate-900",children:(Sc=u.quantity)==null?void 0:Sc.toLocaleStr
1106ing()})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-slate-500",children:a("checkout.target")}),e.jsx("span",{className:"text-sm font-medium text-slate-900 truncate max-w-[200px]",children:T})]}),e.jsxs("div",{className:"border-t border-slate-200 pt-3 flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-bold text-slate-700",children:a("checkout.total")}),e.jsx("span",{className:"text-lg font-black bg-gradient-to-r from-green-600 to-emerald-600 bg-clip-text text-transparent",children:l(Number(u.price))})]})]}),t&&u&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-emerald-50 border-2 border-emerald-200 rounded-2xl p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-gradient-to-br from-emerald-500 to-green-600 p-2 rounded-lg",children:e.jsx(kt,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900 text-sm",children:a("checkout.wallet_balance_label")}),e.jsx("div",{className:"text-xs text-slate-500",children:a("checkout.amount_available").replace("{amount}",l(Bt))})]})]}),e.jsx("span",{className:`text-lg font-bold ${Bt>=u.price?"text-emerald-600":"text-slate-400"}`,children:l(Bt)})]}),Bt>=u.price?e.jsxs("button",{onClick:()=>da(),disabled:Xt,className:"w-full bg-gradient-to-r from-emerald-500 to-green-600 text-white py-3.5 rounded-xl font-bold text-base shadow-lg hover:shadow-xl hover:scale-[1.02] transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group",children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex items-center justify-center space-x-2",children:[e.jsx(kt,{className:"w-5 h-5"}),e.jsx("span",{children:Xt?a("checkout.processing"):a("checkout.pay_wallet_amount").replace("{amount}",l(Number(u.price)))}),Xt&&e.jsx(Ne,{className:"w-5 h-5 animate-spin"})]})]}):e.jsx("div",{className:"text-xs text-center text-slate-500 bg-slate-100 rounded-lg py-2",children:Bt>0?a("checkout.wallet_need_more").replace("{amount}",l(u.price-Bt)):a("checkout.wallet_add_funds")})]}),ps>0&&ps>=u.price&&e.jsxs("div",{className:"bg-amber-50 border-2 border-amber-200 rounded-2xl p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"bg-gradient-to-br from-amber-500 to-orange-500 p-2 rounded-lg",children:e.jsx(rs,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-slate-900 text-sm",children:a("checkout.gift_balance")}),e.jsx("div",{className:"text-xs text-slate-500",children:a("checkout.amount_available").replace("{amount}",l(ps))})]})]}),e.jsxs("span",{className:"text-lg font-bold text-amber-600",children:["$",l(ps)]})]}),e.jsxs("button",{onClick:()=>rl(),disabled:Xt,className:"w-full bg-gradient-to-r from-amber-500 to-orange-500 text-white py-3.5 rounded-xl font-bold text-base shadow-lg hover:shadow-xl hover:scale-[1.02] transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group",children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex items-center justify-center space-x-2",children:[e.jsx(rs,{className:"w-5 h-5"}),e.jsx("span",{children:Xt?a("checkout.processing"):a("checkout.pay_gift_amount").replace("{amount}",l(Number(u.price))).replace("{label}",a("checkout.gift_balance"))}),Xt&&e.jsx(Ne,{className:"w-5 h-5 animate-spin"})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-1 h-px bg-slate-200"}),e.jsx("span",{className:"text-xs font-medium text-slate-400 uppercase",children:a("checkout.or_divider")}),e.jsx("div",{className:"flex-1 h-px bg-slate-200"})]}),e.jsxs("button",{onClick:async()=>{var te;try{const xe="https://kdqsajuhvcmxsnttdetg.supabase.co",{supabase:Ie}=await _s(async()=>{const{supabase:et}=await Promise.resolve().then(()=>rn);return{supabase:et}},void 0),{data:{session:Ge}}=await Ie.auth.getSession(),De=(Ge==null?void 0:Ge.access_token)||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ke=await(await fetch(`${xe}/functions/v1/create_link_payment`,{method:"POST",headers:{Authorization:`Bearer ${De}`,"Content-Type":"application/json"},body:JSON.stringify({packageId:u.id,username:T,link:T})})).json();Ke.success&&Ke.paymentUrl?(window.open(Ke.paymentUrl,"_blank"),R("LINK-"+((te=Ke.linkPaymentId)==null?void 0:te.substring(0,8).toUpperCase())),M("link_payment"),S("success")):m(Ke.error||a("checkout.link_payment_error"),{type:"error"})}catch(xe){console.error("Link payment error:",xe),m(a("checkout.link_payment_error"),{type:"error"})}},className:"w-full py-3.5 bg-gradient-to-r from-amber-500 to-orange-500 text-white font-bold rounded-xl hover:from-amber-600 hover:to-orange-600 transition-all shadow-lg shadow-amber-500/25 flex items-center justify-center gap-2",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),a("checkout.link_payment_go")]}),e.jsx("p",{className:"text-xs text-slate-400",children:a("checkout.link_payment_note")})]}),C==="payment"&&u&&e.jsx("div",{className:"bg-white rounded-2xl p-4 md:p-6 border border-slate-200 shadow-xl",children:t&&s?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("h3",{className:"font-bold text-slate-900 mb-3 text-center text-sm",children:a("checkout.choose_payment")}),e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2.5 bg-slate-50 rounded-xl px-4 py-3 border border-slate-200",children:[e.jsx(kt,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("checkout.your_wallet")}),e.jsx("span",{className:"ml-auto text-sm font-bold text-slate-900",children:l(Bt)})]}),ps>0&&e.jsxs("div",{className:"flex-1 flex items-center gap-2.5 bg-slate-50 rounded-xl px-4 py-3 border border-slate-200",children:[e.jsx(rs,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{className:"text-xs text-slate-500",children:a("checkout.your_gift_balance")}),e.jsx("span",{className:"ml-auto text-sm font-bold text-slate-900",children:l(ps)})]})]}),(()=>{var Da,ol,vt,Nr,Pc,Ac,cl,Mc,Ec;const te=((Da=at==null?void 0:at.methods)==null?void 0:Da.some(Ft=>Ft.code==="stripe"))??!1,xe=((ol=at==null?void 0:at.methods)==null?void 0:ol.some(Ft=>Ft.code==="paypal"))??!1,Ie=((vt=at==null?void 0:at.methods)==null?void 0:vt.some(Ft=>Ft.code==="crypto"))??!1,Ge=((Nr=at==null?void 0:at.methods)==null?void 0:Nr.some(Ft=>Ft.code==="bank_transfer"))??!1,De=((Pc=at==null?void 0:at.methods)==null?void 0:Pc.some(Ft=>Ft.code==="payoup"))??!1,$e=((Ac=at==null?void 0:at.methods)==null?void 0:Ac.some(Ft=>Ft.code==="glodipay"))??!1,Ke=((cl=at==null?void 0:at.methods)==null?void 0:cl.some(Ft=>Ft.code==="finby"))??!1,et=le(u.price),jt=Bt>=et,Et=ps>=et,xa=Kt.some(Ft=>Ft.platform.toLowerCase()===(u.platform||"").toLowerCase()&&Ft.service_type.toLowerCase()===(u.service_type||"").toLowerCase()),Xs=xa?`${u.platform} ${u.service_type}`:"",as=[];if(Ke&&as.push({id:"finby",label:a("checkout.pay_with_card"),desc:a("checkout.finby_desc"),icon:e.jsx(Nt,{className:"w-5 h-5"}),activeColor:"border-blue-600 bg-blue-600/10"}),jt&&!xa&&as.push({id:"wallet",label:a("checkout.wallet_balance"),desc:a("checkout.amount_available").replace("{amount}",l(Bt)),icon:e.jsx(kt,{className:"w-5 h-5"}),activeColor:"border-blue-500 bg-blue-500/10"}),ps>0&&Et&&as.push({id:"gift_balance",label:a("checkout.gift_balance"),desc:a("checkout.amount_available").replace("{amount}",l(ps)),icon:e.jsx(rs,{className:"w-5 h-5"}),activeColor:"border-emerald-500 bg-emerald-500/10"}),te&&as.push({id:"stripe",label:a("checkout.pay_with_card"),desc:a("checkout.stripe_desc"),icon:e.jsx(Nt,{className:"w-5 h-5"}),activeColor:"border-blue-500 bg-blue-500/10"}),xe&&as.push({id:"paypal",label:a("checkout.credit_debit_card"),desc:a("checkout.stripe_desc"),icon:e.jsx(Nt,{className:"w-5 h-5"}),activeColor:"border-blue-500 bg-blue-500/10"}),Ie&&as.push({id:"crypto",label:a("checkout.pay_with_crypto"),desc:a("checkout.crypto_desc"),icon:e.jsx(rt,{className:"w-5 h-5"}),activeColor:"border-blue-500 bg-blue-500/10"}),Ge&&as.push({id:"bank_transfer",label:a("bank_transfer.title"),desc:a("checkout.bank_desc"),icon:e.jsx(kt,{className:"w-5 h-5"}),badge:a("checkout.off_25"),activeColor:"border-blue-500 bg-blue-500/10"}),De&&as.push({id:"payoup",label:a("checkout.pay_with_card"),desc:a("checkout.payoup_desc"),icon:e.jsx(Nt,{className:"w-5 h-5"}),activeColor:"border-sky-500 bg-sky-500/10"}),$e&&as.push({id:"glodipay",label:a("checkout.glodipay_label"),desc:a("checkout.glodipay_desc"),icon:e.jsx(wt,{className:"w-5 h-5"}),activeColor:"border-teal-500 bg-teal-500/10"}),as.length>0&&!as.some(Ft=>Ft.id===Ee)&&Oe(as[0].id),(!jt||xa)&&Ee==="wallet"){const Ft=as.find(L=>
1106L.id==="stripe"),kr=(Ft==null?void 0:Ft.id)||((Mc=as[0])==null?void 0:Mc.id);kr&&Oe(kr)}if(ps>0&&!Et&&Ee==="gift_balance"){const Ft=(Ec=as[0])==null?void 0:Ec.id;Ft&&Oe(Ft)}return e.jsxs("div",{className:"space-y-2 mb-6",children:[xa&&jt&&e.jsxs("div",{className:"flex items-start gap-3 bg-amber-50 border border-amber-200 rounded-xl px-4 py-3 mb-3",children:[e.jsx(Fs,{className:"w-5 h-5 text-amber-600 shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-amber-800 leading-relaxed",children:a("checkout.wallet_restricted_warning").replace("{product}",Xs)})]}),as.map(Ft=>{const kr=Ee===Ft.id;return e.jsxs("button",{onClick:()=>{Ft.disabled||(Oe(Ft.id),Ft.id==="crypto"?w("pay_crypto"):Ft.id==="bank_transfer"&&w("pay_bank"))},disabled:Ft.disabled,className:`w-full flex items-center gap-3.5 px-4 py-3.5 rounded-xl border transition-all duration-200 ${kr?Ft.activeColor:"border-slate-200 bg-slate-50 hover:border-slate-300 hover:bg-slate-100"} ${Ft.disabled?"opacity-40 cursor-not-allowed":"cursor-pointer"}`,children:[e.jsx("div",{className:`w-10 h-10 rounded-lg flex items-center justify-center shrink-0 transition-colors duration-200 ${kr?"bg-blue-600 text-white":"bg-slate-100 text-slate-500"}`,children:Ft.icon}),e.jsxs("div",{className:"flex-1 text-left min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`font-semibold text-sm transition-colors ${kr?"text-slate-900":"text-slate-700"}`,children:Ft.label}),Ft.badge&&e.jsx("span",{className:"bg-gradient-to-r from-red-500 to-orange-500 text-white text-[10px] font-bold px-2 py-0.5 rounded-full leading-none",children:Ft.badge})]}),e.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:Ft.desc})]}),e.jsx("div",{className:`w-5 h-5 rounded-full border-2 shrink-0 flex items-center justify-center transition-all duration-200 ${kr?"border-blue-500 bg-blue-500 scale-110":"border-slate-300"}`,children:kr&&e.jsx(Lt,{className:"w-3 h-3 text-white"})})]},Ft.id)}),e.jsxs("a",{href:"https://wa.me/+447424750508",target:"_blank",rel:"noopener noreferrer",className:"hidden group relative w-full flex items-center gap-3.5 px-4 py-3.5 rounded-xl bg-gradient-to-r from-[#25D366] to-[#128C7E] text-white shadow-md hover:shadow-xl transition-all duration-300 active:scale-[0.99] overflow-hidden",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/15 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"}),e.jsx("div",{className:"w-10 h-10 rounded-lg bg-white/15 flex items-center justify-center shrink-0",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5 fill-current","aria-hidden":"true",children:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}),e.jsxs("div",{className:"flex-1 text-left min-w-0",children:[e.jsx("span",{className:"font-semibold text-sm block",children:a("storefront.live_support_247")}),e.jsx("p",{className:"text-xs text-white/80 mt-0.5",children:a("checkout.chat_whatsapp")})]})]})]})})()]}),Ee==="wallet"&&e.jsxs("div",{className:"text-center",children:[e.jsx("button",{onClick:da,disabled:Xt,className:"w-full bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3 md:py-4 rounded-xl font-bold text-sm md:text-lg shadow-xl hover:shadow-2xl hover:scale-105 transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group",children:Xt?e.jsxs("span",{className:"flex items-center justify-center space-x-2",children:[e.jsx(Ne,{className:"w-4 h-4 md:w-5 md:h-5 animate-spin"}),e.jsx("span",{children:a("checkout.processing")})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex items-center justify-center space-x-2",children:[e.jsx(Nt,{className:"w-4 h-4 md:w-5 md:h-5"}),e.jsx("span",{children:a("checkout.pay_wallet_amount").replace("{amount}",l(le(u.price)))}),e.jsx(ne,{className:"w-4 h-4 md:w-5 md:h-5 group-hover:scale-110 transition-transform"})]})]})}),Bt<le(u.price)&&e.jsx("button",{onClick:()=>it(),className:"w-full mt-3 bg-gradient-to-r from-green-600 to-emerald-600 text-white py-2.5 md:py-3 rounded-xl font-semibold text-xs md:text-sm shadow-lg hover:shadow-xl hover:scale-105 transition-all duration-300",children:a("checkout.add_to_wallet").replace("{amount}",l(le(u.price)-Bt))})]}),Ee==="gift_balance"&&e.jsx("div",{className:"text-center",children:e.jsx("button",{onClick:rl,disabled:Xt,className:"w-full bg-gradient-to-r from-emerald-600 to-teal-600 text-white py-3 md:py-4 rounded-xl font-bold text-sm md:text-lg shadow-xl hover:shadow-2xl hover:scale-105 transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 relative overflow-hidden group",children:Xt?e.jsxs("span",{className:"flex items-center justify-center space-x-2",children:[e.jsx(Ne,{className:"w-4 h-4 md:w-5 md:h-5 animate-spin"}),e.jsx("span",{children:a("checkout.processing")})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity"}),e.jsxs("span",{className:"relative flex items-center justify-center space-x-2",children:[e.jsx(rs,{className:"w-4 h-4 md:w-5 md:h-5"}),e.jsxs("span",{children:[a("checkout.pay_gift_button")," ",l(le(u.price))]}),e.jsx(ne,{className:"w-4 h-4 md:w-5 md:h-5 group-hover:scale-110 transition-transform"})]})]})})}),Ee==="stripe"&&e.jsx(jf,{amount:le(u.price),customerName:Z||"",customerEmail:P||(t==null?void 0:t.email)||"",cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:le(u.price),service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],onSuccess:te=>{R(te),S("success")},onError:te=>{console.error("Stripe payment error:",te)},onCancel:()=>{S("checkout")}}),Ee==="paypal"&&e.jsx(of,{cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:le(u.price),service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],customerEmail:P,onSuccess:Ja,onError:il}),Ee==="crypto"&&e.jsx(Ox,{amount:le(u.price),fixedTryPrice:x==="TR"&&u.priceTry?u.priceTry:null,fixedTryOriginalPrice
1106:x==="TR"&&u.originalPriceTry?u.originalPriceTry:null,orderInfo:{platform:(p==null?void 0:p.platform)||"",serviceType:k,username:T,quantity:u.quantity,link:T,serviceId:(u==null?void 0:u.providerServiceId)||void 0,packageId:u==null?void 0:u.id},guestName:t?void 0:Z,guestEmail:t?void 0:P,onSuccess:te=>{S("success"),R(`CRYPTO-${te.substring(0,8).toUpperCase()}`)},onCancel:()=>{S("checkout")}}),Ee==="bank_transfer"&&e.jsx(Hx,{t:a,packageId:u.id,username:T,link:T,price:Math.round(le(u.price)*.75*100)/100,originalPrice:le(u.price),fixedTryPrice:x==="TR"&&u.priceTry?u.priceTry:null,fixedTryOriginalPrice:x==="TR"&&u.originalPriceTry?u.originalPriceTry:null,serviceColor:(p==null?void 0:p.color)||"from-blue-600 to-cyan-600",user:t,guestName:Z,guestEmail:P,onSuccess:()=>{vr()},onBack:()=>Oe("stripe")}),Ee==="payoup"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"p-4 bg-sky-50 border border-sky-200 rounded-xl",children:e.jsx("p",{className:"text-sm text-sky-800 text-center",children:a("checkout.redirect_payment_info")})}),e.jsxs("button",{onClick:async()=>{try{const te="https://kdqsajuhvcmxsnttdetg.supabase.co",xe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ie=le(u.price),De=await(await fetch(`${te}/functions/v1/payoup_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${xe}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:Ie,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ie,...x==="TR"&&u.priceTry?{amountTry:u.priceTry,currencyOverride:"TRY"}:{},returnOrigin:window.location.origin,countryCode:x})})).json();De!=null&&De.success&&De.paymentUrl?window.location.href=De.paymentUrl:m((De==null?void 0:De.error)||a("checkout.unable_start_payment"),{type:"error"})}catch(te){console.error("Payoup error:",te),m(a("checkout.unable_start_retry"),{type:"error"})}},className:"w-full py-3.5 bg-gradient-to-r from-sky-500 to-cyan-600 hover:from-sky-600 hover:to-cyan-700 text-white font-bold rounded-xl shadow-lg transition-all duration-200 flex items-center justify-center gap-2",children:[e.jsx(Nt,{className:"w-5 h-5"}),a("checkout.pay_now_amount").replace("{amount}",x==="TR"&&u.priceTry?n(u.priceTry,"TRY"):l(le(u.price)))]})]}),Ee==="glodipay"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"p-4 bg-teal-50 border border-teal-200 rounded-xl",children:e.jsx("p",{className:"text-sm text-teal-800 text-center",children:a("checkout.redirect_secure")})}),e.jsxs("button",{onClick:async()=>{try{const te="https://kdqsajuhvcmxsnttdetg.supabase.co",xe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ie=le(u.price),Ge=x==="TR"&&u.priceTry?u.priceTry:null,$e=await(await fetch(`${te}/functions/v1/glodipay_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${xe}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:Ie,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ie,...Ge?{amountTry:Ge,currencyOverride:"TRY"}:{},returnOrigin:window.location.origin,countryCode:x})})).json();$e!=null&&$e.success&&$e.paymentUrl?window.location.href=$e.paymentUrl:m(($e==null?void 0:$e.error)||a("checkout.unable_start_payment"),{type:"error"})}catch(te){console.error("GlodiPay error:",te),m(a("checkout.unable_start_retry"),{type:"error"})}},className:"w-full py-3.5 bg-gradient-to-r from-teal-500 to-emerald-600 hover:from-teal-600 hover:to-emerald-700 text-white font-bold rounded-xl shadow-lg transition-all duration-200 flex items-center justify-center gap-2",children:[e.jsx(wt,{className:"w-5 h-5"}),a("checkout.pay_now_amount").replace("{amount}",x==="TR"&&u.priceTry?n(u.priceTry,"TRY"):l(le(u.price)))]})]}),Ee==="finby"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"p-3 bg-slate-50 border border-slate-200 rounded-xl",children:e.jsx("p",{className:"text-xs text-slate-500 text-center",children:a("checkout.redirect_payment_info")})}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-blue-500 via-indigo-500 to-blue-600 rounded-2xl opacity-70 group-hover:opacity-100 blur-sm transition-opacity duration-500"}),e.jsx("button",{onClick:async()=>{try{const te="https://kdqsajuhvcmxsnttdetg.supabase.co",xe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ie=le(u.price),Ge=x==="TR"&&u.priceTry?u.priceTry:null,$e=await(await fetch(`${te}/functions/v1/finby_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${xe}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:Ie,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ie,...Ge?{amountTry:Ge,currencyOverride:"TRY"}:{},displayCurrency:i,returnOrigin:window.location.origin})})).json();$e!=null&&$e.success&&$e.paymentUrl?window.location.href=$e.paymentUrl:m(($e==null?void 0:$e.error)||a("checkout.unable_start_payment"),{type:"error"})}catch(te){console.error("Finby error:",te),m(a("checkout.unable_start_retry"),{type:"error"})}},className:"w-full relative overflow-hidden bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 rounded-xl text-white transition-all duration-300 hover:shadow-2xl active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsxs("div",{className:"relative px-5 py-3.5",children:[e.jsx("div",{className:"flex items-center justify-center gap-3",children:e.jsx("span",{className:"font-bold text-sm",children:a("checkout.pay_now_amount").replace("{amount}",x==="TR"&&u.priceTry?n(u.priceTry,"TRY"):l(le(u.price)))})}),e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-2",children:[e.jsxs("span",{className:"flex items-center gap-1 bg-white/10 backdrop-blur-sm px-2 py-0.5 rounded text-[10px] font-medium text-white/90",children:[e.jsxs("svg",{viewBox:"0 0 24 24",className:"w-3 h-3",fill:"
1106currentColor",children:[e.jsx("rect",{x:"1",y:"4",width:"22",height:"16",rx:"3",fill:"none",stroke:"currentColor",strokeWidth:"2"}),e.jsx("path",{d:"M4 12h3l1-3 2 6 2-4h3",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Visa"]}),e.jsxs("span",{className:"flex items-center gap-1 bg-white/10 backdrop-blur-sm px-2 py-0.5 rounded text-[10px] font-medium text-white/90",children:[e.jsxs("svg",{viewBox:"0 0 24 24",className:"w-3 h-3",children:[e.jsx("circle",{cx:"9",cy:"12",r:"5",fill:"#eb001b",opacity:"0.8"}),e.jsx("circle",{cx:"15",cy:"12",r:"5",fill:"#f79e1b",opacity:"0.8"})]}),"MC"]}),e.jsxs("span",{className:"flex items-center gap-1 bg-white/10 backdrop-blur-sm px-2 py-0.5 rounded text-[10px] font-medium text-white/90",children:[e.jsx("svg",{viewBox:"0 0 24 24",className:"w-3 h-3",fill:"currentColor",children:e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),"Pay"]}),e.jsxs("span",{className:"flex items-center gap-1 bg-white/10 backdrop-blur-sm px-2 py-0.5 rounded text-[10px] font-medium text-white/90",children:[e.jsx("svg",{viewBox:"0 0 24 24",className:"w-3 h-3",fill:"currentColor",children:e.jsx("path",{d:"M12.24 10.285V14.4h6.806c-.275 1.765-2.056 5.174-6.806 5.174-4.095 0-7.439-3.389-7.439-7.574s3.345-7.574 7.439-7.574c2.33 0 3.891.989 4.785 1.849l3.254-3.138C18.189 1.186 15.479 0 12.24 0c-6.635 0-12 5.365-12 12s5.365 12 12 12c6.926 0 11.52-4.869 11.52-11.726 0-.788-.085-1.39-.189-1.989H12.24z"})}),"GPay"]})]})]})})]})]})]})}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("h3",{className:"font-bold text-slate-900 mb-3 text-center text-sm",children:a("checkout.choose_payment")}),(()=>{var jt,Et,xa,Xs,as,Da,ol;const te=((jt=at==null?void 0:at.methods)==null?void 0:jt.some(vt=>vt.code==="stripe"))??!1,xe=((Et=at==null?void 0:at.methods)==null?void 0:Et.some(vt=>vt.code==="paypal"))??!1,Ie=((xa=at==null?void 0:at.methods)==null?void 0:xa.some(vt=>vt.code==="crypto"))??!1,Ge=((Xs=at==null?void 0:at.methods)==null?void 0:Xs.some(vt=>vt.code==="bank_transfer"))??!1,De=((as=at==null?void 0:at.methods)==null?void 0:as.some(vt=>vt.code==="payoup"))??!1,$e=((Da=at==null?void 0:at.methods)==null?void 0:Da.some(vt=>vt.code==="glodipay"))??!1,Ke=((ol=at==null?void 0:at.methods)==null?void 0:ol.some(vt=>vt.code==="finby"))??!1,et=[];return Ke&&et.push({id:"finby",label:a("checkout.pay_with_card"),desc:a("checkout.finby_desc"),icon:e.jsx(Nt,{className:"w-5 h-5"}),activeColor:"border-blue-600 bg-blue-50/60"}),te&&et.push({id:"stripe",label:a("checkout.pay_with_card"),desc:a("checkout.stripe_desc"),icon:e.jsx(Nt,{className:"w-5 h-5"}),activeColor:"border-blue-500 bg-blue-50/60"}),xe&&et.push({id:"paypal",label:"PayPal",desc:a("checkout.fast_secure"),icon:e.jsx(Nt,{className:"w-5 h-5"}),activeColor:"border-blue-500 bg-blue-50/60"}),De&&et.push({id:"payoup",label:a("checkout.pay_with_card"),desc:a("checkout.payoup_desc"),icon:e.jsx(Nt,{className:"w-5 h-5"}),activeColor:"border-sky-500 bg-sky-50/60"}),$e&&et.push({id:"glodipay",label:a("checkout.glodipay_label"),desc:a("checkout.glodipay_desc"),icon:e.jsx(wt,{className:"w-5 h-5"}),activeColor:"border-teal-500 bg-teal-50/60"}),Ie&&et.push({id:"crypto",label:a("crypto.payment_title"),desc:a("checkout.crypto_desc"),icon:e.jsx(gn,{className:"w-5 h-5"}),badge:a("checkout.off_25"),activeColor:"border-amber-500 bg-amber-500/10"}),Ge&&et.push({id:"bank_transfer",label:a("bank_transfer.title"),desc:a("checkout.instant_automatic"),icon:e.jsx(Jt,{className:"w-5 h-5"}),badge:a("checkout.off_25"),activeColor:"border-emerald-500 bg-emerald-50/60"}),et.length>0&&!et.some(vt=>vt.id===Ee)&&Oe(et[0].id),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 gap-2 md:gap-3",children:et.map(vt=>e.jsxs("button",{onClick:()=>Oe(vt.id),className:`relative flex flex-col items-center gap-1 md:gap-2 p-3 md:p-4 roun
1106ded-xl border-2 transition-all duration-200 ${Ee===vt.id?vt.activeColor+" shadow-md scale-[1.02]":"border-slate-200 hover:border-slate-300 bg-slate-50"}`,children:[vt.badge&&e.jsx("span",{className:"absolute -top-2 -right-2 bg-gradient-to-r from-amber-500 to-orange-500 text-white text-[9px] font-bold px-2 py-0.5 rounded-full",children:vt.badge}),e.jsx("div",{className:`${Ee===vt.id?"text-blue-600":"text-slate-500"}`,children:vt.icon}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:`text-xs md:text-sm font-bold ${Ee===vt.id?"text-slate-900":"text-slate-700"}`,children:vt.label}),e.jsx("div",{className:"text-[9px] md:text-[10px] text-slate-400",children:vt.desc})]})]},vt.id))}),e.jsxs("a",{href:"https://wa.me/+447424750508",target:"_blank",rel:"noopener noreferrer",className:"hidden group relative mt-3 w-full flex items-center justify-center gap-3 px-4 py-3 rounded-xl bg-gradient-to-r from-[#25D366] to-[#128C7E] text-white shadow-md hover:shadow-xl transition-all duration-300 active:scale-[0.99] overflow-hidden",children:[e.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/15 to-white/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"}),e.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5 fill-current flex-shrink-0","aria-hidden":"true",children:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),e.jsxs("div",{className:"flex flex-col items-center leading-tight",children:[e.jsx("span",{className:"font-bold text-sm",children:a("storefront.live_support_247")}),e.jsx("span",{className:"text-[9px] font-semibold text-white/85 tracking-widest uppercase",children:a("checkout.chat_whatsapp")})]})]})]})})()]}),Ee==="stripe"&&e.jsx(jf,{amount:le(u.price),customerName:Z||"",customerEmail:P||"",cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:le(u.price),service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],onSuccess:te=>{R(te),S("success")},onError:te=>{console.error("Stripe payment error:",te)},onCancel:()=>{S("checkout")}}),Ee==="paypal"&&e.jsx(of,{cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:le(u.price),service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],customerEmail:P,onSuccess:Ja,onError:il}),Ee==="crypto"&&e.jsx(Ox,{amount:le(u.price),fixedTryPrice:x==="TR"&&u.priceTry?u.priceTry:null,fixedTryOriginalPrice:x==="TR"&&u.originalPriceTry?u.originalPriceTry:null,orderInfo:{platform:(p==null?void 0:p.platform)||"",serviceType:k,username:T,quantity:u.quantity,link:T,serviceId:(u==null?void 0:u.providerServiceId)||void 0,packageId:u==null?void 0:u.id},guestName:Z,guestEmail:P,onSuccess:te=>{S("success"),R(`CRYPTO-${te.substring(0,8).toUpperCase()}`)},onCancel:()=>{S("checkout")}}),Ee==="bank_transfer"&&e.jsx(Hx,{t:a,packageId:u.id,username:T,link:T,price:Math.round(le(u.price)*.75*100)/100,originalPrice:le(u.price),fixedTryPrice:x==="TR"&&u.priceTry?u.priceTry:null,fixedTryOriginalPrice
1106:x==="TR"&&u.originalPriceTry?u.originalPriceTry:null,serviceColor:(p==null?void 0:p.color)||"from-blue-600 to-cyan-600",user:t,guestName:Z,guestEmail:P,onSuccess:()=>{vr()},onBack:()=>Oe("stripe")}),Ee==="payoup"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"p-4 bg-sky-50 border border-sky-200 rounded-xl",children:e.jsx("p",{className:"text-sm text-sky-800 text-center",children:a("checkout.redirect_payment_info")})}),e.jsxs("button",{onClick:async()=>{try{const te="https://kdqsajuhvcmxsnttdetg.supabase.co",xe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ie=le(u.price),De=await(await fetch(`${te}/functions/v1/payoup_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${xe}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:Ie,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ie,...x==="TR"&&u.priceTry?{amountTry:u.priceTry,currencyOverride:"TRY"}:{},returnOrigin:window.location.origin,countryCode:x})})).json();De!=null&&De.success&&De.paymentUrl?window.location.href=De.paymentUrl:m((De==null?void 0:De.error)||a("checkout.unable_start_payment"),{type:"error"})}catch(te){console.error("Payoup error:",te),m(a("checkout.unable_start_retry"),{type:"error"})}},className:"w-full py-3.5 bg-gradient-to-r from-sky-500 to-cyan-600 hover:from-sky-600 hover:to-cyan-700 text-white font-bold rounded-xl shadow-lg transition-all duration-200 flex items-center justify-center gap-2",children:[e.jsx(Nt,{className:"w-5 h-5"}),a("checkout.pay_now_amount").replace("{amount}",x==="TR"&&u.priceTry?n(u.priceTry,"TRY"):l(le(u.price)))]})]}),Ee==="glodipay"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"p-4 bg-teal-50 border border-teal-200 rounded-xl",children:e.jsx("p",{className:"text-sm text-teal-800 text-center",children:a("checkout.redirect_secure")})}),e.jsxs("button",{onClick:async()=>{try{const te="https://kdqsajuhvcmxsnttdetg.supabase.co",xe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ie=le(u.price),Ge=x==="TR"&&u.priceTry?u.priceTry:null,$e=await(await fetch(`${te}/functions/v1/glodipay_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${xe}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:Ie,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ie,...Ge?{amountTry:Ge,currencyOverride:"TRY"}:{},returnOrigin:window.location.origin,countryCode:x})})).json();$e!=null&&$e.success&&$e.paymentUrl?window.location.href=$e.paymentUrl:m(($e==null?void 0:$e.error)||a("checkout.unable_start_payment"),{type:"error"})}catch(te){console.error("GlodiPay error:",te),m(a("checkout.unable_start_retry"),{type:"error"})}},className:"w-full py-3.5 bg-gradient-to-r from-teal-500 to-emerald-600 hover:from-teal-600 hover:to-emerald-700 text-white font-bold rounded-xl shadow-lg transition-all duration-200 flex items-center justify-center gap-2",children:[e.jsx(wt,{className:"w-5 h-5"}),a("checkout.pay_now_amount").replace("{amount}",x==="TR"&&u.priceTry?n(u.priceTry,"TRY"):l(le(u.price)))]})]}),Ee==="finby"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"p-3 bg-slate-50 border border-slate-200 rounded-xl",children:e.jsx("p",{className:"text-xs text-slate-500 text-center",children:a("checkout.redirect_payment_info")})}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-blue-500 via-indigo-500 to-blue-600 rounded-2xl opacity-70 group-hover:opacity-100 blur-sm transition-opacity duration-500"}),e.jsx("button",{onClick:async()=>{try{const te="https://kdqsajuhvcmxsnttdetg.supabase.co",xe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkcXNhanVodmNteHNudHRkZXRnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njc5MDcxNDAsImV4cCI6MjA4MzQ4MzE0MH0.BjT23nDjQOWTUTI-phDtmMD75ozGGS0owDTa0rzKDpc",Ie=le(u.price),Ge=x==="TR"&&u.priceTry?u.priceTry:null,$e=await(await fetch(`${te}/functions/v1/finby_create_payment`,{method:"POST",headers:{Authorization:`Bearer ${xe}`,"Content-Type":"application/json"},body:JSON.stringify({customerName:(Z||(s==null?void 0:s.full_name)||T||"Guest").toString(),customerEmail:P||(s==null?void 0:s.email)||void 0,cart:[{platform:(p==null?void 0:p.platform)||"",service_type:k,quantity:u.quantity,price:Ie,service_id:(u==null?void 0:u.providerServiceId)||void 0,package_id:u==null?void 0:u.id,link:T}],amount:Ie,...Ge?{amountTry:Ge,currencyOverride:"TRY"}:{},displayCurrency:i,returnOrigin:window.location.origin})})).json();$e!=null&&$e.success&&$e.paymentUrl?window.location.href=$e.paymentUrl:m(($e==null?void 0:$e.error)||a("checkout.unable_start_payment"),{type:"error"})}catch(te){console.error("Finby error:",te),m(a("checkout.unable_start_retry"),{type:"error"})}},className:"w-full relative overflow-hidden bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 rounded-xl text-white transition-all duration-300 hover:shadow-2xl active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsxs("div",{className:"relative px-5 py-3.5",children:[e.jsx("div",{className:"flex items-center justify-center gap-3",children:e.jsx("span",{className:"font-bold text-sm",children:a("checkout.pay_now_amount").replace("{amount}",x==="TR"&&u.priceTry?n(u.priceTry,"TRY"):l(le(u.price)))})}),e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-2",children:[e.jsxs("span",{className:"flex items-center gap-1 bg-white/10 backdrop-blur-sm px-2 py-0.5 rounded text-[10px] font-medium text-white/90",children:[e.jsxs("svg",{viewBox:"0 0 24 24",className:"w-3 h-3",fill:"
1106currentColor",children:[e.jsx("rect",{x:"1",y:"4",width:"22",height:"16",rx:"3",fill:"none",stroke:"currentColor",strokeWidth:"2"}),e.jsx("path",{d:"M4 12h3l1-3 2 6 2-4h3",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Visa"]}),e.jsxs("span",{className:"flex items-center gap-1 bg-white/10 backdrop-blur-sm px-2 py-0.5 rounded text-[10px] font-medium text-white/90",children:[e.jsxs("svg",{viewBox:"0 0 24 24",className:"w-3 h-3",children:[e.jsx("circle",{cx:"9",cy:"12",r:"5",fill:"#eb001b",opacity:"0.8"}),e.jsx("circle",{cx:"15",cy:"12",r:"5",fill:"#f79e1b",opacity:"0.8"})]}),"MC"]}),e.jsxs("span",{className:"flex items-center gap-1 bg-white/10 backdrop-blur-sm px-2 py-0.5 rounded text-[10px] font-medium text-white/90",children:[e.jsx("svg",{viewBox:"0 0 24 24",className:"w-3 h-3",fill:"currentColor",children:e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),"Pay"]}),e.jsxs("span",{className:"flex items-center gap-1 bg-white/10 backdrop-blur-sm px-2 py-0.5 rounded text-[10px] font-medium text-white/90",children:[e.jsx("svg",{viewBox:"0 0 24 24",className:"w-3 h-3",fill:"currentColor",children:e.jsx("path",{d:"M12.24 10.285V14.4h6.806c-.275 1.765-2.056 5.174-6.806 5.174-4.095 0-7.439-3.389-7.439-7.574s3.345-7.574 7.439-7.574c2.33 0 3.891.989 4.785 1.849l3.254-3.138C18.189 1.186 15.479 0 12.24 0c-6.635 0-12 5.365-12 12s5.365 12 12 12c6.926 0 11.52-4.869 11.52-11.726 0-.788-.085-1.39-.189-1.989H12.24z"})}),"GPay"]})]})]})})]})]})]})})}),C==="success"&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"text-center py-5",children:[F!=null&&F.startsWith("LINK-")?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative inline-block mb-4",children:[e.jsx("div",{className:"relative inline-flex p-4 rounded-full bg-gradient-to-br from-amber-50 to-orange-100 shadow-lg",children:e.jsx(Zu,{className:"w-10 h-10 text-amber-600 animate-pulse"})}),e.jsx("div",{className:"absolute -bottom-1 -right-1 bg-gradient-to-r from-amber-500 to-orange-500 text-white text-[10px] font-bold px-2 py-0.5 rounded-full shadow",children:a("checkout.link_payment_review_badge")})]}),e.jsx("h2",{className:"text-xl font-bold text-slate-900 mb-1",children:a("checkout.link_payment_review_title")}),e.jsx("p",{className:"text-sm text-slate-500 mb-5 max-w-xs mx-auto",children:a("checkout.link_payment_review_subtitle")})]}):F!=null&&F.startsWith("CRYPTO-")?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative inline-block mb-4",children:[e.jsx("div",{className:"relative inline-flex p-4 rounded-full bg-gradient-to-br from-amber-50 to-orange-100 shadow-lg",children:e.jsx(Ze,{className:"w-10 h-10 text-amber-600"})}),e.jsx("div",{className:"absolute -bottom-1 -right-1 bg-gradient-to-r from-amber-500 to-orange-500 text-white text-[10px] font-bold px-2 py-0.5 rounded-full shadow",children:a("checkout.pending_badge")})]}),e.jsx("h2",{className:"text-xl font-bold text-slate-900 mb-1",children:a("checkout.payment_under_review")}),e.jsx("p",{className:"text-sm text-slate-500 mb-5 max-w-xs mx-auto",children:a("checkout.review_desc")})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative inline-block mb-4",children:[e.jsx("div",{className:"relative inline-flex p-4 rounded-full bg-gradient-to-br from-green-50 to-emerald-100 shadow-lg",children:e.jsx(ne,{className:"w-10 h-10 text-green-600"})}),e.jsx("div",{className:"absolute -bottom-1 -right-1 bg-gradient-to-r from-green-500 to-emerald-500 text-white text-[10px] font-bold px-2 py-0.5 rounded-full shadow",children:a("checkout.success_badge")})]}),e.jsx("h2",{className:"text-xl font-bold text-slate-900 mb-1",children:a("checkout.payment_successful")}),e.jsx("p",{className:"text-sm text-slate-500 mb-2 max-w-xs mx-auto",children:a("checkout.order_confirmed_desc")}),e.jsxs("div",{className:"flex items-center justify-center gap-2 text-xs text-blue-600 mb-5",children:[e.jsx(gs,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:a("payment.email_sent_title")})]})]}
1106),e.jsxs("div",{className:"max-w-sm mx-auto space-y-3",children:[e.jsxs("div",{className:"bg-white rounded-xl p-4 border border-slate-200 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 pb-2.5 border-b border-slate-100",children:[e.jsx("div",{className:`w-1 h-5 rounded-full ${F!=null&&F.startsWith("CRYPTO-")||F!=null&&F.startsWith("LINK-")?"bg-amber-500":"bg-green-500"}`}),e.jsx("h3",{className:"text-sm font-bold text-slate-900",children:a("checkout.order_details")})]}),e.jsxs("div",{className:"space-y-2.5 text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:a("checkout.platform")}),e.jsx("span",{className:"font-semibold text-slate-900",children:p==null?void 0:p.platform})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:a("checkout.service")}),e.jsx("span",{className:"font-semibold text-slate-900",children:Gr(k,p==null?void 0:p.platform)})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-500",children:a("checkout.quantity")}),e.jsx("span",{className:"font-semibold text-slate-900",children:Ga((u==null?void 0:u.quantity)||0)})]}),e.jsxs("div",{className:"flex justify-between items-start gap-3",children:[e.jsx("span",{className:"text-slate-500 shrink-0",children:a("checkout.username_label")}),e.jsxs("span",{className:"font-semibold text-slate-900 text-right break-all min-w-0",children:["@",T]})]}),F&&e.jsxs("div",{className:`flex justify-between items-start gap-3 -mx-4 px-4 py-2 ${F.startsWith("CRYPTO-")||F.startsWith("LINK-")?"bg-amber-50":"bg-blue-50"}`,children:[e.jsx("span",{className:"text-slate-500 font-medium shrink-0",children:a("checkout.order_number")}),e.jsx("span",{className:`font-mono font-bold text-xs text-right break-all min-w-0 ${F.startsWith("CRYPTO-")||F.startsWith("LINK-")?"text-amber-600":"text-blue-600"}`,children:F})]}),e.jsx("div",{className:"border-t border-slate-200 pt-3 mt-1",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-bold text-slate-900",children:a("checkout.total_paid")}),e.jsx("span",{className:`text-2xl font-bold bg-clip-text text-transparent ${F!=null&&F.startsWith("CRYPTO-")||F!=null&&F.startsWith("LINK-")?"bg-gradient-to-r from-amber-600 to-orange-600":"bg-gradient-to-r from-green-600 to-emerald-600"}`,children:l(u?le(u.price):0)})]})})]})]}),((Cc=p==null?void 0:p.platform)==null?void 0:Cc.toLowerCase())==="tiktok"&&(k==null?void 0:k.toLowerCase().includes("follower"))&&e.jsxs("div",{className:"bg-slate-900 rounded-xl p-3.5 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_30%_20%,rgba(0,255,255,0.08),transparent_50%)]"}),e.jsxs("div",{className:"relative flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-cyan-400 to-teal-500 flex items-center justify-center flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-white",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z"})})}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-xs font-bold text-white",children:a("storefront.natural_delivery")}),e.jsx("div",{className:"text-[11px] text-slate-400",children:a("storefront.tiktok_delivery_rate")})]})]})]}),((Ic=p==null?void 0:p.platform)==null?void 0:Ic.toLowerCase())==="youtube"&&e.jsxs("div",{className:"bg-slate-900 rounded-xl p-3.5 relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_30%_20%,rgba(255,0,0,0.08),transparent_50%)]"}),e.jsxs("div",{className:"relative flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-red-500 to-red-600 flex items-center justify-center flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-white",viewBox:"0 0 24 24",fill:"
1106currentColor",children:e.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-xs font-bold text-white",children:a("storefront.natural_delivery")}),e.jsx("div",{className:"text-[11px] text-slate-400",children:a("storefront.youtube_delivery_rate")})]})]})]})]}),e.jsx("p",{className:"text-[11px] text-slate-400 mt-4",children:a("checkout.need_help")})]})})]})]})})}),e.jsx(Rx,{isOpen:Te,onClose:()=>{Me(!1),Xe(void 0)},initialShowAddFunds:Fe,initialTab:ke}),e.jsx(Fx,{isOpen:ce,onClose:()=>Le(!1)}),ft&&e.jsx(zx,{onClose:()=>{pe(!1),window.location.reload()}}),dt&&e.jsx($x,{onClose:()=>{ot(!1),window.location.reload()}}),e.jsx(vf,{activePage:V,onClose:()=>Ce(null)}),f!=="admin"&&e.jsx(l3,{phoneNumber:Ul,trPhoneNumber:kn,message:sl,trMessage:Lr,countryCode:x}),f!=="admin"&&!j&&e.jsx(J3,{}),f==="home"&&((Tc=zr.trust_badges_floating)==null?void 0:Tc.is_enabled)!==!1&&e.jsx(x6,{}),qe.show&&e.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>ct({show:!1,product:""})}),e.jsxs("div",{className:"relative bg-white rounded-2xl shadow-2xl max-w-md w-full overflow-hidden animate-in fade-in zoom-in duration-200",children:[e.jsx("div",{className:"bg-gradient-to-r from-amber-500 to-orange-500 px-6 py-5",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"bg-white/20 p-2.5 rounded-xl",children:e.jsx($t,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-white",children:a("checkout.wallet_restriction_modal_title")}),e.jsx("p",{className:"text-amber-100 text-sm",children:qe.product})]})]})}),e.jsxs("div",{className:"px-6 py-5 space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3 bg-amber-50 border border-amber-200 rounded-xl p-4",children:[e.jsx(Fs,{className:"w-5 h-5 text-amber-500 shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-amber-800 leading-relaxed",children:a("checkout.wallet_restriction_modal_reason").replace("{product}",qe.product)})]}),e.jsxs("div",{className:"flex items-start gap-3 bg-blue-50 border border-blue-200 rounded-xl p-4",children:[e.jsx(Nt,{className:"w-5 h-5 text-blue-500 shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-blue-800 leading-relaxed",children:a("checkout.wallet_restriction_modal_alternative")})]})]}),e.jsxs("div",{className:"px-6 pb-6 flex gap-3",children:[e.jsxs("button",{onClick:()=>{var xe;ct({show:!1,product:""}),((xe=at==null?void 0:at.methods)==null?void 0:xe.stripe)&&Oe("stripe")},className:"flex-1 bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3 rounded-xl font-semibold text-sm shadow-lg hover:shadow-xl hover:scale-[1.02] transition-all duration-200 flex items-center justify-center gap-2",children:[e.jsx(Nt,{className:"w-4 h-4"}),a("checkout.wallet_restriction_modal_use_card")]}),e.jsx("button",{onClick:()=>ct({show:!1,product:""}),className:"px-5 py-3 rounded-xl font-semibold text-sm text-slate-600 bg-slate-100 hover:bg-slate-200 transition-all duration-200",children:a("checkout.wallet_restriction_modal_close")})]})]})]})]})}var Wf;try{const t="followx_device_id";if(!localStorage.getItem(t)){const s=((Wf=crypto==null?void 0:crypto.randomUUID)==null?void 0:Wf.call(crypto))??`dev-${Date.now()}-${Math.random().toString(36).slice(2)}`;localStorage.setItem(t,s)}}catch{}ly(document.getElementById("root")).render(e.jsx(o.StrictMode,{children:e.jsx(hw,{children:e.jsx(f4,{children:e.jsx(w4,{children:e.jsx(L4,{children:e.jsx(Y6,{})})})})})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.