PageSourceSearch

https://kumiskiri.com/assets/index-DujvXU0O.js

js kumiskiri.com collected 2026-10-06 22:17:15 UTC 701,060 bytes, 640 lines download raw bytes

vendor: 6,045 bytes, lines 1-17
1(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const p of m.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function o(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(d){if(d.ep)return;d.ep=!0;const m=o(d);fetch(d.href,m)}})();function Ig(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ld={exports:{}},Oi={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and 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 oh;function Zg(){if(oh)return Oi;oh=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(c,d,m){var p=null;if(m!==void 0&&(p=""+m),d.key!==void 0&&(p=""+d.key),"key"in d){m={};for(var y in d)y!=="key"&&(m[y]=d[y])}else m=d;return d=m.ref,{$$typeof:n,type:c,key:p,ref:d!==void 0?d:null,props:m}}return Oi.Fragment=i,Oi.jsx=o,Oi.jsxs=o,Oi}var ch;function Kg(){return ch||(ch=1,ld.exports=Zg()),ld.exports}var a=Kg(),sd={exports:{}},Se={};/**
10 * @license React
11 * react.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and 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 uh;function Jg(){if(uh)return Se;uh=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),p=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function D(R){return R===null||typeof R!="object"?null:(R=w&&R[w]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,S={};function k(R,P,J){this.props=R,this.context=P,this.refs=S,this.updater=J||C}k.prototype.isReactComponent={},k.prototype.setState=function(R,P){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,P,"setState")},k.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=k.prototype;function U(R,P,J){this.props=R,this.context=P,this.refs=S,this.updater=J||C}var A=U.prototype=new _;A.constructor=U,T(A,k.prototype),A.isPureReactComponent=!0;var G=Array.isArray;function E(){}var z={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function ie(R,P,J){var le=J.ref;return{$$typeof:n,type:R,key:P,ref:le!==void 0?le:null,props:J}}function ce(R,P){return ie(R.type,P,R.props)}function B(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function W(R){var P={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(J){return P[J]})}var re=/\/+/g;function V(R,P){return typeof R=="object"&&R!==null&&R.key!=null?W(""+R.key):P.toString(36)}function oe(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(E,E):(R.status="pending",R.then(function(P){R.status==="pending"&&(R.status="fulfilled",R.value=P)},function(P){R.status==="pending"&&(R.status="rejected",R.reason=P)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function O(R,P,J,le,ue){var ge=typeof R;(ge==="undefined"||ge==="boolean")&&(R=null);var Ne=!1;if(R===null)Ne=!0;else switch(ge){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(R.$$typeof){case n:case i:Ne=!0;break;case g:return Ne=R._init,O(Ne(R._payload),P,J,le,ue)}}if(Ne)return ue=ue(R),Ne=le===""?"."+V(R,0):le,G(ue)?(J="",Ne!=null&&(J=Ne.replace(re,"$&/")+"/"),O(ue,P,J,"",function(te){return te})):ue!=null&&(B(ue)&&(ue=ce(ue,J+(ue.key==null||R&&R.key===ue.key?"":(""+ue.key).replace(re,"$&/")+"/")+Ne)),P.push(ue)),1;Ne=0;var tt=le===""?".":le+":";if(G(R))for(var qe=0;qe<R.length;qe++)le=R[qe],ge=tt+V(le,qe),Ne+=O(le,P,J,ge,ue);else if(qe=D(R),typeof qe=="function")for(R=qe.call(R),qe=0;!(le=R.next()).done;)le=le.value,ge=tt+V(le,qe++),Ne+=O(le,P,J,ge,ue);else if(ge==="object"){if(typeof R.then=="function")return O(oe(R),P,J,le,ue);throw P=String(R),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function Q(R,P,J){if(R==null)return R;var le=[],ue=0;return O(R,le,"","",function(ge){return P.call(J,ge,ue++)}),le}function ae(R){if(R._status===-1){var P=R._result;P=P(),P.then(function(J){(R._status===0||R._status===-1)&&(R._status=1,R._result=J)},function(J){(R._status===0||R._status===-1)&&(R._status=2,R._result=J)}),R._status===-1&&(R._status=0,R._result=P)}if(R._status===1)return R._result.default;throw R._result}var he=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)}
vendor: 15,409 bytes, lines 17-41
17,me={map:Q,forEach:function(R,P,J){Q(R,function(){P.apply(this,arguments)},J)},count:function(R){var P=0;return Q(R,function(){P++}),P},toArray:function(R){return Q(R,function(P){return P})||[]},only:function(R){if(!B(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Se.Activity=v,Se.Children=me,Se.Component=k,Se.Fragment=o,Se.Profiler=d,Se.PureComponent=U,Se.StrictMode=c,Se.Suspense=x,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Se.__COMPILER_RUNTIME={__proto__:null,c:function(R){return z.H.useMemoCache(R)}},Se.cache=function(R){return function(){return R.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(R,P,J){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var le=T({},R.props),ue=R.key;if(P!=null)for(ge in P.key!==void 0&&(ue=""+P.key),P)!K.call(P,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&P.ref===void 0||(le[ge]=P[ge]);var ge=arguments.length-2;if(ge===1)le.children=J;else if(1<ge){for(var Ne=Array(ge),tt=0;tt<ge;tt++)Ne[tt]=arguments[tt+2];le.children=Ne}return ie(R.type,ue,le)},Se.createContext=function(R){return R={$$typeof:p,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:m,_context:R},R},Se.createElement=function(R,P,J){var le,ue={},ge=null;if(P!=null)for(le in P.key!==void 0&&(ge=""+P.key),P)K.call(P,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(ue[le]=P[le]);var Ne=arguments.length-2;if(Ne===1)ue.children=J;else if(1<Ne){for(var tt=Array(Ne),qe=0;qe<Ne;qe++)tt[qe]=arguments[qe+2];ue.children=tt}if(R&&R.defaultProps)for(le in Ne=R.defaultProps,Ne)ue[le]===void 0&&(ue[le]=Ne[le]);return ie(R,ge,ue)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(R){return{$$typeof:y,render:R}},Se.isValidElement=B,Se.lazy=function(R){return{$$typeof:g,_payload:{_status:-1,_result:R},_init:ae}},Se.memo=function(R,P){return{$$typeof:f,type:R,compare:P===void 0?null:P}},Se.startTransition=function(R){var P=z.T,J={};z.T=J;try{var le=R(),ue=z.S;ue!==null&&ue(J,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(E,he)}catch(ge){he(ge)}finally{P!==null&&J.types!==null&&(P.types=J.types),z.T=P}},Se.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Se.use=function(R){return z.H.use(R)},Se.useActionState=function(R,P,J){return z.H.useActionState(R,P,J)},Se.useCallback=function(R,P){return z.H.useCallback(R,P)},Se.useContext=function(R){return z.H.useContext(R)},Se.useDebugValue=function(){},Se.useDeferredValue=function(R,P){return z.H.useDeferredValue(R,P)},Se.useEffect=function(R,P){return z.H.useEffect(R,P)},Se.useEffectEvent=function(R){return z.H.useEffectEvent(R)},Se.useId=function(){return z.H.useId()},Se.useImperativeHandle=function(R,P,J){return z.H.useImperativeHandle(R,P,J)},Se.useInsertionEffect=function(R,P){return z.H.useInsertionEffect(R,P)},Se.useLayoutEffect=function(R,P){return z.H.useLayoutEffect(R,P)},Se.useMemo=function(R,P){return z.H.useMemo(R,P)},Se.useOptimistic=function(R,P){return z.H.useOptimistic(R,P)},Se.useReducer=function(R,P,J){return z.H.useReducer(R,P,J)},Se.useRef=function(R){return z.H.useRef(R)},Se.useState=function(R){return z.H.useState(R)},Se.useSyncExternalStore=function(R,P,J){return z.H.useSyncExternalStore(R,P,J)},Se.useTransition=function(){return z.H.useTransition()},Se.version="19.2.8",Se}var dh;function Jd(){return dh||(dh=1,sd.exports=Jg()),sd.exports}var b=Jd();const Ot=Ig(b);var nd={exports:{}},Ui={},id={exports:{}},rd={};/**
18 * @license React
19 * scheduler.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and 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 */var mh;function Wg(){return mh||(mh=1,(function(n){function i(O,Q){var ae=O.length;O.push(Q);e:for(;0<ae;){var he=ae-1>>>1,me=O[he];if(0<d(me,Q))O[he]=Q,O[ae]=me,ae=he;else break e}}function o(O){return O.length===0?null:O[0]}function c(O){if(O.length===0)return null;var Q=O[0],ae=O.pop();if(ae!==Q){O[0]=ae;e:for(var he=0,me=O.length,R=me>>>1;he<R;){var P=2*(he+1)-1,J=O[P],le=P+1,ue=O[le];if(0>d(J,ae))le<me&&0>d(ue,J)?(O[he]=ue,O[le]=ae,he=le):(O[he]=J,O[P]=ae,he=P);else if(le<me&&0>d(ue,ae))O[he]=ue,O[le]=ae,he=le;else break e}}return Q}function d(O,Q){var ae=O.sortIndex-Q.sortIndex;return ae!==0?ae:O.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;n.unstable_now=function(){return m.now()}}else{var p=Date,y=p.now();n.unstable_now=function(){return p.now()-y}}var x=[],f=[],g=1,v=null,w=3,D=!1,C=!1,T=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function A(O){for(var Q=o(f);Q!==null;){if(Q.callback===null)c(f);else if(Q.startTime<=O)c(f),Q.sortIndex=Q.expirationTime,i(x,Q);else break;Q=o(f)}}function G(O){if(T=!1,A(O),!C)if(o(x)!==null)C=!0,E||(E=!0,W());else{var Q=o(f);Q!==null&&oe(G,Q.startTime-O)}}var E=!1,z=-1,K=5,ie=-1;function ce(){return S?!0:!(n.unstable_now()-ie<K)}function B(){if(S=!1,E){var O=n.unstable_now();ie=O;var Q=!0;try{e:{C=!1,T&&(T=!1,_(z),z=-1),D=!0;var ae=w;try{t:{for(A(O),v=o(x);v!==null&&!(v.expirationTime>O&&ce());){var he=v.callback;if(typeof he=="function"){v.callback=null,w=v.priorityLevel;var me=he(v.expirationTime<=O);if(O=n.unstable_now(),typeof me=="function"){v.callback=me,A(O),Q=!0;break t}v===o(x)&&c(x),A(O)}else c(x);v=o(x)}if(v!==null)Q=!0;else{var R=o(f);R!==null&&oe(G,R.startTime-O),Q=!1}}break e}finally{v=null,w=ae,D=!1}Q=void 0}}finally{Q?W():E=!1}}}var W;if(typeof U=="function")W=function(){U(B)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,V=re.port2;re.port1.onmessage=B,W=function(){V.postMessage(null)}}else W=function(){k(B,0)};function oe(O,Q){z=k(function(){O(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(O){switch(w){case 1:case 2:case 3:var Q=3;break;default:Q=w}var ae=w;w=Q;try{return O()}finally{w=ae}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(O,Q){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var ae=w;w=O;try{return Q()}finally{w=ae}},n.unstable_scheduleCallback=function(O,Q,ae){var he=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?he+ae:he):ae=he,O){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=ae+me,O={id:g++,callback:Q,priorityLevel:O,startTime:ae,expirationTime:me,sortIndex:-1},ae>he?(O.sortIndex=ae,i(f,O),o(x)===null&&O===o(f)&&(T?(_(z),z=-1):T=!0,oe(G,ae-he))):(O.sortIndex=me,i(x,O),C||D||(C=!0,E||(E=!0,W()))),O},n.unstable_shouldYield=ce,n.unstable_wrapCallback=function(O){var Q=w;return function(){var ae=w;w=Q;try{return O.apply(this,arguments)}finally{w=ae}}}})(rd)),rd}var xh;function e2(){return xh||(xh=1,id.exports=Wg()),id.exports}var od={exports:{}},Zt={};/**
26 * @license React
27 * react-dom.production.js
28 *
29 * Copyright (c) Meta Platforms, Inc. and 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 fh;function t2(){if(fh)return Zt;fh=1;var n=Jd();function i(x){var f="https://react.dev/errors/"+x;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)f+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+x+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},d=Symbol.for("react.portal");function m(x,f,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:v==null?null:""+v,children:x,containerInfo:f,implementation:g}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(x,f){if(x==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Zt.createPortal=function(x,f){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(i(299));return m(x,f,null,g)},Zt.flushSync=function(x){var f=p.T,g=c.p;try{if(p.T=null,c.p=2,x)return x()}finally{p.T=f,c.p=g,c.d.f()}},Zt.preconnect=function(x,f){typeof x=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,c.d.C(x,f))},Zt.prefetchDNS=function(x){typeof x=="string"&&c.d.D(x)},Zt.preinit=function(x,f){if(typeof x=="string"&&f&&typeof f.as=="string"){var g=f.as,v=y(g,f.crossOrigin),w=typeof f.integrity=="string"?f.integrity:void 0,D=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;g==="style"?c.d.S(x,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:D}):g==="script"&&c.d.X(x,{crossOrigin:v,integrity:w,fetchPriority:D,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Zt.preinitModule=function(x,f){if(typeof x=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var g=y(f.as,f.crossOrigin);c.d.M(x,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&c.d.M(x)},Zt.preload=function(x,f){if(typeof x=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var g=f.as,v=y(g,f.crossOrigin);c.d.L(x,g,{crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Zt.preloadModule=function(x,f){if(typeof x=="string")if(f){var g=y(f.as,f.crossOrigin);c.d.m(x,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else c.d.m(x)},Zt.requestFormReset=function(x){c.d.r(x)},Zt.unstable_batchedUpdates=function(x,f){return x(f)},Zt.useFormState=function(x,f,g){return p.H.useFormState(x,f,g)},Zt.useFormStatus=function(){return p.H.useHostTransitionStatus()},Zt.version="19.2.8",Zt}var hh;function a2(){if(hh)return od.exports;hh=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),od.exports=t2(),od.exports}/**
34 * @license React
35 * react-dom-client.production.js
36 *
37 * Copyright (c) Meta Platforms, Inc. and affiliates.
38 *
39 * This source code is licensed under the MIT license found in the
40 * LICENSE file in the root directory of this source tree.
41 */var ph;function l2(){if(ph)return Ui;ph=1;var n=e2(),i=Jd(),o=a2();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(m(e)!==e)throw Error(c(188))}function f(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(c(188));return t!==e?null:e}for(var l=e,s=t;;){var r=l.return;if(r===null)break;var u=r.alternate;if(u===null){if(s=r.return,s!==null){l=s;continue}break}if(r.child===u.child){for(u=r.child;u;){if(u===l)return x(r),e;if(u===s)return x(r),t;u=u.sibling}throw Error(c(188))}if(l.return!==s.return)l=r,s=u;else{for(var h=!1,j=r.child;j;){if(j===l){h=!0,l=r,s=u;break}if(j===s){h=!0,s=r,l=u;break}j=j.sibling}if(!h){for(j=u.child;j;){if(j===l){h=!0,l=u,s=r;break}if(j===s){h=!0,s=u,l=r;break}j=j.sibling}if(!h)throw Error(c(189))}}if(l.alternate!==s)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),U=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),ce=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function W(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function V(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case k:return"Profiler";case S:return"StrictMode";case G:return"Suspense";case E:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case U:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return t=e.displayName||null,t!==null?t:V(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return V(e(t))}catch{}}return null}var oe=Array.isArray,O=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},he=[],me=-1;function R(e){return{current:e}}function P(e){0>me||(e.current=he[me],he[me]=null,me--)}function J(e,t){me++,he[me]=e.current,e.current=t}var le=R(null),ue=R(null),ge=R(null),Ne=R(null);function tt(e,t){switch(J(ge,t),J(ue,e),J(le,null),t.nodeType){case 9:case 11:e=(e
vendor: 10,033 bytes, lines 41-48
41=t.documentElement)&&(e=e.namespaceURI)?R0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=R0(t),e=T0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(le),J(le,e)}function qe(){P(le),P(ue),P(ge)}function te(e){e.memoizedState!==null&&J(Ne,e);var t=le.current,l=T0(t,e.type);t!==l&&(J(ue,e),J(le,l))}function Ae(e){ue.current===e&&(P(le),P(ue)),Ne.current===e&&(P(Ne),Di._currentValue=ae)}var Lt,Jt;function Wt(e){if(Lt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Lt=t&&t[1]||"",Jt=-1<l.stack.indexOf(`
42    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43`+Lt+e+Jt}var de=!1;function ne(e,t){if(!e||de)return"";de=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(Y){var q=Y}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(Y){q=Y}e.call(Z.prototype)}}else{try{throw Error()}catch(Y){q=Y}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(Y){if(Y&&q&&typeof Y.stack=="string")return[Y.stack,q.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),h=u[0],j=u[1];if(h&&j){var M=h.split(`
44`),$=j.split(`
45`);for(r=s=0;s<M.length&&!M[s].includes("DetermineComponentFrameRoot");)s++;for(;r<$.length&&!$[r].includes("DetermineComponentFrameRoot");)r++;if(s===M.length||r===$.length)for(s=M.length-1,r=$.length-1;1<=s&&0<=r&&M[s]!==$[r];)r--;for(;1<=s&&0<=r;s--,r--)if(M[s]!==$[r]){if(s!==1||r!==1)do if(s--,r--,0>r||M[s]!==$[r]){var X=`
46`+M[s].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=s&&0<=r);break}}}finally{de=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Wt(l):""}function ot(e,t){switch(e.tag){case 26:case 27:case 5:return Wt(e.type);case 16:return Wt("Lazy");case 13:return e.child!==t&&t!==null?Wt("Suspense Fallback"):Wt("Suspense");case 19:return Wt("SuspenseList");case 0:case 15:return ne(e.type,!1);case 11:return ne(e.type.render,!1);case 1:return ne(e.type,!0);case 31:return Wt("Activity");default:return""}}function jt(e){try{var t="",l=null;do t+=ot(e,l),l=e,e=e.return;while(e);return t}catch(s){return`
47Error generating stack: `+s.message+`
48`+s.stack}}var Qt=Object.prototype.hasOwnProperty,pt=n.unstable_scheduleCallback,ea=n.unstable_cancelCallback,pa=n.unstable_shouldYield,Ea=n.unstable_requestPaint,dt=n.unstable_now,Ya=n.unstable_getCurrentPriorityLevel,we=n.unstable_ImmediatePriority,Te=n.unstable_UserBlockingPriority,Ke=n.unstable_NormalPriority,Ve=n.unstable_LowPriority,Ce=n.unstable_IdlePriority,Ge=n.log,ta=n.unstable_setDisableYieldValue,It=null,mt=null;function Xe(e){if(typeof Ge=="function"&&ta(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(It,e)}catch{}}var be=Math.clz32?Math.clz32:Vs,Re=Math.log,dl=Math.LN2;function Vs(e){return e>>>=0,e===0?32:31-(Re(e)/dl|0)|0}var Pe=256,ml=262144,nl=4194304;function ba(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Aa(e,t,l){var s=e.pendingLanes;if(s===0)return 0;var r=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var j=s&134217727;return j!==0?(s=j&~u,s!==0?r=ba(s):(h&=j,h!==0?r=ba(h):l||(l=j&~e,l!==0&&(r=ba(l))))):(j=s&~u,j!==0?r=ba(j):h!==0?r=ba(h):l||(l=s&~e,l!==0&&(r=ba(l)))),r===0?0:t!==0&&t!==r&&(t&u)===0&&(u=r&-r,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:r}function xt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ve(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fe(){var e=nl;return nl<<=1,(nl&62914560)===0&&(nl=4194304),e}function zt(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ma(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bt(e,t,l,s,r,u){var h=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var j=e.entanglements,M=e.expirationTimes,$=e.hiddenUpdates;for(l=h&~l;0<l;){var X=31-be(l),Z=1<<X;j[X]=0,M[X]=-1;var q=$[X];if(q!==null)for($[X]=null,X=0;X<q.length;X++){var Y=q[X];Y!==null&&(Y.lane&=-536870913)}l&=~Z}s!==0&&Va(e,s,0),u!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function Va(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-be(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|l&261930}function hs(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var s=31-be(l),r=1<<s;r&t|e[s]&t&&(e[s]|=t),l&=~r}}function ps(e,t){var l=t&-t;return l=(l&42)!==0?1:Gs(l),(l&(e.suspendedLanes|t))!==0?0:l}function Gs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Vn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xs(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:th(e.type))}function ar(e,t){var l=Q.p;try{return Q.p=e,t()}finally{Q.p=l}}var Ga=Math.random().toString(36).slice(2),kt="__reactFiber$"+Ga,Ht="__reactProps$"+Ga,il="__reactContainer$"+Ga,Gn="__reactEvents$"+Ga,Io="__reactListeners$"+Ga,Zo="__reactHandles$"+Ga,Xn="__reactResources$"+Ga,bs="__reactMarker$"+Ga;function Xa(e){delete e[kt],delete e[Ht],delete e[Gn],delete e[Io],delete e[Zo]}function Ol(e){var t=e[kt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[il]||l[kt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=H0(e);e!==null;){if(l=e[kt])return l;e=H0(e)}return t}e=l,l=e.parentNode}return null}function Ul(e){if(e=e[kt]||e[il]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Hl(e){var t=e[Xn];return t||(t=e[Xn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[bs]=!0}var lr=new Set,ys={};function xl(e,t){Fl(e,t),Fl(e+"Capture",t)}function Fl(e,t){for(ys[e]=t,e=0;e<t.length;e++)lr.add(t[e])}var Ko=RegExp("^[: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]*$"),sr={},nr={};function Jo(e){return Qt.call(nr,e)?!0:Qt.call(sr,e)?!1:Ko.test(e)?nr[e]=!0:(sr[e]=!0,!1)}function Qs(e,t,l){if(Jo(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function vs(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Ra(e,t,l,s){if(s===null)e.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+s)}}function aa(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ir(e,t,l){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(h){l=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(h){l=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function N(e){if(!e._valueTracker){var t=Qn(e)?"checked":"value";e._valueTracker=ir(e,t,""+e[t])}}function se(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),s="";return e&&(s=Qn(e)?e.checked?"true":"false":e.value),e=s,e!==l?(t.setValue(e),!0):!1}function fe(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var De=/[\n"\\]/g;function ke(e){return e.replace(De,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}
vendor: 4,388 bytes, line 48
48function Le(e,t,l,s,r,u,h,j){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+aa(t)):e.value!==""+aa(t)&&(e.value=""+aa(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Ye(e,h,aa(t)):l!=null?Ye(e,h,aa(l)):s!=null&&e.removeAttribute("value"),r==null&&u!=null&&(e.defaultChecked=!!u),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+aa(j):e.removeAttribute("name")}function nt(e,t,l,s,r,u,h,j){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){N(e);return}l=l!=null?""+aa(l):"",t=t!=null?""+aa(t):l,j||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=j?e.checked:!!s,e.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),N(e)}function Ye(e,t,l){t==="number"&&fe(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ta(e,t,l,s){if(e=e.options,t){t={};for(var r=0;r<l.length;r++)t["$"+l[r]]=!0;for(l=0;l<e.length;l++)r=t.hasOwnProperty("$"+e[l].value),e[l].selected!==r&&(e[l].selected=r),r&&s&&(e[l].defaultSelected=!0)}else{for(l=""+aa(l),t=null,r=0;r<e.length;r++){if(e[r].value===l){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function In(e,t,l){if(t!=null&&(t=""+aa(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+aa(l):""}function _m(e,t,l,s){if(t==null){if(s!=null){if(l!=null)throw Error(c(92));if(oe(s)){if(1<s.length)throw Error(c(93));s=s[0]}l=s}l==null&&(l=""),t=l}l=aa(t),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),N(e)}function Is(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Y1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Cm(e,t,l){var s=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,l):typeof l!="number"||l===0||Y1.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Em(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&l[r]!==s&&Cm(e,r,s)}else for(var u in t)t.hasOwnProperty(u)&&Cm(e,u,t[u])}function Wo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var V1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
48dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),G1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function rr(e){return G1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fl(){}var ec=null;function tc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zs=null,Ks=null;function Am(e){var t=Ul(e);if(t&&(e=t.stateNode)){var l=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(Le(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+ke(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var s=l[t];if(s!==e&&s.form===e.form){var r=s[Ht]||null;if(!r)throw Error(c(90));Le(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<l.length;t++)s=l[t],s.form===e.form&&se(s)}break e;case"textarea":In(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ta(e,!!l.multiple,t,!1)}}}var ac=!1;function Mm(e,t,l){if(ac)return e(t,l);ac=!0;try{var s=e(t);return s}finally{if(ac=!1,(Zs!==null||Ks!==null)&&(Qr(),Zs&&(t=Zs,e=Ks,Ks=Zs=null,Am(t),e)))for(t=0;t<e.length;t++)Am(e[t])}}function Zn(e,t){var l=e.stateNode;if(l===null)return null;var s=l[Ht]||null;if(s===null)return null;l=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(c(231,t,typeof l));return l}var hl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lc=!1;if(hl)try{var Kn={};Object.defineProperty(Kn,"passive",{get:function(){lc=!0}}),window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{lc=!1}var $l=null,sc=null,or=null;function Rm(){if(or)return or;var e,t=sc,l=t.length,s,r="value"in $l?$l.value:$l.textContent,u=r.length;for(e=0;e<l&&t[e]===r[e];e++);var h=l-e;for(s=1;s<=h&&t[l-s]===r[u-s];s++);return or=r.slice(e,1<s?1-s:void 0)}function cr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ur(){return!0}function Tm(){return!1}function ia(e){function t(l,s,r,u,h){this._reactName=l,this._targetInst=r,this.type=s,this.nativeEvent=u,this.target=h,this.currentTarget=null;
vendor: 6,080 bytes, line 48
48for(var j in e)e.hasOwnProperty(j)&&(l=e[j],this[j]=l?l(u):u[j]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ur:Tm,this.isPropagationStopped=Tm,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ur)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ur)},persist:function(){},isPersistent:ur}),t}var js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dr=ia(js),Jn=v({},js,{view:0,detail:0}),X1=ia(Jn),nc,ic,Wn,mr=v({},Jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wn&&(Wn&&e.type==="mousemove"?(nc=e.screenX-Wn.screenX,ic=e.screenY-Wn.screenY):ic=nc=0,Wn=e),nc)},movementY:function(e){return"movementY"in e?e.movementY:ic}}),Dm=ia(mr),Q1=v({},mr,{dataTransfer:0}),I1=ia(Q1),Z1=v({},Jn,{relatedTarget:0}),rc=ia(Z1),K1=v({},js,{animationName:0,elapsedTime:0,pseudoElement:0}),J1=ia(K1),W1=v({},js,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eb=ia(W1),tb=v({},js,{data:0}),Lm=ia(tb),ab={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lb={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"},sb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sb[e])?!!t[e]:!1}function oc(){return nb}var ib=v({},Jn,{key:function(e){if(e.key){var t=ab[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oc,charCode:function(e){return e.type==="keypress"?cr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rb=ia(ib),ob=v({},mr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zm=ia(ob),cb=v({},Jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oc}),ub=ia(cb),db=v({},js,{propertyName:0,elapsedTime:0,pseudoElement:0}),mb=ia(db),xb=v({},mr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fb=ia(xb),hb=v({},js,{newState:0,oldState:0}),pb=ia(hb),bb=[9,13,27,32],cc=hl&&"CompositionEvent"in window,ei=null;hl&&"documentMode"in document&&(ei=document.documentMode);var gb=hl&&"TextEvent"in window&&!ei,Bm=hl&&(!cc||ei&&8<ei&&11>=ei),Om=" ",Um=!1;function Hm(e,t){switch(e){case"keyup":return bb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Js=!1;function yb(e,t){switch(e){case"compositionend":return Fm(t);case"keypress":return t.which!==32?null:(Um=!0,Om);case"textInput":return e=t.data,e===Om&&Um?null:e;default:return null}}function vb(e,t){if(Js)return e==="compositionend"||!cc&&Hm(e,t)?(e=Rm(),or=sc=$l=null,Js=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bm&&t.locale!=="ko"?null:t.data;default:return null}}var jb={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 $m(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jb[e.type]:t==="textarea"}function qm(e,t,l,s){Zs?Ks?Ks.push(s):Ks=[s]:Zs=s,t=to(t,"onChange"),0<t.length&&(l=new dr("onChange","change",null,l,s),e.push({event:l,listeners:t}))}var ti=null,ai=null;function wb(e){k0(e,0)}function xr(e){var t=gs(e);if(se(t))return e}function Pm(e,t){if(e==="change")return t}var Ym=!1;if(hl){var uc;if(hl){var dc="oninput"in document;if(!dc){var Vm=document.createElement("div");Vm.setAttribute("oninput","return;"),dc=typeof Vm.oninput=="function"}uc=dc}else uc=!1;Ym=uc&&(!document.documentMode||9<document.documentMode)}function Gm(){ti&&(ti.detachEvent("onpropertychange",Xm),ai=ti=null)}function Xm(e){if(e.propertyName==="value"&&xr(ai)){var t=[];qm(t,ai,e,tc(e)),Mm(wb,t)}}function Nb(e,t,l){e==="focusin"?(Gm(),ti=t,ai=l,ti.attachEvent("onpropertychange",Xm)):e==="focusout"&&Gm()}function Sb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xr(ai)}function kb(e,t){if(e==="click")return xr(t)}function _b(e,t){if(e==="input"||e==="change")return xr(t)}function Cb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ga=typeof Object.is=="function"?Object.is:Cb;function li(e,t){if(ga(e,t))return!0;
vendor: 23,822 bytes, line 48
48if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),s=Object.keys(t);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var r=l[s];if(!Qt.call(t,r)||!ga(e[r],t[r]))return!1}return!0}function Qm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Im(e,t){var l=Qm(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=t&&s>=t)return{node:l,offset:t-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Qm(l)}}function Zm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Km(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fe(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=fe(e.document)}return t}function mc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Eb=hl&&"documentMode"in document&&11>=document.documentMode,Ws=null,xc=null,si=null,fc=!1;function Jm(e,t,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;fc||Ws==null||Ws!==fe(s)||(s=Ws,"selectionStart"in s&&mc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),si&&li(si,s)||(si=s,s=to(xc,"onSelect"),0<s.length&&(t=new dr("onSelect","select",null,t,l),e.push({event:t,listeners:s}),t.target=Ws)))}function ws(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var en={animationend:ws("Animation","AnimationEnd"),animationiteration:ws("Animation","AnimationIteration"),animationstart:ws("Animation","AnimationStart"),transitionrun:ws("Transition","TransitionRun"),transitionstart:ws("Transition","TransitionStart"),transitioncancel:ws("Transition","TransitionCancel"),transitionend:ws("Transition","TransitionEnd")},hc={},Wm={};hl&&(Wm=document.createElement("div").style,"AnimationEvent"in window||(delete en.animationend.animation,delete en.animationiteration.animation,delete en.animationstart.animation),"TransitionEvent"in window||delete en.transitionend.transition);function Ns(e){if(hc[e])return hc[e];if(!en[e])return e;var t=en[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Wm)return hc[e]=t[l];return e}var ex=Ns("animationend"),tx=Ns("animationiteration"),ax=Ns("animationstart"),Ab=Ns("transitionrun"),Mb=Ns("transitionstart"),Rb=Ns("transitioncancel"),lx=Ns("transitionend"),sx=new Map,pc="abort auxClick beforeToggle 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(" ");pc.push("scrollEnd");function Qa(e,t){sx.set(e,t),xl(t,[e])}var fr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Da=[],tn=0,bc=0;function hr(){for(var e=tn,t=bc=tn=0;t<e;){var l=Da[t];Da[t++]=null;var s=Da[t];Da[t++]=null;var r=Da[t];Da[t++]=null;var u=Da[t];if(Da[t++]=null,s!==null&&r!==null){var h=s.pending;h===null?r.next=r:(r.next=h.next,h.next=r),s.pending=r}u!==0&&nx(l,r,u)}}function pr(e,t,l,s){Da[tn++]=e,Da[tn++]=t,Da[tn++]=l,Da[tn++]=s,bc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function gc(e,t,l,s){return pr(e,t,l,s),br(e)}function Ss(e,t){return pr(e,null,null,t),br(e)}function nx(e,t,l){e.lanes|=l;var s=e.alternate;s!==null&&(s.lanes|=l);for(var r=!1,u=e.return;u!==null;)u.childLanes|=l,s=u.alternate,s!==null&&(s.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(r=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,r&&t!==null&&(r=31-be(l),e=u.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=l|536870912),u):null}function br(e){if(50<_i)throw _i=0,Cu=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var an={};function Tb(e,t,l,s){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ya(e,t,l,s){return new Tb(e,t,l,s)}function yc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pl(e,t){var l=e.alternate;return l===null?(l=ya(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function ix(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function gr(e,t,l,s,r,u){var h=0;if(s=e,typeof e=="function")yc(e)&&(h=1);else if(typeof e=="string")h=Og(e,l,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=ya(31,l,t,r),e.elementType=ie,e.lanes=u,e;case T:return ks(l.children,r,u,t);case S:h=8,r|=24;break;case k:return e=ya(12,l,t,r|2),e.elementType=k,e.lanes=u,e;case G:return e=ya(13,l,t,r),e.elementType=G,e.lanes=u,e;case E:return e=ya(19,l,t,r),e.elementType=E,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:h=10;break e;case _:h=9;break e;case A:h=11;break e;case z:h=14;break e;case K:h=16,s=null;break e}h=29,l=Error(c(130,e===null?"null":typeof e,"")),s=null}return t=ya(h,l,t,r),t.elementType=e,t.type=s,t.lanes=u,t}function ks(e,t,l,s){return e=ya(7,e,s,t),e.lanes=l,e}function vc(e,t,l){return e=ya(6,e,null,t),e.lanes=l,e}function rx(e){var t=ya(18,null,null,0);return t.stateNode=e,t}function jc(e,t,l){return t=ya(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ox=new WeakMap;function La(e,t){if(typeof e=="object"&&e!==null){var l=ox.get(e);return l!==void 0?l:(t={value:e,source:t,stack:jt(t)},ox.set(e,t),t)}return{value:e,source:t,stack:jt(t)}}var ln=[],sn=0,yr=null,ni=0,za=[],Ba=0,ql=null,rl=1,ol="";function bl(e,t){ln[sn++]=ni,ln[sn++]=yr,yr=e,ni=t}function cx(e,t,l){za[Ba++]=rl,za[Ba++]=ol,za[Ba++]=ql,ql=e;var s=rl;e=ol;var r=32-be(s)-1;s&=~(1<<r),l+=1;var u=32-be(t)+r;if(30<u){var h=r-r%5;u=(s&(1<<h)-1).toString(32),s>>=h,r-=h,rl=1<<32-be(t)+r|l<<r|s,ol=u+e}else rl=1<<u|l<<r|s,ol=e}function wc(e){e.return!==null&&(bl(e,1),cx(e,1,0))}function Nc(e){for(;e===yr;)yr=ln[--sn],ln[sn]=null,ni=ln[--sn],ln[sn]=null;for(;e===ql;)ql=za[--Ba],za[Ba]=null,ol=za[--Ba],za[Ba]=null,rl=za[--Ba],za[Ba]=null}function ux(e,t){za[Ba++]=rl,za[Ba++]=ol,za[Ba++]=ql,rl=t.id,ol=t.overflow,ql=e}var $t=null,ct=null,$e=!1,Pl=null,Oa=!1,Sc=Error(c(519));function Yl(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ii(La(t,e)),Sc}function dx(e){var t=e.stateNode,l=e.type,s=e.memoizedProps;switch(t[kt]=e,t[Ht]=s,l){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(l=0;l<Ei.length;l++)Be(Ei[l],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),nt(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),_m(t,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||s.suppressHydrationWarning===!0||A0(t.textContent,l)?(s.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),s.onScroll!=null&&Be("scroll",t),s.onScrollEnd!=null&&Be("scrollend",t),s.onClick!=null&&(t.onclick=fl),t=!0):t=!1,t||Yl(e,!0)}function mx(e){for($t=e.return;$t;)switch($t.tag){case 5:case 31:case 13:Oa=!1;return;case 27:case 3:Oa=!0;return;default:$t=$t.return}}function nn(e){if(e!==$t)return!1;if(!$e)return mx(e),$e=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||qu(e.type,e.memoizedProps)),l=!l),l&&ct&&Yl(e),mx(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ct=U0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ct=U0(e)}else t===27?(t=ct,ss(e.type)?(e=Xu,Xu=null,ct=e):ct=t):ct=$t?Ha(e.stateNode.nextSibling):null;return!0}function _s(){ct=$t=null,$e=!1}function kc(){var e=Pl;return e!==null&&(ua===null?ua=e:ua.push.apply(ua,e),Pl=null),e}function ii(e){Pl===null?Pl=[e]:Pl.push(e)}var _c=R(null),Cs=null,gl=null;function Vl(e,t,l){J(_c,t._currentValue),t._currentValue=l}function yl(e){e._currentValue=_c.current,P(_c)}function Cc(e,t,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===l)break;e=e.return}}function Ec(e,t,l,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var u=r.dependencies;if(u!==null){var h=r.child;u=u.firstContext;e:for(;u!==null;){var j=u;u=r;for(var M=0;M<t.length;M++)if(j.context===t[M]){u.lanes|=l,j=u.alternate,j!==null&&(j.lanes|=l),Cc(u.return,l,e),s||(h=null);break e}u=j.next}}else if(r.tag===18){if(h=r.return,h===null)throw Error(c(341));h.lanes|=l,u=h.alternate,u!==null&&(u.lanes|=l),Cc(h,l,e),h=null}else h=r.child;if(h!==null)h.return=r;else for(h=r;h!==null;){if(h===e){h=null;break}if(r=h.sibling,r!==null){r.return=h.return,h=r;break}h=h.return}r=h}}function rn(e,t,l,s){e=null;for(var r=t,u=!1;r!==null;){if(!u){if((r.flags&524288)!==0)u=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var h=r.alternate;if(h===null)throw Error(c(387));if(h=h.memoizedProps,h!==null){var j=r.type;ga(r.pendingProps.value,h.value)||(e!==null?e.push(j):e=[j])}}else if(r===Ne.current){if(h=r.alternate,h===null)throw Error(c(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Di):e=[Di])}r=r.return}e!==null&&Ec(t,e,l,s),t.flags|=262144}function vr(e){for(e=e.firstContext;e!==null;){if(!ga(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Es(e){Cs=e,gl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return xx(Cs,e)}function jr(e,t){return Cs===null&&Es(e),xx(e,t)}function xx(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},gl===null){if(e===null)throw Error(c(308));gl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gl=gl.next=t;return l}var Db=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Lb=n.unstable_scheduleCallback,zb=n.unstable_NormalPriority,Ct={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ac(){return{controller:new Db,data:new Map,refCount:0}}function ri(e){e.refCount--,e.refCount===0&&Lb(zb,function(){e.controller.abort()})}var oi=null,Mc=0,on=0,cn=null;function Bb(e,t){if(oi===null){var l=oi=[];Mc=0,on=Du(),cn={status:"pending",value:void 0,then:function(s){l.push(s)}}}return Mc++,t.then(fx,fx),t}function fx(){if(--Mc===0&&oi!==null){cn!==null&&(cn.status="fulfilled");var e=oi;oi=null,on=0,cn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ob(e,t){var l=[],s={status:"pending",value:null,reason:null,then:function(r){l.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<l.length;r++)(0,l[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<l.length;r++)(0,l[r])(void 0)}),s}var hx=O.S;O.S=function(e,t){Wf=dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bb(e,t),hx!==null&&hx(e,t)};var As=R(null);function Rc(){var e=As.current;return e!==null?e:it.pooledCache}function wr(e,t){t===null?J(As,As.current):J(As,t.pool)}function px(){var e=Rc();return e===null?null:{parent:Ct._currentValue,pool:e}}var un=Error(c(460)),Tc=Error(c(474)),Nr=Error(c(542)),Sr={then:function(){}};function bx(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gx(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(fl,fl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vx(e),e;default:if(typeof t.status=="string")t.then(fl,fl);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vx(e),e}throw Rs=t,un}}function Ms(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Rs=l,un):l}}var Rs=null;function yx(){if(Rs===null)throw Error(c(459));var e=Rs;return Rs=null,e}function vx(e){if(e===un||e===Nr)throw Error(c(483))}var dn=null,ci=0;function kr(e){var t=ci;return ci+=1,dn===null&&(dn=[]),gx(dn,e,t)}function ui(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _r(e,t){throw t.$$typeof===w?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jx(e){function t(H,L){if(e){var F=H.deletions;F===null?(H.deletions=[L],H.flags|=16):F.push(L)}}function l(H,L){if(!e)return null;for(;L!==null;)t(H,L),L=L.sibling;return null}function s(H){for(var L=new Map;H!==null;)H.key!==null?L.set(H.key,H):L.set(H.index,H),H=H.sibling;return L}function r(H,L){return H=pl(H,L),H.index=0,H.sibling=null,H}function u(H,L,F){return H.index=F,e?(F=H.alternate,F!==null?(F=F.index,F<L?(H.flags|=67108866,L):F):(H.flags|=67108866,L)):(H.flags|=1048576,L)}function h(H){return e&&H.alternate===null&&(H.flags|=67108866),H}function j(H,L,F,I){return L===null||L.tag!==6?(L=vc(F,H.mode,I),L.return=H,L):(L=r(L,F),L.return=H,L)}function M(H,L,F,I){var ye=F.type;return ye===T?X(H,L,F.props.children,I,F.key):L!==null&&(L.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===K&&Ms(ye)===L.type)?(L=r(L,F.props),ui(L,F),L.return=H,L):(L=gr(F.type,F.key,F.props,null,H.mode,I),ui(L,F),L.return=H,L)}function $(H,L,F,I){return L===null||L.tag!==4||L.stateNode.containerInfo!==F.containerInfo||L.stateNode.implementation!==F.implementation?(L=jc(F,H.mode,I),L.return=H,L):(L=r(L,F.children||[]),L.return=H,L)}function X(H,L,F,I,ye){return L===null||L.tag!==7?(L=ks(F,H.mode,I,ye),L.return=H,L):(L=r(L,F),L.return=H,L)}function Z(H,L,F){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=vc(""+L,H.mode,F),L.return=H,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return F=gr(L.type,L.key,L.props,null,H.mode,F),ui(F,L),F.return=H,F;case C:return L=jc(L,H.mode,F),L.return=H,L;case K:return L=Ms(L),Z(H,L,F)}if(oe(L)||W(L))return L=ks(L,H.mode,F,null),L.return=H,L;if(typeof L.then=="function")return Z(H,kr(L),F);if(L.$$typeof===U)return Z(H,jr(H,L),F);_r(H,L)}return null}function q(H,L,F,I){var ye=L!==null?L.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return ye!==null?null:j(H,L,""+F,I);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case D:return F.key===ye?M(H,L,F,I):null;case C:return F.key===ye?$(H,L,F,I):null;case K:return F=Ms(F),q(H,L,F,I)}if(oe(F)||W(F))return ye!==null?null:X(H,L,F,I,null);if(typeof F.then=="function")return q(H,L,kr(F),I);if(F.$$typeof===U)return q(H,L,jr(H,F),I);_r(H,F)}return null}function Y(H,L,F,I,ye){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return H=H.get(F)||null,j(L,H,""+I,ye);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case D:return H=H.get(I.key===null?F:I.key)||null,M(L,H,I,ye);case C:return H=H.get(I.key===null?F:I.key)||null,$(L,H,I,ye);case K:return I=Ms(I),Y(H,L,F,I,ye)}if(oe(I)||W(I))return H=H.get(F)||null,X(L,H,I,ye,null);if(typeof I.then=="function")return Y(H,L,F,kr(I),ye);if(I.$$typeof===U)return Y(H,L,F,jr(L,I),ye);_r(L,I)}return null}function xe(H,L,F,I){for(var ye=null,Qe=null,pe=L,Me=L=0,He=null;pe!==null&&Me<F.length;Me++){pe.index>Me?(He=pe,pe=null):He=pe.sibling;var Ie=q(H,pe,F[Me],I);if(Ie===null){pe===null&&(pe=He);break}e&&pe&&Ie.alternate===null&&t(H,pe),L=u(Ie,L,Me),Qe===null?ye=Ie:Qe.sibling=Ie,Qe=Ie,pe=He}if(Me===F.length)return l(H,pe),$e&&bl(H,Me),ye;if(pe===null){for(;Me<F.length;Me++)pe=Z(H,F[Me],I),pe!==null&&(L=u(pe,L,Me),Qe===null?ye=pe:Qe.sibling=pe,Qe=pe);return $e&&bl(H,Me),ye}for(pe=s(pe);Me<F.length;Me++)He=Y(pe,H,Me,F[Me],I),He!==null&&(e&&He.alternate!==null&&pe.delete(He.key===null?Me:He.key),L=u(He,L,Me),Qe===null?ye=He:Qe.sibling=He,Qe=He);return e&&pe.forEach(function(cs){return t(H,cs)}),$e&&bl(H,Me),ye}function je(H,L,F,I){if(F==null)throw Error(c(151));for(var ye=null,Qe=null,pe=L,Me=L=0,He=null,Ie=F.next();pe!==null&&!Ie.done;Me++,Ie=F.next()){pe.index>Me?(He=pe,pe=null):He=pe.sibling;var cs=q(H,pe,Ie.value,I);if(cs===null){pe===null&&(pe=He);break}e&&pe&&cs.alternate===null&&t(H,pe),L=u(cs,L,Me),Qe===null?ye=cs:Qe.sibling=cs,Qe=cs,pe=He}if(Ie.done)return l(H,pe),$e&&bl(H,Me),ye;if(pe===null){for(;!Ie.done;Me++,Ie=F.next())Ie=Z(H,Ie.value,I),Ie!==null&&(L=u(Ie,L,Me),Qe===null?ye=Ie:Qe.sibling=Ie,Qe=Ie);return $e&&bl(H,Me),ye}for(pe=s(pe);!Ie.done;Me++,Ie=F.next())Ie=Y(pe,H,Me,Ie.value,I),Ie!==null&&(e&&Ie.alternate!==null&&pe.delete(Ie.key===null?Me:Ie.key),L=u(Ie,L,Me),Qe===null?ye=Ie:Qe.sibling=Ie,Qe=Ie);return e&&pe.forEach(function(Qg){return t(H,Qg)}),$e&&bl(H,Me),ye}function st(H,L,F,I){if(typeof F=="object"&&F!==null&&F.type===T&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case D:e:{for(var ye=F.key;L!==null;){if(L.key===ye){if(ye=F.type,ye===T){if(L.tag===7){l(H,L.sibling),I=r(L,F.props.children),I.return=H,H=I;break e}}else if(L.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===K&&Ms(ye)===L.type){l(H,L.sibling),I=r(L,F.props),ui(I,F),I.return=H,H=I;break e}l(H,L);break}else t(H,L);L=L.sibling}F.type===T?(I=ks(F.props.children,H.mode,I,F.key),I.return=H,H=I):(I=gr(F.type,F.key,F.props,null,H.mode,I),ui(I,F),I.return=H,H=I)}return h(H);case C:e:{for(ye=F.key;L!==null;){if(L.key===ye)if(L.tag===4&&L.stateNode.containerInfo===F.containerInfo&&L.stateNode.implementation===F.implementation){l(H,L.sibling),I=r(L,F.children||[]),I.return=H,H=I;break e}else{l(H,L);break}else t(H,L);L=L.sibling}I=jc(F,H.mode,I),I.return=H,H=I}return h(H);case K:return F=Ms(F),st(H,L,F,I)}if(oe(F))return xe(H,L,F,I);if(W(F)){if(ye=W(F),typeof ye!="function")throw Error(c(150));return F=ye.call(F),je(H,L,F,I)}if(typeof F.then=="function")return st(H,L,kr(F),I);if(F.$$typeof===U)return st(H,L,jr(H,F),I);_r(H,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,L!==null&&L.tag===6?(l(H,L.sibling),I=r(L,F),I.return=H,H=I):(l(H,L),I=vc(F,H.mode,I),I.return=H,H=I),h(H)):l(H,L)}return function(H,L,F,I){try{ci=0;var ye=st(H,L,F,I);return dn=null,ye}catch(pe){if(pe===un||pe===Nr)throw pe;var Qe=ya(29,pe,null,H.mode);return Qe.lanes=I,Qe.return=H,Qe}finally{}}}var Ts=jx(!0),wx=jx(!1),Gl=!1;function Dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ql(e,t,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ze&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=br(e),nx(e,null,l),t}return pr(e,s,t,l),br(e)}function di(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,hs(e,l)}}function zc(e,t){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var r=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var h={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?r=u=h:u=u.next=h,l=l.next}while(l!==null);u===null?r=u=t:u=u.next=t}else r=u=t;l={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:u,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Bc=!1;function mi(){if(Bc){var e=cn;if(e!==null)throw e}}function xi(e,t,l,s){Bc=!1;var r=e.updateQueue;Gl=!1;var u=r.firstBaseUpdate,h=r.lastBaseUpdate,j=r.shared.pending;if(j!==null){r.shared.pending=null;var M=j,$=M.next;M.next=null,h===null?u=$:h.next=$,h=M;var X=e.alternate;X!==null&&(X=X.updateQueue,j=X.lastBaseUpdate,j!==h&&(j===null?X.firstBaseUpdate=$:j.next=$,X.lastBaseUpdate=M))}if(u!==null){var Z=r.baseState;h=0,X=$=M=null,j=u;do{var q=j.lane&-536870913,Y=q!==j.lane;if(Y?(Ue&q)===q:(s&q)===q){q!==0&&q===on&&(Bc=!0),X!==null&&(X=X.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var xe=e,je=j;q=t;var st=l;switch(je.tag){case 1:if(xe=je.payload,typeof xe=="function"){Z=xe.call(st,Z,q);break e}Z=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=je.payload,q=typeof xe=="function"?xe.call(st,Z,q):xe,q==null)break e;Z=v({},Z,q);break e;case 2:Gl=!0}}q=j.callback,q!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=r.callbacks,Y===null?r.callbacks=[q]:Y.push(q))}else Y={lane:q,tag:j.tag,payload:j.payload,callback:j.callback,next:null},X===null?($=X=Y,M=Z):X=X.next=Y,h|=q;if(j=j.next,j===null){if(j=r.shared.pending,j===null)break;Y=j,j=Y.next,Y.next=null,r.lastBaseUpdate=Y,r.shared.pending=null}}while(!0);X===null&&(M=Z),r.baseState=M,r.firstBaseUpdate=$,r.lastBaseUpdate=X,u===null&&(r.shared.lanes=0),Wl|=h,e.lanes=h,e.memoizedState=Z}}function Nx(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Sx(e,t){var l=e.callbacks;
vendor: 4,963 bytes, line 48
48if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Nx(l[e],t)}var mn=R(null),Cr=R(0);function kx(e,t){e=El,J(Cr,e),J(mn,t),El=e|t.baseLanes}function Oc(){J(Cr,El),J(mn,mn.current)}function Uc(){El=Cr.current,P(mn),P(Cr)}var va=R(null),Ua=null;function Il(e){var t=e.alternate;J(wt,wt.current&1),J(va,e),Ua===null&&(t===null||mn.current!==null||t.memoizedState!==null)&&(Ua=e)}function Hc(e){J(wt,wt.current),J(va,e),Ua===null&&(Ua=e)}function _x(e){e.tag===22?(J(wt,wt.current),J(va,e),Ua===null&&(Ua=e)):Zl()}function Zl(){J(wt,wt.current),J(va,va.current)}function ja(e){P(va),Ua===e&&(Ua=null),P(wt)}var wt=R(0);function Er(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Vu(l)||Gu(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vl=0,Ee=null,at=null,Et=null,Ar=!1,xn=!1,Ds=!1,Mr=0,fi=0,fn=null,Ub=0;function gt(){throw Error(c(321))}function Fc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!ga(e[l],t[l]))return!1;return!0}function $c(e,t,l,s,r,u){return vl=u,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?uf:au,Ds=!1,u=l(s,r),Ds=!1,xn&&(u=Ex(t,l,s,r)),Cx(e),u}function Cx(e){O.H=bi;var t=at!==null&&at.next!==null;if(vl=0,Et=at=Ee=null,Ar=!1,fi=0,fn=null,t)throw Error(c(300));e===null||At||(e=e.dependencies,e!==null&&vr(e)&&(At=!0))}function Ex(e,t,l,s){Ee=e;var r=0;do{if(xn&&(fn=null),fi=0,xn=!1,25<=r)throw Error(c(301));if(r+=1,Et=at=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}O.H=df,u=t(l,s)}while(xn);return u}function Hb(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?hi(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Ee.flags|=1024),t}function qc(){var e=Mr!==0;return Mr=0,e}function Pc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Yc(e){if(Ar){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ar=!1}vl=0,Et=at=Ee=null,xn=!1,fi=Mr=0,fn=null}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?Ee.memoizedState=Et=e:Et=Et.next=e,Et}function Nt(){if(at===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Et===null?Ee.memoizedState:Et.next;if(t!==null)Et=t,at=e;else{if(e===null)throw Ee.alternate===null?Error(c(467)):Error(c(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Et===null?Ee.memoizedState=Et=e:Et=Et.next=e}return Et}function Rr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hi(e){var t=fi;return fi+=1,fn===null&&(fn=[]),e=gx(fn,e,t),t=Ee,(Et===null?t.memoizedState:Et.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?uf:au),e}function Tr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return hi(e);if(e.$$typeof===U)return qt(e)}throw Error(c(438,String(e)))}function Vc(e){var t=null,l=Ee.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var s=Ee.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Rr(),Ee.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),s=0;s<e;s++)l[s]=ce;return t.index++,l}function jl(e,t){return typeof t=="function"?t(e):t}function Dr(e){var t=Nt();return Gc(t,at,e)}function Gc(e,t,l){var s=e.queue;if(s===null)throw Error(c(311));s.lastRenderedReducer=l;var r=e.baseQueue,u=s.pending;if(u!==null){if(r!==null){var h=r.next;r.next=u.next,u.next=h}t.baseQueue=r=u,s.pending=null}if(u=e.baseState,r===null)e.memoizedState=u;else{t=r.next;var j=h=null,M=null,$=t,X=!1;do{var Z=$.lane&-536870913;if(Z!==$.lane?(Ue&Z)===Z:(vl&Z)===Z){var q=$.revertLane;if(q===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),Z===on&&(X=!0);else if((vl&q)===q){$=$.next,q===on&&(X=!0);continue}else Z={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},M===null?(j=M=Z,h=u):M=M.next=Z,Ee.lanes|=q,Wl|=q;Z=$.action,Ds&&l(u,Z),u=$.hasEagerState?$.eagerState:l(u,Z)}else q={lane:Z,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},M===null?(j=M=q,h=u):M=M.next=q,Ee.lanes|=Z,Wl|=Z;$=$.next}
vendor: 15,965 bytes, line 48
48while($!==null&&$!==t);if(M===null?h=u:M.next=j,!ga(u,e.memoizedState)&&(At=!0,X&&(l=cn,l!==null)))throw l;e.memoizedState=u,e.baseState=h,e.baseQueue=M,s.lastRenderedState=u}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Xc(e){var t=Nt(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var s=l.dispatch,r=l.pending,u=t.memoizedState;if(r!==null){l.pending=null;var h=r=r.next;do u=e(u,h.action),h=h.next;while(h!==r);ga(u,t.memoizedState)||(At=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,s]}function Ax(e,t,l){var s=Ee,r=Nt(),u=$e;if(u){if(l===void 0)throw Error(c(407));l=l()}else l=t();var h=!ga((at||r).memoizedState,l);if(h&&(r.memoizedState=l,At=!0),r=r.queue,Zc(Tx.bind(null,s,r,e),[e]),r.getSnapshot!==t||h||Et!==null&&Et.memoizedState.tag&1){if(s.flags|=2048,hn(9,{destroy:void 0},Rx.bind(null,s,r,l,t),null),it===null)throw Error(c(349));u||(vl&127)!==0||Mx(s,t,l)}return l}function Mx(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ee.updateQueue,t===null?(t=Rr(),Ee.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Rx(e,t,l,s){t.value=l,t.getSnapshot=s,Dx(t)&&Lx(e)}function Tx(e,t,l){return l(function(){Dx(t)&&Lx(e)})}function Dx(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!ga(e,l)}catch{return!0}}function Lx(e){var t=Ss(e,2);t!==null&&da(t,e,2)}function Qc(e){var t=la();if(typeof e=="function"){var l=e;if(e=l(),Ds){Xe(!0);try{l()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:e},t}function zx(e,t,l,s){return e.baseState=l,Gc(e,at,typeof s=="function"?s:jl)}function Fb(e,t,l,s,r){if(Br(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};O.T!==null?l(!0):u.isTransition=!1,s(u),l=t.pending,l===null?(u.next=t.pending=u,Bx(t,u)):(u.next=l.next,t.pending=l.next=u)}}function Bx(e,t){var l=t.action,s=t.payload,r=e.state;if(t.isTransition){var u=O.T,h={};O.T=h;try{var j=l(r,s),M=O.S;M!==null&&M(h,j),Ox(e,t,j)}catch($){Ic(e,t,$)}finally{u!==null&&h.types!==null&&(u.types=h.types),O.T=u}}else try{u=l(r,s),Ox(e,t,u)}catch($){Ic(e,t,$)}}function Ox(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){Ux(e,t,s)},function(s){return Ic(e,t,s)}):Ux(e,t,l)}function Ux(e,t,l){t.status="fulfilled",t.value=l,Hx(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Bx(e,l)))}function Ic(e,t,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=l,Hx(t),t=t.next;while(t!==s)}e.action=null}function Hx(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fx(e,t){return t}function $x(e,t){if($e){var l=it.formState;if(l!==null){e:{var s=Ee;if($e){if(ct){t:{for(var r=ct,u=Oa;r.nodeType!==8;){if(!u){r=null;break t}if(r=Ha(r.nextSibling),r===null){r=null;break t}}u=r.data,r=u==="F!"||u==="F"?r:null}if(r){ct=Ha(r.nextSibling),s=r.data==="F!";break e}}Yl(s)}s=!1}s&&(t=l[0])}}return l=la(),l.memoizedState=l.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fx,lastRenderedState:t},l.queue=s,l=rf.bind(null,Ee,s),s.dispatch=l,s=Qc(!1),u=tu.bind(null,Ee,!1,s.queue),s=la(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,l=Fb.bind(null,Ee,r,u,l),r.dispatch=l,s.memoizedState=e,[t,l,!1]}function qx(e){var t=Nt();return Px(t,at,e)}function Px(e,t,l){if(t=Gc(e,t,Fx)[0],e=Dr(jl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=hi(t)}catch(h){throw h===un?Nr:h}else s=t;t=Nt();var r=t.queue,u=r.dispatch;return l!==t.memoizedState&&(Ee.flags|=2048,hn(9,{destroy:void 0},$b.bind(null,r,l),null)),[s,u,e]}function $b(e,t){e.action=t}function Yx(e){var t=Nt(),l=at;if(l!==null)return Px(t,l,e);Nt(),t=t.memoizedState,l=Nt();var s=l.queue.dispatch;return l.memoizedState=e,[t,s,!1]}function hn(e,t,l,s){return e={tag:e,create:l,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Rr(),Ee.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,t.lastEffect=e),e}function Vx(){return Nt().memoizedState}function Lr(e,t,l,s){var r=la();Ee.flags|=e,r.memoizedState=hn(1|t,{destroy:void 0},l,s===void 0?null:s)}function zr(e,t,l,s){var r=Nt();s=s===void 0?null:s;var u=r.memoizedState.inst;at!==null&&s!==null&&Fc(s,at.memoizedState.deps)?r.memoizedState=hn(t,u,l,s):(Ee.flags|=e,r.memoizedState=hn(1|t,u,l,s))}function Gx(e,t){Lr(8390656,8,e,t)}function Zc(e,t){zr(2048,8,e,t)}function qb(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Rr(),Ee.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Xx(e){var t=Nt().memoizedState;return qb({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Qx(e,t){return zr(4,2,e,t)}function Ix(e,t){return zr(4,4,e,t)}function Zx(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kx(e,t,l){l=l!=null?l.concat([e]):null,zr(4,4,Zx.bind(null,t,e),l)}function Kc(){}function Jx(e,t){var l=Nt();t=t===void 0?null:t;var s=l.memoizedState;return t!==null&&Fc(t,s[1])?s[0]:(l.memoizedState=[e,t],e)}function Wx(e,t){var l=Nt();t=t===void 0?null:t;var s=l.memoizedState;if(t!==null&&Fc(t,s[1]))return s[0];if(s=e(),Ds){Xe(!0);try{e()}finally{Xe(!1)}}return l.memoizedState=[s,t],s}function Jc(e,t,l){return l===void 0||(vl&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=t0(),Ee.lanes|=e,Wl|=e,l)}function ef(e,t,l,s){return ga(l,t)?l:mn.current!==null?(e=Jc(e,l,s),ga(e,t)||(At=!0),e):(vl&42)===0||(vl&1073741824)!==0&&(Ue&261930)===0?(At=!0,e.memoizedState=l):(e=t0(),Ee.lanes|=e,Wl|=e,t)}function tf(e,t,l,s,r){var u=Q.p;Q.p=u!==0&&8>u?u:8;var h=O.T,j={};O.T=j,tu(e,!1,t,l);try{var M=r(),$=O.S;if($!==null&&$(j,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var X=Ob(M,s);pi(e,t,X,Sa(e))}else pi(e,t,s,Sa(e))}catch(Z){pi(e,t,{then:function(){},status:"rejected",reason:Z},Sa())}finally{Q.p=u,h!==null&&j.types!==null&&(h.types=j.types),O.T=h}}function Pb(){}function Wc(e,t,l,s){if(e.tag!==5)throw Error(c(476));var r=af(e).queue;tf(e,r,t,ae,l===null?Pb:function(){return lf(e),l(s)})}function af(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function lf(e){var t=af(e);t.next===null&&(t=e.alternate.memoizedState),pi(e,t.next.queue,{},Sa())}function eu(){return qt(Di)}function sf(){return Nt().memoizedState}function nf(){return Nt().memoizedState}function Yb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Sa();e=Xl(l);var s=Ql(t,e,l);s!==null&&(da(s,t,l),di(s,t,l)),t={cache:Ac()},e.payload=t;return}t=t.return}}function Vb(e,t,l){var s=Sa();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Br(e)?of(t,l):(l=gc(e,t,l,s),l!==null&&(da(l,e,s),cf(l,t,s)))}function rf(e,t,l){var s=Sa();pi(e,t,l,s)}function pi(e,t,l,s){var r={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Br(e))of(t,r);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,j=u(h,l);if(r.hasEagerState=!0,r.eagerState=j,ga(j,h))return pr(e,t,r,0),it===null&&hr(),!1}catch{}finally{}if(l=gc(e,t,r,s),l!==null)return da(l,e,s),cf(l,t,s),!0}return!1}function tu(e,t,l,s){if(s={lane:2,revertLane:Du(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Br(e)){if(t)throw Error(c(479))}else t=gc(e,l,s,2),t!==null&&da(t,e,2)}function Br(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function of(e,t){xn=Ar=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function cf(e,t,l){if((l&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,hs(e,l)}}var bi={readContext:qt,use:Tr,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};bi.useEffectEvent=gt;var uf={readContext:qt,use:Tr,useCallback:function(e,t){return la().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Gx,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Lr(4194308,4,Zx.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Lr(4194308,4,e,t)},useInsertionEffect:function(e,t){Lr(4,2,e,t)},useMemo:function(e,t){var l=la();t=t===void 0?null:t;var s=e();if(Ds){Xe(!0);try{e()}finally{Xe(!1)}}return l.memoizedState=[s,t],s},useReducer:function(e,t,l){var s=la();if(l!==void 0){var r=l(t);if(Ds){Xe(!0);try{l(t)}finally{Xe(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=Vb.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=la();return e={current:e},t.memoizedState=e},useState:function(e){e=Qc(e);var t=e.queue,l=rf.bind(null,Ee,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Kc,useDeferredValue:function(e,t){var l=la();return Jc(l,e,t)},useTransition:function(){var e=Qc(!1);return e=tf.bind(null,Ee,e.queue,!0,!1),la().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var s=Ee,r=la();if($e){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),it===null)throw Error(c(349));(Ue&127)!==0||Mx(s,t,l)}r.memoizedState=l;var u={value:l,getSnapshot:t};return r.queue=u,Gx(Tx.bind(null,s,u,e),[e]),s.flags|=2048,hn(9,{destroy:void 0},Rx.bind(null,s,u,l,t),null),l},useId:function(){var e=la(),t=it.identifierPrefix;if($e){var l=ol,s=rl;l=(s&~(1<<32-be(s)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Mr++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Ub++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:eu,useFormState:$x,useActionState:$x,useOptimistic:function(e){var t=la();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=tu.bind(null,Ee,!0,l),l.dispatch=t,[e,t]},useMemoCache:Vc,useCacheRefresh:function(){return la().memoizedState=Yb.bind(null,Ee)},useEffectEvent:function(e){var t=la(),l={impl:e};return t.memoizedState=l,function(){if((Ze&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},au={readContext:qt,use:Tr,useCallback:Jx,useContext:qt,useEffect:Zc,useImperativeHandle:Kx,useInsertionEffect:Qx,useLayoutEffect:Ix,useMemo:Wx,useReducer:Dr,useRef:Vx,useState:function(){return Dr(jl)},useDebugValue:Kc,useDeferredValue:function(e,t){var l=Nt();return ef(l,at.memoizedState,e,t)},useTransition:function(){var e=Dr(jl)[0],t=Nt().memoizedState;return[typeof e=="boolean"?e:hi(e),t]},useSyncExternalStore:Ax,useId:sf,useHostTransitionStatus:eu,useFormState:qx,useActionState:qx,useOptimistic:function(e,t){var l=Nt();return zx(l,at,e,t)},useMemoCache:Vc,useCacheRefresh:nf};au.useEffectEvent=Xx;var df={readContext:qt,use:Tr,useCallback:Jx,useContext:qt,useEffect:Zc,useImperativeHandle:Kx,useInsertionEffect:Qx,useLayoutEffect:Ix,useMemo:Wx,useReducer:Xc,useRef:Vx,useState:function(){return Xc(jl)},useDebugValue:Kc,useDeferredValue:function(e,t){var l=Nt();return at===null?Jc(l,e,t):ef(l,at.memoizedState,e,t)},useTransition:function(){var e=Xc(jl)[0],t=Nt().memoizedState;return[typeof e=="boolean"?e:hi(e),t]},useSyncExternalStore:Ax,useId:sf,useHostTransitionStatus:eu,useFormState:Yx,useActionState:Yx,useOptimistic:function(e,t){var l=Nt();return at!==null?zx(l,at,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Vc,useCacheRefresh:nf};df.useEffectEvent=Xx;function lu(e,t,l,s){t=e.memoizedState,l=l(s,t),l=l==null?t:v({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var su={enqueueSetState:function(e,t,l){e=e._reactInternals;var s=Sa(),r=Xl(s);r.payload=t,l!=null&&(r.callback=l),t=Ql(e,r,s),t!==null&&(da(t,e,s),di(t,e,s))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var s=Sa(),r=Xl(s);r.tag=1,r.payload=t,l!=null&&(r.callback=l),t=Ql(e,r,s),t!==null&&(da(t,e,s),di(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Sa(),s=Xl(l);s.tag=2,t!=null&&(s.callback=t),t=Ql(e,s,l),t!==null&&(da(t,e,l),di(t,e,l))}};function mf(e,t,l,s,r,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,h):t.prototype&&t.prototype.isPureReactComponent?!li(l,s)||!li(r,u):!0}function xf(e,t,l,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,s),t.state!==e&&su.enqueueReplaceState(t,t.state,null)}function Ls(e,t){var l=t;if("ref"in t){l={};for(var s in t)s!=="ref"&&(l[s]=t[s])}if(e=e.defaultProps){l===t&&(l=v({},l));for(var r in e)l[r]===void 0&&(l[r]=e[r])}return l}function ff(e){fr(e)}function hf(e){console.error(e)}function pf(e){fr(e)}function Or(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function bf(e,t,l){try{var s=e.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function nu(e,t,l){return l=Xl(l),l.tag=3,l.payload={element:null},l.callback=function(){Or(e,t)},l}function gf(e){return e=Xl(e),e.tag=3,e}function yf(e,t,l,s){var r=l.type.getDerivedStateFromError;if(typeof r=="function"){var u=s.value;e.payload=function(){return r(u)},e.callback=function(){bf(t,l,s)}}var h=l.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){bf(t,l,s),typeof r!="function"&&(es===null?es=new Set([this]):es.add(this));var j=s.stack;this.componentDidCatch(s.value,{componentStack:j!==null?j:""})})}function Gb(e,t,l,s,r){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=l.alternate,t!==null&&rn(t,l,r,!0),l=va.current,l!==null){switch(l.tag){case 31:case 13:return Ua===null?Ir():l.alternate===null&&yt===0&&(yt=3),l.flags&=-257,l.flags|=65536,l.lanes=r,s===Sr?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([s]):t.add(s),Mu(e,s,r)),!1;case 22:return l.flags|=65536,s===Sr?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([s]):l.add(s)),Mu(e,s,r)),!1}throw Error(c(435,l.tag))}return Mu(e,s,r),Ir(),!1}if($e)return t=va.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Sc&&(e=Error(c(422),{cause:s}),ii(La(e,l)))):(s!==Sc&&(t=Error(c(423),{cause:s}),ii(La(t,l))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=La(s,l),r=nu(e.stateNode,s,r),zc(e,r),yt!==4&&(yt=2)),!1;var u=Error(c(520),{cause:s});if(u=La(u,l),ki===null?ki=[u]:ki.push(u),yt!==4&&(yt=2),t===null)return!0;s=La(s,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=r&-r,l.lanes|=e,e=nu(l.stateNode,s,e),zc(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(es===null||!es.has(u))))return l.flags|=65536,r&=-r,l.lanes|=r,r=gf(r),yf(r,e,l,s),zc(l,r),!1}l=l.return}while(l!==null);return!1}var iu=Error(c(461)),At=!1;function Pt(e,t,l,s){t.child=e===null?wx(t,null,l,s):Ts(t,e.child,l,
vendor: 12,067 bytes, line 48
48s)}function vf(e,t,l,s,r){l=l.render;var u=t.ref;if("ref"in s){var h={};for(var j in s)j!=="ref"&&(h[j]=s[j])}else h=s;return Es(t),s=$c(e,t,l,h,u,r),j=qc(),e!==null&&!At?(Pc(e,t,r),wl(e,t,r)):($e&&j&&wc(t),t.flags|=1,Pt(e,t,s,r),t.child)}function jf(e,t,l,s,r){if(e===null){var u=l.type;return typeof u=="function"&&!yc(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,wf(e,t,u,s,r)):(e=gr(l.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!fu(e,r)){var h=u.memoizedProps;if(l=l.compare,l=l!==null?l:li,l(h,s)&&e.ref===t.ref)return wl(e,t,r)}return t.flags|=1,e=pl(u,s),e.ref=t.ref,e.return=t,t.child=e}function wf(e,t,l,s,r){if(e!==null){var u=e.memoizedProps;if(li(u,s)&&e.ref===t.ref)if(At=!1,t.pendingProps=s=u,fu(e,r))(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,wl(e,t,r)}return ru(e,t,l,s,r)}function Nf(e,t,l,s){var r=s.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~u}else s=0,t.child=null;return Sf(e,t,u,l,s)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wr(t,u!==null?u.cachePool:null),u!==null?kx(t,u):Oc(),_x(t);else return s=t.lanes=536870912,Sf(e,t,u!==null?u.baseLanes|l:l,l,s)}else u!==null?(wr(t,u.cachePool),kx(t,u),Zl(),t.memoizedState=null):(e!==null&&wr(t,null),Oc(),Zl());return Pt(e,t,r,l),t.child}function gi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Sf(e,t,l,s,r){var u=Rc();return u=u===null?null:{parent:Ct._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&wr(t,null),Oc(),_x(t),e!==null&&rn(e,t,s,!0),t.childLanes=r,null}function Ur(e,t){return t=Fr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kf(e,t,l){return Ts(t,e.child,null,l),e=Ur(t,t.pendingProps),e.flags|=2,ja(t),t.memoizedState=null,e}function Xb(e,t,l){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(s.mode==="hidden")return e=Ur(t,s),t.lanes=536870912,gi(null,e);if(Hc(t),(e=ct)?(e=O0(e,Oa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ql!==null?{id:rl,overflow:ol}:null,retryLane:536870912,hydrationErrors:null},l=rx(e),l.return=t,t.child=l,$t=t,ct=null)):e=null,e===null)throw Yl(t);return t.lanes=536870912,null}return Ur(t,s)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Hc(t),r)if(t.flags&256)t.flags&=-257,t=kf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(At||rn(e,t,l,!1),r=(l&e.childLanes)!==0,At||r){if(s=it,s!==null&&(h=ps(s,l),h!==0&&h!==u.retryLane))throw u.retryLane=h,Ss(e,h),da(s,e,h),iu;Ir(),t=kf(e,t,l)}else e=u.treeContext,ct=Ha(h.nextSibling),$t=t,$e=!0,Pl=null,Oa=!1,e!==null&&ux(t,e),t=Ur(t,s),t.flags|=4096;return t}return e=pl(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hr(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function ru(e,t,l,s,r){return Es(t),l=$c(e,t,l,s,void 0,r),s=qc(),e!==null&&!At?(Pc(e,t,r),wl(e,t,r)):($e&&s&&wc(t),t.flags|=1,Pt(e,t,l,r),t.child)}function _f(e,t,l,s,r,u){return Es(t),t.updateQueue=null,l=Ex(t,s,l,r),Cx(e),s=qc(),e!==null&&!At?(Pc(e,t,u),wl(e,t,u)):($e&&s&&wc(t),t.flags|=1,Pt(e,t,l,u),t.child)}function Cf(e,t,l,s,r){if(Es(t),t.stateNode===null){var u=an,h=l.contextType;typeof h=="object"&&h!==null&&(u=qt(h)),u=new l(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=su,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},Dc(t),h=l.contextType,u.context=typeof h=="object"&&h!==null?qt(h):an,u.state=t.memoizedState,h=l.getDerivedStateFromProps,typeof h=="function"&&(lu(t,l,h,s),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&su.enqueueReplaceState(u,u.state,null),xi(t,s,u,r),mi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var j=t.memoizedProps,M=Ls(l,j);u.props=M;var $=u.context,X=l.contextType;h=an,typeof X=="object"&&X!==null&&(h=qt(X));var Z=l.getDerivedStateFromProps;X=typeof Z=="function"||typeof u.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,X||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(j||$!==h)&&xf(t,u,s,h),Gl=!1;var q=t.memoizedState;u.state=q,xi(t,s,u,r),mi(),$=t.memoizedState,j||q!==$||Gl?(typeof Z=="function"&&(lu(t,l,Z,s),$=t.memoizedState),(M=Gl||mf(t,l,M,s,q,$,h))?(X||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=$),u.props=s,u.state=$,u.context=h,s=M):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,Lc(e,t),h=t.memoizedProps,X=Ls(l,h),u.props=X,Z=t.pendingProps,q=u.context,$=l.contextType,M=an,typeof $=="object"&&$!==null&&(M=qt($)),j=l.getDerivedStateFromProps,($=typeof j=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==Z||q!==M)&&xf(t,u,s,M),Gl=!1,q=t.memoizedState,u.state=q,xi(t,s,u,r),mi();var Y=t.memoizedState;h!==Z||q!==Y||Gl||e!==null&&e.dependencies!==null&&vr(e.dependencies)?(typeof j=="function"&&(lu(t,l,j,s),Y=t.memoizedState),(X=Gl||mf(t,l,X,s,q,Y,M)||e!==null&&e.dependencies!==null&&vr(e.dependencies))?($||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,Y,M),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,Y,M)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=Y),u.props=s,u.state=Y,u.context=M,s=X):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Hr(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=Ts(t,e.child,null,r),t.child=Ts(t,null,l,r)):Pt(e,t,l,r),t.memoizedState=u.state,e=t.child):e=wl(e,t,r),e}function Ef(e,t,l,s){return _s(),t.flags|=256,Pt(e,t,l,s),t.child}var ou={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cu(e){return{baseLanes:e,cachePool:px()}}function uu(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Na),e}function Af(e,t,l){var s=t.pendingProps,r=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(r?Il(t):Zl(),(e=ct)?(e=O0(e,Oa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ql!==null?{id:rl,overflow:ol}:null,retryLane:536870912,hydrationErrors:null},l=rx(e),l.return=t,t.child=l,$t=t,ct=null)):e=null,e===null)throw Yl(t);return Gu(e)?t.lanes=32:t.lanes=536870912,null}var j=s.children;return s=s.fallback,r?(Zl(),r=t.mode,j=Fr({mode:"hidden",children:j},r),s=ks(s,r,l,null),j.return=t,s.return=t,j.sibling=s,t.child=j,s=t.child,s.memoizedState=cu(l),s.childLanes=uu(e,h,l),t.memoizedState=ou,gi(null,s)):(Il(t),du(t,j))}var M=e.memoizedState;if(M!==null&&(j=M.dehydrated,j!==null)){if(u)t.flags&256?(Il(t),t.flags&=-257,t=mu(e,t,l)):t.memoizedState!==null?(Zl(),t.child=e.child,t.flags|=128,t=null):(Zl(),j=s.fallback,r=t.mode,s=Fr({mode:"visible",children:s.children},r),j=ks(j,r,l,null),j.flags|=2,s.return=t,j.return=t,s.sibling=j,t.child=s,Ts(t,e.child,null,l),s=t.child,s.memoizedState=cu(l),s.childLanes=uu(e,h,l),t.memoizedState=ou,t=gi(null,s));else if(Il(t),Gu(j)){if(h=j.nextSibling&&j.nextSibling.dataset,h)var $=h.dgst;h=$,s=Error(c(419)),s.stack="",s.digest=h,ii({value:s,source:null,stack:null}),t=mu(e,t,l)}else if(At||rn(e,t,l,!1),h=(l&e.childLanes)!==0,At||h){if(h=it,h!==null&&(s=ps(h,l),s!==0&&s!==M.retryLane))throw M.retryLane=s,Ss(e,s),da(h,e,s),iu;Vu(j)||Ir(),t=mu(e,t,l)}else Vu(j)?(t.flags|=192,t.child=e.child,t=null):(e=M.treeContext,ct=Ha(j.nextSibling),$t=t,$e=!0,Pl=null,Oa=!1,e!==null&&ux(t,e),t=du(t,s.children),t.flags|=4096);return t}return r?(Zl(),j=s.fallback,r=t.mode,M=e.child,$=M.sibling,s=pl(M,{mode:"hidden",children:s.children}),s.subtreeFlags=M.subtreeFlags&65011712,$!==null?j=pl($,j):(j=ks(j,r,l,null),j.flags|=2),j.return=t,s.return=t,s.sibling=j,t.child=s,gi(null,s),s=t.child,j=e.child.memoizedState,j===null?j=cu(l):(r=j.cachePool,r!==null?(M=Ct._currentValue,r=r.parent!==M?{parent:M,pool:M}:r):r=px(),j={baseLanes:j.baseLanes|l,cachePool:r}),s.memoizedState=j,s.childLanes=uu(e,h,l),t.memoizedState=ou,gi(e.child,s)):(Il(t),l=e.child,e=l.sibling,l=pl(l,{mode:"visible",children:s.children}),l.return=t,l.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=l,t.memoizedState=null,l)}function du(e,t){return t=Fr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fr(e,t){return e=ya(22,e,null,t),e.lanes=0,e}function mu(e,t,l){return Ts(t,e.child,null,l),e=du(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mf(e,t,l){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Cc(e.return,t,l)}function xu(e,t,l,s,r,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:r,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=l,h.tailMode=r,h.treeForkCount=u)}function Rf(e,t,l){var s=t.pendingProps,r=s.revealOrder,u=s.tail;s=s.children;var h=wt.current,j=(h&2)!==0;if(j?(h=h&1|2,t.flags|=128):h&=1,J(wt,h),Pt(e,t,s,l),s=$e?ni:0,!j&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mf(e,l,t);else if(e.tag===19)Mf(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(l=t.child,r=null;l!==null;)e=l.alternate,e!==null&&Er(e)===null&&(r=l),l=l.sibling;l=r,l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null),xu(t,!1,r,l,u,s);break;case"backwards":case"unstable_legacy-backwards":for(l=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Er(e)===null){t.child=r;break}e=r.sibling,r.sibling=l,l=r,r=e}xu(t,!0,l,null,u,s);break;case"together":xu(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function wl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(rn(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));
vendor: 6,183 bytes, line 48
48if(t.child!==null){for(e=t.child,l=pl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=pl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function fu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vr(e)))}function Qb(e,t,l){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),Vl(t,Ct,e.memoizedState.cache),_s();break;case 27:case 5:te(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:Vl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Hc(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Il(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Af(e,t,l):(Il(t),e=wl(e,t,l),e!==null?e.sibling:null);Il(t);break;case 19:var r=(e.flags&128)!==0;if(s=(l&t.childLanes)!==0,s||(rn(e,t,l,!1),s=(l&t.childLanes)!==0),r){if(s)return Rf(e,t,l);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),J(wt,wt.current),s)break;return null;case 22:return t.lanes=0,Nf(e,t,l,t.pendingProps);case 24:Vl(t,Ct,e.memoizedState.cache)}return wl(e,t,l)}function Tf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!fu(e,l)&&(t.flags&128)===0)return At=!1,Qb(e,t,l);At=(e.flags&131072)!==0}else At=!1,$e&&(t.flags&1048576)!==0&&cx(t,ni,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Ms(t.elementType),t.type=e,typeof e=="function")yc(e)?(s=Ls(e,s),t.tag=1,t=Cf(null,t,e,s,l)):(t.tag=0,t=ru(null,t,e,s,l));else{if(e!=null){var r=e.$$typeof;if(r===A){t.tag=11,t=vf(null,t,e,s,l);break e}else if(r===z){t.tag=14,t=jf(null,t,e,s,l);break e}}throw t=V(e)||e,Error(c(306,t,""))}}return t;case 0:return ru(e,t,t.type,t.pendingProps,l);case 1:return s=t.type,r=Ls(s,t.pendingProps),Cf(e,t,s,r,l);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));s=t.pendingProps;var u=t.memoizedState;r=u.element,Lc(e,t),xi(t,s,null,l);var h=t.memoizedState;if(s=h.cache,Vl(t,Ct,s),s!==u.cache&&Ec(t,[Ct],l,!0),mi(),s=h.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Ef(e,t,s,l);break e}else if(s!==r){r=La(Error(c(424)),t),ii(r),t=Ef(e,t,s,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ct=Ha(e.firstChild),$t=t,$e=!0,Pl=null,Oa=!0,l=wx(t,null,s,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(_s(),s===r){t=wl(e,t,l);break e}Pt(e,t,s,l)}t=t.child}return t;case 26:return Hr(e,t),e===null?(l=P0(t.type,null,t.pendingProps,null))?t.memoizedState=l:$e||(l=t.type,e=t.pendingProps,s=ao(ge.current).createElement(l),s[kt]=t,s[Ht]=e,Yt(s,l,e),_t(s),t.stateNode=s):t.memoizedState=P0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&$e&&(s=t.stateNode=F0(t.type,t.pendingProps,ge.current),$t=t,Oa=!0,r=ct,ss(t.type)?(Xu=r,ct=Ha(s.firstChild)):ct=r),Pt(e,t,t.pendingProps.children,l),Hr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&((r=s=ct)&&(s=Sg(s,t.type,t.pendingProps,Oa),s!==null?(t.stateNode=s,$t=t,ct=Ha(s.firstChild),Oa=!1,r=!0):r=!1),r||Yl(t)),te(t),r=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,s=u.children,qu(r,u)?s=null:h!==null&&qu(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=$c(e,t,Hb,null,null,l),Di._currentValue=r),Hr(e,t),Pt(e,t,s,l),t.child;case 6:return e===null&&$e&&((e=l=ct)&&(l=kg(l,t.pendingProps,Oa),l!==null?(t.stateNode=l,$t=t,ct=null,e=!0):e=!1),e||Yl(t)),null;case 13:return Af(e,t,l);case 4:return tt(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ts(t,null,s,l):Pt(e,t,s,l),t.child;case 11:return vf(e,t,t.type,t.pendingProps,l);case 7:return Pt(e,t,t.pendingProps,l),t.child;case 8:return Pt(e,t,t.pendingProps.children,l),t.child;case 12:return Pt(e,t,t.pendingProps.children,l),t.child;case 10:return s=t.pendingProps,Vl(t,t.type,s.value),Pt(e,t,s.children,l),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,Es(t),r=qt(r),s=s(r),t.flags|=1,Pt(e,t,s,l),t.child;case 14:return jf(e,t,t.type,t.pendingProps,l);case 15:return wf(e,t,t.type,t.pendingProps,l);case 19:return Rf(e,t,l);case 31:return Xb(e,t,l);case 22:return Nf(e,t,l,t.pendingProps);case 24:return Es(t),s=qt(Ct),e===null?(r=Rc(),r===null&&(r=it,u=Ac(),r.pooledCache=u,u.refCount++,u!==null&&(r.pooledCacheLanes|=l),r=u),t.memoizedState={parent:s,cache:r},Dc(t),Vl(t,Ct,r)):((e.lanes&l)!==0&&(Lc(e,t),xi(t,null,null,l),mi()),r=e.memoizedState,u=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Vl(t,Ct,s)):(s=u.cache,Vl(t,Ct,s),s!==r.cache&&Ec(t,[Ct],l,!0))),Pt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Nl(e){e.flags|=4}function hu(e,t,l,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(n0())e.flags|=8192;else throw Rs=Sr,Tc}else e.flags&=-16777217}function Df(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Q0(t))if(n0())e.flags|=8192;else throw Rs=Sr,Tc}function $r(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Fe():536870912,e.lanes|=t,yn|=t)}function yi(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(t)for(var r=e.child;r!==null;)l|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)l|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=l,t}function Ib(e,t,l){var s=t.pendingProps;switch(Nc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;
vendor: 7,625 bytes, line 48
48case 3:return l=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),yl(Ct),qe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(nn(t)?Nl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,kc())),ut(t),null;case 26:var r=t.type,u=t.memoizedState;return e===null?(Nl(t),u!==null?(ut(t),Df(t,u)):(ut(t),hu(t,r,null,s,l))):u?u!==e.memoizedState?(Nl(t),ut(t),Df(t,u)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Nl(t),ut(t),hu(t,r,e,s,l)),null;case 27:if(Ae(t),l=ge.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nl(t);else{if(!s){if(t.stateNode===null)throw Error(c(166));return ut(t),null}e=le.current,nn(t)?dx(t):(e=F0(r,s,l),t.stateNode=e,Nl(t))}return ut(t),null;case 5:if(Ae(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nl(t);else{if(!s){if(t.stateNode===null)throw Error(c(166));return ut(t),null}if(u=le.current,nn(t))dx(t);else{var h=ao(ge.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?h.createElement(r,{is:s.is}):h.createElement(r)}}u[kt]=t,u[Ht]=s;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&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;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(Yt(u,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Nl(t)}}return ut(t),hu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Nl(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(c(166));if(e=ge.current,nn(t)){if(e=t.stateNode,l=t.memoizedProps,s=null,r=$t,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[kt]=t,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||A0(e.nodeValue,l)),e||Yl(t,!0)}else e=ao(e).createTextNode(s),e[kt]=t,t.stateNode=e}return ut(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(s=nn(t),l!==null){if(e===null){if(!s)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[kt]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else l=kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(ja(t),t):(ja(t),null);if((t.flags&128)!==0)throw Error(c(558))}return ut(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=nn(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(c(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(c(317));r[kt]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),r=!1}else r=kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ja(t),t):(ja(t),null)}return ja(t),(t.flags&128)!==0?(t.lanes=l,t):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==r&&(s.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),$r(t,t.updateQueue),ut(t),null);case 4:return qe(),e===null&&Ou(t.stateNode.containerInfo),ut(t),null;case 10:return yl(t.type),ut(t),null;case 19:if(P(wt),s=t.memoizedState,s===null)return ut(t),null;if(r=(t.flags&128)!==0,u=s.rendering,u===null)if(r)yi(s,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Er(e),u!==null){for(t.flags|=128,yi(s,!1),e=u.updateQueue,t.updateQueue=e,$r(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)ix(l,e),l=l.sibling;return J(wt,wt.current&1|2),$e&&bl(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&dt()>Gr&&(t.flags|=128,r=!0,yi(s,!1),t.lanes=4194304)}else{if(!r)if(e=Er(u),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,$r(t,e),yi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!$e)return ut(t),null}else 2*dt()-s.renderingStartTime>Gr&&l!==536870912&&(t.flags|=128,r=!0,yi(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=dt(),e.sibling=null,l=wt.current,J(wt,r?l&1|2:l&1),$e&&bl(t,s.treeForkCount),e):(ut(t),null);case 22:case 23:return ja(t),Uc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(l&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),l=t.updateQueue,l!==null&&$r(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==l&&(t.flags|=2048),e!==null&&P(As),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),yl(Ct),ut(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Zb(e,t){switch(Nc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yl(Ct),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ae(t),null;case 31:if(t.memoizedState!==null){if(ja(t),t.alternate===null)throw Error(c(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ja(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(wt),null;case 4:return qe(),null;case 10:return yl(t.type),null;case 22:case 23:return ja(t),Uc(),e!==null&&P(As),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return yl(Ct),null;case 25:return null;default:return null}}function Lf(e,t){switch(Nc(t),t.tag){case 3:yl(Ct),qe();break;case 26:case 27:case 5:Ae(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&ja(t);break;case 13:ja(t);break;case 19:P(wt);break;case 10:yl(t.type);break;case 22:case 23:ja(t),Uc(),e!==null&&P(As);break;case 24:yl(Ct)}}function vi(e,t){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var r=s.next;l=r;do{if((l.tag&e)===e){s=void 0;var u=l.create,h=l.inst;s=u(),h.destroy=s}l=l.next}while(l!==r)}}catch(j){We(t,t.return,j)}}function Kl(e,t,l){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var u=r.next;s=u;do{if((s.tag&e)===e){var h=s.inst,j=h.destroy;if(j!==void 0){h.destroy=void 0,r=t;var M=l,$=j;try{$()}catch(X){We(r,M,X)}}}s=s.next}while(s!==u)}}catch(X){We(t,t.return,X)}}function zf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Sx(t,l)}catch(s){We(e,e.return,s)}}}function Bf(e,t,l){l.props=Ls(e.type,e.memoizedProps),l.state=e.memoizedState;
vendor: 18,191 bytes, line 48
48try{l.componentWillUnmount()}catch(s){We(e,t,s)}}function ji(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(r){We(e,t,r)}}function cl(e,t){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(r){We(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(r){We(e,t,r)}else l.current=null}function Of(e){var t=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(r){We(e,e.return,r)}}function pu(e,t,l){try{var s=e.stateNode;gg(s,e.type,l,t),s[Ht]=t}catch(r){We(e,e.return,r)}}function Uf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ss(e.type)||e.tag===4}function bu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ss(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gu(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=fl));else if(s!==4&&(s===27&&ss(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(gu(e,t,l),e=e.sibling;e!==null;)gu(e,t,l),e=e.sibling}function qr(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(s!==4&&(s===27&&ss(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(qr(e,t,l),e=e.sibling;e!==null;)qr(e,t,l),e=e.sibling}function Hf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Yt(t,s,l),t[kt]=e,t[Ht]=l}catch(u){We(e,e.return,u)}}var Sl=!1,Mt=!1,yu=!1,Ff=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function Kb(e,t){if(e=e.containerInfo,Fu=co,e=Km(e),mc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var r=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var h=0,j=-1,M=-1,$=0,X=0,Z=e,q=null;t:for(;;){for(var Y;Z!==l||r!==0&&Z.nodeType!==3||(j=h+r),Z!==u||s!==0&&Z.nodeType!==3||(M=h+s),Z.nodeType===3&&(h+=Z.nodeValue.length),(Y=Z.firstChild)!==null;)q=Z,Z=Y;for(;;){if(Z===e)break t;if(q===l&&++$===r&&(j=h),q===u&&++X===s&&(M=h),(Y=Z.nextSibling)!==null)break;Z=q,q=Z.parentNode}Z=Y}l=j===-1||M===-1?null:{start:j,end:M}}else l=null}l=l||{start:0,end:0}}else l=null;for($u={focusedElem:e,selectionRange:l},co=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)r=e[l],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,l=t,r=u.memoizedProps,u=u.memoizedState,s=l.stateNode;try{var xe=Ls(l.type,r);e=s.getSnapshotBeforeUpdate(xe,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(je){We(l,l.return,je)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Yu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Ft=e;break}Ft=t.return}}function $f(e,t,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:_l(e,l),s&4&&vi(5,l);break;case 1:if(_l(e,l),s&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(h){We(l,l.return,h)}else{var r=Ls(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){We(l,l.return,h)}}s&64&&zf(l),s&512&&ji(l,l.return);break;case 3:if(_l(e,l),s&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Sx(e,t)}catch(h){We(l,l.return,h)}}break;case 27:t===null&&s&4&&Hf(l);case 26:case 5:_l(e,l),t===null&&s&4&&Of(l),s&512&&ji(l,l.return);break;case 12:_l(e,l);break;case 31:_l(e,l),s&4&&Yf(e,l);break;case 13:_l(e,l),s&4&&Vf(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=ig.bind(null,l),_g(e,l))));break;case 22:if(s=l.memoizedState!==null||Sl,!s){t=t!==null&&t.memoizedState!==null||Mt,r=Sl;var u=Mt;Sl=s,(Mt=t)&&!u?Cl(e,l,(l.subtreeFlags&8772)!==0):_l(e,l),Sl=r,Mt=u}break;case 30:break;default:_l(e,l)}}function qf(e){var t=e.alternate;t!==null&&(e.alternate=null,qf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xa(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ft=null,ra=!1;function kl(e,t,l){for(l=l.child;l!==null;)Pf(e,t,l),l=l.sibling}function Pf(e,t,l){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(It,l)}catch{}switch(l.tag){case 26:Mt||cl(l,t),kl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Mt||cl(l,t);var s=ft,r=ra;ss(l.type)&&(ft=l.stateNode,ra=!1),kl(e,t,l),Mi(l.stateNode),ft=s,ra=r;break;case 5:Mt||cl(l,t);case 6:if(s=ft,r=ra,ft=null,kl(e,t,l),ft=s,ra=r,ft!==null)if(ra)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(l.stateNode)}catch(u){We(l,t,u)}else try{ft.removeChild(l.stateNode)}catch(u){We(l,t,u)}break;case 18:ft!==null&&(ra?(e=ft,z0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Cn(e)):z0(ft,l.stateNode));break;case 4:s=ft,r=ra,ft=l.stateNode.containerInfo,ra=!0,kl(e,t,l),ft=s,ra=r;break;case 0:case 11:case 14:case 15:Kl(2,l,t),Mt||Kl(4,l,t),kl(e,t,l);break;case 1:Mt||(cl(l,t),s=l.stateNode,typeof s.componentWillUnmount=="function"&&Bf(l,t,s)),kl(e,t,l);break;case 21:kl(e,t,l);break;case 22:Mt=(s=Mt)||l.memoizedState!==null,kl(e,t,l),Mt=s;break;default:kl(e,t,l)}}function Yf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Cn(e)}catch(l){We(t,t.return,l)}}}function Vf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Cn(e)}catch(l){We(t,t.return,l)}}function Jb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ff),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ff),t;default:throw Error(c(435,e.tag))}}function Pr(e,t){var l=Jb(e);t.forEach(function(s){if(!l.has(s)){l.add(s);var r=rg.bind(null,e,s);s.then(r,r)}})}function oa(e,t){var l=t.deletions;if(l!==null)for(var s=0;s<l.length;s++){var r=l[s],u=e,h=t,j=h;e:for(;j!==null;){switch(j.tag){case 27:if(ss(j.type)){ft=j.stateNode,ra=!1;break e}break;case 5:ft=j.stateNode,ra=!1;break e;case 3:case 4:ft=j.stateNode.containerInfo,ra=!0;break e}j=j.return}if(ft===null)throw Error(c(160));Pf(u,h,r),ft=null,ra=!1,u=r.alternate,u!==null&&(u.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Gf(t,e),t=t.sibling}var Ia=null;function Gf(e,t){var l=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:oa(t,e),ca(e),s&4&&(Kl(3,e,e.return),vi(3,e),Kl(5,e,e.return));break;case 1:oa(t,e),ca(e),s&512&&(Mt||l===null||cl(l,l.return)),s&64&&Sl&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?s:l.concat(s))));break;case 26:var r=Ia;if(oa(t,e),ca(e),s&512&&(Mt||l===null||cl(l,l.return)),s&4){var u=l!==null?l.memoizedState:null;if(s=e.memoizedState,l===null)if(s===null)if(e.stateNode===null){e:{s=e.type,l=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":u=r.getElementsByTagName("title")[0],(!u||u[bs]||u[kt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=r.createElement(s),r.head.insertBefore(u,r.querySelector("head > title"))),Yt(u,s,l),u[kt]=e,_t(u),s=u;break e;case"link":var h=G0("link","href",r).get(s+(l.href||""));if(h){for(var j=0;j<h.length;j++)if(u=h[j],u.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&u.getAttribute("rel")===(l.rel==null?null:l.rel)&&u.getAttribute("title")===(l.title==null?null:l.title)&&u.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){h.splice(j,1);break t}}u=r.createElement(s),Yt(u,s,l),r.head.appendChild(u);break;case"meta":if(h=G0("meta","content",r).get(s+(l.content||""))){for(j=0;j<h.length;j++)if(u=h[j],u.getAttribute("content")===(l.content==null?null:""+l.content)&&u.getAttribute("name")===(l.name==null?null:l.name)&&u.getAttribute("property")===(l.property==null?null:l.property)&&u.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute("charset")===(l.charSet==null?null:l.charSet)){h.splice(j,1);break t}}u=r.createElement(s),Yt(u,s,l),r.head.appendChild(u);break;default:throw Error(c(468,s))}u[kt]=e,_t(u),s=u}e.stateNode=s}else X0(r,e.type,e.stateNode);else e.stateNode=V0(r,s,e.memoizedProps);else u!==s?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,s===null?X0(r,e.type,e.stateNode):V0(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&pu(e,e.memoizedProps,l.memoizedProps)}break;case 27:oa(t,e),ca(e),s&512&&(Mt||l===null||cl(l,l.return)),l!==null&&s&4&&pu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(oa(t,e),ca(e),s&512&&(Mt||l===null||cl(l,l.return)),e.flags&32){r=e.stateNode;try{Is(r,"")}catch(xe){We(e,e.return,xe)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,pu(e,r,l!==null?l.memoizedProps:r)),s&1024&&(yu=!0);break;case 6:if(oa(t,e),ca(e),s&4){if(e.stateNode===null)throw Error(c(162));s=e.memoizedProps,l=e.stateNode;try{l.nodeValue=s}catch(xe){We(e,e.return,xe)}}break;case 3:if(no=null,r=Ia,Ia=lo(t.containerInfo),oa(t,e),Ia=r,ca(e),s&4&&l!==null&&l.memoizedState.isDehydrated)try{Cn(t.containerInfo)}catch(xe){We(e,e.return,xe)}yu&&(yu=!1,Xf(e));break;case 4:s=Ia,Ia=lo(e.stateNode.containerInfo),oa(t,e),ca(e),Ia=s;break;case 12:oa(t,e),ca(e);break;case 31:oa(t,e),ca(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pr(e,s)));break;case 13:oa(t,e),ca(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Vr=dt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pr(e,s)));break;case 22:r=e.memoizedState!==null;var M=l!==null&&l.memoizedState!==null,$=Sl,X=Mt;if(Sl=$||r,Mt=X||M,oa(t,e),Mt=X,Sl=$,ca(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(l===null||M||Sl||Mt||zs(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){M=l=t;try{if(u=M.stateNode,r)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{j=M.stateNode;var Z=M.memoizedProps.style,q=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;j.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(xe){We(M,M.return,xe)}}}else if(t.tag===6){if(l===null){M=t;try{M.stateNode.nodeValue=r?"":M.memoizedProps}catch(xe){We(M,M.return,xe)}}}else if(t.tag===18){if(l===null){M=t;try{var Y=M.stateNode;r?B0(Y,!0):B0(M.stateNode,!1)}catch(xe){We(M,M.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(l=s.retryQueue,l!==null&&(s.retryQueue=null,Pr(e,l))));break;case 19:oa(t,e),ca(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pr(e,s)));break;case 30:break;case 21:break;default:oa(t,e),ca(e)}}function ca(e){var t=e.flags;if(t&2){try{for(var l,s=e.return;s!==null;){if(Uf(s)){l=s;break}s=s.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var r=l.stateNode,u=bu(e);qr(e,u,r);break;case 5:var h=l.stateNode;l.flags&32&&(Is(h,""),l.flags&=-33);var j=bu(e);qr(e,j,h);break;case 3:case 4:var M=l.stateNode.containerInfo,$=bu(e);gu(e,$,M);break;default:throw Error(c(161))}}catch(X){We(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$f(e,t.alternate,t),t=t.sibling}function zs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kl(4,t,t.return),zs(t);break;case 1:cl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Bf(t,t.return,l),zs(t);break;case 27:Mi(t.stateNode);case 26:case 5:cl(t,t.return),zs(t);break;case 22:t.memoizedState===null&&zs(t);break;case 30:zs(t);break;default:zs(t)}e=e.sibling}}function Cl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:Cl(r,u,l),vi(4,u);break;case 1:if(Cl(r,u,l),s=u,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch($){We(s,s.return,$)}if(s=u,r=s.updateQueue,r!==null){var j=s.stateNode;try{var M=r.shared.hiddenCallbacks;if(M!==null)for(r.shared.hiddenCallbacks=null,r=0;r<M.length;r++)Nx(M[r],j)}catch($){We(s,s.return,$)}}l&&h&64&&zf(u),ji(u,u.return);break;case 27:Hf(u);case 26:case 5:Cl(r,u,l),l&&s===null&&h&4&&Of(u),ji(u,u.return);break;case 12:Cl(r,u,l);break;case 31:Cl(r,u,l),l&&h&4&&Yf(r,u);break;case 13:Cl(r,u,l),l&&h&4&&Vf(r,u);break;case 22:u.memoizedState===null&&Cl(r,u,l),ji(u,u.return);break;case 30:break;default:Cl(r,u,l)}t=t.sibling}}function vu(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ri(l))}function ju(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ri(e))}function Za(e,t,l,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qf(e,t,l,s),t=t.sibling}function Qf(e,t,l,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Za(e,t,l,s),r&2048&&vi(9,t);break;case 1:Za(e,t,l,s);break;case 3:Za(e,t,l,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ri(e)));break;case 12:if(r&2048){Za(e,t,l,s),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,j=u.onPostCommit;typeof j=="function"&&j(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){We(t,t.return,M)}}else Za(e,t,l,s);break;case 31:Za(e,t,l,s);break;case 13:Za(e,t,l,s);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?Za(e,t,l,s):wi(e,t):u._visibility&2?Za(e,t,l,s):(u._visibility|=2,pn(e,t,l,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&vu(h,t);break;case 24:Za(e,t,l,s),r&2048&&ju(t.alternate,t);break;default:Za(e,t,l,s)}}function pn(e,t,l,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,j=l,M=s,$=h.flags;switch(h.tag){case 0:case 11:case 15:pn(u,h,j,M,r),vi(8,h);break;case 23:break;case 22:var X=h.stateNode;h.memoizedState!==null?X._visibility&2?pn(u,h,j,M,r):wi(u,h):(X._visibility|=2,pn(u,h,j,M,r)),r&&$&2048&&vu(h.alternate,h);break;case 24:pn(u,h,j,M,r),r&&$&2048&&ju(h.alternate,h);break;default:pn(u,h,j,M,r)}t=t.sibling}}function wi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,s=t,r=s.flags;switch(s.tag){case 22:wi(l,s),r&2048&&vu(s.alternate,s);break;case 24:wi(l,s),r&2048&&ju(s.alternate,s);break;default:wi(l,s)}t=t.sibling}}var Ni=8192;function bn(e,t,l){if(e.subtreeFlags&Ni)for(e=e.child;e!==null;)If(e,t,l),e=e.sibling}function If(e,t,l){switch(e.tag){case 26:bn(e,t,l),e.flags&Ni&&e.memoizedState!==null&&Ug(l,Ia,e.memoizedState,e.memoizedProps);break;case 5:bn(e,t,l);break;case 3:case 4:var s=Ia;Ia=lo(e.stateNode.containerInfo),bn(e,t,l),Ia=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Ni,Ni=16777216,bn(e,t,l),Ni=s):bn(e,t,l));break;default:bn(e,t,l)}}function Zf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Si(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];Ft=s,Jf(s,e)}Zf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Kf(e),e=e.sibling}function Kf(e){switch(e.tag){case 0:case 11:case 15:Si(e),e.flags&2048&&Kl(9,e,e.return);break;case 3:Si(e);break;case 12:Si(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yr(e)):Si(e);break;default:Si(e)}}function Yr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];Ft=s,Jf(s,e)}Zf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kl(8,t,t.return),Yr(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Yr(t));break;default:Yr(t)}e=e.sibling}}function Jf(e,t){for(;Ft!==null;){var l=Ft;switch(l.tag){case 0:case 11:case 15:Kl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:ri(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,Ft=s;else e:for(l=e;Ft!==null;){s=Ft;var r=s.sibling,u=s.return;if(qf(s),s===l){Ft=null;break e}if(r!==null){r.return=u,Ft=r;break e}Ft=u}}}var Wb={getCacheForType:function(e){var t=qt(Ct),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return qt(Ct).controller.signal}}
vendor: 14,837 bytes, line 48
48,eg=typeof WeakMap=="function"?WeakMap:Map,Ze=0,it=null,ze=null,Ue=0,Je=0,wa=null,Jl=!1,gn=!1,wu=!1,El=0,yt=0,Wl=0,Bs=0,Nu=0,Na=0,yn=0,ki=null,ua=null,Su=!1,Vr=0,Wf=0,Gr=1/0,Xr=null,es=null,Bt=0,ts=null,vn=null,Al=0,ku=0,_u=null,e0=null,_i=0,Cu=null;function Sa(){return(Ze&2)!==0&&Ue!==0?Ue&-Ue:O.T!==null?Du():Xs()}function t0(){if(Na===0)if((Ue&536870912)===0||$e){var e=ml;ml<<=1,(ml&3932160)===0&&(ml=262144),Na=e}else Na=536870912;return e=va.current,e!==null&&(e.flags|=32),Na}function da(e,t,l){(e===it&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(jn(e,0),as(e,Ue,Na,!1)),Ma(e,l),((Ze&2)===0||e!==it)&&(e===it&&((Ze&2)===0&&(Bs|=l),yt===4&&as(e,Ue,Na,!1)),ul(e))}function a0(e,t,l){if((Ze&6)!==0)throw Error(c(327));var s=!l&&(t&127)===0&&(t&e.expiredLanes)===0||xt(e,t),r=s?lg(e,t):Au(e,t,!0),u=s;do{if(r===0){gn&&!s&&as(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!tg(l)){r=Au(e,t,!1),u=!1;continue}if(r===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var j=e;r=ki;var M=j.current.memoizedState.isDehydrated;if(M&&(jn(j,h).flags|=256),h=Au(j,h,!1),h!==2){if(wu&&!M){j.errorRecoveryDisabledLanes|=u,Bs|=u,r=4;break e}u=ua,ua=r,u!==null&&(ua===null?ua=u:ua.push.apply(ua,u))}r=h}if(u=!1,r!==2)continue}}if(r===1){jn(e,0),as(e,t,0,!0);break}e:{switch(s=e,u=r,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:as(s,t,Na,!Jl);break e;case 2:ua=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(r=Vr+300-dt(),10<r)){if(as(s,t,Na,!Jl),Aa(s,0,!0)!==0)break e;Al=t,s.timeoutHandle=D0(l0.bind(null,s,l,ua,Xr,Su,t,Na,Bs,yn,Jl,u,"Throttled",-0,0),r);break e}l0(s,l,ua,Xr,Su,t,Na,Bs,yn,Jl,u,null,-0,0)}}break}while(!0);ul(e)}function l0(e,t,l,s,r,u,h,j,M,$,X,Z,q,Y){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fl},If(t,u,Z);var xe=(u&62914560)===u?Vr-dt():(u&4194048)===u?Wf-dt():0;if(xe=Hg(Z,xe),xe!==null){Al=u,e.cancelPendingCommit=xe(d0.bind(null,e,t,u,l,s,r,h,j,M,X,Z,null,q,Y)),as(e,u,h,!$);return}}d0(e,t,u,l,s,r,h,j,M)}function tg(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var s=0;s<l.length;s++){var r=l[s],u=r.getSnapshot;r=r.value;try{if(!ga(u(),r))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function as(e,t,l,s){t&=~Nu,t&=~Bs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var u=31-be(r),h=1<<u;s[u]=-1,r&=~h}l!==0&&Va(e,l,t)}function Qr(){return(Ze&6)===0?(Ci(0),!1):!0}function Eu(){if(ze!==null){if(Je===0)var e=ze.return;else e=ze,gl=Cs=null,Yc(e),dn=null,ci=0,e=ze;for(;e!==null;)Lf(e.alternate,e),e=e.return;ze=null}}function jn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,jg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Al=0,Eu(),it=e,ze=l=pl(e.current,null),Ue=t,Je=0,wa=null,Jl=!1,gn=xt(e,t),wu=!1,yn=Na=Nu=Bs=Wl=yt=0,ua=ki=null,Su=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-be(s),u=1<<r;t|=e[r],s&=~u}return El=t,hr(),l}function s0(e,t){Ee=null,O.H=bi,t===un||t===Nr?(t=yx(),Je=3):t===Tc?(t=yx(),Je=4):Je=t===iu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wa=t,ze===null&&(yt=1,Or(e,La(t,e.current)))}function n0(){var e=va.current;return e===null?!0:(Ue&4194048)===Ue?Ua===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Ua:!1}function i0(){var e=O.H;return O.H=bi,e===null?bi:e}function r0(){var e=O.A;return O.A=Wb,e}function Ir(){yt=4,Jl||(Ue&4194048)!==Ue&&va.current!==null||(gn=!0),(Wl&134217727)===0&&(Bs&134217727)===0||it===null||as(it,Ue,Na,!1)}function Au(e,t,l){var s=Ze;Ze|=2;var r=i0(),u=r0();(it!==e||Ue!==t)&&(Xr=null,jn(e,t)),t=!1;var h=yt;e:do try{if(Je!==0&&ze!==null){var j=ze,M=wa;switch(Je){case 8:Eu(),h=6;break e;case 3:case 2:case 9:case 6:va.current===null&&(t=!0);var $=Je;if(Je=0,wa=null,wn(e,j,M,$),l&&gn){h=0;break e}break;default:$=Je,Je=0,wa=null,wn(e,j,M,$)}}ag(),h=yt;break}catch(X){s0(e,X)}while(!0);return t&&e.shellSuspendCounter++,gl=Cs=null,Ze=s,O.H=r,O.A=u,ze===null&&(it=null,Ue=0,hr()),h}function ag(){for(;ze!==null;)o0(ze)}function lg(e,t){var l=Ze;Ze|=2;var s=i0(),r=r0();it!==e||Ue!==t?(Xr=null,Gr=dt()+500,jn(e,t)):gn=xt(e,t);e:do try{if(Je!==0&&ze!==null){t=ze;var u=wa;t:switch(Je){case 1:Je=0,wa=null,wn(e,t,u,1);break;case 2:case 9:if(bx(u)){Je=0,wa=null,c0(t);break}t=function(){Je!==2&&Je!==9||it!==e||(Je=7),ul(e)},u.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:bx(u)?(Je=0,wa=null,c0(t)):(Je=0,wa=null,wn(e,t,u,7));break;case 5:var h=null;switch(ze.tag){case 26:h=ze.memoizedState;case 5:case 27:var j=ze;if(h?Q0(h):j.stateNode.complete){Je=0,wa=null;var M=j.sibling;if(M!==null)ze=M;else{var $=j.return;$!==null?(ze=$,Zr($)):ze=null}break t}}Je=0,wa=null,wn(e,t,u,5);break;case 6:Je=0,wa=null,wn(e,t,u,6);break;case 8:Eu(),yt=6;break e;default:throw Error(c(462))}}sg();break}catch(X){s0(e,X)}while(!0);return gl=Cs=null,O.H=s,O.A=r,Ze=l,ze!==null?0:(it=null,Ue=0,hr(),yt)}function sg(){for(;ze!==null&&!pa();)o0(ze)}function o0(e){var t=Tf(e.alternate,e,El);e.memoizedProps=e.pendingProps,t===null?Zr(e):ze=t}function c0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=_f(l,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=_f(l,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Yc(t);default:Lf(l,t),t=ze=ix(t,El),t=Tf(l,t,El)}e.memoizedProps=e.pendingProps,t===null?Zr(e):ze=t}function wn(e,t,l,s){gl=Cs=null,Yc(t),dn=null,ci=0;var r=t.return;try{if(Gb(e,r,t,l,Ue)){yt=1,Or(e,La(l,e.current)),ze=null;return}}catch(u){if(r!==null)throw ze=r,u;yt=1,Or(e,La(l,e.current)),ze=null;return}t.flags&32768?($e||s===1?e=!0:gn||(Ue&536870912)!==0?e=!1:(Jl=e=!0,(s===2||s===9||s===3||s===6)&&(s=va.current,s!==null&&s.tag===13&&(s.flags|=16384))),u0(t,e)):Zr(t)}function Zr(e){var t=e;do{if((t.flags&32768)!==0){u0(t,Jl);return}e=t.return;var l=Ib(t.alternate,t,El);if(l!==null){ze=l;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);yt===0&&(yt=5)}function u0(e,t){do{var l=Zb(e.alternate,e);if(l!==null){l.flags&=32767,ze=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=l}while(e!==null);yt=6,ze=null}function d0(e,t,l,s,r,u,h,j,M){e.cancelPendingCommit=null;do Kr();while(Bt!==0);if((Ze&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=bc,bt(e,l,u,h,j,M),e===it&&(ze=it=null,Ue=0),vn=t,ts=e,Al=l,ku=u,_u=r,e0=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,og(Ke,function(){return p0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=O.T,O.T=null,r=Q.p,Q.p=2,h=Ze,Ze|=4;try{Kb(e,t,l)}finally{Ze=h,Q.p=r,O.T=s}}Bt=1,m0(),x0(),f0()}}function m0(){if(Bt===1){Bt=0;var e=ts,t=vn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null;var s=Q.p;Q.p=2;var r=Ze;Ze|=4;try{Gf(t,e);var u=$u,h=Km(e.containerInfo),j=u.focusedElem,M=u.selectionRange;if(h!==j&&j&&j.ownerDocument&&Zm(j.ownerDocument.documentElement,j)){if(M!==null&&mc(j)){var $=M.start,X=M.end;if(X===void 0&&(X=$),"selectionStart"in j)j.selectionStart=$,j.selectionEnd=Math.min(X,j.value.length);else{var Z=j.ownerDocument||document,q=Z&&Z.defaultView||window;if(q.getSelection){var Y=q.getSelection(),xe=j.textContent.length,je=Math.min(M.start,xe),st=M.end===void 0?je:Math.min(M.end,xe);!Y.extend&&je>st&&(h=st,st=je,je=h);var H=Im(j,je),L=Im(j,st);if(H&&L&&(Y.rangeCount!==1||Y.anchorNode!==H.node||Y.anchorOffset!==H.offset||Y.focusNode!==L.node||Y.focusOffset!==L.offset)){var F=Z.createRange();F.setStart(H.node,H.offset),Y.removeAllRanges(),je>st?(Y.addRange(F),Y.extend(L.node,L.offset)):(F.setEnd(L.node,L.offset),Y.addRange(F))}}}}for(Z=[],Y=j;Y=Y.parentNode;)Y.nodeType===1&&Z.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<Z.length;j++){var I=Z[j];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}co=!!Fu,$u=Fu=null}finally{Ze=r,Q.p=s,O.T=l}}e.current=t,Bt=2}}function x0(){if(Bt===2){Bt=0;var e=ts,t=vn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=O.T,O.T=null;var s=Q.p;Q.p=2;var r=Ze;Ze|=4;try{$f(e,t.alternate,t)}finally{Ze=r,Q.p=s,O.T=l}}Bt=3}}function f0(){if(Bt===4||Bt===3){Bt=0,Ea();var e=ts,t=vn,l=Al,s=e0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Bt=5:(Bt=0,vn=ts=null,h0(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(es=null),Vn(l),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(It,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=O.T,r=Q.p,Q.p=2,O.T=null;try{for(var u=e.onRecoverableError,h=0;h<s.length;h++){var j=s[h];u(j.value,{componentStack:j.stack})}}finally{O.T=t,Q.p=r}}(Al&3)!==0&&Kr(),ul(e),r=e.pendingLanes,(l&261930)!==0&&(r&42)!==0?e===Cu?_i++:(_i=0,Cu=e):_i=0,Ci(0)}}function h0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ri(t)))}function Kr(){return m0(),x0(),f0(),p0()}function p0(){if(Bt!==5)return!1;var e=ts,t=ku;ku=0;var l=Vn(Al),s=O.T,r=Q.p;try{Q.p=32>l?32:l,O.T=null,l=_u,_u=null;var u=ts,h=Al;if(Bt=0,vn=ts=null,Al=0,(Ze&6)!==0)throw Error(c(331));var j=Ze;if(Ze|=4,Kf(u.current),Qf(u,u.current,h,l),Ze=j,Ci(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(It,u)}catch{}return!0}finally{Q.p=r,O.T=s,h0(e,t)}}function b0(e,t,l){t=La(l,t),t=nu(e.stateNode,t,2),e=Ql(e,t,2),e!==null&&(Ma(e,2),ul(e))}function We(e,t,l){if(e.tag===3)b0(e,e,l);else for(;t!==null;){if(t.tag===3){b0(t,e,l);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(es===null||!es.has(s))){e=La(l,e),l=gf(2),s=Ql(t,l,2),s!==null&&(yf(l,s,t,e),Ma(s,2),ul(s));break}}t=t.return}}function Mu(e,t,l){var s=e.pingCache;if(s===null){s=e.pingCache=new eg;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(l)||(wu=!0,r.add(l),e=ng.bind(null,e,t,l),t.then(e,e))}function ng(e,t,l){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,it===e&&(Ue&l)===l&&(yt===4||yt===3&&(Ue&62914560)===Ue&&300>dt()-Vr?(Ze&2)===0&&jn(e,0):Nu|=l,yn===Ue&&(yn=0)),ul(e)}function g0(e,t){t===0&&(t=Fe()),e=Ss(e,t),e!==null&&(Ma(e,t),ul(e))}function ig(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),g0(e,l)}function rg(e,t){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(l=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(c(314))}s!==null&&s.delete(t),g0(e,l)}function og(e,t){return pt(e,t)}var Jr=null,Nn=null,Ru=!1,Wr=!1,Tu=!1,ls=0;function ul(e){e!==Nn&&e.next===null&&(Nn===null?Jr=Nn=e:Nn=Nn.next=e),Wr=!0,Ru||(Ru=!0,ug())}function Ci(e,t){if(!Tu&&Wr){Tu=!0;do for(var l=!1,s=Jr;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var u=0;else{var h=s.suspendedLanes,j=s.pingedLanes;u=(1<<31-be(42|e)+1)-1,u&=r&~(h&~j),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,w0(s,u))}else u=Ue,u=Aa(s,s===it?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||xt(s,u)||(l=!0,w0(s,u));s=s.next}while(l);Tu=!1}}function cg(){y0()}function y0(){Wr=Ru=!1;var e=0;ls!==0&&vg()&&(e=ls);for(var t=dt(),l=null,s=Jr;s!==null;){var r=s.next,u=v0(s,t);u===0?(s.next=null,l===null?Jr=r:l.next=r,r===null&&(Nn=l)):(l=s,(e!==0||(u&3)!==0)&&(Wr=!0)),s=r}Bt!==0&&Bt!==5||Ci(e),ls!==0&&(ls=0)}function v0(e,t){for(var l=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-be(u),j=1<<h,M=r[h];M===-1?((j&l)===0||(j&s)!==0)&&(r[h]=ve(j,t)):M<=t&&(e.expiredLanes|=j),u&=~j}if(t=it,l=Ue,l=Aa(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,l===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&ea(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||xt(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(s!==null&&ea(s),Vn(l)){case 2:case 8:l=Te;break;case 32:l=Ke;break;case 268435456:l=Ce;break;default:l=Ke}return s=j0.bind(null,e),l=pt(l,s),e.callbackPriority=t,e.callbackNode=l,t}return s!==null&&s!==null&&ea(s),e.callbackPriority=2,e.callbackNode=null,2}function j0(e,t){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Kr()&&e.callbackNode!==l)return null;var s=Ue;return s=Aa(e,e===it?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(a0(e,s,t),v0(e,dt()),e.callbackNode!=null&&e.callbackNode===l?j0.bind(null,e):null)}function w0(e,t){if(Kr())return null;a0(e,t,!0)}function ug(){wg(function(){(Ze&6)!==0?pt(we,cg):y0()})}function Du(){if(ls===0){var e=on;e===0&&(e=Pe,Pe<<=1,(Pe&261888)===0&&(Pe=256)),ls=e}return ls}function N0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rr(""+e)}function S0(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function dg(e,t,l,s,r){if(t==="submit"&&l&&l.stateNode===r){var u=N0((r[Ht]||null).action),h=s.submitter;h&&(t=(t=h[Ht]||null)?N0(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var j=new dr("action","action",null,s,r);e.push({event:j,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ls!==0){var M=h?S0(r,h):new FormData(r);Wc(l,{pending:!0,data:M,method:r.method,action:u},null,M)}}else typeof u=="function"&&(j.preventDefault(),M=h?S0(r,h):new FormData(r),Wc(l,{pending:!0,data:M,method:r.method,action:u},u,M))},currentTarget:r}]})}}for(var Lu=0;Lu<pc.length;Lu++){var zu=pc[Lu],mg=zu.toLowerCase(),xg=zu[0].toUpperCase()+zu.slice(1);Qa(mg,"on"+xg)}Qa(ex,"onAnimationEnd"),Qa(tx,"onAnimationIteration"),Qa(ax,"onAnimationStart"),Qa("dblclick","onDoubleClick"),Qa("focusin","onFocus"),Qa("focusout","onBlur"),Qa(Ab,"onTransitionRun"),Qa(Mb,"onTransitionStart"),Qa(Rb,"onTransitionCancel"),Qa(lx,"onTransitionEnd"),Fl("onMouseEnter",["mouseout","mouseover"]),Fl("onMouseLeave",["mouseout","mouseover"]),Fl("onPointerEnter",["pointerout","pointerover"]),Fl("onPointerLeave",["pointerout","pointerover"]),xl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xl("onSelect","focusout contextmenu dragend focu
48sin keydown keyup mousedown mouseup selectionchange".split(" ")),xl("onBeforeInput",["compositionend","keypress","textInput","paste"]),xl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ei="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(" "),fg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ei));function k0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],r=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var h=s.length-1;0<=h;h--){var j=s[h],M=j.instance,$=j.currentTarget;if(j=j.listener,M!==u&&r.isPropagationStopped())break e;u=j,r.currentTarget=$;try{u(r)}catch(X){fr(X)}r.currentTarget=null,u=M}else for(h=0;h<s.length;h++){if(j=s[h],M=j.instance,$=j.currentTarget,j=j.listener,M!==u&&r.isPropagationStopped())break e;u=j,r.currentTarget=$;try{u(r)}catch(X){fr(X)}r.currentTarget=null,u=M}}}}function Be(e,t){var l=t[Gn];l===void 0&&(l=t[Gn]=new Set);var s=e+"__bubble";l.has(s)||(_0(t,e,2,!1),l.add(s))}function Bu(e,t,l){var s=0;t&&(s|=4),_0(l,e,s,t)}var eo="_reactListening"+Math.random().toString(36).slice(2);function Ou(e){if(!e[eo]){e[eo]=!0,lr.forEach(function(l){l!=="selectionchange"&&(fg.has(l)||Bu(l,!1,e),Bu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[eo]||(t[eo]=!0,Bu("selectionchange",!1,t))}}function _0(e,t,l,s){switch(th(t)){case 2:var r=qg;break;case 8:r=Pg;break;default:r=Ju}l=r.bind(null,t,l,e),r=void 0,!lc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,l,{capture:!0,passive:r}):e.addEventListener(t,l,!0):r!==void 0?e.addEventListener(t,l,{passive:r}):e.addEventListener(t,l,!1)}function Uu(e,t,l,s,r){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var h=s.tag;if(h===3||h===4){var j=s.stateNode.containerInfo;if(j===r)break;if(h===4)for(h=s.return;h!==null;){var M=h.tag;if((M===3||M===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;j!==null;){if(h=Ol(j),h===null)return;if(M=h.tag,M===5||M===6||M===26||M===27){s=u=h;continue e}j=j.parentNode}}s=s.return}Mm(function(){var $=u,X=tc(l),Z=[];e:{var q=sx.get(e);if(q!==void 0){var Y=dr,xe=e;switch(e){case"keypress":if(cr(l)===0)break e;case"keydown":case"keyup":Y=rb;break;case"focusin":xe="focus",Y=rc;break;case"focusout":xe="blur",Y=rc;break;case"beforeblur":case"afterblur":Y=rc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Dm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=I1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=ub;break;case ex:case tx:case ax:Y=J1;break;case lx:Y=mb;break;case"scroll":case"scrollend":Y=X1;break;case"wheel":Y=fb;break;case"copy":case"cut":case"paste":Y=eb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=zm;break;case"toggle":case"beforetoggle":Y=pb}var je=(t&4)!==0,st=!je&&(e==="scroll"||e==="scrollend"),H=je?q!==null?q+"Capture":null:q;je=[];for(var L=$,F;L!==null;){var I=L;if(F=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||F===null||H===null||(I=Zn(L,H),I!=null&&je.push(Ai(L,I,F))),st)break;L=L.return}0<je.length&&(q=new Y(q,xe,null,l,X),Z.push({event:q,listeners:je}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",q&&l!==ec&&(xe=l.relatedTarget||l.fromElement)&&(Ol(xe)||xe[il]))break e;if((Y||q)&&(q=X.window===X?X:(q=X.ownerDocument)?q.defaultView||q.parentWindow:window,Y?(xe=l.relatedTarget||l.toElement,Y=$,xe=xe?Ol(xe):null,xe!==null&&(st=m(xe),je=xe.tag,xe!==st||je!==5&&je!==27&&je!==6)&&(xe=null)):(Y=null,xe=$),Y!==xe)){if(je=Dm,I="onMouseLeave",H="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(je=zm,I="onPointerLeave",H="onPointerEnter",L="pointer"),st=Y==null?q:gs(Y),F=xe==null?q:gs(xe),q=new je(I,L+"leave",Y,l,X),q.target=st,q.relatedTarget=F,I=null,Ol(X)===$&&(je=new je(H,L+"enter",xe,l,X),je.target=F,je.relatedTarget=st,I=je),st=I,Y&&xe)t:{for(je=hg,H=Y,L=xe,F=0,I=H;I;I=je(I))F++;I=0;for(var ye=L;ye;ye=je(ye))I++;for(;0<F-I;)H=je(H),F--;for(;0<I-F;)L=je(L),I--;for(;F--;){if(H===L||L!==null&&H===L.alternate){je=H;break t}H=je(H),L=je(L)}je=null}else je=null;Y!==null&&C0(Z,q,Y,je,!1),xe!==null&&st!==null&&C0(Z,st,xe,je,!0)}}
vendor: 5,189 bytes, lines 48-49
48e:{if(q=$?gs($):window,Y=q.nodeName&&q.nodeName.toLowerCase(),Y==="select"||Y==="input"&&q.type==="file")var Qe=Pm;else if($m(q))if(Ym)Qe=_b;else{Qe=Sb;var pe=Nb}else Y=q.nodeName,!Y||Y.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?$&&Wo($.elementType)&&(Qe=Pm):Qe=kb;if(Qe&&(Qe=Qe(e,$))){qm(Z,Qe,l,X);break e}pe&&pe(e,q,$),e==="focusout"&&$&&q.type==="number"&&$.memoizedProps.value!=null&&Ye(q,"number",q.value)}switch(pe=$?gs($):window,e){case"focusin":($m(pe)||pe.contentEditable==="true")&&(Ws=pe,xc=$,si=null);break;case"focusout":si=xc=Ws=null;break;case"mousedown":fc=!0;break;case"contextmenu":case"mouseup":case"dragend":fc=!1,Jm(Z,l,X);break;case"selectionchange":if(Eb)break;case"keydown":case"keyup":Jm(Z,l,X)}var Me;if(cc)e:{switch(e){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Js?Hm(e,l)&&(He="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&(Bm&&l.locale!=="ko"&&(Js||He!=="onCompositionStart"?He==="onCompositionEnd"&&Js&&(Me=Rm()):($l=X,sc="value"in $l?$l.value:$l.textContent,Js=!0)),pe=to($,He),0<pe.length&&(He=new Lm(He,e,null,l,X),Z.push({event:He,listeners:pe}),Me?He.data=Me:(Me=Fm(l),Me!==null&&(He.data=Me)))),(Me=gb?yb(e,l):vb(e,l))&&(He=to($,"onBeforeInput"),0<He.length&&(pe=new Lm("onBeforeInput","beforeinput",null,l,X),Z.push({event:pe,listeners:He}),pe.data=Me)),dg(Z,e,$,l,X)}k0(Z,t)})}function Ai(e,t,l){return{instance:e,listener:t,currentTarget:l}}function to(e,t){for(var l=t+"Capture",s=[];e!==null;){var r=e,u=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||u===null||(r=Zn(e,l),r!=null&&s.unshift(Ai(e,r,u)),r=Zn(e,t),r!=null&&s.push(Ai(e,r,u))),e.tag===3)return s;e=e.return}return[]}function hg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function C0(e,t,l,s,r){for(var u=t._reactName,h=[];l!==null&&l!==s;){var j=l,M=j.alternate,$=j.stateNode;if(j=j.tag,M!==null&&M===s)break;j!==5&&j!==26&&j!==27||$===null||(M=$,r?($=Zn(l,u),$!=null&&h.unshift(Ai(l,$,M))):r||($=Zn(l,u),$!=null&&h.push(Ai(l,$,M)))),l=l.return}h.length!==0&&e.push({event:t,listeners:h})}var pg=/\r\n?/g,bg=/\u0000|\uFFFD/g;function E0(e){return(typeof e=="string"?e:""+e).replace(pg,`
49`).replace(bg,"")}function A0(e,t){return t=E0(t),E0(e)===t}function lt(e,t,l,s,r,u){switch(l){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Is(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Is(e,""+s);break;case"className":vs(e,"class",s);break;case"tabIndex":vs(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":vs(e,l,s);break;case"style":Em(e,s,u);break;case"data":if(t!=="object"){vs(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=rr(""+s),e.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(l==="formAction"?(t!=="input"&&lt(e,t,"name",r.name,r,null),lt(e,t,"formEncType",r.formEncType,r,null),lt(e,t,"formMethod",r.formMethod,r,null),lt(e,t,"formTarget",r.formTarget,r,null)):(lt(e,t,"encType",r.encType,r,null),lt(e,t,"method",r.method,r,null),lt(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=rr(""+s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=fl);break;case"onScroll":s!=null&&Be("scroll",e);break;case"onScrollEnd":s!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(c(61));if(l=s.__html,l!=null){if(r.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}l=rr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""+s):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":s===!0?e.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(l,s):e.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(l):e.setAttribute(l,s);break;case"popover":Be("beforetoggle",e),Be("toggle",e),Qs(e,"popover",s);break;case"xlinkActuate":Ra(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ra(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ra(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ra(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ra(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ra(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ra(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ra(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ra(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Qs(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=V1.get(l)||l,Qs(e,l,s))}}function Hu(e,t,l,s,r,u){switch(l){case"style":Em(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(c(61));if(l=s.__html,l!=null){if(r.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"children":typeof s=="string"?Is(e,s):(typeof s=="number"||typeof s=="bigint")&&Is(e,""+s);break;case"onScroll":s!=null&&Be("scroll",e);break;case"onScrollEnd":s!=null&&Be("scrollend",e);break;case"onClick":s!=null&&(e.onclick=fl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ys.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(r=l.endsWith("Capture"),t=l.slice(2,r?l.length-7:void 0),u=e[Ht]||null,u=u!=null?u[l]:null,typeof u=="function"&&e.removeEventListener(t,u,r),typeof s=="function")){typeof u!="function"&&u!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,s,r);break e}l in e?e[l]=s:s===!0?e.setAttribute(l,""):Qs(e,l,s)}}}function Yt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var s=!1,r=!1,u;for(u in l)if(l.hasOwnProperty(u)){var h=l[u];if(h!=null)switch(u){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:lt(e,t,u,h,l,null)}}r&&lt(e,t,"srcSet",l.srcSet,l,null),s&&lt(e,t,"src",l.src,l,null);return;case"input":Be("invalid",e);var j=u=h=r=null,M=null,$=null;for(s in l)if(l.hasOwnProperty(s)){var X=l[s];if(X!=null)switch(s){case"name":r=X;break;case"type":h=X;break;case"checked":M=X;break;case"defaultChecked":$=X;break;case"value":u=X;break;case"defaultValue":j=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(c(137,t));break;default:lt(e,t,s,X,l,null)}}nt(e,u,j,M,$,h,r,!1);return;case"select":Be("invalid",e),s=h=u=null;for(r in l)if(l.hasOwnProperty(r)&&(j=l[r],j!=null))switch(r){case"value":u=j;break;case"defaultValue":h=j;break;case"multiple":s=j;default:lt(e,t,r,j,l,null)}t=u,l=h,e.multiple=!!s,t!=null?Ta(e,!!s,t,!1):l!=null&&Ta(e,!!s,l,!0);return;case"textarea":Be("invalid",e),u=r=s=null;for(h in l)if(l.hasOwnProperty(h)&&(j=l[h],j!=null))switch(h){case"value":s=j;break;case"defaultValue":r=j;break;case"children":u=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(c(91));break;default:lt(e,t,h,j,l,null)}_m(e,s,r,u);return;case"option":for(M in l)if(l.hasOwnProperty(M)&&(s=l[M],s!=null))switch(M){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:lt(e,t,M,s,l,null)}return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(s=0;s<Ei.length;s++)Be(Ei[s],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;
vendor: 5,166 bytes, line 49
49case"embed":case"source":case"link":Be("error",e),Be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in l)if(l.hasOwnProperty($)&&(s=l[$],s!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:lt(e,t,$,s,l,null)}return;default:if(Wo(t)){for(X in l)l.hasOwnProperty(X)&&(s=l[X],s!==void 0&&Hu(e,t,X,s,l,void 0));return}}for(j in l)l.hasOwnProperty(j)&&(s=l[j],s!=null&&lt(e,t,j,s,l,null))}function gg(e,t,l,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,u=null,h=null,j=null,M=null,$=null,X=null;for(Y in l){var Z=l[Y];if(l.hasOwnProperty(Y)&&Z!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":M=Z;default:s.hasOwnProperty(Y)||lt(e,t,Y,null,s,Z)}}for(var q in s){var Y=s[q];if(Z=l[q],s.hasOwnProperty(q)&&(Y!=null||Z!=null))switch(q){case"type":u=Y;break;case"name":r=Y;break;case"checked":$=Y;break;case"defaultChecked":X=Y;break;case"value":h=Y;break;case"defaultValue":j=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(c(137,t));break;default:Y!==Z&&lt(e,t,q,Y,s,Z)}}Le(e,h,j,M,$,X,u,r);return;case"select":Y=h=j=q=null;for(u in l)if(M=l[u],l.hasOwnProperty(u)&&M!=null)switch(u){case"value":break;case"multiple":Y=M;default:s.hasOwnProperty(u)||lt(e,t,u,null,s,M)}for(r in s)if(u=s[r],M=l[r],s.hasOwnProperty(r)&&(u!=null||M!=null))switch(r){case"value":q=u;break;case"defaultValue":j=u;break;case"multiple":h=u;default:u!==M&&lt(e,t,r,u,s,M)}t=j,l=h,s=Y,q!=null?Ta(e,!!l,q,!1):!!s!=!!l&&(t!=null?Ta(e,!!l,t,!0):Ta(e,!!l,l?[]:"",!1));return;case"textarea":Y=q=null;for(j in l)if(r=l[j],l.hasOwnProperty(j)&&r!=null&&!s.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:lt(e,t,j,null,s,r)}for(h in s)if(r=s[h],u=l[h],s.hasOwnProperty(h)&&(r!=null||u!=null))switch(h){case"value":q=r;break;case"defaultValue":Y=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(c(91));break;default:r!==u&&lt(e,t,h,r,s,u)}In(e,q,Y);return;case"option":for(var xe in l)if(q=l[xe],l.hasOwnProperty(xe)&&q!=null&&!s.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:lt(e,t,xe,null,s,q)}for(M in s)if(q=s[M],Y=l[M],s.hasOwnProperty(M)&&q!==Y&&(q!=null||Y!=null))switch(M){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:lt(e,t,M,q,s,Y)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in l)q=l[je],l.hasOwnProperty(je)&&q!=null&&!s.hasOwnProperty(je)&&lt(e,t,je,null,s,q);for($ in s)if(q=s[$],Y=l[$],s.hasOwnProperty($)&&q!==Y&&(q!=null||Y!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(c(137,t));break;default:lt(e,t,$,q,s,Y)}return;default:if(Wo(t)){for(var st in l)q=l[st],l.hasOwnProperty(st)&&q!==void 0&&!s.hasOwnProperty(st)&&Hu(e,t,st,void 0,s,q);for(X in s)q=s[X],Y=l[X],!s.hasOwnProperty(X)||q===Y||q===void 0&&Y===void 0||Hu(e,t,X,q,s,Y);return}}for(var H in l)q=l[H],l.hasOwnProperty(H)&&q!=null&&!s.hasOwnProperty(H)&&lt(e,t,H,null,s,q);for(Z in s)q=s[Z],Y=l[Z],!s.hasOwnProperty(Z)||q===Y||q==null&&Y==null||lt(e,t,Z,q,s,Y)}function M0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var r=l[s],u=r.transferSize,h=r.initiatorType,j=r.duration;if(u&&j&&M0(h)){for(h=0,j=r.responseEnd,s+=1;s<l.length;s++){var M=l[s],$=M.startTime;if($>j)break;var X=M.transferSize,Z=M.initiatorType;X&&M0(Z)&&(M=M.responseEnd,h+=X*(M<j?1:(j-$)/(M-$)))}if(--s,t+=8*(u+h)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Fu=null,$u=null;function ao(e){return e.nodeType===9?e:e.ownerDocument}function R0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function T0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function qu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Pu=null;function vg(){var e=window.event;return e&&e.type==="popstate"?e===Pu?!1:(Pu=e,!0):(Pu=null,!1)}var D0=typeof setTimeout=="function"?setTimeout:void 0,jg=typeof clearTimeout=="function"?clearTimeout:void 0,L0=typeof Promise=="function"?Promise:void 0,wg=typeof queueMicrotask=="function"?queueMicrotask:typeof L0<"u"?function(e){return L0.resolve(null).then(e).catch(Ng)}:D0;function Ng(e){setTimeout(function(){throw e})}function ss(e){return e==="head"}function z0(e,t){var l=t,s=0;do{var r=l.nextSibling;
vendor: 12,068 bytes, line 49
49if(e.removeChild(l),r&&r.nodeType===8)if(l=r.data,l==="/$"||l==="/&"){if(s===0){e.removeChild(r),Cn(t);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")Mi(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Mi(l);for(var u=l.firstChild;u;){var h=u.nextSibling,j=u.nodeName;u[bs]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=h}}else l==="body"&&Mi(e.ownerDocument.body);l=r}while(l);Cn(t)}function B0(e,t){var l=e;e=0;do{var s=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=s}while(l)}function Yu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Yu(l),Xa(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Sg(e,t,l,s){for(;e.nodeType===1;){var r=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[bs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ha(e.nextSibling),e===null)break}return null}function kg(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ha(e.nextSibling),e===null))return null;return e}function O0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ha(e.nextSibling),e===null))return null;return e}function Vu(e){return e.data==="$?"||e.data==="$~"}function Gu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _g(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var s=function(){t(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ha(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Xu=null;function U0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Ha(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function H0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function F0(e,t,l){switch(t=ao(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Mi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xa(e)}var Fa=new Map,$0=new Set;function lo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ml=Q.d;Q.d={f:Cg,r:Eg,D:Ag,C:Mg,L:Rg,m:Tg,X:Lg,S:Dg,M:zg};function Cg(){var e=Ml.f(),t=Qr();return e||t}function Eg(e){var t=Ul(e);t!==null&&t.tag===5&&t.type==="form"?lf(t):Ml.r(e)}var Sn=typeof document>"u"?null:document;function q0(e,t,l){var s=Sn;if(s&&typeof t=="string"&&t){var r=ke(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof l=="string"&&(r+='[crossorigin="'+l+'"]'),$0.has(r)||($0.add(r),e={rel:e,crossOrigin:l,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Yt(t,"link",e),_t(t),s.head.appendChild(t)))}}function Ag(e){Ml.D(e),q0("dns-prefetch",e,null)}function Mg(e,t){Ml.C(e,t),q0("preconnect",e,t)}function Rg(e,t,l){Ml.L(e,t,l);var s=Sn;if(s&&e&&t){var r='link[rel="preload"][as="'+ke(t)+'"]';t==="image"&&l&&l.imageSrcSet?(r+='[imagesrcset="'+ke(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(r+='[imagesizes="'+ke(l.imageSizes)+'"]')):r+='[href="'+ke(e)+'"]';var u=r;switch(t){case"style":u=kn(e);break;case"script":u=_n(e)}Fa.has(u)||(e=v({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Fa.set(u,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Ri(u))||t==="script"&&s.querySelector(Ti(u))||(t=s.createElement("link"),Yt(t,"link",e),_t(t),s.head.appendChild(t)))}}function Tg(e,t){Ml.m(e,t);var l=Sn;if(l&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+ke(s)+'"][href="'+ke(e)+'"]',u=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=_n(e)}if(!Fa.has(u)&&(e=v({rel:"modulepreload",href:e},t),Fa.set(u,e),l.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ti(u)))return}s=l.createElement("link"),Yt(s,"link",e),_t(s),l.head.appendChild(s)}}}function Dg(e,t,l){Ml.S(e,t,l);var s=Sn;if(s&&e){var r=Hl(s).hoistableStyles,u=kn(e);t=t||"default";var h=r.get(u);if(!h){var j={loading:0,preload:null};if(h=s.querySelector(Ri(u)))j.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Fa.get(u))&&Qu(e,l);var M=h=s.createElement("link");_t(M),Yt(M,"link",e),M._p=new Promise(function($,X){M.onload=$,M.onerror=X}),M.addEventListener("load",function(){j.loading|=1}),M.addEventListener("error",function(){j.loading|=2}),j.loading|=4,so(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:j},r.set(u,h)}}}function Lg(e,t){Ml.X(e,t);var l=Sn;if(l&&e){var s=Hl(l).hoistableScripts,r=_n(e),u=s.get(r);u||(u=l.querySelector(Ti(r)),u||(e=v({src:e,async:!0},t),(t=Fa.get(r))&&Iu(e,t),u=l.createElement("script"),_t(u),Yt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(r,u))}}function zg(e,t){Ml.M(e,t);var l=Sn;if(l&&e){var s=Hl(l).hoistableScripts,r=_n(e),u=s.get(r);u||(u=l.querySelector(Ti(r)),u||(e=v({src:e,async:!0,type:"module"},t),(t=Fa.get(r))&&Iu(e,t),u=l.createElement("script"),_t(u),Yt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(r,u))}}function P0(e,t,l,s){var r=(r=ge.current)?lo(r):null;if(!r)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=kn(l.href),l=Hl(r).hoistableStyles,s=l.get(t),s||(s={type:"style",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=kn(l.href);var u=Hl(r).hoistableStyles,h=u.get(e);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=r.querySelector(Ri(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Fa.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Fa.set(e,l),u||Bg(r,e,l,h.state))),t&&s===null)throw Error(c(528,""));return h}if(t&&s!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=_n(l),l=Hl(r).hoistableScripts,s=l.get(t),s||(s={type:"script",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function kn(e){return'href="'+ke(e)+'"'}function Ri(e){return'link[rel="stylesheet"]['+e+"]"}function Y0(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Bg(e,t,l,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Yt(t,"link",l),_t(t),e.head.appendChild(t))}function _n(e){return'[src="'+ke(e)+'"]'}function Ti(e){return"script[async]"+e}function V0(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+ke(l.href)+'"]');if(s)return t.instance=s,_t(s),s;var r=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),_t(s),Yt(s,"style",r),so(s,l.precedence,e),t.instance=s;case"stylesheet":r=kn(l.href);var u=e.querySelector(Ri(r));if(u)return t.state.loading|=4,t.instance=u,_t(u),u;s=Y0(l),(r=Fa.get(r))&&Qu(s,r),u=(e.ownerDocument||e).createElement("link"),_t(u);var h=u;return h._p=new Promise(function(j,M){h.onload=j,h.onerror=M}),Yt(u,"link",s),t.state.loading|=4,so(u,l.precedence,e),t.instance=u;case"script":return u=_n(l.src),(r=e.querySelector(Ti(u)))?(t.instance=r,_t(r),r):(s=l,(r=Fa.get(u))&&(s=v({},l),Iu(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),_t(r),Yt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,so(s,l.precedence,e));return t.instance}function so(e,t,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,u=r,h=0;h<s.length;h++){var j=s[h];if(j.dataset.precedence===t)u=j;else if(u!==r)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Qu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Iu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var no=null;function G0(e,t,l){if(no===null){var s=new Map,r=no=new Map;r.set(l,s)}else r=no,s=r.get(l),s||(s=new Map,r.set(l,s));if(s.has(e))return s;for(s.set(e,null),l=l.getElementsByTagName(e),r=0;r<l.length;r++){var u=l[r];if(!(u[bs]||u[kt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var j=s.get(h);j?j.push(u):s.set(h,[u])}}return s}function X0(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Og(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Q0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ug(e,t,l,s){if(l.type==="stylesheet"&&(typeof s.media!="str
49ing"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var r=kn(s.href),u=t.querySelector(Ri(r));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=io.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,_t(u);return}u=t.ownerDocument||t,s=Y0(s),(r=Fa.get(r))&&Qu(s,r),u=u.createElement("link"),_t(u);var h=u;h._p=new Promise(function(j,M){h.onload=j,h.onerror=M}),Yt(u,"link",s),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=io.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Zu=0;function Hg(e,t){return e.stylesheets&&e.count===0&&oo(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&oo(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Zu===0&&(Zu=62500*yg());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&oo(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Zu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function io(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)oo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ro=null;function oo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ro=new Map,t.forEach(Fg,e),ro=null,io.call(e))}function Fg(e,t){if(!(t.state.loading&4)){var l=ro.get(e);if(l)var s=l.get(null);else{l=new Map,ro.set(e,l);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<r.length;u++){var h=r[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(l.set(h.dataset.precedence,h),s=h)}s&&l.set(null,s)}r=t.instance,h=r.getAttribute("data-precedence"),u=l.get(h)||s,u===s&&l.set(null,r),l.set(h,r),this.count++,s=io.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),u?u.parentNode.insertBefore(r,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Di={$$typeof:U,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function $g(e,t,l,s,r,u,h,j,M){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zt(0),this.hiddenUpdates=zt(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function I0(e,t,l,s,r,u,h,j,M,$,X,Z){return e=new $g(e,t,l,h,M,$,X,Z,j),t=1,u===!0&&(t|=24),u=ya(3,null,null,t),e.current=u,u.stateNode=e,t=Ac(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:l,cache:t},Dc(u),e}function Z0(e){return e?(e=an,e):an}function K0(e,t,l,s,r,u){r=Z0(r),s.context===null?s.context=r:s.pendingContext=r,s=Xl(t),s.payload={element:l},u=u===void 0?null:u,u!==null&&(s.callback=u),l=Ql(e,s,t),l!==null&&(da(l,e,t),di(l,e,t))}function J0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Ku(e,t){J0(e,t),(e=e.alternate)&&J0(e,t)}function W0(e){if(e.tag===13||e.tag===31){var t=Ss(e,67108864);t!==null&&da(t,e,67108864),Ku(e,67108864)}}function eh(e){if(e.tag===13||e.tag===31){var t=Sa();t=Gs(t);var l=Ss(e,t);l!==null&&da(l,e,t),Ku(e,t)}}var co=!0;function qg(e,t,l,s){var r=O.T;O.T=null;var u=Q.p;try{Q.p=2,Ju(e,t,l,s)}finally{Q.p=u,O.T=r}}function Pg(e,t,l,s){var r=O.T;O.T=null;var u=Q.p;try{Q.p=8,Ju(e,t,l,s)}finally{Q.p=u,O.T=r}}function Ju(e,t,l,s){if(co){var r=Wu(s);if(r===null)Uu(e,t,s,uo,l),ah(e,s);else if(Vg(r,e,t,l,s))s.stopPropagation();else if(ah(e,s),t&4&&-1<Yg.indexOf(e)){for(;r!==null;){var u=Ul(r);
vendor: 4,211 bytes, line 49
49if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=ba(u.pendingLanes);if(h!==0){var j=u;for(j.pendingLanes|=2,j.entangledLanes|=2;h;){var M=1<<31-be(h);j.entanglements[1]|=M,h&=~M}ul(u),(Ze&6)===0&&(Gr=dt()+500,Ci(0))}}break;case 31:case 13:j=Ss(u,2),j!==null&&da(j,u,2),Qr(),Ku(u,2)}if(u=Wu(s),u===null&&Uu(e,t,s,uo,l),u===r)break;r=u}r!==null&&s.stopPropagation()}else Uu(e,t,s,null,l)}}function Wu(e){return e=tc(e),ed(e)}var uo=null;function ed(e){if(uo=null,e=Ol(e),e!==null){var t=m(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=y(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return uo=e,null}function th(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ya()){case we:return 2;case Te:return 8;case Ke:case Ve:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var td=!1,ns=null,is=null,rs=null,Li=new Map,zi=new Map,os=[],Yg="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".split(" ");function ah(e,t){switch(e){case"focusin":case"focusout":ns=null;break;case"dragenter":case"dragleave":is=null;break;case"mouseover":case"mouseout":rs=null;break;case"pointerover":case"pointerout":Li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zi.delete(t.pointerId)}}function Bi(e,t,l,s,r,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:s,nativeEvent:u,targetContainers:[r]},t!==null&&(t=Ul(t),t!==null&&W0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Vg(e,t,l,s,r){switch(t){case"focusin":return ns=Bi(ns,e,t,l,s,r),!0;case"dragenter":return is=Bi(is,e,t,l,s,r),!0;case"mouseover":return rs=Bi(rs,e,t,l,s,r),!0;case"pointerover":var u=r.pointerId;return Li.set(u,Bi(Li.get(u)||null,e,t,l,s,r)),!0;case"gotpointercapture":return u=r.pointerId,zi.set(u,Bi(zi.get(u)||null,e,t,l,s,r)),!0}return!1}function lh(e){var t=Ol(e.target);if(t!==null){var l=m(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,ar(e.priority,function(){eh(l)});return}}else if(t===31){if(t=y(l),t!==null){e.blockedOn=t,ar(e.priority,function(){eh(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Wu(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);ec=s,l.target.dispatchEvent(s),ec=null}else return t=Ul(l),t!==null&&W0(t),e.blockedOn=l,!1;t.shift()}return!0}function sh(e,t,l){mo(e)&&l.delete(t)}function Gg(){td=!1,ns!==null&&mo(ns)&&(ns=null),is!==null&&mo(is)&&(is=null),rs!==null&&mo(rs)&&(rs=null),Li.forEach(sh),zi.forEac
vendor: 5,199 bytes, lines 49-58
49h(sh)}function xo(e,t){e.blockedOn===t&&(e.blockedOn=null,td||(td=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Gg)))}var fo=null;function nh(e){fo!==e&&(fo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){fo===e&&(fo=null);for(var t=0;t<e.length;t+=3){var l=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(ed(s||l)===null)continue;break}var u=Ul(l);u!==null&&(e.splice(t,3),t-=3,Wc(u,{pending:!0,data:r,method:l.method,action:s},s,r))}}))}function Cn(e){function t(M){return xo(M,e)}ns!==null&&xo(ns,e),is!==null&&xo(is,e),rs!==null&&xo(rs,e),Li.forEach(t),zi.forEach(t);for(var l=0;l<os.length;l++){var s=os[l];s.blockedOn===e&&(s.blockedOn=null)}for(;0<os.length&&(l=os[0],l.blockedOn===null);)lh(l),l.blockedOn===null&&os.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var r=l[s],u=l[s+1],h=r[Ht]||null;if(typeof u=="function")h||nh(l);else if(h){var j=null;if(u&&u.hasAttribute("formAction")){if(r=u,h=u[Ht]||null)j=h.formAction;else if(ed(r)!==null)continue}else j=h.action;typeof j=="function"?l[s+1]=j:(l.splice(s,3),s-=3),nh(l)}}}function ih(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return r=h})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function ad(e){this._internalRoot=e}ho.prototype.render=ad.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,s=Sa();K0(l,s,e,t,null,null)},ho.prototype.unmount=ad.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;K0(e.current,2,null,e,null,null),Qr(),t[il]=null}};function ho(e){this._internalRoot=e}ho.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xs();e={blockedOn:null,target:e,priority:t};for(var l=0;l<os.length&&t!==0&&t<os[l].priority;l++);os.splice(l,0,e),l===0&&lh(e)}};var rh=i.version;if(rh!=="19.2.8")throw Error(c(527,rh,"19.2.8"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=f(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Xg={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!po.isDisabled&&po.supportsFiber)try{It=po.inject(Xg),mt=po}catch{}}return Ui.createRoot=function(e,t){if(!d(e))throw Error(c(299));var l=!1,s="",r=ff,u=hf,h=pf;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=I0(e,1,!1,null,null,l,s,null,r,u,h,ih),e[il]=t.current,Ou(e),new ad(t)},Ui.hydrateRoot=function(e,t,l){if(!d(e))throw Error(c(299));var s=!1,r="",u=ff,h=hf,j=pf,M=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(r=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(h=l.onCaughtError),l.onRecoverableError!==void 0&&(j=l.onRecoverableError),l.formState!==void 0&&(M=l.formState)),t=I0(e,1,!0,t,l??null,s,r,M,u,h,j,ih),t.context=Z0(null),l=t.current,s=Sa(),s=Gs(s),r=Xl(s),r.callback=null,Ql(l,r,s),l=s,t.current.lanes=l,Ma(t,l),ul(t),e[il]=t.current,Ou(e),new ho(t)},Ui.version="19.2.8",Ui}var bh;function s2(){if(bh)return nd.exports;bh=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),nd.exports=l2(),nd.exports}var n2=s2();/**
50 * react-router v7.18.2
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */var Wd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,fp=/^[\\/]{2}/;function i2(n,i){return i+n.replace(/\\/g,"/")}var gh="popstate";function yh(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function r2(n={}){function i(c,d){var f;let m=(f=d.state)==null?void 0:f.masked,{pathname:p,search:y,hash:x}=m||c.location;return kd("",{pathname:p,search:y,hash:x},d.state&&d.state.usr||null,d.state&&d.state.key||"default",m?{pathname:c.location.pathname,search:c.location.search,hash:c.location.hash}:void 0)}
58function o(c,d){return typeof d=="string"?d:Vi(d)}return c2(i,o,null,n)}function ht(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function tl(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function o2(){return Math.random().toString(36).substring(2,10)}function vh(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function kd(n,i,o=null,c,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?Hn(i):i,state:o,key:i&&i.key||c||o2(),mask:d}}function Vi({pathname:n="/",search:i="",hash:o=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Hn(n){let i={};if(n){let o=n.indexOf("#");o>=0&&(i.hash=n.substring(o),n=n.substring(0,o));let c=n.indexOf("?");c>=0&&(i.search=n.substring(c),n=n.substring(0,c)),n&&(i.pathname=n)}return i}function c2(n,i,o,c={}){let{window:d=document.defaultView,v5Compat:m=!1}=c,p=d.history,y="POP",x=null,f=g();f==null&&(f=0,p.replaceState({...p.state,idx:f},""));function g(){return(p.state||{idx:null}).idx}function v(){y="POP";let S=g(),k=S==null?null:S-f;f=S,x&&x({action:y,location:T.location,delta:k})}function w(S,k){y="PUSH";let _=yh(S)?S:kd(T.location,S,k);f=g()+1;let U=vh(_,f),A=T.createHref(_.mask||_);try{p.pushState(U,"",A)}catch(G){if(G instanceof DOMException&&G.name==="DataCloneError")throw G;d.location.assign(A)}m&&x&&x({action:y,location:T.location,delta:1})}function D(S,k){y="REPLACE";let _=yh(S)?S:kd(T.location,S,k);f=g();let U=vh(_,f),A=T.createHref(_.mask||_);p.replaceState(U,"",A),m&&x&&x({action:y,location:T.location,delta:0})}function C(S){return u2(d,S)}let T={get action(){return y},get location(){return n(d,p)},listen(S){if(x)throw new Error("A history only accepts one active listener");return d.addEventListener(gh,v),x=S,()=>{d.removeEventListener(gh,v),x=null}},createHref(S){return i(d,S)},createURL:C,encodeLocation(S){let k=C(S);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:w,replace:D,go(S){return p.go(S)}};return T}function u2(n,i,o=!1){let c="http://localhost";n&&(c=n.location.origin!=="null"?n.location.origin:n.location.href),ht(c,"No window.location.(origin|href) available to create URL");let d=typeof i=="string"?i:Vi(i);return d=d.replace(/ $/,"%20"),!o&&fp.test(d)&&(d=c+d),new URL(d,c)}function hp(n,i,o="/"){return d2(n,i,o,!1)}function d2(n,i,o,c,d){let m=typeof i=="string"?Hn(i):i,p=Tl(m.pathname||"/",o);if(p==null)return null;let y=m2(n),x=null,f=N2(p);for(let g=0;x==null&&g<y.length;++g)x=w2(y[g],f,c);return x}function m2(n){let i=pp(n);return x2(i),i}function pp(n,i=[],o=[],c="",d=!1){let m=(p,y,x=d,f)=>{let g={relativePath:f===void 0?p.path||"":f,caseSensitive:p.caseSensitive===!0,childrenIndex:y,route:p};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(c)&&x)return;ht(g.relativePath.startsWith(c),`Absolute route path "${g.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(c.length)}let v=Wa([c,g.relativePath]),w=o.concat(g);p.children&&p.children.length>0&&(ht(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),pp(p.children,i,w,v,x)),!(p.path==null&&!p.index)&&i.push({path:v,score:v2(v,p.index),routesMeta:w.map((D,C)=>{let[T,S]=yp(D.relativePath,D.caseSensitive,C===w.length-1);return{...D,matcher:T,compiledParams:S}})})};return n.forEach((p,y)=>{var x;if(p.path===""||!((x=p.path)!=null&&x.includes("?")))m(p,y);else for(let f of bp(p.path))m(p,y,!0,f)}),i}function bp(n){let i=n.split("/");if(i.length===0)return[];let[o,...c]=i,d=o.endsWith("?"),m=o.replace(/\?$/,"");if(c.length===0)return d?[m,""]:[m];let p=bp(c.join("/")),y=[];return y.push(...p.map(x=>x===""?m:[m,x].join("/"))),d&&y.push(...p),y.map(x=>n.startsWith("/")&&x===""?"/":x)}function x2(n){n.sort((i,o)=>i.score!==o.score?o.score-i.score:j2(i.routesMeta.map(c=>c.childrenIndex),o.routesMeta.map(c=>c.childrenIndex)))}var f2=/^:[\w-]+$/,h2=3,p2=2,b2=1,g2=10,y2=-2,jh=n=>n==="*";function v2(n,i){let o=n.split("/"),c=o.length;return o.some(jh)&&(c+=y2),i&&(c+=p2),o.filter(d=>!jh(d)).reduce((d,m)=>d+(f2.test(m)?h2:m===""?b2:g2),c)}function j2(n,i){return n.length===i.length&&n.slice(0,-1).every((c,d)=>c===i[d])?n[n.length-1]-i[i.length-1]:0}function w2(n,i,o=!1){let{routesMeta:c}=n,d={},m="/",p=[];for(let y=0;y<c.length;++y){let x=c[y],f=y===c.length-1,g=m==="/"?i:i.slice(m.length)||"/",v={path:x.relativePath,caseSensitive:x.caseSensitive,end:f},w=x.matcher&&x.compiledParams?gp(v,g,x.matcher,x.compiledParams):Ao(v,g),D=x.route;if(!w&&f&&o&&!c[c.length-1].route.index&&(w=Ao({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},g)),!w)return null;
58Object.assign(d,w.params),p.push({params:d,pathname:Wa([m,w.pathname]),pathnameBase:_2(Wa([m,w.pathnameBase])),route:D}),w.pathnameBase!=="/"&&(m=Wa([m,w.pathnameBase]))}return p}function Ao(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[o,c]=yp(n.path,n.caseSensitive,n.end);return gp(n,i,o,c)}function gp(n,i,o,c){let d=i.match(o);if(!d)return null;let m=d[0],p=m.replace(/(.)\/+$/,"$1"),y=d.slice(1);return{params:c.reduce((f,{paramName:g,isOptional:v},w)=>{if(g==="*"){let C=y[w]||"";p=m.slice(0,m.length-C.length).replace(/(.)\/+$/,"$1")}const D=y[w];return v&&!D?f[g]=void 0:f[g]=(D||"").replace(/%2F/g,"/"),f},{}),pathname:m,pathnameBase:p,pattern:n}}function yp(n,i=!1,o=!0){tl(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let c=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,y,x,f,g)=>{if(c.push({paramName:y,isOptional:x!=null}),x){let v=g.charAt(f+p.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(c.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),c]}function N2(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return tl(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function Tl(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let o=i.endsWith("/")?i.length-1:i.length,c=n.charAt(o);return c&&c!=="/"?null:n.slice(o)||"/"}function S2(n,i="/"){let{pathname:o,search:c="",hash:d=""}=typeof n=="string"?Hn(n):n,m;return o?(o=vp(o),o.startsWith("/")?m=wh(o.substring(1),"/"):m=wh(o,i)):m=i,{pathname:m,search:C2(c),hash:E2(d)}}function wh(n,i){let o=Mo(i).split("/");return n.split("/").forEach(d=>{d===".."?o.length>1&&o.pop():d!=="."&&o.push(d)}),o.length>1?o.join("/"):"/"}function cd(n,i,o,c){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}].  Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function k2(n){return n.filter((i,o)=>o===0||i.route.path&&i.route.path.length>0)}function em(n){let i=k2(n);return i.map((o,c)=>c===i.length-1?o.pathname:o.pathnameBase)}function $o(n,i,o,c=!1){let d;typeof n=="string"?d=Hn(n):(d={...n},ht(!d.pathname||!d.pathname.includes("?"),cd("?","pathname","search",d)),ht(!d.pathname||!d.pathname.includes("#"),cd("#","pathname","hash",d)),ht(!d.search||!d.search.includes("#"),cd("#","search","hash",d)));let m=n===""||d.pathname==="",p=m?"/":d.pathname,y;if(p==null)y=o;else{let v=i.length-1;if(!c&&p.startsWith("..")){let w=p.split("/");for(;w[0]==="..";)w.shift(),v-=1;d.pathname=w.join("/")}y=v>=0?i[v]:"/"}let x=S2(d,y),f=p&&p!=="/"&&p.endsWith("/"),g=(m||p===".")&&o.endsWith("/");return!x.pathname.endsWith("/")&&(f||g)&&(x.pathname+="/"),x}var vp=n=>n.replace(/[\\/]{2,}/g,"/"),Wa=n=>vp(n.join("/")),Mo=n=>n.replace(/\/+$/,""),_2=n=>Mo(n).replace(/^\/*/,"/"),C2=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,E2=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,A2=class{constructor(n,i,o,c=!1){this.status=n,this.statusText=i||"",this.internal=c,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function M2(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function R2(n){let i=n.map(o=>o.route.path).filter(Boolean);return Wa(i)||"/"}var jp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wp(n,i){let o=n;if(typeof o!="string"||!Wd.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let c=o,d=!1;if(jp)try{let m=new URL(window.location.href),p=fp.test(o)?new URL(i2(o,m.protocol)):new URL(o),y=Tl(p.pathname,i);p.origin===m.origin&&y!=null?o=y+p.search+p.hash:d=!0}catch{tl(!1,`<Link to="${o}">
58 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Np=["POST","PUT","PATCH","DELETE"];new Set(Np);var T2=["GET",...Np];new Set(T2);var D2=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function L2(n){try{return D2.includes(new URL(n).protocol)}catch{return!1}}var Fn=b.createContext(null);Fn.displayName="DataRouter";var qo=b.createContext(null);qo.displayName="DataRouterState";var Sp=b.createContext(!1);function z2(){return b.useContext(Sp)}var kp=b.createContext({isTransitioning:!1});kp.displayName="ViewTransition";var B2=b.createContext(new Map);B2.displayName="Fetchers";var O2=b.createContext(null);O2.displayName="Await";var Ca=b.createContext(null);Ca.displayName="Navigation";var Wi=b.createContext(null);Wi.displayName="Location";var sl=b.createContext({outlet:null,matches:[],isDataRoute:!1});sl.displayName="Route";var tm=b.createContext(null);tm.displayName="RouteError";var _p="REACT_ROUTER_ERROR",U2="REDIRECT",H2="ROUTE_ERROR_RESPONSE";function F2(n){if(n.startsWith(`${_p}:${U2}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function $2(n){if(n.startsWith(`${_p}:${H2}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new A2(i.status,i.statusText,i.data)}catch{}}function q2(n,{relative:i}={}){ht($n(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:c}=b.useContext(Ca),{hash:d,pathname:m,search:p}=er(n,{relative:i}),y=m;return o!=="/"&&(y=m==="/"?o:Wa([o,m])),c.createHref({pathname:y,search:p,hash:d})}function $n(){return b.useContext(Wi)!=null}function ha(){return ht($n(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Wi).location}var Cp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ep(n){b.useContext(Ca).static||b.useLayoutEffect(n)}function Bl(){let{isDataRoute:n}=b.useContext(sl);return n?ay():P2()}function P2(){ht($n(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(Fn),{basename:i,navigator:o}=b.useContext(Ca),{matches:c}=b.useContext(sl),{pathname:d}=ha(),m=JSON.stringify(em(c)),p=b.useRef(!1);return Ep(()=>{p.current=!0}),b.useCallback((x,f={})=>{if(tl(p.current,Cp),!p.current)return;if(typeof x=="number"){o.go(x);return}let g=$o(x,JSON.parse(m),d,f.relative==="path");n==null&&i!=="/"&&(g.pathname=g.pathname==="/"?i:Wa([i,g.pathname])),(f.replace?o.replace:o.push)(g,f.state,f)},[i,o,m,d,n])}b.createContext(null);function Y2(){let{matches:n}=b.useContext(sl),i=n[n.length-1];return(i==null?void 0:i.params)??{}}function er(n,{relative:i}={}){let{matches:o}=b.useContext(sl),{pathname:c}=ha(),d=JSON.stringify(em(o));return b.useMemo(()=>$o(n,JSON.parse(d),c,i==="path"),[n,d,c,i])}function V2(n,i){return Ap(n,i)}function Ap(n,i,o){var S;ht($n(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=b.useContext(Ca),{matches:d}=b.useContext(sl),m=d[d.length-1],p=m?m.params:{},y=m?m.pathname:"/",x=m?m.pathnameBase:"/",f=m&&m.route;{let k=f&&f.path||"";Rp(y,!f||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
60Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let g=ha(),v;if(i){let k=typeof i=="string"?Hn(i):i;ht(x==="/"||((S=k.pathname)==null?void 0:S.startsWith(x)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${x}" but pathname "${k.pathname}" was given in the \`location\` prop.`),v=k}else v=g;let w=v.pathname||"/",D=w;if(x!=="/"){let k=x.replace(/^\//,"").split("/");D="/"+w.replace(/^\//,"").split("/").slice(k.length).join("/")}let C=o&&o.state.matches.length?o.state.matches.map(k=>Object.assign(k,{route:o.manifest[k.route.id]||k.route})):hp(n,{pathname:D});tl(f||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),tl(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let T=Z2(C&&C.map(k=>Object.assign({},k,{params:Object.assign({},p,k.params),pathname:Wa([x,c.encodeLocation?c.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?x:Wa([x,c.encodeLocation?c.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),d,o);return i&&T?b.createElement(Wi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},T):T}function G2(){let n=ty(),i=M2(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),o=n instanceof Error?n.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},m={padding:"2px 4px",backgroundColor:c},p=null;return console.error("Error handled by React Router default ErrorBoundary:",n),p=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:m},"ErrorBoundary")," or"," ",b.createElement("code",{style:m},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application 
60Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},i),o?b.createElement("pre",{style:d},o):null,p)}var X2=b.createElement(G2,null),Mp=class extends b.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const o=$2(n.digest);o&&(n=o)}let i=n!==void 0?b.createElement(sl.Provider,{value:this.props.routeContext},b.createElement(tm.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?b.createElement(Q2,{error:n},i):i}};Mp.contextType=Sp;var ud=new WeakMap;function Q2({children:n,error:i}){let{basename:o}=b.useContext(Ca);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let c=F2(i.digest);if(c){let d=ud.get(i);if(d)throw d;let m=wp(c.location,o),p=m.absoluteURL||m.to;if(L2(p))throw new Error("Invalid redirect location");if(jp&&!ud.get(i))if(m.isExternal||c.reloadDocument)window.location.href=p;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:c.replace}));throw ud.set(i,y),y}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p}`})}}return n}function I2({routeContext:n,match:i,children:o}){let c=b.useContext(Fn);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),b.createElement(sl.Provider,{value:n},o)}function Z2(n,i=[],o){let c=o==null?void 0:o.state;if(n==null){if(!c)return null;if(c.errors)n=c.matches;else if(i.length===0&&!c.initialized&&c.matches.length>0)n=c.matches;else return null}let d=n,m=c==null?void 0:c.errors;if(m!=null){let g=d.findIndex(v=>v.route.id&&(m==null?void 0:m[v.route.id])!==void 0);ht(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),d=d.slice(0,Math.min(d.length,g+1))}let p=!1,y=-1;if(o&&c){p=c.renderFallback;for(let g=0;g<d.length;g++){let v=d[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(y=g),v.route.id){let{loaderData:w,errors:D}=c,C=v.route.loader&&!w.hasOwnProperty(v.route.id)&&(!D||D[v.route.id]===void 0);if(v.route.lazy||C){o.isStatic&&(p=!0),y>=0?d=d.slice(0,y+1):d=[d[0]];break}}}}let x=o==null?void 0:o.onError,f=c&&x?(g,v)=>{var w,D;x(g,{location:c.location,params:((D=(w=c.matches)==null?void 0:w[0])==null?void 0:D.params)??{},pattern:R2(c.matches),errorInfo:v})}:void 0;return d.reduceRight((g,v,w)=>{let D,C=!1,T=null,S=null;c&&(D=m&&v.route.id?m[v.route.id]:void 0,T=v.route.errorElement||X2,p&&(y<0&&w===0?(Rp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,S=null):y===w&&(C=!0,S=v.route.hydrateFallbackElement||null)));let k=i.concat(d.slice(0,w+1)),_=()=>{let U;return D?U=T:C?U=S:v.route.Component?U=b.createElement(v.route.Component,null):v.route.element?U=v.route.element:U=g,b.createElement(I2,{match:v,routeContext:{outlet:g,matches:k,isDataRoute:c!=null},children:U})};return c&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?b.createElement(Mp,{location:c.location,revalidation:c.revalidation,component:T,error:D,children:_(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:f}):_()},null)}function am(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function K2(n){let i=b.useContext(Fn);return ht(i,am(n)),i}function J2(n){let i=b.useContext(qo);return ht(i,am(n)),i}function W2(n){let i=b.useContext(sl);return ht(i,am(n)),i}function lm(n){let i=W2(n),o=i.matches[i.matches.length-1];return ht(o.route.id,`${n} can only be used on routes that contain a unique "id"`),o.route.id}function ey(){return lm("useRouteId")}function ty(){var c;let n=b.useContext(tm),i=J2("useRouteError"),o=lm("useRouteError");return n!==void 0?n:(c=i.errors)==null?void 0:c[o]}function ay(){let{router:n}=K2("useNavigate"),i=lm("useNavigate"),o=b.useRef(!1);return Ep(()=>{o.current=!0}),b.useCallback(async(d,m={})=>{tl(o.current,Cp),o.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:i,...m}))},[n,i])}var Nh={};function Rp(n,i,o){!i&&!Nh[n]&&(Nh[n]=!0,tl(!1,o))}b.memo(ly);function ly({routes:n,manifest:i,future:o,state:c,isStatic:d,onError:m}){return Ap(n,void 0,{manifest:i,state:c,isStatic:d,onError:m})}function _d({to:n,replace:i,state:o,relative:c}
60){ht($n(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=b.useContext(Ca);tl(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=b.useContext(sl),{pathname:p}=ha(),y=Bl(),x=$o(n,em(m),p,c==="path"),f=JSON.stringify(x);return b.useEffect(()=>{y(JSON.parse(f),{replace:i,state:o,relative:c})},[y,f,c,i,o]),null}function Vt(n){ht(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function sy({basename:n="/",children:i=null,location:o,navigationType:c="POP",navigator:d,static:m=!1,useTransitions:p}){ht(!$n(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),x=b.useMemo(()=>({basename:y,navigator:d,static:m,useTransitions:p,future:{}}),[y,d,m,p]);typeof o=="string"&&(o=Hn(o));let{pathname:f="/",search:g="",hash:v="",state:w=null,key:D="default",mask:C}=o,T=b.useMemo(()=>{let S=Tl(f,y);return S==null?null:{location:{pathname:S,search:g,hash:v,state:w,key:D,mask:C},navigationType:c}},[y,f,g,v,w,D,c,C]);return tl(T!=null,`<Router basename="${y}"> is not able to match the URL "${f}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:b.createElement(Ca.Provider,{value:x},b.createElement(Wi.Provider,{children:i,value:T}))}function ny({children:n,location:i}){return V2(Cd(n),i)}function Cd(n,i=[]){let o=[];return b.Children.forEach(n,(c,d)=>{if(!b.isValidElement(c))return;let m=[...i,d];if(c.type===b.Fragment){o.push.apply(o,Cd(c.props.children,m));return}ht(c.type===Vt,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ht(!c.props.index||!c.props.children,"An index route cannot have child routes.");let p={id:c.props.id||m.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(p.children=Cd(c.props.children,m)),o.push(p)}),o}var ko="get",_o="application/x-www-form-urlencoded";function Po(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function iy(n){return Po(n)&&n.tagName.toLowerCase()==="button"}function ry(n){return Po(n)&&n.tagName.toLowerCase()==="form"}function oy(n){return Po(n)&&n.tagName.toLowerCase()==="input"}function cy(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function uy(n,i){return n.button===0&&(!i||i==="_self")&&!cy(n)}var bo=null;function dy(){if(bo===null)try{new FormData(document.createElement("form"),0),bo=!1}catch{bo=!0}return bo}var my=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function dd(n){return n!=null&&!my.has(n)?(tl(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_o}"`),null):n}function xy(n,i){let o,c,d,m,p;if(ry(n)){let y=n.getAttribute("action");c=y?Tl(y,i):null,o=n.getAttribute("method")||ko,d=dd(n.getAttribute("enctype"))||_o,m=new FormData(n)}else if(iy(n)||oy(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=n.getAttribute("formaction")||y.getAttribute("action");if(c=x?Tl(x,i):null,o=n.getAttribute("formmethod")||y.getAttribute("method")||ko,d=dd(n.getAttribute("formenctype"))||dd(y.getAttribute("enctype"))||_o,m=new FormData(y,n),!dy()){let{name:f,type:g,value:v}=n;if(g==="image"){let w=f?`${f}.`:"";m.append(`${w}x`,"0"),m.append(`${w}y`,"0")}else f&&m.append(f,v)}}else{if(Po(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=ko,c=null,d=_o,p=n}return m&&d==="text/plain"&&(p=m,m=void 0),{action:c,method:o.toLowerCase(),encType:d,formData:m,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sm(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Tp(n,i,o,c){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return o?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:i&&Tl(d.pathname,i)==="/"?d.pathname=`${Mo(i)}/_root.${c}`:d.pathname=`${Mo(d.pathname)}.${c}`,d}
60async function fy(n,i){if(n.id in i)return i[n.id];try{let o=await import(n.module);return i[n.id]=o,o}catch(o){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hy(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function py(n,i,o){let c=await Promise.all(n.map(async d=>{let m=i.routes[d.route.id];if(m){let p=await fy(m,o);return p.links?p.links():[]}return[]}));return vy(c.flat(1).filter(hy).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Sh(n,i,o,c,d,m){let p=(x,f)=>o[f]?x.route.id!==o[f].route.id:!0,y=(x,f)=>{var g;return o[f].pathname!==x.pathname||((g=o[f].route.path)==null?void 0:g.endsWith("*"))&&o[f].params["*"]!==x.params["*"]};return m==="assets"?i.filter((x,f)=>p(x,f)||y(x,f)):m==="data"?i.filter((x,f)=>{var v;let g=c.routes[x.route.id];if(!g||!g.hasLoader)return!1;if(p(x,f)||y(x,f))return!0;if(x.route.shouldRevalidate){let w=x.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((v=o[0])==null?void 0:v.params)||{},nextUrl:new URL(n,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function by(n,i,{includeHydrateFallback:o}={}){return gy(n.map(c=>{let d=i.routes[c.route.id];if(!d)return[];let m=[d.module];return d.clientActionModule&&(m=m.concat(d.clientActionModule)),d.clientLoaderModule&&(m=m.concat(d.clientLoaderModule)),o&&d.hydrateFallbackModule&&(m=m.concat(d.hydrateFallbackModule)),d.imports&&(m=m.concat(d.imports)),m}).flat(1))}function gy(n){return[...new Set(n)]}function yy(n){let i={},o=Object.keys(n).sort();for(let c of o)i[c]=n[c];return i}function vy(n,i){let o=new Set;return new Set(i),n.reduce((c,d)=>{let m=JSON.stringify(yy(d));return o.has(m)||(o.add(m),c.push({key:m,link:d})),c},[])}function nm(){let n=b.useContext(Fn);return sm(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function jy(){let n=b.useContext(qo);return sm(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var im=b.createContext(void 0);im.displayName="FrameworkContext";function Yo(){let n=b.useContext(im);return sm(n,"You must render this element inside a <HydratedRouter> element"),n}function wy(n,i){let o=b.useContext(im),[c,d]=b.useState(!1),[m,p]=b.useState(!1),{onFocus:y,onBlur:x,onMouseEnter:f,onMouseLeave:g,onTouchStart:v}=i,w=b.useRef(null);b.useEffect(()=>{if(n==="render"&&p(!0),n==="viewport"){let T=k=>{k.forEach(_=>{p(_.isIntersecting)})},S=new IntersectionObserver(T,{threshold:.5});return w.current&&S.observe(w.current),()=>{S.disconnect()}}},[n]),b.useEffect(()=>{if(c){let T=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(T)}}},[c]);let D=()=>{d(!0)},C=()=>{d(!1),p(!1)};return o?n!=="intent"?[m,w,{}]:[m,w,{onFocus:Hi(y,D),onBlur:Hi(x,C),onMouseEnter:Hi(f,D),onMouseLeave:Hi(g,C),onTouchStart:Hi(v,D)}]:[!1,w,{}]}function Hi(n,i){return o=>{n&&n(o),o.defaultPrevented||i(o)}}function Ny({page:n,...i}){let o=z2(),{nonce:c}=Yo(),{router:d}=nm(),m=b.useMemo(()=>hp(d.routes,n,d.basename),[d.routes,n,d.basename]);return m?(i.nonce==null&&c&&(i={...i,nonce:c}),o?b.createElement(ky,{page:n,matches:m,...i}):b.createElement(_y,{page:n,matches:m,...i})):null}function Sy(n){let{manifest:i,routeModules:o}=Yo(),[c,d]=b.useState([]);return b.useEffect(()=>{let m=!1;return py(n,i,o).then(p=>{m||d(p)}),()=>{m=!0}},[n,i,o]),c}function ky({page:n,matches:i,...o}){let c=ha(),{future:d}=Yo(),{basename:m}=nm(),p=b.useMemo(()=>{if(n===c.pathname+c.search+c.hash)return[];let y=Tp(n,m,d.v8_trailingSlashAwareDataRequests,"rsc"),x=!1,f=[];for(let g of i)typeof g.route.shouldRevalidate=="function"?x=!0:f.push(g.route.id);return x&&f.length>0&&y.searchParams.set("_routes",f.join(",")),[y.pathname+y.search]},[m,d.v8_trailingSlashAwareDataRequests,n,c,i]);return b.createElement(b.Fragment,null,p.map(y=>b.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...o})))}function _y({page:n,matches:i,...o}){let c=ha(),{future:d,manifest:m,routeModules:p}=Yo(),{basename:y}=nm(),{loaderData:x,matches:f}=jy(),g=b.useMemo(()=>Sh(n,i,f,m,c,"data"),[n,i,f,m,c]),v=b.useMemo(()=>Sh(n,i,f,m,c,"assets"),[n,i,f,m,c]),w=b.useMemo(()=>
60{if(n===c.pathname+c.search+c.hash)return[];let T=new Set,S=!1;if(i.forEach(_=>{var A;let U=m.routes[_.route.id];!U||!U.hasLoader||(!g.some(G=>G.route.id===_.route.id)&&_.route.id in x&&((A=p[_.route.id])!=null&&A.shouldRevalidate)||U.hasClientLoader?S=!0:T.add(_.route.id))}),T.size===0)return[];let k=Tp(n,y,d.v8_trailingSlashAwareDataRequests,"data");return S&&T.size>0&&k.searchParams.set("_routes",i.filter(_=>T.has(_.route.id)).map(_=>_.route.id).join(",")),[k.pathname+k.search]},[y,d.v8_trailingSlashAwareDataRequests,x,c,m,g,i,n,p]),D=b.useMemo(()=>by(v,m),[v,m]),C=Sy(v);return b.createElement(b.Fragment,null,w.map(T=>b.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...o})),D.map(T=>b.createElement("link",{key:T,rel:"modulepreload",href:T,...o})),C.map(({key:T,link:S})=>b.createElement("link",{key:T,nonce:o.nonce,...S,crossOrigin:S.crossOrigin??o.crossOrigin})))}function Cy(...n){return i=>{n.forEach(o=>{typeof o=="function"?o(i):o!=null&&(o.current=i)})}}var Ey=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ey&&(window.__reactRouterVersion="7.18.2")}catch{}function Ay({basename:n,children:i,useTransitions:o,window:c}){let d=b.useRef();d.current==null&&(d.current=r2({window:c,v5Compat:!0}));let m=d.current,[p,y]=b.useState({action:m.action,location:m.location}),x=b.useCallback(f=>{o===!1?y(f):b.startTransition(()=>y(f))},[o]);return b.useLayoutEffect(()=>m.listen(x),[m,x]),b.createElement(sy,{basename:n,children:i,location:p.location,navigationType:p.action,navigator:m,useTransitions:o})}var et=b.forwardRef(function({onClick:i,discover:o="render",prefetch:c="none",relative:d,reloadDocument:m,replace:p,mask:y,state:x,target:f,to:g,preventScrollReset:v,viewTransition:w,defaultShouldRevalidate:D,...C},T){let{basename:S,navigator:k,useTransitions:_}=b.useContext(Ca),U=typeof g=="string"&&Wd.test(g),A=wp(g,S);g=A.to;let G=q2(g,{relative:d}),E=ha(),z=null;if(y){let oe=$o(y,[],E.mask?E.mask.pathname:"/",!0);S!=="/"&&(oe.pathname=oe.pathname==="/"?S:Wa([S,oe.pathname])),z=k.createHref(oe)}let[K,ie,ce]=wy(c,C),B=Ty(g,{replace:p,mask:y,state:x,target:f,preventScrollReset:v,relative:d,viewTransition:w,defaultShouldRevalidate:D,useTransitions:_});function W(oe){i&&i(oe),oe.defaultPrevented||B(oe)}let re=!(A.isExternal||m),V=b.createElement("a",{...C,...ce,href:(re?z:void 0)||A.absoluteURL||G,onClick:re?W:i,ref:Cy(T,ie),target:f,"data-discover":!U&&o==="render"?"true":void 0});return K&&!U?b.createElement(b.Fragment,null,V,b.createElement(Ny,{page:G})):V});et.displayName="Link";var Ro=b.forwardRef(function({"aria-current":i="page",caseSensitive:o=!1,className:c="",end:d=!1,style:m,to:p,viewTransition:y,children:x,...f},g){let v=er(p,{relative:f.relative}),w=ha(),D=b.useContext(qo),{navigator:C,basename:T}=b.useContext(Ca),S=D!=null&&Oy(v)&&y===!0,k=C.encodeLocation?C.encodeLocation(v).pathname:v.pathname,_=w.pathname,U=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;o||(_=_.toLowerCase(),U=U?U.toLowerCase():null,k=k.toLowerCase()),U&&T&&(U=Tl(U,T)||U);const A=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let G=_===k||!d&&_.startsWith(k)&&_.charAt(A)==="/",E=U!=null&&(U===k||!d&&U.startsWith(k)&&U.charAt(k.length)==="/"),z={isActive:G,isPending:E,isTransitioning:S},K=G?i:void 0,ie;typeof c=="function"?ie=c(z):ie=[c,G?"active":null,E?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let ce=typeof m=="function"?m(z):m;return b.createElement(et,{...f,"aria-current":K,className:ie,ref:g,style:ce,to:p,viewTransition:y},typeof x=="function"?x(z):x)});Ro.displayName="NavLink";var My=b.forwardRef(({discover:n="render",fetcherKey:i,navigate:o,reloadDocument:c,replace:d,state:m,method:p=ko,action:y,onSubmit:x,relative:f,preventScrollReset:g,viewTransition:v,defaultShouldRevalidate:w,...D},C)=>{let{useTransitions:T}=b.useContext(Ca),S=zy(),k=By(y,{relative:f}),_=p.toLowerCase()==="get"?"get":"post",U=typeof y=="string"&&Wd.test(y),A=G=>{if(x&&x(G),G.defaultPrevented)return;G.preventDefault();let E=G.nativeEvent.submitter,z=(E==null?void 0:E.getAttribute("formmethod"))||p,K=()=>S(E||G.currentTarget,{fetcherKey:i,method:z,navigate:o,replace:d,state:m,relative:f,preventScrollReset:g,viewTransition:v,defaultShouldRevalidate:w});T&&o!==!1?b.startTransition(()=>K()):K()};return b.createElement("form",{ref:C,method:_,action:k,onSubmit:c?x:A,...D,"data-discover":!U&&n==="render"?"true":void 0})});My.displayName="Form";function Ry(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dp(n){let i=b.useContext(Fn);return ht(i,Ry(n)),i}function Ty(n,{target:i,replace:o,mask:c,state:d,preventScrollReset:m,relative:p,viewTransition:y,defaultShouldRevalidate:x,useTransitions:f}={}){let g=Bl(),v=ha(),w=er(n,{relative:p});return b.useCallback(D=>{if(uy(D,i)){D.preventDefault();let C=o!==void 0?o:Vi(v)===Vi(w),T=()=>g(n,{replace:C,mask:c,state:d,preventScrollReset:m,relative:p,viewTransition:y,defaultShouldRevalidate:x});f?b.startTransition(()=>T()):T()}},[v,g,w,o,c,d,i,n,m,p,y,x,f])}var Dy=0,Ly=()=>`__${String(++Dy)}__`;function zy(){let{router:n}=Dp("useSubmit"),{basename:i}=b.useContext(Ca),o=ey(),c=n.fetch,d=n.navigate;return b.useCallback(async(m,p={})=>{let{action:y,method:x,encType:f,formData:g,body:v}=xy(m,i);if(p.navigate===!1){let w=p.fetcherKey||Ly();await c(w,o,p.action||y,{defaultShouldRevalidate:p.defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:g,body:v,formMethod:p.method||x,formEncType:p.encType||f,flushSync:p.flushSync})}else await d(p.action||y,{defaultShouldRevalidate:p.defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:g,body:v,formMethod:p.method||x,formEncType:p.encType||f,replace:p.replace,state:p.state,fromRouteId:o,flushSync:p.flushSync,viewTransition:p.viewTransition})},[c,d,i,o])}function By(n,{relative:i}={}){let{basename:o}=b.useContext(Ca),c=b.useContext(sl);ht(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),m={...er(n||".",{relative:i})},p=ha();if(n==null){m.search=p.search;let y=new URLSearchParams(m.search),x=y.getAll("index");if(x.some(g=>g==="")){y.delete("index"),x.filter(v=>v).forEach(v=>y.append("index",v));let g=y.toString();m.search=g?`?${g}`:""}}
60return(!n||n===".")&&d.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(m.pathname=m.pathname==="/"?o:Wa([o,m.pathname])),Vi(m)}function Oy(n,{relative:i}={}){let o=b.useContext(kp);ht(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=Dp("useViewTransitionState"),d=er(n,{relative:i});if(!o.isTransitioning)return!1;let m=Tl(o.currentLocation.pathname,c)||o.currentLocation.pathname,p=Tl(o.nextLocation.pathname,c)||o.nextLocation.pathname;return Ao(d.pathname,p)!=null||Ao(d.pathname,m)!=null}/**
61 * @license lucide-react v0.511.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 Uy=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Hy=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,o,c)=>c?c.toUpperCase():o.toLowerCase()),kh=n=>{const i=Hy(n);return i.charAt(0).toUpperCase()+i.slice(1)},Lp=(...n)=>n.filter((i,o,c)=>!!i&&i.trim()!==""&&c.indexOf(i)===o).join(" ").trim(),Fy=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};/**
66 * @license lucide-react v0.511.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 */var $y={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"};/**
71 * @license lucide-react v0.511.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 qy=b.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:d="",children:m,iconNode:p,...y},x)=>b.createElement("svg",{ref:x,...$y,width:i,height:i,stroke:n,strokeWidth:c?Number(o)*24/Number(i):o,className:Lp("lucide",d),...!m&&!Fy(y)&&{"aria-hidden":"true"},...y},[...p.map(([f,g])=>b.createElement(f,g)),...Array.isArray(m)?m:[m]]));/**
76 * @license lucide-react v0.511.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 ee=(n,i)=>{const o=b.forwardRef(({className:c,...d},m)=>b.createElement(qy,{ref:m,iconNode:i,className:Lp(`lucide-${Uy(kh(n))}`,`lucide-${n}`,c),...d}));return o.displayName=kh(n),o};/**
81 * @license lucide-react v0.511.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 Py=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Yy=ee("activity",Py);/**
86 * @license lucide-react v0.511.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 Vy=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Dl=ee("arrow-left",Vy);/**
91 * @license lucide-react v0.511.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 Gy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],rm=ee("arrow-right",Gy);/**
96 * @license lucide-react v0.511.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 Xy=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Qy=ee("arrow-up-right",Xy);/**
101 * @license lucide-react v0.511.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 Iy=[["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"}]],zp=ee("banknote",Iy);/**
106 * @license lucide-react v0.511.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 Zy=[["path",{d:"M15 7h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-2",key:"1sdynx"}],["path",{d:"M6 7H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h1",key:"1gkd3k"}],["path",{d:"m11 7-3 5h4l-3 5",key:"b4a64w"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]],el=ee("battery-charging",Zy);/**
111 * @license lucide-react v0.511.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 Ky=[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}],["line",{x1:"6",x2:"6",y1:"11",y2:"13",key:"1wd6dw"}],["line",{x1:"10",x2:"10",y1:"11",y2:"13",key:"haxvl5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"13",key:"c6fn6x"}]],Ed=ee("battery-full",Ky);/**
116 * @license lucide-react v0.511.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 Jy=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Vo=ee("bell",Jy);/**
121 * @license lucide-react v0.511.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 Wy=[["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"}
125],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],Bp=ee("building-2",Wy);/**
126 * @license lucide-react v0.511.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=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]],tv=ee("cable",ev);/**
131 * @license lucide-react v0.511.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 av=[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Ll=ee("calendar-days",av);/**
136 * @license lucide-react v0.511.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 lv=[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]],Op=ee("calendar-range",lv);/**
141 * @license lucide-react v0.511.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 sv=[["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"}]],Up=ee("calendar",sv);/**
146 * @license lucide-react v0.511.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 nv=[["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"}]],$i=ee("camera",nv);/**
151 * @license lucide-react v0.511.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 iv=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],rv=ee("chart-column",iv);/**
156 * @license lucide-react v0.511.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 ov=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],To=ee("check",ov);/**
161 * @license lucide-react v0.511.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 cv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qi=ee("chevron-down",cv);/**
166 * @license lucide-react v0.511.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 uv=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],dv=ee("chevron-left",uv);/**
171 * @license lucide-react v0.511.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 mv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],om=ee("chevron-right",mv);/**
176 * @license lucide-react v0.511.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 xv=[["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"}]],_h=ee("circle-alert",xv);/**
181 * @license lucide-react v0.511.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 fv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ut=ee("circle-check",fv);/**
186 * @license lucide-react v0.511.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 hv=[["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"}]],cm=ee("circle-x",hv);/**
191 * @license lucide-react v0.511.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 pv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]],xa=ee("clock-3",pv);/**
196 * @license lucide-react v0.511.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 bv=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Do=ee("credit-card",bv);/**
201 * @license lucide-react v0.511.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 gv=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],xs=ee("crown",gv);/**
206 * @license lucide-react v0.511.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 yv=[["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"}]],fs=ee("dollar-sign",yv);/**
211 * @license lucide-react v0.511.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 vv=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}
215]],Dn=ee("download",vv);/**
216 * @license lucide-react v0.511.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 jv=[["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"}]],wv=ee("external-link",jv);/**
221 * @license lucide-react v0.511.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 Nv=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Hp=ee("eye-off",Nv);/**
226 * @license lucide-react v0.511.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 Sv=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],qn=ee("eye",Sv);/**
231 * @license lucide-react v0.511.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 kv=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],_v=ee("facebook",kv);/**
236 * @license lucide-react v0.511.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 Cv=[["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:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]],Ev=ee("file-chart-column-increasing",Cv);/**
241 * @license lucide-react v0.511.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 Av=[["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:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],Ch=ee("file-spreadsheet",Av);/**
246 * @license lucide-react v0.511.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 Mv=[["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"}]],Rv=ee("file-text",Mv);/**
251 * @license lucide-react v0.511.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 Tv=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Dv=ee("funnel",Tv);/**
256 * @license lucide-react v0.511.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=[["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"}]],Fp=ee("hash",Lv);/**
261 * @license lucide-react v0.511.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 zv=[["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"}]],zl=ee("headphones",zv);/**
266 * @license lucide-react v0.511.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 Bv=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],$p=ee("house",Bv);/**
271 * @license lucide-react v0.511.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 Ov=[["path",{d:"M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8",key:"18ogeb"}]],Uv=ee("infinity",Ov);/**
276 * @license lucide-react v0.511.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 Hv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Eh=ee("info",Hv);/**
281 * @license lucide-react v0.511.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 Fv=[["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"}]],$v=ee("instagram",Fv);/**
286 * @license lucide-react v0.511.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 qv=[["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"}]],Pv=ee("layout-dashboard",qv);/**
291 * @license lucide-react v0.511.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 Yv=[["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"}]],Vv=ee("linkedin",Yv);
295/**
296 * @license lucide-react v0.511.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 Gv=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$a=ee("loader-circle",Gv);/**
301 * @license lucide-react v0.511.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 Xv=[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Qv=ee("locate-fixed",Xv);/**
306 * @license lucide-react v0.511.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 Iv=[["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"}]],qa=ee("lock",Iv);/**
311 * @license lucide-react v0.511.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 Zv=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Kv=ee("log-out",Zv);/**
316 * @license lucide-react v0.511.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 Jv=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],$s=ee("mail",Jv);/**
321 * @license lucide-react v0.511.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 Wv=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Tt=ee("map-pin",Wv);/**
326 * @license lucide-react v0.511.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 e5=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],t5=ee("map",e5);/**
331 * @license lucide-react v0.511.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 a5=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],l5=ee("maximize",a5);/**
336 * @license lucide-react v0.511.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 s5=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],qp=ee("menu",s5);/**
341 * @license lucide-react v0.511.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 n5=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],um=ee("message-circle",n5);/**
346 * @license lucide-react v0.511.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 i5=[["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"}]],r5=ee("message-square",i5);/**
351 * @license lucide-react v0.511.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 o5=[["path",{d:"M5 12h14",key:"1ays0h"}]],c5=ee("minus",o5);/**
356 * @license lucide-react v0.511.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 u5=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],Ah=ee("moon",u5);/**
361 * @license lucide-react v0.511.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 d5=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],Ad=ee("navigation",d5);/**
366 * @license lucide-react v0.511.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 m5=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 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.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],x5=ee("package",m5);/**
371 * @license lucide-react v0.511.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 f5=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],h5=ee("pause",f5);/**
376 * @license lucide-react v0.511.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 p5=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Go=ee("pencil",p5);/**
381 * @license lucide-react v0.511.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 b5=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 
3850 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Pa=ee("phone",b5);/**
386 * @license lucide-react v0.511.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 g5=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Gi=ee("play",g5);/**
391 * @license lucide-react v0.511.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 y5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ys=ee("plus",y5);/**
396 * @license lucide-react v0.511.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 v5=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],j5=ee("printer",v5);/**
401 * @license lucide-react v0.511.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 w5=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Ln=ee("qr-code",w5);/**
406 * @license lucide-react v0.511.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 N5=[["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"}]],S5=ee("radio",N5);/**
411 * @license lucide-react v0.511.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 k5=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],Pp=ee("refresh-ccw",k5);/**
416 * @license lucide-react v0.511.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 _5=[["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"}]],Xi=ee("refresh-cw",_5);/**
421 * @license lucide-react v0.511.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 C5=[["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"}]],E5=ee("rotate-ccw",C5);/**
426 * @license lucide-react v0.511.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 A5=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],M5=ee("save",A5);/**
431 * @license lucide-react v0.511.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 R5=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]],T5=ee("scan",R5);/**
436 * @license lucide-react v0.511.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 D5=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],qs=ee("search",D5);/**
441 * @license lucide-react v0.511.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 L5=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],go=ee("send",L5);/**
446 * @license lucide-react v0.511.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 z5=[["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"}
450]],Yp=ee("settings-2",z5);/**
451 * @license lucide-react v0.511.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 B5=[["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"}]],O5=ee("server",B5);/**
456 * @license lucide-react v0.511.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 U5=[["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:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]],H5=ee("shield-ban",U5);/**
461 * @license lucide-react v0.511.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 F5=[["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"}]],$5=ee("shield-check",F5);/**
466 * @license lucide-react v0.511.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 q5=[["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"}]],Dt=ee("shield",q5);/**
471 * @license lucide-react v0.511.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 P5=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],dm=ee("smartphone",P5);/**
476 * @license lucide-react v0.511.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 Y5=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],V5=ee("star",Y5);/**
481 * @license lucide-react v0.511.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 G5=[["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 2a2.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 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]],X5=ee("store",G5);/**
486 * @license lucide-react v0.511.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 Q5=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Md=ee("sun",Q5);/**
491 * @license lucide-react v0.511.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 I5=[["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"}]],Vp=ee("tag",I5);/**
496 * @license lucide-react v0.511.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 Z5=[["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"}]],K5=ee("target",Z5);/**
501 * @license lucide-react v0.511.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 J5=[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]],W5=ee("thermometer",J5);/**
506 * @license lucide-react v0.511.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 ej=[["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"}]],na=ee("trash-2",ej);/**
511 * @license lucide-react v0.511.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 tj=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Rd=ee("trending-down",tj);/**
516 * @license lucide-react v0.511.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 aj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Gp=ee("trending-up",aj);/**
521 * @license lucide-react v0.511.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 lj=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Td=ee("triangle-alert",lj);/**
526 * @license lucide-react v0.511.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 sj=[["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"}]],nj=ee("twitter",sj);/**
531 * @license lucide-react v0.511.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 ij=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["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"}]],Mh=ee("user-check",ij);/**
536 * @license lucide-react v0.511.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 rj=[["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:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Rh=ee("user-minus",rj);/**
541 * @license lucide-react v0.511.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 oj=[["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:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Dd=ee("user-plus",oj);/**
546 * @license lucide-react v0.511.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 cj=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}
550],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],uj=ee("user-round",cj);/**
551 * @license lucide-react v0.511.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 dj=[["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"}]],ka=ee("user",dj);/**
556 * @license lucide-react v0.511.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 mj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],sa=ee("users",mj);/**
561 * @license lucide-react v0.511.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 xj=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],fj=ee("volume-2",xj);/**
566 * @license lucide-react v0.511.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 hj=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],pj=ee("volume-x",hj);/**
571 * @license lucide-react v0.511.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 bj=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],tr=ee("wallet",bj);/**
576 * @license lucide-react v0.511.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 gj=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],yj=ee("wifi-off",gj);/**
581 * @license lucide-react v0.511.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 vj=[["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"}]],jj=ee("wifi",vj);/**
586 * @license lucide-react v0.511.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 wj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gt=ee("x",wj);/**
591 * @license lucide-react v0.511.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 Nj=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],Th=ee("wrench",Nj);/**
596 * @license lucide-react v0.511.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 Sj=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Xt=ee("zap",Sj),_a="/assets/power-qOjKozPe.png",kj="/assets/about-story-DIl2xCNx.jpg";function al({className:n="",imgClassName:i="h-full w-full object-contain",alt:o="Hiil Power Bank",variant:c="image"}){return c==="header"?a.jsx("span",{className:`inline-flex shrink-0 items-center ${n}`,children:a.jsx("img",{src:"/logo.png?v=3",alt:o,className:"sc-header-logo h-[62px] w-auto max-w-[240px] object-contain object-left sm:h-[72px] sm:max-w-[300px]"})}):a.jsx("span",{className:`inline-flex shrink-0 items-center justify-center overflow-hidden ${n}`,children:a.jsx("img",{src:"/logo.png?v=3",alt:o,className:i})})}function _j(){return a.jsxs("footer",{className:"bg-[#031A3A] text-white",children:[a.jsxs("div",{className:"mx-auto grid max-w-[1200px] gap-10 px-5 py-14 sm:grid-cols-2 lg:grid-cols-[1.3fr_1fr_1fr_1fr_1fr] lg:px-8",children:[a.jsxs("div",{children:[a.jsx(al,{variant:"header"}),a.jsx("p",{className:"mt-4 text-[15px] font-semibold",children:"Power on. Stay connected."}),a.jsx("p",{className:"mt-2 max-w-xs text-[13px] leading-6 text-white/60",children:"Rent power banks anytime, anywhere. Fast. Secure. Reliable."})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[13px] font-semibold uppercase tracking-[0.16em] text-white/55",children:"Company"}),a.jsxs("ul",{className:"mt-4 space-y-2.5 text-[14px] text-white/78",children:[a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/about",children:"About Us"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/portfolio",children:"Portfolio"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/#how",children:"How It Works"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/contact",children:"Careers"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/about",children:"Blog"})})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[13px] font-semibold uppercase tracking-[0.16em] text-white/55",children:"Services"}),a.jsxs("ul",{className:"mt-4 space-y-2.5 text-[14px] text-white/78",children:[a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/signin",children:"Power Bank Rental"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/stations",children:"Find Stations"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/#pricing",children:"Pricing"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/contact",children:"Support"})})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[13px] font-semibold uppercase tracking-[0.16em] text-white/55",children:"Support"}),a.jsxs("ul",{className:"mt-4 space-y-2.5 text-[14px] text-white/78",children:[a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/contact",children:"Help Center"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/contact",children:"Terms & Conditions"})}),a.jsx("li",{children:a.jsx(et,{className:"hover:text-white",to:"/contact",children:"Privacy Policy"})})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[13px] font-semibold uppercase tracking-[0.16em] text-white/55",children:"Contact"}),a.jsxs("ul",{className:"mt-4 space-y-2.5 text-[14px] text-white/78",children:[a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx($s,{className:"h-4 w-4 text-[#126BFF]"})," [email protected]"]}),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx(Pa,{className:"h-4 w-4 text-[#126BFF]"})," +252 614 009006"]}),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx(Tt,{className:"h-4 w-4 text-[#126BFF]"})," Hodan, Mogadishu, Somalia"]})]}),a.jsx("p",{className:"mt-5 text-[13px] font-semibold uppercase tracking-[0.16em] text-white/55",children:"Follow Us"}),a.jsx("div",{className:"mt-3 flex gap-2",children:[_v,nj,$v,Vv].map(n=>a.jsx("span",{className:"inline-flex h-9 w-9 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(n,{className:"h-4 w-4"})},n.displayName||n.name))})]})]}),a.jsx("div",{className:"border-t border-white/10 px-5 py-5 text-center text-[13px] text-white/55",children:"© 2026 HiilPowerbank. All rights reserved."})]})}const Xp="somacharge_theme";let Ka=null,Os=null;function Qp(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function Ip(){if(typeof window>"u")return"light";try{const n=localStorage.getItem(Xp);if(n==="dark"||n==="light"||n==="system")return n}catch{}return"light"}function Lo(){const n=Ip();return n==="system"?Qp()?"dark":"light":n==="dark"?"dark":"light"}function Zp(n){var c;if(typeof document>"u")return;const i=document.documentElement,o=n==="dark";i.classList.toggle("dark",o),(c=document.body)==null||c.classList.toggle("dark",o),i.setAttribute("data-theme",n),i.style.colorScheme=n}function Cj(n){var i,o;typeof window>"u"||!window.matchMedia||(Ka||(Ka=window.matchMedia("(prefers-color-scheme: dark)")),Os&&((i=Ka.removeEventListener)==null||i.call(Ka,"change",Os),(o=Ka.removeListener)==null||o.call(Ka,Os),Os=null),n&&(Os=()=>{const c=Lo();Zp(c),window.dispatchEvent(new CustomEvent("somacharge:theme",{detail:{preference:"system",theme:c}}))},Ka.addEventListener?Ka.addEventListener("change",Os):Ka.addListener(Os)
600))}function Ld(n){const i=n==="dark"||n==="system"?n:"light";if(typeof document>"u")return i;try{localStorage.setItem(Xp,i)}catch{}const o=i==="system"?Qp()?"dark":"light":i;return Zp(o),Cj(i==="system"),window.dispatchEvent(new CustomEvent("somacharge:theme",{detail:{preference:i,theme:o}})),i}function Ej(n){if(typeof window>"u")return()=>{};const i=()=>n(Ip());return window.addEventListener("somacharge:theme",i),window.addEventListener("storage",i),()=>{window.removeEventListener("somacharge:theme",i),window.removeEventListener("storage",i)}}function ds({compact:n=!1,surface:i="default"}){const[o,c]=b.useState(()=>Lo());b.useEffect(()=>(Ld(Lo()),Ej(c)),[]);function d(y){c(Ld(y))}const m=o==="dark",p=i==="header";return n?a.jsx("button",{type:"button",onClick:()=>d(m?"light":"dark"),className:p?"grid h-10 w-10 shrink-0 place-items-center rounded-full border border-white/40 text-white transition hover:bg-white/10":"grid h-9 w-9 shrink-0 place-items-center rounded-full border border-slate-200 bg-white text-slate-700 shadow-sm transition hover:bg-slate-50 dark:border-white/10 dark:bg-[#171b22] dark:text-slate-200 dark:hover:bg-white/10","aria-label":m?"Switch to light mode":"Switch to dark mode",title:m?"Light":"Dark",children:m?a.jsx(Md,{className:"h-4 w-4"}):a.jsx(Ah,{className:"h-4 w-4"})}):a.jsxs("div",{className:p?"flex h-10 shrink-0 items-center rounded-full border border-white/35 bg-white/5 p-0.5":"flex h-10 shrink-0 items-center rounded-full border border-slate-200 bg-white p-0.5 dark:border-slate-600 dark:bg-[#1a2336]",role:"group","aria-label":"Color theme",children:[a.jsxs("button",{type:"button",onClick:()=>d("light"),className:`inline-flex h-9 items-center gap-1.5 rounded-full px-3 text-[12px] font-semibold transition ${m?p?"text-white/70 hover:text-white":"text-slate-400 hover:text-white":p?"bg-white text-[#031A3A]":"bg-slate-900 text-white"}`,"aria-pressed":!m,children:[a.jsx(Md,{className:"h-3.5 w-3.5"}),"Light"]}),a.jsxs("button",{type:"button",onClick:()=>d("dark"),className:`inline-flex h-9 items-center gap-1.5 rounded-full px-3 text-[12px] font-semibold transition ${m?"bg-[#126BFF] text-white":p?"text-white/70 hover:text-white":"text-slate-500 hover:text-slate-800"}`,"aria-pressed":m,children:[a.jsx(Ah,{className:"h-3.5 w-3.5"}),"Dark"]})]})}const Dh=[{to:"/",label:"Home",end:!0},{to:"/about",label:"About"},{to:"/services",label:"Services"},{to:"/portfolio",label:"Portfolio"},{to:"/stations",label:"Find Stations"},{to:"/contact",label:"Contact"}];function Aj(){const[n,i]=b.useState(!1),[o,c]=b.useState(!1);return b.useEffect(()=>{const d=()=>c(window.scrollY>8);return d(),window.addEventListener("scroll",d,{passive:!0}),()=>window.removeEventListener("scroll",d)},[]),b.useEffect(()=>(document.body.style.overflow=n?"hidden":"",()=>{document.body.style.overflow=""}),[n]),a.jsxs("header",{className:`fixed inset-x-0 top-0 z-50 border-b border-white/15 transition-colors duration-300 ${o||n?"bg-[#031A3A] shadow-[0_10px_30px_rgba(3,26,58,0.45)]":"bg-[#031A3A]"}`,children:[a.jsxs("div",{className:"mx-auto grid h-[88px] max-w-[1240px] grid-cols-[auto_1fr_auto] items-center gap-3 px-4 sm:px-6 lg:px-8",children:[a.jsx(et,{to:"/",className:"relative z-10 min-w-0",onClick:()=>i(!1),children:a.jsx(al,{variant:"header"})}),a.jsx("nav",{className:"hidden min-w-0 items-center justify-center gap-3 lg:flex lg:gap-6 xl:gap-7","aria-label":"Primary",children:Dh.map(d=>a.jsx(Ro,{to:d.to,end:d.end,className:({isActive:m})=>`relative whitespace-nowrap px-1 py-1 text-[13px] font-medium tracking-tight lg:text-[15px] ${m?"text-[#126BFF]":"text-white/80 hover:text-white"}`,children:({isActive:m})=>a.jsxs(a.Fragment,{children:[d.label,a.jsx("span",{className:`absolute -bottom-1 left-1/2 h-[3px] w-7 -translate-x-1/2 rounded-full bg-[#126BFF] ${m?"opacity-100":"opacity-0"}`})]})},d.to))}),a.jsxs("div",{className:"flex items-center justify-end gap-2",children:[a.jsx("div",{className:"hidden sm:block",children:a.jsx(ds,{surface:"header"})}),a.jsx("div",{className:"sm:hidden",children:a.jsx(ds,{compact:!0,surface:"header"})}),a.jsx(et,{to:"/signin",className:"inline-flex h-10 items-center rounded-full border border-white px-5 text-[14px] font-semibold text-white transition hover:bg-white/10",children:"Login"}),a.jsx("button",{type:"button",className:"inline-flex h-10 w-10 items-center justify-center rounded-full border border-white/30 text-white lg:hidden","aria-label":n?"Close menu":"Open menu","aria-expanded":n,onClick:()=>i(d=>!d),children:n?a.jsx(Gt,{size:20}):a.jsx(qp,{size:20})})]})]}),n?a.jsx("div",{className:"border-t border-white/10 bg-[#031A3A] px-4 py-4 lg:hidden",children:a.jsx("nav",{className:"flex flex-col","aria-label":"Mobile",children:Dh.map(d=>a.jsx(Ro,{to:d.to,end:d.end,onClick:()=>i(!1),className:({isActive:m})=>`rounded-xl px-3 py-3 text-[15px] font-medium ${m?"bg-[#126BFF]/20 text-white":"text-white/85"}`,children:d.label},d.to))})}):null]})}function Pn({children:n}){const{pathname:i,hash:o}=ha();return b.useEffect(()=>{if(o){const c=document.querySelector(o);if(c){c.scrollIntoView({behavior:"smooth",block:"start"});return}}window.scrollTo(0,0)},[i,o]),a.jsxs("div",{className:"site-page min-h-screen bg-[#F5F8FC] font-sans text-[#071A38] transition-colors duration-300 dark:bg-[#031A3A] dark:text-white",children:[a.jsx(Aj,{}),n,a.jsx(_j,{})]})}const Mj=[{icon:Tt,value:"150+",label:"Stations"},{icon:dm,value:"5,000+",label:"Power Banks"},{icon:sa,value:"50,000+",label:"Happy Customers"},{icon:Bp,value:"10+",label:"Cities"}],Rj=[{icon:K5,title:"Our Mission",text:"To provide reliable, affordable and accessible power solutions that help everyone stay connected."},{icon:qn,title:"Our Vision",text:"To become the most trusted power bank rental network in Somalia and beyond."},{icon:Xt,title:"Our Promise",text:"Fast, safe charging whenever you need extra power — scan, rent, and go."},{icon:Tt,title:"Our Network",text:"Stations placed where people already live, work and travel across Somalia."}],Tj=[{icon:Xt,title:"Fast & Reliable",text:"High-quality power banks designed to charge your devices quickly and safely."},{icon:tv,title:"Built-in Cables",text:"No need to carry extra cables. Our power banks supp
600ort popular connectors."},{icon:Dt,title:"Secure Payments",text:"Pay securely using trusted mobile payment options."},{icon:Tt,title:"Multiple Locations",text:"Find Hiil Power stations conveniently located near you."},{icon:Ln,title:"Easy QR Rental",text:"Scan, pay, rent and start charging in seconds."},{icon:zl,title:"24/7 Support",text:"Our support team is available to help whenever you need us."}],Dj=["Compact & Lightweight","High Capacity Battery","Built-in Charging Cables","Safe & Durable Design","Fast Charging","Easy to Return"];function Lj(){return a.jsxs(Pn,{children:[a.jsxs("section",{className:"sc-hero relative overflow-hidden bg-[#031A3A] pb-16 pt-[116px] text-white sm:pb-20 sm:pt-[124px] dark:bg-[#031A3A]",children:[a.jsxs("svg",{className:"circuit-svg",viewBox:"0 0 1440 780",preserveAspectRatio:"xMidYMid slice","aria-hidden":!0,children:[a.jsx("defs",{children:a.jsxs("linearGradient",{id:"aboutHeroLine",x1:"0",y1:"0",x2:"1",y2:"1",children:[a.jsx("stop",{offset:"0%",stopColor:"#126BFF",stopOpacity:"0"}),a.jsx("stop",{offset:"50%",stopColor:"#2D7BFF",stopOpacity:"0.55"}),a.jsx("stop",{offset:"100%",stopColor:"#126BFF",stopOpacity:"0"})]})}),a.jsx("path",{d:"M80 120 H280 V260 H480",fill:"none",stroke:"url(#aboutHeroLine)",strokeWidth:"1.4"}),a.jsx("path",{d:"M980 80 V220 H1240 V360",fill:"none",stroke:"url(#aboutHeroLine)",strokeWidth:"1.4"}),a.jsx("path",{d:"M60 520 H220 V640 H400 V720",fill:"none",stroke:"url(#aboutHeroLine)",strokeWidth:"1.2"}),a.jsx("path",{d:"M860 480 H1080 V600 H1320",fill:"none",stroke:"url(#aboutHeroLine)",strokeWidth:"1.2"}),a.jsx("path",{d:"M520 80 H640 V180 H760",fill:"none",stroke:"url(#aboutHeroLine)",strokeWidth:"1"}),a.jsx("circle",{cx:"280",cy:"120",r:"3.5",fill:"#2D7BFF",opacity:"0.8"}),a.jsx("circle",{cx:"480",cy:"260",r:"3.5",fill:"#93C5FD",opacity:"0.6"}),a.jsx("circle",{cx:"1240",cy:"220",r:"3.5",fill:"#126BFF",opacity:"0.85"}),a.jsx("circle",{cx:"1080",cy:"600",r:"3",fill:"#93C5FD",opacity:"0.55"})]}),a.jsx("div",{className:"sc-hero-glow","aria-hidden":!0}),a.jsxs("div",{className:"relative z-10 mx-auto grid max-w-[1200px] items-center gap-12 px-5 lg:grid-cols-[1.05fr_0.95fr] lg:gap-10 lg:px-8",children:[a.jsxs("div",{children:[a.jsx("p",{className:"inline-flex rounded-full bg-[#126BFF]/15 px-3 py-1 text-[12px] font-semibold tracking-[0.14em] text-[#7eb6ff] ring-1 ring-[#126BFF]/35",children:"ABOUT"}),a.jsxs("h1",{className:"mt-5 text-[34px] font-extrabold leading-[1.12] tracking-tight text-white sm:text-[46px] lg:text-[52px]",children:["Powering ",a.jsx("span",{className:"text-[#126BFF]",children:"Somalia."}),a.jsx("br",{}),"Keeping You ",a.jsx("span",{className:"text-[#126BFF]",children:"Connected."})]}),a.jsx("span",{className:"mt-5 block h-1 w-14 rounded-full bg-[#126BFF]"}),a.jsx("p",{className:"mt-6 max-w-xl text-[15px] leading-7 text-white/75 sm:text-[16px]",children:"Hiil Power waa adeeg casri ah oo lagu kiraysto"}),a.jsx("p",{className:"mt-1 max-w-xl text-[22px] font-extrabold tracking-tight text-[#126BFF] sm:text-[26px]",children:"Power Bank"}),a.jsx("p",{className:"mt-3 max-w-xl text-[15px] leading-7 text-white/75 sm:text-[16px]",children:"kaas oo dadka ka caawiya inay mar walba ku xirnaadaan meel kasta oo ay joogaan. Waxaan bixinnaa adeeg dallacaad oo degdeg ah, la isku halayn karo, isla markaana fudud in la isticmaalo — annagoo adeegsanayna xarumo si qorshaysan loo meeleeyay."}),a.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[a.jsx(et,{to:"/stations",className:"inline-flex h-11 items-center justify-center rounded-full bg-[#126BFF] px-5 text-[14px] font-semibold text-white shadow-[0_10px_24px_rgba(18,107,255,0.35)] transition hover:bg-[#2D7BFF]",children:"Find Stations"}),a.jsx(et,{to:"/contact",className:"inline-flex h-11 items-center justify-center rounded-full border border-white/70 px-5 text-[14px] font-semibold text-white transition hover:bg-white/10",children:"Contact Us"})]})]}),a.jsx("div",{className:"relative mx-auto flex w-full max-w-[480px] items-center justify-center",children:a.jsxs("div",{className:"sc-about-bank sc-about-bank--dark relative flex min-h-[360px] w-full items-center justify-center overflow-hidden rounded-[28px] px-6 py-10 sm:min-h-[420px]",children:[a.jsx("div",{className:"sc-about-bank__glow","aria-hidden":!0}),a.jsxs("div",{className:"sc-about-bank__rings","aria-hidden":!0,
600children:[a.jsx("span",{}),a.jsx("span",{}),a.jsx("span",{})]}),a.jsx("img",{src:_a,alt:"Hiil Power Bank",className:"sc-about-bank__img relative z-10 h-[280px] w-auto object-contain sm:h-[340px] lg:h-[380px]"})]})})]})]}),a.jsx("section",{className:"bg-white px-5 pb-6 dark:bg-[#041F46] lg:px-8",children:a.jsx("div",{className:"mx-auto max-w-[1200px]",children:a.jsx("div",{className:"grid grid-cols-2 overflow-hidden rounded-[24px] border border-[#031A3A]/08 bg-[#F7FAFF] shadow-[0_16px_40px_rgba(3,26,58,0.06)] dark:border-white/10 dark:bg-[#061F46] dark:shadow-[0_16px_40px_rgba(0,0,0,0.25)] lg:grid-cols-4",children:Mj.map((n,i)=>{const o=n.icon;return a.jsxs("article",{className:`flex flex-col items-center px-4 py-7 text-center ${i%2===0?"border-r border-[#031A3A]/08 dark:border-white/10":""} ${i<2?"border-b border-[#031A3A]/08 dark:border-white/10 lg:border-b-0":""} ${i===2?"lg:border-r lg:border-[#031A3A]/08 dark:lg:border-white/10":""}`,children:[a.jsx("span",{className:"mb-3 inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(o,{className:"h-5 w-5"})}),a.jsx("p",{className:"text-[28px] font-extrabold text-[#071A38] dark:text-white sm:text-[32px]",children:n.value}),a.jsx("p",{className:"mt-1 text-[13px] text-[#071A38]/55 dark:text-white/60",children:n.label})]},n.label)})})})}),a.jsx("section",{className:"bg-white px-5 py-16 dark:bg-[#031A3A] sm:px-8",children:a.jsxs("div",{className:"mx-auto grid max-w-[1200px] items-stretch gap-12 lg:grid-cols-[1.05fr_0.95fr] lg:gap-16",children:[a.jsx("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:Rj.map(n=>{const i=n.icon;return a.jsxs("article",{className:"rounded-[20px] border border-[#031A3A]/08 bg-white p-6 shadow-[0_12px_28px_rgba(3,26,58,0.06)] transition duration-300 hover:-translate-y-1 hover:border-[#126BFF]/30 hover:shadow-[0_18px_40px_rgba(18,107,255,0.1)] dark:border-white/10 dark:bg-[#061F46] dark:shadow-none",children:[a.jsx("span",{className:"inline-flex h-11 w-11 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(i,{className:"h-5 w-5"})}),a.jsx("h2",{className:"mt-4 text-[20px] font-bold text-[#071A38] dark:text-white",children:n.title}),a.jsx("p",{className:"mt-2 text-[14px] leading-7 text-[#071A38]/60 dark:text-white/65",children:n.text})]},n.title)})}),a.jsxs("div",{className:"relative flex min-h-[320px] items-center justify-center rounded-[28px] border border-[#031A3A]/08 bg-white px-4 py-8 dark:border-white/10 dark:bg-[#061F46]",children:[a.jsx("div",{className:"pointer-events-none absolute inset-[18%] rounded-full bg-[#126BFF]/8 blur-2xl","aria-hidden":!0}),a.jsx("img",{src:_a,alt:"Hiil Power Bank",className:"relative z-10 h-[240px] w-auto object-contain drop-shadow-[0_24px_40px_rgba(3,26,58,0.2)] sm:h-[300px]"})]})]})}),a.jsx("section",{id:"story",className:"scroll-mt-24 bg-[#F5F8FC] px-5 py-16 dark:bg-[#041F46] sm:px-8",children:a.jsxs("div",{className:"mx-auto grid max-w-[1200px] items-center gap-10 lg:grid-cols-[1.05fr_0.95fr]",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[32px] font-bold tracking-tight text-[#071A38] dark:text-white",children:"Our Story"}),a.jsx("span",{className:"mt-2 block h-1 w-12 rounded-full bg-[#126BFF]"}),a.jsx("p",{className:"mt-5 text-[15px] leading-7 text-[#071A38]/65 dark:text-white/70",children:"Hiil Power waxaa loo aasaasay in lagu xalliyo dhibaato maalin kasta dhacda, taas oo ah in baytariga taleefankaagu kaa dhammaado xilli aad aad ugu baahan tahay. Shabakaddeenna kiraynta"}),a.jsx("p",{className:"mt-2 text-[20px] font-extrabold text-[#126BFF]",children:"Power Bank"}),a.jsx("p",{className:"mt-2 text-[15px] leading-7 text-[#071A38]/65 dark:text-white/70",children:"waxay kuu fududaynaysaa inaad hesho, kiraysato, isla markaana soo celiso mar kasta oo aad u baahato koronto dheeraad ah."}),a.jsx("p",{className:"mt-4 text-[15px] leading-7 text-[#071A38]/65 dark:text-white/70",children:"Iyadoo la adeegsanayo tiknoolajiyadda casriga ah ee QR Code-ka, hababka lacag-bixinta ee fudud iyo xarumaha dallacaadda oo si qorshaysan loo meeleeyay, Hiil Power waxay macaamiisha guud ahaan Soomaaliya u suuragelinaysaa adeeg dallacaad oo sahlan, degdeg ah oo la isku halayn karo."})]}),a.jsx("div",{className:"overflow-hidden rounded-[28px] border border-[#031A3A]/08 bg-white shadow-[0_14px_36px_rgba(3,26,58,0.08)] dark:border-white/10 dark:bg-[#061F46]",children:a.jsx("img",{src:kj,alt:"Hiil Power Bank — Stay Charged Always",className:"h-full w-full object-cover object-center"})})]})}),a.jsxs("section",{className:"bg-white px-5 py-16 dark:bg-[#031A3A] sm:px-8",children:[a.jsxs("div",{className:"mx-auto max-w-[1200px] text-center",children:[a.jsx("h2",{className:"text-[32px] font-bold tracking-tight text-[#071A38] dark:text-white",children:"Why Choose Hiil Power?"}),a.jsx("p",{className:"mt-2 text-[15px] text-[#071A38]/55 dark:text-white/55",children:"Simple, fast and reliable power whenever you need it."})]}),a.jsx("div",{className:"mx-auto mt-12 grid max-w-[1200px] grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",children:T
600j.map(n=>{const i=n.icon;return a.jsxs("article",{className:"rounded-[20px] border border-[#031A3A]/08 bg-white p-6 shadow-[0_12px_28px_rgba(3,26,58,0.05)] transition duration-300 hover:-translate-y-1 hover:border-[#126BFF]/30 hover:shadow-[0_18px_40px_rgba(18,107,255,0.1)] dark:border-white/10 dark:bg-[#061F46] dark:shadow-none",children:[a.jsx("span",{className:"inline-flex h-11 w-11 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(i,{className:"h-5 w-5"})}),a.jsx("h3",{className:"mt-4 text-[18px] font-bold text-[#071A38] dark:text-white",children:n.title}),a.jsx("p",{className:"mt-2 text-[14px] leading-6 text-[#071A38]/55 dark:text-white/60",children:n.text})]},n.title)})})]}),a.jsx("section",{className:"bg-[#F5F8FC] px-5 py-16 dark:bg-[#041F46] sm:px-8",children:a.jsxs("div",{className:"mx-auto grid max-w-[1200px] items-center gap-10 lg:grid-cols-2",children:[a.jsxs("div",{children:[a.jsxs("h2",{className:"text-[28px] font-bold tracking-tight text-[#071A38] dark:text-white sm:text-[32px]",children:["Designed for everyday",a.jsx("br",{}),a.jsx("span",{className:"text-[#126BFF]",children:"Power Bank"})," use"]}),a.jsx("ul",{className:"mt-8 grid grid-cols-1 gap-3 sm:grid-cols-2",children:Dj.map(n=>a.jsxs("li",{className:"flex items-center gap-3 text-[14px] font-medium text-[#071A38] dark:text-white/85",children:[a.jsx("span",{className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(To,{className:"h-3.5 w-3.5",strokeWidth:3})}),n]},n))})]}),a.jsx("div",{className:"flex justify-center rounded-[28px] border border-[#031A3A]/08 bg-white p-8 shadow-[0_14px_36px_rgba(3,26,58,0.06)] dark:border-white/10 dark:bg-[#061F46]",children:a.jsx("img",{src:_a,alt:"Hiil Power Bank",className:"h-[220px] w-auto object-contain drop-shadow-[0_24px_40px_rgba(3,26,58,0.25)] sm:h-[280px]"})})]})})]})}function zj(){const[n,i]=b.useState(!1);function o(c){c.preventDefault(),i(!0)}return a.jsxs(Pn,{children:[a.jsx("section",{className:"bg-[#031A3A] px-5 pb-16 pt-[124px] text-white sm:px-8",children:a.jsxs("div",{className:"mx-auto max-w-[800px] text-center",children:[a.jsx("h1",{className:"mt-3 text-[36px] font-extrabold tracking-tight sm:text-[44px]",children:"Available Anytime"}),a.jsx("p",{className:"mt-4 text-[16px] leading-7 text-white/70",children:"Ma qabtaa su'aalo ku saabsan kiraysiga Power Bank, xarumaha ama iskaashiga ganacsi? Noo soo dir farriin, kooxda Hiil Power ayaana kula soo xiriiri doonta."})]})}),a.jsxs("section",{className:"mx-auto grid max-w-[1100px] gap-8 bg-white px-5 py-14 transition-colors dark:bg-[#031A3A] lg:grid-cols-[0.9fr_1.1fr] sm:px-8",children:[a.jsx("div",{className:"space-y-4",children:[{icon:Pa,label:"Phone",value:"+252 614 009006"},{icon:$s,label:"Email",value:"[email protected]"},{icon:Tt,label:"HQ",value:"Hodan, Mogadishu, Somalia"}].map(c=>{const d=c.icon;return a.jsxs("div",{className:"flex items-start gap-3 rounded-2xl bg-white p-5 shadow-[0_10px_28px_rgba(15,40,90,0.05)] dark:border dark:border-white/10 dark:bg-[#061F46]",children:[a.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(d,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-wide text-slate-400 dark:text-white/50",children:c.label}),a.jsx("p",{className:"mt-0.5 text-[15px] font-medium text-[#071A38] dark:text-white",children:c.value})]})]},c.label)})}),a.jsx("form",{onSubmit:o,className:"rounded-[28px] bg-white p-6 shadow-[0_16px_40px_rgba(15,40,90,0.06)] dark:border dark:border-white/10 dark:bg-[#061F46]",children:n?a.jsx("p",{className:"py-10 text-center text-[16px] font-medium text-[#071A38] dark:text-white",children:"Thanks — we received your message and will reply soon."}):a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:"block text-[13px] font-medium text-slate-600 dark:text-white/70",children:["Name",a.jsx("input",{required:!0,className:"field-input mt-1.5 pl-4",name:"name ",placeholder:"Enter Name"})]}),a.jsxs("label",{className:"mt-4 block text-[13px] font-medium text-slate-600 dar
600k:text-white/70",children:["Email",a.jsx("input",{required:!0,type:"email",className:"field-input mt-1.5 pl-4",name:"email",placeholder:"Enter Email"})]}),a.jsxs("label",{className:"mt-4 block text-[13px] font-medium text-slate-600 dark:text-white/70",children:["Message",a.jsx("textarea",{required:!0,rows:5,className:"field-input mt-1.5 h-auto py-3 pl-4",name:"message",placeholder:"Enter Message"})]}),a.jsx("button",{type:"submit",className:"mt-5 inline-flex h-12 w-full items-center justify-center rounded-full bg-[#126BFF] text-[15px] font-semibold text-white",children:"Send message"})]})})]})]})}const Rt={name:"Hodan Restaurant",lat:2.0412,lng:45.3186,radiusMeters:750,label:"Hodan Restaurant, Mogadishu"},Ja={"Hodan Restaurant":{lat:Rt.lat,lng:Rt.lng,label:Rt.label},Downtown:{lat:2.0469,lng:45.3182,label:"Downtown, Mogadishu"},Airport:{lat:2.0144,lng:45.3047,label:"Aden Adde International Airport"},Bakaaraha:{lat:2.037,lng:45.312,label:"Bakaara Market"},KM4:{lat:2.0333,lng:45.3417,label:"KM4, Mogadishu"},Hamarweyne:{lat:2.0339,lng:45.3431,label:"Hamarweyne, Mogadishu"},SomaCharge:{lat:Rt.lat,lng:Rt.lng,label:Rt.label}};function yo(n){return Number(n)*Math.PI/180}function Bj(n,i){const c=yo(i.lat-n.lat),d=yo(i.lng-n.lng),m=Math.sin(c/2)**2+Math.cos(yo(n.lat))*Math.cos(yo(i.lat))*Math.sin(d/2)**2;return 2*6371e3*Math.asin(Math.min(1,Math.sqrt(m)))}function Oj(n,i,o=0){if(!Number.isFinite(Number(n))||!Number.isFinite(Number(i)))return!1;const c=Math.min(Math.max(Number(o)||0,0),400);return Bj({lat:Number(n),lng:Number(i)},Rt)<=Rt.radiusMeters+c}function Lh(n){const i=String(n||"").toLowerCase();return i.includes("secure origin")||i.includes("only secure origins")}function md(){return{lat:Rt.lat,lng:Rt.lng,error:null,source:"site"}}function zh(){return new Promise(n=>{if(typeof window<"u"&&window.isSecureContext===!1){n(md());return}if(typeof navigator>"u"||!navigator.geolocation){n({lat:null,lng:null,error:"GPS is not available on this device."});return}const i=o=>n({lat:o.coords.latitude,lng:o.coords.longitude,accuracy:o.coords.accuracy,error:null,source:"live"});navigator.geolocation.getCurrentPosition(i,o=>{const c=(o==null?void 0:o.message)||"GPS permission denied.";if(Lh(c)){n(md());return}navigator.geolocation.getCurrentPosition(i,d=>{const m=(d==null?void 0:d.message)||c;if(Lh(m)){n(md());return}n({lat:null,lng:null,error:m})},{enableHighAccuracy:!1,timeout:1e4,maximumAge:3e4})},{enableHighAccuracy:!0,timeout:12e3,maximumAge:15e3})})}function Uj(n,i){if(i&&Number.isFinite(i.lat)&&Number.isFinite(i.lng))return{lat:Number(i.lat),lng:Number(i.lng),label:i.label||n||"Live GPS",source:"live"};const o=Ja[n];return o?{...o,source:"site"}:{lat:2.0469,lng:45.3182,label:n||"Mogadishu",source:"fallback"}}function zo(n,i,o=16){const c=o>=16?.012:o>=14?.03:.07,d=`${i-c},${n-c},${i+c},${n+c}`;return`https://www.openstreetmap.org/export/embed.html?bbox=${encodeURIComponent(d)}&layer=mapnik&marker=${n}%2C${i}`}function zd(n,i){return`https://www.google.com/maps?q=${n},${i}`}function mm({className:n="",size:i="lg"}){const o=i==="sm"?"h-[150px] w-auto sm:h-[170px]":"h-[280px] w-auto sm:h-[340px] lg:h-[400px]";return a.jsxs("div",{className:`sc-power-stage ${n}`,children:[a.jsx("div",{className:"sc-power-glow"}),a.jsxs("div",{className:"sc-power-rings","aria-hidden":!0,children:[a.jsx("span",{}),a.jsx("span",{}),a.jsx("span",{})]}),a.jsx("img",{src:_a,alt:"SomaCharge power bank",className:`sc-power-img relative z-10 ${o}`})]})}const Hj=[{icon:Xt,title:"Instant Access",text:"Rent power banks in seconds"},{icon:Tt,title:"Widespread Locations",text:"Find stations near you"},{icon:Dt,title:"Secure & Reliable",text:"Your data and payments are safe"},{icon:zl,title:"24/7 Support",text:"We're here to help anytime"}],Fj=[{n:"01",icon:Ln,title:"Scan QR Code",text:"Scan the QR code at any station"},{n:"02",icon:tr,title:"Pay & Rent",text:"Pay securely and rent instantly"},{n:"03",icon:dm,title:"Charge Your Device",text:"Use the power bank to charge your device"},{n:"04",icon:Pp,title:"Return Power Bank",text:"Return at any station when you're done"}],$j=["Fast charging power banks","Built-in cables for all devices","Secure mobile payments","Multiple locations across Somalia","Easy QR code rental","24/7 customer support"];function qj(){return a.jsx("div",{className:"overflow-hidden rounded-2xl border border-[#d7e4f5] bg-[#eef4fb]",children:a.jsx("iframe",{title:"SomaCharge stations in Mogadishu",className:"h-[210px] w-full",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",src:zo(Rt.lat,Rt.lng,14)})})}function Pj(){return a.jsxs(Pn,{children:[a.jsxs("section",{className:"sc-hero relative overflow-hidden bg-[#031A3A] pb-16 pt-[116px] sm:pb-20 sm:pt-[124px]",children:[a.jsxs("svg",{className:"circuit-svg",viewBox:"0 0 1440 780",preserveAspectRatio:"xMidYMid slice","aria-hidden":!0,
600children:[a.jsx("defs",{children:a.jsxs("linearGradient",{id:"heroLine",x1:"0",y1:"0",x2:"1",y2:"1",children:[a.jsx("stop",{offset:"0%",stopColor:"#126BFF",stopOpacity:"0"}),a.jsx("stop",{offset:"50%",stopColor:"#2D7BFF",stopOpacity:"0.55"}),a.jsx("stop",{offset:"100%",stopColor:"#126BFF",stopOpacity:"0"})]})}),a.jsx("path",{d:"M80 120 H280 V260 H480",fill:"none",stroke:"url(#heroLine)",strokeWidth:"1.4"}),a.jsx("path",{d:"M980 80 V220 H1240 V360",fill:"none",stroke:"url(#heroLine)",strokeWidth:"1.4"}),a.jsx("path",{d:"M60 520 H220 V640 H400 V720",fill:"none",stroke:"url(#heroLine)",strokeWidth:"1.2"}),a.jsx("path",{d:"M860 480 H1080 V600 H1320",fill:"none",stroke:"url(#heroLine)",strokeWidth:"1.2"}),a.jsx("path",{d:"M520 80 H640 V180 H760",fill:"none",stroke:"url(#heroLine)",strokeWidth:"1"}),a.jsx("circle",{cx:"280",cy:"120",r:"3.5",fill:"#2D7BFF",opacity:"0.8"}),a.jsx("circle",{cx:"480",cy:"260",r:"3.5",fill:"#93C5FD",opacity:"0.6"}),a.jsx("circle",{cx:"1240",cy:"220",r:"3.5",fill:"#126BFF",opacity:"0.85"}),a.jsx("circle",{cx:"400",cy:"640",r:"3",fill:"#60A5FA",opacity:"0.7"}),a.jsx("circle",{cx:"1080",cy:"600",r:"3",fill:"#93C5FD",opacity:"0.55"})]}),a.jsx("div",{className:"sc-hero-glow","aria-hidden":!0}),a.jsxs("div",{className:"relative z-10 mx-auto grid max-w-[1200px] items-center gap-10 px-5 lg:grid-cols-[1.05fr_0.95fr] lg:gap-6 lg:px-8",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-[40px] font-extrabold leading-[1.08] tracking-tight text-white sm:text-[56px] lg:text-[64px]",children:["Hiil Power .",a.jsx("br",{}),"Stay ",a.jsx("span",{className:"text-[#126BFF]",children:"connected."})]}),a.jsxs("p",{className:"mt-5 max-w-md text-[16px] leading-7 text-white/75 sm:text-[18px]",children:["Kirayso Power Bank wakhti kasta, meel kasta.              ",a.jsx("br",{}),"Degdeg ah. Ammaan ah. Lagu kalsoonaan karo."]}),a.jsxs("div",{className:"mt-8 flex flex-col gap-3 sm:flex-row sm:items-center",children:[a.jsxs(et,{to:"/signin",className:"inline-flex h-12 items-center justify-center gap-2 rounded-full bg-[#126BFF] px-6 text-[15px] font-semibold text-white shadow-[0_12px_28px_rgba(18,107,255,0.38)] transition hover:-translate-y-0.5 hover:bg-[#2D7BFF]",children:[a.jsx(Xt,{className:"h-4 w-4 fill-white"}),"Kirayso Power Bank"]}),a.jsxs(et,{to:"/stations",className:"inline-flex h-12 items-center justify-center gap-2 rounded-full border border-white/70 px-6 text-[15px] font-semibold text-white transition hover:bg-white/10",children:[a.jsx(Tt,{className:"h-4 w-4"}),"Find a Station"]})]})]}),a.jsx(mm,{className:"mx-auto w-full max-w-[520px]"})]})]}),a.jsx("section",{className:"bg-white px-5 py-14 transition-colors dark:bg-[#041F46] sm:px-8 sm:py-16",children:a.jsx("div",{className:"mx-auto grid max-w-[1200px] grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4 lg:gap-8",children:Hj.map(n=>{const i=n.icon;return a.jsxs("article",{className:"sc-feature-card group rounded-[24px] border border-[#031A3A]/08 bg-white p-6 shadow-[0_14px_32px_rgba(3,26,58,0.08)] transition duration-300 hover:-translate-y-1.5 hover:border-[#126BFF]/40 hover:shadow-[0_18px_40px_rgba(18,107,255,0.12)] dark:border-white/10 dark:bg-[#061F46] dark:shadow-[0_14px_32px_rgba(0,0,0,0.28)]",children:[a.jsx("span",{className:"mb-5 inline-flex h-12 w-12 items-center justify-center rounded-full bg-[#126BFF] text-white shadow-[0_8px_18px_rgba(18,107,255,0.28)]",children:a.jsx(i,{className:"h-5 w-5"})}),a.jsx("h3",{className:"text-[17px] font-semibold text-[#071A38] dark:text-white",children:n.title}),a.jsx("p",{className:"mt-2 text-[14px] leading-6 text-[#071A38]/60 dark:text-white/65",children:n.text})]},n.title)})})}),a.jsx("section",{id:"how",className:"relative z-10 bg-white px-5 pb-20 pt-8 transition-colors dark:bg-[#031A3A] sm:px-8",children:a.jsxs("div",{className:"mx-auto max-w-[1200px]",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("h2",{className:"text-[32px] font-bold tracking-tight text-[#071A38] dark:text-white sm:text-[36px]",children:"How It Works"}),a.jsx("span",{className:"mx-auto mt-2 block h-1 w-12 rounded-full bg-[#126BFF]"}),a.jsx("p",{className:"mt-3 text-[15px] text-slate-500 dark:text-white/60",children:"Ku hel koronto afar tallaabo oo fudud."})]}),a.jsxs("div",{className:"relative mt-14 grid grid-cols-1 gap-12 md:grid-cols-4 md:gap-10",children:[a.jsx("div",{className:"sc-steps-line pointer-events-none absolute left-[12%] right-[12%] top-[28px] hidden border-t-[3px] border-dotted border-slate-200 dark:border-white/20 md:block"}),Fj.map(n=>{const i=n.icon;return a.jsxs("div",{className:"relative z-10 flex flex-col items-center text-center",children:[a.jsx("span",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-[#126BFF] text-white shadow-[0_10px_22px_rgba(18,107,255,0.28)]",children:a.jsx(i,{className:"h-6 w-6"})}),a.jsx("p",{className:"mt-4 text-[13px] font-semibold text-[#2D7BFF]",children:n.n}),a.jsx("h3",{className:"mt-1 text-[18px] font-bold text-[#071A38] dark:text-white",children:n.title}),a.jsx("p",{className:"mt-2 max-w-[200px] text-[14px] leading-6 text-slate-500 dark:text-white/60",children:n.text})]},n.n)})]})]})}),a.jsx("section",{className:"bg-[#F5F8FC] px-5 py-20 transition-colors dark:bg-[#041F46] sm:px-8",children:a.jsxs("div",{className:"mx-auto grid max-w-[1200px] gap-12 lg:grid-cols-3 lg:items-start lg:gap-16",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[28px] font-bold tracking-tight text-[#071A38] dark:text-white",children:"Why Hiil Power?"}),a.jsx("ul",{className:"mt-6 space-y-3.5",children:$j.map(n=>a.jsxs("li",{className:"flex items-start gap-3 text-[15px] text-[#071A38] dark:text-white/85",children:[a.jsx("span",{className:"mt-0.5 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(To,{className:"h-3.5 w-3.5",
600strokeWidth:3})}),n]},n))})]}),a.jsx("div",{className:"flex min-h-[280px] items-center justify-center rounded-[28px] bg-[#031A3A] px-4 py-8 shadow-[0_18px_50px_rgba(15,40,90,0.08)] dark:border dark:border-white/10 dark:bg-[#061F46]",children:a.jsxs("div",{className:"flex items-end justify-center -space-x-6",children:[a.jsx("img",{src:_a,alt:"",className:"h-[150px] w-auto -rotate-12 object-contain opacity-90 drop-shadow-lg sm:h-[180px]"}),a.jsx("img",{src:_a,alt:"Hiil power banks",className:"relative z-10 h-[190px] w-auto object-contain drop-shadow-xl sm:h-[230px]"}),a.jsx("img",{src:_a,alt:"",className:"h-[150px] w-auto rotate-12 object-contain opacity-90 drop-shadow-lg sm:h-[180px]"})]})}),a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{className:"rounded-[28px] bg-white p-5 shadow-[0_18px_50px_rgba(15,40,90,0.06)] dark:border dark:border-white/10 dark:bg-[#061F46]",children:[a.jsx("h3",{className:"text-[22px] font-bold text-[#071A38] dark:text-white",children:"Find a Station Near You"}),a.jsx("p",{className:"mt-2 text-[14px] leading-6 text-slate-500 dark:text-white/60",children:"Soo hel xarumaha Hiil Power ee kuugu dhow wakhtiga dhabta ah."}),a.jsx("div",{className:"mt-4",children:a.jsx(qj,{})}),a.jsx(et,{to:"/stations",className:"mt-4 inline-flex h-11 w-full items-center justify-center rounded-full bg-[#126BFF] text-[14px] font-semibold text-white transition hover:bg-[#2D7BFF]",children:"Find Stations"})]}),a.jsxs("div",{id:"pricing",className:"rounded-[28px] border border-[#d7e6fb] bg-[#eef5ff] p-6 dark:border-white/10 dark:bg-[#061F46]",children:[a.jsx("p",{className:"text-[13px] font-semibold uppercase tracking-[0.14em] text-[#126BFF]",children:"Qiimeyn Fudud"}),a.jsx("p",{className:"mt-1 text-[13px] text-slate-500 dark:text-white/55",children:"Qiimayaal jaban. Ma jiraan kharashyo qarsoon."}),a.jsx("h3",{className:"mt-4 text-[18px] font-bold text-[#071A38] dark:text-white",children:"Hourly Rental"}),a.jsxs("p",{className:"mt-1 text-[34px] font-extrabold leading-none text-[#126BFF]",children:["$0.50 ",a.jsx("span",{className:"text-[18px] font-semibold text-[#126BFF]/80",children:"/ hour"})]}),a.jsx("ul",{className:"mt-4 space-y-2 text-[14px] text-[#071A38] dark:text-white/85",children:["Pay only for what you use","No hidden charges"].map(n=>a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx(To,{className:"h-4 w-4 text-[#126BFF]",strokeWidth:3}),n]},n))}),a.jsx("a",{href:"#pricing",className:"mt-5 inline-flex h-11 w-full items-center justify-center rounded-full bg-[#126BFF] text-[14px] font-semibold text-white transition hover:bg-[#2D7BFF]",children:"View Pricing"})]})]})]})})]})}const Yj="/assets/airports-W4y0L1gJ.png",Vj="/assets/cafes-B2zp_ckV.png",Gj="/assets/hospitals-Qh7mRT51.png",Xj="/assets/hotels-CGoH5HJ4.png",Qj="/assets/shopping-BntegXNC.png",Ij="/assets/universities-BfvIRvGD.png";function Kp(n){const i=String(n||"").trim(),o=i.match(/(?:youtube\.com\/(?:watch\?v=|shorts\/|embed\/|live\/)|youtu\.be\/)([A-Za-z0-9_-]{11})/);if(o){const c=o[1];return{kind:"youtube",id:c,src:i,poster:`https://i.ytimg.com/vi/${c}/hqdefault.jpg`,watchUrl:`https://www.youtube.com/watch?v=${c}`,embedUrl(d={}){const m=new URLSearchParams({rel:"0",modestbranding:"1",playsinline:"1"});return d.autoplay&&m.set("autoplay","1"),d.mute&&m.set("mute","1"),`https://www.youtube.com/embed/${c}?${m.toString()}`}}}return{kind:"file",src:i,poster:"",watchUrl:i}}const Zj="https://www.youtube.com/shorts/7UqzZLjRdQY",Kj=[{id:"hospitals",title:"Hospitals",caption:"Power through your workday or appointment",image:Gj},{id:"shopping",title:"Shopping Centers",caption:"Available in major malls",image:Qj},{id:"cafes",title:"Restaurants & Cafes",caption:"Dine and charge",image:Vj},{id:"hotels",title:"Hotels",caption:"Travel with confidence",image:Xj},{id:"airports",title:"Airports & Transport",caption:"Never miss a connection",image:Yj},{id:"universities",title:"Universities",caption:"Study & bill without interruption",image:Ij}],Bh={night:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4",tech:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4"},Jj=[{id:"all",label:"All"},{id:"promo",label:"Promotional Videos"},{id:"anim",label:"Animations"}],xd=[{id:"brand",title:"Hiil Power Bank – Brand Introduction",category:"Promotional Video",filter:"promo",duration:"1:45",src:Zj,poster:"",tone:"from-[#052a6a] via-[#0a3a8c] to-[#031A3A]",description:"A cinematic brand film that introduces Hiil Power Bank as Somalia’s power-on-the-go network — stations, rental, and the promise to stay connected."},{id:"steps",title:"How It Works – Easy Steps",category:"Animation",filter:"anim",duration:"2:32",src:Bh.night,poster:"https://images.unsplash.com/photo-1473341304170-971dccb5ac1e?auto=format&fit=crop&w=1400&q=80",tone:"from-[#041f52] via-[#126BFF]/40 to-[#031A3A]",description:"A simple, smooth animation showing how Hiil Power Bank works — from finding a station to charging your device and returning the bank."},{id:"product",title:"Power Bank – Product Showcase",category:"Promotional Video",filter:"promo",duration:"1:56",src:Bh.tech,poster:_a,tone:"from-[#041833] via-[#126BFF]/35 to-[#1a0a3a]",description:"Close-up product film of the Hiil Power Bank: compact body, built-in cables, neon charge indicators, and fast output."}];function Jp(n){const i=b.useRef(null),[o,c]=b.useState(!1);return b.useEffect(()=>{const d=i.current;if(!d)return;const m=new IntersectionObserver(([p])=>{p.isIntersecting&&(c(!0),m.unobserve(p.target))},{threshold:.14,rootMargin:"0px 0px -40px 0px",...n});return m.observe(d),()=>m.disconnect()},[n]),[i,o]}function vo({className:n="",children:i,delay:o=0}){const[c,d]=Jp();return a.jsx("div",{ref:c,className:`sc-reveal ${d?"is-in":""} ${n}`,style:{transitionDelay:`${o}ms`},children:i})}function Wj({item:n,onClose:i}){const o=b.useRef(null),c=Kp(n.src),d=c.kind==="youtube",[m,p]=b.useState(!0),[y,x]=b.useState(!1),[f,g]=b.useState(.85),[v,w]=b.useState(0);b.useEffect(()=>{document.body.style.overflow="hidden";const A=G=>{if(G.key==="Escape"&&i(),G.key===" "&&!d){G.preventDefault();const E=o.current;if(!E)return;E.paused?(E.play().catch(()=>p(!1)),p(!0)):(E.pause(),p(!1))}};return window.addEventListener("keydown",A),()=>{document.body.style.overflow="",window.removeEventListener("keydown",A)}},[i,d]),b.useEffect(()=>{const A=o.current;if(!A||d)return;A.volume=f,A.muted=y,A.play().then(()=>p(!0)).catch(()=>p(!1));const G=()=>{A.duration&&w(A.currentTime/A.duration)},E=()=>p(!0),z=()=>p(!1);return A.addEventListener("timeupdate",G),A.addEventListener("play",E),A.addEventListener("pause",z),()=>{A.removeEventListener("timeupdate",G),A.removeEventListener("play",E),A.removeEventListener("pause",z)}},[n.id,d]),b.useEffect(()=>{const A=o.current;!A||d||(A.volume=f,A.muted=y)},[y,f,d]);const D=b.useCallback(()=>{const A=o.current;A&&(A.paused?A.play().then(()=>p(!0)).catch(()=>p(!1)):(A.pause(),p(!1)))},[]),C=()=>{const A=o.current;A&&(A.muted=!A.muted,x(A.muted))},T=A=>{const G=Number(A.target.value);g(G);const E=o.current;E&&(E.volume=G,E.muted=G===0,x(G===0))},S=A=>{const G=o.current;if(!(G!=null&&G.duration))return;const E=A.currentTarget.getBoundingClientRect(),z=Math.min(1,Math.max(0,(A.clientX-E.left)/E.width));G.currentTime=z*G.duration,w(z)},k=()=>{const A=o.current;A&&(A.requestFullscreen?A.requestFullscreen():A.webkitRequestFullscreen&&A.webkitRequestFullscreen())},_=()=>{if(d){window.open(c.watchUrl,"_blank","noopener,noreferrer");return}const A=o.current;A&&(A.currentTime=0,A.play().then(()=>p(!0)).catch(()=>p(!1)),k())},U=c.kind==="youtube"?c.poster:typeof n.poster=="string"?n.poster:void 0;return a.jsxs("div",{className:"sc-video-modal",role:"dialog","aria-modal":"true","aria-labelledby":"portfolio-video-title",children:[a.jsx("button",{type:"button",className:"sc-video-modal__backdrop","aria-label":"Close video",onClick:i}),a.jsxs("div",{className:"sc-video-modal__panel",children:[a.jsx("button",{type:"button",className:"absolute right-3 top-3 z-20 inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/20 transition hover:bg-black/75",onClick:i,"aria-label":"Close",children:a.jsx(Gt,{className:"h-5 w-5"})}),a.jsxs("div",{className:"relative overflow-hidden rounded-[22px] bg-black",children:[d?a.jsx("iframe",{title:n.title,className:"aspect-video w-full bg-black",src:c.embedUrl({auto
600play:!0}),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0}):a.jsx("video",{ref:o,className:"aspect-video w-full bg-black object-cover",src:n.src,poster:U,playsInline:!0,preload:"auto",onClick:D}),d?null:a.jsxs("div",{className:"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/80 via-black/35 to-transparent px-4 pb-3 pt-10",children:[a.jsx("button",{type:"button",className:"sc-video-seek mb-3 block h-1.5 w-full overflow-hidden rounded-full bg-white/20",onClick:S,"aria-label":"Seek",children:a.jsx("div",{className:"h-full rounded-full bg-[#126BFF]",style:{width:`${v*100}%`}})}),a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("button",{type:"button",onClick:D,className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#126BFF] shadow-[0_0_18px_rgba(18,107,255,0.55)]","aria-label":m?"Pause":"Play",children:m?a.jsx(h5,{className:"h-4 w-4 fill-white"}):a.jsx(Gi,{className:"ml-0.5 h-4 w-4 fill-white"})}),a.jsx("button",{type:"button",onClick:C,className:"text-white/90","aria-label":y?"Unmute":"Mute",children:y||f===0?a.jsx(pj,{className:"h-5 w-5"}):a.jsx(fj,{className:"h-5 w-5"})}),a.jsx("input",{type:"range",min:"0",max:"1",step:"0.01",value:y?0:f,onChange:T,className:"h-1 w-24 accent-[#126BFF] sm:w-32","aria-label":"Volume"}),a.jsx("span",{className:"ml-auto text-[13px] font-medium text-white/70",children:n.duration}),a.jsx("button",{type:"button",onClick:k,className:"text-white/90","aria-label":"Fullscreen",children:a.jsx(l5,{className:"h-5 w-5"})})]})]})]}),a.jsxs("div",{className:"px-1 pt-5 sm:px-2",children:[a.jsx("div",{className:"flex flex-wrap items-center gap-2",children:a.jsx("span",{className:"rounded-full bg-[#126BFF]/15 px-3 py-1 text-[12px] font-semibold text-[#7eb6ff] ring-1 ring-[#126BFF]/35",children:n.category})}),a.jsx("h3",{id:"portfolio-video-title",className:"mt-3 text-[22px] font-extrabold tracking-tight text-white sm:text-[26px]",children:n.title}),a.jsx("p",{className:"mt-2 max-w-2xl text-[14px] leading-6 text-white/70 sm:text-[15px]",children:n.description}),a.jsxs("button",{type:"button",onClick:_,className:"mt-5 inline-flex h-11 items-center gap-2 rounded-full bg-[#126BFF] px-5 text-[14px] font-semibold text-white shadow-[0_10px_24px_rgba(18,107,255,0.4)] transition hover:bg-[#2D7BFF]",children:[a.jsx(Gi,{className:"h-4 w-4 fill-white"}),"Watch Full Video"]})]})]})]})}function ew({item:n,onOpen:i,featured:o=!1,delay:c=0}){const[d,m]=Jp(),p=b.useRef(null),y=Kp(n.src),x=typeof n.poster!="string",f=y.kind==="youtube"?y.poster:x?"":n.poster,g=()=>{const w=p.current;w&&(w.muted=!0,w.play().catch(()=>{}))},v=()=>{const w=p.current;w&&w.pause()};return a.jsxs("button",{type:"button",ref:d,onClick:()=>i(n),onMouseEnter:g,onMouseLeave:v,className:`sc-video-card group text-left ${o?"sc-video-card--featured":""} ${m?"is-in":""}`,style:{transitionDelay:`${c}ms`},children:[a.jsxs("div",{className:`relative overflow-hidden ${o?"aspect-[16/9] sm:aspect-[21/10]":"aspect-[16/10]"} rounded-[22px] bg-[#061F46]`,children:[x&&y.kind!=="youtube"?a.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${n.tone}`,children:a.jsx("img",{src:n.poster,alt:"",className:"absolute inset-0 m-auto h-[72%] w-auto object-contain drop-shadow-[0_20px_40px_rgba(18,107,255,0.45)]"})}):y.kind==="file"?a.jsx("video",{ref:p,src:n.src,poster:f,muted:!0,loop:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 h-full w-full object-cover transition duration-500 group-hover:scale-[1.06]"}):a.jsx("img",{src:f,alt:"",className:"absolute inset-0 h-full w-full object-cover transition duration-500 group-hover:scale-[1.06]"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#031A3A] via-[#031A3A]/25 to-transparent"}),a.jsx("div",{className:"absolute inset-0 opacity-0 mix-blend-screen transition duration-500 group-hover:opacity-100",style:{background:"radial-gradient(circle at 50% 40%, rgba(124,58,237,0.28), transparent 55%)"}}),a.jsx("span",{className:"absolute bottom-3 left-3 rounded-md bg-black/55 px-2 py-0.5 text-[12px] font-semibold text-white backdrop-blur-sm",children:n.duration}),a.jsx("span",{className:"sc-play-pulse absolute left-1/2 top-1/2 flex h-14 w-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-white/15 ring-2 ring-white/70 backdrop-blur-md group-hover:bg-[#12
6006BFF]/80",children:a.jsx(Gi,{className:"ml-0.5 h-5 w-5 fill-white text-white"})}),o?a.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-5 sm:p-7",children:[a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-[0.18em] text-[#7eb6ff]",children:n.category}),a.jsx("p",{className:"mt-1 text-[22px] font-extrabold text-white sm:text-[28px]",children:n.title}),a.jsx("p",{className:"mt-2 max-w-lg text-[13px] leading-5 text-white/70 sm:text-[14px]",children:n.description})]}):null]}),o?null:a.jsxs("div",{className:"flex items-start justify-between gap-3 px-1 pt-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[16px] font-bold leading-snug text-[#071A38]",children:n.title}),a.jsx("p",{className:"mt-1 text-[13px] text-[#071A38]/55",children:n.category})]}),a.jsx("span",{className:"mt-0.5 inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-[#126BFF]/35 text-[#126BFF] transition group-hover:bg-[#126BFF] group-hover:text-white",children:a.jsx(Qy,{className:"h-4 w-4"})})]})]})}function tw(){const[n,i]=b.useState("all"),[o,c]=b.useState(null),d=b.useMemo(()=>n==="all"?xd:xd.filter(p=>{var y;return p.filter===n||((y=p.filters)==null?void 0:y.includes(n))}),[n]),m=xd[0];return a.jsxs(Pn,{children:[a.jsxs("div",{className:"sc-portfolio bg-[#031A3A] text-white",children:[a.jsxs("section",{className:"sc-hero relative overflow-hidden pb-16 pt-[116px] sm:pb-20 sm:pt-[124px]",children:[a.jsxs("svg",{className:"circuit-svg sc-circuit-move",viewBox:"0 0 1440 780",preserveAspectRatio:"xMidYMid slice","aria-hidden":!0,children:[a.jsx("defs",{children:a.jsxs("linearGradient",{id:"pfLine",x1:"0",y1:"0",x2:"1",y2:"1",children:[a.jsx("stop",{offset:"0%",stopColor:"#126BFF",stopOpacity:"0"}),a.jsx("stop",{offset:"50%",stopColor:"#2D7BFF",stopOpacity:"0.55"}),a.jsx("stop",{offset:"100%",stopColor:"#7c3aed",stopOpacity:"0"})]})}),a.jsx("path",{d:"M80 120 H280 V260 H480",fill:"none",stroke:"url(#pfLine)",strokeWidth:"1.4"}),a.jsx("path",{d:"M980 80 V220 H1240 V360",fill:"none",stroke:"url(#pfLine)",strokeWidth:"1.4"}),a.jsx("path",{d:"M60 520 H220 V640 H400 V720",fill:"none",stroke:"url(#pfLine)",strokeWidth:"1.2"}),a.jsx("path",{d:"M860 480 H1080 V600 H1320",fill:"none",stroke:"url(#pfLine)",strokeWidth:"1.2"}),a.jsx("path",{d:"M520 80 H640 V180 H760",fill:"none",stroke:"url(#pfLine)",strokeWidth:"1"}),a.jsx("circle",{cx:"280",cy:"120",r:"3.5",fill:"#2D7BFF",opacity:"0.8"}),a.jsx("circle",{cx:"1240",cy:"220",r:"3.5",fill:"#7c3aed",opacity:"0.7"}),a.jsx("circle",{cx:"1080",cy:"600",r:"3",fill:"#93C5FD",opacity:"0.55"})]}),a.jsx("div",{className:"sc-hero-glow","aria-hidden":!0}),a.jsx("div",{className:"sc-particles","aria-hidden":!0,children:Array.from({length:18}).map((p,y)=>a.jsx("span",{style:{"--i":y}},y))}),a.jsxs("div",{className:"relative z-10 mx-auto grid max-w-[1200px] items-center gap-10 px-5 lg:grid-cols-[1.05fr_0.95fr] lg:gap-4 lg:px-8",children:[a.jsx("div",{children:a.jsxs(vo,{children:[a.jsx("p",{className:"mb-3 inline-flex rounded-full bg-[#126BFF]/15 px-3 py-1 text-[12px] font-semibold tracking-wide text-[#7eb6ff] ring-1 ring-[#126BFF]/35",children:"Our Work"}),a.jsxs("h1",{className:"sc-text-reveal text-[36px] font-extrabold leading-[1.08] tracking-tight text-white sm:text-[52px] lg:text-[58px]",children:["See Our ",a.jsx("span",{className:"text-[#126BFF]",children:"Portfolio"}),a.jsx("br",{}),"in Action"]}),a.jsx("p",{className:"mt-5 max-w-xl text-[15px] leading-7 text-white/72 sm:text-[17px]",children:"Explore our latest projects, videos and animations that show how Hiil  makes charging easier, smarter and more accessible."})]})}),a.jsxs("div",{className:"relative mx-auto w-full max-w-[540px]",children:[a.jsx("div",{className:"sc-bank-orbit","aria-hidden":!0}),a.jsx("div",{className:"sc-portfolio-bank",children:a.jsx(mm,{className:"mx-auto w-full"})}),a.jsx("button",{type:"button",className:"sc-orbit-play",onClick:()=>c(m),"aria-label":"Watch featured video",children:a.jsx(Gi,{className:"ml-0.5 h-5 w-5 fill-white text-white"})}),a.jsx("span",{className:"sc-float-chip sc-float-chip--a",children:"Watch our videos"}),a.jsxs("span",{className:"sc-float-chip sc-float-chip--b",children:[a.jsx("span",{className:"mb-1 inline-flex h-7 w-7 items-center justify-center rounded-full bg-[#126BFF]/80",children:a.jsx(Gi,{className:"ml-px h-3 w-3 fill-white"})}),"Innovative Solutions",a.jsx("span",{className:"mt-1 block text-[11px] font-normal text-white/65",children:"Smart charging for a better tomorrow."})]})]})]})]}),a.jsx("section",{className:"relative bg-white px-5 pb-12 pt-10 text-[#071A38] transition-colors dark:bg-[#031A3A] dark:text-white lg:px-8",children:a.jsxs("div",{className:"mx-auto max-w-[1200px]",children:[a.jsx(vo,{children:a.jsx("div",{className:"flex flex-wrap gap-2.5",children:Jj.map(p=>a.jsx("button",{type:"button",onClick:()=>i(p.id),className:`sc-filter-pill ${n===p.id?"is-active":""}`,children:p.label},p.id))})}),a.jsx("div",{className:"mt-8 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",children:d.map((p,y)=>a.jsx(ew,{item:p,onOpen:c,delay:y*70},p.id))})]})}),a.jsx("section",{className:"bg-white px-5 py-16 text-[#071A38] transition-colors dark:bg-[#041F46] dark:text-white sm:py-20 lg:px-8",children:a.jsxs("div",{className:"mx-auto max-w-[1200px]",children:[a.jsxs(vo,{children:[a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-[0.18em] text-[#126BFF]",children:"Where we work"}),a.jsx("h2",{className:"mt-2 text-[28px] font-extrabold tracking-tight sm:text-[36px]",children:"Hiil Power Bank in the city"}),a.jsx("p",{className:"mt-3 max-w-2xl text-[15px] leading-7 text-[#071A38]/65 dark:text-white/65",children:"Stations across hospitals, malls, cafes, hotels, airports, and universities — ready when you need power."})]}),a.jsx("div",{className:"mt-10 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3",children:Kj.map((p,y)=>
600a.jsx(vo,{delay:y*60,children:a.jsxs("article",{className:"group overflow-hidden rounded-[22px] border border-[#031A3A]/08 bg-white shadow-[0_14px_36px_rgba(3,26,58,0.08)] dark:border-white/10 dark:bg-[#061F46]",children:[a.jsx("div",{className:"relative aspect-[16/11] overflow-hidden bg-[#EEF3FA] dark:bg-[#031A3A]",children:a.jsx("img",{src:p.image,alt:`${p.title} — Hiil Power Bank`,className:"h-full w-full object-cover transition duration-500 group-hover:scale-[1.04]",loading:"lazy"})}),a.jsxs("div",{className:"px-4 py-4",children:[a.jsx("h3",{className:"text-[17px] font-bold text-[#071A38] dark:text-white",children:p.title}),a.jsx("p",{className:"mt-1 text-[13px] text-[#071A38]/55 dark:text-white/55",children:p.caption})]})]})},p.id))})]})})]}),o?a.jsx(Wj,{item:o,onClose:()=>c(null)}):null]})}const Qi="somacharge_token",Ii="somacharge_user",Bd="somacharge-auth-change";function xm(){typeof window>"u"||window.dispatchEvent(new Event(Bd))}function Wp(n){return typeof window>"u"?()=>{}:(window.addEventListener(Bd,n),()=>window.removeEventListener(Bd,n))}const aw=["admin","staff"];function zn(n){return aw.includes(String(n||"").toLowerCase())}function Us(n){return n==="admin"?"Admin":n==="staff"?"Staff":n==="customer"?"Customer":""}function e1(){return localStorage.getItem(Qi)||sessionStorage.getItem(Qi)}function lw(n,i){if(!zn(i.role))throw ms(),new Error("Unknown role is not allowed. Only Admin or Staff can sign in.");localStorage.setItem(Qi,n),localStorage.setItem(Ii,JSON.stringify(i)),xm()}function ms(){localStorage.removeItem(Qi),localStorage.removeItem(Ii),sessionStorage.removeItem(Qi),sessionStorage.removeItem(Ii),xm()}function Fs(){const n=localStorage.getItem(Ii);if(!n)return null;try{const i=JSON.parse(n);return!(i!=null&&i.id)||!(i!=null&&i.name)||!zn(i.role)?(ms(),null):i}catch{return ms(),null}}function Od(){return!!(e1()&&Fs())}function Oh(n){if(!zn(n.role))throw ms(),new Error("Unknown role is not allowed.");localStorage.setItem(Ii,JSON.stringify(n)),xm()}function Uh(n){if(!n.startsWith("/api"))return[n];if(typeof window<"u"){const i=window.location.hostname;if(i!=="localhost"&&i!=="127.0.0.1")return[n]}return[n,"http://127.0.0.1:5000"+n]}async function t1(n,i){let o=null;const c=new AbortController,d=setTimeout(()=>c.abort(),12e3);try{for(const m of Uh(n))try{const p=await fetch(m,{...i,signal:c.signal});if((p.status===502||p.status===503||p.status===504)&&m===n&&Uh(n).length>1){o=new Error("Cannot reach the SomaCharge server. Make sure the backend is running.");continue}return p}catch(p){if(p instanceof DOMException&&p.name==="AbortError")throw new Error("Cannot reach the SomaCharge server. Make sure the backend is running.");o=new Error("Cannot reach the SomaCharge server. Make sure the backend is running.")}}finally{clearTimeout(d)}throw o||new Error("Cannot reach the SomaCharge server. Make sure the backend is running.")}async function a1(n,i){var m;const o=await t1(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),c=await o.text();let d=null;try{d=c?JSON.parse(c):null}catch{d=null}if(!o.ok||!(d!=null&&d.success)||!((m=d.data)!=null&&m.token)||!d.data.user){const p=o.status===401||o.status===400?"Invalid email or password.":"Cannot reach the SomaCharge server. Make sure the backend is running.";throw new Error((d==null?void 0:d.message)||p)}if(!zn(d.data.user.role))throw new Error("Unknown role is not allowed. Only Admin or Staff can sign in.");return d.data}async function _e(n,i={}){const o=e1(),c={};i.body&&(c["Content-Type"]="application/json"),o&&(c.Authorization=`Bearer ${o}`);const d=await t1(n,{method:i.method||"GET",headers:c,body:i.body?JSON.stringify(i.body):void 0}),m=await d.text();let p;try{p=m?JSON.parse(m):{}}catch{throw new Error("Cannot reach the SomaCharge server. Make sure the backend is running.")}if((d.status===401||d.status===403)&&ms(),!d.ok||(p==null?void 0:p.success)===!1)throw new Error((p==null?void 0:p.message)||"Cannot reach the SomaCharge server. Make sure the backend is running.");return p}function Mn(n){return n.split(" ").filter(Boolean).slice(0,2).map(i=>{var o;return((o=i[0])==null?void 0:o.toUpperCase())??""}).join("")||"SC"}function sw({children:n}){return Od()?n:a.jsx(_d,{to:"/signin",replace:!0})}function l1({onRetry:n}){return a.jsxs("div",{className:"relative flex min-h-screen flex-col overflow-hidden bg-[#031A3A] text-white",children:[a.jsx("div",{className:"pointer-events-none absolute inset-0",style:{background:"radial-gradient(ellipse 70% 50% at 15% 20%, rgba(18,107,255,0.18), transparent 55%), radial-gradient(ellipse 55% 45% at 90% 8
6000%, rgba(45,123,255,0.12), transparent 50%)"},"aria-hidden":!0}),a.jsxs("header",{className:"relative z-10 flex items-center justify-between gap-3 px-4 py-3 sm:px-6",children:[a.jsx(al,{variant:"header",className:"h-[40px] w-auto max-w-[150px]"}),a.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2 text-[11px] sm:text-[12px]",children:[a.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-[#126BFF]/40 bg-[#126BFF]/10 px-2.5 py-1 font-semibold text-[#9ec5ff]",children:[a.jsx(H5,{className:"h-3 w-3"}),"Disabled by Admin"]}),a.jsx("span",{className:"hidden h-3.5 w-px bg-white/25 sm:block","aria-hidden":!0}),a.jsx("span",{className:"text-white/65",children:"Staff users cannot bypass this setting."})]})]}),a.jsxs("main",{className:"relative z-10 flex flex-1 flex-col items-center justify-center px-4 pb-10 pt-4 text-center",children:[a.jsxs("div",{className:"relative mb-4",children:[a.jsx("div",{className:"absolute inset-[-10px] rounded-full border border-[#126BFF]/20","aria-hidden":!0}),a.jsx("div",{className:"absolute inset-[-20px] rounded-full border border-[#126BFF]/10","aria-hidden":!0}),a.jsxs("div",{className:"relative grid h-[72px] w-[72px] place-items-center rounded-full bg-[#061F46] ring-1 ring-[#126BFF]/30 sm:h-[80px] sm:w-[80px]",children:[a.jsx(qa,{className:"h-8 w-8 text-white sm:h-9 sm:w-9",strokeWidth:1.7}),a.jsx("span",{className:"absolute -bottom-0.5 -right-0.5 grid h-6 w-6 place-items-center rounded-full bg-[#ef4444] text-white ring-2 ring-[#031A3A]",children:a.jsx(Td,{className:"h-3 w-3"})})]})]}),a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-[#ef4444] px-2.5 py-0.5 text-[11px] font-semibold text-white",children:[a.jsx(Td,{className:"h-3 w-3"}),"System Mode"]}),a.jsxs("h1",{className:"mt-3 max-w-xl text-[22px] font-bold leading-snug tracking-tight sm:text-[26px]",children:["System Temporarily ",a.jsx("span",{className:"text-[#ef4444]",children:"Unavailable"})]}),a.jsx("p",{className:"mt-2 max-w-md text-[13px] leading-5 text-white/70",children:"The system is currently offline due to a technical problem or maintenance. Staff access has been temporarily disabled."}),a.jsxs("div",{className:"mt-5 flex w-full max-w-[400px] items-center gap-3 rounded-xl border border-[#126BFF]/35 bg-[#126BFF]/10 px-3.5 py-3 text-left",children:[a.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-full bg-[#126BFF] text-white",children:a.jsx(zl,{className:"h-4 w-4"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-[12.5px] font-semibold text-white",children:"Need assistance? Contact Support"}),a.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 text-[12.5px] font-semibold text-[#7eb6ff]",children:[a.jsx(Pa,{className:"h-3.5 w-3.5"}),"+252 618109573"]})]})]}),a.jsxs("button",{type:"button",onClick:n,className:"mt-5 inline-flex h-10 items-center gap-2 rounded-full bg-[#126BFF] px-5 text-[13px] font-semibold text-white transition hover:bg-[#2D7BFF]",children:[a.jsx(Xi,{className:"h-3.5 w-3.5"}),"Try Again"]}),a.jsxs("p",{className:"mt-5 inline-flex items-center gap-1.5 text-[11.5px] text-white/50",children:[a.jsx(xa,{className:"h-3.5 w-3.5"}),"System access will be restored after the problem is resolved."]})]})]})}function nw(){const n="/api/system-control/status";if(typeof window<"u"){const i=window.location.hostname;if(i!=="localhost"&&i!=="127.0.0.1")return[n]}return[n,`http://127.0.0.1:5000${n}`]}async function iw(){let n=null;for(const i of nw())try{const o=await fetch(i);if(!o.ok){n=new Error("Could not load system status");continue}return o}catch(o){n=o instanceof Error?o:new Error("Could not load system status")}throw n||new Error("Could not load system status")}const s1="hiil_system_control",Ud="hiil:system-control";function Zi(){var n,i,o;try{const c=JSON.parse(localStorage.getItem(s1)||"{}");return{systemOnline:typeof c.systemOnline=="boolean"?c.systemOnline:!0,notifyOnIssue:typeof c.notifyOnIssue=="boolean"?c.notifyOnIssue:!0,methods:{email:((n=c.methods)==null?void 0:n.email)!==!1,sms:((i=c.methods)==null?void 0:i.sms)!==!1,inApp:!!((o=c.methods)!=null&&o.inApp)}}}catch{return{systemOnline:!0,notifyOnIssue:!0,methods:{email:!0,sms:!0,inApp:!1}}}}function Hs(){return Zi().systemOnline!==!1}function n1(n){var i,o,c;return{systemOnline:!!(n!=null&&n.systemOnline),notifyOnIssue:!!(n!=null&&n.notifyOnIssue),methods:{email:!!((i=n==null?void 0:n.methods)!=null&&i.email),sms:!!((o=n==null?void 0:n.methods)!=null&&o.sms),inApp:!!((c=n==null?void 0:n.methods)!=null&&c.inApp)}}}function Bn(n){const i=n1(n);try{localStorage.setItem(s1,JSON.stringify(i))}catch{}return window.dispatchEvent(new CustomEvent(Ud,{detail:i})),i}async function Co(){var d;const i=await(await iw()).json(),o=((d=i==null?void 0:i.data)==null?void 0:d.systemOnline)!==!1,c=Zi();return Bn({...c,systemOnline:o})}async function Eo(){try{const n=await _e("/api/system-control"),i=(n==null?void 0:n.data)||n;return Bn(i)}catch{return Co()}}async function Hh(n){const i=n1(n);Bn(i);const o=await _e("/api/system-control",{method:"PUT",body:i}),c=(o==null?void 0:o.data)||i;return Bn(c)}function fm(n){if(typeof window>"u")return()=>{};const i=()=>n(Zi());return window.addEventListener(Ud,i),window.addEventListener("storage",i
600),()=>{window.removeEventListener(Ud,i),window.removeEventListener("storage",i)}}const rw=new Set(["/signin","/signup","/forgot-password"]);function ow({children:n}){const i=ha(),[o,c]=b.useState(()=>Fs()),[d,m]=b.useState(()=>Hs());b.useEffect(()=>Wp(()=>c(Fs())),[]),b.useEffect(()=>{const g=()=>m(Hs());Co().then(D=>m(D.systemOnline!==!1)).catch(g);const v=fm(D=>{m(D.systemOnline!==!1)}),w=window.setInterval(()=>{Co().then(D=>m(D.systemOnline!==!1)).catch(()=>{})},2500);return()=>{v(),window.clearInterval(w)}},[]);const y=String((o==null?void 0:o.role)||"").toLowerCase()==="admin",x=rw.has(i.pathname),f=()=>{Co().then(g=>m(g.systemOnline!==!1)).catch(()=>m(Hs()))};return!y&&!d&&!x?a.jsx(l1,{onRetry:f}):n}function cw({className:n="h-6 w-6"}){return a.jsx("svg",{viewBox:"0 0 24 24",className:n,fill:"currentColor","aria-hidden":!0,children:a.jsx("path",{d:"M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z"})})}const uw=[{icon:Ln,title:"QR Code Rental",text:"QR code-ka scan garee, Power Bank-kana isla markiiba qaado.",to:"/signin"},{icon:Xt,title:"Fast Charging",text:"Power banks quality bixinta fudud oo lagu kiciyay in la isticmaalo.",to:"/about"},{icon:xa,title:"Flexible Rental",text:"Kireyso inta aad rabto, oo bixi qiimaha saacadaha aad isticmaasho.",to:"/#pricing"},{icon:Dt,title:"Secure Payments",text:"Lacag bixintaada si fudud oo ammaan ah ugu samee EVC Plus.",to:"/signin"},{icon:cw,title:"Find Stations",text:"Raadi saldhigyada kuugu dhow oo hubi helitaanka Power Bank-ka waqtiga dhabta ah.",to:"/stations"},{icon:Pp,title:"Easy Return",text:"Power Bank-kaaga ku soo celi saldhig kasta oo Hiil Power ah.",to:"/stations"}],dw=[{n:"01",title:"Instant Access",text:"Power Bank-kaaga si degdeg ah u kireyso.",icon:Xt},{n:"02",title:"Safe & Reliable",text:"Xogtaada waa ammaan, lacag-bixintuna waa la ilaaliyaa.",icon:Dt},{n:"03",title:"24/7 Support",text:"Mar walba waan kuu joognaa si aan kuu caawino.",icon:zl}];function mw(){return a.jsxs(Pn,{children:[a.jsxs("section",{className:"sc-hero relative overflow-hidden bg-[#031A3A] px-5 pb-16 pt-[124px] text-center sm:px-8 sm:pt-[132px]",children:[a.jsxs("svg",{className:"circuit-svg",viewBox:"0 0 1440 520",preserveAspectRatio:"xMidYMid slice","aria-hidden":!0,children:[a.jsx("defs",{children:a.jsxs("linearGradient",{id:"serviceLine",x1:"0",y1:"0",x2:"1",y2:"1",children:[a.jsx("stop",{offset:"0%",stopColor:"#126BFF",stopOpacity:"0"}),a.jsx("stop",{offset:"50%",stopColor:"#2D7BFF",stopOpacity:"0.5"}),a.jsx("stop",{offset:"100%",stopColor:"#126BFF",stopOpacity:"0"})]})}),a.jsx("path",{d:"M90 100 H280 V200 H460",fill:"none",stroke:"url(#serviceLine)",strokeWidth:"1.3"}),a.jsx("path",{d:"M1000 80 V190 H1260 V300",fill:"none",stroke:"url(#serviceLine)",strokeWidth:"1.3"}),a.jsx("circle",{cx:"280",cy:"100",r:"3.5",fill:"#2D7BFF"}),a.jsx("circle",{cx:"1260",cy:"190",r:"3.5",fill:"#126BFF"})]}),a.jsx("div",{className:"sc-hero-glow","aria-hidden":!0}),a.jsxs("div",{className:"relative z-10 mx-auto max-w-[720px]",children:[a.jsxs("h1",{className:"text-[36px] font-extrabold tracking-tight text-white sm:text-[48px]",children:["Our ",a.jsx("span",{className:"text-[#126BFF]",children:"Services"})]}),a.jsx("p",{className:"mt-4 text-[16px] leading-7 text-white/75",children:"Power on. Stay connected. Rent power banks anytime, anywhere."})]})]}),a.jsxs("section",{className:"bg-white px-5 py-16 transition-colors dark:bg-[#031A3A] sm:px-8",children:[a.jsxs("div",{className:"mx-auto grid max-w-[1200px] items-stretch gap-8 lg:grid-cols-[1.15fr_0.85fr] lg:gap-10",children:[a.jsx("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3",children:uw.map(n=>{const i=n.icon;return a.jsxs("article",{className:"flex flex-col rounded-[18px] border border-slate-200 bg-white p-6 shadow-[0_10px_28px_rgba(15,40,90,0.05)] transition duration-300 hover:-translate-y-1 hover:shadow-[0_18px_40px_rgba(18,107,255,0.12)] dark:border-white/10 dark:bg-[#061F46]",children:[a.jsx("span",{className:"inline-flex h-12 w-12 items-center justify-center text-[#126BFF]",children:a.jsx(i,{className:"h-8 w-8"})}),a.jsx("h2",{className:"mt-4 text-[18px] font-bold text-[#071A38] dark:text-white",children:n.title}),a.jsx("p",{className:"mt-2 flex-1 text-[14px] leading-6 text-slate-500 dark:text-white/65",children:n.text}),a.jsx(et,{to:n.to,className:"mt-5 text-[14px] font-semibold text-[#126BFF]",children:"Learn More →"})]},n.title)})}),a.jsxs("aside",{className:"relative overflow-hidden rounded-[24px] bg-[#031A3A] px-7 py-8 text-white",children:[a.jsx("div",{className:"sc-hero-glow opacity-50","aria-hidden":!0}),a.jsxs("div",{className:"relative z-10",children:[a.jsxs("h2",{className:"text-[28px] font-extrabold leading-tight sm:text-[32px]",children:["Power on.",a.jsx("br",{}),"Stay ",a.jsx("span",{className:"text-[#126BFF]",children:"connected."})]}),a.jsx("p",{className:"mt-4 text-[14px] leading-7 text-white/70",children:"Power Bank-yada Hiil waxay qalabkaaga siinayaan koronto mar kasta, meel kasta. Degdeg. Ammaan. Lagu kalsoonaan karo. "}),a.jsx("ul",{className:"mt-6 space-y-4",children:dw.map(n=>{const i=n.icon;return a.jsxs("li",{className:"flex gap-3",children:[a.jsx("span",{className:"mt-0.5 inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(i,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[12px] font-semibold text-[#2D7BFF]",children:n.n}),a.jsx("p",{className:"text-[15px] font-bold",children:n.title}),a.jsx("p",{className:"text-[13px] text-white/65",children:n.text})]})]},n.n)})})]}),a.jsx("div",{className:"relative z-10 mt-4",children:a.jsx(mm,{size:"sm",className:"mx-auto w-[220px]"})})]})]}),a.jsxs("div",{className:"mx-auto mt-10 flex max-w-[1200px] flex-col items-start gap-5 rounded-[20px] border border-slate-200 bg-white p-6 shadow-[0_10px_28px_rgba(15,40,90,0.05)] dark:border-white/10 dark:bg-[#061F46] sm:flex-row sm:items-center sm:justify-between sm:px-8",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("span",{className:"inline-flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(Bp,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-[20px] font-bold text-[#071A38] dark:text-white",children:"Partner With Hiil Power"}),a.jsx("p",{className:"mt-1 max-w-xl text-[14px] leading-6 text-slate-500 dark:text-white/65",children:"Ganacsiyada waxay nala shuraakoobi karaan si ay u rakibaan saldhigyada Hiil Power oo ay uga helaan dakhli joogto ah."})]})]}),a.jsx(et,{to:"/contact",className:"inline-flex h-12 w-full shrink-0 items-center justify-center rounded-full bg-[#126BFF] px-6 text-[14px] font-semibold text-white hover:bg-[#2D7BFF] sm:w-auto",children:"Become a Partner →"})]})]})]})}const fd=[{id:"km4",name:"KM4 Road Station",address:"KM4 Road, Mogadishu",available:12,slots:8,open:!0,distance:1.2,lat:Ja.KM4.lat,lng:Ja.KM4.lng},{id:"jaziira",name:"Jaziira Station",address:"Jaziira, Mogadishu",available:8,slots:5,open:!0,distance:2.3,lat:2.0268,lng:45.2684},{id:"airport",name:"Airport Road Station",address:"Airport Road, Mogadishu",available:15,slots:10,open:!0,distance:3.7,lat:Ja.Airport.lat,lng:Ja.Airport.lng}
600,{id:"bakaaro",name:"Bakaaro Station",address:"Bakaaro Market, Mogadishu",available:6,slots:4,open:!0,distance:4.6,lat:Ja.Bakaaraha.lat,lng:Ja.Bakaaraha.lng},{id:"downtown",name:"Downtown Station",address:"Downtown, Mogadishu",available:9,slots:6,open:!0,distance:5.1,lat:Ja.Downtown.lat,lng:Ja.Downtown.lng},{id:"hamarweyne",name:"Hamarweyne Station",address:"Hamarweyne, Mogadishu",available:4,slots:3,open:!0,distance:5.8,lat:Ja.Hamarweyne.lat,lng:Ja.Hamarweyne.lng}],xw=[{n:"01",icon:Tt,title:"Find a Station",text:"Search and find the nearest SomaCharge station."},{n:"02",icon:Ln,title:"Scan QR Code",text:"Scan the QR code on the station to unlock a power bank."},{n:"03",icon:el,title:"Rent Power Bank",text:"Pick up your power bank and stay connected anywhere."}];function Fh({className:n="h-6 w-6"}){return a.jsx("svg",{viewBox:"0 0 24 24",className:n,fill:"currentColor","aria-hidden":!0,children:a.jsx("path",{d:"M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z"})})}function fw(){const[n,i]=b.useState(""),[o,c]=b.useState(""),[d,m]=b.useState({banks:!1,slots:!1,open:!1}),[p,y]=b.useState("km4"),[x,f]=b.useState(!1),[g,v]=b.useState(15),w=fd.find(k=>k.id===p)||fd[0],D=b.useMemo(()=>{const k=o.trim().toLowerCase();return fd.filter(_=>{const U=!k||_.name.toLowerCase().includes(k)||_.address.toLowerCase().includes(k),A=!d.banks||_.available>0,G=!d.slots||_.slots>0,E=!d.open||_.open;return U&&A&&G&&E})},[o,d]),C=x?D:D.slice(0,4);function T(k){k.preventDefault(),c(n),f(!1)}function S(){m({banks:!1,slots:!1,open:!1}),i(""),c("")}return a.jsxs(Pn,{children:[a.jsxs("section",{className:"sc-hero relative overflow-hidden px-5 pb-16 pt-[124px] text-center sm:px-8 sm:pt-[132px]",children:[a.jsxs("svg",{className:"circuit-svg",viewBox:"0 0 1440 520",preserveAspectRatio:"xMidYMid slice","aria-hidden":!0,children:[a.jsx("defs",{children:a.jsxs("linearGradient",{id:"stationLine",x1:"0",y1:"0",x2:"1",y2:"1",children:[a.jsx("stop",{offset:"0%",stopColor:"#126BFF",stopOpacity:"0"}),a.jsx("stop",{offset:"50%",stopColor:"#2D7BFF",stopOpacity:"0.5"}),a.jsx("stop",{offset:"100%",stopColor:"#126BFF",stopOpacity:"0"})]})}),a.jsx("path",{d:"M80 90 H260 V180 H420",fill:"none",stroke:"url(#stationLine)",strokeWidth:"1.3"}),a.jsx("path",{d:"M980 70 V180 H1240 V280",fill:"none",stroke:"url(#stationLine)",strokeWidth:"1.3"}),a.jsx("path",{d:"M120 320 H300 V400 H480",fill:"none",stroke:"url(#stationLine)",strokeWidth:"1.1"}),a.jsx("circle",{cx:"260",cy:"90",r:"3.5",fill:"#2D7BFF"}),a.jsx("circle",{cx:"1240",cy:"180",r:"3.5",fill:"#126BFF"})]}),a.jsx("div",{className:"sc-hero-glow","aria-hidden":!0}),a.jsxs("div",{className:"relative z-10 mx-auto max-w-[760px]",children:[a.jsxs("h1",{className:"text-[36px] font-extrabold tracking-tight text-white sm:text-[48px]",children:["Find a Station ",a.jsx("span",{className:"text-[#126BFF]",children:"Near You"})]}),a.jsx("p",{className:"mt-4 text-[16px] leading-7 text-white/75",children:"Locate the nearest SomaCharge power bank station and check real-time availability."})]})]}),a.jsx("section",{className:"bg-[#F5F8FC] px-5 py-12 sm:px-8",children:a.jsxs("div",{className:"mx-auto grid max-w-[1200px] gap-8 lg:grid-cols-[0.95fr_1.05fr] lg:gap-10",children:[a.jsxs("div",{children:[a.jsxs("form",{onSubmit:T,className:"flex overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_10px_28px_rgba(15,40,90,0.05)]",children:[a.jsxs("label",{className:"relative min-w-0 flex-1",children:[a.jsx(qs,{className:"pointer-events-none absolute left-4 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"}),a.jsx("input",{value:n,onChange:k=>i(k.target.value),className:"h-12 w-full border-0 bg-transparent pl-11 pr-3 text-[14px] text-[#071A38] outline-none placeholder:text-slate-400",placeholder:"Search by station, area or location"})]}),a.jsx("button",{type:"submit",className:"h-12 shrink-0 bg-[#126BFF] px-5 text-[14px] font-semibold text-white hover:bg-[#2D7BFF]",children:"Search"})]}),a.jsxs("div",{className:"mt-5 flex flex-wrap items-center justify-between gap-3",children:[a.jsx("p",{className:"text-[13px] font-semibold text-[#071A38]",children:"Filters"}),a.jsx("button",{type:"button",onClick:S,className:"text-[13px] font-medium text-[#126BFF]",children:"Clear All"})]}),a.jsx("div",{className:"mt-3 flex flex-wrap gap-4 text-[13px] text-[#071A38]",children:[{key:"banks",label:"Available Power Banks"},{key:"slots",label:"Available Slots"},{key:"open",label:"Open Now"}].map(k=>a.jsxs("label",{className:"inline-flex cursor-pointer items-center gap-2",children:[a.jsx("input",{type:"checkbox",checked:d[k.key],onChange:()=>m(_=>({..._,[k.key]:!_[k.key]}
600)),className:"h-4 w-4 rounded border-slate-300 text-[#126BFF] accent-[#126BFF]"}),k.label]},k.key))}),a.jsx("ul",{className:"mt-6 space-y-4",children:C.map(k=>{const _=k.id===p;return a.jsx("li",{className:`rounded-[20px] border bg-white p-4 shadow-[0_10px_28px_rgba(15,40,90,0.05)] transition hover:-translate-y-0.5 hover:shadow-[0_16px_36px_rgba(18,107,255,0.1)] ${_?"border-[#126BFF]":"border-slate-200"}`,children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"mt-0.5 inline-flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-[#126BFF] text-white shadow-[0_8px_16px_rgba(18,107,255,0.28)]",children:a.jsx(Fh,{className:"h-6 w-6"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-bold text-[#071A38]",children:k.name}),a.jsx("p",{className:"mt-0.5 text-[13px] text-slate-500",children:k.address})]}),a.jsx("button",{type:"button",onClick:()=>y(k.id),className:"inline-flex h-9 items-center rounded-full bg-[#126BFF] px-4 text-[13px] font-semibold text-white hover:bg-[#2D7BFF]",children:"View Details"})]}),a.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-[13px]",children:[a.jsxs("span",{className:"font-medium text-[#071A38]",children:[k.available," Available"]}),a.jsx("span",{className:"rounded-full bg-emerald-50 px-2.5 py-0.5 text-[12px] font-semibold text-emerald-600",children:"Open"}),a.jsxs("span",{className:"text-slate-500",children:[k.distance," km away"]})]})]})]})},k.id)})}),!x&&D.length>4?a.jsxs("button",{type:"button",onClick:()=>f(!0),className:"mt-5 inline-flex w-full items-center justify-center gap-1 text-[14px] font-semibold text-[#126BFF]",children:["Load More Stations",a.jsx(qi,{className:"h-4 w-4"})]}):null]}),a.jsxs("div",{className:"relative min-h-[520px] overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_16px_40px_rgba(15,40,90,0.08)] lg:min-h-[640px]",children:[a.jsx("iframe",{title:"SomaCharge stations map",className:"absolute inset-0 h-full w-full border-0",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",src:zo(w.lat,w.lng,g)}),a.jsx("div",{className:"pointer-events-none absolute inset-0 z-[1]",children:[{id:"km4",x:"52%",y:"42%"},{id:"jaziira",x:"28%",y:"58%"},{id:"airport",x:"38%",y:"72%"},{id:"bakaaro",x:"62%",y:"36%"}].map(k=>{const _=k.id===p;return a.jsxs("span",{className:`absolute -translate-x-1/2 -translate-y-full drop-shadow-[0_6px_10px_rgba(18,107,255,0.45)] ${_?"text-[#126BFF]":"text-[#2D7BFF]"}`,style:{left:k.x,top:k.y},children:[_?a.jsx("span",{className:"absolute left-1/2 top-[70%] h-10 w-10 -translate-x-1/2 -translate-y-1/2 rounded-full bg-[#126BFF]/25"}):null,a.jsx(Fh,{className:_?"h-11 w-11":"h-8 w-8"})]},k.id)})}),a.jsxs("div",{className:"pointer-events-none absolute left-4 top-4 z-10 w-[min(280px,calc(100%-2rem))] rounded-2xl bg-white p-4 shadow-[0_12px_30px_rgba(15,40,90,0.16)]",children:[a.jsx("p",{className:"text-[15px] font-bold text-[#071A38]",children:w.name}),a.jsxs("p",{className:"mt-1 text-[13px] text-slate-600",children:[w.available," Available Power Banks"]}),a.jsxs("p",{className:"mt-0.5 text-[13px] text-slate-500",children:[w.distance," km away"]}),a.jsxs("a",{href:zd(w.lat,w.lng),target:"_blank",rel:"noreferrer",className:"pointer-events-auto mt-3 inline-flex items-center gap-1 text-[13px] font-semibold text-[#126BFF]",children:["Get Directions",a.jsx(Ad,{className:"h-3.5 w-3.5"})]})]}),a.jsxs("div",{className:"absolute bottom-4 right-4 z-10 flex flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-md",children:[a.jsx("button",{type:"button",className:"grid h-10 w-10 place-items-center text-[#071A38] hover:bg-slate-50",onClick:()=>v(k=>Math.min(18,k+1)),"aria-label":"Zoom in",children:a.jsx(Ys,{className:"h-4 w-4"})}),a.jsx("button",{type:"button",className:"grid h-10 w-10 place-items-center border-t border-slate-200 text-[#071A38] hover:bg-slate-50",onClick:()=>v(k=>Math.max(12,k-1)),"aria-label":"Zoom out",children:a.jsx(c5,{className:"h-4 w-4"})}),a.jsx("button",{type:"button",className:"grid h-10 w-10 place-items-center border-t border-slate-200 text-[#126BFF] hover:bg-slate-50","aria-label":"Current location",onClick:()=>{y("km4"),v(16)},children:a.jsx(Qv,{className:"h-4 w-4"})})]})]})]})}),a.jsx("section",{className:"bg-white px-5 py-16 sm:px-8",children:a.jsxs("div",{className:"mx-auto max-w-[1200px]",children:[a.jsx("h2",{className:"text-center text-[30px] font-bold text-[#071A38]",children:"How to Find & Rent"}),a.jsxs("div",{className:"relative mt-12 grid grid-cols-1 gap-10 md:grid-cols-3 md:gap-8",children:[a.jsx("div",{className:"pointer-events-none absolute left-[16%] right-[16%] top-[28px] hidden border-t-[3px] border-dotted border-slate-200 md:block"}),xw.map(k=>{const _=k.icon;return a.jsxs("div",{className:"relative z-10 flex flex-col items-center text-center",children:[a.jsx("span",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-[#126BFF] text-white",children:a.jsx(_,{className:"h-6 w-6"})}),a.jsx("p",{className:"mt-4 text-[13px] font-semibold text-[#2D7BFF]",children:k.n}),a.jsx("h3",{className:"mt-1 text-[18px] font-bold text-[#071A38]",children:k.title}),a.jsx("p",{className:"mt-2 max-w-[240px] text-[14px] leading-6 text-slate-500",children:k.text})]},k.n)})]})]})})]})}function $h(n,i){const o=String(n||"").toLowerCase();return/\bweek/.test(o)||/\bdays?\b/.test(o)?!0:Number(i)>=1440}function On(n){return n==="Locked"||n==="Active"?"In Use":n||""}function Xo(n,{durationLabel:i,durationMinutes:o}={}){if(!n)return{text:i||"—",kind:$h(i,o)?"membership":"hourly"};const c=new Date(n).getTime()-Date.now(),d=$h(i,o);if(c<=0)return{text:"Waqtiga dhamaaday",kind:d?"membership":"hourly"};const m=Math.floor(c/36e5),p=Math.floor(c%36e5/6e4),y=Math.floor(c%6e4/1e3),x=d?"membership":"hourly";return{text:`${m}:${String(p).padStart(2,"0")}
600:${String(y).padStart(2,"0")}`,kind:x}}const i1="somacharge_notifications_v1",qh="somacharge_notifications_boot_v2",r1="somacharge_notifications_deleted_v2",Bo="somacharge:notifications-updated";function St(){if(typeof window>"u")return[];try{const n=localStorage.getItem(i1);if(!n)return[];const i=JSON.parse(n),o=Array.isArray(i)?u1(i):[],c=new Set(hm());return o.filter(d=>!Hd(d,c))}catch{return[]}}function hm(){if(typeof window>"u")return[];try{const n=localStorage.getItem(r1);if(!n)return[];const i=JSON.parse(n);return Array.isArray(i)?i:[]}catch{return[]}}function o1(n){if(typeof window>"u")return;const i=new Set(hm());n.filter(Boolean).forEach(o=>i.add(String(o))),localStorage.setItem(r1,JSON.stringify([...i]))}function Hd(n,i){var c;if(!n||i.has(String(n.id||""))||(c=n.meta)!=null&&c.paymentId&&i.has(String(n.meta.paymentId)))return!0;const o=pm(n);return!!(o&&i.has(o))}function Yn(n,i){typeof window>"u"||(localStorage.setItem(i1,JSON.stringify(n)),window.dispatchEvent(new CustomEvent(Bo,{detail:{item:i||null,rows:n}})))}function c1(){return new Date().toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Ph(n){var i;return[n.type,((i=n.meta)==null?void 0:i.paymentId)||"",n.title,n.message].join("|")}const hw=900*1e3;function Fd(n){var y,x,f,g;const i=String(((y=n.meta)==null?void 0:y.phone)||"").replace(/\D/g,""),o=String(((x=n.meta)==null?void 0:x.user)||"").trim().toLowerCase(),c=Number(((f=n.meta)==null?void 0:f.amount)||0).toFixed(2),d=String(((g=n.meta)==null?void 0:g.powerBank)||"").trim(),m=i||o,p=Math.floor((Number(n.createdAtMs)||0)/hw);return`failed|${m}|${c}|${d}|${p}`}function pm(n){var i,o;return n?n.type==="failed"?Fd(n):(i=n.meta)!=null&&i.paymentId?`${n.type}|id|${n.meta.paymentId}`:n.type==="customer"&&((o=n.meta)!=null&&o.customerId)?`customer|id|${n.meta.customerId}`:String(n.id||""):""}function pw(n,i){const o=new Map;for(const c of i)c!=null&&c.id&&o.set(String(c.id),c);for(const c of n){const d=o.get(c.id);o.set(c.id,d?{...c,read:!!d.read}:c)}return u1([...o.values()]).sort((c,d)=>(d.createdAtMs||0)-(c.createdAtMs||0)).slice(0,80)}function u1(n=[]){const i=new Set,o=[],c=[...n].sort((d,m)=>(m.createdAtMs||0)-(d.createdAtMs||0));for(const d of c){const m=pm(d);!m||i.has(m)||(i.add(m),o.push(d))}return o}function $d(n){return`PAY-${n}`}function bw(n){const i=new Date(n.createdAt||n.date||Date.now());return Number.isNaN(i.getTime())?{createdAt:c1(),createdAtMs:Date.now()}:{createdAt:i.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),createdAtMs:i.getTime()}}function gw(n){const i=String((n==null?void 0:n.id)||(n==null?void 0:n.paymentId)||(n==null?void 0:n.transactionId)||"").trim(),o=n==null?void 0:n.status;if(!i||o!=="Successful"&&o!=="Failed"&&o!=="Lost")return null;const c=String(n.fullName||n.user||n.customerName||"").trim()||"Customer",d=Number(n.amount||0),m=n.powerBank||"PB",p=o==="Successful",y=/waqtiga|time ended|reminder/i.test(String(n.method||n.durationLabel||n.failureReason||"")),x=p&&!y&&(d===0||/free/i.test(String(n.method||n.durationLabel||"")));return{id:$d(i),type:y?"reminder":p?"payment":"failed",title:y?"Xasuusin":x?"Free rental":p?"Payment received":o==="Lost"?"Payment lost":"Payment failed",message:y?`${c} — waqtiga waa uu dhamaaday · ${m}`:p?x?`${c} free ayuu ku qaatay · ${m}`:`${c} paid $${d.toFixed(2)} · ${m}`:`${c} · $${d.toFixed(2)} ${o.toLowerCase()} · ${m}`,meta:{paymentId:i,status:o,amount:Number(n.amount||0),user:c,phone:n.phone||n.phoneNumber||"",powerBank:m,location:n.location||"",method:n.method||"",reference:n.reference||"",transactionId:n.transactionId||"",durationLabel:n.durationLabel||"",orderId:n.orderId||"",failureReason:n.failureReason||"",date:n.date||""},read:!1,...bw(n)}}function d1(n=[]){const i=St();if(!Array.isArray(n)||n.length===0)return i;const o=new Set(hm()),c=n.map(gw).filter(Boolean).filter(x=>!Hd(x,o)),d=pw(c,i).filter(x=>!Hd(x,o)),m=new Set(i.map(x=>x.id)),p=d.filter(x=>(x.type==="payment"||x.type==="failed")&&!m.has(x.id)),y=typeof window<"u"&&localStorage.getItem(qh)==="1";return Yn(d,y&&p[0]||null),y?(p.slice(1,4).forEach(x=>{window.dispatchEvent(new CustomEvent(Bo,{detail:{item:x,rows:d}}))}),d):(typeof window<"u"&&localStorage.setItem(qh,"1"),d)}async function yw(){var n;try{const i=await _e("/api/payments?includeReminders=1"),o=((n=i==null?void 0:i.data)==null?void 0:n.payments)??(i==null?void 0:i.payments)??[];return d1(Array.isArray(o)?o:[])}catch{return St()}}function Un({type:n,title:i,message:o,meta:c}){const d=St(),m={type:n,title:i,message:o,meta:c||{}},p=Ph(m),y=m.type==="failed"?Fd({...m,createdAtMs:Date.now()}):"",x=d.find(g=>{var w,D,C,T;return m.type==="payment"&&((w=m.meta)!=null&&w.paymentId)?((D=g.meta)==null?void 0:D.paymentId)===m.meta.paymentId||g.id===$d(m.meta.paymentId):m.type==="customer"&&((C=m.meta)!=null&&C.customerId)?((T=g.meta)==null?void 0:T.customerId)===m.meta.customerId||g.id===`CUS-${m.meta.customerId}`:y&&g.type==="failed"&&Fd(g)===y?!0:m.type==="failed"?!1:Date.now()-(g.createdAtMs||0)<4e3&&Ph(g)===p});if(x)return x;const f={id:c!=null&&c.paymentId?$d(c.paymentId):c!=null&&c.customerId?`CUS-${c.customerId}`:`NTF-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,...m,read:!1,createdAt:c1(),createdAtMs:Date.now()};return d.some(g=>g.id===f.id)?d.find(g=>g.id===f.id):(Yn([f,...d].slice(0,80),f),f)}function Oo(n){const i=Number(n.amount||0),o=n.user||"Customer",c=n.powerBank||"PB";if(/reminder|waqtiga/i.test(String(n.method||n.durationLabel||"")))return Un({type:"reminder",title:"Xasuusin",message:`${o} — waqtiga waa uu dhamaaday · ${c}`,meta:{paymentId:n.id,status:"Successful",amount:i,user:o,phone:n.phone||"",powerBank:c,method:n.method||"Reminder"}});const m=i===0||/free/i.test(String(n.method||""));return Un({type:"payment",title:m?"Free rental":"Payment received",message:m?`${o} free ayuu ku qaatay · ${c}`:`${o} paid $${i.toFixed(2)} · ${c}`,meta:{paymentId:n.id,status:"Successful",amount:i,user:o,phone:n.phone||"",powerBank:c,method:n.method||""}})}function bm(n){return Un({type:"failed",title:"Payment failed",message:`${n.user||"Customer"} · $${Number(n.amount||0).toFixed(2)} failed · ${n.powerBank||"PB"}`,meta:{paymentId:n.id,status:"Failed",amount:Number(n.amount||0),user:n.user||"Customer",phone:n.phone||"",powerBank:n.powerBank||"PB"}})}function m1({name:n,email:i,role:o}){return Un({type:"register",title:"New registration",message:`${n||"User"} registered${i?` (${i})`:""}${o?` · ${o}`:""}`,meta:{email:i,role:o}})}function vw({id:n,name:i,phone:o,powerSerial:c}){const d=String(i||"").trim()||"Customer",m=String(o||"").trim(),p=String(c||"").trim();return Un({type:"customer",title:"New customer",message:[d,m,p].filter(
600Boolean).join(" · "),meta:{customerId:String(n||"").trim(),user:d,phone:m,powerSerial:p,role:"customer"}})}const hd="somacharge_known_customers_v1",Yh="somacharge_customers_boot_v1";function jw(n=[]){const i=(Array.isArray(n)?n:[]).filter(m=>String((m==null?void 0:m.role)||"").toLowerCase()==="customer"&&(m==null?void 0:m.id));if(typeof window>"u")return St();let o=[];try{const m=localStorage.getItem(hd);o=m?JSON.parse(m):[],Array.isArray(o)||(o=[])}catch{o=[]}const c=new Set(o.map(String));if(!(localStorage.getItem(Yh)==="1"))return localStorage.setItem(hd,JSON.stringify(i.map(m=>String(m.id)))),localStorage.setItem(Yh,"1"),St();for(const m of i){const p=String(m.id);c.has(p)||(c.add(p),vw({id:p,name:m.name,phone:m.phone,powerSerial:m.powerSerial}))}return localStorage.setItem(hd,JSON.stringify([...c])),St()}function ww({name:n,phone:i,body:o,via:c,delivered:d}){const m=String(o||"").trim();return Un({type:"sent",title:n?`WhatsApp to ${n}`:"WhatsApp sent",message:m,meta:{user:n||"",phone:i||"",body:m,status:"Sent",via:c||"whatsapp",delivered:!!d}})}function x1(n=St()){return n.filter(i=>!i.read).length}function pd(n){const i=St().map(o=>o.id===n?{...o,read:!0}:o);return Yn(i,null),i}function Nw(){const n=St().map(i=>({...i,read:!0}));return Yn(n,null),n}function f1(n=[]){var o;const i=[];for(const c of n){c!=null&&c.id&&i.push(c.id),(o=c==null?void 0:c.meta)!=null&&o.paymentId&&i.push(String(c.meta.paymentId));const d=pm(c);d&&i.push(d)}return i}function Sw(n){const i=St(),o=i.find(d=>d.id===n);o1(f1(o?[o]:[{id:n}]));const c=i.filter(d=>d.id!==n);return Yn(c,null),c}function kw(){const n=St();return o1(f1(n)),Yn([],null),[]}function _w(){typeof window>"u"||!("Notification"in window)||Notification.permission==="default"&&Notification.requestPermission().catch(()=>{})}function Cw(n){var i;if(!(typeof window>"u"||!n||!("Notification"in window))&&Notification.permission==="granted"&&document.visibilityState!=="visible")try{const o=new Notification(n.title,{body:n.message,tag:String(((i=n.meta)==null?void 0:i.paymentId)||n.id),icon:"/logo.png"});o.onclick=()=>{window.focus(),o.close()}}catch{}}function h1(n){if(typeof window>"u")return()=>{};const i=o=>{var p;const c=St(),m=((p=o==null?void 0:o.detail)==null?void 0:p.item)||null||(c[0]&&Date.now()-(c[0].createdAtMs||0)<2e4?c[0]:null);n(c,m)};return window.addEventListener(Bo,i),window.addEventListener("storage",i),()=>{window.removeEventListener(Bo,i),window.removeEventListener("storage",i)}}function Ew(n){return n==="payment"?"bg-emerald-50 text-emerald-600":n==="customer"?"bg-sky-50 text-sky-600":n==="reminder"?"bg-amber-50 text-amber-600":n==="failed"?"bg-rose-50 text-rose-600":n==="sent"?"bg-violet-50 text-violet-600":"bg-blue-50 text-[#2f6bff]"}function Aw({type:n}){return n==="payment"?a.jsx(Ut,{className:"h-4 w-4"}):n==="reminder"?a.jsx(Vo,{className:"h-4 w-4"}):n==="failed"?a.jsx(cm,{className:"h-4 w-4"}):n==="sent"?a.jsx(um,{className:"h-4 w-4"}):a.jsx(Dd,{className:"h-4 w-4"})}function Mw({hidden:n,onOpenInbox:i}){const[o,c]=b.useState([]),d=b.useRef(new Set),m=b.useRef(new Map);b.useEffect(()=>{St().forEach(x=>d.current.add(x.id));const y=h1((x,f)=>{if(!(f!=null&&f.id)||d.current.has(f.id))return;d.current.add(f.id),Cw(f),c(v=>[f,...v.filter(w=>w.id!==f.id)].slice(0,4));const g=window.setTimeout(()=>{c(v=>v.filter(w=>w.id!==f.id)),m.current.delete(f.id)},6500);m.current.set(f.id,g)});return()=>{y(),m.current.forEach(x=>window.clearTimeout(x)),m.current.clear()}},[]);function p(y){const x=m.current.get(y);x&&window.clearTimeout(x),m.current.delete(y),c(f=>f.filter(g=>g.id!==y))}return n||o.length===0?null:a.jsx("div",{className:"pointer-events-none fixed bottom-5 left-[268px] z-[90] flex w-[min(100%-2rem,360px)] flex-col gap-2.5","aria-live":"polite",children:o.map(y=>a.jsxs("div",{className:"pointer-events-auto flex w-full items-start gap-3 rounded-2xl border border-slate-100 bg-white p-3 shadow-[0_16px_40px_rgba(15,40,90,0.18)]",children:[a.jsxs("button",{type:"button",onClick:()=>{p(y.id),i==null||i(y)},className:"flex min-w-0 flex-1 items-start gap-3 text-left",children:[a.jsx("span",{className:`mt-0.5 grid h-9 w-9 shrink-0 place-items-center rounded-full ${Ew(y.type)}`,children:a.jsx(Aw,{type:y.type})}),a.jsxs("span",{className:"min-w-0 flex-1",children:[a.jsx("span",{className:"block text-[13px] font-semibold text-slate-900",children:y.title}),a.jsx("span",{className:"mt-0.5 block text-[12px] leading-snug text-slate-500",children:y.message}),a.jsx("span",{className:"mt-1 block text-[10px] text-slate-400",children:y.createdAt})]})]}),a.jsx("button",{type:"button",onClick:()=>p(y.id),className:"grid h-7 w-7 shrink-0 place-items-center rounded-full text-slate-400 hover:bg-slate-100 hover:text-slate-600","aria-label":"Dismiss message",children:a.jsx(Gt,{className:"h-3.5 w-3.5"})})]},y.id))})}function fa({label:n,value:i,icon:o,tone:c,delta:d,positive:m=!0,valueClassName:p=""}){const y=m?Gp:Rd;return a.jsx("article",{className:"box-border flex h-full min-h-[78px] min-w-0 
600w-full flex-col justify-center rounded-xl border border-slate-100 bg-white px-3 py-2.5 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("div",{className:`grid h-9 w-9 shrink-0 place-items-center rounded-lg ${c}`,children:a.jsx(o,{className:"h-4 w-4"})}),a.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[a.jsx("p",{className:"truncate text-[11px] font-medium leading-tight text-slate-500",children:n}),a.jsxs("div",{className:"mt-1 flex items-end justify-between gap-1.5",children:[a.jsx("p",{className:p||"truncate text-[18px] font-bold leading-none tracking-tight text-slate-900",children:i}),d?a.jsxs("p",{className:`mb-0.5 flex shrink-0 items-center gap-0.5 text-[10px] font-medium ${m?"text-emerald-500":"text-rose-500"}`,children:[a.jsx(y,{className:"h-3 w-3"}),a.jsx("span",{className:"max-w-[64px] truncate",children:d})]}):null]})]})]})})}function ll({cols:n=5,children:i}){return a.jsx("section",{className:"grid w-full gap-2.5",style:{gridTemplateColumns:`repeat(${n}, minmax(0, 1fr))`},children:i})}const Vh=["bg-blue-600","bg-violet-600","bg-emerald-600","bg-orange-500","bg-sky-600","bg-rose-500","bg-indigo-600","bg-teal-600"],Rw=["In Use","Returned","Cancelled"];function Tw(n){let i=0;for(let o=0;o<n.length;o+=1)i=n.charCodeAt(o)+((i<<5)-i);return Vh[Math.abs(i)%Vh.length]}function Gh(n){return`$${Number(n||0).toFixed(2)}`}function Dw(n){if(!n)return"";const i=new Date(n);return Number.isNaN(i.getTime())?String(n):i.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}function Xh({status:n}){const i=On(n)||n,o={Active:"bg-orange-50 text-orange-500","In Use":"bg-orange-50 text-orange-500",Returned:"bg-teal-50 text-teal-600",Cancelled:"bg-slate-100 text-slate-500"};return a.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold ${o[i]??"bg-slate-100 text-slate-600"}`,children:i})}function Lw({showDuration:n=!1}){const[i,o]=b.useState(""),[c,d]=b.useState("all"),[m,p]=b.useState("all"),[y,x]=b.useState([]),[f,g]=b.useState([]),[v,w]=b.useState(null),[D,C]=b.useState(!0),[T,S]=b.useState(""),[k,_]=b.useState(null),[U,A]=b.useState(null),G=b.useCallback(async(B=!1)=>{var W,re;B||C(!0),S("");try{const V=new URLSearchParams;i.trim()&&V.set("search",i.trim()),c!=="all"&&V.set("status",c),m!=="all"&&V.set("location",m);const oe=V.toString(),O=oe?`/api/marches?${oe}`:"/api/marches",[Q,ae]=await Promise.all([_e("/api/marches/stats"),_e(O)]);w(Q.data),x(((W=ae.data)==null?void 0:W.orders)??[]),g(((re=ae.data)==null?void 0:re.locations)??[])}catch(V){S(V instanceof Error?V.message:"Failed to load rental orders"),B||x([])}finally{C(!1)}},[i,c,m]);b.useEffect(()=>{const B=setTimeout(()=>{G(!1)},i?300:0),W=window.setInterval(()=>G(!0),4e3);return()=>{clearTimeout(B),window.clearInterval(W)}},[G,i]);const E=b.useMemo(()=>v?[{label:"Total Rentals",value:v.totalRentals.value.toLocaleString(),delta:v.totalRentals.delta,icon:Ll,tone:"bg-blue-50 text-blue-600",positive:!v.totalRentals.delta.startsWith("-")},{label:"Active Power Banks",value:v.activePowerBanks.value.toLocaleString(),delta:v.activePowerBanks.delta,icon:Xt,tone:"bg-emerald-50 text-emerald-600",positive:!v.activePowerBanks.delta.startsWith("-")},{label:"Total Revenue",value:Gh(v.totalRevenue.value),delta:v.totalRevenue.delta,icon:fs,tone:"bg-violet-50 text-violet-600",positive:!v.totalRevenue.delta.startsWith("-")},{label:"Total Customers",value:v.totalCustomers.value.toLocaleString(),delta:v.totalCustomers.delta,icon:sa,tone:"bg-orange-50 text-orange-500",positive:!v.totalCustomers.delta.startsWith("-")}]:[{label:"Total Rentals",value:"—",delta:"",icon:Ll,tone:"bg-blue-50 text-blue-600"},{label:"Active Power Banks",value:"—",delta:"",icon:Xt,tone:"bg-emerald-50 text-emerald-600"},{label:"Total Revenue",value:"—",delta:"",icon:fs,tone:"bg-violet-50 text-violet-600"},{label:"Total Customers",value:"—",delta:"",icon:sa,tone:"bg-orange-50 text-orange-500"}],[v]),[z,K]=b.useState(0);b.useEffect(()=>{const B=window.setInterval(()=>K(W=>W+1),1e3);return()=>window.clearInterval(B)},[]);const ie=b.useMemo(()=>{const B=W=>W==="In Use"||W==="Active"||W==="Locked"?0:2;return[...y].sort((W,re)=>{const V=B(W.status)-B(re.status);return V!==0?V:new Date(re.createdAt||0).getTime()-new Date(W.createdAt||0).getTime()}).map(W=>{const re=String(W.fullName||W.customerName||W.customer||"").trim(),V=!re||/^hormuud customer$/i.test(re)?"—":re,oe=W.status==="In Use"||W.status==="Active"||W.status==="Locked";return{...W,customer:V,initials:Mn(V==="—"?W.phone||"SC":V),color:Tw(V==="—"?W.phone||"SC":V),amountLabel:Gh(W.amount),dateLabel:Dw(W.createdAt),current:oe,timeLabel:W.status==="Returned"||W.status==="Cancelled"?"Ended":Xo(W.dueAt,{status:W.status,durationLabel:W.durationLabel,durationMinutes:W.durationMinutes}).text}})},[y,z]);async function ce(B){A(B.id),S("");try{await _e(`/api/marches/${B.id}`,{method:"DELETE"}),x(re=>re.filter(V=>V.id!==B.id)),(k==null?void 0:k.id)===B.id&&_(null);const W=await _e("/api/marches/stats");w(W.data)}catch(W){S(W instanceof Error?W.message:"Failed to delete order")}finally{A(null)}}return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[a.jsxs("button",{type:"button",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(el,{className:"h-3.5 w-3.5"}),"Power Banks"]}),a.jsxs("button",{type:"button",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(Ev,{className:"h-3.5 w-3.5"}),"Reports"]})]}),T?a.jsx("div",{className:"rounded-xl border border-red-100 bg-red-50 px-3 py-2 text-[12px] text-red-600",children:T}):null,a.jsx(ll,{cols:4,children:E.map(B=>
600a.jsx(fa,{label:B.label,value:B.value,icon:B.icon,tone:B.tone,delta:B.delta||void 0,positive:B.positive},B.label))}),a.jsx("section",{className:"rounded-xl border border-slate-100 bg-white p-2.5 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("label",{className:"relative min-w-[200px] flex-1",children:[a.jsx(qs,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"h-8 w-full rounded-lg border border-slate-200 bg-[#f7f9fc] pl-9 pr-3 text-[12px] outline-none transition placeholder:text-slate-400 focus:border-blue-400 focus:bg-white focus:ring-2 focus:ring-blue-500/10",placeholder:"Search by customer, phone, or order ID...",value:i,onChange:B=>o(B.target.value)})]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:c,onChange:B=>d(B.target.value),children:[a.jsx("option",{value:"all",children:"All Status"}),Rw.map(B=>a.jsx("option",{value:B,children:B},B))]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:m,onChange:B=>p(B.target.value),children:[a.jsx("option",{value:"all",children:"All Locations"}),f.map(B=>a.jsx("option",{value:B,children:B},B))]}),a.jsxs("button",{type:"button",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(Op,{className:"h-3.5 w-3.5"}),"Select date range"]})]})}),a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsx("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900",children:"All rental orders"})}),D?a.jsxs("div",{className:"flex items-center justify-center gap-2 border-t border-slate-100 px-4 py-10 text-[12px] text-slate-500",children:[a.jsx($a,{className:"h-4 w-4 animate-spin"}),"Loading rental orders..."]}):null,D?null:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[920px] text-left text-[12px]",children:[a.jsx("thead",{className:"bg-[#f8fafc] text-[10.5px] uppercase tracking-wide text-slate-400",children:a.jsx("tr",{children:(n?["Customer","Power Bank","Location","Amount","Time","Duration","Status","Date","Actions"]:["Customer","Power Bank","Location","Amount","Time","Status","Date","Actions"]).map(B=>a.jsx("th",{className:"px-3 py-2 font-semibold whitespace-nowrap",children:B},B))})}),a.jsx("tbody",{children:ie.map(B=>a.jsxs("tr",{className:"border-t border-slate-100 text-slate-700",children:[a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("span",{className:`grid h-8 w-8 shrink-0 place-items-center rounded-full text-[11px] font-semibold text-white ${B.color}`,children:B.initials}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-800",children:B.customer}),a.jsx("p",{className:"text-[10.5px] text-slate-400",children:B.phone})]})]})}),a.jsx("td",{className:"px-3 py-2.5",children:B.bank}),a.jsx("td",{className:"px-3 py-2.5",children:B.location}),a.jsx("td",{className:"px-3 py-2.5 font-semibold",children:B.amountLabel}),a.jsx("td",{className:`px-3 py-2.5 font-semibold tabular-nums ${B.timeLabel==="Waqtiga dhamaaday"?"text-amber-600":B.current?"text-emerald-600":"text-slate-400"}`,children:B.timeLabel}),n?a.jsx("td",{className:"px-3 py-2.5 font-medium text-slate-600",children:B.durationLabel||"—"}):null,a.jsx("td",{className:"px-3 py-2.5",children:a.jsx(Xh,{status:B.status})}),a.jsx("td",{className:"px-3 py-2.5 whitespace-nowrap text-slate-500",children:B.dateLabel}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsxs("button",{type:"button",onClick:()=>_(B),className:"inline-flex h-7 items-center gap-1 rounded-lg border border-blue-100 bg-blue-50 px-2.5 text-[11px] font-semibold text-blue-600 transition hover:bg-blue-100",children:[a.jsx(qn,{
600className:"h-3 w-3"}),"View"]}),a.jsx("button",{type:"button",onClick:()=>ce(B),disabled:U===B.id,className:"grid h-7 w-7 place-items-center rounded-lg border border-rose-100 text-rose-500 transition hover:bg-rose-50 disabled:opacity-50","aria-label":`Delete ${B.id}`,children:U===B.id?a.jsx($a,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(na,{className:"h-3.5 w-3.5"})})]})})]},B.id))})]})}),!D&&ie.length===0?a.jsx("div",{className:"border-t border-slate-100 px-4 py-8 text-center text-[12px] text-slate-500",children:"No rental orders found."}):null]}),k?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[480px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)]",children:[a.jsxs("div",{className:"flex items-start justify-between border-b border-slate-100 px-5 py-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:"Rental preview"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:k.id})]}),a.jsx("button",{type:"button",onClick:()=>_(null),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"Close preview",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"space-y-2 px-5 py-5 text-[13px]",children:[a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Customer"}),a.jsx("span",{className:"font-semibold text-slate-800",children:k.customer})]}),a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Phone"}),a.jsx("span",{className:"font-semibold text-slate-800",children:k.phone||"—"})]}),a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Power bank"}),a.jsx("span",{className:"font-semibold text-slate-800",children:k.bank})]}),a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Location"}),a.jsx("span",{className:"font-semibold text-slate-800",children:k.location})]}),a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Amount"}),a.jsx("span",{className:"font-semibold text-slate-800",children:k.amountLabel})]}),a.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Status"}),a.jsx(Xh,{status:k.status})]}),a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Date"}),a.jsx("span",{className:"font-semibold text-slate-800",children:k.dateLabel})]}),a.jsx("div",{className:"flex justify-end pt-3",children:a.jsxs("button",{type:"button",onClick:()=>ce(k),className:"inline-flex h-10 items-center gap-1.5 rounded-xl border border-rose-200 px-4 text-[13px] font-semibold text-rose-600 hover:bg-rose-50",children:[a.jsx(na,{className:"h-3.5 w-3.5"}),"Delete"]})})]})]})}):null]})}const zw="modulepreload",Bw=function(n){return"/"+n},Qh={},Ow=function(i,o,c){let d=Promise.resolve();if(o&&o.length>0){let p=function(f){return Promise.all(f.map(g=>Promise.resolve(g).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const y=document.querySelector("meta[property=csp-nonce]"),x=(y==null?void 0:y.nonce)||(y==null?void 0:y.getAttribute("nonce"));d=p(o.map(f=>{if(f=Bw(f),f in Qh)return;Qh[f]=!0;const g=f.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${v}`))return;const w=document.createElement("link");if(w.rel=g?"stylesheet":zw,g||(w.as="script"),w.crossOrigin="",w.href=f,x&&w.setAttribute("nonce",x),document.head.appendChild(w),g)return new Promise((D,C)=>{w.addEventListener("load",D),w.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${f}`)))})}))}function m(p){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=p,window.dispatchEvent(y),!y.defaultPrevented)throw p}return d.then(p=>{for(const y of p||[])y.status==="rejected"&&m(y.reason);return i().catch(m)})},p1=["Hodan Restaurant","Downtown","Airport","Bakaaraha","KM4","Hamarweyne"],b1=["Available","In Use","Maintenance","Charging","Offline","Locked"];function g1(n){if(!n)return"Never";const i=new Date(n);if(Number.isNaN(i.getTime()))return"Never";const o=Date.now()-i.getTime(),c=Math.floor(o/6e4);if(c<1)return"Just now";if(c<60)return`${c} min ago`;const d=Math.floor(c/60);if(d<24)return`${d} hour${d===1?"":"s"} ago`;const m=Math.floor(d/24);return m<7?`${m} day${m===1?"":"s"}
600 ago`:i.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})}function Uw(n){var i;return{id:n.id,name:n.name,serial:n.serial,battery:n.battery,location:n.location,status:n.status,lastUsedAt:n.lastUsedAt,lastHeartbeat:n.lastHeartbeat||n.lastUsedAt||n.updatedAt,lastUsed:g1(n.lastHeartbeat||n.lastUsedAt||n.updatedAt),temperature:n.temperature??null,renter:(i=n.renter)!=null&&i.name?{name:n.renter.name,phone:n.renter.phone||""}:null}}function Qo(n){return Uw(n)}async function Hw(){return(await _e("/api/power-banks/stats")).data}async function gm(n={}){var m,p,y,x;const i=new URLSearchParams;(m=n.search)!=null&&m.trim()&&i.set("search",n.search.trim()),n.status&&n.status!=="all"&&i.set("status",n.status),n.location&&n.location!=="all"&&i.set("location",n.location),n.battery&&n.battery!=="all"&&(n.battery==="High (70%+)"&&i.set("battery","high"),n.battery==="Medium (30-69%)"&&i.set("battery","medium"),n.battery==="Low (<30%)"&&i.set("battery","low"));const o=i.toString(),c=o?`/api/power-banks?${o}`:"/api/power-banks",d=await _e(c);return{banks:(((p=d.data)==null?void 0:p.banks)??[]).map(Qo),locations:((y=d.data)==null?void 0:y.locations)??p1,statuses:((x=d.data)==null?void 0:x.statuses)??b1}}async function Fw(n){const i=await _e(`/api/qr/${encodeURIComponent(n.trim())}`);return{bankId:i.data.bankId,slug:i.data.slug||"",url:i.data.url,canRent:i.data.canRent,bank:Qo(i.data.bank)}}async function bd(n){if(n!=null&&n.trim())try{const i=await _e(`/api/power-banks/${encodeURIComponent(n.trim())}`);return Qo(i.data.bank)}catch{return}}async function $w(n){const i=await _e("/api/power-banks",{method:"POST",body:{name:n.name,serial:n.serial,battery:n.battery,location:n.location,status:n.status}});return Qo(i.data.bank)}async function qw(n){await _e(`/api/power-banks/${encodeURIComponent(n.trim())}`,{method:"DELETE"})}function Pw(n){return`MC-${String(n).toUpperCase().replace(/[^A-Z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,12)||"STATION"}-01`}function gd(n){if(!n)return"—";const i=new Date(n);return Number.isNaN(i.getTime())?"—":i.toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}function Yw(n){return n>=70?"bg-emerald-500":n>=30?"bg-amber-500":"bg-rose-500"}function Vw(n){return{Available:"bg-emerald-50 text-emerald-600","In Use":"bg-orange-50 text-orange-500",Charging:"bg-sky-50 text-sky-600",Locked:"bg-rose-50 text-rose-600",Offline:"bg-slate-100 text-slate-500",Maintenance:"bg-rose-50 text-rose-500"}[n]||"bg-slate-100 text-slate-600"}function Gw(){const[n,i]=b.useState([]),[o,c]=b.useState(""),[d,m]=b.useState(!0);b.useEffect(()=>{let y=!0;async function x(){try{const g=await gm();if(!y)return;i(g.banks||[]),c("")}catch(g){y&&c((g==null?void 0:g.message)||"Could not load Marches.")}finally{y&&m(!1)}}x();const f=window.setInterval(x,4e3);return()=>{y=!1,window.clearInterval(f)}},[]);const p=b.useMemo(()=>{var k;const y=((k=n[0])==null?void 0:k.location)||"Hodan Restaurant",x=n.length,f=n.filter(_=>_.status==="Available").length,g=n.filter(_=>_.status==="Charging"||_.status==="Available"&&Number(_.battery)<100).length,v=n.filter(_=>_.status==="In Use").length,D=n.map(_=>_.lastHeartbeat||_.lastUsedAt||_.updatedAt).filter(Boolean).sort((_,U)=>new Date(U)-new Date(_))[0]||null,C=n.map(_=>_.updatedAt||_.lastUsedAt).filter(Boolean).sort((_,U)=>new Date(U)-new Date(_))[0]||null,T=n.map(_=>Number(_.temperature)).filter(_=>Number.isFinite(_)),S=n.some(_=>_.connectionStatus==="Online")||v>0;return{machineId:Pw(y),location:y,total:x,available:f,charging:g,inUse:v,lastHeartbeat:D,lastUpdated:C,temperature:T.length?`${Math.round(T.reduce((_,U)=>_+U,0)/T.length)}°C`:"—",online:S}},[n]);return a.jsxs("div",{className:"space-y-3",children:[o?a.jsx("div",{className:"rounded-xl border border-red-100 bg-red-50 px-3 py-2 text-[12px] text-red-600",children:o}):null,a.jsxs("article",{className:"rounded-xl border border-slate-100 bg-white p-4 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-slate-400",children:"Machine ID"}),a.jsx("p",{className:"mt-0.5 text-[18px] font-bold text-slate-900",children:p.machineId}),a.jsxs("p",{className:"mt-2 inline-flex items-center gap-1.5 text-[13px] font-medium text-slate-600",children:[a.jsx(Tt,{className:"h-3.5 w-3.5 text-[#2f6bff]"}),p.location]})]}),a.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[12px] font-semibold ${p.online?"bg-emerald-50 text-emerald-600":"bg-slate-100 text-slate-500"}`,children:[p.online?a.jsx(jj,{className:"h-3.5 w-3.5"}):a.jsx(yj,{className:"h-3.5 w-3.5"}),p.online?"Online":"Offline"]})]}),a.jsxs("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[a.jsxs("p",{className:"text-[12px] text-slate-500",children:["Last Heartbeat",a.jsx("span",{className:"mt-0.5 block font-semibold text-slate-800",children:gd(p.lastHeartbeat)})]}),a.jsxs("p",{className:"text-[12px] text-slate-500",children:["Last Updated",a.jsx("span",{className:"mt-0.5 block font-semibold text-slate-800",children:gd(p.lastUpdated)})]}),a.jsxs("p",{className:"text-[12px] text-slate-500",children:["Temperature",a.jsx("span",{className:"mt-0.5 block font-semibold text-slate-800",children:p.temperature})]}),a.jsxs("p",{className:"text-[12px] text-slate-500",children:["Network",a.jsx("span",{className:"mt-0.5 block font-semibold text-slate-800",children:p.online?"Connected":"Disconnected"})]})]})]}),a.jsxs(ll,{cols:4,children:[a.jsx(fa,{label:"Total Power Banks",value:String(p.total),icon:Xt,tone:"bg-blue-50 text-blue-600"}),a.jsx(fa,{label:"Available Power Banks",value:String(p.available),icon:Ed,tone:"bg-emerald-50 text-emerald-600"}),a.jsx(fa,{label:"Charging Power Banks",value:String(p.charging),icon:el,tone:"bg-sky-50 text-sky-600"}),a.jsx(fa,{label:"In Use",value:String(p.inUse),icon:Yy,tone:"bg-orange-50 text-orange-500"})]}),a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsxs("div",{className:"px-3.5 py-2.5",children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900",children:"Power banks at this march"}),a.jsx("p",{className:"text-[11px] text-slate-400",children:"Live battery and customer for each power ID."})]}),d?a.jsx("p",{className:"border-t border-slate-100 px-4 py-10 text-center text-[12px] text-slate-500",children:"Loading Marches..."}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[980px] text-left text-[12px]",children:[a.jsx("thead",{className:"bg-[#f8fafc] text-[10.5px] uppercase tracking-wide text-slate-400",children:a.jsx("tr",{children:["Power ID","Customer","Battery","Status","Last Heartbeat","Last Updated","Temperature","Network"].map(y=>a.jsx("th",{className:"px-3 py-2 font-semibold whitespace-nowrap",children:y},y))})}),a.jsx("tbody",{children:n.map(y=>{var v,w;const x=((v=y.renter)==null?void 0:v.name)||"—",f=((w=y.renter)==null?void 0:w.phone)||"",g=Math.max(0,Math.min(100,Number(y.battery)||0));return a.jsxs("tr",{className:"border-t border-slate-100 text-slate-700",children:[a.jsxs("td",{className:"px-3 py-2.5",children:[a.jsx("p",{className:"font-semibold text-slate-800",children:y.id}),a.jsx("p",{className:"text-[10.5px] text-slate-400",children:y.serial})]}),a.jsx("td",{className:"px-3 py-2.5",children:x==="—"?a.jsx("span",{className:"text-slate-400",children:"Cabinet"}):a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-full bg-[#2f6bff] text-[11px] font-semibold text-white",children:Mn(x)}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-800",children:x}),a.jsx("p",{className:"text-[10.5px] text-slate-400",children:f})]})]})}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"h-1.5 w-20 overflow-hidden rounded-full bg-slate-100",children:a.jsx("div",{className:`h-full ${Yw(g)}`,style:{width:`${g}%`}})}),a.jsxs("span",{className:"font-semibold tabular-nums",children:[g,"%"]})]})}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold ${Vw(y.status)}`,children:y.status})}),a.jsx("td",{className:"px-3 py-2.5 whitespace-nowrap text-slate-500",children:g1(y.lastHeartbeat||y.lastUsedAt)}),a.jsx("td",{className:"px-3 py-2.5 whitespace-nowrap text-slate-500",children:gd(y.updatedAt||y.lastUsedAt)}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("span",{className:"inline-flex items-center gap-1 text-slate-600",children:[a.jsx(W5,{className:"h-3.5 w-3.5 text-slate-400"}),Number.isFinite(Number(y.temperature))?`${Number(y.temperature)}°C`:"—"]})}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold ${y.connectionStatus==="Online"?"bg-emerald-50 text-emerald-600":"bg-slate-100 text-slate-500"}`,children:[a.jsx(S5,{className:"h-3 w-3.5"}),y.connectionStatus||"Offline"]})})]},y.id)})})]})}),!d&&n.length===0?a.jsx("p",{className:"border-t border-slate-100 px-4 py-8 text-center text-[12px] text-slate-500",children:"No power banks at this march."}):null]})]})}function y1(n){return String(n??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Xw(n){return typeof n=="number"&&Number.isFinite(n)?`<Cell><Data ss:Type="Number">${n}</Data></Cell>`:`<Cell><Data ss:Type="String">${y1(n)}</Data></Cell>`}function Qw(n,i,o,c="Sheet1"){const d=[i,...o].map(v=>`<Row>${v.map(Xw).join("")}</Row>`).join(""),m=`<?xml version="1.0"?>
601<?mso-application progid="Excel.Sheet"?>
602<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
603 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
604 <Worksheet ss:Name="${y1(c)}">
605  <Table>${d}</Table>
606 </Worksheet>
607</Workbook>`,p=new Blob([m],{type:"application/vnd.ms-excel;charset=utf-8;"}),y=URL.createObjectURL(p),x=document.createElement("a"),f=new Date().toISOString().slice(0,10),g=n.replace(/\.(xlsx|xls|csv)$/i,"");x.href=y,x.download=`${g}-${f}.xls`,document.body.appendChild(x),x.click(),x.remove(),URL.revokeObjectURL(y)}async function ym(n={}){var m,p;const i=new URLSearchParams;(m=n.search)!=null&&m.trim()&&i.set("search",n.search.trim()),n.status&&n.status!=="all"&&i.set("status",n.status),n.method&&n.method!=="all"&&i.set("method",n.method),n.includeReminders&&i.set("includeReminders","1");const o=i.toString(),c=o?`/api/payments?${o}`:"/api/payments";return((p=(await _e(c)).data)==null?void 0:p.payments)??[]}async function Iw(n){await _e(`/api/payments/${encodeURIComponent(n.trim())}`,{method:"DELETE"})}function Zw(n=[]){const i=n.filter(x=>x.status==="Successful"),o=n.filter(x=>x.status==="Failed"),c=n.filter(x=>x.status==="Lost"),d=i.reduce((x,f)=>x+f.amount,0),m=o.reduce((x,f)=>x+f.amount,0),p=c.reduce((x,f)=>x+f.amount,0),y=d-p;return{totalRevenue:d,successfulCount:i.length,failedCount:o.length,lostCount:c.length,failedAmount:m,lostAmount:p,balance:y}}
607function Kw(n=[]){const i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=[0,0,0,0,0,0,0],c=[0,0,0,0,0,0,0];for(const m of n){if(m.status!=="Successful")continue;const p=new Date(m.createdAt||String(m.date).replace(/\s+/g," ").trim());if(Number.isNaN(p.getTime()))continue;const y=p.getDay();o[y]+=m.amount,c[y]+=1}return[1,2,3,4,5,6,0].map(m=>({label:i[m],value:Number(o[m].toFixed(2)),count:c[m]}))}function Jw(n){if(n.createdAt){const i=new Date(n.createdAt);if(!Number.isNaN(i.getTime()))return i}return new Date(String(n.date).replace(/\s+/g," ").trim())}function Ih(n){const i=n.getFullYear(),o=String(n.getMonth()+1).padStart(2,"0"),c=String(n.getDate()).padStart(2,"0");return`${i}-${o}-${c}`}function Ww(n=[],i=14){const o=new Date;o.setHours(0,0,0,0);const c=[];for(let p=0;p<i;p+=1){const y=new Date(o);y.setDate(o.getDate()-p);const x=Ih(y);c.push({key:x,label:y.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric"}),revenue:0,loss:0,profit:0,successful:0,failed:0,lost:0})}const d=new Map(c.map(p=>[p.key,p]));for(const p of n){const y=Jw(p);if(Number.isNaN(y.getTime()))continue;const x=d.get(Ih(y));x&&(p.status==="Successful"?(x.revenue+=p.amount,x.successful+=1):(p.status==="Failed"||p.status==="Lost")&&(x.loss+=p.amount,p.status==="Failed"&&(x.failed+=1),p.status==="Lost"&&(x.lost+=1)))}for(const p of c)p.revenue=Number(p.revenue.toFixed(2)),p.loss=Number(p.loss.toFixed(2)),p.profit=Number((p.revenue-p.loss).toFixed(2));const m=c.reduce((p,y)=>(p.revenue+=y.revenue,p.loss+=y.loss,p.profit+=y.profit,p.successful+=y.successful,p.failed+=y.failed,p.lost+=y.lost,p),{revenue:0,loss:0,profit:0,successful:0,failed:0,lost:0});return{days:c,totals:{revenue:Number(m.revenue.toFixed(2)),loss:Number(m.loss.toFixed(2)),profit:Number(m.profit.toFixed(2)),successful:m.successful,failed:m.failed,lost:m.lost},today:c[0]}}async function v1(){var i;return((i=(await _e("/api/marches")).data)==null?void 0:i.orders)??[]}function j1(n=[]){return Number(n.filter(i=>String(i.status||"")!=="Cancelled").reduce((i,o)=>i+(Number(o.amount)||0),0).toFixed(2))}function us(n){return`$${n.toFixed(2)}`}function jo(n){const i=String((n==null?void 0:n.fullName)||(n==null?void 0:n.customerName)||(n==null?void 0:n.user)||"").trim();return!i||/^hormuud customer$/i.test(i)||/^walk-?in customer$/i.test(i)?"—":i}function eN({status:n}){const i={Successful:"bg-emerald-50 text-emerald-600",Failed:"bg-rose-50 text-rose-500",Lost:"bg-orange-50 text-orange-500",Pending:"bg-slate-100 text-slate-500"};return a.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold ${i[n]}`,children:n})}function tN({series:n}){const i=Math.max(...n.map(d=>d.value),1),o=150,c=[0,.25,.5,.75,1].map(d=>Number((i*d).toFixed(2)));return a.jsx("div",{className:"pt-1",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("div",{className:"flex h-[150px] w-11 flex-col justify-between pb-0 text-right text-[10px] font-medium text-slate-500",children:[...c].reverse().map(d=>a.jsx("span",{className:"leading-none",children:d===0?"$0":`$${d%1===0?d:d.toFixed(1)}`},d))}),a.jsxs("div",{className:"relative min-w-0 flex-1",children:[a.jsx("div",{className:"pointer-events-none absolute left-0 top-0 z-20 h-[150px] w-[2px] rounded-full bg-[#2f6bff]",children:c.map(d=>{const m=o-d/i*o;return a.jsx("span",{className:"absolute left-0 h-[2px] w-2 -translate-x-[1px] -translate-y-1/2 rounded-full bg-[#2f6bff]",style:{to
607p:`${m}px`}},`ytick-${d}`)})}),a.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-[150px] pl-2",children:c.map(d=>{const m=o-d/i*o;return a.jsx("div",{className:"absolute inset-x-0 border-t border-dashed border-slate-100",style:{top:`${m}px`}},`grid-${d}`)})}),a.jsx("div",{className:"relative ml-[2px] flex h-[150px] items-end gap-2 border-b-2 border-[#2f6bff] px-2",children:n.map(d=>{const m=d.value/i,p=d.value>0?Math.max(m*o,10):3;return a.jsxs("div",{className:"group relative flex h-full flex-1 flex-col items-center justify-end",children:[a.jsxs("div",{className:"pointer-events-none absolute -top-6 z-10 hidden rounded-md bg-slate-900 px-2 py-1 text-[10px] font-semibold text-white shadow-lg group-hover:block",children:[us(d.value),d.count?` · ${d.count} pay`:""]}),a.jsx("div",{className:`w-full max-w-[42px] rounded-t-md transition-all duration-500 ${d.value>0?"bg-gradient-to-t from-[#1d4ed8] via-[#2f6bff] to-[#93c5fd] shadow-[0_6px_14px_rgba(47,107,255,0.28)]":"bg-slate-200"}`,style:{height:`${p}px`},title:`${d.label}: ${us(d.value)}`})]},d.label)})}),a.jsx("div",{className:"mt-2 flex gap-2 px-2",children:n.map(d=>a.jsxs("div",{className:"flex flex-1 flex-col items-center gap-0.5",children:[a.jsx("span",{className:"text-[11px] font-semibold text-slate-600",children:d.label}),a.jsx("span",{className:`text-[10px] font-medium ${d.value>0?"text-[#2f6bff]":"text-slate-300"}`,children:us(d.value)})]},`label-${d.label}`))})]})]})})}function aN(){const[n,i]=b.useState([]),[o,c]=b.useState(""),[d,m]=b.useState("all"),[p,y]=b.useState("all"),[x,f]=b.useState(!0),[g,v]=b.useState(""),[w,D]=b.useState(""),[C,T]=b.useState(0);b.useEffect(()=>{let z=!0,K=!0;async function ie(){K&&f(!0);try{const[W,re]=await Promise.all([ym(),v1()]);if(!z)return;i(W),T(j1(re)),v("")}catch(W){if(!z)return;K&&(i([]),T(0),v((W==null?void 0:W.message)||"Could not load payments from the server."))}finally{z&&f(!1),K=!1}}ie();const ce=window.setInterval(ie,4e3),B=()=>{document.hidden||ie()};return document.addEventListener("visibilitychange",B),window.addEventListener("focus",B),()=>{z=!1,window.clearInterval(ce),document.removeEventListener("visibilitychange",B),window.removeEventListener("focus",B)}},[]);const S=b.useMemo(()=>Zw(n),[n]),k=Math.max(C,S.balance),_=b.useMemo(()=>Kw(n),[n]),U=b.useMemo(()=>{const z=o.trim().toLowerCase();return n.filter(K=>{const ie=!z||K.id.toLowerCase().includes(z)||String(K.fullName||K.customerName||K.user||"").toLowerCase().includes(z)||K.phone.toLowerCase().includes(z)||K.powerBank.toLowerCase().includes(z),ce=d==="all"||K.status===d,B=p==="all"||K.method===p;return ie&&ce&&B})},[n,o,d,p]);function A(){const z=U.map(K=>[K.id,jo(K),K.phone||"",K.powerBank||"",K.location||"",Number(K.amount)||0,K.method||"",K.status||"",K.transactionId||"",K.orderId||"",K.date||""]);Qw("somacharge-payments",["ID","Customer","Phone","Power Bank","Location","Amount","Method","Status","Transaction ID","Order ID","Date"],z,"Payments")}async function G(z){D(z.id),v("");try{await Iw(z.id),i(K=>K.filter(ie=>ie.id!==z.id))}catch(K){v((K==null?void 0:K.message)||"Could not delete payment.")}finally{D("")}}const E=[{label:"Total Revenue",value:us(S.totalRevenue),delta:"+12.5%",positive:!0,icon:fs,tone:"bg-blue-50 text-blue-600"},{label:"Successful Payment",value:String(S.successfulCount),delta:"+8.4%",positive:!0,icon:Ut,tone:"bg-emerald-50 text-emerald-600"},{label:"Failed Payment",value:String(S.failedCount),delta:`${us(S.failedAmount)}`,positive:!1,icon:cm,tone:"bg-rose-50 text-rose-500"},{label:"Balance",value:us(k),delta:"+5.2%",positive:!0,icon:tr,tone:"bg-violet-50 text-violet-600"},{label:"Lose Payment",value:String(S.lostCount),delta:us(S.lostAmount),positive:!1,icon:Td,tone:"bg-orange-50 text-orange-500"}];return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[15px] font-semibold text-slate-900",children:"Payment Management"}),a.jsx("p",{className:"text-[12px] text-slate-500",children:"Real Hormuud payments are saved automatically after a successful merchant charge"})]}),a.jsxs("button",{type:"button",onClick:A,disabled:x,className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white shadow-[0_6px_14px_rgba(47,107,255,0.28)] transition hover:bg-[#2458db] disabled:cursor-not-allowed disabled:bg-slate-300 disabled:shadow-none",children:[a.jsx(Ch,{className:"h-3.5 w-3.5"}),"Download Excel"]})]}),g?a.jsx("p",{className:"rounded-lg bg-rose-50 px-3 py-2 text-[12px] text-rose-600",children:g}):null,a.jsx(ll,{cols:5,children:E.map(z=>a.jsx(fa,{label:z.label,value:z.value,icon:z.icon,tone:z.tone,delta:z.delta,positive:z.positive},z.label))}),a.jsxs("section",{className:"grid grid-cols-[minmax(0,1.4fr)_minmax(280px,1fr)] gap-3",children:[a.jsxs("article",{className:"rounded-xl border border-slate-100 bg-white p-4 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsx("div",{className:"mb-3 flex items-center justify-between",children:a.jsxs("div",{children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900",children:"Weekly Revenue Histogram"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"Successful payments by day"})]})}),a.jsx(tN,{series:_})]}),a.jsxs("article",{className:"rounded-xl border border-slate-100 bg-white p-4 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsxs("div",{className:"mb-3",children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900",children:"Payment Health Chart"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"Success vs failed vs lost"})]}),a.jsx("div",{className:"space-y-3 pt-2",children:[{label:"Successful",value:S.successfulCount,total:n.length||1,color:"bg-emerald-500"},{label:"Failed",value:S.failedCount,total:n.length||1,color:"bg-rose-500"},{label:"Lose Payment",value:S.lostCount,total:n.length||1,color:"bg-orange-500"}].map(z=>a.jsxs("div",{children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between text-[12px]",children:[a.jsx("span",{className:"font-medium text-slate-600",children:z.label}),a.jsxs("span",{className:"font-semibold text-slate-800",children:[z.value," (",Math.round(z.value/z.total*100),"%)"]})]}),a.jsx("div",{className:"h-2.5 overflow-hidden rounded-full bg-slate-100",children:a.jsx("div",{className:`h-full rounded-full ${z.color}`,style:{width:`${Math.max(z.value/z.total*100,4)}%`}})})]},z.label))}),a.jsxs("div",{className:"mt-4 rounded-lg bg-[#f7f9fc] px-3 py-2.5 text-[11px] text-slate-500",children:["Customer lacag dirto → payment-ka si ",a.jsx("strong",{children:"auto"})," ah ayaa loo diiwaangeliyaa."]})]})]}),a.jsx("section",{className:"rounded-xl border border-slate-100 bg-white p-2.5 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("label",{className:"relative min-w-[200px] flex-1",children:[a.jsx(qs,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"h-8 w-full rounded-lg border border-slate-200 bg-[#f7f9fc] pl-9 pr-3 text-[12px] outline-none transition placeholder:text-slate-400 focus:border-blue-400 focus:bg-white focus:ring-2 focus:ring-blue-500/10",placeholder:"Search by ID, customer, or phone...",value:o,onChange:z=>c(z.target.value)})]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none",value:d,onChange:z=>m(z.target.value),children:[a.jsx("option",{value:"all",children:"All Status"}),a.jsx("option",{value:"Successful",children:"Successful"}),a.jsx("option",{value:"Failed",children:"Failed"}),a.jsx("option",{value:"Lost",children:"Lose Payment"}),a.jsx("option",{value:"Pending",children:"Pending"})]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none",value:p,onChange:z=>y(z.target.value),children:[a.jsx("option",{value:"all",children:"All Methods"}),a.jsx("option",{value:"Hormuud EVC Plus",children:"Hormuud EVC Plus"}),a.jsx("option",{value:"EVC Plus",children:"EVC Plus"}),a.jsx("option",{value:"E-Dahab",children:"E-Dahab"}),a.jsx("option",{value:"Hormuud",children:"Hormuud"}),a.jsx("option",{value:"Cash",children:"Cash"}),a.jsx("option",{value:"Free PIN",children:"Free PIN"})]}),a.jsxs("button",{type:"button",onClick:A,disabled:x,className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-emerald-200 bg-emerald-50 px-2.5 text-[12px] font-semibold text-emerald-700 transition hover:bg-emerald-100 disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-50 disabled:text-slate-400",children:[a.jsx(Ch,{className:"h-3.5 w-3.5"}),"Excel"]})]})}),a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900",children:"Payment Records"}),a.jsxs("span",{className:"rounded-full bg-slate-100 px-2 py-0.5 text-[10.5px] font-medium text-slate-500",children:[U.length," records"]})]}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[980px] text-left text-[12px]",children:[a.jsx("thead",{className:"bg-[#f8fafc] text-[10.5px] uppercase tracking-wide text-slate-400",children:a.jsx("tr",{children:["ID","Customer","Power Bank","Location","Amount","Method","Status","Date","Actions"].map(z=>a.jsx("th",{className:"px-3 py-2 font-semibold whitespace-nowrap",children:z},z))})}),a.jsx("tbody",{children:!x&&U.map(z=>a.jsxs("tr",{className:"border-t border-slate-100 text-slate-700",children:[a.jsx("td",{className:"px-3 py-2.5 font-semibold text-slate-800",children:z.id}),a.jsxs("td",{className:"px-3 py-2.5",children:[jo(z)!=="—"?a.jsxs("p",{className:"inline-flex items-center gap-1.5 font-semibold text-slate-800",children:[a.jsx(ka,{className:"h-3.5 w-3.5 text-[#2f6bff]"}),jo(z)]}):null,a.jsx("p",{className:jo(z)!=="—"?"text-[10.5px] text-slate-400":"font-semibold text-slate-800",children:z.phone})]}),a.jsx("td",{className:"px-3 py-2.5",children:z.powerBank}),a.jsx("td",{className:"px-3 py-2.5",children:z.location}),a.jsx("td",{className:"px-3 py-2.5 font-semibold",children:us(z.amount)}),a.jsx("td",{className:"px-3 py-2.5",children:z.method}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsx(eN,{status:z.status})}),a.jsx("td",{className:"px-3 py-2.5 whitespace-nowrap text-slate-500",children:z.date}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsx("button",{type:"button",onClick:()=>G(z),disabled:w===z.id,className:"grid h-7 w-7 place-items-center rounded-lg border border-rose-100 text-rose-500 transition hover:bg-rose-50 disabled:opacity-50","aria-label":`Delete ${z.id}`,children:w===z.id?a.jsx($a,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(na,{className:"h-3.5 w-3.5"})})})]},z.id))})]})}),x?a.jsx("div",{className:"border-t border-slate-100 px-4 py-8 text-center text-[12px] text-slate-500",children:"Loading payments..."}):U.length===0?a.jsx("div",{className:"border-t border-slate-100 px-4 py-8 text-center text-[12px] text-slate-500",children:"No payment records foun
607d."}):null]})]})}var lN=Object.defineProperty,Uo=Object.getOwnPropertySymbols,w1=Object.prototype.hasOwnProperty,N1=Object.prototype.propertyIsEnumerable,Zh=(n,i,o)=>i in n?lN(n,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[i]=o,qd=(n,i)=>{for(var o in i||(i={}))w1.call(i,o)&&Zh(n,o,i[o]);if(Uo)for(var o of Uo(i))N1.call(i,o)&&Zh(n,o,i[o]);return n},Pd=(n,i)=>{var o={};for(var c in n)w1.call(n,c)&&i.indexOf(c)<0&&(o[c]=n[c]);if(n!=null&&Uo)for(var c of Uo(n))i.indexOf(c)<0&&N1.call(n,c)&&(o[c]=n[c]);return o};/**
608 * @license QR Code generator library (TypeScript)
609 * Copyright (c) Project Nayuki.
610 * SPDX-License-Identifier: MIT
611 */var Ps;(n=>{const i=class Oe{constructor(x,f,g,v){if(this.version=x,this.errorCorrectionLevel=f,this.modules=[],this.isFunction=[],x<Oe.MIN_VERSION||x>Oe.MAX_VERSION)throw new RangeError("Version value out of range");if(v<-1||v>7)throw new RangeError("Mask value out of range");this.size=x*4+17;let w=[];for(let C=0;C<this.size;C++)w.push(!1);for(let C=0;C<this.size;C++)this.modules.push(w.slice()),this.isFunction.push(w.slice());this.drawFunctionPatterns();const D=this.addEccAndInterleave(g);if(this.drawCodewords(D),v==-1){let C=1e9;for(let T=0;T<8;T++){this.applyMask(T),this.drawFormatBits(T);const S=this.getPenaltyScore();S<C&&(v=T,C=S),this.applyMask(T)}}d(0<=v&&v<=7),this.mask=v,this.applyMask(v),this.drawFormatBits(v),this.isFunction=[]}static encodeText(x,f){const g=n.QrSegment.makeSegments(x);return Oe.encodeSegments(g,f)}static encodeBinary(x,f){const g=n.QrSegment.makeBytes(x);return Oe.encodeSegments([g],f)}static encodeSegments(x,f,g=1,v=40,w=-1,D=!0){if(!(Oe.MIN_VERSION<=g&&g<=v&&v<=Oe.MAX_VERSION)||w<-1||w>7)throw new RangeError("Invalid value");let C,T;for(C=g;;C++){const U=Oe.getNumDataCodewords(C,f)*8,A=p.getTotalBits(x,C);if(A<=U){T=A;break}if(C>=v)throw new RangeError("Data too long")}for(const U of[Oe.Ecc.MEDIUM,Oe.Ecc.QUARTILE,Oe.Ecc.HIGH])D&&T<=Oe.getNumDataCodewords(C,U)*8&&(f=U);let S=[];for(const U of x){o(U.mode.modeBits,4,S),o(U.numChars,U.mode.numCharCountBits(C),S);for(const A of U.getData())S.push(A)}d(S.length==T);const k=Oe.getNumDataCodewords(C,f)*8;d(S.length<=k),o(0,Math.min(4,k-S.length),S),o(0,(8-S.length%8)%8,S),d(S.length%8==0);for(let U=236;S.length<k;U^=253)o(U,8,S);let _=[];for(;_.length*8<S.length;)_.push(0);return S.forEach((U,A)=>_[A>>>3]|=U<<7-(A&7)),new Oe(C,f,_,w)}getModule(x,f){return 0<=x&&x<this.size&&0<=f&&f<this.size&&this.modules[f][x]}getModules(){return this.modules}drawFunctionPatterns(){for(let g=0;g<this.size;g++)this.setFunctionModule(6,g,g%2==0),this.setFunctionModule(g,6,g%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const x=this.getAlignmentPatternPositions(),f=x.length;for(let g=0;g<f;g++)for(let v=0;v<f;v++)g==0&&v==0||g==0&&v==f-1||g==f-1&&v==0||this.drawAlignmentPattern(x[g],x[v]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(x){const f=this.errorCorrectionLevel.formatBits<<3|x;let g=f;for(let w=0;w<10;w++)g=g<<1^(g>>>9)*1335;const v=(f<<10|g)^21522;d(v>>>15==0);for(let w=0;w<=5;w++)this.setFunctionModule(8,w,c(v,w));this.setFunctionModule(8,7,c(v,6)),this.setFunctionModule(8,8,c(v,7)),this.setFunctionModule(7,8,c(v,8));for(let w=9;w<15;w++)this.setFunctionModule(14-w,8,c(v,w));for(let w=0;w<8;w++)this.setFunctionModule(this.size-1-w,8,c(v,w));for(let w=8;w<15;w++)this.setFunctionModule(8,this.size-15+w,c(v,w));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let x=this.version;for(let g=0;g<12;g++)x=x<<1^(x>>>11)*7973;const f=this.version<<12|x;d(f>>>18==0);for(let g=0;g<18;g++){const v=c(f,g),w=this.size-11+g%3,D=Math.floor(g/3);this.setFunctionModule(w,D,v),this.setFunctionModule(D,w,v)}}drawFinderPattern(x,f){for(let g=-4;g<=4;g++)for(let v=-4;v<=4;v++){const w=Math.max(Math.abs(v),Math.abs(g)),D=x+v,C=f+g;0<=D&&D<this.size&&0<=C&&C<this.size&&this.setFunctionModule(D,C,w!=2&&w!=4)}}drawAlignmentPattern(x,f){for(let g=-2;g<=2;g++)for(let v=-2;v<=2;v++)this.setFunctionModule(x+v,f+g,Math.max(Math.abs(v),Math.abs(g))!=1)}setFunctionModule(x,f,g){this.modules[f][x]=g,this.isFunction[f][x]=!0}addEccAndInterleave(x){const f=this.version,g=this.errorCorrectionLevel;if(x.length!=Oe.getNumDataCodewords(f,g))throw new RangeError("Invalid argument");
611const v=Oe.NUM_ERROR_CORRECTION_BLOCKS[g.ordinal][f],w=Oe.ECC_CODEWORDS_PER_BLOCK[g.ordinal][f],D=Math.floor(Oe.getNumRawDataModules(f)/8),C=v-D%v,T=Math.floor(D/v);let S=[];const k=Oe.reedSolomonComputeDivisor(w);for(let U=0,A=0;U<v;U++){let G=x.slice(A,A+T-w+(U<C?0:1));A+=G.length;const E=Oe.reedSolomonComputeRemainder(G,k);U<C&&G.push(0),S.push(G.concat(E))}let _=[];for(let U=0;U<S[0].length;U++)S.forEach((A,G)=>{(U!=T-w||G>=C)&&_.push(A[U])});return d(_.length==D),_}drawCodewords(x){if(x.length!=Math.floor(Oe.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let f=0;for(let g=this.size-1;g>=1;g-=2){g==6&&(g=5);for(let v=0;v<this.size;v++)for(let w=0;w<2;w++){const D=g-w,T=(g+1&2)==0?this.size-1-v:v;!this.isFunction[T][D]&&f<x.length*8&&(this.modules[T][D]=c(x[f>>>3],7-(f&7)),f++)}}d(f==x.length*8)}applyMask(x){if(x<0||x>7)throw new RangeError("Mask value out of range");for(let f=0;f<this.size;f++)for(let g=0;g<this.size;g++){let v;switch(x){case 0:v=(g+f)%2==0;break;case 1:v=f%2==0;break;case 2:v=g%3==0;break;case 3:v=(g+f)%3==0;break;case 4:v=(Math.floor(g/3)+Math.floor(f/2))%2==0;break;case 5:v=g*f%2+g*f%3==0;break;case 6:v=(g*f%2+g*f%3)%2==0;break;case 7:v=((g+f)%2+g*f%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[f][g]&&v&&(this.modules[f][g]=!this.modules[f][g])}}getPenaltyScore(){let x=0;for(let w=0;w<this.size;w++){let D=!1,C=0,T=[0,0,0,0,0,0,0];for(let S=0;S<this.size;S++)this.modules[w][S]==D?(C++,C==5?x+=Oe.PENALTY_N1:C>5&&x++):(this.finderPenaltyAddHistory(C,T),D||(x+=this.finderPenaltyCountPatterns(T)*Oe.PENALTY_N3),D=this.modules[w][S],C=1);x+=this.finderPenaltyTerminateAndCount(D,C,T)*Oe.PENALTY_N3}for(let w=0;w<this.size;w++){let D=!1,C=0,T=[0,0,0,0,0,0,0];for(let S=0;S<this.size;S++)this.modules[S][w]==D?(C++,C==5?x+=Oe.PENALTY_N1:C>5&&x++):(this.finderPenaltyAddHistory(C,T),D||(x+=this.finderPenaltyCountPatterns(T)*Oe.PENALTY_N3),D=this.modules[S][w],C=1);x+=this.finderPenaltyTerminateAndCount(D,C,T)*Oe.PENALTY_N3}for(let w=0;w<this.size-1;w++)for(let D=0;D<this.size-1;D++){const C=this.modules[w][D];C==this.modules[w][D+1]&&C==this.modules[w+1][D]&&C==this.modules[w+1][D+1]&&(x+=Oe.PENALTY_N2)}let f=0;for(const w of this.modules)f=w.reduce((D,C)=>D+(C?1:0),f);const g=this.size*this.size,v=Math.ceil(Math.abs(f*20-g*10)/g)-1;return d(0<=v&&v<=9),x+=v*Oe.PENALTY_N4,d(0<=x&&x<=2568888),x}getAlignmentPatternPositions(){if(this.version==1)return[];{const x=Math.floor(this.version/7)+2,f=this.version==32?26:Math.ceil((this.version*4+4)/(x*2-2))*2;let g=[6];for(let v=this.size-7;g.length<x;v-=f)g.splice(1,0,v);return g}}static getNumRawDataModules(x){if(x<Oe.MIN_VERSION||x>Oe.MAX_VERSION)throw new RangeError("Version number out of range");let f=(16*x+128)*x+64;if(x>=2){const g=Math.floor(x/7)+2;f-=(25*g-10)*g-55,x>=7&&(f-=36)}return d(208<=f&&f<=29648),f}static getNumDataCodewords(x,f){return Math.floor(Oe.getNumRawDataModules(x)/8)-Oe.ECC_CODEWORDS_PER_BLOCK[f.ordinal][x]*Oe.NUM_ERROR_CORRECTION_BLOCKS[f.ordinal][x]}static reedSolomonComputeDivisor(x){if(x<1||x>255)throw new RangeError("Degree out of range");let f=[];for(let v=0;v<x-1;v++)f.push(0);f.push(1);let g=1;for(let v=0;v<x;v++){for(let w=0;w<f.length;w++)f[w]=Oe.reedSolomonMultiply(f[w],g),w+1<f.length&&(f[w]^=f[w+1]);g=Oe.reedSolomonMultiply(g,2)}return f}static reedSolomonComputeRemainder(x,f){let g=f.map(v=>0);for(const v of x){const w=v^g.shift();g.push(0),f.forEach((D,C)=>g[C]^=Oe.reedSolomonMultiply(D,w))}return g}static reedSolomonMultiply(x,f){if(x>>>8||f>>>8)throw new RangeError("Byte out of range");let g=0;for(let v=7;v>=0;v--)g=g<<1^(g>>>7)*285,g^=(f>>>v&1)*x;return d(g>>>8==0),g}finderPenaltyCountPatterns(x){const f=x[1];d(f<=this.size*3);const g=f>0&&x[2]==f&&x[3]==f*3&&x[4]==f&&x[5]==f;return(g&&x[0]>=f*4&&x[6]>=f?1:0)+(g&&x[6]>=f*4&&x[0]>=f?1:0)}finderPenaltyTerminateAndCount(x,f,g){return x&&(this.finderPenaltyAddHistory(f,g),f=0),f+=this.size,this.finderPenaltyAddHistory(f,g),this.finderPenaltyCountPatterns(g)}finderPenaltyAddHistory(x,f){f[0]==0&&(x+=this.size),f.pop(),f.unshift(x)}};i.MIN_VERSION=1,i.MAX_VERSION=40,i.PENALTY_N1=3,i.PENALTY_N2=3,i.PENALTY_N3=40,i.PENALTY_N4=10,i.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],i.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],n.QrCode=i;function o(y,x,f){if(x<0||x>31||y>>>x)throw new RangeError("Value out of range");for(let g=x-1;g>=0;g--)f.push(y>>>g&1)}function c(y,x){return(y>>>x&1)!=0}function d(y){if(!y)throw new Error("Assertion error")}const m=class vt{constructor(x,f,g){if(this.mode=x,this.numChars=f,this.bitData=g,f<0)throw new RangeError("Invalid argument");this.bitData=g.slice()}static makeBytes(x){let f=[];for(const g of x)o(g,8,f);return new vt(vt.Mode.BYTE,x.length,f)}static makeNumeric(x){if(!vt.isNumeric(x))throw new RangeError("String contains 
611non-numeric characters");let f=[];for(let g=0;g<x.length;){const v=Math.min(x.length-g,3);o(parseInt(x.substring(g,g+v),10),v*3+1,f),g+=v}return new vt(vt.Mode.NUMERIC,x.length,f)}static makeAlphanumeric(x){if(!vt.isAlphanumeric(x))throw new RangeError("String contains unencodable characters in alphanumeric mode");let f=[],g;for(g=0;g+2<=x.length;g+=2){let v=vt.ALPHANUMERIC_CHARSET.indexOf(x.charAt(g))*45;v+=vt.ALPHANUMERIC_CHARSET.indexOf(x.charAt(g+1)),o(v,11,f)}return g<x.length&&o(vt.ALPHANUMERIC_CHARSET.indexOf(x.charAt(g)),6,f),new vt(vt.Mode.ALPHANUMERIC,x.length,f)}static makeSegments(x){return x==""?[]:vt.isNumeric(x)?[vt.makeNumeric(x)]:vt.isAlphanumeric(x)?[vt.makeAlphanumeric(x)]:[vt.makeBytes(vt.toUtf8ByteArray(x))]}static makeEci(x){let f=[];if(x<0)throw new RangeError("ECI assignment value out of range");if(x<128)o(x,8,f);else if(x<16384)o(2,2,f),o(x,14,f);else if(x<1e6)o(6,3,f),o(x,21,f);else throw new RangeError("ECI assignment value out of range");return new vt(vt.Mode.ECI,0,f)}static isNumeric(x){return vt.NUMERIC_REGEX.test(x)}static isAlphanumeric(x){return vt.ALPHANUMERIC_REGEX.test(x)}getData(){return this.bitData.slice()}static getTotalBits(x,f){let g=0;for(const v of x){const w=v.mode.numCharCountBits(f);if(v.numChars>=1<<w)return 1/0;g+=4+w+v.bitData.length}return g}static toUtf8ByteArray(x){x=encodeURI(x);let f=[];for(let g=0;g<x.length;g++)x.charAt(g)!="%"?f.push(x.charCodeAt(g)):(f.push(parseInt(x.substring(g+1,g+3),16)),g+=2);return f}};m.NUMERIC_REGEX=/^[0-9]*$/,m.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,m.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let p=m;n.QrSegment=m})(Ps||(Ps={}));(n=>{(i=>{const o=class{constructor(d,m){this.ordinal=d,this.formatBits=m}};o.LOW=new o(0,1),o.MEDIUM=new o(1,0),o.QUARTILE=new o(2,3),o.HIGH=new o(3,2),i.Ecc=o})(n.QrCode||(n.QrCode={}))})(Ps||(Ps={}));(n=>{(i=>{const o=class{constructor(d,m){this.modeBits=d,this.numBitsCharCount=m}numCharCountBits(d){return this.numBitsCharCount[Math.floor((d+7)/17)]}};o.NUMERIC=new o(1,[10,12,14]),o.ALPHANUMERIC=new o(2,[9,11,13]),o.BYTE=new o(4,[8,16,16]),o.KANJI=new o(8,[8,10,12]),o.ECI=new o(7,[0,0,0]),i.Mode=o})(n.QrSegment||(n.QrSegment={}))})(Ps||(Ps={}));var Rn=Ps;/**
612 * @license qrcode.react
613 * Copyright (c) Paul O'Shannessy
614 * SPDX-License-Identifier: ISC
615 */var sN={L:Rn.QrCode.Ecc.LOW,M:Rn.QrCode.Ecc.MEDIUM,Q:Rn.QrCode.Ecc.QUARTILE,H:Rn.QrCode.Ecc.HIGH},S1=128,k1="L",_1="#FFFFFF",C1="#000000",E1=!1,A1=1,nN=4,iN=0,rN=.1;function M1(n,i=0){const o=[];return n.forEach(function(c,d){let m=null;c.forEach(function(p,y){if(!p&&m!==null){o.push(`M${m+i} ${d+i}h${y-m}v1H${m+i}z`),m=null;return}if(y===c.length-1){if(!p)return;m===null?o.push(`M${y+i},${d+i} h1v1H${y+i}z`):o.push(`M${m+i},${d+i} h${y+1-m}v1H${m+i}z`);return}p&&m===null&&(m=y)})}),o.join("")}function R1(n,i){return n.slice().map((o,c)=>c<i.y||c>=i.y+i.h?o:o.map((d,m)=>m<i.x||m>=i.x+i.w?d:!1))}function oN(n,i,o,c){if(c==null)return null;const d=n.length+o*2,m=Math.floor(i*rN),p=d/i,y=(c.width||m)*p,x=(c.height||m)*p,f=c.x==null?n.length/2-y/2:c.x*p,g=c.y==null?n.length/2-x/2:c.y*p,v=c.opacity==null?1:c.opacity;let w=null;if(c.excavate){let C=Math.floor(f),T=Math.floor(g),S=Math.ceil(y+f-C),k=Math.ceil(x+g-T);w={x:C,y:T,w:S,h:k}}const D=c.crossOrigin;return{x:f,y:g,h:x,w:y,excavation:w,opacity:v,crossOrigin:D}}function cN(n,i){return i!=null?Math.max(Math.floor(i),0):n?nN:iN}function T1({value:n,level:i,minVersion:o,includeMargin:c,marginSize:d,imageSettings:m,size:p,boostLevel:y}){let x=Ot.useMemo(()=>{const C=(Array.isArray(n)?n:[n]).reduce((T,S)=>(T.push(...Rn.QrSegment.makeSegments(S)),T),[]);return Rn.QrCode.encodeSegments(C,sN[i],o,void 0,void 0,y)},[n,i,o,y]);const{cells:f,margin:g,numCells:v,calculatedImageSettings:w}=Ot.useMemo(()=>{let D=x.getModules();const C=cN(c,d),T=D.length+C*2,S=oN(D,p,C,m);return{cells:D,margin:C,numCells:T,calculatedImageSettings:S}},[x,p,m,c,d]);return{qrcode:x,margin:g,cells:f,numCells:v,calculatedImageSettings:w}}var uN=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),dN=Ot.forwardRef(function(i,o){const c=i,{value:d,size:m=S1,level:p=k1,bgColor:y=_1,fgColor:x=C1,includeMargin:f=E1,minVersion:g=A1,boostLevel:v,marginSize:w,imageSettings:D}=c,T=Pd(c,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:S}=T,k=Pd(T,["style"]),_=D==null?void 0:D.src,U=Ot.useRef(null),A=Ot.useRef(null),G=Ot.useCallback(V=>{U.current=V,typeof o=="function"?o(V):o&&(o.current=V)},[o]),[E,z]=Ot.useState(!1),{margin:K,cells:ie,numCells:ce,calculatedImageSettings:B}=T1({value:d,level:p,minVersion:g,boostLevel:v,includeMargin:f,marginSize:w,imageSettings:D,size:m});Ot.useEffect(()=>{if(U.current!=null){const V=U.current,oe=V.getContext("2d");if(!oe)return;let O=ie;const Q=A.current,ae=B!=null&&Q!==null&&Q.complete&&Q.naturalHeight!==0&&Q.naturalWi
615dth!==0;ae&&B.excavation!=null&&(O=R1(ie,B.excavation));const he=window.devicePixelRatio||1;V.height=V.width=m*he;const me=m/ce*he;oe.scale(me,me),oe.fillStyle=y,oe.fillRect(0,0,ce,ce),oe.fillStyle=x,uN?oe.fill(new Path2D(M1(O,K))):ie.forEach(function(R,P){R.forEach(function(J,le){J&&oe.fillRect(le+K,P+K,1,1)})}),B&&(oe.globalAlpha=B.opacity),ae&&oe.drawImage(Q,B.x+K,B.y+K,B.w,B.h)}}),Ot.useEffect(()=>{z(!1)},[_]);const W=qd({height:m,width:m},S);let re=null;return _!=null&&(re=Ot.createElement("img",{src:_,key:_,style:{display:"none"},onLoad:()=>{z(!0)},ref:A,crossOrigin:B==null?void 0:B.crossOrigin})),Ot.createElement(Ot.Fragment,null,Ot.createElement("canvas",qd({style:W,height:m,width:m,ref:G,role:"img"},k)),re)});dN.displayName="QRCodeCanvas";var D1=Ot.forwardRef(function(i,o){const c=i,{value:d,size:m=S1,level:p=k1,bgColor:y=_1,fgColor:x=C1,includeMargin:f=E1,minVersion:g=A1,boostLevel:v,title:w,marginSize:D,imageSettings:C}=c,T=Pd(c,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:S,cells:k,numCells:_,calculatedImageSettings:U}=T1({value:d,level:p,minVersion:g,boostLevel:v,includeMargin:f,marginSize:D,imageSettings:C,size:m});let A=k,G=null;C!=null&&U!=null&&(U.excavation!=null&&(A=R1(k,U.excavation)),G=Ot.createElement("image",{href:C.src,height:U.h,width:U.w,x:U.x+S,y:U.y+S,preserveAspectRatio:"none",opacity:U.opacity,crossOrigin:U.crossOrigin}));const E=M1(A,S);return Ot.createElement("svg",qd({height:m,width:m,viewBox:`0 0 ${_} ${_}`,ref:o,role:"img"},T),!!w&&Ot.createElement("title",null,w),Ot.createElement("path",{fill:y,d:`M0,0 h${_}v${_}H0z`,shapeRendering:"crispEdges"}),Ot.createElement("path",{fill:x,d:E,shapeRendering:"crispEdges"}),G)});D1.displayName="QRCodeSVG";function L1(n){const i=String(n||"").toLowerCase();return!i||i==="localhost"||i==="127.0.0.1"||i==="[::1]"||i==="::1"}function mN(n){const i=String(n||"").trim();if(!i)return"";try{const o=new URL(i.includes("://")?i:`http://${i}`);return L1(o.hostname)?"":o.origin}catch{return""}}async function Kh(){var m;const[n,i]=await Promise.all([fetch("/__public").then(p=>p.json()).catch(()=>({})),fetch("/__lan").then(p=>p.json()).catch(()=>({}))]),o=mN(n==null?void 0:n.url);if(o)return{origin:o,kind:"public"};if(typeof window<"u"&&!L1(window.location.hostname))return{origin:window.location.origin,kind:"lan"};const c=(n==null?void 0:n.lan)||(i==null?void 0:i.primary)||((m=i==null?void 0:i.addresses)==null?void 0:m[0]),d=typeof window<"u"&&window.location.port?window.location.port:"5173";return c?{origin:`http://${c}:${d}`,kind:"lan"}:{origin:typeof window<"u"?window.location.origin:"",kind:"local"}}function xN(n,i,o){const c=String(n||"").replace(/\/$/,""),d=String(o||"").trim();return/^[a-z0-9]{8,32}$/i.test(d)?`${c}/q/${encodeURIComponent(d)}`:`${c}/powerbank/${encodeURIComponent(String(i||"").trim())}`}const Jh=b1,fN=["High (70%+)","Medium (30-69%)","Low (<30%)"],yd=["Hiil Power Bank 5,000mAh","Hiil Power Bank 10,000mAh","Hiil Power Bank 20,000mAh"];function Wh({status:n}){const i={Available:"bg-emerald-50 text-emerald-600","In Use":"bg-orange-50 text-orange-500",Maintenance:"bg-rose-50 text-rose-500",Charging:"bg-blue-50 text-blue-600",Offline:"bg-slate-100 text-slate-500",Locked:"bg-rose-50 text-rose-600"};return a.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold ${i[n]??"bg-slate-100 text-slate-600"}`,children:n})}function hN({value:n}){const i=n>=70?"bg-emerald-500":n>=30?"bg-amber-400":"bg-rose-500";return a.jsxs("div",{className:"min-w-[72px]",children:[a.jsxs("p",{className:"text-[12px] font-semibold text-slate-800",children:[n,"%"]}),a.jsx("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded-full bg-slate-100",children:a.jsx("div",{className:`h-full rounded-full ${i}`,style:{width:`${n}%`}})})]})}async function pN(n,i){if(!n)return;const o=1024,c=72,d=n.cloneNode(!0);d.setAttribute("xmlns","http://www.w3.org/2000/svg"),d.setAttribute("width",String(o-c*2)),d.setAttribute("height",String(o-c*2));const m=new XMLSerializer().serializeToString(d),p=URL.createObjectURL(new Blob([m],{type:"image/svg+xml;charset=utf-8"}));try{const y=await new Promise((v,w)=>{const D=new Image;D.onload=()=>v(D),D.onerror=()=>w(new Error("Could not render QR image")),D.src=p}),x=document.createElement("canvas");x.width=o,x.height=o;const f=x.getContext("2d");if(!f)return;f.fillStyle="#ffffff",f.fillRect(0,0,o,o),f.drawImage(y,c,c,o-c*2,o-c*2);const g=document.createElement("a");g.href=x.toDataURL("image/png"),g.download=i,g.click()}finally{URL.revokeObjectURL(p)}}function bN({bank:n,onClose:i}){const o=b.useRef(null),c=b.useRef(""),[d,m]=b.useState(""),[p,y]=b.useState("lan"),[x,f]=b.useState(!0),[g,v]=b.useState("");b.useEffect(()=>{let T=!0;f(!0),v(""),c.current="";const S=(A,G,E,z)=>{if(T){if(z&&(c.current=z),A){m(xN(A,n.id,c.current)),y(G);return}E&&(m(E),y(E.includes("localhost")||E.includes("127.0.0.1")?"local":"lan"))}};(async()=>{const[A,G]=await Promise.all([Fw(n.id).catch(()=>null),Kh().catch(()=>({origin:"",kind:"local"}))]);T&&(S(G.origin,G.kind,(A==null?void 0:A.url)||"",(A==null?void 0:A.slug)||""),!G.origin&&!(A!=null&&A.url)&&v("Failed to load QR URL"),f(!1))})();const _=Date.now(),U=window.setInterval(async()=>{const A=await Kh().catch(()=>null);!T||!(A!=null&&A.origin)||(S(A.origin,A.kind,""),(A.kind==="public"||Date.now()-_>6e4)&&window.clearInterval(U))},2e3);return()=>{T=!1,window.clearInterval(U)}},[n.id]);const w=()=>{var T;pN((T=o.current)==null?void 0:T.querySelector("svg"),"hiil-qr.png")},D=()=>{var _;const T=(_=o.current)==null?void 0:_.querySelector("svg");if(!T||!d)return;const S=window.open("","_blank","width=560,height=820");if(!S)return;const k=`${window.location.origin}/logo.png`;S.document.write(`<!DOCTYPE html>
616      <html>
617        <head>
618          <title>Hiil Power Bank</title>
619          <style>
620            @page { size: 80mm 110mm; margin: 6mm; }
621            html, body { margin: 0; padding: 0; background: #fff; }
622            body { font-family: Arial, sans-serif; color: #0f172a; }
623            .card { width: 68mm; margin: 0 auto; text-align: center; }
624            .logo { display: block; width: 48mm; height: auto; margin: 0 auto 3mm; mix-blend-mode: multiply; }
625            svg { width: 52mm; height: 52mm; }
626            .hint { margin-top: 3mm; font-size: 11px; font-weight: 700; }
627            .sub { margin-top: 1mm; font-size: 9px; color: #475569; }
628          </style>
629        </head>
630        <body>
631          <div class="card">
632            <img class="logo" src="${k}" alt="Hiil Power Bank" />
633            ${T.outerHTML}
634            <div class="hint">Scan to rent</div>
635            <div class="sub">Scan garee, lacag bixi, power bank qaado.</div>
636          </div>
637          <script>window.onload = () => { window.focus(); window.print(); }<\/script>
638        </body>
639      </html>`),S.document.close()},C=!!d&&(d.includes("localhost")||d.includes("127.0.0.1"));return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/55 px-4",onClick:i,children:a.jsxs("div",{className:"relative w-full max-w-[360px] rounded-2xl bg-white p-4 pt-5 shadow-[0_24px_80px_rgba(15,40,90,0.28)]",onClick:T=>T.stopPropagation(),children:[a.jsx("button",{type:"button",onClick:i,className:"absolute right-2 top-2 grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-700","aria-label":"Close QR",children:a.jsx(Gt,{className:"h-4 w-4"})}),x?a.jsx("p",{className:"py-16 text-center text-[12px] text-slate-500",children:"Loading QR..."}):g?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-3 text-center text-[12px] text-red-600",children:g}):d?a.jsx("div",{ref:o,className:"mx-auto w-fit bg-white",children:a.jsx(D1,{value:d,size:260,level:"M",includeMargin:!0,bgColor:"#ffffff",fgColor:"#0f172a"})}):null,d&&!x?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[a.jsxs("button",{type:"button",onClick:D,className:"inline-flex h-10 items-center justify-center gap-1.5 rounded-xl bg-[#2f6bff] text-[13px] font-semibold text-white transition hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-60",disabled:C||p==="local",children:[a.jsx(j5,{className:"h-4 w-4"}),"Print"]}),a.jsxs("button",{type:"button",onClick:w,className:"inline-flex h-10 items-center justify-center gap-1.5 rounded-xl border border-slate-200 bg-white text-[13px] font-semibold text-slate-700 transition hover:bg-slate-50",children:[a.jsx(Dn,{className:"h-4 w-4"}),"Download"]})]}),C||p==="local"?a.jsx("p",{className:"mt-3 text-center text-[11px] font-medium text-amber-600",children:"Localhost does not work on phones. Wait for the public QR, then scan again."}):p==="public"?a.jsx("p",{className:"mt-3 text-center text-[11px] text-emerald-600",children:"Print this QR and put it on the machine. Customer scans it to rent."}):a.jsx("p",{className:"mt-3 text-center text-[11px] text-slate-500",children:"Connect the phone to this computer's Wi-Fi, then tap Open in browser."})]}):null]})})}function gN(){const[n,i]=b.useState([]),[o,c]=b.useState([]),[d,m]=b.useState(null),[p,y]=b.useState(!0),[x,f]=b.useState(!1),[g,v]=b.useState(""),[w,D]=b.useState(""),[C,T]=b.useState("all"),[S,k]=b.useState("all"),[_,U]=b.useState("all"),[A,G]=b.useState(null),[E,z]=b.useState(null),[K,ie]=b.useState(""),[ce,B]=b.useState(!1),[W,re]=b.useState(yd[1]),[V,oe]=b.useState(""),[O,Q]=b.useState("100"),[ae,he]=b.useState("Hodan Restaurant"),[me,R]=b.useState("Available"),[P,J]=b.useState(""),le=b.useCallback(async(te=!1)=>{te||y(!0),v("");try{const[Ae,Lt]=await Promise.all([Hw(),gm({search:w,status:C,location:S,battery:_})]);m(Ae),i(Lt.banks),c(Lt.locations)}catch(Ae){v(Ae instanceof Error?Ae.message:"Failed to load power banks"),te||i([])}finally{y(!1)}},[w,C,S,_]);b.useEffect(()=>{const te=setTimeout(()=>{le(!1)},w?300:0),Ae=window.setInterval(()=>le(!0),4e3);return()=>{clearTimeout(te),window.clearInterval(Ae)}},[le,w]);const ue=n,ge=b.useMemo(()=>d?[{label:"Total Power Banks",value:String(d.total.value),delta:d.total.delta,positive:!d.total.delta.startsWith("-"),icon:el,tone:"bg-blue-50 text-blue-600"},{label:"Available",value:String(d.available.value),delta:d.available.delta,positive:!d.available.delta.startsWith("-"),icon:Ut,tone:"bg-emerald-50 text-emerald-600"},{label:"In Use",value:String(d.inUse.value),delta:d.inUse.delta,positive:!d.inUse.delta.startsWith("-"),icon:Xi,tone:"bg-orange-50 text-orange-500"},{label:"Maintenance",value:String(d.maintenance.value),delta:d.maintenance.delta,positive:!d.maintenance.delta.startsWith("-"),icon:Th,tone:"bg-rose-50 text-rose-500"}]:[{label:"Total Power Banks",value:"—",delta:"",positive:!0,icon:el,tone:"bg-blue-50 text-blue-600"},{label:"Available",value:"—",delta:"",positive:!0,icon:Ut,tone:"bg-emerald-50 text-emerald-600"},{label:"In Use",value:"—",delta:"",positive:!0,icon:Xi,tone:"bg-orange-50 text-orange-500"},{label:"Maintenance",value:"—",delta:"",positive:!1,icon:Th,tone:"bg-rose-50 text-rose-500"}],[d]);function Ne(){re(yd[1]),oe(""),Q("100"),he(o[0]||"Hodan Restaurant"),R("Available"),J(""),B(!0)}async function tt(te){te.preventDefault(),J("");const Ae=Number(O);if(!W.trim()){J("Please enter power bank name.");return}if(Number.isNaN(Ae)||Ae<0||Ae>100){J("Battery must be between 0 and 100.");return}f(!0);try{const Lt=await $w({name:W,serial:V,battery:Ae,location:ae,status:me});B(!1),G(Lt),await le()}catch(Lt){J(Lt instanceof Error?Lt.message:"Failed to save power bank")}finally{f(!1)}}async function qe(te){ie(te.id),v("");try{await qw(te.id),(E==null?void 0:E.id)===te.id&&z(null),(A==null?void 0:A.id)===te.id&&G(null),await le()}catch(Ae){v(Ae instanceof Error?Ae.message:"Failed to delete power bank")}finally{ie("")}}return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[a.jsxs("button",{type:"button",onClick:Ne,className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white transition hover:bg-blue-600",children:[a.jsx(Ys,{className:"h-3.5 w-3.5"}),"Add Power Bank"]}),a.jsxs("button",{type:"button",onClick:()=>{const te=n.find(Ae=>Ae.status==="Available")||n[0];te&&G(te)},className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(Ln,{className:"h-3.5 w-3.5"}),"Scan QR Code"]}),a.jsxs("button",{type:"button",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(Dn,{className:"h-3.5 w-3.5"}),"Export"]})]}),g?a.jsx("div",{className:"rounded-xl border border-red-100 bg-red-50 px-3 py-2 text-[12px] text-red-600",children:g}):null,a.jsx(ll,{cols:4,children:ge.map(te=>a.jsx(fa,{label:te.label,value:te.value,icon:te.icon,tone:te.tone,delta:te.delta,positive:te.positive},te.label))}),a.jsx("section",{className:"rounded-xl border border-slate-100 bg-white p-2.5 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("label",{className:"relative min-w-[200px] flex-1",children:[a.jsx(qs,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"h-8 w-full rounded-lg border border-slate-200 bg-[#f7f9fc] pl-9 pr-3 text-[12px] outline-none transition placeholder:text-slate-400 focus:border-blue-400 focus:bg-white focus:ring-2 focus:ring-blue-500/10",placeholder:"Search by ID, serial number, or location...",value:w,onChange:te=>D(te.target.value)})]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:C,onChange:te=>T(te.target.value),children:[a.jsx("option",{value:"all",children:"All Status"}),Jh.map(te=>a.jsx("option",{value:te,children:te},te))]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:S,onChange:te=>k(te.target.value),children:[a.jsx("option",{value:"all",children:"All Locations"}),o.map(te=>a.jsx("option",{value:te,children:te},te))]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:_,onCh
639ange:te=>U(te.target.value),children:[a.jsx("option",{value:"all",children:"All Battery Levels"}),fN.map(te=>a.jsx("option",{value:te,children:te},te))]}),a.jsxs("button",{type:"button",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(Op,{className:"h-3.5 w-3.5"}),"Select date range"]}),a.jsx("button",{type:"button",className:"grid h-8 w-8 place-items-center rounded-lg border border-slate-200 text-slate-500 transition hover:bg-slate-50","aria-label":"Filter settings",children:a.jsx(Yp,{className:"h-3.5 w-3.5"})})]})}),a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900",children:"All Power Banks"}),a.jsxs("span",{className:"rounded-full bg-slate-100 px-2 py-0.5 text-[10.5px] font-medium text-slate-500",children:[ue.length," results"]})]}),a.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 text-[12px] font-semibold text-[#2f6bff] transition hover:text-blue-700",children:[a.jsx(t5,{className:"h-3.5 w-3.5"}),"View Map"]})]}),p?a.jsxs("div",{className:"flex items-center justify-center gap-2 border-t border-slate-100 px-4 py-10 text-[12px] text-slate-500",children:[a.jsx($a,{className:"h-4 w-4 animate-spin"}),"Loading power banks..."]}):null,p?null:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[860px] text-left text-[12px]",children:[a.jsx("thead",{className:"bg-[#f8fafc] text-[10.5px] uppercase tracking-wide text-slate-400",children:a.jsx("tr",{children:["ID","Power Bank","Serial Number","Battery","Location","Status","Actions"].map(te=>a.jsx("th",{className:"px-3 py-2 font-semibold whitespace-nowrap",children:te},te))})}),a.jsx("tbody",{children:ue.map(te=>a.jsxs("tr",{className:"border-t border-slate-100 text-slate-700",children:[a.jsx("td",{className:"px-3 py-2.5 font-semibold text-slate-800",children:te.id}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("span",{className:"grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-slate-100 text-slate-500",children:a.jsx(el,{className:"h-4 w-4"})}),a.jsx("p",{className:"max-w-[180px] truncate font-medium text-slate-800",children:te.name})]})}),a.jsx("td",{className:"px-3 py-2.5 text-slate-500",children:te.serial}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsx(hN,{value:te.battery})}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("span",{className:"inline-flex items-center gap-1 text-slate-600",children:[a.jsx(Tt,{className:"h-3.5 w-3.5 text-[#2f6bff]"}),te.location]})}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsx(Wh,{status:te.status})}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{type:"button",onClick:()=>G(te),className:"grid h-7 w-7 place-items-center rounded-lg border border-blue-100 bg-blue-50 text-blue-600 transition hover:bg-blue-100","aria-label":`QR code for ${te.id}`,children:a.jsx(Ln,{className:"h-3.5 w-3.5"})}),a.jsx("button",{type:"button",onClick:()=>z(te),className:"grid h-7 w-7 place-items-center rounded-lg border border-slate-200 text-slate-500 transition hover:bg-slate-50","aria-label":`Preview ${te.id}`,children:a.jsx(qn,{className:"h-3.5 w-3.5"})}),a.jsx("button",{type:"button",onClick:()=>qe(te),disabled:K===te.id,className:"grid h-7 w-7 place-items-center rounded-lg border border-rose-100 text-rose-500 transition hover:bg-rose-50 disabled:opacity-50","aria-label":`Delete ${te.id}`,children:K===te.id?a.jsx($a,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(na,{className:"h-3.5 w-3.5"})})]})})]},te.id))})]})}),!p&&ue.length===0?a.jsx("div",{className:"border-t border-slate-100 px-4 py-8 text-center text-[12px] text-slate-500",children:"No power banks foun
639d."}):!p&&ue.length>0?a.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-slate-100 px-3.5 py-2.5",children:a.jsxs("p",{className:"text-[11px] text-slate-500",children:["Showing 1 to ",ue.length," of ",ue.length," results"]})}):null]}),A?a.jsx(bN,{bank:A,onClose:()=>G(null)}):null,E?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[480px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)]",children:[a.jsxs("div",{className:"flex items-start justify-between border-b border-slate-100 px-5 py-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:"Power bank preview"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:E.id})]}),a.jsx("button",{type:"button",onClick:()=>z(null),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"Close preview",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"space-y-3 px-5 py-5",children:[a.jsx("p",{className:"text-[15px] font-semibold text-slate-900",children:E.name}),a.jsxs("div",{className:"rounded-xl bg-[#f7f9fc] px-3.5 py-3 text-[13px]",children:[a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"ID"}),a.jsx("span",{className:"font-semibold text-slate-800",children:E.id})]}),a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Serial"}),a.jsx("span",{className:"font-semibold text-slate-800",children:E.serial})]}),a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Battery"}),a.jsxs("span",{className:"font-semibold text-slate-800",children:[E.battery,"%"]})]}),a.jsxs("div",{className:"flex justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Location"}),a.jsx("span",{className:"font-semibold text-slate-800",children:E.location})]}),a.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[a.jsx("span",{className:"text-slate-400",children:"Status"}),a.jsx(Wh,{status:E.status})]})]}),a.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[a.jsx("button",{type:"button",onClick:()=>z(null),className:"h-10 rounded-xl px-4 text-[13px] font-semibold text-slate-500 hover:bg-slate-100",children:"Close"}),a.jsxs("button",{type:"button",onClick:()=>qe(E),className:"inline-flex h-10 items-center gap-1.5 rounded-xl border border-rose-200 px-4 text-[13px] font-semibold text-rose-600 hover:bg-rose-50",children:[a.jsx(na,{className:"h-3.5 w-3.5"}),"Delete"]})]})]})]})}):null,ce?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[480px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)]",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:"Add Power Bank"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:"Register a new power bank in the system"})]}),a.jsx("button",{type:"button",onClick:()=>B(!1),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"Close add power bank",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("form",{className:"space-y-3.5 px-5 py-5",onSubmit:tt,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Power Bank Name"}),a.jsx("select",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",value:W,onChange:te=>re(te.target.value),children:yd.map(te=>a.jsx("option",{value:te,children:te},te))})]}),a.jsxs("label",{className:"block",children:[a.jsxs("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:["Serial Number ",a.jsx("span",{className:"font-normal text-slate-400",children:"(optional)"})]}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",value:V,onChange:te=>oe(te.target.value),placeholder:"Auto: SC-PB-xxxxx"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Battery %"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"number",min:0,max:100,value:O,onChange:te=>Q(te.target.value),required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Status"}),a.jsx("select",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",value:me,onChange:te=>R(te.target.value),children:Jh.map(te=>a.jsx("option",{value:te,children:te},te))})]})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Location"}),a.jsx("select",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",value:ae,onChange:te=>he(te.target.value),children:o.map(te=>a.jsx("option",{value:te,children:te},te))})]}),P?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:P}):null,a.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[a.jsx("button",{type:"button",onClick:()=>B(!1),className:"inline-flex h-10 items-center rounded-xl border border-slate-200 px-4 text-[13px] font-medium text-slate-600 transition hover:bg-slate-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:x,className:"inline-flex h-10 items-center rounded-xl bg-[#2f6bff] px-4 text-[13px] font-semibold text-white transition hover:bg-blue-600 disabled:opacity-60",children:x?"Saving...":"Save Power Bank"})]})]})]})}):null]})}const Yd="somacharge:pricing-updated",Vd=[{id:"1h",label:"1 Hour",hoursLabel:"1 Hour",price:.5,minutes:60},{id:"2h",label:"2 Hours",hoursLabel:"2 Hours",price:.9,minutes:120},{id:"3h",label:"3 Hours",hoursLabel:"3 Hours",price:1.25,minutes:180}];function Gd(n){if(!Array.isArray(n)||n.length===0)return[...Vd];const i=n.map((o,c)=>{const d=o,m=Math.max(1,Math.round(Number(d.minutes)||60)),p=Math.max(0,Number(d.price)||0),y=String(d.label||`${m} min`).trim();return{id:String(d.id||`plan-${c+1}`).trim()||`plan-${c+1}`,label:y,hoursLabel:String(d.hoursLabel||y).trim()||y,price:p,minutes:m}}).filter(o=>o.label&&!Number.isNaN(o.price));return i.length?i:[...Vd]}function yN(){typeof window>"u"||window.dispatchEvent(new CustomEvent(Yd))}async function z1(){var n;try{const i=await _e("/api/pricing");return Gd((n=i.data)==null?void 0:n.plans)}catch{return[...Vd]}}async function ep(n){var c;const i=Gd(n),o=await _e("/api/pricing",{method:"PUT",body:{plans:i}});return yN(),Gd(((c=o.data)==null?void 0:c.plans)??i)}function B1(n){if(typeof window>"u")return()=>{};const i=()=>n();return window.addEventListener(Yd,i),()=>{window.removeEventListener(Yd,i)}}function wo(n){return`$${Number(n||0).toFixed(2)}`}function vN(n){if(n<60)return`${n} Minutes`;const i=n/60;return Number.isInteger(i)?i===1?"1 Hour":`${i} Hours`:`${i.toFixed(1)} Hours`}function tp(){return{id:"",label:"",minutes:"60",price:"1.00"}}function jN(){const[n,i]=b.useState([]),[o,c]=b.useState(!0),[d,m]=b.useState(!1),[p,y]=b.useState(null),[x,f]=b.useState(tp()),[g,v]=b.useState(""),[w,D]=b.useState(!1),[C,T]=b.useState("");async function S(){const E=await z1();i(E),c(!1)}b.useEffect(()=>(S(),B1(()=>{S()})),[]);const k=b.useMemo(()=>{const E=n.map(ce=>
639ce.price),z=E.length?Math.min(...E):0,K=E.length?Math.max(...E):0,ie=E.length?E.reduce((ce,B)=>ce+B,0)/E.length:0;return[{label:"Pricing Plans",value:String(n.length),icon:Vp,tone:"bg-blue-50 text-blue-600",delta:"Active"},{label:"Lowest Price",value:wo(z),icon:fs,tone:"bg-emerald-50 text-emerald-600",delta:"Min"},{label:"Highest Price",value:wo(K),icon:fs,tone:"bg-orange-50 text-orange-500",delta:"Max"},{label:"Average Price",value:wo(ie),icon:xa,tone:"bg-sky-50 text-sky-600",delta:"Avg"}]},[n]);function _(){y(null),f(tp()),v(""),m(!0)}function U(E){y(E.id),f({id:E.id,label:E.label,minutes:String(E.minutes),price:String(E.price)}),v(""),m(!0)}async function A(E){E.preventDefault(),v(""),T("");const z=Number(x.minutes),K=Number(x.price),ie=x.label.trim()||vN(z);if(!Number.isFinite(z)||z<1){v("Enter a valid time in minutes (minimum 1).");return}if(!Number.isFinite(K)||K<0){v("Enter a valid price.");return}const ce={id:p||`plan-${Date.now().toString(36)}`,label:ie,hoursLabel:ie,minutes:Math.round(z),price:Math.round(K*100)/100};D(!0);try{let B;p?B=n.map(re=>re.id===p?ce:re):B=[...n,ce];const W=await ep(B);i(W),m(!1),T(p?"Pricing plan updated. Mobile rent page will use the new values.":"Pricing plan added.")}catch(B){v(B instanceof Error?B.message:"Could not save pricing. Try again.")}finally{D(!1)}}async function G(E){if(n.length<=1){T("Keep at least one pricing plan.");return}try{const z=await ep(n.filter(K=>K.id!==E.id));i(z),T(`Removed ${E.label}.`)}catch(z){v(z instanceof Error?z.message:"Could not delete pricing plan.")}}return a.jsxs("div",{className:"space-y-3",children:[a.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:a.jsxs("button",{type:"button",onClick:_,className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white transition hover:bg-blue-600",children:[a.jsx(Ys,{className:"h-3.5 w-3.5"}),"Add Pricing"]})}),a.jsx(ll,{cols:4,children:k.map(E=>a.jsx(fa,{label:E.label,value:E.value,icon:E.icon,tone:E.tone,delta:E.delta},E.label))}),C?a.jsx("p",{className:"rounded-xl bg-emerald-50 px-3 py-2 text-[12.5px] text-emerald-700",children:C}):null,g&&!d?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:g}):null,a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsx("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:a.jsxs("div",{children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900",children:"Rental Pricing Plans"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"These times and prices appear on Scan Rent (mobile QR)"})]})}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[640px] text-left text-[12px]",children:[a.jsx("thead",{className:"border-y border-slate-100 bg-[#f8fafc] text-[11px] uppercase tracking-wide text-slate-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Plan"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Duration"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Price"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Mobile Preview"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Actions"})]})}),a.jsx("tbody",{children:o?a.jsx("tr",{children:a.jsx("td",{colSpan:5,className:"px-3.5 py-8 text-center text-slate-400",children:"Loading pricing..."})}):n.map(E=>a.jsxs("tr",{className:"border-b border-slate-50 hover:bg-slate-50/60",children:[a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-lg bg-blue-50 text-[#2f6bff]",children:a.jsx(xa,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-800",children:E.label}),a.jsx("p",{className:"text-[11px] text-slate-400",children:E.id})]})]})}),a.jsxs("td",{className:"px-3.5 py-3 font-medium text-slate-700",children:[E.minutes," min"]}),a.jsx("td",{className:"px-3.5 py-3 text-[13px] font-bold text-emerald-600",children:wo(E.price)}),a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2 py-0.5 text-[11px] font-medium text-emerald-700",children:[a.jsx(Ut,{className:"h-3 w-3"}),"Shows on ScanRentPage"]})}),a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsxs("button",{type:"button",onClick:()=>U(E),className:"inline-flex h-8 items-center gap-1 rounded-lg border border-slate-200 bg-white px-2.5 text-[11px] font-semibold text-slate-600 transition hover:bg-slate-50",children:[a.jsx(Go,{className:"h-3.5 w-3.5"}),"Update"]}),a.jsx("button",{type:"button",onClick:()=>G(E),className:"grid h-8 w-8 place-items-center rounded-lg border border-slate-200 text-slate-400 transition hover:bg-rose-50 hover:text-rose-500","aria-label":`Delete ${E.label}`,children:a.jsx(na,{className:"h-3.5 w-3.5"})})]})})]},E.id))})]})})]}),d?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[440px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)]",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:p?"Update Pricing":"Add Pricing"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:"Change rental time and money shown on mobile Scan Rent"})]}),a.jsx("button",{type:"button",onClick:()=>m(!1),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"Close pricing form",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("form",{className:"space-y-3.5 px-5 py-5",onSubmit:A,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Plan name"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",value:x.label,onChange:E=>f(z=>({...z,label:E.target.value})),placeholder:"e.g. 1 Hour"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Time (minutes)"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"number",min:1,step:1,value:x.minutes,onChange:E=>f(z=>({...z,minutes:E.target.value})),required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Price ($)"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"number",min:0,step:.
63901,value:x.price,onChange:E=>f(z=>({...z,price:E.target.value})),required:!0})]})]}),g?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:g}):null,a.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[a.jsx("button",{type:"button",onClick:()=>m(!1),className:"inline-flex h-10 items-center rounded-xl border border-slate-200 px-4 text-[13px] font-medium text-slate-600 transition hover:bg-slate-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:w,className:"inline-flex h-10 items-center rounded-xl bg-[#2f6bff] px-4 text-[13px] font-semibold text-white transition hover:bg-blue-600 disabled:opacity-70",children:w?"Saving...":p?"Update Pricing":"Save Pricing"})]})]})]})}):null]})}const Ho=[{id:"weekly-basic",title:"Weekly Basic",accent:"Basic",weeks:1,weeksLabel:"1 Week",duration:"Rental: 1 Week",price:2.5,feature:"1 active rental",recommended:!1,blurb:"Get 1 week of rental access with your membership plan."},{id:"weekly-plus",title:"Weekly Plus",accent:"Plus",weeks:1,weeksLabel:"1 Week",duration:"Rental: 1 Week",price:4,feature:"2 active rentals",recommended:!0,blurb:"Get 1 week of rental access with your membership plan."},{id:"weekly-premium",title:"Weekly Premium",accent:"Premium",weeks:1,weeksLabel:"1 Week",duration:"Rental: 1 Week",price:6,feature:"Unlimited swaps",recommended:!1,blurb:"Get 1 week of rental access with your membership plan."}],Xd="somacharge:membership-updated";function Qd(n){const i=Math.max(1,Math.round(Number(n)||1));return i===1?"1 Week":`${i} Weeks`}function Id(n){if(!Array.isArray(n)||n.length===0)return[...Ho];const i=n.map((o,c)=>{const d=o||{},m=String(d.title||"").trim(),p=Math.max(1,Math.round(Number(d.weeks)||1)),y=Qd(p);return{id:String(d.id||`membership-${c+1}`).trim(),title:m,accent:String(d.accent||m.split(" ").pop()||m).trim(),weeks:p,weeksLabel:String(d.weeksLabel||y),duration:String(d.duration||`Rental: ${y}`),price:Math.max(0,Number(d.price)||0),feature:String(d.feature||"1 active rental").trim(),recommended:!!d.recommended,blurb:String(d.blurb||`Get ${y.toLowerCase()} of rental access with your membership plan.`)}}).filter(o=>o.title);return i.length?i:[...Ho]}function wN(){typeof window>"u"||window.dispatchEvent(new CustomEvent(Xd))}async function vm(){var n;try{const i=await _e("/api/membership");return Id((n=i.data)==null?void 0:n.plans)}catch{return[...Ho]}}async function ap(n){var c;const i=Id(n),o=await _e("/api/membership",{method:"PUT",body:{plans:i}});return wN(),Id(((c=o.data)==null?void 0:c.plans)??i)}function NN(n){if(typeof window>"u")return()=>{};const i=()=>n();return window.addEventListener(Xd,i),()=>window.removeEventListener(Xd,i)}function Pi(n){return`$${Number(n||0).toFixed(2)}`}async function SN({phone:n,fullName:i,pin:o,planId:c,amount:d}){return await _e("/api/merchant/pin-access",{method:"POST",body:{phone:n,customer:i,pin:o,planId:c,amount:d}})}async function kN({phone:n,fullName:i,pin:o,id:c}){var m,p;return c?(m=(await _e(`/api/customers/pins/${c}`,{method:"PATCH",body:{phone:n,fullName:i,pin:o}})).data)==null?void 0:m.customer:(p=(await _e("/api/customers/pin",{method:"POST",body:{phone:n,fullName:i,pin:o}})).data)==null?void 0:p.customer}async function _N(n){await _e(`/api/customers/pins/${n}`,{method:"DELETE"})}async function CN(){var n;try{return((n=(await _e("/api/customers/pins")).data)==null?void 0:n.pins)||[]}catch{return[]}}function lp(){return{title:"",weeks:"1",price:"4.00",feature:"1 active rental",recommended:!1}}function EN(){const[n,i]=b.useState([]),[o,c]=b.useState(!0),[d,m]=b.useState(!1),[p,y]=b.useState(null),[x,f]=b.useState(lp()),[g,v]=b.useState(""),[w,D]=b.useState(!1),[C,T]=b.useState("");async function S(){const E=await vm();i(E),c(!1)}b.useEffect(()=>(S(),NN(()=>{S()})),[]);const k=b.useMemo(()=>{const E=n.map(ie=>ie.price),z=E.length?Math.min(...E):0,K=E.length?Math.max(...E):0;return[{label:"Membership Cards",value:String(n.length),icon:xs,tone:"bg-blue-50 text-blue-600",delta:"Active"},{label:"Lowest Price",value:Pi(z),icon:fs,tone:"bg-emerald-50 text-emerald-600",delta:"Min"},{label:"Highest Price",value:Pi(K),icon:fs,tone:"bg-orange-50 text-orange-500",delta:"Max"}]},[n]);function _(){y(null),f(lp()),v(""),m(!0)}function U(E){y(E.id),f({title:E.title,weeks:String(E.weeks),price:String(E.price),feature:E.feature,recommended:!!E.recommended}),v(""),m(!0)}async function A(E){E.preventDefault(),v(""),T("");const z=x.title.trim(),K=Number(x.weeks),ie=Number(x.price);if(!z){v("Enter a plan name, for example Weekly Basic.");return}if(!Number.isFinite(K)||K<1){v("Weeks must be at least 1.");return}if(!Number.isFinite(ie)||ie<0){v("Enter a valid total price.");return}const ce=Qd(K),B={id:p||`membership-${Date.now().toString(36)}`,title:z,accent:z.split(" ").pop()||z,weeks:Math.round(K),weeksLabel:ce,duration:`Rental: ${ce}
639`,price:Math.round(ie*100)/100,feature:x.feature.trim()||"1 active rental",recommended:!!x.recommended};D(!0);try{const W=p?n.map(V=>V.id===p?{...V,...B}:V):[...n,B],re=await ap(W);i(re),m(!1),T(p?"Membership card updated. Mobile Membership will use the new values.":"New membership card added.")}catch(W){v(W instanceof Error?W.message:"Could not save membership. Try again.")}finally{D(!1)}}async function G(E){if(n.length<=1){T("Keep at least one membership card.");return}try{const z=await ap(n.filter(K=>K.id!==E.id));i(z),T(`Removed ${E.title}.`)}catch(z){v(z instanceof Error?z.message:"Could not delete membership card.")}}return a.jsxs("div",{className:"space-y-3",children:[a.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:a.jsxs("button",{type:"button",onClick:_,className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white transition hover:bg-blue-600",children:[a.jsx(Ys,{className:"h-3.5 w-3.5"}),"Add Card"]})}),a.jsx(ll,{cols:3,children:k.map(E=>a.jsx(fa,{label:E.label,value:E.value,icon:E.icon,tone:E.tone,delta:E.delta},E.label))}),C?a.jsx("p",{className:"rounded-xl bg-emerald-50 px-3 py-2 text-[12.5px] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300",children:C}):null,g&&!d?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:g}):null,a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)] dark:border-slate-700 dark:bg-[#151d2e]",children:[a.jsx("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:a.jsxs("div",{children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900 dark:text-slate-100",children:"Membership Cards"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"Change name, weeks, rental duration, and total price shown on mobile Membership"})]})}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[720px] text-left text-[12px]",children:[a.jsx("thead",{className:"border-y border-slate-100 bg-[#f8fafc] text-[11px] uppercase tracking-wide text-slate-400 dark:border-slate-700 dark:bg-[#10182a]",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Plan"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Weeks"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Rental"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Total Price"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Mobile"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Actions"})]})}),a.jsx("tbody",{children:o?a.jsx("tr",{children:a.jsx("td",{colSpan:6,className:"px-3.5 py-8 text-center text-slate-400",children:"Loading membership..."})}):n.map(E=>a.jsxs("tr",{className:"border-b border-slate-50 hover:bg-slate-50/60 dark:border-slate-800 dark:hover:bg-white/5",children:[a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-lg bg-blue-50 text-[#2f6bff] dark:bg-blue-500/15",children:a.jsx(xs,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-800 dark:text-slate-100",children:E.title}),a.jsx("p",{className:"text-[11px] text-slate-400",children:E.feature})]})]})}),a.jsx("td",{className:"px-3.5 py-3 font-medium text-slate-700 dark:text-slate-200",children:E.weeks}),a.jsx("td",{className:"px-3.5 py-3 font-medium text-slate-700 dark:text-slate-200",children:E.duration}),a.jsx("td",{className:"px-3.5 py-3 text-[13px] font-bold text-emerald-600",children:Pi(E.price)}),a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2 py-0.5 text-[11px] font-medium text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300",children:[a.jsx(Ut,{className:"h-3 w-3"}),E.recommended?"Recommended":"Membership page"]})}),a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsxs("button",{type:"button",onClick:()=>U(E),className:"inline-flex h-8 items-center gap-1 rounded-lg border border-slate-200 bg-white px-2.5 text-[11px] font-semibold text-slate-600 transition hover:bg-slate-50 dark:border-slate-600 dar
639k:bg-transparent dark:text-slate-200",children:[a.jsx(Go,{className:"h-3.5 w-3.5"}),"Update"]}),a.jsx("button",{type:"button",onClick:()=>G(E),className:"grid h-8 w-8 place-items-center rounded-lg border border-slate-200 text-slate-400 transition hover:bg-rose-50 hover:text-rose-500 dark:border-slate-600","aria-label":`Delete ${E.title}`,children:a.jsx(na,{className:"h-3.5 w-3.5"})})]})})]},E.id))})]})})]}),d?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[440px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)] dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-700",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900 dark:text-slate-100",children:p?"Update Membership Card":"Add Membership Card"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:"Edit name, weeks, rental duration, and total price"})]}),a.jsx("button",{type:"button",onClick:()=>m(!1),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"Close membership form",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("form",{className:"space-y-3.5 px-5 py-5",onSubmit:A,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700 dark:text-slate-200",children:"Plan name"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10 dark:border-slate-600 dark:bg-[#0b1220] dark:text-white",value:x.title,onChange:E=>f(z=>({...z,title:E.target.value})),placeholder:"e.g. Weekly Basic",required:!0})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700 dark:text-slate-200",children:"Weeks"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10 dark:border-slate-600 dark:bg-[#0b1220] dark:text-white",type:"number",min:1,step:1,value:x.weeks,onChange:E=>f(z=>({...z,weeks:E.target.value})),required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700 dark:text-slate-200",children:"Total price ($)"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10 dark:border-slate-600 dark:bg-[#0b1220] dark:text-white",type:"number",min:0,step:.01,value:x.price,onChange:E=>f(z=>({...z,price:E.target.value})),required:!0})]})]}),a.jsxs("p",{className:"rounded-xl bg-slate-50 px-3 py-2 text-[12px] text-slate-500 dark:bg-white/5",children:["Rental duration on mobile: ",a.jsxs("span",{className:"font-semibold text-slate-700 dark:text-slate-200",children:["Rental: ",Qd(x.weeks)]})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700 dark:text-slate-200",children:"Card feature"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10 dark:border-slate-600 dark:bg-[#0b1220] dark:text-white",value:x.feature,onChange:E=>f(z=>({...z,feature:E.target.value})),placeholder:"e.g. 1 active rental"})]}),a.jsxs("label",{className:"flex items-center gap-2 text-[13px] font-medium text-slate-700 dark:text-slate-200",children:[a.jsx("input",{type:"checkbox",checked:x.recommended,onChange:E=>f(z=>({...z,recommended:E.target.checked}))}),"Mark as recommended card"]}),g?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:g}):null,a.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[a.jsx("button",{type:"button",onClick:()=>m(!1),className:"inline-flex h-10 items-center rounded-xl border border-slate-200 px-4 text-[13px] font-medium text-slate-600 transition hover:bg-slate-50 dark:border-slate-600 dar
639k:text-slate-200",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:w,className:"inline-flex h-10 items-center rounded-xl bg-[#2f6bff] px-4 text-[13px] font-semibold text-white transition hover:bg-blue-600 disabled:opacity-70",children:w?"Saving...":p?"Update Card":"Save Card"})]})]})]})}):null]})}function AN(){const c=2*Math.PI*79;return a.jsxs("div",{className:"relative mx-auto grid h-[168px] w-[168px] place-items-center",children:[a.jsx("span",{className:"hormuud-pay-glow pointer-events-none absolute inset-[-10px] rounded-full"}),a.jsxs("svg",{viewBox:"0 0 168 168",className:"h-full w-full -rotate-90","aria-hidden":!0,children:[a.jsx("circle",{cx:168/2,cy:168/2,r:79,fill:"none",stroke:"#E5E7EB",strokeWidth:10}),a.jsx("g",{className:"hormuud-pay-spin-g",style:{transformOrigin:`${168/2}px ${168/2}px`},children:a.jsx("circle",{cx:168/2,cy:168/2,r:79,fill:"none",stroke:"#00A651",strokeWidth:10,strokeLinecap:"round",strokeDasharray:`${c*.32} ${c}`})})]}),a.jsxs("div",{className:"absolute inset-[22px] grid place-items-center overflow-hidden rounded-full bg-[#EAF8F0]",children:[a.jsx("span",{className:"hormuud-pay-pulse absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(0,166,81,0.18),transparent_70%)]"}),a.jsx("img",{src:"/hormuud-evc.png",alt:"",className:"relative h-12 w-12 rounded-xl object-cover"})]})]})}function MN({phone:n,duration:i,amount:o}){const c=[{icon:Pa,label:"Phone Number",value:n,accent:!1},{icon:xa,label:"Rental Duration",value:i,accent:!1},{icon:tr,label:"Amount",value:o,accent:!0}];return a.jsx("div",{className:"overflow-hidden rounded-[18px] border border-[#E5E7EB] bg-white",children:c.map((d,m)=>{const p=d.icon;return a.jsxs("div",{className:`flex items-center justify-between gap-3 px-3.5 py-3 ${m<c.length-1?"border-b border-[#E5E7EB]":""}`,children:[a.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2.5",children:[a.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-full bg-[#EAF8F0] text-[#00A651]",children:a.jsx(p,{className:"h-4 w-4"})}),a.jsx("span",{className:"text-[12px] font-medium text-slate-500",children:d.label})]}),a.jsx("span",{className:`max-w-[52%] truncate text-right text-[13px] font-bold ${d.accent?"text-[#00A651]":"text-[#14213D]"}`,children:d.value})]},d.label)})})}function RN(){return a.jsxs("div",{className:"flex items-start gap-3 rounded-[18px] bg-[#EAF8F0] px-3.5 py-3.5",children:[a.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-full bg-[#00A651] text-white",children:a.jsx($5,{className:"h-5 w-5"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"text-[13px] font-bold text-[#00A651]",children:"Secure & Safe Payment"}),a.jsx("p",{className:"mt-0.5 text-[11.5px] leading-relaxed text-slate-600",children:"Your payment is protected with end-to-end encryption and secure system."})]}),a.jsx(qa,{className:"mt-1 h-4 w-4 shrink-0 text-[#00A651]/50"})]})}function jm({phone:n,duration:i,amount:o}){return a.jsxs("div",{className:"hormuud-pay fixed inset-0 z-[60] flex items-end justify-center p-3 sm:items-center sm:p-4",children:[a.jsx("div",{className:"absolute inset-0 bg-[#14213D]/55 backdrop-blur-md","aria-hidden":!0}),a.jsxs("div",{className:"hormuud-pay-sheet relative z-10 mb-[env(safe-area-inset-bottom)] flex max-h-[min(92dvh,720px)] w-full max-w-[400px] flex-col overflow-hidden rounded-[30px] bg-white shadow-[0_24px_80px_rgba(20,33,61,0.28)]",role:"dialog","aria-modal":"true","aria-labelledby":"hormuud-processing-title","aria-busy":"true",children:[a.jsx("button",{type:"button",disabled:!0,className:"absolute right-3 top-3 z-10 grid h-8 w-8 place-items-center rounded-full bg-[#F5F7FA] text-slate-400","aria-label":"Payment is processing",title:"Please wait while payment is processing",children:a.jsx(Gt,{className:"h-4 w-4"})}),a.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 pb-5 pt-6 [font-family:Inter,system-ui,sans-serif]",children:[a.jsxs("div",{className:"flex flex-col items-center text-center",children:[a.jsx("img",{src:"/hormuud-evc.png",alt:"Hormuud Telecom",className:"h-12 w-12 rounded-2xl object-cover shadow-[0_8px_20px_rgba(0,166,81,0.22)]"}),a.jsx("p",{className:"mt-3 text-[13px] font-extrabold tracking-[0.18em] text-[#14213D]",children:"HORMUUD TELCOM"}),a.jsx("p",{className:"mt-0.5 text-[11px] font-semibold tracking-[0.16em] text-[#00A651]",children:"MOBILE MONEY"})]}),a.jsxs("h2",{id:"hormuud-processing-title",className:"mt-4 text-center text-[22px] font-extrabold leading-tight text-[#14213D]",children:["Processing ",a.jsx("span",{className:"text-[#00A651]",children:"Payment"})]}),a.jsxs("div",{className:"mt-2 flex items-center justify-center gap-1.5","aria-hidden":!0,
639children:[a.jsx("span",{className:"hormuud-pay-dot h-1.5 w-1.5 rounded-full bg-[#00A651]"}),a.jsx("span",{className:"hormuud-pay-dot h-1.5 w-1.5 rounded-full bg-[#00A651]"}),a.jsx("span",{className:"hormuud-pay-dot h-1.5 w-1.5 rounded-full bg-[#00A651]"})]}),a.jsx("p",{className:"mt-2 text-center text-[12.5px] leading-relaxed text-slate-500",children:"Fadlan sug, lacagtaada ayaa la xaqiijinayaa"}),a.jsxs("div",{className:"mt-5",children:[a.jsx(AN,{}),a.jsx("p",{className:"mt-3 text-center text-[12px] leading-relaxed text-slate-500",children:"Please wait while we process your payment securely."})]}),a.jsx("div",{className:"mt-4",children:a.jsx(MN,{phone:n,duration:i,amount:o})}),a.jsx("div",{className:"mt-3",children:a.jsx(RN,{})})]})]})]})}function sp(){return{fullName:"",phone:"",pin:""}}function TN(n){if(!n)return"—";const i=new Date(n);return Number.isNaN(i.getTime())?"—":i.toLocaleString()}function DN(){const[n,i]=b.useState([]),[o,c]=b.useState(!0),[d,m]=b.useState(""),[p,y]=b.useState(""),[x,f]=b.useState(!1),[g,v]=b.useState(null),[w,D]=b.useState(sp()),[C,T]=b.useState(!1),[S,k]=b.useState(""),[_,U]=b.useState(null),A=Number((_==null?void 0:_.price)||0),G=(_==null?void 0:_.weeksLabel)||(Number(_==null?void 0:_.weeks)===1?"1 Week":`${Math.max(1,Number(_==null?void 0:_.weeks)||1)} Weeks`);async function E(){const[B,W]=await Promise.all([CN(),vm()]);i(B);const re=W.find(V=>V.recommended)||W[0]||null;U(re),c(!1)}b.useEffect(()=>{E();const B=window.setInterval(()=>{document.hidden||E()},4e3);return()=>window.clearInterval(B)},[]);const z=b.useMemo(()=>[{label:"PIN Records",value:String(n.length),icon:Dt,tone:"bg-emerald-50 text-emerald-600",delta:"Saved"},{label:"Customers",value:String(new Set(n.map(B=>B.phone||B.phoneNumber)).size),icon:sa,tone:"bg-blue-50 text-blue-600",delta:"With PIN"},{label:"Security",value:"4-digit",icon:qa,tone:"bg-violet-50 text-violet-600",delta:"PIN"}],[n]);function K(B){v((B==null?void 0:B.id)||null),D(B?{fullName:B.fullName||B.name||"",phone:String(B.phone||B.phoneNumber||"").replace(/^\+252\s?/,""),pin:B.pin||""}:sp()),m(""),f(!0)}async function ie(B){var oe,O;B.preventDefault();const W=w.fullName.replace(/\s+/g," ").trim(),re=w.phone.replace(/\D/g,"").slice(-9),V=w.pin.replace(/\D/g,"").slice(0,4);if(W.length<2){m("Enter the customer name.");return}if(re.length<9){m("Enter a valid 9-digit phone number.");return}if(!/^\d{4}$/.test(V)){m("PIN must be exactly 4 digits.");return}T(!0),m("");try{if(g)await kN({id:g,fullName:W,phone:`+252 ${re}`,pin:V}),y("PIN data updated.");else{const Q=await SN({fullName:W,phone:`+252 ${re}`,pin:V,planId:_==null?void 0:_.id,amount:A}),ae=(oe=Q==null?void 0:Q.data)==null?void 0:oe.payment;((O=Q==null?void 0:Q.data)==null?void 0:O.charged)!==!1&&Oo({id:(ae==null?void 0:ae.id)||(ae==null?void 0:ae.paymentId)||(ae==null?void 0:ae.transactionId),user:W,phone:`+252 ${re}`,amount:(ae==null?void 0:ae.amount)??A,powerBank:"PIN Access"}),y((Q==null?void 0:Q.message)||"Payment confirmed. PIN is ready. Customer can use any Available power bank anytime.")}await E(),f(!1)}catch(Q){const ae=Q instanceof Error?Q.message:"Could not save PIN data.";m(ae),g||bm({user:W,phone:`+252 ${re}`,amount:A,powerBank:"PIN Access"})}finally{T(!1)}}async function ce(B){const W=B.id||B.customerId;if(!(!W||S)){k(W),m("");try{await _N(W),await E(),y(`Deleted PIN for ${B.fullName||B.name||"customer"}.`)}catch(re){m(re instanceof Error?re.message:"Could not delete PIN data.")}finally{k("")}}}return a.jsxs("div",{className:"space-y-3",children:[a.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:a.jsxs("button",{type:"button",onClick:()=>K(null),className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white transition hover:bg-blue-600",children:[a.jsx(Ys,{className:"h-3.5 w-3.5"}),"Save Data"]})}),a.jsx(ll,{cols:3,children:z.map(B=>a.jsx(fa,{label:B.label,value:B.value,icon:B.icon,tone:B.tone,delta:B.delta},B.label))}),p?a.jsx("p",{className:"rounded-xl bg-emerald-50 px-3 py-2 text-[12.5px] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300",children:p}):null,d&&!x?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:d}):null,a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)] dark:border-slate-700 dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2 px-3.5 py-2.5",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900 dark:text-slate-100",children:"Security PIN"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"4-digit PIN data saved for Week Plus customers"})]}),a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2 py-0.5 text-[11px] font-semibold text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300",children:[a.jsx(Dt,{className:"h-3 w-3"}),n.length," set"]})]}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-[12px]",children:[a.jsx("thead",{className:"border-y border-slate-100 bg-[#f8fafc] text-[11px] uppercase tracking-wide text-slate-400 dark:border-slate-700 dark:bg-[#10182a]",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Customer"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Phone"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"PIN"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Data"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Actions"})]})}),a.jsx("tbody",{children:o?a.jsx("tr",{children:a.jsx("td",{colSpan:5,className:"px-3.5 py-8 text-center text-slate-400",children:"Loading PIN data..."})}):n.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:5,className:"px-3.5 py-8 text-center text-slate-400",children:"No customer PIN re
639cords yet."})}):n.map(B=>a.jsxs("tr",{className:"border-b border-slate-50 hover:bg-slate-50/60 dark:border-slate-800 dark:hover:bg-white/5",children:[a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-lg bg-emerald-50 text-emerald-600 dark:bg-emerald-500/15",children:a.jsx(qa,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-800 dark:text-slate-100",children:B.fullName||B.name||"Customer"}),a.jsx("p",{className:"text-[11px] text-slate-400",children:B.customerId||B.id})]})]})}),a.jsx("td",{className:"px-3.5 py-3 font-medium text-slate-700 dark:text-slate-200",children:B.phone||B.phoneNumber}),a.jsx("td",{className:"px-3.5 py-3 font-mono text-[14px] font-bold tracking-[0.18em] text-emerald-600",children:B.pin||"****"}),a.jsx("td",{className:"px-3.5 py-3 whitespace-nowrap text-slate-600 dark:text-slate-300",children:TN(B.pinSetAt||B.updatedAt||B.createdAt)}),a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsxs("button",{type:"button",onClick:()=>K(B),className:"inline-flex h-8 items-center gap-1 rounded-lg border border-slate-200 bg-white px-2.5 text-[11px] font-semibold text-slate-600 transition hover:bg-slate-50 dark:border-slate-600 dark:bg-transparent dark:text-slate-200",children:[a.jsx(Go,{className:"h-3.5 w-3.5"}),"Update"]}),a.jsx("button",{type:"button",onClick:()=>ce(B),disabled:S===(B.id||B.customerId),className:"grid h-8 w-8 place-items-center rounded-lg border border-slate-200 text-slate-400 transition hover:bg-rose-50 hover:text-rose-500 dark:border-slate-600 disabled:opacity-50","aria-label":`Delete PIN for ${B.fullName||B.name||"customer"}`,children:a.jsx(na,{className:"h-3.5 w-3.5"})})]})})]},B.id||B.customerId))})]})})]}),x?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[440px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)] dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-700",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900 dark:text-slate-100",children:g?"Update PIN Data":"Save PIN Data"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:g?"Update customer, phone number, and 4-digit PIN":"Pay with Hormuud, then this PIN can use any Available power bank anytime"})]}),a.jsx("button",{type:"button",onClick:()=>f(!1),disabled:C,className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600 disabled:opacity-50","aria-label":"Close PIN form",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("form",{className:"space-y-3.5 px-5 py-5",onSubmit:ie,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700 dark:text-slate-200",children:"Customer"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10 dark:border-slate-600 dark:bg-[#0b1220] dark:text-white",value:w.fullName,onChange:B=>D(W=>({...W,fullName:B.target.value})),placeholder:"Full name",required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700 dark:text-slate-200",children:"Phone"}),a.jsxs("div",{className:"flex h-11 items-center gap-2 rounded-xl border border-slate-200 px-3 dark:border-slate-600 dark:bg-[#0b1220]",children:[a.jsx("span",{className:"text-[13px] font-semibold text-slate-500",children:"+252"}),a.jsx("input",{className:"h-full min-w-0 flex-1 bg-transparent text-[14px] outline-none dark:text-white",inputMode:"numeric",value:w.phone,onChange:B=>D(W=>({...W,phone:B.target.value.replace(/\D/g,"").slice(0,9)})),placeholder:"61XXXXXXX",required:!0})]})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700 dark:text-slate-200",children:"PIN number"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[18px] font-bold tracking-[0.35em] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10 dark:border-slate-600 dar
639k:bg-[#0b1220] dark:text-white",inputMode:"numeric",maxLength:4,value:w.pin,onChange:B=>D(W=>({...W,pin:B.target.value.replace(/\D/g,"").slice(0,4)})),placeholder:"1234",required:!0})]}),g?null:a.jsxs("div",{className:"rounded-xl border border-emerald-100 bg-emerald-50 px-3 py-3 text-[12.5px] text-emerald-800",children:[a.jsxs("p",{className:"font-semibold",children:["Hormuud will be asked to pay ",Pi(A)]}),a.jsx("p",{className:"mt-1 text-emerald-700",children:"After payment, this PIN stays available. The customer can rent any Available power bank whenever they want — no extra charge."}),a.jsxs("p",{className:"mt-1 font-medium",children:[(_==null?void 0:_.title)||"Membership"," · ",G]})]}),d?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:d}):null,a.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[a.jsx("button",{type:"button",onClick:()=>f(!1),disabled:C,className:"inline-flex h-10 items-center rounded-xl border border-slate-200 px-4 text-[13px] font-medium text-slate-600 transition hover:bg-slate-50 dark:border-slate-600 dark:text-slate-200 disabled:opacity-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:C,className:"inline-flex h-10 items-center rounded-xl bg-[#2f6bff] px-4 text-[13px] font-semibold text-white transition hover:bg-blue-600 disabled:opacity-70",children:C?g?"Saving...":"Asking Hormuud...":g?"Update":"Save Data"})]})]})]})}):null,C&&!g?a.jsx(jm,{phone:`+252 ${String(w.phone||"").replace(/\D/g,"").slice(-9)}`,duration:G,amount:Pi(A)}):null]})}function LN(n){return(n||[]).map(i=>({id:i.id||i.orderId,customer:i.customer||i.fullName||i.customerName||"",phone:i.phone,location:i.location,powerBank:i.bank||i.powerBank,status:i.status,time:i.createdAt?new Date(i.createdAt).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"",lat:i.lat,lng:i.lng,lastGpsAt:i.lastGpsAt}))}function zN(n){const i=On(n)||n;return i==="In Use"?"bg-orange-50 text-orange-500":n==="Successful"?"bg-emerald-50 text-emerald-600":i==="Returned"?"bg-teal-50 text-teal-600":n==="Available"?"bg-emerald-50 text-emerald-600":n==="Failed"||n==="Lost"?"bg-rose-50 text-rose-500":"bg-slate-100 text-slate-600"}function BN(n){return n.split(" ").filter(Boolean).slice(0,2).map(i=>{var o;return((o=i[0])==null?void 0:o.toUpperCase())||""}).join("")||"SC"}function ON(){const[n,i]=b.useState([]),[o,c]=b.useState(0),[d,m]=b.useState(""),[p,y]=b.useState("all"),[x,f]=b.useState("all"),[g,v]=b.useState(null);b.useEffect(()=>{let S=!0;async function k(){var A;try{const G=await _e("/api/marches");if(!S)return;i(LN(((A=G==null?void 0:G.data)==null?void 0:A.orders)||[]))}catch{S&&i([])}}k();const _=window.setInterval(k,4e3),U=()=>{document.hidden||k()};return document.addEventListener("visibilitychange",U),window.addEventListener("focus",U),()=>{S=!1,window.clearInterval(_),document.removeEventListener("visibilitychange",U),window.removeEventListener("focus",U)}},[]),b.useEffect(()=>{let S=!0;return gm().then(k=>{S&&c(k.banks.length)}).catch(()=>{S&&c(0)}),()=>{S=!1}},[n]);const w=b.useMemo(()=>[...new Set([...p1,...n.map(k=>k.location)])],[n]),D=b.useMemo(()=>{const S=d.trim().toLowerCase();return n.filter(k=>{const _=!S||k.customer.toLowerCase().includes(S)||k.phone.toLowerCase().includes(S)||k.location.toLowerCase().includes(S)||k.powerBank.toLowerCase().includes(S),U=p==="all"||k.location===p,A=On(k.status)||k.status,G=x==="all"||A===x||k.status===x;return _&&U&&G})},[n,d,p,x]),C=b.useMemo(()=>{const S=n.filter(A=>A.status==="Active"||A.status==="In Use"||A.status==="Locked").length,k=new Set(n.filter(A=>A.status==="Active"||A.status==="In Use"||A.status==="Locked").map(A=>A.phone)).size,_=new Set(n.map(A=>A.location)).size,U=o;return[{label:"Locations",value:String(_||w.length),icon:Tt,tone:"bg-blue-50 text-blue-600",delta:"Sites"},{label:"People Using",value:String(k),icon:sa,tone:"bg-emerald-50 text-emerald-600",delta:"Users"},{label:"Active Now",value:String(S),icon:Xt,tone:"bg-orange-50 text-orange-500",delta:"In use"},{label:"Power Banks",value:String(U),icon:el,tone:"bg-sky-50 text-sky-600",delta:"Devices"}]},[n,o,w.length]),T=b.useMemo(()=>{const S=n.filter(_=>Number.isFinite(Number(_.lat))&&Number.isFinite(Number(_.lng))).filter(_=>["Active","In Use","Locked"].includes(_.status)).sort((_,U)=>new Date(U.lastGpsAt||U.time||0)-new Date(_.lastGpsAt||_.time||0)),k=g||S[0];return k&&Number.isFinite(Number(k.lat))&&Number.isFinite(Number(k.lng))?{lat:Number(k.lat),lng:Number(k.lng),label:`${k.customer||"Customer"} · live GPS`,source:"live",customer:k.customer}:{lat:Rt.lat,lng:Rt.lng,label:Rt.label,source:"site",customer:null}},[n,g]);return a.jsxs("div",{className:"space-y-3",children:[a.jsx(ll,{cols:4,children:C.map(S=>a.jsx(fa,{label:S.label,value:S.value,icon:S.icon,tone:S.tone,delta:S.delta},S.label))}),a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 px-3.5 py-3",children:[a.jsxs("div",{children:[a.jsxs("h2",{className:"text-[15px] font-semibold text-slate-900",children:["Live GPS · ",T.customer||"Hod
639an Restaurant"]}),a.jsx("p",{className:"text-[12px] text-slate-500",children:T.source==="live"?"Customer phone GPS. Map updates when the rental app sends location.":"Power banks only work inside Hodan Restaurant. Open a customer row to see their GPS."})]}),a.jsxs("a",{href:zd(T.lat,T.lng),target:"_blank",rel:"noreferrer",className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white",children:[a.jsx(Ad,{className:"h-3.5 w-3.5"}),"Open map"]})]}),a.jsx("iframe",{title:"Live customer GPS map",src:zo(T.lat,T.lng,17),className:"h-[280px] w-full border-t border-slate-100",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})]}),a.jsx("section",{className:"rounded-xl border border-slate-100 bg-white p-2.5 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("label",{className:"relative min-w-[220px] flex-1",children:[a.jsx(qs,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"h-8 w-full rounded-lg border border-slate-200 bg-[#f7f9fc] pl-9 pr-3 text-[12px] outline-none transition placeholder:text-slate-400 focus:border-blue-400 focus:bg-white focus:ring-2 focus:ring-blue-500/10",placeholder:"Search by name, phone, location, or power bank...",value:d,onChange:S=>m(S.target.value)})]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:p,onChange:S=>y(S.target.value),children:[a.jsx("option",{value:"all",children:"All Locations"}),w.map(S=>a.jsx("option",{value:S,children:S},S))]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:x,onChange:S=>f(S.target.value),children:[a.jsx("option",{value:"all",children:"All Status"}),a.jsx("option",{value:"In Use",children:"In Use"}),a.jsx("option",{value:"Returned",children:"Returned"})]})]})}),a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:[a.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-[14px] font-semibold text-slate-900",children:"People by Location"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"Name, phone number, and where they are"})]}),a.jsxs("span",{className:"rounded-full bg-slate-100 px-2 py-0.5 text-[10.5px] font-medium text-slate-500",children:[D.length," results"]})]}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-[12px]",children:[a.jsx("thead",{className:"border-y border-slate-100 bg-[#f8fafc] text-[11px] uppercase tracking-wide text-slate-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Customer"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Phone"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Location"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Power Bank"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Status"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Time"})]})}),a.jsx("tbody",{children:D.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:6,className:"px-3.5 py-10 text-center text-slate-400",children:"No users found for this location filter."})}):D.map(S=>a.jsxs("tr",{className:"border-b border-slate-50 hover:bg-slate-50/60",children:[a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-full bg-[#2f6bff] text-[11px] font-semibold text-white",children:BN(S.customer)}),a.jsx("span",{className:"font-semibold text-slate-800",children:S.customer})]})}),a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("a",{href:`tel:${S.phone.replace(/\s/g,"")}`,className:"inline-flex items-center gap-1.5 font-medium text-slate-700 transition hover:text-[#2f6bff]",children:[a.jsx(Pa,{className:"h-3.5 w-3.5 text-slate-400"}),S.phone]})}),a.jsx("td",{className:"px-3.5 py-3",children:a.jsxs("button",{type:"button",onClick:()=>v(S),className:"inline-flex items-center gap-1 rounded-lg px-1.5 py-1 font-medium text-[#2f6bff] underline decoration-[#2f6bff]/40 underline-offset-2 transition hover:bg-blue-50 hover:decoration-[#2f6bff]",title:"Open GPS map",children:[a.jsx(Tt,{className:"h-3.5 w-3.5"}),S.location]})}),a.jsx("td",{className:"px-3.5 py-3 font-semibold text-slate-700",children:S.powerBank}),a.jsx("td",{className:"px-3.5 py-3",children:a.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-[11px] font-semibold ${zN(S.status)}`,children:On(S.status)||S.status})}),a.jsx("td",{className:"px-3.5 py-3 text-slate-500",children:S.time})]},`${S.id}-${S.phone}`))})]})})]}),g?(()=>{const S=Uj(g.location,{lat:g.lat,lng:g.lng,label:g.location}),k=zo(S.lat,S.lng),_=zd(S.lat,S.lng);return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[560px] overflow-hidden rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)]",children:[a.jsxs("div",{className:"flex items-start justify-between border-b border-slate-100 px-5 py-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:"GPS Location"}),a.jsxs("p",{className:"mt-0.5 text-[12px] text-slate-500",children:[g.customer," · ",g.phone]})]}),a.jsx("button",{type:"button",onClick:()=>v(null),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"Close GPS map",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"space-y-3 px-5 py-4",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[12px]",children:[a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-blue-50 px-2.5 py-1 font-semibold text-[#2f6bff]",children:[a.jsx(Tt,{className:"h-3.5 w-3.5"}),g.location]}),a.jsx("span",{className:"rounded-full bg-slate-100 px-2.5 py-1 font-medium text-slate-600",children:S.source==="live"?"Live phone GPS":"Site GPS pin"}),a.jsxs("span",{className:"font-mono text-[11px] text-slate-500",children:[S.lat.toFixed(5),", ",S.lng.toFixed(5)]})]}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-slate-200",children:a.jsx("iframe",{title:`GPS map for ${g.location}`,src:k,className:"h-[280px] w-full",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})}),a.jsx("p",{className:"text-[12px] text-slate-500",children:S.label}),a.jsx("div",{className:"flex flex-wrap gap-2",children:a.jsxs("a",{href:_,target:"_blank",rel:"noreferrer",className:"inline-flex h-10 flex-1 items-center justify-center gap-1.5 rounded-xl bg-[#2f6bff] px-3 text-[13px] font-semibold text-white transition hover:bg-blue-600",children:[a.jsx(Ad,{className:"h-4 w-4"}),"Open in Google Maps",a.jsx(wv,{className:"h-3.5 w-3.5 opacity-80"})]})})]})]})})})():null]})}function O1(n){const i=String(n||"").replace(/\D/g,"");if(!i)return"";const o=(i.startsWith("252")&&i.length>=12||i.startsWith("0")&&i.length>=10,i.slice(-9));return o.length>=9?`252${o}`:""}function np(n,i){const o=O1(n);return o?`https://wa.me/${o}?text=${encodeURIComponent(String(i||""))}`:""}function UN(n){return n?!!window.open(n,"_blank","noopener,noreferrer"):!1}const HN=[{id:"all",label:"All"},{id:"payment",label:"Payment received"},{id:"customer",label:"New customer"},{id:"reminder",label:"Xasuusin"},{id:"failed",label:"Failed"},{id:"sent",label:"Sent"}];function FN(n){return`$${Number(n||0).toFixed(2)}`}function vd(n){const i=String(n||"").trim();return!i||/^hormuud customer$/i.test(i)||/^walk-?in customer$/i.test(i)?"—":i}function $N(n){const i=String(n||"").trim();if(!i)return"";const o=i.toLowerCase();return o.includes("fetch failed")||o.includes("failed to fetch")||o.includes("insufficient")||o.includes("not enough")||o.includes("haraag")?"Haraagaada kuma filan":i}function ip(n){return n==="Successful"||n==="Sent"?"bg-emerald-50 text-emerald-600":n==="Failed"?"bg-rose-50 text-rose-600":n==="Lost"?"bg-orange-50 text-orange-600":"bg-slate-100 text-slate-600"}function qN(n){return n==="payment"?Ut:n==="reminder"?Vo:n==="failed"?cm:n==="sent"?um:Dd}function PN(n){return n==="payment"?"bg-emerald-50 text-emerald-600":n==="reminder"?"bg-amber-50 text-amber-600":n==="failed"?"bg-rose-50 text-rose-600":n==="sent"?"bg-violet-50 text-violet-600":n==="customer"?"bg-sky-50 text-sky-600":"bg-blue-50 text-[#2f6bff]"}function rt({label:n,value:i}){return a.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-slate-100 py-2.5 last:border-0",children:[a.jsx("span",{className:"text-[12px] text-slate-400",children:n}),a.jsx("span",{className:"max-w-[70%] text-right text-[12.5px] font-semibold text-slate-800",children:i||"—"})]})}function YN({notifications:n,onNotificationsChange:i,focusId:o}){var ae,he,me,R,P,J,le,ue,ge,Ne,tt,qe,te,Ae,Lt,Jt,Wt;const[c,d]=b.useState(o||null),[m,p]=b.useState([]),[y,x]=b.useState("all"),[f,g]=b.useState(!1),[v,w]=b.useState(""),[D,C]=b.useState(""),[T,S]=b.useState(""),[k,_]=b.useState(!1),[U,A]=b.useState("");b.useEffect(()=>{let de=!0;i(St());async function ne(){try{const Qt=await ym({includeReminders:!0});if(!de)return;p(Qt),i(d1(Qt))}catch{de&&(p([]),i(St()))}}ne();const ot=window.setInterval(ne,4e3),jt=()=>{document.hidden||ne()};return document.addEventListener("visibilitychange",jt),window.addEventListener("focus",jt),()=>{de=!1,window.clearInterval(ot),document.removeEventListener("visibilitychange",jt),window.removeEventListener("focus",jt)}},[i]),b.useEffect(()=>{o&&(d(o),g(!1),i(pd(o)))}
639,[o]);const G=b.useMemo(()=>y==="all"?n:n.filter(de=>de.type===y),[n,y]),E=b.useMemo(()=>G.find(de=>de.id===c)||null,[G,c]),z=b.useMemo(()=>{var ne;const de=(ne=E==null?void 0:E.meta)==null?void 0:ne.paymentId;return de&&m.find(ot=>ot.id===de)||null},[m,E]),K=x1(G);function ie(de){const ne=Sw(de);i(ne),c===de&&d(null)}function ce(){if(!G.length||!window.confirm("Delete all messages? They will not come back."))return;const de=kw();i(de),d(null)}function B(de){d(de.id),g(!1),i(pd(de.id))}function W(){var ne,ot;const de=z||(E==null?void 0:E.meta)||{};w(vd(de.fullName||de.user||de.customerName||((ne=E==null?void 0:E.meta)==null?void 0:ne.user))==="—"?"":vd(de.fullName||de.user||de.customerName||((ot=E==null?void 0:E.meta)==null?void 0:ot.user))),C(de.phone||de.phoneNumber||""),S(""),A(""),g(!0)}async function re(de){de.preventDefault();const ne=T.trim(),ot=D.trim(),jt=v.trim();if(!ne)return;if(!O1(ot)){A("Gali lambarka WhatsApp-ka macaamilka.");return}_(!0),A("");const Qt=np(ot,ne);UN(Qt);let pt=!1,ea="whatsapp";try{const Ea=await _e("/api/messages/whatsapp",{method:"POST",body:{name:jt,phone:ot,body:ne}}),dt=(Ea==null?void 0:Ea.data)||Ea;pt=!!(dt!=null&&dt.delivered),ea=(dt==null?void 0:dt.via)||ea}catch{pt=!!Qt}const pa=ww({name:jt,phone:ot,body:ne,via:ea,delivered:pt||!!Qt});i(pd(pa.id)),d(pa.id),x("sent"),g(!1),S(""),_(!1)}const V=z||(E==null?void 0:E.meta)||{},oe=vd(V.fullName||V.user||V.customerName||((ae=E==null?void 0:E.meta)==null?void 0:ae.user)),O=FN(V.amount),Q=V.status||((he=E==null?void 0:E.meta)==null?void 0:he.status)||"";return a.jsxs("div",{className:"flex min-h-[calc(100vh-120px)] flex-col overflow-hidden rounded-2xl border border-slate-100 bg-white dark:border-slate-700 dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"flex items-center gap-3 border-b border-slate-100 bg-white px-3 py-2.5 dark:border-slate-700 dark:bg-[#151d2e]",children:[a.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-x-auto pb-1 [scrollbar-width:thin]",children:HN.map(de=>{const ne=de.id==="all"?n.length:n.filter(jt=>jt.type===de.id).length,ot=y===de.id;return a.jsxs("button",{type:"button",onClick:()=>{x(de.id),g(!1)},className:`shrink-0 rounded-full px-3.5 py-1.5 text-[12.5px] font-semibold whitespace-nowrap transition ${ot?"bg-[#2f6bff] text-white shadow-[0_6px_14px_rgba(47,107,255,0.28)]":"bg-slate-100 text-slate-600 hover:bg-slate-200"}`,children:[de.label,a.jsx("span",{className:`ml-1.5 ${ot?"text-white/80":"text-slate-400"}`,children:ne})]},de.id)})}),a.jsxs("button",{type:"button",onClick:W,className:"inline-flex h-9 shrink-0 items-center gap-1.5 rounded-full bg-[#2f6bff] px-3.5 text-[12.5px] font-semibold text-white shadow-[0_8px_16px_rgba(47,107,255,0.28)] transition hover:bg-blue-600",children:[a.jsx(go,{className:"h-3.5 w-3.5"}),"Send message"]})]}),a.jsxs("div",{className:`grid min-h-0 flex-1 ${E||f?"grid-cols-[minmax(280px,380px)_minmax(0,1fr)]":"grid-cols-1"}`,children:[a.jsxs("aside",{className:"flex min-h-0 flex-col bg-white dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-4 py-3 dark:border-slate-700",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[15px] font-semibold text-slate-900",children:"Messages"}),a.jsxs("p",{className:"text-[11px] text-slate-400",children:[G.length," ",G.length===1?"message":"messages",K>0?` · ${K} new`:""]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{type:"button",onClick:()=>i(Nw()),className:"text-[11px] font-semibold text-[#2f6bff] hover:text-blue-700",children:"Mark all read"}),a.jsxs("button",{type:"button",disabled:G.length===0,onClick:ce,className:"inline-flex items-center gap-1 rounded-lg px-2 py-1 text-[11px] font-semibold text-rose-500 hover:bg-rose-50 disabled:opacity-40",children:[a.jsx(na,{className:"h-3.5 w-3.5"}),"Delete"]})]})]}),a.jsx("div",{className:"min-h-0 flex-1 space-y-1 overflow-y-auto bg-slate-50 p-2 dark:bg-[#0f172a]",children:G.length===0?a.jsx("p",{className:"px-3 py-10 text-center text-[12px] text-slate-400",children:"No payment messages yet. New Hormuud payments appear here automatically."}):G.map(de=>{const ne=qN(de.type),ot=de.id===c&&!f;return a.jsxs("div",{className:`flex w-full items-start gap-2 rounded-xl px-2 py-2 transition ${ot?"bg-blue-50 ring-1 ring-blue-100 dar
639k:bg-[#1e3a5f] dark:ring-blue-500/20":de.read?"bg-white hover:bg-slate-50 dark:bg-[#151d2e] dark:hover:bg-[#1a2336]":"bg-white hover:bg-slate-100 dark:bg-[#1a2336] dark:hover:bg-[#243044]"}`,children:[a.jsxs("button",{type:"button",onClick:()=>B(de),className:"flex min-w-0 flex-1 items-start gap-2.5 px-1 py-1 text-left",children:[a.jsx("span",{className:`mt-0.5 grid h-9 w-9 shrink-0 place-items-center rounded-full ${PN(de.type)}`,children:a.jsx(ne,{className:"h-4 w-4"})}),a.jsxs("span",{className:"min-w-0 flex-1",children:[a.jsxs("span",{className:"flex items-center justify-between gap-2",children:[a.jsx("span",{className:"truncate text-[13px] font-semibold text-slate-900",children:de.title}),de.read?null:a.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-[#2f6bff]"})]}),a.jsx("span",{className:"mt-0.5 block truncate text-[12px] text-slate-500",children:de.message}),a.jsx("span",{className:"mt-1 block text-[10px] text-slate-400",children:de.createdAt})]})]}),a.jsx("button",{type:"button",onClick:()=>ie(de.id),className:"mt-1 grid h-8 w-8 shrink-0 place-items-center rounded-lg text-slate-400 transition hover:bg-rose-50 hover:text-rose-600","aria-label":"Delete message",children:a.jsx(na,{className:"h-4 w-4"})})]},de.id)})})]}),f||E?a.jsx("section",{className:"min-h-0 overflow-y-auto bg-slate-50 p-5 dark:bg-[#0f172a]",children:f?a.jsxs("form",{onSubmit:re,className:"mx-auto max-w-xl space-y-3 rounded-2xl border border-slate-100 bg-white p-6 shadow-sm",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-wide text-slate-400",children:"New message"}),a.jsx("h2",{className:"mt-1 text-[20px] font-bold text-slate-900",children:"Send a message"}),a.jsx("p",{className:"mt-1 text-[12.5px] text-slate-500",children:"Fariinta waxaa si toos ah loogu diri doonaa WhatsApp-ka macaamilka."})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[12px] font-semibold text-slate-600",children:"Name"}),a.jsx("input",{className:"h-10 w-full rounded-xl border border-slate-200 bg-[#f7f9fc] px-3 text-[13px] outline-none focus:border-blue-400 focus:bg-white focus:ring-4 focus:ring-blue-500/10",value:v,onChange:de=>w(de.target.value),placeholder:"Customer name"})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[12px] font-semibold text-slate-600",children:"Phone"}),a.jsx("input",{className:"h-10 w-full rounded-xl border border-slate-200 bg-[#f7f9fc] px-3 text-[13px] outline-none focus:border-blue-400 focus:bg-white focus:ring-4 focus:ring-blue-500/10",value:D,onChange:de=>C(de.target.value),placeholder:"+252 61...",required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[12px] font-semibold text-slate-600",children:"Message"}),a.jsx("textarea",{className:"min-h-[120px] w-full resize-y rounded-xl border border-slate-200 bg-[#f7f9fc] px-3 py-2.5 text-[13px] outline-none focus:border-blue-400 focus:bg-white focus:ring-4 focus:ring-blue-500/10",value:T,onChange:de=>S(de.target.value),placeholder:"Write the message..."})]}),U?a.jsx("p",{className:"text-[12.5px] font-semibold text-rose-600",children:U}):null,a.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[a.jsx("button",{type:"button",onClick:()=>g(!1),className:"h-10 rounded-xl px-4 text-[13px] font-semibold text-slate-500 hover:bg-slate-100",children:"Cancel"}),a.jsxs("button",{type:"submit",disabled:k||!T.trim(),className:"inline-flex h-10 items-center gap-1.5 rounded-xl bg-[#25D366] px-4 text-[13px] font-semibold text-white hover:bg-[#1ebe5a] disabled:opacity-50",children:[a.jsx(go,{className:"h-3.5 w-3.5"}),k?"Sending…":"Send WhatsApp"]})]})]}):E.type==="reminder"?a.jsxs("article",{className:"mx-auto max-w-xl rounded-2xl border border-slate-100 bg-white p-6 shadow-sm",children:[a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-wide text-amber-600",children:"Xasuusin"}),a.jsx("h2",{className:"mt-2 text-[22px] font-bold text-slate-900",children:"Waqtiga waa uu dhamaaday"}),a.jsx("p",{className:"mt-2 text-[14px] text-slate-600",children:E.message}),a.jsxs("div",{className:"mt-4",children:[a.jsx(rt,{label:"Name",value:((me=E.meta)==null?void 0:me.user)||oe}),a.jsx(rt,{label:"Phone",value:((R=E.meta)==null?void 0:R.phone)||V.phone}),a.jsx(rt,{label:"Power bank",value:((P=E.meta)==null?void 0:P.powerBank)||V.powerBank}),a.jsx(rt,{label:"Time",value:E.createdAt})]}),a.jsxs("button",{type:"button",onClick:()=>ie(E.id),className:"mt-4 inline-flex h-10 items-center gap-1.5 rounded-xl border border-rose-200 px-4 text-[13px] font-semibold text-rose-600 hover:bg-rose-50",children:[a.jsx(na,{className:"h-3.5 w-3.5"}),"Delete"]})]}):E.type==="register"||E.type==="customer"?a.jsxs("article",{className:"mx-auto max-w-xl rounded-2xl border border-slate-100 bg-white p-6 shadow-sm",children:[a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-wide text-sky-600",children:E.type==="customer"?"New customer":"New registration"}),a.jsx("h2",{className:"mt-2 text-[22px] font-bold text-slate-900",children:((J=E.meta)==null?void 0:J.user)||((le=E.meta)==null?void 0:le.email)||E.message}),a.jsxs("div",{className:"mt-4",children:[a.jsx(rt,{label:"Name",value:((ue=E.meta)==null?void 0:ue.user)||Str
639ing(E.message||"").split(" registered")[0]}),(ge=E.meta)!=null&&ge.phone?a.jsx(rt,{label:"Phone",value:E.meta.phone}):null,(Ne=E.meta)!=null&&Ne.powerSerial?a.jsx(rt,{label:"Serial",value:E.meta.powerSerial}):null,(tt=E.meta)!=null&&tt.email?a.jsx(rt,{label:"Email",value:E.meta.email}):null,a.jsx(rt,{label:"Role",value:((qe=E.meta)==null?void 0:qe.role)||"Customer"}),a.jsx(rt,{label:"Time",value:E.createdAt})]}),a.jsxs("button",{type:"button",onClick:()=>ie(E.id),className:"mt-4 inline-flex h-10 items-center gap-1.5 rounded-xl border border-rose-200 px-4 text-[13px] font-semibold text-rose-600 hover:bg-rose-50",children:[a.jsx(na,{className:"h-3.5 w-3.5"}),"Delete"]})]}):E.type==="sent"?a.jsxs("article",{className:"mx-auto max-w-xl rounded-2xl border border-slate-100 bg-white p-6 shadow-sm",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-wide text-slate-400",children:"Sent WhatsApp"}),a.jsx("h2",{className:"mt-1 text-[20px] font-bold text-slate-900",children:((te=E.meta)==null?void 0:te.user)||"Customer"})]}),a.jsx("span",{className:`rounded-full px-2.5 py-1 text-[11px] font-semibold ${ip("Sent")}`,children:"Sent"})]}),a.jsx("div",{className:"mt-5 rounded-xl bg-[#f7f9fc] p-4 text-[13.5px] leading-relaxed text-slate-700",children:((Ae=E.meta)==null?void 0:Ae.body)||E.message}),a.jsxs("div",{className:"mt-2",children:[a.jsx(rt,{label:"Name",value:(Lt=E.meta)==null?void 0:Lt.user}),a.jsx(rt,{label:"Phone",value:(Jt=E.meta)==null?void 0:Jt.phone}),a.jsx(rt,{label:"Channel",value:"WhatsApp"}),a.jsx(rt,{label:"Time",value:E.createdAt})]}),(Wt=E.meta)!=null&&Wt.phone?a.jsxs("a",{href:np(E.meta.phone,E.meta.body||E.message),target:"_blank",rel:"noreferrer",className:"mt-4 mr-2 inline-flex h-10 items-center gap-1.5 rounded-xl bg-[#25D366] px-4 text-[13px] font-semibold text-white hover:bg-[#1ebe5a]",children:[a.jsx(go,{className:"h-3.5 w-3.5"}),"Open WhatsApp"]}):null,a.jsxs("button",{type:"button",onClick:()=>ie(E.id),className:"mt-4 inline-flex h-10 items-center gap-1.5 rounded-xl border border-rose-200 px-4 text-[13px] font-semibold text-rose-600 hover:bg-rose-50",children:[a.jsx(na,{className:"h-3.5 w-3.5"}),"Delete"]})]}):a.jsxs("article",{className:"mx-auto max-w-xl rounded-2xl border border-slate-100 bg-white p-6 shadow-sm",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-wide text-slate-400",children:"Transaction"}),a.jsx("h2",{className:"mt-1 text-[28px] font-bold tracking-tight text-slate-900",children:O}),a.jsx("p",{className:"mt-1 text-[13px] text-slate-500",children:"Amount sent"})]}),Q?a.jsx("span",{className:`rounded-full px-2.5 py-1 text-[11px] font-semibold ${ip(Q)}`,children:Q}):null]}),a.jsxs("div",{className:"mt-5 rounded-xl bg-[#f7f9fc] p-4",children:[a.jsxs("p",{className:"flex items-center gap-2 text-[15px] font-semibold text-slate-900",children:[a.jsx(ka,{className:"h-4 w-4 text-[#2f6bff]"}),oe]}),a.jsxs("p",{className:"mt-1 flex items-center gap-2 text-[12.5px] text-slate-500",children:[a.jsx(Pa,{className:"h-3.5 w-3.5"}),V.phone||V.phoneNumber||"—"]})]}),a.jsxs("div",{className:"mt-2",children:[a.jsx(rt,{label:"Payment ID",value:V.id||V.paymentId}),a.jsx(rt,{label:"Name",value:oe}),a.jsx(rt,{label:"Phone",value:V.phone||V.phoneNumber}),a.jsx(rt,{label:"Amount",value:O}),a.jsx(rt,{label:"Power bank",value:V.powerBank}),a.jsx(rt,{label:"Location",value:V.location}),a.jsx(rt,{label:"Method",value:V.method}),a.jsx(rt,{label:"Status",value:Q}),a.jsx(rt,{label:"Transaction ID",value:V.transactionId}),a.jsx(rt,{label:"Duration",value:V.durationLabel}),a.jsx(rt,{label:"Order ID",value:V.orderId}),a.jsx(rt,{label:"Date",value:V.date||E.createdAt}),V.failureReason?a.jsx(rt,{label:"Failure reason",value:$N(V.failureReason)}):null]}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsxs("button",{type:"button",onClick:W,className:"inline-flex h-10 items-center gap-1.5 rounded-xl bg-[#2f6bff] px-4 text-[13px] font-semibold text-white hover:bg-blue-600",children:[a.jsx(go,{className:"h-3.5 w-3.5"}),"Send WhatsApp"]}),a.jsxs("button",{type:"button",onClick:()=>ie(E.id),className:"inline-flex h-10 items-center gap-1.5 rounded-xl border border-rose-200 px-4 text-[13px] font-semibold text-rose-600 hover:bg-rose-50",children:[a.jsx(na,{className:"h-3.5 w-3.5"}),"Delete"]})]}),a.jsxs("p",{className:"mt-4 flex items-center gap-2 text-[11px] text-slate-400",children:[a.jsx(Do,{
639className:"h-3.5 w-3.5"}),a.jsx(dm,{className:"h-3.5 w-3.5"}),a.jsx(Tt,{className:"h-3.5 w-3.5"}),"Full Hormuud payment record"]})]})}):null]})]})}const U1="somacharge_inventory_v1",Zd="somacharge:inventory-updated";function jd(){return{investment:0,note:"",updatedAt:""}}function H1(){if(typeof window>"u")return jd();try{const n=localStorage.getItem(U1);if(!n)return jd();const i=JSON.parse(n);return{investment:Number((i==null?void 0:i.investment)??(i==null?void 0:i.amount))||0,note:String((i==null?void 0:i.note)||""),updatedAt:String((i==null?void 0:i.updatedAt)||"")}}catch{return jd()}}function VN(n,i=""){const o={investment:Number(n)||0,note:String(i||"").trim(),updatedAt:new Date().toISOString()};return typeof window<"u"&&(localStorage.setItem(U1,JSON.stringify(o)),window.dispatchEvent(new CustomEvent(Zd))),o}function GN(n){if(typeof window>"u")return()=>{};const i=()=>n(H1());return window.addEventListener(Zd,i),window.addEventListener("storage",i),()=>{window.removeEventListener(Zd,i),window.removeEventListener("storage",i)}}function Kt(n){const i=Number(n)||0;return`${i<0?"-":""}$${Math.abs(i).toFixed(2)}`}function XN(n){let i=0,o=0,c=0;for(const d of n){const m=Number(d==null?void 0:d.amount)||0;(d==null?void 0:d.status)==="Successful"?(i+=m,c+=1):((d==null?void 0:d.status)==="Failed"||(d==null?void 0:d.status)==="Lost")&&(o+=m)}return{revenue:Number(i.toFixed(2)),loss:Number(o.toFixed(2)),profit:Number((i-o).toFixed(2)),successful:c}}function QN({days:n}){const i=[...n].slice(0,7).reverse(),o=640,c=160,d=40,m=14,p=o-d-14,y=c-m-20,f=Math.max(1,...i.map(C=>Math.max(C.revenue,C.loss,Math.abs(C.profit))));function g(C){return C.map((T,S)=>{const k=d+S/Math.max(C.length-1,1)*p,_=m+y-T/f*y;return`${k},${_}`}).join(" ")}const v=g(i.map(C=>Math.max(0,C.profit))),w=g(i.map(C=>Math.max(0,C.loss))),D=[0,.25,.5,.75,1].map(C=>Number((f*C).toFixed(f>=10?0:2)));return a.jsxs("div",{className:"pt-1",children:[a.jsxs("div",{className:"mb-2.5 flex items-center gap-4 text-[11px] text-slate-500",children:[a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"h-2 w-3.5 rounded-sm bg-emerald-500"})," Profit"]}),a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"h-2 w-3.5 rounded-sm bg-rose-500"})," Lose"]})]}),a.jsxs("svg",{viewBox:`0 0 ${o} ${c}`,className:"h-[150px] w-full",role:"img","aria-label":"Daily profit vs lose line chart",children:[D.map(C=>{const T=m+y-C/f*y;return a.jsxs("g",{children:[a.jsx("line",{x1:d,x2:o-12,y1:T,y2:T,stroke:"#eef2f7",strokeWidth:"1"}),a.jsx("text",{x:d-8,y:T+3.5,textAnchor:"end",className:"fill-slate-400",fontSize:"10",children:C})]},`t-${C}`)}),a.jsx("polyline",{fill:"none",stroke:"#10b981",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",points:v}),a.jsx("polyline",{fill:"none",stroke:"#f43f5e",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",points:w}),i.map((C,T)=>{const S=d+T/Math.max(i.length-1,1)*p,k=m+y-Math.max(0,C.profit)/f*y,_=m+y-Math.max(0,C.loss)/f*y;return a.jsxs("g",{children:[a.jsx("circle",{cx:S,cy:k,r:"3.5",fill:"#10b981",stroke:"#fff",strokeWidth:"1.5",children:a.jsx("title",{children:`${C.label} profit ${Kt(C.profit)}`})}),a.jsx("circle",{cx:S,cy:_,r:"3",fill:"#f43f5e",stroke:"#fff",strokeWidth:"1.5",children:a.jsx("title",{children:`${C.label} lose ${Kt(C.loss)}`})}),a.jsx("text",{x:S,y:c-2,textAnchor:"middle",className:"fill-slate-400",fontSize:"10",children:C.label.split(",")[0]})]},C.key)})]})]})}function IN(){var W,re;const[n,i]=b.useState([]),[o,c]=b.useState(0),[d,m]=b.useState(()=>H1()),[p,y]=b.useState(""),[x,f]=b.useState(!0),[g,v]=b.useState(!1),[w,D]=b.useState(""),[C,T]=b.useState(""),[S,k]=b.useState("");b.useEffect(()=>{let V=!0;async function oe(){try{const[ae,he]=await Promise.all([ym(),v1()]);if(!V)return;i(ae),c(j1(he))}catch{V&&(i([]),c(0))}finally{V&&f(!1)}}oe();const O=window.setInterval(()=>{document.hidden||oe()},4e3),Q=GN(ae=>m(ae));return()=>{V=!1,window.clearInterval(O),Q()}},[]);const _=b.useMemo(()=>Ww(n,30),[n]),U=b.useMemo(()=>XN(n),[n]),A=Number(d.investment)||0,G=Number(A.toFixed(2)),E=Math.max(o,U.revenue),z=U.profit>10?U.profit:0,K=_.days.filter(V=>V.successful>0||V.failed>0||V.lost>0||V.revenue>0||V.loss>0),ie=[{label:"Profile",value:Kt(z),delta:"Faa'iido",positive:z>=0,icon:uj,tone:"bg-emerald-50 text-emerald-600"},{label:"Lose",value:Kt(U.loss),delta:`${U.successful} paid`,positive:!1,icon:Rd,tone:"bg-rose-50 text-rose-500"},{label:"Balance",value:Kt(E),delta:`${U.successful} in`,positive:E>
639=0,icon:tr,tone:"bg-sky-50 text-sky-600"},{label:"Inventory",value:Kt(G),delta:"Registered",positive:G>0,icon:x5,tone:"bg-blue-50 text-blue-600"}];function ce(){k(""),D(A?String(A):""),T(d.note||""),v(!0)}function B(V){V.preventDefault();const oe=Number(w);if(!Number.isFinite(oe)||oe<0){k("Fadlan geli lacag sax ah.");return}const O=VN(oe,C);m(O),v(!1),y(`Inventory ${Kt(O.investment)} waa la diwaan geliyay.`),window.setTimeout(()=>y(""),2800)}return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[15px] font-semibold text-slate-900 dark:text-slate-100",children:"Financial Reporting"}),a.jsx("p",{className:"text-[12px] text-slate-500 dark:text-slate-400",children:"Auto-calculated from payment records · live updates"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("span",{className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-emerald-200 bg-emerald-50 px-2.5 text-[11px] font-semibold text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-300",children:[a.jsx(Xi,{className:`h-3 w-3 ${x?"animate-spin":""}`}),"Auto Report"]}),a.jsxs("button",{type:"button",onClick:ce,className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white transition hover:bg-blue-600",children:[a.jsx(Ys,{className:"h-3.5 w-3.5"}),"Investment"]})]})]}),p?a.jsx("p",{className:"rounded-xl bg-emerald-50 px-3 py-2 text-[12.5px] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300",children:p}):null,a.jsx(ll,{cols:4,children:ie.map(V=>a.jsx(fa,{label:V.label,value:V.value,icon:V.icon,tone:V.tone,delta:V.delta,positive:V.positive},V.label))}),a.jsxs("section",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.15fr)_minmax(0,0.85fr)]",children:[a.jsxs("article",{className:"rounded-xl border border-slate-100 bg-white p-3.5 shadow-[0_4px_14px_rgba(15,40,90,0.04)] dark:border-slate-700 dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-[13px] font-semibold text-slate-900 dark:text-slate-100",children:"Daily Profit vs Lose"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"Last 7 days · from Successful / Failed payments"})]}),a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-slate-50 px-2 py-1 text-[10px] font-semibold text-slate-500 dark:bg-white/5 dark:text-slate-400",children:[a.jsx(Ll,{className:"h-3 w-3"}),"Live"]})]}),a.jsx(QN,{days:_.days})]}),a.jsxs("article",{className:"rounded-xl border border-slate-100 bg-white p-3.5 shadow-[0_4px_14px_rgba(15,40,90,0.04)] dark:border-slate-700 dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"mb-2.5",children:[a.jsx("h3",{className:"text-[13px] font-semibold text-slate-900 dark:text-slate-100",children:"Capital Snapshot"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"Inventory · Balance · Profile"})]}),a.jsxs("div",{className:"space-y-2 text-[12px]",children:[a.jsxs("div",{className:"rounded-xl bg-blue-50 px-3 py-2.5 text-blue-900 dark:bg-blue-500/10 dark:text-blue-100",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("p",{className:"font-semibold",children:"Inventory"}),a.jsx("p",{className:"text-[16px] font-bold tracking-tight",children:Kt(G)})]}),a.jsx("p",{className:"mt-0.5 text-[11px] text-blue-800/90 dark:text-blue-200/80",children:"Registered investment capital"})]}),a.jsxs("div",{className:"rounded-xl bg-sky-50 px-3 py-2.5 text-sky-900 dark:bg-sky-500/10 dark:text-sky-100",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("p",{className:"font-semibold",children:"Balance"}),a.jsx("p",{className:"text-[16px] font-bold tracking-tight",children:Kt(E)})]}),a.jsx("p",{className:"mt-0.5 text-[11px] text-sky-800/90 dark:text-sky-200/80",children:"Successful payment inflow"})]}),a.jsxs("div",{className:"rounded-xl bg-emerald-50 px-3 py-2.5 text-emerald-900 dark:bg-emerald-500/10 dark:text-emerald-100",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("p",{className:"font-semibold",children:"Profile"}),a.jsx("p",{className:"text-[16px] font-bold tracking-tight",children:Kt(z)})]}),a.jsx("p",{className:"mt-0.5 text-[11px] text-emerald-800/90 dark:text-emerald-200/80",children:"Shows when profit exceeds $10"})]})]})]})]}),a.jsxs("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)] dark:border-slate-700 dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-slate-100 px-3.5 py-2.5 dark:border-slate-700",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-[13px] font-semibold text-slate-900 dark:text-slate-100",children:"Daily Auto Reports"}),a.jsx("p",{className:"text-[11px] text-slate-500",children:"Calculated automatically from payments · no manual checking"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px]",children:[a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2 py-0.5 font-semibold text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",children:[a.jsx(Gp,{className:"h-3 w-3"}),"Profit ",Kt(((W=_.totals)==null?void 0:W.profit)??U.profit)]}),a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-rose-50 px-2 py-0.5 font-semibold text-rose-600 dar
639k:bg-rose-500/15 dark:text-rose-300",children:[a.jsx(Rd,{className:"h-3 w-3"}),"Lose ",Kt(((re=_.totals)==null?void 0:re.loss)??U.loss)]})]})]}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-[12px]",children:[a.jsx("thead",{className:"bg-[#f8fafc] text-[10px] uppercase tracking-wide text-slate-400 dark:bg-white/[0.03]",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Day"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Revenue"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Profit"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Lose"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Paid"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Failed"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Lost"}),a.jsx("th",{className:"px-3.5 py-2.5 font-semibold",children:"Net"})]})}),a.jsx("tbody",{children:x?a.jsx("tr",{children:a.jsx("td",{colSpan:8,className:"px-3.5 py-8 text-center text-slate-400",children:"Calculating reports..."})}):K.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:8,className:"px-3.5 py-8 text-center text-slate-400",children:"No payment activity yet. Reports appear automatically when payments are recorded."})}):K.map(V=>{const oe=Number((V.revenue-V.loss).toFixed(2));return a.jsxs("tr",{className:"border-t border-slate-50 text-slate-700 hover:bg-slate-50/70 dark:border-slate-800 dark:text-slate-300 dark:hover:bg-white/[0.03]",children:[a.jsx("td",{className:"px-3.5 py-2.5 font-semibold text-slate-800 dark:text-slate-100",children:V.label}),a.jsx("td",{className:"px-3.5 py-2.5 font-medium text-sky-600 dark:text-sky-300",children:Kt(V.revenue)}),a.jsx("td",{className:"px-3.5 py-2.5 font-semibold text-emerald-600 dark:text-emerald-300",children:Kt(V.profit)}),a.jsx("td",{className:"px-3.5 py-2.5 font-semibold text-rose-600 dar
639k:text-rose-300",children:Kt(V.loss)}),a.jsx("td",{className:"px-3.5 py-2.5",children:V.successful}),a.jsx("td",{className:"px-3.5 py-2.5",children:V.failed}),a.jsx("td",{className:"px-3.5 py-2.5",children:V.lost}),a.jsx("td",{className:"px-3.5 py-2.5",children:a.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-[10px] font-semibold ${oe>=0?"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300":"bg-rose-50 text-rose-600 dark:bg-rose-500/15 dark:text-rose-300"}`,children:Kt(oe)})})]},V.key)})})]})})]}),g?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[420px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)] dark:bg-[#151d2e]",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-3.5 dark:border-slate-700",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[15px] font-semibold text-slate-900 dark:text-slate-100",children:"Starting Investment"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:"Register business starting capital"})]}),a.jsx("button",{type:"button",onClick:()=>v(!1),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-white/5","aria-label":"Close investment form",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("form",{className:"space-y-3 px-5 py-4",onSubmit:B,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[12.5px] font-semibold text-slate-700 dark:text-slate-200",children:"Investment amount ($)"}),a.jsx("input",{className:"h-10 w-full rounded-xl border border-slate-200 px-3 text-[13px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10 dark:border-slate-600 dark:bg-[#0f172a] dark:text-slate-100",type:"number",min:0,step:.01,value:w,onChange:V=>D(V.target.value),placeholder:"e.g. 5000",required:!0,autoFocus:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[12.5px] font-semibold text-slate-700 dark:text-slate-200",children:"Note (optional)"}),a.jsx("input",{className:"h-10 w-full rounded-xl border border-slate-200 px-3 text-[13px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10 dark:border-slate-600 dark:bg-[#0f172a] dark:text-slate-100",value:C,onChange:V=>T(V.target.value),placeholder:"Optional note"})]}),S?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12px] text-red-600",children:S}):null,a.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[a.jsx("button",{type:"button",onClick:()=>v(!1),className:"inline-flex h-9 items-center rounded-xl border border-slate-200 px-3.5 text-[12.5px] font-medium text-slate-600 transition hover:bg-slate-50 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-white/5",children:"Cancel"}),a.jsx("button",{type:"submit",className:"inline-flex h-9 items-center rounded-xl bg-[#2f6bff] px-3.5 text-[12.5px] font-semibold text-white transition hover:bg-blue-600",children:"Save"})]})]})]})}):null]})}function rp({checked:n,onChange:i,label:o,disabled:c}){return a.jsx("button",{type:"button",role:"switch","aria-checked":n,"aria-label":o,disabled:c,onClick:()=>i(!n),className:`relative h-7 w-12 shrink-0 rounded-full transition disabled:cursor-not-allowed disabled:opacity-50 ${n?"bg-[#2f6bff]":"bg-slate-300 dark:bg-slate-600"}`,children:a.jsx("span",{className:`absolute top-0.5 h-6 w-6 rounded-full bg-white shadow transition ${n?"left-[22px]":"left-0.5"}`})})}function wd({active:n,icon:i,label:o,onToggle:c}){return a.jsxs("button",{type:"button",onClick:c,className:`inline-flex items-center gap-2.5 rounded-xl border px-3.5 py-2.5 text-[13px] font-semibold transition ${n?"border-[#2f6bff]/40 bg-[#2f6bff]/10 text-[#2f6bff] dark:bg-[#2f6bff]/15 dark:text-sky-300":"border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-600 dark:bg-[#10182a] dark:text-slate-300 dark:hover:bg-white/5"}`,children:[a.jsx(i,{className:"h-4 w-4"}),o,a.jsx("span",{className:`ml-1 grid h-4 w-4 place-items-center rounded border ${n?"border-[#2f6bff] bg-[#2f6bff] text-white":"border-slate-300 dark:border-slate-500"}`,children:n?a.jsx(To,{className:"h-3 w-3",strokeWidth:3}):null})]})}function ZN(){const[n,i]=b.useState(()=>Zi()),[o,c]=b.useState(()=>Zi()),[d,m]=b.useState(""),[p,y]=b.useState(""),[x,f]=b.useState(!1),[g,v]=b.useState(!1);b.useEffect(()=>(Eo().then(k=>{i(k),c(k)}).catch(()=>{}),fm(k=>{c(k),i(_=>({..._,systemOnline:k.systemOnline}))})),[]);function w(k){i(_=>({..._,...k}))}function D(k){i(_=>({..._,methods:{..._.methods,[k]:!_.methods[k]}}))}async function C(k){y(""),m("");const _=n,U={...n,systemOnline:k};i(U),Bn(U),f(!0);try{const A=await Hh(U);i(A),c(A),m(A.systemOnline?"System is online. Staff can use the dashboard again.":"System is offline. Staff users are locked out now."),window.setTimeout(()=>m(""),3200)}catch(A){i(_),Bn(_),y(A instanceof Error?A.message:"Could not update system status.")}finally{f(!1)}}async function T(){y(""),m(""),v(!0);try{const k=await Hh(n);i(k),c(k),m(k.systemOnline?"System settings updated successfully.":"Settings saved. Staff users remain locked until the system is turned ON."),window.setTimeout(()=>m(""),3200)}catch(k){y(k instanceof Error?k.message:"Could not save system settings.")}finally{v(!1)}}const S=n.systemOnline;return a.jsxs("div",{className:"mx-auto max-w-[920px] space-y-4",children:[d?a.jsx("p",{className:"rounded-xl border border-emerald-200 bg-emerald-50 px-3 py-2 text-[12.5px] text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-300",children:d}):null,p?a.jsx("p",{className:"rounded-xl border border-rose-200 bg-rose-50 px-3 py-2 text-[12.5px] text-rose-700 dark:border-rose-500/30 dark:bg-rose-500/10 dark:text-rose-300",children:p}):null,a.jsxs("section",{className:"rounded-2xl border border-slate-100 bg-white p-5 shadow-[0_8px_24px_rgba(15,40,90,0.05)] dark:border-slate-700 dark:bg-[#151d2e] sm:p-6",children:[a.jsxs("div",{className:"mb-5 flex items-start gap-3",children:[a.jsx("span",{className:"grid h-10 w-10 place-items-center rounded-xl bg-[#2f6bff]/10 text-[#2f6bff] dar
639k:bg-[#2f6bff]/20 dark:text-sky-300",children:a.jsx(O5,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900 dark:text-slate-100",children:"System Mode Control"}),a.jsx("p",{className:"mt-0.5 text-[12.5px] text-slate-500 dark:text-slate-400",children:"Enable or disable the system and manage notifications when an issue occurs."})]})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:`flex flex-col gap-4 rounded-2xl border p-4 sm:flex-row sm:items-center sm:justify-between ${S?"border-emerald-200 bg-emerald-50/70 dark:border-emerald-500/25 dark:bg-emerald-500/10":"border-rose-200 bg-rose-50/70 dark:border-rose-500/25 dark:bg-rose-500/10"}`,children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:`mt-0.5 h-4 w-4 shrink-0 rounded-full shadow-[0_0_14px_currentColor] ${S?"bg-emerald-500 text-emerald-400":"bg-rose-500 text-rose-400"}`}),a.jsxs("div",{children:[a.jsx("p",{className:`text-[15px] font-semibold ${S?"text-emerald-700 dark:text-emerald-300":"text-rose-700 dark:text-rose-300"}`,children:S?"System is Online":"System is Offline"}),a.jsx("p",{className:"mt-1 text-[12.5px] leading-5 text-slate-600 dark:text-slate-300",children:S?"The system is running normally. All services are active.":"The system is currently disabled by the Admin. Staff users will see a lock screen and cannot work."})]})]}),a.jsx(rp,{label:S?"Turn system off":"Turn system on",checked:S,disabled:x||g,onChange:k=>void C(k)})]}
639),a.jsxs("div",{className:"flex flex-col gap-4 rounded-2xl border border-slate-100 p-4 dark:border-slate-700 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-slate-100 text-slate-500 dark:bg-white/5 dark:text-slate-300",children:a.jsx(Vo,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[14px] font-semibold text-slate-900 dark:text-slate-100",children:"Notify on Issue"}),a.jsx("p",{className:"mt-1 max-w-xl text-[12.5px] leading-5 text-slate-500 dark:text-slate-400",children:"Automatically notify the Admin when the system detects a technical problem, service failure, or system error."})]})]}),a.jsx(rp,{label:"Notify on issue",checked:n.notifyOnIssue,onChange:k=>w({notifyOnIssue:k})})]}),a.jsx("div",{className:"rounded-2xl border border-slate-100 p-4 dark:border-slate-700",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-slate-100 text-slate-500 dark:bg-white/5 dark:text-slate-300",children:a.jsx($s,{className:"h-4 w-4"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"text-[14px] font-semibold text-slate-900 dark:text-slate-100",children:"Notification Method"}),a.jsx("p",{className:"mt-1 text-[12.5px] leading-5 text-slate-500 dark:text-slate-400",children:"Choose how you want to be notified when an issue occurs."}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2.5",children:[a.jsx(wd,{label:"Email",icon:$s,active:n.methods.email,onToggle:()=>D("email")}),a.jsx(wd,{label:"SMS",icon:r5,active:n.methods.sms,onToggle:()=>D("sms")}),a.jsx(wd,{label:"In-App",icon:Pa,active:n.methods.inApp,onToggle:()=>D("inApp")})]})]})]})})]}),a.jsx("div",{className:"mt-6 flex justify-end",children:a.jsxs("button",{type:"button",onClick:()=>void T(),disabled:g||x,className:"inline-flex h-11 items-center gap-2 rounded-xl bg-[#2f6bff] px-5 text-[13.5px] font-semibold text-white shadow-[0_10px_22px_rgba(47,107,255,0.28)] transition hover:bg-[#2563eb] disabled:opacity-50",children:[a.jsx(M5,{className:"h-4 w-4"}),g?"Saving...":"Save Changes"]})})]}),o.systemOnline?null:a.jsx("p",{className:"rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-200",children:"Staff users are locked out and cannot use the system until an Admin turns it back online."})]})}const KN=[{label:"Dashboard",icon:Pv},{label:"Marches",icon:X5},{label:"Power Banks",icon:el},{label:"Rentals",icon:Ll},{label:"Payment",icon:Do},{label:"Messages",icon:um},{label:"User Management",icon:sa},{label:"Pricing",icon:Vp},{label:"Membership",icon:xs},{label:"Security",icon:Dt},{label:"Locations",icon:Tt},{label:"Reporting",icon:rv},{label:"System Mode",icon:Yp,badge:"New",adminOnly:!0}],Fo=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Tn=[0,0,0,0,0,0,0];function op(n,i,o,c,d,m){const p=o-d*2,y=c-m*2;return n.map((x,f)=>{const g=d+f/(n.length-1)*p,v=m+y-x/i*y;return`${g},${v}`}).join(" ")}function JN({thisWeek:n=Tn,lastWeek:i=Tn}){const p=Math.max(1,...n,...i),y=p<=5?1:p<=20?5:p<=100?20:Math.ceil(p/5),x=Math.max(y*5,p),f=Array.from({length:6},(w,D)=>Math.round(x/5*D)),g=op(n,x,640,268,44,18),v=op(i,x,640,268,44,18);return a.jsxs("svg",{viewBox:"0 0 640 268",className:"h-[268px] w-full",role:"img","aria-label":"Rentals overview chart",children:[f.map(w=>{const D=18+(x-w)/x*232;return a.jsxs("g",{children:[a.jsx("line",{x1:44,x2:628,y1:D,y2:D,stroke:"#eef2f7",strokeWidth:"1"}),a.jsx("text",{x:34,y:D+4,textAnchor:"end",className:"fill-slate-400",fontSize:"11",children:w})]},w)}),a.jsx("polyline",{fill:"none",stroke:"#93c5fd",strokeWidth:"2.5",strokeDasharray:"6 6",strokeLinecap:"round",points:v}),a.jsx("polyline",{fill:"none",stroke:"#2563eb",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",points:g}),n.map((w,D)=>{const C=44+D/Math.max(n.length-1,1)*552,T=250-w/x*232;return a.jsx("circle",{cx:C,cy:T,r:"4",fill:"#2563eb",stroke:"#fff",strokeWidth:"2"},D)}),Fo.map((w,D)=>{const C=44+D/(Fo.length-1)*552;return a.jsx("text",{x:C,y:266,textAnchor:"middle",className:"fill-slate-400",fontSize:"11",children:w},w)})]})}function WN({segments:n=[],total:i=0}){const c=2*Math.PI*68,d=i||n.reduce((p,y)=>p+y.value,0)||1;let m=0;return a.jsxs("div",{className:"relative h-[180px] w-[180px] shrink-0",children:[a.jsx("svg",{viewBox:"0 0 180 180",className:"h-full w-full -rotate-90",children:n.map(p=>{const y=p.value/d*c,x=`${y} ${c-y}`,f=m;return m+=y,a.jsx("circle",{cx:"90",cy:"90",r:68,fill:"none",stroke:p.stroke,strokeWidth:"18",strokeDasharray:x,strokeDashoffset:-f,strokeLinecap:"butt"},p.label)})}),a.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[a.jsx("p",{className:"text-[22px] font-bold leading-none text-slate-900",children:i.toLocaleStr
639ing()}),a.jsx("p",{className:"mt-1 text-[12px] text-slate-400",children:"Total"})]})]})}function e4({values:n=Tn}){const i=Math.max(.01,...n);return a.jsx("div",{className:"flex h-[230px] items-end gap-3 px-1 pt-2",children:n.map((o,c)=>a.jsxs("div",{className:"flex flex-1 flex-col items-center gap-2",children:[a.jsx("div",{className:"flex h-[190px] w-full items-end justify-center",children:a.jsx("div",{className:"w-[70%] rounded-t-md bg-gradient-to-t from-violet-600 to-violet-400",style:{height:`${Math.max(4,o/i*100)}%`}})}),a.jsx("span",{className:"text-[11px] text-slate-400",children:Fo[c]})]},Fo[c]))})}function cp({status:n}){const i=On(n)||n,o={Active:"bg-orange-50 text-orange-500","In Use":"bg-orange-50 text-orange-500",Returned:"bg-teal-50 text-teal-600",Completed:"bg-emerald-50 text-emerald-600"};return a.jsx("span",{className:`inline-flex rounded-full px-2.5 py-1 text-[11px] font-semibold ${o[i]??"bg-slate-100 text-slate-600"}`,children:i})}function t4({dueAt:n,status:i,durationLabel:o,durationMinutes:c}){const[,d]=b.useState(0);if(b.useEffect(()=>{const y=window.setInterval(()=>d(x=>x+1),1e3);return()=>window.clearInterval(y)},[]),i==="Returned"||i==="Cancelled")return a.jsx("span",{className:"font-semibold text-slate-400",children:"Ended"});const{text:m,kind:p}=Xo(n,{durationLabel:o,durationMinutes:c});return m==="Waqtiga dhamaaday"?a.jsx("span",{className:"font-semibold text-amber-600",children:"Waqtiga dhamaaday"}):a.jsx("span",{className:`font-semibold ${p==="membership"?"text-emerald-600":"text-[#2f6bff]"}`,children:m})}function a4({dueAt:n,inUse:i,durationLabel:o,durationMinutes:c}){const[,d]=b.useState(0);b.useEffect(()=>{const x=window.setInterval(()=>d(f=>f+1),1e3);return()=>window.clearInterval(x)},[]);const{text:m}=Xo(i?n:null,{durationLabel:o,durationMinutes:c}),p=!!(i&&n&&m==="Waqtiga dhamaaday"),y=!i||!n?"—":m;return a.jsxs("button",{type:"button",className:`inline-flex h-10 w-full items-center justify-between rounded-xl px-3 text-[13px] font-semibold shadow-sm transition ${p?"bg-amber-500 text-white":i?"bg-[#16a34a] text-white hover:bg-emerald-600":"bg-slate-100 text-slate-500 dark:bg-[#0f172a] dark:text-slate-400"}`,children:[a.jsxs("span",{className:"inline-flex items-center gap-2",children:[a.jsx(xa,{className:"h-4 w-4"}),"Time Left"]}),a.jsx("span",{className:"tabular-nums",children:y})]})}function l4(){var vs,Ra,aa,Qn,ir;const n=Bl(),i=b.useRef(null),[o,c]=b.useState("Dashboard"),[d,m]=b.useState(()=>Fs()),[p,y]=b.useState(!1),[x,f]=b.useState(""),[g,v]=b.useState(""),[w,D]=b.useState(""),[C,T]=b.useState(""),[S,k]=b.useState(null),[_,U]=b.useState(!1),[A,G]=b.useState(""),[E,z]=b.useState(""),[K,ie]=b.useState([]),[ce,B]=b.useState(!1),[W,re]=b.useState(""),[V,oe]=b.useState(!1),[O,Q]=b.useState(null),[ae,he]=b.useState(""),[me,R]=b.useState(""),[P,J]=b.useState(""),[le,ue]=b.useState(""),[ge,Ne]=b.useState("staff"),[tt,qe]=b.useState(!1),[te,Ae]=b.useState(""),[Lt,Jt]=b.useState(""),[Wt,de]=b.useState(null),[ne,ot]=b.useState(null),[jt,Qt]=b.useState(""),[pt,ea]=b.useState("customer"),[pa,Ea]=b.useState("all"),[dt,Ya]=b.useState(1),[we,Te]=b.useState(5),[Ke,Ve]=b.useState(()=>St()),[Ce,Ge]=b.useState(null),[ta,It]=b.useState([]),[mt,Xe]=b.useState(()=>Hs()),be=String((d==null?void 0:d.role)||"").toLowerCase()==="admin",Re=b.useMemo(()=>be?K:K.filter(N=>String(N.role||"").toLowerCase()!=="admin"),[K,be]),dl=!be&&!mt,Vs=b.useMemo(()=>KN.filter(N=>!N.adminOnly||be),[be]),[Pe,ml]=b.useState(null),[nl,ba]=b.useState(""),Aa=((vs=d==null?void 0:d.name)==null?void 0:vs.trim())||"",xt=Us(d==null?void 0:d.role),ve=Mn(Aa||"SC"),Fe=b.useMemo(()=>{const N=jt.trim().toLowerCase();return Re.filter(se=>{if(pt==="customer"){if(se.role!=="customer")return!1}else if(se.role==="customer")return!1;const fe=!N||se.name.toLowerCase().includes(N)||se.email.toLowerCase().includes(N)||se.role.toLowerCase().includes(N)||se.id.toLowerCase().includes(N)||String(se.phone||"").toLowerCase().includes(N)||String(se.powerSerial||"").toLowerCase().includes(N),De=pt==="all"||pt==="customer"||se.role===pt,ke=pa==="all"||pa==="active"&&se.isActive||pa==="inactive"&&!se.isActive;return fe&&De&&ke})},[Re,jt,pt,pa]),zt=b.useMemo(()=>{const N=Re.filter(Ye=>Ye.role!=="customer"),se=N.length,fe=N.filter(Ye=>Ye.isActive).length,De=se-fe,ke=be?N.filter(Ye=>Ye.role==="admin").length:0,Le=N.filter(Ye=>Ye.role==="staff").length,nt=Re.filter(Ye=>Ye.role==="customer").length;return{total:se,active:fe,inactive:De,admins:ke,staff:Le,customers:nt}},[Re,be]),Ma=b.useMemo(()=>{const N=K.filter(ke=>ke.role==="customer"),se=ta.filter(ke=>["In Use","Active","Locked"].includes(String(ke.status||""))),fe=N.filter(ke=>
639{const Le=String(ke.phone||"").replace(/\D/g,"").slice(-9),nt=String(ke.powerSerial||"").trim().toLowerCase();return se.some(Ye=>{const Ta=String(Ye.phone||"").replace(/\D/g,"").slice(-9),In=String(Ye.powerBank||Ye.bank||"").trim().toLowerCase();return Le&&Ta&&Le===Ta||nt&&In&&nt===In})}).length,De=N.filter(ke=>ke.isActive).length;return{total:N.length,active:De,inactive:N.length-De,inUse:fe}},[K,ta]),bt=pt==="customer",Va=Math.max(1,Math.ceil(Fe.length/we)),hs=Math.min(dt,Va),ps=Fe.length===0?0:(hs-1)*we,Gs=Math.min(ps+we,Fe.length),Vn=Fe.slice(ps,Gs);b.useEffect(()=>{Ya(1)},[jt,pt,pa,we]),b.useEffect(()=>{Xe(Hs()),Eo().then(fe=>Xe(fe.systemOnline!==!1)).catch(()=>Xe(Hs()));const N=fm(fe=>{Xe(fe.systemOnline!==!1)}),se=window.setInterval(()=>{Eo().then(fe=>Xe(fe.systemOnline!==!1)).catch(()=>{})},3e3);return()=>{N(),window.clearInterval(se)}},[]),b.useEffect(()=>{!be&&o==="System Mode"&&c("Dashboard")},[be,o]),b.useEffect(()=>{!be&&pt==="admin"&&ea("all")},[be,pt]),b.useEffect(()=>{_w();const N=h1(Ye=>Ve(Ye||St())),se=()=>(Ve(St()),yw().then(Ye=>(Ve(Ye),Ye)));se(),Xa({silent:!0});const fe=()=>{_e("/api/marches").then(Ye=>{var Ta;return It(((Ta=Ye==null?void 0:Ye.data)==null?void 0:Ta.orders)||[])}).catch(()=>{})},De=()=>{_e("/api/dashboard").then(Ye=>{ml((Ye==null?void 0:Ye.data)||null),ba("")}).catch(Ye=>{ba(Ye instanceof Error?Ye.message:"Could not load dashboard.")})};fe(),De();const ke=window.setInterval(()=>{fe(),De()},4e3),Le=window.setInterval(()=>{se(),Xa({silent:!0})},4e3),nt=()=>{document.hidden||(fe(),De(),se(),Xa({silent:!0}))};return document.addEventListener("visibilitychange",nt),window.addEventListener("focus",nt),()=>{N(),window.clearInterval(ke),window.clearInterval(Le),document.removeEventListener("visibilitychange",nt),window.removeEventListener("focus",nt)}},[]);const Xs=b.useMemo(()=>x1(Ke),[Ke]),ar=b.useMemo(()=>{const N=Pe==null?void 0:Pe.kpis;return[{label:"Total Rentals",value:N?N.totalRentals.value.toLocaleString():"—",delta:(N==null?void 0:N.totalRentals.delta)||"",icon:Ll,tone:"bg-blue-50 text-blue-600",positive:!String((N==null?void 0:N.totalRentals.delta)||"").startsWith("-")},{label:"Active Power Banks",value:N?N.activePowerBanks.value.toLocaleString():"—",delta:(N==null?void 0:N.activePowerBanks.delta)||"",icon:el,tone:"bg-emerald-50 text-emerald-600",positive:!String((N==null?void 0:N.activePowerBanks.delta)||"").startsWith("-")},{label:"Total Revenue",value:N?`$${Number(N.totalRevenue.value||0).toFixed(2)}`:"—",delta:(N==null?void 0:N.totalRevenue.delta)||"",icon:fs,tone:"bg-violet-50 text-violet-600",positive:!String((N==null?void 0:N.totalRevenue.delta)||"").startsWith("-")},{label:"Total Users",value:N?N.totalUsers.value.toLocaleString():"—",delta:(N==null?void 0:N.totalUsers.delta)||"",icon:sa,tone:"bg-orange-50 text-orange-500",positive:!String((N==null?void 0:N.totalUsers.delta)||"").startsWith("-")},{label:"Total Locations",value:N?N.totalLocations.value.toLocaleString():"—",delta:(N==null?void 0:N.totalLocations.delta)||"",icon:Tt,tone:"bg-sky-50 text-sky-600",positive:!String((N==null?void 0:N.totalLocations.delta)||"").startsWith("-")}]},[Pe]),Ga=(Pe==null?void 0:Pe.recentRentals)||[],kt=b.useMemo(()=>{const N=se=>se==="In Use"||se==="Active"||se==="Locked"?0:2;return[...ta].sort((se,fe)=>{const De=N(se.status)-N(fe.status);return De!==0?De:new Date(fe.createdAt||0).getTime()-new Date(se.createdAt||0).getTime()})},[ta]),Ht=(Pe==null?void 0:Pe.powerBankStatus)||[],il=(Pe==null?void 0:Pe.topLocations)||[],Gn=((Ra=il[0])==null?void 0:Ra.rentals)||1,Io=((aa=Pe==null?void 0:Pe.rentalsWeek)==null?void 0:aa.thisWeek)||Tn,Zo=((Qn=Pe==null?void 0:Pe.rentalsWeek)==null?void 0:Qn.lastWeek)||Tn,Xn=((ir=Pe==null?void 0:Pe.revenueWeek)==null?void 0:ir.thisWeek)||Tn,bs=Math.max(1,...Xn);async function Xa({silent:N=!1}={}){N||B(!0),re("");try{const fe=(await _e("/api/auth/users")).data.users||[];return ie(fe),jw(fe),fe}catch(se){return N||re(se instanceof Error?se.message:"Could not load users."),se instanceof Error&&/Authentication|Unknown role|disabled|expired/i.test(se.message)&&(ms(),n("/signin",{replace:!0})),[]}finally{N||B(!1)}}b.useEffect(()=>{var se;const N=Fs();if(!N||!zn(N.role)||!((se=N.name)!=null&&se.trim())){ms(),n("/signin",{replace:!0});return}m(N)},[n]),b.useEffect(()=>{o==="User Management"&&Xa({silent:K.length>0})},[o]);function Ol(){const N=Fs();m(N),f((N==null?void 0:N.name)||""),v((N==null?void 0:N.email)||""),k((N==null?void 0:N.avatar)||null),D(""),T(""),G(""),z(""),y(!0)}function Ul(){Q(null),he(""),R(""),J(""),ue(""),Ne("staff"),Ae(""),Jt(""),oe(!0)}function gs(N){zn(N.role)&&(!be&&String(N.role||"").toLowerCase()==="admin"||(Q(N.id),he(N.name),R(N.email),J(""),ue(""),Ne(N.role),Ae(""),Jt(""),oe(!0)))}async function Hl(N){if(N.preventDefault(),Ae(""),Jt(""),ge==="customer"){Ae("Customers are saved automatically after Face Security and payment. Do not create them here.");return}if(!be&&ge==="admin"){Ae("You cannot create or assign the Admin role.");return}if(ae.trim().length<2){Ae("Full name must be at least 2 characters.");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(me.trim())){Ae("Please enter a valid email address.");return}if(!O&&P.length<6){Ae("Password must be at least 6 characters.");return}if(P.trim()&&P.trim().length<6){Ae("Password must be at least 6 characters.");return}if(P.trim()&&P!==le){Ae("Password and confirm password do not match.");return}if(!O&&P!==le){Ae("Password and confirm password do not match.");return}qe(!0);try{if(O){const se={name:ae.trim(),email:me.trim().toLowerCase(),role:ge};P.trim()&&(se.password=P,se.confirmPassword=le);const fe=await _e(`/api/auth/users/${O}`,{method:"PUT",body:se});Jt(fe.message||"User updated. Sign in with the new email and password."),(d==null?void 0:d.id)===O&&(Oh(fe.data.user),m(fe.data.user))}else{const se=await _e("/api/auth/users",{method:"POST",body:{name:ae.trim(),email:me.trim().toLowerCase(),password:P,confirmPassword:le,role:ge}});Jt(se.message||"User created successfully."),m1({name:ae.trim(),email:me.trim(),role:ge})}J(""),ue(""),await Xa(),setTimeout(()=>
639oe(!1),700)}catch(se){Ae(se instanceof Error?se.message:"Could not save user.")}finally{qe(!1)}}async function _t(N,se){de(N.id);try{await _e(`/api/auth/users/${N.id}/status`,{method:"PATCH",body:{isActive:se}}),await Xa()}catch(fe){re(fe instanceof Error?fe.message:"Could not update status.")}finally{de(null)}}async function lr(N){if(window.confirm(`Delete user "${N.name}"? This cannot be undone.`)){de(N.id);try{await _e(`/api/auth/users/${N.id}`,{method:"DELETE"}),await Xa()}catch(fe){re(fe instanceof Error?fe.message:"Could not delete user.")}finally{de(null)}}}function ys(N){return N?new Date(N).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—"}function xl(N){if(!N)return null;const se=String(N.phone||"").replace(/\D/g,"").slice(-9),fe=String(N.powerSerial||"").trim().toLowerCase();return ta.find(De=>{if(!["In Use","Active","Locked"].includes(String(De.status||"")))return!1;const ke=String(De.phone||"").replace(/\D/g,"").slice(-9),Le=String(De.powerBank||De.bank||"").trim().toLowerCase();return se&&ke&&se===ke||fe&&Le&&fe===Le})||null}function Fl(N){const se=N==null?void 0:N.avatar;if(!se||typeof document>"u")return;const fe=String((N==null?void 0:N.name)||"customer").trim().replace(/[^\w]+/g,"-").replace(/^-|-$/g,"")||"customer",De=Le=>{const nt=document.createElement("a");nt.download=`${fe}.jpg`,nt.href=Le,nt.click()},ke=new Image;ke.onload=()=>{const Le=document.createElement("canvas");Le.width=ke.naturalWidth||720,Le.height=ke.naturalHeight||960;const nt=Le.getContext("2d");if(!nt){De(se);return}nt.fillStyle="#0f172a",nt.fillRect(0,0,Le.width,Le.height),nt.drawImage(ke,0,0),De(Le.toDataURL("image/jpeg",.92))},ke.onerror=()=>De(se),ke.src=se}function Ko(){Qt(""),ea("all"),Ea("all"),Ya(1)}function sr(){const se=(bt?[["ID","Full Name","Number","Serial","Role","Status","Joined Date"],...Fe.map((Le,nt)=>[nt+1,Le.name,Le.phone||"",Le.powerSerial||"",Us(Le.role),Le.isActive?"Active":"Inactive",ys(Le.createdAt)])]:[["ID","Full Name","Email","Role","Status","Joined Date"],...Fe.map((Le,nt)=>[nt+1,Le.name,Le.email,Us(Le.role),Le.isActive?"Active":"Inactive",ys(Le.createdAt)])]).map(Le=>Le.map(nt=>`"${String(nt).replace(/"/g,'""')}"`).join(",")).join(`
640`),fe=new Blob([se],{type:"text/csv;charset=utf-8;"}),De=URL.createObjectURL(fe),ke=document.createElement("a");ke.href=De,ke.download="somacharge-users.csv",ke.click(),URL.revokeObjectURL(De)}function nr(){ms(),n("/",{replace:!0})}function Jo(N){var De;const se=(De=N.target.files)==null?void 0:De[0];if(!se)return;if(!se.type.startsWith("image/")){z("Please choose an image file.");return}if(se.size>2*1024*1024){z("Image must be smaller than 2MB.");return}const fe=new FileReader;fe.onload=()=>{k(typeof fe.result=="string"?fe.result:null),z("")},fe.readAsDataURL(se)}async function Qs(N){if(N.preventDefault(),G(""),z(""),x.trim().length<2){z("Full name must be at least 2 characters.");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(g.trim())){z("Please enter a valid email address.");return}if(w&&w.length<6){z("Password must be at least 6 characters.");return}if(w&&w!==C){z("Password and confirm password do not match.");return}U(!0);try{const se={name:x.trim(),email:g.trim().toLowerCase(),avatar:S};w&&(se.password=w,se.confirmPassword=C);const fe=await _e("/api/auth/profile",{method:"PUT",body:se});Oh(fe.data.user),m(fe.data.user),D(""),T(""),G(fe.message||"Profile updated successfully.")}catch(se){z(se instanceof Error?se.message:"Could not update profile.")}finally{U(!1)}}return dl?a.jsx(l1,{onRetry:()=>{Eo().then(N=>Xe(N.systemOnline!==!1)).catch(()=>Xe(Hs()))}}):a.jsxs("div",{className:"theme-app flex min-h-screen bg-white text-slate-800 dark:bg-[#0b1220] dark:text-slate-100",children:[a.jsxs("aside",{className:"theme-sidebar sticky top-0 flex h-screen w-[248px] shrink-0 flex-col overflow-hidden bg-[#0b1733] text-slate-400",children:[a.jsx("div",{className:"flex w-full shrink-0 justify-center bg-[#0b1733] px-3 py-6",children:a.jsx(al,{className:"mx-auto h-[80px] w-full max-w-[220px]",imgClassName:"h-full w-full object-contain object-center"})}),a.jsx("nav",{className:"mt-2 flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto bg-[#0b1733] px-3 pb-3",children:Vs.map(N=>{const se=N.icon,fe=o===N.label;return a.jsxs("button",{type:"button",onClick:()=>{N.label==="Messages"&&Ve(St()),c(N.label)},className:`flex h-11 shrink-0 items-center gap-3 rounded-xl px-3 text-[13.5px] font-medium transition-colors ${fe?"bg-[#2f6bff] text-white shadow-[0_8px_18px_rgba(47,107,255,0.35)]":"bg-transparent text-slate-400 hover:bg-[#122445] hover:text-slate-200"}`,children:[a.jsx(se,{className:"h-[18px] w-[18px] shrink-0"}),a.jsx("span",{className:"flex-1 text-left",children:N.label}),N.badge?a.jsx("span",{className:`rounded-full px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wide ${fe?"bg-white/20 text-white":"bg-emerald-500/20 text-emerald-300"}`,children:N.badge}):null]},N.label)})}),a.jsx("div",{className:"shrink-0 bg-[#0b1733] px-3 py-4",children:a.jsxs("button",{type:"button",onClick:nr,className:"flex h-11 w-full items-center gap-3 rounded-xl bg-transparent px-3 text-[13.5px] font-medium text-slate-400 transition-colors hover:bg-red-500/15 hover:text-red-300",children:[a.jsx(Kv,{className:"h-[18px] w-[18px] shrink-0"}
640),"Sign out"]})})]}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a.jsxs("header",{className:"theme-header flex h-[68px] items-center gap-4 border-b border-slate-200 bg-white px-6 dark:border-slate-700 dark:bg-[#151d2e]",children:[a.jsx("span",{className:"grid h-9 w-9 place-items-center rounded-lg text-slate-500",children:a.jsx(qp,{className:"h-5 w-5"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h1",{className:"text-[20px] font-semibold text-slate-900",children:o==="Messages"?"Messages":o}),o==="Marches"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Live station: battery, customer, and machine status"}):o==="Rentals"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Current rentals stay In Use. Ended week purchases stay as history."}):o==="Power Banks"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Manage and monitor all Hiil Power Bank devices"}):o==="Payment"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Track revenue, balance, and payment records"}):o==="Pricing"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Update rental times and prices for mobile Scan Rent"}):o==="Membership"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Edit membership cards, weeks, rental duration, and total price"}):o==="Security"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Manage 4-digit security PIN data for customers"}):o==="Locations"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"See who is using, their phone number, and where they are"}):o==="Reporting"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Daily profit, loss, and financial calculations"}):o==="Messages"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Open a message to see the full payment transaction"}):o==="System Mode"?a.jsx("p",{className:"text-[12px] text-slate-500",children:"Control system status and receive alerts when a system issue occurs."}):null]}),o==="Marches"||o==="Rentals"||o==="Power Banks"||o==="Payment"||o==="Pricing"||o==="Membership"||o==="Security"||o==="Locations"||o==="Reporting"||o==="Messages"||o==="System Mode"?a.jsx("div",{className:"flex-1"}):a.jsx("div",{className:"mx-auto w-full max-w-[420px]",children:a.jsxs("label",{className:"relative block",children:[a.jsx(qs,{className:"pointer-events-none absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"h-10 w-full rounded-full border border-slate-200 bg-[#f7f9fc] pl-10 pr-4 text-[13px] text-slate-700 outline-none transition placeholder:text-slate-400 focus:border-blue-400 focus:bg-white focus:ring-4 focus:ring-blue-500/10",placeholder:o==="User Management"?"Search users by name, email or role...":"Search anything...",value:o==="User Management"?jt:"",onChange:N=>{o==="User Management"&&Qt(N.target.value)},readOnly:o!=="User Management"})]})}),a.jsx(ds,{}),a.jsx("div",{className:"relative",children:a.jsxs("button",{type:"button",onClick:()=>{Ge(null),Ve(St()),c("Messages")},className:`relative grid h-10 w-10 place-items-center rounded-full transition ${o==="Messages"?"bg-blue-50 text-[#2f6bff]":"text-slate-500 hover:bg-slate-100"}`,"aria-label":"Messages",children:[a.jsx(Vo,{className:"h-[18px] w-[18px]"}),Xs>0?a.jsx("span",{className:"absolute right-1.5 top-1.5 grid h-4 min-w-4 place-items-center rounded-full bg-[#2f6bff] px-1 text-[9px] font-bold text-white",children:Xs>99?"99+":Xs}):null]})}),a.jsxs("button",{type:"button",onClick:Ol,className:"flex items-center gap-3 rounded-full py-1 pl-1 pr-2 hover:bg-slate-50",children:[d!=null&&d.avatar?a.jsx("img",{src:d.avatar,alt:Aa,className:"h-9 w-9 rounded-full object-cover"}):a.jsx("span",{className:"grid h-9 w-9 place-items-center rounded-full bg-[#2f6bff] text-[12px] font-semibold text-white",children:ve}),a.jsxs("span",{className:"text-left",children:[a.jsx("span",{className:"block text-[13px] font-semibold leading-tight text-slate-900",children:Aa}),a.jsx("span",{className:"block text-[11px] text-slate-400",children:xt})]}),a.jsx(qi,{className:"h-4 w-4 text-slate-400"})]})]}),a.jsx("main",{className:`flex-1 overflow-auto ${o==="User Management"||o==="Marches"||o==="Rentals"||o==="Power Banks"||o==="Payment"||o==="Pricing"||o==="Membership"||o==="Security"||o==="Locations"||o==="Reporting"||o==="Messages"||o==="System Mode"?"space-y-3 p-4":"space-y-5 p-6"}`,children:o==="User Management"?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[17px] font-semibold text-slate-900",children:bt?"Registered Customers":"Registered Users"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:bt?"Manage and monitor customers saved after Face Security and payment":"Manage and monitor all users in the system"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[bt?a.jsxs("button",{type:"button",onClick:()=>{ea("all"),Ya(1)},className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white transition hover:bg-blue-600",children:[a.jsx(sa,{className:"h-3.5 w-3.5"}),"Users"]}):a.jsxs("button",{type:"button",onClick:()=>{ea("customer"),Ya(1)},className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-emerald-200 bg-emerald-50 px-3 text-[12px] font-semibold text-emerald-700 transition hover:bg-emerald-100",children:[a.jsx($i,{className:"h-3.5 w-3.5"}),"Customers"]}),a.jsxs("button",{type:"button",onClick:sr,className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(Dn,{className:"h-3.5 w-3.5"}),"Export",a.jsx(qi,{className:"h-3 w-3 text-slate-400"})]}),a.jsxs("button",{type:"button",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(Dv,{className:"h-3.5 w-3.5"}),"Filter",a.jsx(qi,{className:"h-3 w-3 text-slate-400"})]}),bt?null:a.jsxs("button",{type:"button",onClick:Ul,className:"inline-flex h-8 items-center gap-1.5 rounded-lg bg-[#2f6bff] px-3 text-[12px] font-semibold text-white transition hover:bg-blue-600",children:[a.jsx(Ys,{className:"h-3.5 w-3.5"}),"Create User"]})]})]}),a.jsx(ll,{cols:bt?4:be?6:5,children:(bt?[{label:"Total Customers",value:Ma.total,icon:sa,tone:"bg-blue-50 text-blue-600"},{label:"Active",value:Ma.active,icon:Mh,tone:"bg-emerald-50 text-emerald-600"},{label:"Inactive",value:Ma.inactive,icon:Rh,tone:"bg-orange-50 text-orange-500"},{label:"In Use",value:Ma.inUse,icon:el,tone:"bg-amber-50 text-amber-600"}]:[{label:"Total Users",value:zt.total,icon:sa,tone:"bg-blue-50 text-blue-600"},{label:"Active Users",value:zt.active,icon:Mh,tone:"bg-emerald-50 text-emerald-600"},{label:"Inactive Users",value:zt.inactive,icon:Rh,tone:"bg-orange-50 text-orange-500"},...be?[{label:"Admins",value:zt.admins,icon:Dt,tone:"bg-violet-50 text-violet-600"}]:[],{label:"Staff",value:zt.staff,icon:sa,tone:"bg-sky-50 text-sky-600"},{label:"Customers",value:zt.customers,icon:$i,tone:"bg-emerald-50 text-emerald-600"}]).map(N=>a.jsx(fa,{label:N.label,value:N.value,icon:N.icon,tone:N.tone},N.label))}),a.jsx("section",{className:"rounded-xl border border-slate-100 bg-white p-2.5 shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("label",{className:"relative min-w-[200px] flex-1",children:[a.jsx(qs,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"h-8 w-full rounded-lg border border-slate-200 bg-[#f7f9fc] pl-9 pr-3 text-[12px] outline-none transition placeholder:text-slate-400 focus:border-blue-400 focus:bg-white focus:ring-2 focus:ring-blue-500/10",placeholder:bt?"Search customers...":"Search users...",value:jt,onChange:N=>Qt(N.target.value)})]}),bt?null:a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:pt,onChange:N=>ea(N.target.value),children:[a.jsx("option",{value:"all",children:"All Roles"}),be?a.jsx("option",{value:"admin",children:"Admin"}):null,a.jsx("option",{value:"staff",children:"Staff"})]}),a.jsxs("select",{className:"h-8 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] text-slate-600 outline-none focus:border-blue-400",value:pa,onChange:N=>Ea(N.target.value),children:[a.jsx("option",{value:"all",children:"All Statuses"}),a.jsx("option",{value:"active",children:"Active"}),a.jsx("option",{value:"inactive",children:"Inactive"})]}),a.jsxs("button",{type:"button",onClick:Ko,className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-600 transition hover:bg-slate-50",children:[a.jsx(E5,{className:"h-3.5 w-3.5"}),"Reset"]})]})}),a.jsx("section",{className:"overflow-hidden rounded-xl border border-slate-100 bg-white shadow-[0_4px_14px_rgba(15,40,90,0.04)]",children:ce?a.jsxs("div",{className:"flex items-center justify-center gap-2 px-4 py-10 text-[12px] text-slate-500",children:[a.jsx($a,{className:"h-4 w-4 animate-spin"}),"Loading users..."]}):W?a.jsx("div",{className:"px-4 py-8 text-center text-[12px] text-red-600",children:W}):Fe.length===0?a.jsx("div",{className:"px-4 py-8 text-center text-[12px] text-slate-500",children:bt?"No customers found.":"No users found."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:`w-full text-left text-[12px] ${bt?"":"min-w-[860px]"}`,children:[a.jsx("thead",{className:"bg-[#f8fafc] text-[10px] uppercase tracking-wide text-slate-400",children:a.jsx("tr",{children:(bt?["ID","Face","Full Name","Number","Serial","Role","Status","Joined Date","Actions"]:["ID","Full Name","Email","Role","Status","Joined Date","Actions"]).map(N=>a.jsx("th",{className:`px-3 py-2 font-semibold whitespace-nowrap ${N==="Actions"?"sticky right-0 bg-[#f8fafc]":""}`,children:N},N))})}),a.jsx("tbody",{children:Vn.map((N,se)=>{const fe=Wt===N.id;return a.jsxs("tr",{className:"border-t border-slate-100 text-slate-700",children:[a.jsx("td",{className:"px-3 py-2 font-semibold text-slate-500",children:ps+se+1}),bt?a.jsx("td",{className:"px-3 py-2",children:N.avatar?a.jsx("img",{src:N.avatar,alt:"",className:"h-10 w-10 rounded-full object-cover object-top ring-2 ring-emerald-100"}):a.jsx("span",{className:"grid h-10 w-10 place-items-center rounded-full bg-[#2f6bff] text-[11px] font-semibold text-white",children:Mn(N.name)})}):null,a.jsx("td",{className:"px-3 py-2 font-semibold text-slate-800",children:N.name}),bt?a.jsxs(a.Fragment,{children:[a.jsx("td",{className:"px-3 py-2 whitespace-nowrap text-slate-600",children:N.phone||"—"}),a.jsx("td",{className:"px-3 py-2 font-mono text-[11px] text-slate-600",children:N.powerSerial||"—"})]}):a.jsx("td",{className:"px-3 py-2 text-slate-600",children:N.email}),a.jsx("td",{className:"px-3 py-2",children:a.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-[10px] font-semibold ${N.role==="admin"?"bg-violet-50 text-violet-600":N.role==="customer"?"bg-emerald-50 text-emerald-700":"bg-sky-50 text-sky-600"}`,children:Us(N.role)||"—"})}),a.jsx("td",{className:"px-3 py-2",children:a.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-semibold ${N.isActive?"bg-emerald-50 text-emerald-600":"bg-red-50 text-red-500"}`,children:[a.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${N.isActive?"bg-emerald-500":"bg-red-500"}`}),N.isActive?"Active":"Inactive"]})}),a.jsx("td",{className:"px-3 py-2 whitespace-nowrap text-[11px] text-slate-500",children:ys(N.createdAt)}),a.jsx("td",{className:"sticky right-0 bg-white px-3 py-2",children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[bt?a.jsxs("button",{type:"button",onClick:()=>ot(N),className:"inline-flex h-7 items-center gap-1 rounded-lg border border-emerald-200 bg-emerald-50 px-2 text-[11px] font-semibold text-emerald-700 transition hover:bg-emerald-100 dark:border-emerald-500/30 dark:bg-emerald-500/15 dark:text-emerald-300","aria-label":`View ${N.name}
640`,children:[a.jsx(qn,{className:"h-3.5 w-3.5"}),"View"]}):a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",disabled:fe,onClick:()=>gs(N),className:"grid h-7 w-7 place-items-center rounded-lg border border-blue-100 bg-blue-50 text-blue-600 transition hover:bg-blue-100 disabled:opacity-40","aria-label":`Update ${N.name}`,children:a.jsx(Go,{className:"h-3.5 w-3.5"})}),a.jsx("button",{type:"button",disabled:fe||N.isActive&&(d==null?void 0:d.id)===N.id,onClick:()=>void _t(N,!N.isActive),className:`relative h-5 w-9 rounded-full transition disabled:cursor-not-allowed disabled:opacity-40 ${N.isActive?"bg-emerald-500":"bg-slate-300"}`,"aria-label":N.isActive?"Set inactive":"Set active",children:a.jsx("span",{className:`absolute top-0.5 h-4 w-4 rounded-full bg-white shadow transition ${N.isActive?"left-[18px]":"left-0.5"}`})})]}),a.jsx("button",{type:"button",disabled:fe||(d==null?void 0:d.id)===N.id,onClick:()=>void lr(N),className:"grid h-7 w-7 place-items-center rounded-lg border border-red-100 bg-red-50 text-red-500 transition hover:bg-red-100 disabled:cursor-not-allowed disabled:opacity-40","aria-label":`Delete ${N.name}`,children:a.jsx(na,{className:"h-3.5 w-3.5"})})]})})]},N.id)})})]})}),a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-slate-100 px-3 py-2",children:[a.jsxs("p",{className:"text-[11px] text-slate-500",children:["Showing ",ps+1," to ",Gs," of ",Fe.length," ",bt?"customers":"users"]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{type:"button",disabled:hs<=1,onClick:()=>Ya(N=>Math.max(1,N-1)),className:"grid h-7 w-7 place-items-center rounded-md border border-slate-200 text-slate-500 transition hover:bg-slate-50 disabled:opacity-40",children:a.jsx(dv,{className:"h-3.5 w-3.5"})}),Array.from({length:Va},(N,se)=>se+1).slice(0,5).map(N=>a.jsx("button",{type:"button",onClick:()=>Ya(N),className:`grid h-7 min-w-7 place-items-center rounded-md px-1.5 text-[11px] font-semibold transition ${hs===N?"bg-[#2f6bff] text-white":"border border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:N},N)),a.jsx("button",{type:"button",disabled:hs>=Va,onClick:()=>Ya(N=>Math.min(Va,N+1)),className:"grid h-7 w-7 place-items-center rounded-md border border-slate-200 text-slate-500 transition hover:bg-slate-50 disabled:opacity-40",children:a.jsx(om,{className:"h-3.5 w-3.5"})})]}),a.jsx("select",{className:"h-7 rounded-md border border-slate-200 bg-white px-1.5 text-[11px] text-slate-600 outline-none",value:we,onChange:N=>Te(Number(N.target.value)),children:[5,10,20].map(N=>a.jsxs("option",{value:N,children:[N," / page"]},N))})]})]})]})})]}):o==="Marches"?a.jsx(Gw,{}):o==="Rentals"?a.jsx(Lw,{showDuration:!0}):o==="Power Banks"?a.jsx(gN,{}):o==="Payment"?a.jsx(aN,{}):o==="Pricing"?a.jsx(jN,{}):o==="Membership"?a.jsx(EN,{}):o==="Security"?a.jsx(DN,{}):o==="Locations"?a.jsx(ON,{}):o==="Reporting"?a.jsx(IN,{}):o==="Messages"?a.jsx(YN,{notifications:Ke,onNotificationsChange:Ve,focusId:Ce}):o==="System Mode"?a.jsx(ZN,{}):a.jsxs(a.Fragment,{children:[nl?a.jsx("p",{className:"rounded-xl border border-red-100 bg-red-50 px-3 py-2 text-[12px] text-red-600",children:nl}):null,a.jsx(ll,{cols:5,children:ar.map(N=>a.jsx(fa,{label:N.label,value:N.value,icon:N.icon,tone:N.tone,delta:N.delta,positive:N.positive},N.label))}),a.jsxs("section",{className:"grid grid-cols-[minmax(0,1.7fr)_minmax(320px,1fr)] gap-4",children:[a.jsxs("article",{className:"rounded-2xl border border-slate-100 bg-white p-5 shadow-[0_8px_24px_rgba(15,40,90,0.05)]",children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:"Rentals Overview"}),a.jsxs("div",{className:"mt-2 flex items-center gap-4 text-[12px] text-slate-500",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-600"})," This Week"]}),a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"h-2 w-4 roun
640ded-sm border border-blue-300 bg-blue-100"})," Last Week"]})]})]}),a.jsx("span",{className:"rounded-lg border border-slate-200 px-3 py-1.5 text-[12px] font-medium text-slate-600",children:"This Week"})]}),a.jsx(JN,{thisWeek:Io,lastWeek:Zo})]}),a.jsxs("article",{className:"rounded-2xl border border-slate-100 bg-white p-5 shadow-[0_8px_24px_rgba(15,40,90,0.05)]",children:[a.jsx("h2",{className:"mb-4 text-[16px] font-semibold text-slate-900",children:"Recent Rentals"}),Ga.length===0?a.jsx("p",{className:"py-8 text-center text-[12px] text-slate-400",children:"No rentals yet."}):a.jsx("ul",{className:"space-y-3.5",children:Ga.map(N=>a.jsxs("li",{className:"flex items-center gap-3",children:[a.jsx("span",{className:`grid h-10 w-10 shrink-0 place-items-center rounded-full text-[12px] font-semibold text-white ${N.color}`,children:N.initials}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-[13px] font-semibold text-slate-800",children:N.name}),a.jsxs("p",{className:"truncate text-[11px] text-slate-400",children:[N.bank," • ",N.location]})]}),a.jsxs("div",{className:"text-right",children:[a.jsx(cp,{status:N.status}),a.jsx("p",{className:"mt-1 text-[11px] text-slate-400",children:N.time})]})]},N.id||N.bank))})]})]}),a.jsxs("section",{className:"grid grid-cols-3 gap-4",children:[a.jsxs("article",{className:"rounded-2xl border border-slate-100 bg-white p-5 shadow-[0_8px_24px_rgba(15,40,90,0.05)]",children:[a.jsx("h2",{className:"mb-4 text-[16px] font-semibold text-slate-900",children:"Power Bank Status"}),a.jsxs("div",{className:"flex items-center gap-5",children:[a.jsx(WN,{segments:Ht,total:(Pe==null?void 0:Pe.powerBankTotal)||0}),a.jsx("ul",{className:"flex-1 space-y-3",children:Ht.length===0?a.jsx("li",{className:"text-[12px] text-slate-400",children:"No power banks yet."}):Ht.map(N=>a.jsxs("li",{className:"flex items-start justify-between gap-3 text-[12px]",children:[a.jsxs("span",{className:"flex items-center gap-2 text-slate-600",children:[a.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${N.color}`}),N.label]}),a.jsxs("span",{className:"text-right",children:[a.jsx("span",{className:"block font-semibold text-slate-800",children:N.value.toLocaleString()}),a.jsx("span",{className:"text-[11px] text-slate-400",children:N.percent})]})]},N.label))})]})]}),a.jsxs("article",{className:"rounded-2xl border border-slate-100 bg-white p-5 shadow-[0_8px_24px_rgba(15,40,90,0.05)]",children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:"Revenue Overview"}),a.jsx("span",{className:"rounded-lg border border-slate-200 px-3 py-1.5 text-[12px] font-medium text-slate-600",children:"This Week"})]}),a.jsx("div",{className:"mb-1 flex justify-between text-[11px] text-slate-400",children:a.jsxs("span",{children:["$",bs.toFixed(2)]})}),a.jsx(e4,{values:Xn})]}),a.jsxs("article",{className:"rounded-2xl border border-slate-100 bg-white p-5 shadow-[0_8px_24px_rgba(15,40,90,0.05)]",children:[a.jsx("h2",{className:"mb-5 text-[16px] font-semibold text-slate-900",children:"Top Locations"}),il.length===0?a.jsx("p",{className:"py-8 text-center text-[12px] text-slate-400",children:"No location rentals yet."}):a.jsx("ul",{className:"space-y-4",children:il.map(N=>a.jsxs("li",{children:[a.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[13px]",children:[a.jsxs("span",{className:"flex items-center gap-2 font-medium text-slate-700",children:[a.jsx(Tt,{className:"h-3.5 w-3.5 text-blue-500"}),N.name]}),a.jsxs("span",{className:"text-[12px] text-slate-500",children:[N.rentals," Rentals"]})]}),a.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-100",children:a.jsx("div",{className:"h-full rounded-full bg-[#2f6bff]",style:{width:`${N.rentals/Gn*100}%`}})})]},N.name))})]})]}),a.jsx("section",{children:a.jsxs("article",{className:"overflow-hidden rounded-2xl border border-slate-100 bg-white shadow-[0_8px_24px_rgba(15,40,90,0.05)]",children:[a.jsx("div",{className:"px-5 py-4",children:a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:"Recent Transactions"})}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-[12.5px]",children:[a.jsx("thead",{className:"bg-[#f8fafc] text-[11px] uppercase tracking-wide text-slate-400",children:a.jsx("tr",{children:["Customer","Power Bank","Location","Amount","Time","Status","Date"].map(N=>a.jsx("th",{className:"px-4 py-3 font-semibold",children:N},N))})}),a.jsx("tbody",{children:kt.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:7,className:"px-4 py-8 text-center text-[12px] text-slate-400",children:"No rental transactions yet."})}):kt.slice(0,20).map(N=>a.jsxs("tr",{className:"border-t border-slate-100 text-slate-700",children:[a.jsx("td",{className:"px-4 py-3.5",children:N.customer||N.user}),a.jsx("td",{className:"px-4 py-3.5",children:N.bank}),a.jsx("td",{className:"px-4 py-3.5",children:N.location}),a.jsx("td",{className:"px-4 py-3.5 font-semibold",children:typeof N.amount=="number"?`$${N.amount.toFixed(2)}`:N.amount}),a.jsx("td",{className:"px-4 py-3.5",children:N.dueAt||N.status==="Returned"||N.status==="In Use"||N.status==="Active"||N.status==="Locked"?a.jsx(t4,{dueAt:N.dueAt,status:N.status,durationLabel:N.durationLabel,durationMinutes:N.durationMinutes}):N.method||N.durationLabel||"—"}),a.jsx("td",{className:"px-4 py-3.5",children:a.jsx(cp,{status:N.status})}),a.jsx("td",{className:"px-4 py-3.5 whitespace-nowrap text-slate-500",children:N.createdAt?new Date(N.createdAt).toLocaleStr
640ing("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):N.date})]},N.id))})]})})]})})]})})]}),p?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[480px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)]",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:"Edit Profile"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:"Update your photo and account details"})]}),a.jsx("button",{type:"button",onClick:()=>y(!1),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"Close profile",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("form",{className:"space-y-4 px-5 py-5",onSubmit:Qs,children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"relative",children:[S?a.jsx("img",{src:S,alt:x||"Profile",className:"h-20 w-20 rounded-full object-cover"}):a.jsx("span",{className:"grid h-20 w-20 place-items-center rounded-full bg-[#2f6bff] text-[22px] font-semibold text-white",children:Mn(x||Aa)}),a.jsx("button",{type:"button",onClick:()=>{var N;return(N=i.current)==null?void 0:N.click()},className:"absolute -bottom-1 -right-1 grid h-8 w-8 place-items-center rounded-full border border-white bg-slate-900 text-white shadow","aria-label":"Upload image",children:a.jsx($i,{className:"h-3.5 w-3.5"})}),a.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:Jo})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[13px] font-semibold text-slate-800",children:"Profile image"}),a.jsx("p",{className:"mt-1 text-[12px] text-slate-500",children:"JPG or PNG, max 2MB"}),S?a.jsx("button",{type:"button",onClick:()=>k(null),className:"mt-2 text-[12px] font-medium text-red-500 hover:text-red-600",children:"Remove photo"}):null]})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Full name"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",value:x,onChange:N=>f(N.target.value),required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Email"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"email",value:g,onChange:N=>v(N.target.value),required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Password"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"password",value:w,onChange:N=>D(N.target.value),placeholder:"Leave blank to keep current password"})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Confirm password"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"password",value:C,onChange:N=>T(N.target.value),placeholder:"Confirm new password"})]}),E?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:E}):null,A?a.jsx("p",{className:"rounded-xl bg-emerald-50 px-3 py-2 text-[12.5px] text-emerald-600",children:A}):null,a.jsx("button",{type:"submit",disabled:_,className:"flex h-11 w-full items-center justify-center gap-2 rounded-xl bg-[#2f6bff] text-[14px] font-semibold text-white transition hover:bg-blue-600 disabled:opacity-70",children:_?a.jsxs(a.Fragment,{children:[a.jsx($a,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):"Save"})]})]})}):null,ne?(()=>{const N=xl(ne),se=!!N,fe=[{label:"Full Name",value:ne.name||"—",icon:sa},{label:"Phone Number",value:ne.phone||"—",icon:Pa},{label:"Power Serial",value:ne.powerSerial||"—",icon:el},{label:"Role",value:Us(ne.role)||"Customer",icon:ka},{label:"Status",value:ne.isActive?"Active":"Inactive",icon:Dt},{label:"Joined Date",value:ys(ne.createdAt),icon:Ll},{label:"Rental",value:se?On(N.status)||"In Use":"Not in use",icon:xa}];return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/55 px-4",onClick:()=>ot(null),children:a.jsxs("div",{className:"w-full max-w-[760px] overflow-hidden rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.28)] dark:bg-[#151d2e] dark:shadow-[0_24px_80px_rgba(0,0,0,0.45)]",onClick:De=>De.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4 dark:border-slate-700",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"grid h-10 w-10 place-items-center rounded-full bg-[#2f6bff]/10 text-[#2f6bff] dar
640k:bg-[#2f6bff]/20 dark:text-sky-300",children:a.jsx(sa,{className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900 dark:text-slate-100",children:"Customer details"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500 dark:text-slate-400",children:"Face photo and personal information"})]})]}),a.jsx("button",{type:"button",onClick:()=>ot(null),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-slate-700 dark:hover:text-slate-200","aria-label":"Close customer details",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"grid gap-5 px-5 py-5 lg:grid-cols-[220px_1fr]",children:[a.jsxs("div",{className:"flex flex-col items-center text-center",children:[ne.avatar?a.jsx("img",{src:ne.avatar,alt:ne.name||"Customer face",className:"h-56 w-48 rounded-2xl object-cover object-top ring-1 ring-slate-200 dark:ring-slate-600"}):a.jsx("span",{className:"grid h-56 w-48 place-items-center rounded-2xl bg-[#2f6bff] text-[42px] font-semibold text-white",children:Mn(ne.name)}),a.jsx("p",{className:"mt-3 text-[15px] font-semibold text-slate-900 dark:text-slate-100",children:ne.name}),a.jsxs("p",{className:"mt-1 inline-flex items-center gap-1.5 text-[12px] text-slate-500 dark:text-slate-400",children:[a.jsx(sa,{className:"h-3.5 w-3.5"}),Us(ne.role)||"Customer"]}),a.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-1.5",children:[a.jsx("span",{className:"inline-flex rounded-full bg-emerald-50 px-2.5 py-0.5 text-[10px] font-semibold text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",children:Us(ne.role)||"Customer"}),a.jsx("span",{className:`inline-flex rounded-full px-2.5 py-0.5 text-[10px] font-semibold ${ne.isActive?"bg-emerald-50 text-emerald-600 dark:bg-emerald-500/15 dark:text-emerald-300":"bg-red-50 text-red-500 dark:bg-red-500/15 dark:text-red-300"}`,children:ne.isActive?"Active":"Inactive"}),se?a.jsx("span",{className:"inline-flex rounded-full bg-amber-50 px-2.5 py-0.5 text-[10px] font-semibold text-amber-700 dark:bg-amber-500/15 dark:text-amber-300",children:"In Use"}):null]}),a.jsxs("button",{type:"button",disabled:!ne.avatar,onClick:()=>Fl(ne),className:"mt-4 inline-flex h-9 w-full max-w-[192px] items-center justify-center gap-1.5 rounded-lg bg-[#16a34a] text-[12px] font-semibold text-white transition hover:bg-emerald-600 disabled:cursor-not-allowed disabled:opacity-40",children:[a.jsx(Dn,{className:"h-3.5 w-3.5"}),"Download"]})]}),a.jsxs("div",{className:"overflow-hidden rounded-xl border border-slate-100 dark:border-slate-700",children:[a.jsx("table",{className:"w-full text-left",children:a.jsx("tbody",{children:fe.map(De=>{const ke=De.icon;return a.jsxs("tr",{className:"border-b border-slate-100 last:border-b-0 dark:border-slate-700",children:[a.jsx("td",{className:"whitespace-nowrap px-3.5 py-2.5",children:a.jsxs("span",{className:"inline-flex items-center gap-2.5 text-[13px] text-slate-500 dark:text-slate-400",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-lg bg-slate-50 text-sky-500 dark:bg-[#0f172a] dark:text-sky-300",children:a.jsx(ke,{className:"h-4 w-4"})}),De.label]})}),a.jsx("td",{className:"px-3.5 py-2.5 text-right text-[13.5px] font-semibold text-slate-800 dark:text-slate-100",children:De.value})]},De.label)})})}),a.jsx("div",{className:"border-t border-slate-100 p-2.5 dark:border-slate-700",children:a.jsx(a4,{dueAt:N==null?void 0:N.dueAt,inUse:se,durationLabel:N==null?void 0:N.durationLabel,durationMinutes:N==null?void 0:N.durationMinutes})})]})]})]})})})():null,V?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/45 px-4",children:a.jsxs("div",{className:"w-full max-w-[480px] rounded-2xl bg-white shadow-[0_24px_80px_rgba(15,40,90,0.22)]",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-slate-100 px-5 py-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-semibold text-slate-900",children:O?"Update User":"Create Users"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-500",children:O?"Change name, email or password. New details work immediately at Sign In.":"Add a new Staff, Admin, or Customer role"})]}),a.jsx("button",{type:"button",onClick:()=>oe(!1),className:"grid h-8 w-8 place-items-center rounded-lg text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"Close create user",children:a.jsx(Gt,{className:"h-4 w-4"})})]}),a.jsxs("form",{className:"space-y-4 px-5 py-5",onSubmit:Hl,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Full Name"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",value:ae,onChange:N=>he(N.target.value),placeholder:"Enter full name",required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Email"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"email",value:me,onChange:N=>R(N.target.value),placeholder:"Enter email",required:!0})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Password"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"password",autoComplete:"new-password",value:P,onChange:N=>J(N.target.value),placeholder:O?"Leave blank to keep current password":"Create password",required:!O,minLength:O?void 0:6})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Confirm Password"}),a.jsx("input",{className:"h-11 w-full rounded-xl border border-slate-200 px-3 text-[14px] outline-none transition focus:border-blue-400 focus:ring-4 focus:ring-blue-500/10",type:"password",autoComplete:"new-password",value:le,onChange:N=>ue(N.target.value),placeholder:O?"Confirm new password":"Confirm password",required:!O||!!P,minLength:O?void 0:6})]}),a.jsxs("fieldset",{children:[a.jsx("legend",{className:"mb-1.5 block text-[13px] font-semibold text-slate-700",children:"Role"}),a.jsxs("div",{className:`grid gap-3 ${be?"grid-cols-3":"grid-cols-2"}`,children:[a.jsx("button",{type:"button",onClick:()=>Ne("staff"),className:`h-11 rounded-xl border text-[13px] font-semibold transition ${ge==="staff"?"border-blue-500 bg-blue-50 text-blue-600":"border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:"Staff"}),be?a.jsx("button",{type:"button",onClick:()=>Ne("admin"),className:`h-11 rounded-xl border text-[13px] font-semibold transition ${ge==="admin"?"border-violet-500 bg-violet-50 text-violet-600":"border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:"Admin"}):null,a.jsx("button",{type:"button",onClick:()=>Ne("customer"),className:`h-11 rounded-xl border text-[13px] font-semibold transition ${ge==="customer"?"border-emerald-500 bg-emerald-50 text-emerald-700":"border-slate-200 text-slate-600 hover:bg-slate-50"}`,children:"Customer"})]}),ge==="customer"?a.jsx("p",{className:"mt-2 rounded-xl bg-emerald-50 px-3 py-2 text-[12px] text-emerald-700",children:"Customer records are saved only after Face Security and a successful rental payment."}):null]}),te?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:te}):null,Lt?a.jsx("p",{className:"rounded-xl bg-emerald-50 px-3 py-2 text-[12.5px] text-emerald-600",children:Lt}):null,a.jsx("button",{type:"submit",disabled:tt,className:"flex h-11 w-full items-center justify-center gap-2 rounded-xl bg-[#2f6bff] text-[14px] font-semibold text-white transition hover:bg-blue-600 disabled:opacity-70",children:tt?a.jsxs(a.Fragment,{children:[a.jsx($a,{className:"h-4 w-4 animate-spin"}),O?"Updating...":"Creating..."]}):"Save"})]})]})}):null,a.jsx(Mw,{hidden:o==="Messages",onOpenInbox:N=>{Ge((N==null?void 0:N.id)||null),Ve(St()),c("Messages")}})]})}function s4(){return a.jsxs("svg",{className:"circuit-svg",viewBox:"0 0 420 720",preserveAspectRatio:"xMidYMid slice","aria-hidden":!0,
640children:[a.jsx("defs",{children:a.jsxs("linearGradient",{id:"lineGlow",x1:"0",y1:"0",x2:"1",y2:"1",children:[a.jsx("stop",{offset:"0%",stopColor:"#60A5FA",stopOpacity:"0"}),a.jsx("stop",{offset:"45%",stopColor:"#3B82F6",stopOpacity:"0.55"}),a.jsx("stop",{offset:"100%",stopColor:"#93C5FD",stopOpacity:"0"})]})}),a.jsx("path",{d:"M40 80 H140 V180 H240",fill:"none",stroke:"url(#lineGlow)",strokeWidth:"1.2"}),a.jsx("path",{d:"M300 40 V140 H380 V250",fill:"none",stroke:"url(#lineGlow)",strokeWidth:"1.2"}),a.jsx("path",{d:"M20 420 H90 V500 H170 V580",fill:"none",stroke:"url(#lineGlow)",strokeWidth:"1"}),a.jsx("path",{d:"M250 360 H340 V440 H400",fill:"none",stroke:"url(#lineGlow)",strokeWidth:"1"}),a.jsx("circle",{cx:"140",cy:"80",r:"3",fill:"#60A5FA",opacity:"0.7"}),a.jsx("circle",{cx:"240",cy:"180",r:"3",fill:"#93C5FD",opacity:"0.55"}),a.jsx("circle",{cx:"300",cy:"140",r:"3",fill:"#3B82F6",opacity:"0.8"}),a.jsx("circle",{cx:"170",cy:"500",r:"2.5",fill:"#60A5FA",opacity:"0.6"}),a.jsx("circle",{cx:"340",cy:"440",r:"2.5",fill:"#93C5FD",opacity:"0.5"})]})}function n4(){return a.jsxs("div",{className:"powerbank-scene","aria-hidden":!0,children:[a.jsx("div",{className:"energy-ring"}),a.jsx("div",{className:"energy-ring"}),a.jsx("div",{className:"energy-ring"}),a.jsx("div",{className:"powerbank-device",children:a.jsxs("div",{className:"powerbank-face",children:[a.jsx(Xt,{className:"powerbank-bolt",fill:"white",strokeWidth:2.2}),a.jsxs("div",{className:"powerbank-leds",children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]})]})})]})}const i4=[{icon:Xt,title:"Instant Access",text:"Rent power banks in seconds"},{icon:Tt,title:"Widespread Locations",text:"Find stations near you"},{icon:Dt,title:"Secure & Reliable",text:"Your data and payments are safe"},{icon:zl,title:"24/7 Support",text:"We're here to help anytime"}];function wm({children:n}){return a.jsx("main",{className:"auth-shell",children:a.jsxs("section",{className:"auth-card",children:[a.jsxs("aside",{className:"brand-panel",children:[a.jsx(s4,{}),a.jsxs("div",{className:"data-layers","aria-hidden":!0,children:[a.jsx("span",{}),a.jsx("span",{}),a.jsx("span",{})]}),a.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[a.jsx("div",{className:"flex justify-center pt-2 sm:justify-start sm:pt-0",children:a.jsx(al,{className:"h-24 w-[300px] sm:h-24 sm:w-[280px]",imgClassName:"h-full w-full object-contain"})}),a.jsxs("h1",{className:"mt-7 text-[30px] font-extrabold leading-[1.12] tracking-tight",children:["Power on.",a.jsx("br",{}),"Stay ",a.jsx("span",{className:"text-electric-400",children:"connected."})]}),a.jsxs("p",{className:"mt-2.5 max-w-[260px] text-[13px] leading-relaxed text-blue-100/80",children:["Rent power banks anytime, anywhere.",a.jsx("br",{}),"Fast. Secure. Reliable."]}),a.jsx("ul",{className:"mt-6 hidden space-y-3.5 min-[641px]:block",children:i4.map(({icon:i,title:o,text:c})=>a.jsxs("li",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/5",children:a.jsx(i,{className:"h-[15px] w-[15px] text-blue-100",strokeWidth:1.9})}),a.jsxs("span",{children:[a.jsx("p",{className:"text-[13px] font-semibold leading-none",children:o}),a.jsx("p",{className:"mt-1 text-[11.5px] text-blue-100/70",children:c})]})]},o))}),a.jsx(n4,{})]})]}),a.jsx("div",{className:"auth-form-panel relative flex items-center justify-center px-6 py-8 sm:px-10 lg:px-12",children:a.jsx("div",{className:"w-full max-w-[380px]",children:n})})]})})}function r4(){const[n,i]=b.useState(""),[o,c]=b.useState(!1),[d,m]=b.useState(!1);async function p(y){y.preventDefault(),c(!0),await new Promise(x=>setTimeout(x,800)),c(!1),m(!0)}return a.jsxs(wm,{children:[a.jsxs("header",{children:[a.jsx("h2",{className:"text-[26px] font-bold tracking-tight text-navy-900",children:"Forgot password?"}),a.jsx("p",{className:"mt-1.5 text-[14px] text-slate-500",children:"Enter your email and we'll send you a reset link."})]}),a.jsxs("form",{className:"mt-6 space-y-4",onSubmit:p,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-2 block text-[13px] font-semibold text-slate-700",children:"Email Address"}),a.jsxs("span",{className:"relative block",children:[a.jsx($s,{className:"pointer-events-none absolute left-3.5 to
640p-1/2 h-[17px] w-[17px] -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"field-input",type:"email",autoComplete:"email",placeholder:"Enter your email",value:n,onChange:y=>i(y.target.value),required:!0})]})]}),d?a.jsx("p",{className:"rounded-xl bg-blue-50 px-3 py-2 text-[12.5px] text-electric-600",children:"If that email exists, a reset link will be sent once the API is connected."}):null,a.jsx("button",{className:"cta-btn",type:"submit",disabled:o,children:o?a.jsxs(a.Fragment,{children:[a.jsx($a,{className:"h-4 w-4 animate-spin"}),"Sending..."]}):"Send reset link"})]}),a.jsx("p",{className:"mt-6 text-center",children:a.jsxs(et,{to:"/signin",className:"inline-flex items-center gap-1.5 text-[13px] font-semibold text-electric-500 transition-colors hover:text-electric-600",children:[a.jsx(Dl,{className:"h-4 w-4"}),"Back to sign in"]})})]})}function o4(){return a.jsxs("div",{className:"relative mx-auto grid h-[220px] w-[220px] place-items-center",children:[a.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-full bg-[radial-gradient(circle,rgba(34,197,94,0.22),transparent_62%)]"}),a.jsx("span",{className:"pointer-events-none absolute inset-[10px] rounded-full border-[2.5px] border-dashed border-[#22c55e]/80 shadow-[0_0_28px_rgba(34,197,94,0.45)] [mask-image:conic-gradient(from_18deg,black_68%,transparent_72%,black_100%)]"}),a.jsx("span",{className:"pointer-events-none absolute inset-[28px] rounded-full border-[2.5px] border-dashed border-[#22c55e]/70 [mask-image:conic-gradient(from_200deg,black_62%,transparent_78%,black_100%)]"}),a.jsx("span",{className:"pointer-events-none absolute inset-[46px] rounded-full border-[2.5px] border-dashed border-[#22c55e]/55 [mask-image:conic-gradient(from_90deg,black_70%,transparent_82%,black_100%)]"}),a.jsxs("div",{className:"relative z-10 grid h-[92px] w-[92px] place-items-center",children:[a.jsx("svg",{viewBox:"0 0 88 96",className:"h-[92px] w-[92px] drop-shadow-[0_0_18px_rgba(34,197,94,0.85)]","aria-hidden":!0,children:a.jsx("path",{d:"M44 6 L76 18 V46 C76 66 62 84 44 90 C26 84 12 66 12 46 V18 Z",fill:"none",stroke:"#22c55e",strokeWidth:"4",strokeLinejoin:"round"})}),a.jsx(qa,{className:"absolute h-8 w-8 text-[#22c55e] drop-shadow-[0_0_12px_rgba(34,197,94,0.9)]",strokeWidth:2.4})]})]})}function c4({pin:n,onFocus:i}){return a.jsx("button",{type:"button",className:"mt-8 flex w-full justify-center gap-3",onClick:i,"aria-label":"Enter 4-digit PIN",children:[0,1,2,3].map(o=>{const c=o<n.length;return a.jsx("span",{className:"grid h-[62px] w-[62px] place-items-center rounded-[18px] border-2 border-[#22c55e] bg-[#0a1014] shadow-[0_0_16px_rgba(34,197,94,0.28),inset_0_0_12px_rgba(34,197,94,0.08)]",children:c?a.jsx("span",{className:"h-3.5 w-3.5 rounded-full bg-[#22c55e] shadow-[0_0_12px_rgba(34,197,94,0.95)]"}):null},o)})})}function up({onBack:n,onCreate:i,customerName:o="",saving:c=!1,error:d="",mode:m="create"}){const[p,y]=b.useState("create"),[x,f]=b.useState(""),[g,v]=b.useState(""),[w,D]=b.useState(""),C=b.useRef(null),T=m==="verify",S=!T&&p==="confirm",k=S?g:x;b.useEffect(()=>{var ce;(ce=C.current)==null||ce.focus()},[p]);function _(ce){const B=ce.replace(/\D/g,"").slice(0,4);if(S){v(B),D("");return}f(B)}function U(){if(S){v(""),D(""),y("create");return}n==null||n()}function A(){if(!(k.length!==4||c)){if(T){i==null||i(x);return}if(!S){v(""),D(""),y("confirm");return}if(g!==x){D("PINs do not match. Enter the same 4 digits."),v("");return}i==null||i(x)}}const G=T?"Enter Your PIN":S?"Confirm Your PIN":"Create Your PIN",E=T?"Enter your 4-digit PIN to use your paid membership.":S?"Enter the same 4 digits again to confirm your PIN.":"This PIN will be used to access your membership and account.",z=T?"Verify PIN":S?"Confirm PIN":"Create PIN",K=T?"Paid members only. Unpaid customers cannot unlock this.":S?"Re-enter your 4 digits to confirm":"Use 4 digits (e.g. 1 2 3 4)",ie=w||d;return a.jsxs("div",{className:"relative mx-auto min-h-screen max-w-md overflow-hidden bg-[#070b10] text-white",children:[a.jsx("div",{className:"pointer-events-none absolute inset-0",style:{backgroundImage:"repeating-linear-gradient(-32deg, transparent 0 56px, rgba(16,36,34,0.7) 56px 112px)"}}),a.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_28%,rgba(34,197,94,0.12),transparent_48%)]"}),a.jsxs("div",{className:"relative flex min-h-screen flex-col px-5 pb-8 pt-3",children:[a.jsxs("header",{className:"grid grid-cols-[40px_1fr_40px] items-center",children:[a.jsx("button",{type:"button",onClick:U,className:"grid h-10 w-10 place-items-center text-white","aria-label":"Back",children:a.jsx(Dl,{className:"h-6 w-6",strokeWidth:2.2})}),a.jsx(al,{variant:"header",className:"justify-center"}),a.jsx("span",{})]}),a.jsxs("main",{className:"flex flex-1 flex-col items-center pt-6",children:[a.jsx(o4,{}),a.jsx("h1",{className:"mt-1 text-center text-[32px] font-extrabold tracking-tight",children:G}),a.jsx("p",{className:"mt-2 max-w-[280px] text-center text-[14px] leading-relaxed text-slate-300",children:E}),o?a.jsx("p",{className:"mt-2 text-center text-[12px] font-medium text-[#22c55e]",children:o}):null,ie?a.jsx("p",{className:"mt-4 w-full rounded-2xl bg-rose-500/10 px-3 py-2 text-center text-[12px] text-rose-300",children:ie}):null,a.jsx(c4,{pin:k,onFocus:()=>{var ce;return(ce=C.current)==null?void 0:ce.focus()}}),a.jsx("input",{ref:C,value:k,onChange:ce=>_(ce.target.value),inputMode:"numeric",autoComplete:"one-time-code",maxLength:4,className:"sr-only","aria-label":S?"Confirm PIN":"PIN"}),a.jsxs("button",{type:"button",onClick:A,disabled:k.length!==4||c,className:"mt-10 flex h-14 w-full items-center justify-center gap-2.5 rounded-full bg-[#22c55e] text-[16px] font-bold text-black shadow-[0_12px_28px_rgba(34,197,94,0.4)] disabled:opacity-45",children:[c?a.jsx($a,{className:"h-5 w-5 animate-spin"}):a.jsx(qa,{className:"h-5 w-5",strokeWidth:2.4}),c?"Saving PIN...":z]}),a.jsx("p",{className:"mt-auto pt-8 text-center text-[13px] text-slate-200",children:K})]})]})]})}function Nd(n,i,o,c,d,m){const p=Math.min(m,c/2,d/2);n.beginPath(),n.moveTo(i+p,o),n.arcTo(i+c,o,i+c,o+d,p),n.arcTo(i+c,o+d,i,o+d,p),n.arcTo(i,o+d,i,o,p),n.arcTo(i,o,i+c,o,p),n.closePath()}function u4(n,i,o,c,d=!1){n.fillStyle="#94a3b8",n.font="600 22px Inter, system-ui, sans-serif",n.textAlign="left",n.fillText(o,48,i),n.fillStyle=d?"#16a34a":"#0f172a",n.font="700 24px Inter, system-ui, sans-serif",n.textAlign="right",n.fillText(String(c||"—"),672,i),n.textAlign="left"}
640function F1(n,i){if(!n||typeof document>"u")return;const o=document.createElement("canvas");o.width=720,o.height=980;const c=o.getContext("2d");if(!c)return;c.fillStyle="#f8fafc",c.fillRect(0,0,o.width,o.height),c.fillStyle="#16a34a",Nd(c,0,0,o.width,8,0),c.fill(),c.fillStyle="#ffffff",Nd(c,28,40,664,900,36),c.fill(),c.strokeStyle="#e2e8f0",c.lineWidth=2,Nd(c,28,40,664,900,36),c.stroke(),c.fillStyle="#16a34a",c.beginPath(),c.arc(360,130,42,0,Math.PI*2),c.fill(),c.strokeStyle="#ffffff",c.lineWidth=6,c.beginPath(),c.moveTo(342,132),c.lineTo(354,146),c.lineTo(380,116),c.stroke(),c.fillStyle="#0f172a",c.font="800 36px Inter, system-ui, sans-serif",c.textAlign="center",c.fillText("Payment Successful",360,210),c.fillStyle="#16a34a",c.font="700 22px Inter, system-ui, sans-serif",c.fillText("Hormuud Mobile Money",360,244),c.textAlign="left";const d=[["Power Bank",i||"—"],["Full Name",n.name||"—"],["Phone Number",n.phone],["Rental Duration",n.duration],["Amount",`$${Number(n.amount).toFixed(2)}`],["Date & Time",n.date],["Transaction ID",n.transactionId],["Status",n.status||"Successful"]];let m=320;d.forEach(([p,y],x)=>{x&&(c.strokeStyle="#eef2f7",c.lineWidth=2,c.beginPath(),c.moveTo(48,m-28),c.lineTo(672,m-28),c.stroke()),u4(c,m,p,y,p==="Amount"||p==="Status"),m+=64}),c.fillStyle="#16a34a",c.font="600 18px Inter, system-ui, sans-serif",c.textAlign="center",c.fillText("Secured by Hormuud · SomaCharge",360,900),o.toBlob(p=>{if(!p)return;const y=URL.createObjectURL(p),x=document.createElement("a");x.href=y,x.download=`${n.transactionId||"somacharge-receipt"}.png`,x.click(),URL.revokeObjectURL(y)},"image/png")}function Fi({icon:n,label:i,value:o,accent:c=!1}){return a.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-white/8 py-3 last:border-0",children:[a.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2.5 text-[13px] text-slate-400",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-full bg-[#163c28] text-[#22c55e]",children:a.jsx(n,{className:"h-3.5 w-3.5"})}),i]}),a.jsx("span",{className:`max-w-[55%] truncate text-right text-[13px] font-bold ${c?"text-[#22c55e]":"text-white"}`,children:o})]})}function d4({name:n,phone:i,duration:o,amount:c,amountValue:d,transactionId:m,dateLabel:p,bankId:y,onHome:x}){const f=Bl();function g(){if(x){x();return}f("/home")}function v(){F1({name:n||"",phone:i,duration:o,amount:d??Number(String(c||"").replace(/[^0-9.]/g,"")),date:p,transactionId:m,status:"Successful"},y)}return a.jsxs("div",{className:"mx-auto min-h-screen max-w-md bg-[#070b10] px-4 pb-10 pt-6 font-medium text-white",children:[a.jsxs("div",{className:"flex flex-col items-center text-center",children:[a.jsx("img",{src:"/hormuud-evc.png",alt:"Hormuud Telecom",className:"h-12 w-12 rounded-2xl object-cover"}),a.jsx("p",{className:"mt-3 text-[12px] font-extrabold tracking-[0.16em] text-white",children:"HORMUUD TELCOM"}),a.jsx("p",{className:"mt-0.5 text-[11px] font-semibold tracking-[0.16em] text-[#22c55e]",children:"MOBILE MONEY"}),a.jsxs("div",{className:"relative mt-6 grid h-[92px] w-[92px] place-items-center",children:[a.jsx("span",{className:"absolute inset-0 rounded-full bg-[#22c55e]/20 blur-md"}),a.jsx("span",{className:"relative grid h-[72px] w-[72px] place-items-center rounded-full bg-[#22c55e] text-white shadow-[0_0_0_10px_rgba(34,197,94,0.16)]",children:a.jsx(Ut,{className:"h-10 w-10",strokeWidth:2.4})})]}),a.jsxs("h1",{className:"mt-4 text-[26px] font-bold tracking-tight",children:["Payment ",a.jsx("span",{className:"text-[#22c55e]",children:"Successful!"})]}),a.jsx("p",{className:"mt-2 text-[13px] text-slate-400",children:"Your payment has been processed successfully."})]}),a.jsxs("section",{className:"mt-6 rounded-[24px] border border-white/10 bg-[#10151c] px-4 py-4",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[15px] font-bold",children:"Payment Receipt"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-slate-400",children:"Transaction details."})]}),a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-[#22c55e] px-2.5 py-1 text-[11px] font-bold text-[#06210f]",children:[a.jsx(Ut,{className:"h-3.5 w-3.5"}),"Completed"]})]}),a.jsxs("div",{className:"mt-2",children:[a.jsx(Fi,{icon:Pa,label:"Phone Number",value:i}),a.jsx(Fi,{icon:xa,label:"Rental Duration",value:o}),a.jsx(Fi,{icon:tr,label:"Amount",value:c,accent:!0}),a.jsx(Fi,{icon:Fp,label:"Transaction ID",value:m||"—"}),a.jsx(Fi,{icon:Ll,label:"Date & Time",value:p||"—"})]})]}),a.jsxs("div",{className:"mt-4 flex items-start gap-3 rounded-[18px] border border-[#22c55e]/25 bg-[#0f1a14] px-3.5 py-3.5",children:[a.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-full bg-[#22c55e] text-[#06210f]",children:a.jsx(Dt,{className:"h-5 w-5"})}),a.jsxs("p",{className:"min-w-0 flex-1 text-[12px] leading-relaxed text-slate-300",children:[a.jsx("span",{className:"font-bold text-[#22c55e]",children:"Your payment is secure. "}
640),"Protected by Hormuud Telecom's end-to-end encryption."]}),a.jsx(qa,{className:"mt-1 h-4 w-4 shrink-0 text-[#22c55e]/70"})]}),a.jsxs("button",{type:"button",onClick:v,className:"mt-6 flex h-14 w-full items-center justify-between rounded-full bg-[#22c55e] px-5 text-[15px] font-bold text-[#06210f] shadow-[0_10px_28px_rgba(34,197,94,0.35)]",children:[a.jsx(Dn,{className:"h-5 w-5"}),"Download",a.jsx(om,{className:"h-5 w-5"})]}),a.jsxs("button",{type:"button",onClick:g,className:"mt-3 flex h-14 w-full items-center justify-center gap-2 rounded-full border border-white/20 bg-transparent text-[15px] font-bold text-white",children:[a.jsx($p,{className:"h-5 w-5"}),"Back to Home"]})]})}function No({icon:n,label:i,value:o}){return a.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-white/8 py-3 last:border-0",children:[a.jsxs("span",{className:"inline-flex items-center gap-2.5 text-[13px] text-slate-400",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-full bg-[#16a34a]/15 text-[#4ade80]",children:a.jsx(n,{className:"h-4 w-4"})}),i]}),a.jsx("span",{className:"max-w-[52%] truncate text-right text-[13px] font-bold text-white",children:o})]})}function m4({bankId:n,duration:i,amount:o,returnBefore:c,onDone:d}){return a.jsxs("div",{className:"fixed inset-0 z-[70] overflow-y-auto bg-[#0b0f14] [font-family:Inter,system-ui,sans-serif]",children:[a.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_28%,rgba(34,197,94,0.22),transparent_52%)]"}),a.jsxs("div",{className:"relative mx-auto flex min-h-full max-w-md flex-col px-5 pb-8 pt-10",children:[a.jsxs("div",{className:"flex flex-col items-center text-center",children:[a.jsx("span",{className:"grid h-16 w-16 place-items-center rounded-full bg-[#22c55e] text-white shadow-[0_0_0_10px_rgba(34,197,94,0.18),0_12px_40px_rgba(34,197,94,0.45)]",children:a.jsx(Ut,{className:"h-8 w-8",strokeWidth:2.6})}),a.jsxs("h1",{className:"mt-5 text-[28px] font-extrabold tracking-tight text-white",children:["Enjoy Your ",a.jsx("span",{className:"text-[#22c55e]",children:"Power!"})]}),a.jsxs("p",{className:"mt-2 max-w-[280px] text-[13px] leading-relaxed text-slate-400",children:["Your power bank is ready to use. Thank y
640ou for using"," ",a.jsx("span",{className:"font-semibold text-[#22c55e]",children:"SomaCharge."})]})]}),a.jsxs("div",{className:"relative mx-auto mt-6 grid h-[240px] w-full place-items-center",children:[a.jsx("span",{className:"pointer-events-none absolute inset-8 rounded-full bg-[radial-gradient(circle,rgba(34,197,94,0.28),transparent_70%)]"}),a.jsx("img",{src:_a,alt:"SomaCharge power bank",className:"relative z-10 h-[220px] w-auto max-w-[260px] object-contain drop-shadow-[0_18px_40px_rgba(34,197,94,0.35)]"})]}),a.jsxs("div",{className:"mt-2 rounded-[22px] border border-white/10 bg-white/[0.05] px-4 py-1 backdrop-blur-md",children:[a.jsx(No,{icon:Xt,label:"Power Bank ID",value:n||"—"}),a.jsx(No,{icon:xa,label:"Rental Duration",value:i||"—"}),a.jsx(No,{icon:zp,label:"Amount Paid",value:o}),a.jsx(No,{icon:Up,label:"Return Before",value:c||"—"})]}),a.jsx("button",{type:"button",onClick:d,className:"mt-8 flex h-14 w-full items-center justify-center rounded-full bg-[#22c55e] text-[16px] font-bold text-white shadow-[0_14px_28px_rgba(34,197,94,0.35)]",children:"Done"})]})]})}const x4=[{to:"/home",label:"Home",icon:$p,match:"home"},{to:"/membership",label:"Membership",icon:xs},{to:"/profile",label:"Profile",icon:ka}];function Rl({hidden:n=!1}){const{pathname:i}=ha();return n?null:a.jsx("nav",{className:"fixed inset-x-0 bottom-0 z-40 border-t border-white/10 bg-[#101612] pb-[max(0.4rem,env(safe-area-inset-bottom))] pt-1.5","aria-label":"Bottom",children:a.jsx("div",{className:"mx-auto grid max-w-md grid-cols-3 px-3",children:x4.map(o=>{const c=o.icon;return a.jsx(Ro,{to:o.to,className:"flex flex-col items-center gap-0.5 py-1 text-[11px] font-medium",children:({isActive:d})=>{const m=d||o.match==="home"&&(i==="/home"||i.startsWith("/powerbank"));return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:`grid h-9 w-[52px] place-items-center rounded-2xl transition ${m?"bg-[#163c28] text-[#22c55e] shadow-[0_0_16px_rgba(34,197,94,0.28)]":"text-slate-400"}`,children:a.jsx(c,{className:"h-[18px] w-[18px]",strokeWidth:m?2.4:2})}),a.jsx("span",{className:m?"text-[#22c55e]":"text-slate-400",children:o.label}),a.jsx("span",{className:`mt-0.5 h-[3px] w-7 rounded-full bg-[#22c55e] shadow-[0_0_10px_rgba(34,197,94,0.8)] ${m?"opacity-100":"opacity-0"}`})]})}},o.label)})})})}const Nm="somacharge_member_v1",Sm="somacharge_member_unlocked";function $1({phone:n,name:i,expiresAt:o,weeks:c=1}){if(typeof window>"u")return;const d={phone:String(n||""),name:String(i||""),expiresAt:o?new Date(o).toISOString():null,weeks:c};localStorage.setItem(Nm,JSON.stringify(d))}function Ki(){if(typeof window>"u")return null;try{const n=localStorage.getItem(Nm);if(!n)return null;const i=JSON.parse(n);return!(i!=null&&i.phone)||!i.expiresAt?null:new Date(i.expiresAt).getTime()<=Date.now()?(h4(),null):i}catch{return null}}function q1(){return!!Ki()}function f4(){return typeof window>"u"?!1:sessionStorage.getItem(Sm)==="1"&&q1()}function P1(n){typeof window>"u"||sessionStorage.setItem(Sm,"1")}function h4(){typeof window>"u"||(localStorage.removeItem(Nm),sessionStorage.removeItem(Sm))}function p4(n){const i=new Date(n).getTime()-Date.now();if(i<=0)return"Waqtiga dhamaaday";const o=1440*60*1e3,c=Math.max(1,Math.ceil(i/o));return c===1?"1 day left":`${c} days left`}const dp=["brightness-95","brightness-110 contrast-110","brightness-105 saturate-125"];function b4(n){const i=String((n==null?void 0:n.title)||"").toLowerCase().replace(/\s+/g," ").trim(),o=String((n==null?void 0:n.id)||"").toLowerCase();return i==="week plus"||i==="1 week plus"||/week(?:ly)?\s*plus/.test(i)||o==="weekly-plus"}function Yi(n){return`$${Number(n).toFixed(2)}`}function En({icon:n,label:i,value:o,strong:c=!1}){return a.jsxs("div",{className:"flex items-center justify-between gap-3 py-3",children:[a.jsxs("span",{className:"inline-flex items-center gap-2.5 text-[13px] font-medium text-white",children:[a.jsx("span",{className:"grid h-7 w-7 place-items-center rounded-full bg-[#163c28] text-[#22c55e] shadow-[0_0_12px_rgba(34,197,94,0.35)]",children:a.jsx(n,{className:"h-3.5 w-3.5"})}),i]}),a.jsx("span",{className:`text-right text-[13px] font-bold text-[#22c55e] ${c?"text-[18px]":""}`,children:o})]})}function g4({plan:n,phone:i,fullName:o,pendingPin:c="",onBack:d,onPaid:m}){const p=Bl(),[y,x]=b.useState(!1),[f,g]=b.useState(null),[v,w]=b.useState(!1),[D,C]=b.useState(""),T=`+252 ${i}`,S=Math.max(1,Number(n.weeks)||1),k=S===1?"1 Week":`${S} Weeks`;async function _(){var U,A,G,E,z;if(!(y||f)){x(!0),C("");try{const K=sessionStorage.getItem("somacharge_last_bank")||"",ie=await _e("/api/merchant/membership",{method:"POST",body:{phone:T,planId:n.id,powerBank:K,customer:o,amount:n.price,pin:c||void 0}}),ce=(U=ie==null?void 0:ie.data)==null?void 0:U.payment,B=(A=ie==null?void 0:ie.data)==null?void 0:A.order,W=(G=ie==null?void 0:ie.data)==null?void 0:G.bank;if(!(ce!=null&&ce.transactionId)&&!(ce!=null&&ce.reference)&&!(ce!=null&&ce.id))throw new Error("Payment was not confirmed by Hormuud.");const re=ce.amount??n.price,V=(W==null?void 0:W.id)||ce.powerBank||(B==null?void 0:B.bank)||K,oe=B==null?void 0:B.dueAt,O=oe?new Date(oe).toLocaleStr
640ing("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):ce.date;Oo({id:ce.id||ce.paymentId||ce.transactionId,user:o||ce.user||ce.fullName||"Member",phone:ce.phone||T,amount:re,powerBank:V||n.title}),$1({phone:T,name:o,expiresAt:((z=(E=ie==null?void 0:ie.data)==null?void 0:E.membership)==null?void 0:z.expiresAt)||(B==null?void 0:B.dueAt)||Date.now()+S*7*24*60*60*1e3,weeks:S}),P1(!0),m==null||m(),g({name:o||ce.fullName||ce.user||"",phone:ce.phone||T,duration:(B==null?void 0:B.durationLabel)||k,amount:Yi(re),amountValue:Number(re),transactionId:ce.transactionId||ce.reference,dateLabel:ce.date,bankId:V,returnBefore:O})}catch(K){const ie=(K==null?void 0:K.message)||"Payment failed. Please try again.";C(ie),bm({user:o||"Member",phone:T,amount:n.price,powerBank:n.title})}finally{x(!1)}}}return v&&f?a.jsx(m4,{bankId:f.bankId,duration:f.duration,amount:f.amount,returnBefore:f.returnBefore,onDone:()=>p("/home")}):f?a.jsx(d4,{name:f.name,phone:f.phone,duration:f.duration,amount:f.amount,amountValue:f.amountValue,transactionId:f.transactionId,dateLabel:f.dateLabel,bankId:f.bankId,onHome:()=>w(!0)}):a.jsxs("div",{className:"mx-auto min-h-screen max-w-md bg-[#050607] pb-28 font-medium text-white",children:[a.jsxs("header",{className:"sticky top-0 z-20 px-4 pb-2 pt-3",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("button",{type:"button",onClick:d,disabled:y,className:"grid h-10 w-10 place-items-center rounded-full border border-white/10 bg-[#121416] text-white disabled:opacity-40","aria-label":"Back",children:a.jsx(Dl,{className:"h-5 w-5"})}),a.jsxs("h1",{className:"flex-1 pr-10 text-center text-[18px] font-bold tracking-tight",children:["Confirm ",a.jsx("span",{className:"text-[#22c55e]",children:"Payment"})]})]}),a.jsx("p",{className:"mt-2 text-center text-[12px] text-slate-400",children:"Review your plan details and complete your payment."})]}),a.jsxs("main",{className:"space-y-4 px-4 pt-3",children:[a.jsx("section",{className:"rounded-[28px] border border-[#22c55e]/50 bg-[#0c100e] p-4 shadow-[0_0_28px_rgba(34,197,94,0.14)]",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsxs("div",{className:"relative grid h-[108px] w-[92px] shrink-0 place-items-center",children:[a.jsx("div",{className:"absolute inset-x-2 bottom-2 h-10 rounded-full bg-[#22c55e]/30 blur-xl"}),a.jsx("div",{className:"absolute bottom-1 h-3 w-14 rounded-full bg-[#22c55e]/70 blur-[2px]"}),a.jsx("img",{src:_a,alt:"SomaCharge power bank",className:"relative z-10 h-[96px] w-auto drop-shadow-[0_8px_18px_rgba(34,197,94,0.4)]"})]}),a.jsxs("div",{className:"min-w-0 flex-1 pt-1",children:[a.jsx(xs,{className:"h-4 w-4 text-[#22c55e]"}),a.jsxs("h2",{className:"mt-1 text-[20px] font-bold leading-tight",children:[n.title.replace(n.accent,"").trim()," ",a.jsx("span",{className:"text-[#22c55e]",children:n.accent})]}),a.jsx("p",{className:"mt-2 text-[13px] font-bold text-white",children:"Your membership is almost ready."}),a.jsx("p",{className:"mt-2 text-[12px] leading-relaxed text-slate-400",children:"You're one step away from activating your plan. Make the payment to get started."})]})]})}),D?a.jsx("p",{className:"rounded-2xl bg-rose-500/10 px-3 py-2 text-center text-[12px] text-rose-300",children:D}):null,a.jsxs("section",{className:"rounded-[28px] border border-[#22c55e]/45 bg-[#0c100e] px-4 py-3 shadow-[0_0_28px_rgba(34,197,94,0.08)]",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2 pb-1",children:[a.jsxs("p",{className:"inline-flex items-center gap-2 text-[14px] font-bold",children:[a.jsx("span",{className:"grid h-7 w-7 place-items-center rounded-full bg-[#163c28] text-[#22c55e]",children:a.jsx(Rv,{className:"h-3.5 w-3.5"})}),"Plan Summary"]}),a.jsxs("p",{className:"inline-flex items-center gap-1 text-[11px] font-medium text-[#22c55e]",children:[a.jsx(Dt,{className:"h-3.5 w-3.5"}),"Secure Payment"]})]}),a.jsxs("div",{className:"divide-y divide-white/8",children:[a.jsx(En,{icon:xs,label:"Plan",value:n.title}),o?a.jsx(En,{icon:ka,label:"Name",value:o}):null,a.jsx(En,{icon:Ll,label:"Muddo",value:k}),a.jsx(En,{icon:Pa,label:"Phone",value:T}),a.jsx(En,{icon:Dt,label:"Xaqiijin",value:"PIN ****"}),a.jsx(En,{icon:Do,label:"Total",value:Yi(n.price),strong:!0})]})]}),a.jsxs("button",{type:"button",onClick:_,disabled:y,className:"flex h-14 w-full items-center justify-between rounded-full bg-[#22c55e] px-5 text-[15px] font-bold text-white shadow-[0_10px_28px_rgba(34,197,94,0.4)] disabled:opacity-70",children:[a.jsx(Do,{
640className:"h-5 w-5"}),a.jsx("span",{children:"Confirm Payment"}),a.jsx(rm,{className:"h-5 w-5"})]}),a.jsxs("p",{className:"flex items-center justify-center gap-1.5 text-[12px] text-slate-400",children:[a.jsx(Dt,{className:"h-3.5 w-3.5 text-[#22c55e]"}),"Your payment is safe and secure"]})]}),y?a.jsx(jm,{phone:T,duration:k,amount:Yi(n.price)}):null,a.jsx(Rl,{hidden:y})]})}function y4({plan:n,onBack:i,pendingPin:o="",onPaid:c}){const[d,m]=b.useState(""),[p,y]=b.useState(""),[x,f]=b.useState(!1),[g,v]=b.useState(""),w=n.title.replace(n.accent||"","").trim(),D=Math.max(1,Number(n.weeks)||1),C=D===1?"1 week":`${D} weeks`,T=d.replace(/\s+/g," ").trim();function S(k){if(k.preventDefault(),T.length<2){v("Please enter your full name.");return}if(p.replace(/\D/g,"").length<9){v("Please enter a valid Hormuud number.");return}v(""),f(!0)}return x?a.jsx(g4,{plan:n,phone:p,fullName:T,pendingPin:o,onBack:()=>f(!1),onPaid:c}):a.jsxs("div",{className:"mx-auto min-h-screen max-w-md bg-[#050607] pb-28 font-medium text-white",children:[a.jsxs("header",{className:"sticky top-0 z-20 flex items-center px-4 py-3",children:[a.jsx("button",{type:"button",onClick:i,className:"grid h-10 w-10 place-items-center rounded-full border border-white/10 bg-[#121416] text-white","aria-label":"Back",children:a.jsx(Dl,{className:"h-5 w-5"})}),a.jsxs("h1",{className:"flex-1 pr-10 text-center text-[18px] font-bold tracking-tight",children:["Get ",a.jsx("span",{className:"text-[#22c55e]",children:"Your Plan"})]})]}),a.jsxs("main",{className:"space-y-4 px-4 pt-2",children:[a.jsx("section",{className:"rounded-[28px] border border-[#22c55e]/45 bg-[#0c100e] p-4 shadow-[0_0_28px_rgba(34,197,94,0.12)]",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsxs("div",{className:"relative grid h-[108px] w-[92px] shrink-0 place-items-center",children:[a.jsx("div",{className:"absolute inset-x-2 bottom-2 h-10 rounded-full bg-[#22c55e]/30 blur-xl"}),a.jsx("div",{className:"absolute bottom-1 h-3 w-14 rounded-full bg-[#22c55e]/70 blur-[2px]"}),a.jsx("img",{src:_a,alt:"SomaCharge power bank",className:"relative z-10 h-[96px] w-auto drop-shadow-[0_8px_18px_rgba(34,197,94,0.4)]"})]}),a.jsxs("div",{className:"min-w-0 flex-1 pt-1",children:[a.jsx(xs,{className:"h-4 w-4 text-[#22c55e]"}),a.jsxs("h2",{className:"mt-1 text-[20px] font-bold leading-tight",children:[w," ",a.jsx("span",{className:"text-[#22c55e]",children:n.accent})]}),a.jsx("p",{className:"mt-2 text-[12px] leading-relaxed text-slate-300",children:n.blurb}),a.jsxs("div",{className:"mt-3 flex items-end justify-between gap-3",children:[a.jsxs("div",{className:"text-left",children:[a.jsx("p",{className:"text-[12px] font-medium text-white",children:"Total Price"}),a.jsx("p",{className:"text-[28px] font-bold leading-none text-[#22c55e]",children:Yi(n.price)})]}),a.jsx("p",{className:"pb-1 text-[14px] font-bold text-[#22c55e]",children:C})]})]})]})}),a.jsxs("form",{onSubmit:S,className:"space-y-4",children:[a.jsxs("section",{className:"rounded-[28px] border border-[#22c55e]/45 bg-[#0c100e] p-4 shadow-[0_0_28px_rgba(34,197,94,0.08)]",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-full bg-[#163c28] text-[#22c55e] shadow-[0_0_16px_rgba(34,197,94,0.35)]",children:a.jsx(ka,{className:"h-4 w-4"})}),a.jsx("h3",{className:"text-[16px] font-bold",children:"Enter Full Name"})]}),a.jsxs("div",{className:"mt-4 flex h-12 items-center gap-2 rounded-2xl border border-[#22c55e] bg-[#07090b] px-3",children:[a.jsx(ka,{className:"h-4 w-4 shrink-0 text-[#22c55e]"}),a.jsx("input",{className:"h-full min-w-0 flex-1 bg-transparent text-[15px] text-white outline-none placeholder:text-slate-500",autoComplete:"name",placeholder:"Full Name",value:d,onChange:k=>{m(k.target.value),v("")}})]})]}),a.jsxs("section",{className:"rounded-[28px] border border-[#22c55e]/45 bg-[#0c100e] p-4 shadow-[0_0_28px_rgba(34,197,94,0.08)]",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-full bg-[#163c28] text-[#22c55e] shadow-[0_0_16px_rgba(34,197,94,0.35)]",children:a.jsx(Pa,{className:"h-4 w-4"})}),a.jsx("h3",{className:"text-[16px] font-bold",children:"Enter Phone Number"})]}),a.jsxs("div",{className:"mt-4 flex h-12 items-center gap-2 rounded-2xl border border-[#22c55e] bg-[#07090b] px-3",children:[a.jsx("span",{className:"text-[18px]","aria-hidden":!0,
640children:"🇸🇴"}),a.jsx(qi,{className:"h-3.5 w-3.5 text-slate-400"}),a.jsx("span",{className:"text-[14px] font-bold",children:"+252"}),a.jsx("span",{className:"h-6 w-px bg-white/20"}),a.jsx("input",{className:"h-full min-w-0 flex-1 bg-transparent text-[15px] text-white outline-none placeholder:text-slate-500",inputMode:"numeric",autoComplete:"tel-national",placeholder:"XXXXXXXXX",value:p,onChange:k=>{y(k.target.value.replace(/\D/g,"").slice(0,9)),v("")}})]}),a.jsxs("p",{className:"mt-3 flex items-center gap-2 text-[12px] text-slate-400",children:[a.jsx(Dt,{className:"h-3.5 w-3.5 text-[#22c55e]"}),"Your PIN is confirmed. Continue to payment."]}),g?a.jsx("p",{className:"mt-2 text-[12px] text-rose-400",children:g}):null,a.jsxs("button",{type:"submit",className:"mt-5 flex h-12 w-full items-center justify-center gap-2 rounded-full bg-[#22c55e] text-[15px] font-bold text-white shadow-[0_8px_24px_rgba(34,197,94,0.35)]",children:["Continue",a.jsx(rm,{className:"h-4 w-4"})]})]})]})]}),a.jsx(Rl,{})]})}function v4(){const n=Bl(),i=b.useRef(null),[o,c]=b.useState(null),[d,m]=b.useState(""),[p,y]=b.useState(Ho),[x,f]=b.useState(()=>Ki()),[g,v]=b.useState(()=>f4()),[w,D]=b.useState(""),[C,T]=b.useState(!1);b.useEffect(()=>{let _=!0;return vm().then(U=>{_&&y(U)}),()=>{_=!1}},[]);async function S(_){if(!C){T(!0),D("");try{await _e("/api/customers/pin/verify",{method:"POST",body:{phone:x.phone,pin:_}}),P1(!0),v(!0)}catch(U){D((U==null?void 0:U.message)||"Incorrect PIN")}finally{T(!1)}}}function k(){var _;(_=i.current)==null||_.scrollIntoView({behavior:"smooth",block:"start"})}return x&&!g&&!o?a.jsx(up,{mode:"verify",customerName:x.name,saving:C,error:w,onBack:()=>n("/home"),onCreate:S}):x&&g&&!o?a.jsxs("div",{className:"mx-auto min-h-screen max-w-md bg-[#07090b] pb-28 font-medium text-white",children:[a.jsxs("header",{className:"sticky top-0 z-20 flex items-center justify-between border-b border-white/8 bg-[#07090b]/95 px-4 py-3 backdrop-blur",children:[a.jsx("button",{type:"button",onClick:()=>n("/home"),className:"grid h-9 w-9 place-items-center rounded-full border border-white/10 bg-white/5 text-slate-200","aria-label":"Back",children:a.jsx(Dl,{className:"h-5 w-5"})}),a.jsx(al,{className:"h-10 w-[132px] sm:h-12 sm:w-[180px]",imgClassName:"h-full w-full object-contain brightness-110"}),a.jsx("div",{className:"w-9"})]}),a.jsx("main",{className:"space-y-4 px-4 pt-6",children:a.jsxs("section",{className:"rounded-[28px] border border-[#22c55e]/45 bg-[#0c100e] p-5 text-center shadow-[0_0_28px_rgba(34,197,94,0.12)]",children:[a.jsx(Dt,{className:"mx-auto h-8 w-8 text-[#22c55e]"}),a.jsx("h1",{className:"mt-3 text-[22px] font-bold",children:"Membership Active"}),a.jsx("p",{className:"mt-2 text-[14px] text-slate-400",children:"PIN verified. You can use Marches with PIN only — no extra payment this week."}),a.jsx("p",{className:"mt-4 text-[28px] font-bold text-[#22c55e]",children:p4(x.expiresAt)}),a.jsx("p",{className:"mt-1 text-[12px] text-slate-500",children:"7-day rental. When time ends, access is locked."})]})}),a.jsx(Rl,{})]}):o&&b4(o)&&!d?a.jsx(up,{onBack:()=>c(null),onCreate:_=>m(_)}):o?a.jsx(y4,{plan:o,pendingPin:d,onPaid:()=>{f(Ki()),v(!0)},onBack:()=>{if(d){m("");return}c(null)}}):a.jsxs("div",{className:"mx-auto min-h-screen max-w-md bg-[#07090b] pb-28 font-medium text-white",children:[a.jsxs("header",{className:"sticky top-0 z-20 flex items-center justify-between border-b border-white/8 bg-[#07090b]/95 px-4 py-3 backdrop-blur",children:[a.jsx("button",{type:"button",onClick:()=>n(-1),className:"grid h-9 w-9 place-items-center rounded-full border border-white/10 bg-white/5 text-slate-200","aria-label":"Back",children:a.jsx(Dl,{className:"h-5 w-5"})}),a.jsx(al,{className:"h-10 w-[132px] sm:h-12 sm:w-[180px]",imgClassName:"h-full w-full object-contain brightness-110"}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(ds,{compact:!0}),a.jsx("button",{type:"button",className:"grid h-9 w-9 place-items-center rounded-full border border-white/10 bg-white/5 text-slate-200","aria-label":"Support",children:a.jsx(zl,{className:"h-3.5 w-3.5"})})]})]}),a.jsxs("main",{className:"space-y-5 px-4 pb-8 pt-4",children:[a.jsxs("section",{className:"relative overflow-hidden rounded-[28px] border border-[#22c55e]/35 bg-[#101612] p-4 shadow-[0_12px_40px_rgba(34,197,94,0.12)]",children:[a.jsx("div",{className:"pointer-events-none absolute -bottom-10 right-6 h-32 w-32 rounded-full bg-[#22c55e]/20 blur-3xl"}),a.jsxs("div",{className:"relative z-10 grid grid-cols-[1.15fr_0.85fr] items-center gap-2",children:[a.jsxs("div",{children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-full bg-[#163c28] text-[#4ade80]",children:a.jsx(xs,{className:"h-4 w-4"})}),a.jsxs("h1",{className:"mt-3 text-[22px] font-bold leading-tight tracking-tight",children:["Choose Your ",a.jsx("span",{className:"text-[#22c55e]",children:"Membership"})]}),a.jsx("p",{className:"mt-2 text-[12px] leading-relaxed text-slate-400",children:"Get more power, save more, and enjoy flexible rentals."}),a.jsxs("button",{type:"button",onClick:k,className:"mt-4 inline-flex h-10 items-center gap-1.5 rounded-full bg-[#22c55e] px-4 text-[13px] font-bold text-white shadow-[0_8px_20px_rgba(34,197,94,0.35)]",children:["Become a Member",a.jsx(rm,{className:"h-4 w-4"})]})]}),a.jsxs("div",{className:"relative flex flex-col items-center",children:[a.jsx("div",{className:"absolute inset-x-4 top-6 h-24 rounded-full bg-[#22c55e]/25 blur-2xl"}),a.jsx("img",{src:_a,alt:"SomaCharge power bank",className:"relative z-10 h-[148px] w-auto drop-shadow-[0_12px_24px_rgba(34,197,94,0.35)]"}),a.jsx("p",{className:"relative z-10 mt-1 rotate-[-8deg] text-[11px] font-medium italic text-[#4ade80]",children:"Stay Charged Always"})]})]})]}),a.jsxs("section",{ref:i,id:"membership-plans",className:"space-y-3 scroll-mt-20",children:[a.jsxs("h2",{className:"flex items-center gap-2 text-[16px] font-bold",children:[a.jsx(Xt,{className:"h-4 w-4 text-[#22c55e]",fill:"currentColor"}),"Membership Plans"]}
640),p.map((_,U)=>{const A=/unlimited/i.test(_.feature)?Uv:sa,G=dp[U%dp.length];return a.jsxs("article",{className:`relative overflow-hidden rounded-[24px] border bg-[#121816] p-3 ${_.recommended?"border-[#22c55e] shadow-[0_0_28px_rgba(34,197,94,0.22)]":"border-white/10"}`,children:[_.recommended?a.jsxs("span",{className:"absolute right-3 top-3 inline-flex items-center gap-1 rounded-full bg-[#22c55e] px-2 py-0.5 text-[10px] font-bold text-[#06210f]",children:[a.jsx(V5,{className:"h-3 w-3",fill:"currentColor"}),"Recommended"]}):null,a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"grid h-[84px] w-[72px] shrink-0 place-items-center rounded-2xl bg-[#0b0f0d]",children:a.jsx("img",{src:_a,alt:"",className:`h-[72px] w-auto ${G}`})}),a.jsxs("div",{className:"min-w-0 flex-1 pr-1",children:[a.jsx("h3",{className:"text-[14px] font-bold",children:_.title}),a.jsxs("p",{className:"mt-1 inline-flex items-center gap-1.5 text-[11px] text-slate-400",children:[a.jsx(Ll,{className:"h-3.5 w-3.5 text-[#22c55e]"}),_.duration]}),a.jsx("p",{className:"mt-1 text-[22px] font-bold text-[#22c55e]",children:Yi(_.price)}),a.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 text-[11px] text-slate-400",children:[a.jsx(A,{className:"h-3.5 w-3.5 text-[#22c55e]"}),_.feature]})]}),a.jsx("button",{type:"button",onClick:()=>c(_),className:`shrink-0 rounded-full px-3 py-2 text-[11px] font-bold ${_.recommended?"bg-[#22c55e] text-[#06210f] shadow-[0_8px_18px_rgba(34,197,94,0.35)]":"border border-[#22c55e] text-[#22c55e]"}`,children:"Get Plan →"})]})]},_.id)})]})]}),a.jsx(Rl,{})]})}function j4(){const n=Fs(),i=(n==null?void 0:n.name)||"SomaCharge Guest",o=(n==null?void 0:n.email)||"No account signed in",c=i.trim().charAt(0).toUpperCase()||"S";return a.jsxs("div",{className:"mx-auto min-h-screen max-w-md bg-[#0b0f14] pb-24 text-white",children:[a.jsxs("header",{className:"px-5 pb-4 pt-8",children:[a.jsx("h1",{className:"text-[26px] font-extrabold tracking-tight",children:"Profile"}),a.jsx("p",{className:"mt-1 text-[13px] text-slate-400",children:"Your SomaCharge account"})]}),a.jsxs("main",{className:"space-y-3 px-4",children:[a.jsxs("section",{className:"flex items-center gap-3 rounded-[22px] border border-white/10 bg-[#151a21] p-4",children:[n!=null&&n.avatar?a.jsx("img",{src:n.avatar,alt:"",className:"h-14 w-14 rounded-full object-cover"}):a.jsx("span",{className:"grid h-14 w-14 place-items-center rounded-full bg-[#163c28] text-[18px] font-bold text-[#4ade80]",children:c}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"truncate text-[16px] font-bold",children:i}),a.jsx("p",{className:"mt-0.5 truncate text-[12px] text-slate-400",children:o})]})]}),a.jsxs("section",{className:"overflow-hidden rounded-[22px] border border-white/10 bg-[#151a21]",children:[a.jsxs(et,{to:"/contact",className:"flex items-center justify-between px-4 py-3.5 text-[13px] font-semibold",children:[a.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[a.jsx(zl,{className:"h-4 w-4 text-[#22c55e]"}),"Support"]}),a.jsx(om,{className:"h-4 w-4 text-slate-500"})]}),a.jsx("div",{className:"mx-4 border-t border-white/8"}),a.jsxs("div",{className:"flex items-center justify-between px-4 py-3.5 text-[13px] font-semibold",children:[a.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[a.jsx(Dt,{className:"h-4 w-4 text-[#22c55e]"}),"Secure rentals"]}),a.jsx("span",{className:"text-[11px] font-medium text-slate-500",children:"Hormuud"})]})]}),n?null:a.jsxs(et,{to:"/signin",className:"flex h-11 items-center justify-center gap-2 rounded-2xl bg-[#00A651] text-[13px] font-bold text-white",children:[a.jsx(ka,{className:"h-4 w-4"}),"Sign in"]})]}),a.jsx(Rl,{})]})}const Ji="somacharge_face_descriptor_v1",ma=16;function km(n){const i=String(n||"").replace(/\D/g,"").slice(-9);return i.length>=9?i:""}function w4(n){try{const i=n?JSON.parse(n):null;return Array.isArray(i)&&i.length===ma*ma?i:null}catch{return null}}function N4(n=""){const i=km(n);return i?w4(localStorage.getItem(`${Ji}_${i}`)):null}function S4(n,i=""){if(!Array.isArray(n)||n.length!==ma*ma)return;const o=JSON.stringify(n);localStorage.setItem(Ji,o);const c=km(i);c&&localStorage.setItem(`${Ji}_${c}`,o)}function mp(n=""){localStorage.removeItem(Ji);const i=km(n);i&&localStorage.removeItem(`${Ji}_${i}`)}
640function Kd(n){if(Array.isArray(n)&&n.length===ma*ma)return n.map(Number);if(typeof n=="string"&&n.trim())try{const i=JSON.parse(n);return Array.isArray(i)&&i.length===ma*ma?i.map(Number):null}catch{return null}return null}function k4(n,i,o=.7){const c=Kd(n),d=Kd(i);if(!c||!d)return!1;let m=0,p=0,y=0;for(let f=0;f<c.length;f+=1)m+=c[f]*d[f],p+=c[f]*c[f],y+=d[f]*d[f];const x=Math.sqrt(p)*Math.sqrt(y);return x?m/x>=o:!1}function _4(n,i){const o=document.createElement("canvas"),c=720,d=960;o.width=c,o.height=d;const m=o.getContext("2d");if(!m||!n.videoWidth)return"";const p=n.videoWidth,y=n.videoHeight,x=i?Number(i.x)||0:p*.22,f=i?Number(i.y)||0:y*.16,g=i?Math.max(1,Number(i.width)||p*.56):p*.56,v=i?Math.max(1,Number(i.height)||y*.56):y*.56,w=g*.42,D=v*.82,C=v*.36;let T=x-w,S=f-D,k=g+w*2,_=v+D+C;const U=3/4;if(k/_>U){const A=k/U;S-=(A-_)*.72,_=A}else{const A=_*U;T-=(A-k)/2,k=A}return k>p?(T=0,k=p):T=Math.max(0,Math.min(p-k,T)),_>y?(S=0,_=y):S=Math.max(0,Math.min(y-_,S)),m.imageSmoothingEnabled=!0,m.imageSmoothingQuality="high",m.translate(c,0),m.scale(-1,1),m.drawImage(n,T,S,k,_,0,0,c,d),o.toDataURL("image/jpeg",.92)}function C4(n,i){const o=document.createElement("canvas");o.width=ma,o.height=ma;const c=o.getContext("2d",{willReadFrequently:!0});if(!c||!n.videoWidth)return null;c.drawImage(n,i.x,i.y,i.width,i.height,0,0,ma,ma);const{data:d}=c.getImageData(0,0,ma,ma),m=[];for(let y=0;y<d.length;y+=4)m.push((.299*d[y]+.587*d[y+1]+.114*d[y+2])/255);const p=m.reduce((y,x)=>y+x,0)/m.length;return m.map(y=>y-p)}function E4(n,i){const o=document.createElement("canvas"),c=48,d=48;o.width=c,o.height=d;const m=o.getContext("2d",{willReadFrequently:!0});if(!m)return{brightness:0,contrast:0,motionHint:0};m.drawImage(n,i.x,i.y,i.width,i.height,0,0,c,d);const{data:p}=m.getImageData(0,0,c,d);let y=0;const x=[];for(let v=0;v<p.length;v+=4){const w=.299*p[v]+.587*p[v+1]+.114*p[v+2];x.push(w),y+=w}const f=y/x.length;let g=0;for(const v of x)g+=(v-f)**2;return{brightness:f,contrast:Math.sqrt(g/x.length),pixels:x}}function A4(n,i){if(!(n!=null&&n.pixels)||!(i!=null&&i.pixels)||n.pixels.length!==i.pixels.length)return 4;let o=0;for(let c=0;c<i.pixels.length;c+=1)o+=Math.abs(i.pixels[c]-n.pixels[c]);return o/i.pixels.length}let So=null;function xp(n){return new Promise((i,o)=>{const c=document.querySelector(`script[data-face-src="${n}"]`);if(c)if(c.dataset.failed==="1")c.remove();else if(c.dataset.loaded==="1"){i();return}else{c.addEventListener("load",()=>i()),c.addEventListener("error",()=>o(new Error("FACE_ENGINE")));return}const d=document.createElement("script");d.src=n,d.async=!0,d.dataset.faceSrc=n,d.onload=()=>{d.dataset.loaded="1",i()},d.onerror=()=>{d.dataset.failed="1",o(new Error("FACE_ENGINE"))},document.head.appendChild(d)})}async function M4(){const n=[["https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js","https://cdn.jsdelivr.net/npm/@tensorflow-models/[email protected]/dist/blazeface.min.js"],["https://unpkg.com/@tensorflow/[email protected]/dist/tf.min.js","https://unpkg.com/@tensorflow-models/[email protected]/dist/blazeface.min.js"]];let i=null;for(const[o,c]of n)try{if(await xp(o),await xp(c),!window.tf||!window.blazeface)throw new Error("FACE_ENGINE");return await window.tf.setBackend("webgl").catch(()=>window.tf.setBackend("cpu")),await window.tf.ready(),window.blazeface.load({maxFaces:4})}catch(d){i=d}throw i||new Error("FACE_ENGINE")}async function R4(){if(So)return So;let n=null;if(typeof window<"u"&&window.FaceDetector)try{n=new window.FaceDetector({fastMode:!0,maxDetectedFaces:4})}catch{n=null}let i=null;async function o(){return i||(i=await M4(),i)}async function c(d){if(!(d!=null&&d.videoWidth))return[];if(n)try{return(await n.detect(d)||[]).map(x=>({x:x.boundingBox.x,y:x.boundingBox.y,width:x.boundingBox.width,height:x.boundingBox.height}))}catch{n=null}return(await(await o()).estimateFaces(d,!1)||[]).map(y=>{const[x,f]=y.topLeft,[g,v]=y.bottomRight;return{x,y:f,width:g-x,height:v-f}})}return So={detect:c},So}function T4(n,i,o){const c={ok:!1,code:"no-face",title:"No Face Detected",detail:"Please position your face inside the frame.",stage:"empty"};if(!n.videoWidth||!i.length)return c;if(i.length>
6401)return{ok:!1,code:"many",title:"Multiple Faces",detail:"Only one face can be verified at a time.",stage:"empty"};const d=i[0],m=n.videoWidth,p=n.videoHeight,y=(d.x+d.width/2)/m,x=(d.y+d.height/2)/p,f=Math.max(d.width/m,d.height/p);if(f<.1)return{ok:!1,code:"far",title:"Move Closer",detail:"Move closer so your face fills the frame.",stage:"empty"};if(y<.08||y>.92||x<.08||x>.92)return{ok:!1,code:"frame",title:"Center Your Face",detail:"Keep your face inside the green frame.",stage:"empty"};const g=E4(n,d);if(g.brightness<18)return{ok:!1,code:"dark",title:"More Light Needed",detail:"Lighting is too dark. Move to a brighter place.",stage:"empty"};if(g.brightness>228)return{ok:!1,code:"bright",title:"Too Bright",detail:"Reduce glare so your face is clearly visible.",stage:"empty"};if(g.contrast<12)return{ok:!1,code:"cover",title:"Face Not Clear",detail:"Remove sunglasses, a mask, or anything covering your face.",stage:"empty"};const v=o[o.length-1],w=A4(v==null?void 0:v.stats,g),D=[...o,{cx:y,cy:x,fill:f,stats:g,motion:w}].slice(-8),C=D.filter(S=>S.motion>.4&&S.motion<22);return D.length>=8&&C.length<1?{ok:!1,code:"spoof",title:"Live Face Required",detail:"A photo, screen, or video cannot be used. Use your real face.",face:d,history:D,stage:"empty"}:{ok:!0,code:"ready",title:"Face Ready",detail:"Verifying automatically...",face:d,history:D,stats:g,stage:"ready"}}const D4=[{icon:Md,title:"Good Lighting",text:"Make sure your face is well lit"},{icon:$i,title:"Look at the Camera",text:"Keep your full face and hair in the frame"},{icon:ka,title:"No Sunglasses or Mask",text:"Remove anything that hides your face"}];function L4({onVerified:n,onBack:i,phone:o="",initialError:c=null}){const d=b.useRef(null),m=b.useRef(null),p=b.useRef(null),y=b.useRef([]),x=b.useRef(!1),f=b.useRef("scan"),g=b.useRef(null),v=b.useRef(n),[w,D]=b.useState(0),[C,T]=b.useState("camera"),[S,k]=b.useState({title:"No Face Detected",detail:"Please position your face inside the frame.",tone:"scan"}),[_,U]=b.useState("Verify Your Identity"),[A,G]=b.useState(c),[E,z]=b.useState(""),[K,ie]=b.useState(null);v.current=n,b.useEffect(()=>{g.current=K},[K]),b.useEffect(()=>{const re=N4(o);re&&ie(re);const V=String(o||"").replace(/\D/g,"").slice(-9);if(V.length<9)return;let oe=!0;return _e(`/api/merchant/face-profile?phone=${encodeURIComponent(V)}`).then(O=>{var ae;if(!oe)return;const Q=Kd((ae=O==null?void 0:O.data)==null?void 0:ae.descriptor);Q&&ie(Q)}).catch(()=>{}),()=>{oe=!1}},[o]),b.useEffect(()=>{let re=!0,V=0;function oe(he,me){f.current="fail",T("fail"),U("Verify Your Identity"),G({title:he,detail:me}),k({title:he,detail:me,tone:"warn"}),y.current=[]}function O(he){var le;const me=d.current;if(!me)return;const R=_4(me,he),P=C4(me,he);if(!R||!P){oe("Face Not Clear","Please make sure your full face and hair are clearly visible and try again.");return}if(String(o||"").replace(/\D/g,"").slice(-9).length>=9&&g.current&&!k4(g.current,P)){oe("Face Not Recognized","This face does not match your registered identity.");return}S4(P,o),z(R),f.current="success",T("success"),U("Identity Verified"),k({title:"Identity Verified",detail:"Face matched. Continuing securely.",tone:"ok"}),(le=m.current)==null||le.getTracks().forEach(ue=>ue.stop()),m.current=null,window.setTimeout(()=>{var ue;return(ue=v.current)==null?void 0:ue.call(v,R,P)},220)}async function Q(){if(!re||f.current==="success")return;const he=d.current,me=p.current;if(f.current!=="scan"||x.current||!he||he.readyState<2||!me){V=window.setTimeout(Q,80);return}x.current=!0;try{const R=await me.detect(he);if(!re||f.current!=="scan")return;const P=T4(he,R,y.current);if(y.current=P.history||[],P.ok){O(P.face);return}T(P.stage==="detected"?"detected":"scan"),U(P.stage==="detected"?"Verifying Your Identity":"Verify Your Identity"),k({title:P.title,detail:P.detail,tone
640:P.code==="spoof"?"warn":"scan"}),P.code==="spoof"&&oe(P.title,P.detail)}catch(R){String((R==null?void 0:R.message)||"").includes("FACE_ENGINE")&&oe("No Face Detected","Face detection could not start. Check your connection and tap Try Again.")}finally{x.current=!1,re&&f.current!=="success"&&(V=window.setTimeout(Q,70))}}async function ae(){c&&w===0?oe(c.title,c.detail):(G(null),z(""),f.current="scan",T("camera"),U("Verify Your Identity"),k({title:"No Face Detected",detail:"Please position your face inside the frame.",tone:"scan"})),y.current=[];try{const he=[{facingMode:"user",width:{ideal:1280},height:{ideal:1920},frameRate:{ideal:30}},{facingMode:"user",width:{ideal:1280},height:{ideal:720}},{facingMode:"user"}];let me=null;for(const R of he)try{me=await navigator.mediaDevices.getUserMedia({video:R,audio:!1});break}catch{me=null}if(!me)throw new Error("CAMERA");if(!re){me.getTracks().forEach(R=>R.stop());return}m.current=me;try{p.current=await R4()}catch{oe("No Face Detected","Face detection could not start. Check your connection and tap Try Again.");return}d.current&&(d.current.srcObject=me,await d.current.play().catch(()=>{})),f.current!=="fail"&&T("scan"),V=window.setTimeout(Q,80)}catch{re&&oe("Camera Required","Allow camera access so Face Security can verify your identity.")}}return ae(),()=>{var he;re=!1,window.clearTimeout(V),(he=m.current)==null||he.getTracks().forEach(me=>me.stop()),m.current=null}},[w,c,o]);function ce(){var re,V;if(G(null),z(""),y.current=[],x.current=!1,f.current="scan",T("scan"),U("Verify Your Identity"),k({title:"No Face Detected",detail:"Please position your face inside the frame.",tone:"scan"}),m.current&&d.current){(V=(re=d.current).play)==null||V.call(re).catch(()=>{});return}D(oe=>oe+1)}const B=C==="detected"||C==="ready"||C==="verify",W=B||C==="scan";return a.jsxs("div",{className:"sc-face-security mx-auto flex min-h-[100dvh] max-w-md flex-col bg-[#071018] px-5 pb-6 pt-2 text-white",children:[a.jsxs("header",{className:"flex items-center justify-between",children:[a.jsx("button",{type:"button",onClick:i,className:"grid h-9 w-9 place-items-center rounded-full bg-white/5 text-white/80","aria-label":"Back",children:a.jsx(Dl,{className:"h-5 w-5"})}),a.jsx(al,{className:"h-9 w-[132px]",imgClassName:"h-full w-full object-contain brightness-110"}),a.jsx("span",{className:"w-9"})]}),a.jsxs("div",{className:"mt-3 flex flex-1 flex-col items-center text-center",children:[a.jsx("span",{className:"grid h-12 w-12 place-items-center rounded-2xl border border-[#22c55e]/45 bg-[#22c55e]/10 text-[#4ade80]",children:C==="success"?a.jsx(Ut,{className:"h-6 w-6"}):a.jsx($i,{className:"h-6 w-6"})}),a.jsx("h1",{className:"mt-2 text-[26px] font-extrabold tracking-tight",children:"Face Security"}),a.jsx("p",{className:"mt-1 text-[15px] font-semibold text-[#86efac]",children:_}),a.jsx("p",{className:"mt-1.5 max-w-[300px] text-[12.5px] leading-relaxed text-white/65",children:"We need to confirm your identity with a face scan to keep your account safe and secure."}),a.jsxs("div",{className:`sc-face-preview relative mt-4 h-[48vh] w-[min(82vw,calc(48vh*0.75))] max-h-[440px] min-h-[280px] overflow-hidden rounded-[32px] bg-[#0c1820] ${C==="success"?"is-ok":B?"is-live":C==="fail"?"is-warn":""}`,children:[E?a.jsx("img",{src:E,alt:"Verified face",className:"h-full w-full"}):a.jsx("video",{ref:d,className:"h-full w-full scale-x-[-1]",playsInline:!0,muted:!0,autoPlay:!0}),a.jsx("span",{className:`sc-face-guide pointer-events-none absolute inset-x-[13%] inset-y-[7%] ${B||C==="success"?"is-live":""}`}),a.jsx("span",{className:`pointer-events-none absolute left-4 top-4 h-8 w-8 rounded-tl-xl border-t-[3px] border-l-[3px] ${C==="fail"?"border-rose-400":"border-[#4ade80]"}`}),a.jsx("span",{className:`pointer-events-none absolute right-4 top-4 h-8 w-8 rounded-tr-xl border-t-[3px] border-r-[3px] ${C==="fail"?"border-rose-400":"border-[#4ade80]"}`}),a.jsx("span",{className:`pointer-events-none absolute bottom-4 left-4 h-8 w-8 rounded-bl-xl border-b-[3px] border-l-[3px] ${C==="fail"?"border-rose-400":"border-[#4ade80]"}`}),a.jsx("span",{className:`pointer-events-none absolute bottom-4 right-4 h-8 w-8 rounded-br-xl border-b-[3px] border-r-[3px] ${C==="fail"?"border-rose-400":"border-[#4ade80]"}`}),a.jsxs("span",{className:"pointer-events-none absolute right-2.5 top-[8%] bottom-[8%] flex w-3 flex-col items-center","aria-hidden":"true",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[#4ade80] shadow-[0_0_8px_#22c55e]"}),a.jsx("span",{className:"my-0.5 w-px flex-1 bg-[#4ade80]/70"}),a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[#4ade80] shadow-[0_0_8px_#22c55e]"})]}),W&&C!=="fail"&&C!=="success"?a.jsx("span",{className:`sc-face-scan pointer-events-none bg-[#4ade80] shadow-[0_0_16px_#22c55e] ${B?"is-live":""}`}):null,C==="success"?a.jsx("span",{className:"absolute inset-x-0 bottom-5 grid place-items-center",children:a.jsx("span",{className:"sc-face-success grid h-14 w-14 place-items-center rounded-full bg-[#22c55e] text-white shadow-[0_10px_30px_rgba(34,197,94,0.45)]",children:a.jsx(Ut,{className:"h-7 w-7"})})}):null]}),A?a.jsxs("div",{className:"mt-4 w-full rounded-2xl border border-rose-400/30 bg-rose-500/10 px-4 py-3 text-left",children:[a.jsxs("p",{className:"flex items-center gap-2 text-[14px] font-bold text-rose-300",children:[a.jsx(_h,{className:"h-4 w-4"}),A.title]}),a.jsx("p",{className:"mt-1 text-[12px] leading-relaxed text-rose-100/80",children:A.detail}),a.jsxs("button",{type:"button",onClick:ce,className:"mt-3 inline-flex items-center gap-1.5 text-[13px] font-semibold text-[#86efac]",children:[a.jsx(Xi,{className:"h-3.5 w-3.5"}),"Try Again"]})]}):a.jsxs("div",{className:"mt-4 flex w-full items-start gap-3 rounded-2xl border border-white/8 bg-white/5 px-3.5 py-3 text-left",children:[a.jsx("span",{className:`mt-0.5 grid h-9 w-9 shrink-0 place-items-center rounded-full ${S.tone==="warn"?"bg-rose-500/15 text-rose-300":"bg-[#22c55e]/15 text-[#4ade80]"}`,children:S.tone==="warn"?a.jsx(_h,{className:"h-4 w-4"}):a.jsx(T5,{className:"h-4 w-4"})}),a.jsxs("span",{children:[a.jsx("p",{className:"text-[14px] font-bold",children:S.title}),a.jsx("p",{className:"mt-0.5 text-[12px] text-white/55",children:S.detail})]})]}),a.jsx("div",{className:"mt-5 grid w-full grid-cols-3 gap-2 text-center",children:D4.map(re=>a.jsxs("div",{className:"px-1",children:[a.jsx("span",{className:"mx-auto grid h-10 w-10 place-items-center rounded-full bg-[#22c55e]/15 text-[#4ade80]",children:a.jsx(re.icon,{className:"h-5 w-5"})}),a.jsx("p",{className:"mt-2 text-[12px] font-bold",children:re.title}),a.jsx("p",{className:"mt-1 text-[10px] leading-snug text-white/50",children:re.text})]},re.title))})]}),a.jsx("p",{className:"mt-4 text-center text-[11px] text-white/45",children:"Your data is secure and will not be shared."})]})}function An({icon:n,label:i,value:o,valueClassName:c=""}){return a.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-slate-100 py-2.5 last:border-0 dark:border-white/8",children:[a.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2 text-[12.5px] text-slate-500 dark:text-slate-400",children:[a.jsx("span",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-full bg-emerald-50 text-[#16a34a] dark:bg-[#16a34a]/15 dark:text-[#4ade80]",children:a.jsx(n,{className:"h-3.5 w-3.5"})}),i]}),a.jsx("span",{className:`max-w-[58%] text-right text-[12.5px] font-semibold text-slate-800 dark:text-white ${c}`,children:o})]})}function Sd(){const{id:n}=Y2(),i=Bl(),[o,c]=b.useState(null),[d,m]=b.useState(!0),[p,y]=b.useState([]),[x,f]=b.useState(""),[g,v]=b.useState(!1),[w,D]=b.useState(""),[C,T]=b.useState(!1),[S,k]=b.useState(!1),[_,U]=b.useState(null),[A,G]=b.useState(null),[E,z]=b.useState(null),[K,ie]=b.useState(!1),[,ce]=b.useState(0),[B,W]=b.useState(""),[re,V]=b.useState(""),[oe,O]=b.useState(""),[Q,ae]=b.useState(""),[he,me]=b.useState(!1),[R,P]=b.useState(""),J=Ki(),le=q1(),ue=le||he,[ge,Ne]=b.useState(!1),[tt,qe]=b.useState(""),[te,Ae]=b.useState(null),[Lt,Jt]=b.useState(null),Wt=b.useRef(null),de="somacharge_last_bank";b.useEffect(()=>{let we=!0;m(!0);const Te=async()=>{var ta,It,mt,Xe,be;const Ve=Ki();let Ce=null,Ge=null;if(Ve!=null&&Ve.phone)try{const Re=await _e(`/api/merchant/active-rental?phone=${encodeURIComponent(Ve.phone)}`),dl=((It=(ta=Re==null?void 0:Re.data)==null?void 0:ta.bank)==null?void 0:It.id)||((Xe=(mt=Re==null?void 0:Re.data)==null?void 0:mt.order)==null?void 0:Xe.bank);dl&&(Ce=await bd(dl),Ge=((be=Re==null?void 0:Re.data)==null?void 0:be.order)||null)}catch{}if(!Ce&&n&&(Ce=await bd(n)),!Ce){const Re=sessionStorage.getItem(de);Re&&(Ce=await bd(Re))}
640we&&(Ce!=null&&Ce.id&&sessionStorage.setItem(de,Ce.id),c(Ce),Ge!=null&&Ge.id&&G({orderId:Ge.id,dueAt:Ge.dueAt,durationLabel:Ge.durationLabel,durationMinutes:Ge.durationMinutes,status:Ge.status}),m(!1))};Te();const Ke=window.setInterval(()=>{document.hidden||Te()},4e3);return()=>{we=!1,window.clearInterval(Ke)}},[n]),b.useEffect(()=>{const we=async()=>{const Te=await z1();y(Te),f(Ke=>{var Ve;return Ke&&Te.some(Ce=>Ce.id===Ke)?Ke:((Ve=Te[0])==null?void 0:Ve.id)||""})};return we(),B1(()=>{we()})},[]);const ne=p.find(we=>we.id===x)??p[0],ot=(o==null?void 0:o.status)==="Available",jt=S||!!A,Qt=!!(E!=null&&E.timeEnded)||!!(A!=null&&A.dueAt&&Date.now()>=new Date(A.dueAt).getTime()),pt=`$${((ne==null?void 0:ne.price)??0).toFixed(2)}`;b.useEffect(()=>{var Ce;if(!(A!=null&&A.orderId))return;const we=window.setInterval(()=>ce(Ge=>Ge+1),1e3);async function Te(Ge){var ta,It,mt;try{const Xe=await _e("/api/merchant/rental-heartbeat",{method:"POST",body:{orderId:A.orderId,powerBank:o==null?void 0:o.id,lat:Ge==null?void 0:Ge.lat,lng:Ge==null?void 0:Ge.lng}}),be=(ta=Xe==null?void 0:Xe.data)==null?void 0:ta.order;if((It=Xe==null?void 0:Xe.data)!=null&&It.returned||(be==null?void 0:be.status)==="Returned"){z(null),ie(!0),c(Re=>Re&&{...Re,status:"Available"});return}(mt=Xe==null?void 0:Xe.data)!=null&&mt.timeEnded||(be==null?void 0:be.lockReason)==="Waqtiga waa uu dhamaaday"?(z({timeEnded:!0,reason:"Waqtiga waa uu dhamaaday"}),c(Re=>Re&&{...Re,status:"In Use"})):((be==null?void 0:be.status)==="In Use"||(be==null?void 0:be.status)==="Active"||(be==null?void 0:be.status)==="Locked")&&(z(null),c(Re=>Re&&{...Re,status:"In Use"})),be!=null&&be.dueAt&&G(Re=>Re&&{...Re,dueAt:be.dueAt})}catch{}}Te();const Ke=((Ce=navigator.geolocation)==null?void 0:Ce.watchPosition(Ge=>Te({lat:Ge.coords.latitude,lng:Ge.coords.longitude}),()=>Te(),{enableHighAccuracy:!0,timeout:8e3,maximumAge:5e3}))??null,Ve=window.setInterval(()=>Te(),12e3);return()=>{window.clearInterval(we),window.clearInterval(Ve),Ke!=null&&navigator.geolocation.clearWatch(Ke)}},[A==null?void 0:A.orderId,o==null?void 0:o.id]);async function ea(){const we=Wt.current;if(we)try{const Te=(await Ow(async()=>{const{default:Ce}=await import("./html2canvas.esm-QH1iLAAe.js");return{default:Ce}},[])).default,Ke=await Te(we,{backgroundColor:document.documentElement.classList.contains("dark")?"#151a21":"#ffffff",scale:2,useCORS:!0}),Ve=document.createElement("a");Ve.download=`${(_==null?void 0:_.transactionId)||"somacharge-receipt"}.png`,Ve.href=Ke.toDataURL("image/png"),Ve.click();return}catch{}F1(_,o==null?void 0:o.id)}function pa(){if(!(!o||S)){if(!tt){O("Face verification is required before you can rent.");return}!ue&&!ne||(O(""),v(!0))}}function Ea(){C||(v(!1),O(""),le||me(!1))}async function dt(we){var It,mt,Xe,be,Re,dl,Vs,Pe,ml,nl,ba,Aa;if(we.preventDefault(),!o||C||S)return;if(ue){const xt=String((J==null?void 0:J.phone)||R).replace(/\D/g,"").slice(-9);if(xt.length<9){O("Enter the Hormuud number used when this PIN was saved.");return}if(!/^\d{4}$/.test(Q)){O("Enter your 4-digit PIN.");return}T(!0),O("");try{const ve=await _e("/api/merchant/member-use",{method:"POST",body:{phone:`+252 ${xt}`,pin:Q,customer:(J==null?void 0:J.name)||"",powerBank:o.id,faceImage:tt,faceDescriptor:te}}),Fe=(It=ve==null?void 0:ve.data)==null?void 0:It.order;if(!(Fe!=null&&Fe.id))throw new Error("PIN verified but rental did not start.");const zt=((Xe=(mt=ve==null?void 0:ve.data)==null?void 0:mt.order)==null?void 0:Xe.customer)||((Re=(be=ve==null?void 0:ve.data)==null?void 0:be.payment)==null?void 0:Re.fullName)||(J==null?void 0:J.name)||"Customer",Ma=(ve==null?void 0:ve.message)||`${zt} free ayuu ku qaatay`;$1({phone:`+252 ${xt}`,name:zt,expiresAt:((Vs=(dl=ve==null?void 0:ve.data)==null?void 0:dl.membership)==null?void 0:Vs.expiresAt)||Fe.dueAt,weeks:((ml=(Pe=ve==null?void 0:ve.data)==null?void 0:Pe.membership)==null?void 0:ml.weeks)||1});const bt=(nl=ve==null?void 0:ve.data)==null?void 0:nl.payment;bt&&Oo({id:bt.id||bt.paymentId||Fe.id,user:zt,phone:`+252 ${xt}`,amount:0,powerBank:o.id,method:"Free PIN"}),U({name:zt,phone:`+252 ${xt}
640`,duration:"Free",amount:0,date:new Date().toLocaleString(),transactionId:Fe.reference||Fe.id,status:"In Use",orderId:Fe.id,note:Ma}),k(!0),v(!1),me(!1),G({orderId:Fe.id,dueAt:Fe.dueAt,durationLabel:"Free"}),z(null),c(Va=>Va&&{...Va,status:"In Use",location:Rt.name})}catch(ve){const Fe=(ve==null?void 0:ve.message)||"PIN check failed.";/does not match your registered identity/i.test(Fe)&&(mp((J==null?void 0:J.phone)||R),Jt({title:"Face Not Recognized",detail:"This face does not match your registered identity."}),qe(""),Ae(null)),O(Fe)}finally{T(!1)}return}if(!ne)return;const Te=w.replace(/\D/g,""),Ke=re.replace(/\s+/g," ").trim();if(Ke.length<2){O("Please enter your full name.");return}if(Te.length<9){O("Please enter a valid Hormuud number (61XXXXXXXX).");return}T(!0),O("");const Ve=`+252 ${Te}`,Ce=await zh();if(!Ce.lat||!Ce.lng){T(!1),O(Ce.error||"Turn on GPS. This power bank only works at Hodan Restaurant.");return}if(!Oj(Ce.lat,Ce.lng,Ce.accuracy)){T(!1),O("This power bank only works at Hodan Restaurant. Go back to Hodan Restaurant to start.");return}const Ge=Ce.lat,ta=Ce.lng;try{const xt=await _e("/api/merchant/pay",{method:"POST",body:{customer:Ke,phone:Ve,powerBank:o.id,location:Rt.name,amount:ne.price,durationLabel:ne.hoursLabel||ne.label,durationMinutes:ne.minutes,lat:Ge,lng:ta,faceImage:tt,faceDescriptor:te}}),ve=(ba=xt==null?void 0:xt.data)==null?void 0:ba.payment,Fe=(Aa=xt==null?void 0:xt.data)==null?void 0:Aa.order;if(!(ve!=null&&ve.transactionId)&&!(ve!=null&&ve.reference)&&!(ve!=null&&ve.id))throw new Error("Payment was not confirmed by Hormuud.");Oo({id:ve.id||ve.paymentId||ve.transactionId,user:Ke,phone:ve.phone||Ve,amount:ve.amount,powerBank:ve.powerBank||o.id}),U({name:Ke,phone:ve.phone||Ve,duration:ne.hoursLabel||ne.label,amount:Number(ve.amount??ne.price),date:ve.date,transactionId:ve.transactionId||ve.reference,status:ve.status||"Successful",orderId:Fe==null?void 0:Fe.id}),k(!0),v(!1),G({orderId:Fe==null?void 0:Fe.id,dueAt:Fe==null?void 0:Fe.dueAt,durationLabel:ne.hoursLabel||ne.label}),z(null),c(zt=>zt&&{...zt,status:"In Use",location:Rt.name})}catch(xt){const ve=(xt==null?void 0:xt.message)||"Payment failed. Please try again.";/does not match your registered identity/i.test(ve)&&(mp(Ve),Jt({title:"Face Not Recognized",detail:"This face does not match your registered identity."}),qe(""),Ae(null)),O(ve),bm({user:Ke,phone:Ve,amount:ne.price,powerBank:o.id})}finally{T(!1)}}async function Ya(){var Te,Ke,Ve;if(!(A!=null&&A.orderId)&&!(o!=null&&o.id))return;const we=await zh();try{const Ce=await _e("/api/merchant/return",{method:"POST",body:{orderId:A==null?void 0:A.orderId,powerBank:o==null?void 0:o.id,lat:we.lat,lng:we.lng}});((Te=Ce==null?void 0:Ce.data)!=null&&Te.returned||((Ve=(Ke=Ce==null?void 0:Ce.data)==null?void 0:Ke.order)==null?void 0:Ve.status)==="Returned")&&(ie(!0),z(null),c(Ge=>Ge&&{...Ge,status:"Available"}))}catch(Ce){O((Ce==null?void 0:Ce.message)||"Could not return the power bank.")}}if(d)return a.jsxs("div",{className:"scan-rent mx-auto flex min-h-screen max-w-md flex-col pb-24",children:[a.jsx("header",{className:"flex items-center justify-end px-4 py-3",children:a.jsx(ds,{compact:!0})}),a.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center",children:a.jsx("p",{className:"text-[14px] text-[var(--sr-muted)]",children:"Loading power bank..."})}),a.jsx(Rl,{})]});if(!o)return a.jsxs("div",{className:"scan-rent mx-auto flex min-h-screen max-w-md flex-col pb-24",children:[a.jsx("header",{className:"flex items-center justify-end px-4 py-3",children:a.jsx(ds,{compact:!0})}),a.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center px-6 text-center",children:[a.jsx("span",{className:"grid h-14 w-14 place-items-center rounded-full bg-[#16a34a]",children:a.jsx(Xt,{className:"h-7 w-7 text-white",fill:"currentColor"})}),a.jsx("h1",{className:"mt-4 text-[20px] font-bold text-[var(--sr-text)]",children:"Power bank not found"}),a.jsx("p",{className:"mt-2 text-[13px] text-[var(--sr-muted)]",children:"This QR code is invalid or the power bank is no longer registered."}),a.jsx(et,{to:"/",className:"mt-6 inline-flex h-11 items-center justify-center rounded-xl bg-[#16a34a] px-5 text-[13px] font-semibold text-white",children:"Go Home"})]}),a.jsx(Rl,{})]});if(ot&&!jt&&!K&&!tt)return a.jsx(L4,{onBack:()=>
640i(-1),phone:(J==null?void 0:J.phone)||R||w,initialError:Lt,onVerified:(we,Te)=>{qe(we),Ae(Te||null),Jt(null)}});if(_&&!C){const we=A!=null&&A.dueAt?new Date(A.dueAt).getTime():0,Te=we-Date.now(),Ke=we?Te<=0?"Waqtiga waa uu dhamaaday":`${String(Math.floor(Te/6e4)).padStart(2,"0")}:${String(Math.floor(Te%6e4/1e3)).padStart(2,"0")}`:(A==null?void 0:A.durationLabel)||_.duration;return a.jsxs("div",{className:"scan-rent scan-rent-success relative mx-auto max-w-md pb-24",children:[a.jsxs("header",{className:"sticky top-0 z-10 flex items-center justify-between bg-white/90 px-4 py-3 backdrop-blur dark:bg-[#0b0f14]/95",children:[a.jsx("button",{type:"button",onClick:()=>i(-1),className:"grid h-9 w-9 place-items-center rounded-full bg-slate-100 text-slate-600 dark:bg-white/5 dark:text-slate-300","aria-label":"Back",children:a.jsx(Dl,{className:"h-5 w-5"})}),a.jsx(al,{className:"h-10 w-[132px] sm:h-12 sm:w-[180px]",imgClassName:"h-full w-full object-contain dark:brightness-110"}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(ds,{compact:!0}),a.jsx("button",{type:"button",className:"grid h-9 w-9 place-items-center rounded-full bg-slate-100 text-slate-600 dark:bg-white/5 dark:text-slate-300","aria-label":"Help",children:a.jsx(zl,{className:"h-3.5 w-3.5"})})]})]}),a.jsxs("main",{className:"px-4 pb-8 pt-5",children:[a.jsxs("div",{className:"flex flex-col items-center text-center",children:[a.jsxs("div",{className:"relative grid h-[88px] w-[88px] place-items-center",children:[a.jsx("span",{className:"absolute left-1 top-2 h-2 w-2 rounded-full bg-orange-400"}),a.jsx("span",{className:"absolute right-2 top-1 h-1.5 w-1.5 rounded-full bg-sky-400"}),a.jsx("span",{className:"absolute -right-0.5 top-8 h-2 w-2 rounded-full bg-amber-300"}),a.jsx("span",{className:"absolute bottom-2 left-0 h-1.5 w-1.5 rounded-full bg-emerald-400"}),a.jsx("span",{className:"absolute -left-1 top-10 h-2 w-2 rounded-full bg-blue-400"}),a.jsx("span",{className:"absolute bottom-1 right-1 h-2 w-2 rounded-full bg-yellow-400"}),a.jsx("span",{className:"grid h-[72px] w-[72px] place-items-center rounded-full bg-[#22c55e] text-white shadow-[0_10px_28px_rgba(34,197,94,0.35)]",children:a.jsx(Ut,{className:"h-9 w-9",strokeWidth:2.4})})]}),a.jsx("h1",{className:"mt-3 text-[26px] font-extrabold tracking-tight text-slate-900 dark:text-white",children:"Payment Successful!"}),a.jsxs("p",{className:"mt-2 max-w-[300px] text-[13px] leading-relaxed text-slate-500 dark:text-slate-400",children:["Your payment has been transferred successfully. Thank you for using"," ",a.jsx("span",{className:"font-semibold text-[#16a34a]",children:"Hormuud Mobile Money"}),"."]})]}),a.jsxs("section",{ref:Wt,className:"mt-6 rounded-[22px] border border-slate-100 bg-white p-4 shadow-[0_16px_40px_rgba(15,23,42,0.08)] dark:border-white/10 dark:bg-[#151a21] dark:shadow-[0_16px_40px_rgba(0,0,0,0.35)]",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"grid h-[72px] w-[60px] shrink-0 place-items-center rounded-2xl bg-slate-50 dark:bg-slate-800",children:a.jsxs("div",{className:"relative flex h-14 w-8 flex-col items-center justify-center rounded-full border border-slate-200 bg-white dark:border-slate-600 dark:bg-slate-900",children:[a.jsx("span",{className:"absolute -top-1 h-1.5 w-3.5 rounded-t-full bg-[#16a34a]"}),a.jsx(Xt,{className:"h-4 w-4 text-[#16a34a]",fill:"currentColor"})]})}),a.jsx("div",{className:"min-w-0 flex-1 text-left",children:a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[15px] font-bold text-slate-900 dark:text-white",children:"SomaCharge Power Bank"}),a.jsx("p",{className:"mt-0.5 text-[13px] font-semibold text-[#16a34a]",children:o.id})]}),a.jsx("span",{className:"shrink-0 rounded-full bg-[#22c55e] px-2.5 py-1 text-[11px] font-semibold text-white",children:"In Use"})]})})]}),a.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-3 border-t border-slate-100 pt-3 dark:border-white/10",children:[a.jsxs("div",{className:"text-left",children:[a.jsxs("p",{className:"inline-flex items-center gap-1.5 text-[11px] text-slate-400",children:[a.jsx(Ed,{className:"h-3.5 w-3.5 text-[#16a34a]"}),"Battery Level"]}),a.jsxs("p",{className:"mt-0.5 text-[14px] font-bold text-[#16a34a]",children:[o.battery,"%"]})]}),a.jsxs("div",{className:"text-left",children:[a.jsxs("p",{className:"inline-flex items-center gap-1.5 text-[11px] text-slate-400",children:[a.jsx(Tt,{className:"h-3.5 w-3.5"}),"Location"]}),a.jsx("p",{className:"mt-0.5 text-[13px] font-semibold text-slate-800 dark:text-slate-100",children:Rt.name})]})]}),A?a.jsxs("div",{className:"mt-3 rounded-xl bg-emerald-50 px-3 py-2 text-left dark:bg-[#122018]",children:[a.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-emerald-700 dark:text-emerald-300/80",children:"Rental time"}),a.jsx("p",{className:"text-[22px] font-bold text-slate-900 dark:text-white",children:Ke})]}):null,a.jsxs("div",{className:"mt-4 rounded-2xl border border-slate-100 bg-white px-3 dark:border-white/10 dark:bg-[#10151c]",children:[a.jsx(An,{icon:ka,label:"Full Name",value:_.name||"—"}),a.jsx(An,{icon:Pa,label:"Phone Number",value:_.phone}),a.jsx(An,{icon:xa,label:"Rental Duration",value:_.duration}),a.jsx(An,{icon:zp,label:"Amount",value:`$${Number(_.amount).toFixed(2)}`,valueClassName:"text-[#16a34a]"}),a.jsx(An,{icon:Up,label:"Date & Time",value:_.date}),a.jsx(An,{icon:Fp,label:"Transaction ID",value:_.transactionId}),a.jsxs("div",{className:"flex items-center justify-between gap-3 py-2.5",children:[a.jsxs("span",{className:"inline-flex items-center gap-2 text-[12.5px] text-slate-500 dark:text-slate-400",children:[a.jsx("span",{className:"grid h-7 w-7 place-items-center rounded-full bg-emerald-50 text-[#16a34a] dark:bg-[#16a34a]/15 dark:text-[#4ade80]",children:a.jsx(Ut,{className:"h-3.5 w-3.5"})}),"Status"]}),a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2.5 py-0.5 text-[11px] font-semibold text-[#16a34a] dark:bg-[#16a34a]/15 dark:text-[#4ade80]",children:[a.jsx(Ut,{className:"h-3 w-3"}),_.status]})]})]}),a.jsxs("div",{className:"mt-4 flex items-start gap-2 rounded-xl bg-emerald-50 px-3 py-3 text-left text-[12px] leading-relaxed text-emerald-800 dark:bg-[#122018] dar
640k:text-emerald-100/85",children:[a.jsx(Dt,{className:"mt-0.5 h-4 w-4 shrink-0 text-[#16a34a]"}),a.jsx("p",{children:"Your transaction is complete and secure. You will receive a confirmation SMS shortly."})]})]}),a.jsxs("div",{className:"mt-5 grid grid-cols-2 gap-2.5",children:[a.jsxs("button",{type:"button",onClick:ea,className:"inline-flex h-12 items-center justify-center gap-1.5 rounded-2xl border-2 border-[#16a34a] bg-white text-[13px] font-semibold text-[#16a34a] dark:bg-transparent",children:[a.jsx(Dn,{className:"h-4 w-4"}),"Download Receipt"]}),a.jsx("button",{type:"button",onClick:()=>Ne(!0),className:"inline-flex h-12 items-center justify-center gap-1.5 rounded-2xl bg-[#22c55e] text-[13px] font-semibold text-white shadow-[0_10px_20px_rgba(34,197,94,0.28)]",children:"OK"})]}),a.jsxs("p",{className:"mt-4 flex items-center justify-center gap-1.5 text-[12px] font-semibold text-[#16a34a]",children:[a.jsx(Dt,{className:"h-3.5 w-3.5"}),"Secured by Hormuud"]})]}),ge?a.jsx(EnjoyPowerScreen,{bankId:o.id,duration:_.duration,amount:`$${Number(_.amount).toFixed(2)}`,returnBefore:A!=null&&A.dueAt?new Date(A.dueAt).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):_.date,onDone:()=>Ne(!1)}):null,a.jsx(Rl,{hidden:ge})]})}return a.jsxs("div",{className:"scan-rent relative mx-auto max-w-md pb-24",children:[a.jsxs("header",{className:"sticky top-0 z-10 flex items-center justify-between border-b border-[var(--sr-border)] bg-[var(--sr-header)] px-4 py-3 backdrop-blur",children:[a.jsx("button",{type:"button",onClick:()=>i(-1),className:"grid h-9 w-9 place-items-center rounded-full text-[var(--sr-muted)] transition hover:bg-[var(--sr-soft)]","aria-label":"Back",children:a.jsx(Dl,{className:"h-5 w-5"})}),a.jsx(al,{className:"h-10 w-[132px] sm:h-12 sm:w-[180px]",imgClassName:"h-full w-full object-contain dark:brightness-110"}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(ds,{compact:!0}),a.jsx("button",{type:"button",className:"grid h-9 w-9 place-items-center rounded-full border border-[var(--sr-border)] bg-[var(--sr-card)] text-[var(--sr-muted)]","aria-label":"Help",children:a.jsx(zl,{className:"h-3.5 w-3.5"})})]})]}),a.jsxs("main",{className:"space-y-4 px-4 py-4 pb-8",children:[a.jsx("section",{className:"rounded-2xl border border-[var(--sr-ok-line)] bg-[var(--sr-ok)] px-4 py-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"mt-0.5 grid h-8 w-8 place-items-center rounded-full bg-[#16a34a] text-white",children:a.jsx(Ut,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[15px] font-bold text-emerald-700 dark:text-[#4ade80]",children:"Power bank found!"}),a.jsx("p",{className:"mt-0.5 text-[12px] text-emerald-800/70 dark:text-emerald-200/70",children:"Scan successful. You can now rent this power bank."})]})]})}),a.jsxs("section",{className:"rounded-2xl border border-[var(--sr-border)] bg-[var(--sr-card)] p-4 shadow-[0_12px_40px_rgba(15,23,42,0.06)] dark:shadow-[0_12px_40px_rgba(0,0,0,0.35)]",children:[a.jsxs("div",{className:"flex gap-3",children:[a.jsx("div",{className:"grid h-[88px] w-[72px] shrink-0 place-items-center rounded-2xl bg-gradient-to-b from-slate-200 to-slate-400 dark:from-slate-700 dark:to-slate-950",children:a.jsxs("div",{className:"relative flex h-16 w-9 flex-col items-center justify-center rounded-full border border-slate-300 bg-white dark:border-slate-600 dark:bg-slate-900",children:[a.jsx("span",{className:"absolute -top-1 h-2 w-4 rounded-t-full bg-[#16a34a]"}),a.jsx(Xt,{className:"h-5 w-5 text-[#16a34a]",fill:"currentColor"})]})}),a.jsx("div",{className:"min-w-0 flex-1",children:a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-[16px] font-bold text-[var(--sr-text)]",children:"SomaCharge Power Bank"}),a.jsx("p",{className:"mt-0.5 text-[13px] font-semibold text-emerald-600 dark:text-[#4ade80]",children:o.id})]}),a.jsx("span",{className:`shrink-0 rounded-full px-2.5 py-1 text-[11px] font-semibold ${o.status==="Available"?"bg-[#16a34a]/15 text-emerald-700 dark:text-[#4ade80]":"bg-orange-500/15 text-orange-600 dar
640k:text-orange-300"}`,children:o.status})]})})]}),a.jsxs("div",{className:"mt-4 space-y-2.5 border-t border-[var(--sr-border)] pt-3 text-[13px]",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"inline-flex items-center gap-2 text-[var(--sr-muted)]",children:[a.jsx(Ed,{className:"h-4 w-4 text-[#16a34a]"}),"Battery Level"]}),a.jsxs("span",{className:"font-semibold text-emerald-600 dark:text-[#4ade80]",children:[o.battery,"%"]})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"inline-flex items-center gap-2 text-[var(--sr-muted)]",children:[a.jsx(Tt,{className:"h-4 w-4"}),"Location"]}),a.jsx("span",{className:"font-medium text-[var(--sr-text)]",children:Rt.name})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-[var(--sr-muted)]",children:"Serial Number"}),a.jsx("span",{className:"font-medium text-[var(--sr-text)]",children:o.serial})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"inline-flex items-center gap-2 text-[var(--sr-muted)]",children:[a.jsx(xa,{className:"h-4 w-4"}),"Last Updated"]}),a.jsx("span",{className:"font-medium text-[var(--sr-text)]",children:o.lastUsed})]})]})]}),K?a.jsxs("section",{className:"rounded-2xl border border-emerald-200 bg-emerald-50 px-4 py-4 text-[13px] text-emerald-800 dark:border-[#16a34a]/25 dark:bg-[#122018] dark:text-emerald-100",children:[a.jsx("p",{className:"text-[15px] font-bold",children:"Returned"}),a.jsx("p",{className:"mt-1 text-[12px] text-emerald-800/80 dark:text-emerald-200/70",children:"Power bank is back at Hodan Restaurant. Status is now Available for the next customer."})]}):jt?a.jsxs("section",{className:"rounded-2xl border border-[var(--sr-ok-line)] bg-[var(--sr-ok)] px-4 py-4",children:[_!=null&&_.note||(A==null?void 0:A.durationLabel)==="Free"?a.jsx("p",{className:"mb-2 rounded-xl bg-white/70 px-3 py-2 text-center text-[14px] font-bold text-emerald-700 dark:bg-white/5 dark:text-emerald-300",children:(_==null?void 0:_.note)||`${(_==null?void 0:_.name)||(J==null?void 0:J.name)||"Customer"} free ayuu ku qaatay`}):null,Qt?a.jsx("p",{className:"mb-2 rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-center text-[14px] font-bold text-amber-700 dark:border-amber-500/25 dark:bg-amber-500/10 dark:text-amber-200",children:"Waqtiga waa uu dhamaaday. Fadlan soo celi power bank-ka."}):null,a.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-wide text-emerald-700 dark:text-emerald-300/80",children:"Rental time"}),a.jsx("p",{className:"mt-1 text-[28px] font-bold text-[var(--sr-text)]",children:(()=>{const we=A!=null&&A.dueAt?new Date(A.dueAt).getTime():0,Te=we-Date.now();return we?Te<=0?"Waqtiga waa uu dhamaaday":Xo(A.dueAt,{status:A.status,durationLabel:A.durationLabel,durationMinutes:A.durationMinutes}).text.replace(" left",""):(A==null?void 0:A.durationLabel)||"Started"})()}),a.jsx("p",{className:"mt-1 text-[12px] text-emerald-800/70 dark:text-emerald-200/70",children:"Status is In Use. When you return the power bank, it becomes Returned and Available."}),a.jsx("button",{type:"button",onClick:Ya,className:"mt-3 flex h-11 w-full items-center justify-center rounded-xl bg-[#16a34a] text-[13px] font-semibold text-white",children:"Return power bank"})]}):ot?a.jsxs(a.Fragment,{children:[ue?a.jsxs("section",{className:"rounded-[20px] border border-[#22c55e]/35 bg-[var(--sr-card)] px-4 py-4",children:[a.jsx("p",{className:"text-[15px] font-bold text-[var(--sr-text)]",children:"PIN access is ready"}),a.jsx("p",{className:"mt-1 text-[12px] text-[var(--sr-muted)]",children:"No extra payment. Enter your 4-digit PIN to use this Available power bank anytime."})]}):a.jsxs("section",{children:[a.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[a.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-full bg-[#EAF8F0] text-[#00A651]",children:a.jsx(xa,{className:"h-4 w-4"})}),a.jsx("h3",{className:"text-[15px] font-bold text-[var(--sr-text)]",children:"Choose Rental Duration"})]}),p.length===0?a.jsx("p",{className:"rounded-2xl border border-[var(--sr-border)] bg-[var(--sr-card)] px-4 py-6 text-center text-[12px] text-[var(--sr-muted)]",children:"Loading pricing..."}):a.jsx("div",{className:`grid gap-2.5 ${p.length===1?"grid-cols-1":p.length===2?"grid-cols-2":"grid-cols-3"}`,children:p.map(we=>{const Te=we.id===x;return a.jsxs("button",{type:"button",onClick:()=>f(we.id),className:`relative overflow-hidden rounded-[20px] border p-3.5 text-left transition duration-200 ${Te?"border-[#00A651] bg-[#EAF8F0] shadow-[0_10px_22px_rgba(0,166,81,0.18)]":"border-[var(--sr-border)] bg-[var(--sr-card)] hover:border-emerald-300 dark:hover:border-white/20"}`,children:[Te?a.jsx("span",{className:"absolute right-2 top-2 grid h-5 w-5 place-items-center rounded-full bg-[#00A651] text-white shadow-[0_4px_10px_rgba(0,166,81,0.35)]",children:a.jsx(Ut,{className:"h-3.5 w-3.5",
640strokeWidth:2.5})}):a.jsx("span",{className:"absolute right-2 top-2 h-5 w-5 rounded-full border border-[var(--sr-border)] bg-transparent"}),a.jsx("span",{className:`grid h-8 w-8 place-items-center rounded-full ${Te?"bg-[#00A651] text-white":"bg-[var(--sr-soft)] text-[#00A651]"}`,children:a.jsx(xa,{className:"h-4 w-4"})}),a.jsx("p",{className:"mt-2.5 pr-4 text-[12px] font-semibold text-[var(--sr-text)]",children:we.label}),a.jsxs("p",{className:`mt-1 text-[18px] font-extrabold tracking-tight ${Te?"text-[#00A651]":"text-[var(--sr-text)]"}`,children:["$",we.price.toFixed(2)]}),a.jsx("p",{className:"mt-1 text-[10px] font-medium text-[var(--sr-muted)]",children:"Billed once"})]},we.id)})}),a.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-xl bg-[var(--sr-soft)] px-3 py-2.5 text-[11px] text-[var(--sr-muted)]",children:[a.jsx(Eh,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[#00A651]"}),a.jsx("p",{children:"You will be charged based on the time you use. Payment will stop automatically when you return the power bank."})]})]}),a.jsxs("section",{className:"flex items-center justify-between rounded-[20px] border border-[var(--sr-border)] bg-[var(--sr-card)] px-4 py-3.5 shadow-[0_8px_24px_rgba(15,23,42,0.04)]",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[12px] text-[var(--sr-muted)]",children:ue?"PIN access":"Estimated Total"}),a.jsxs("p",{className:"mt-1 inline-flex items-center gap-1.5 text-[13px] font-semibold text-[var(--sr-text)]",children:[a.jsx("span",{className:"grid h-6 w-6 place-items-center rounded-full bg-[#EAF8F0] text-[#00A651]",children:a.jsx(xa,{className:"h-3.5 w-3.5"})}),ue?"Anytime":(ne==null?void 0:ne.hoursLabel)||(ne==null?void 0:ne.label)||"—"]}
640)]}),a.jsx("p",{className:"text-[22px] font-extrabold tracking-tight text-[#00A651]",children:ue?"$0.00":pt})]}),ue?null:a.jsxs("section",{children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[a.jsx("h3",{className:"text-[15px] font-bold text-[var(--sr-text)]",children:"Payment Method"}),a.jsx("button",{type:"button",className:"text-[12px] font-semibold text-[#00A651]",children:"Change"})]}),a.jsxs("div",{className:"flex items-center justify-between rounded-[20px] border-2 border-[#00A651] bg-[var(--sr-card)] px-4 py-3.5 shadow-[0_8px_20px_rgba(0,166,81,0.08)]",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("img",{src:"/hormuud-evc.png",alt:"Hormuud EVC Plus",className:"h-11 w-11 rounded-xl object-cover shadow-[0_6px_14px_rgba(0,166,81,0.18)]"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[13px] font-bold tracking-wide text-[var(--sr-text)]",children:"HORMUUD"}),a.jsx("p",{className:"text-[11px] font-medium text-[#00A651]",children:"Mobile Money"})]})]}),a.jsx("span",{className:"grid h-6 w-6 place-items-center rounded-full bg-[#00A651] text-white",children:a.jsx(Ut,{className:"h-4 w-4"})})]})]}),a.jsxs("button",{type:"button",onClick:pa,disabled:S||!ue&&!ne,className:"flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-[#00A651] text-[15px] font-bold text-white shadow-[0_12px_24px_rgba(0,166,81,0.35)] transition hover:bg-[#008C45] disabled:cursor-not-allowed disabled:opacity-80",children:[a.jsx(qa,{className:"h-4 w-4"}),S?"Payment Recorded":ue?"Enter PIN & Start Rental":`Pay ${((ne==null?void 0:ne.price)??0).toFixed(2)} & Start Rental`]}),!S&&!ue?a.jsx("button",{type:"button",onClick:()=>{me(!0),O(""),v(!0)},className:"flex h-11 w-full items-center justify-center rounded-2xl border border-[#22c55e]/40 bg-[var(--sr-card)] text-[13px] font-semibold text-[#16a34a]",children:"I have a PIN — use anytime"}):null,S?a.jsx("p",{className:"text-center text-[12px] font-medium text-[#4ade80]",children:ue?"PIN verified. Your rental is In Use.":"Hormuud payment confirmed. Your rental is active."}):null,a.jsxs("div",{className:"pb-2 text-center",children:[a.jsxs("p",{className:"inline-flex items-center gap-1.5 text-[12px] font-semibold text-[#4ade80]",children:[a.jsx(Ut,{className:"h-3.5 w-3.5"}),"Secure & Safe Payment"]}),a.jsx("p",{className:"mt-1 text-[11px] text-[var(--sr-muted)]",children:"Your payment is protected and encrypted."})]})]}):a.jsxs("section",{className:"rounded-2xl border border-orange-200 bg-orange-50 px-4 py-3 text-[13px] text-orange-700 dark:border-orange-500/20 dark:bg-orange-500/10 dark:text-orange-200",children:["This power bank is currently ",a.jsx("strong",{children:o.status})," and cannot be rented right now."]})]}),g?a.jsxs("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",children:[a.jsx("button",{type:"button",className:"absolute inset-0 bg-slate-900/40 backdrop-blur-[2px] dark:bg-black/70","aria-label":"Close payment modal",onClick:Ea}),a.jsxs("div",{className:"relative z-10 mx-4 mb-6 max-h-[90vh] w-full max-w-[360px] overflow-y-auto rounded-[22px] border border-[var(--sr-border)] bg-[var(--sr-modal)] shadow-[0_24px_80px_rgba(15,23,42,0.18)] dark:shadow-[0_24px_80px_rgba(0,0,0,0.55)] sm:mb-0",children:[a.jsx("button",{type:"button",onClick:Ea,className:"absolute right-3 top-3 grid h-8 w-8 place-items-center rounded-full bg-[var(--sr-soft)] text-[var(--sr-muted)] transition hover:text-[var(--sr-text)]","aria-label":"Close",children:a.jsx(Gt,{className:"h-4 w-4"})}),a.jsx("form",{className:"px-5 pb-5 pt-6",onSubmit:dt,children:ue?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-col items-center text-center",children:[a.jsx(qa,{className:"h-10 w-10 text-[#22c55e]"}),a.jsx("p",{className:"mt-3 text-[16px] font-bold text-[var(--sr-text)]",children:"Membership PIN"}),a.jsx("p",{className:"mt-1 text-[12px] text-[var(--sr-muted)]",children:"This is free. No payment. Enter PIN only — a message will say the customer free ayuu ku qaatay."})]}),le?null:a.jsxs("label",{className:"mt-5 block",children:[a.jsx("span",{className:"mb-1.5 block text-[12px] font-semibold text-[var(--sr-text)]",children:"Phone Number"}),a.jsxs("span",{className:"flex h-12 items-center gap-2 rounded-xl border-2 border-[#16a34a] bg-[var(--sr-soft)] px-3",children:[a.jsx("span",{className:"text-[14px] font-semibold text-[var(--sr-text)]",children:"+252"}),a.jsx("input",{className:"h-full min-w-0 flex-1 bg-transparent text-[15px] text-[var(--sr-text)] outline-none",inputMode:"numeric",placeholder:"61XXXXXXX",value:R,onChange:we=>{P(we.target.value.replace(/\D/g,"").slice(0,9)),O("")},autoFocus:!0})]})]}),a.jsxs("label",{className:"mt-5 block",children:[a.jsx("span",{className:"mb-1.5 block text-[12px] font-semibold text-[var(--sr-text)]",children:"4-digit PIN"}),a.jsx("input",{className:"h-12 w-full rounded-xl border-2 border-[#16a34a] bg-[var(--sr-soft)] px-3 text-center text-[22px] font-bold tracking-[0.4em] text-[var(--sr-text)] outline-none",inputMode:"numeric",maxLength:4,value:Q,onChange:we=>{ae(we.target.value.replace(/\D/g,"").slice(0,4)),O("")},autoFocus:le})]}),oe?a.jsx("p",{className:"mt-3 rounded-xl bg-rose-50 px-3 py-2 text-center text-[12px] text-rose-600 dar
640k:bg-rose-500/10 dark:text-rose-300",children:oe}):null,a.jsx("button",{type:"submit",disabled:C,className:"mt-4 flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-[#16a34a] text-[15px] font-bold text-white shadow-[0_12px_28px_rgba(22,163,74,0.35)] disabled:opacity-80",children:C?"Checking PIN...":"Verify PIN & Use"})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-col items-center text-center",children:[a.jsx("img",{src:"/hormuud-evc.png",alt:"Hormuud Mobile Money",className:"h-14 w-14 rounded-2xl object-cover shadow-[0_8px_24px_rgba(22,163,74,0.25)]"}),a.jsx("p",{className:"mt-3 text-[15px] font-bold tracking-wide text-[var(--sr-text)]",children:"HORMUUD TELCOM"}),a.jsx("p",{className:"mt-0.5 text-[11px] font-medium tracking-[0.14em] text-[var(--sr-muted)]",children:"MOBILE MONEY"})]}),a.jsxs("label",{className:"mt-4 block",children:[a.jsx("span",{className:"mb-1.5 block text-[12px] font-semibold text-[var(--sr-text)]",children:"Full Name"}),a.jsxs("span",{className:"flex h-12 items-center gap-2 rounded-xl border-2 border-[#16a34a] bg-[var(--sr-soft)] px-3 focus-within:ring-4 focus-within:ring-[#16a34a]/15",children:[a.jsx(ka,{className:"h-4 w-4 shrink-0 text-[#16a34a]"}),a.jsx("input",{className:"h-full min-w-0 flex-1 bg-transparent text-[15px] text-[var(--sr-text)] outline-none placeholder:text-[var(--sr-muted)]",autoComplete:"name",placeholder:"Full Name",value:re,onChange:we=>{V(we.target.value),O("")},autoFocus:!0})]})]}),a.jsxs("label",{className:"mt-3 block",children:[a.jsx("span",{className:"mb-1.5 block text-[12px] font-semibold text-[var(--sr-text)]",children:"Phone Number"}),a.jsxs("span",{className:"flex h-12 items-center gap-2 rounded-xl border-2 border-[#16a34a] bg-[var(--sr-soft)] px-3 focus-within:ring-4 focus-within:ring-[#16a34a]/15",children:[a.jsx("span",{className:"text-[18px]","aria-hidden":!0,children:"🇸🇴"}),a.jsx("span",{className:"text-[14px] font-semibold text-[var(--sr-text)]",children:"+252"}),a.jsx("input",{className:"h-full min-w-0 flex-1 bg-transparent text-[15px] text-[var(--sr-text)] outline-none placeholder:text-[var(--sr-muted)]",inputMode:"numeric",autoComplete:"tel-national",placeholder:"61XXXXXXXX",value:w,onChange:we=>{D(we.target.value.replace(/[^\d]/g,"").slice(0,9)),W(""),O("")}})]})]}),B?a.jsxs("p",{className:"mt-2 flex items-center justify-center gap-1.5 text-[13px] font-semibold text-[#4ade80]",children:[a.jsx(ka,{className:"h-3.5 w-3.5"}),B]}):null,a.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-xl border border-[var(--sr-border)] bg-[var(--sr-soft)] px-3 py-2.5 text-[12px] leading-relaxed text-[var(--sr-muted)]",children:[a.jsx(Eh,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[#16a34a]"}),a.jsxs("p",{children:["You will be charged"," ",a.jsx("span",{className:"font-bold text-emerald-600 dark:text-[#4ade80]",children:pt})," for"," ",((ne==null?void 0:ne.hoursLabel)||"rental").toLowerCase()," rental. Please ensure you have sufficient balance."]})]}),oe?a.jsx("p",{className:"mt-3 rounded-xl bg-rose-50 px-3 py-2 text-center text-[12px] text-rose-600 dar
640k:bg-rose-500/10 dark:text-rose-300",children:oe}):null,a.jsxs("button",{type:"submit",disabled:C,className:"mt-4 flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-[#16a34a] text-[15px] font-bold text-white shadow-[0_12px_28px_rgba(22,163,74,0.35)] transition hover:bg-emerald-600 disabled:opacity-80",children:[a.jsx(qa,{className:"h-4 w-4"}),C?"Processing...":`Confirm & Pay ${((ne==null?void 0:ne.price)??0).toFixed(2)}`]}),a.jsxs("p",{className:"mt-3 flex items-center justify-center gap-1.5 text-[12px] font-medium text-[var(--sr-muted)]",children:[a.jsx(Dt,{className:"h-3.5 w-3.5 text-[#16a34a]"}),"Secure & Safe Payment"]})]})})]})]}):null,C&&!ue?a.jsx(jm,{phone:`+252 ${w}`,duration:(ne==null?void 0:ne.hoursLabel)||(ne==null?void 0:ne.label)||"—",amount:pt}):null,a.jsx(Rl,{hidden:g||C})]})}function z4(){return a.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18","aria-hidden":!0,children:[a.jsx("path",{fill:"#4285F4",d:"M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.874 2.684-6.615Z"}),a.jsx("path",{fill:"#34A853",d:"M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18Z"}),a.jsx("path",{fill:"#FBBC05",d:"M3.964 10.707A5.41 5.41 0 0 1 3.682 9c0-.593.102-1.17.282-1.707V4.961H.957A8.996 8.996 0 0 0 0 9c0 1.452.348 2.827.957 4.039l3.007-2.332Z"}),a.jsx("path",{fill:"#EA4335",d:"M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.163 6.656 3.58 9 3.58Z"})]})}function B4(){return a.jsx("svg",{width:"16",height:"18",viewBox:"0 0 16 18","aria-hidden":!0,fill:"currentColor",children:a.jsx("path",{d:"M13.24 9.47c-.02-2.07 1.69-3.07 1.77-3.12-.97-1.41-2.47-1.61-3-1.63-1.27-.13-2.49.75-3.14.75-.66 0-1.67-.73-2.75-.71-1.41.02-2.72.82-3.45 2.09-1.48 2.56-.38 6.35 1.05 8.43.71 1.02 1.55 2.16 2.65 2.12 1.07-.04 1.47-.68 2.76-.68 1.28 0 1.64.68 2.76.66 1.14-.02 1.86-1.03 2.55-2.06.81-1.18 1.14-2.33 1.16-2.39-.03-.01-2.21-.85-2.24-3.36ZM11.1 3.36c.58-.71.97-1.7.86-2.69-.83.03-1.85.56-2.45 1.26-.53.62-.99 1.63-.87 2.58.92.07 1.87-.47 2.46-1.15Z"})})}function O4(){return a.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18","aria-hidden":!0,children:a.jsx("path",{fill:"#1877F2",d:"M18 9a9 9 0 1 0-10.41 8.89V11.6H5.27V9h2.32V6.98c0-2.3 1.37-3.57 3.46-3.57.99 0 2.04.18 2.04.18v2.24h-1.15c-1.13 0-1.48.7-1.48 1.42V9h2.52l-.4 2.6h-2.12v6.29A9 9 0 0 0 18 9Z"})})}function U4(){var S,k;const n=Bl(),i=ha(),o=((S=i.state)==null?void 0:S.notice)||"",[c,d]=b.useState(((k=i.state)==null?void 0:k.email)||""),[m,p]=b.useState(""),[y,x]=b.useState(!0),[f,g]=b.useState(!1),[v,w]=b.useState(""),[D,C]=b.useState(!1);async function T(_){if(_.preventDefault(),w(""),!c.trim()||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){w("Please enter a valid email address.");return}if(m.length<6){w("Password must be at least 6 characters.");return}C(!0);try{const{token:U,user:A}=await a1("/api/auth/login",{email:c.trim().toLowerCase(),password:m});lw(U,A),y||(sessionStorage.setItem("somacharge_token",U),localStorage.removeItem("somacharge_token")),n("/dashboard",{replace:!0})}catch(U){w(U instanceof Error?U.message:"Sign in failed. Please try again.")}finally{C(!1)}}return a.jsxs(wm,{children:[a.jsxs("header",{children:[a.jsx("h2",{className:"text-[26px] font-bold tracking-tight text-navy-900",children:"Welcome back"}),a.jsx("p",{className:"mt-1.5 text-[14px] text-slate-500",children:"Sign in to continue to your account"})]}),o?a.jsx("p",{className:"mt-4 rounded-xl bg-emerald-50 px-3 py-2 text-[12.5px] text-emerald-700",children:o}):null,a.jsxs("form",{className:"mt-6 space-y-4",onSubmit:T,noValidate:!0,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-2 block text-[13px] font-semibold text-slate-700",children:"Email Address"}),a.jsxs("span",{className:"relative block",children:[a.jsx($s,{className:"pointer-events-none absolute left-3.5 top-1/2 h-[17px] w-[17px] -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"field-input",type:"email",autoComplete:"email",placeholder:"Enter your email",value:c,onChange:_=>d(_.target.value)})]})]}),a.jsxs("label",{className:"block",children:[a.jsxs("span",{className:"mb-2 flex items-center justify-between",children:[a.jsx("span",{className:"text-[13px] font-semibold text-slate-700",children:"Password"}),a.jsx(et,{to:"/forgot-password",className:"text-[13px] font-semibold text-electric-500 transition-colors hover:text-electric-600",children:"Forgot password?"})]}),a.jsxs("span",{className:"relative block",children:[a.jsx(qa,{className:"pointer-events-none absolute left-3.5 to
640p-1/2 h-[17px] w-[17px] -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"field-input pr-11",type:f?"text":"password",autoComplete:"current-password",placeholder:"Enter your password",value:m,onChange:_=>p(_.target.value)}),a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-md p-1 text-slate-400 transition-colors hover:text-slate-600",onClick:()=>g(_=>!_),"aria-label":f?"Hide password":"Show password",children:f?a.jsx(Hp,{className:"h-[17px] w-[17px]"}):a.jsx(qn,{className:"h-[17px] w-[17px]"})})]})]}),a.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5 select-none",children:[a.jsx("input",{className:"custom-check",type:"checkbox",checked:y,onChange:_=>x(_.target.checked)}),a.jsx("span",{className:"text-[13px] font-medium text-slate-600",children:"Remember me"})]}),v?a.jsx("p",{className:"rounded-xl bg-red-50 px-3 py-2 text-[12.5px] text-red-600",children:v}):null,a.jsx("button",{className:"cta-btn",type:"submit",disabled:D,children:D?a.jsxs(a.Fragment,{children:[a.jsx($a,{className:"h-4 w-4 animate-spin"}),"Signing in..."]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-[16px] leading-none",children:"→"}),"Sign In"]})})]}),a.jsxs("div",{className:"mt-5 flex items-center gap-3",children:[a.jsx("span",{className:"h-px flex-1 bg-slate-200"}),a.jsx("span",{className:"text-[12px] text-slate-400",children:"or continue with"}),a.jsx("span",{className:"h-px flex-1 bg-slate-200"})]}),a.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-2.5",children:[a.jsxs("button",{className:"social-btn",type:"button",children:[a.jsx(z4,{}),"Google"]}),a.jsxs("button",{className:"social-btn",type:"button",children:[a.jsx(B4,{}),"Apple"]}),a.jsxs("button",{className:"social-btn",type:"button",children:[a.jsx(O4,{}),"Facebook"]})]})]})}function H4(){const n=Bl(),[i,o]=b.useState(""),[c,d]=b.useState(""),[m,p]=b.useState(""),[y,x]=b.useState(!1),[f,g]=b.useState(!1),[v,w]=b.useState(""),[D,C]=b.useState(!1);async function T(S){S.preventDefault(),w(""),C(!1);const k=i.trim(),_=c.trim().toLowerCase();if(k.length<2){C(!0),w("Please enter your full name.");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_)){C(!0),w("Please enter a valid email address.");return}if(m.length<6){C(!0),w("Password must be at least 6 characters.");return}g(!0);try{await a1("/api/auth/register",{name:k,email:_,password:m}),m1({name:k,email:_,role:"staff"}),n("/signin",{replace:!0,state:{email:_,notice:"Account created. Sign in with your email and password."}})}catch(U){C(!0),w(U instanceof Error?U.message:"Account creation failed. Please try again.")}finally{g(!1)}}return a.jsxs(wm,{children:[a.jsxs("header",{children:[a.jsx("h2",{className:"text-[26px] font-bold tracking-tight text-navy-900",children:"Create account"}),a.jsx("p",{className:"mt-1.5 text-[14px] text-slate-500",children:"Start renting power banks in seconds"})]}),a.jsxs("form",{className:"mt-6 space-y-4",onSubmit:T,children:[a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-2 block text-[13px] font-semibold text-slate-700",children:"Full name"}),a.jsxs("span",{className:"relative block",children:[a.jsx(ka,{className:"pointer-events-none absolute left-3.5 top-1/2 h-[17px] w-[17px] -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"field-input",type:"text",autoComplete:"name",placeholder:"Enter your name",value:i,onChange:S=>o(S.target.value),required:!0})]})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-2 block text-[13px] font-semibold text-slate-700",children:"Email Address"}),a.jsxs("span",{className:"relative block",children:[a.jsx($s,{className:"pointer-events-none absolute left-3.5 top-1/2 h-[17px] w-[17px] -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"field-input",type:"email",autoComplete:"email",placeholder:"Enter your email",value:c,onChange:S=>d(S.target.value),required:!0})]})]}),a.jsxs("label",{className:"block",children:[a.jsx("span",{className:"mb-2 block text-[13px] font-semibold text-slate-700",children:"Password"}),a.jsxs("span",{className:"relative block",children:[a.jsx(qa,{className:"pointer-events-none absolute left-3.5 to
640p-1/2 h-[17px] w-[17px] -translate-y-1/2 text-slate-400"}),a.jsx("input",{className:"field-input pr-11",type:y?"text":"password",autoComplete:"new-password",placeholder:"Create a password",value:m,onChange:S=>p(S.target.value),required:!0,minLength:6}),a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-md p-1 text-slate-400 transition-colors hover:text-slate-600",onClick:()=>x(S=>!S),"aria-label":y?"Hide password":"Show password",children:y?a.jsx(Hp,{className:"h-[17px] w-[17px]"}):a.jsx(qn,{className:"h-[17px] w-[17px]"})})]})]}),v?a.jsx("p",{className:`rounded-xl px-3 py-2 text-[12.5px] ${D?"bg-red-50 text-red-600":"bg-blue-50 text-electric-600"}`,children:v}):null,a.jsx("button",{className:"cta-btn",type:"submit",disabled:f,children:f?a.jsxs(a.Fragment,{children:[a.jsx($a,{className:"h-4 w-4 animate-spin"}),"Creating account..."]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-[16px] leading-none",children:"→"}),"Create account"]})})]}),a.jsxs("p",{className:"mt-6 text-center text-[13px] text-slate-500",children:["Already have an account?"," ",a.jsx(et,{to:"/signin",className:"font-semibold text-electric-500 transition-colors hover:text-electric-600",children:"Sign in"})]})]})}function F4(){const[n,i]=b.useState(()=>Od());return b.useEffect(()=>Wp(()=>i(Od())),[]),a.jsx(ow,{children:a.jsxs(ny,{children:[a.jsx(Vt,{path:"/",element:a.jsx(Pj,{})}),a.jsx(Vt,{path:"/about",element:a.jsx(Lj,{})}),a.jsx(Vt,{path:"/services",element:a.jsx(mw,{})}),a.jsx(Vt,{path:"/portfolio",element:a.jsx(tw,{})}),a.jsx(Vt,{path:"/stations",element:a.jsx(fw,{})}),a.jsx(Vt,{path:"/contact",element:a.jsx(zj,{})}),a.jsx(Vt,{path:"/signin",element:n?a.jsx(_d,{to:"/dashboard",replace:!0}):a.jsx(U4,{})}),a.jsx(Vt,{path:"/signup",element:a.jsx(H4,{})}),a.jsx(Vt,{path:"/forgot-password",element:a.jsx(r4,{})}),a.jsx(Vt,{path:"/home",element:a.jsx(Sd,{})}),a.jsx(Vt,{path:"/membership",element:a.jsx(v4,{})}),a.jsx(Vt,{path:"/profile",element:a.jsx(j4,{})}),a.jsx(Vt,{path:"/powerbank/:id",element:a.jsx(Sd,{})}),a.jsx(Vt,{path:"/q/:id",element:a.jsx(Sd,{})}),a.jsx(Vt,{path:"/dashboard",element:a.jsx(sw,{children:a.jsx(l4,{})})}),a.jsx(Vt,{path:"*",element:a.jsx(_d,{to:"/",replace:!0})})]})})}Ld(Lo());n2.createRoot(document.getElementById("root")).render(a.jsx(b.StrictMode,{children:a.jsx(Ay,{children:a.jsx(F4,{})})}));

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.