@neuctra/ui 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +67 -112
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +2396 -4316
- package/dist/types/index.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react");var Ne={exports:{}},Ee={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ke;function vt(){if(Ke)return Ee;Ke=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(i,c,n){var l=null;if(n!==void 0&&(l=""+n),c.key!==void 0&&(l=""+c.key),"key"in c){n={};for(var d in c)d!=="key"&&(n[d]=c[d])}else n=c;return c=n.ref,{$$typeof:t,type:i,key:l,ref:c!==void 0?c:null,props:n}}return Ee.Fragment=r,Ee.jsx=a,Ee.jsxs=a,Ee}var _e={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Ze;function wt(){return Ze||(Ze=1,process.env.NODE_ENV!=="production"&&function(){function t(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===F?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case m:return"Fragment";case g:return"Profiler";case C:return"StrictMode";case _:return"Suspense";case A:return"SuspenseList";case X:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case w:return"Portal";case E:return(o.displayName||"Context")+".Provider";case y:return(o._context.displayName||"Context")+".Consumer";case T:var z=o.render;return o=o.displayName,o||(o=z.displayName||z.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case R:return z=o.displayName||null,z!==null?z:t(o.type)||"Memo";case M:z=o._payload,o=o._init;try{return t(o(z))}catch{}}return null}function r(o){return""+o}function a(o){try{r(o);var z=!1}catch{z=!0}if(z){z=console;var L=z.error,q=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return L.call(z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",q),r(o)}}function i(o){if(o===m)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===M)return"<...>";try{var z=t(o);return z?"<"+z+">":"<...>"}catch{return"<...>"}}function c(){var o=Y.A;return o===null?null:o.getOwner()}function n(){return Error("react-stack-top-frame")}function l(o){if($.call(o,"key")){var z=Object.getOwnPropertyDescriptor(o,"key").get;if(z&&z.isReactWarning)return!1}return o.key!==void 0}function d(o,z){function L(){k||(k=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z))}L.isReactWarning=!0,Object.defineProperty(o,"key",{get:L,configurable:!0})}function S(){var o=t(this.type);return h[o]||(h[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function j(o,z,L,q,K,D,G,ne){return L=D.ref,o={$$typeof:x,type:o,key:z,props:D,_owner:K},(L!==void 0?L:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:S}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:G}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ne}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function v(o,z,L,q,K,D,G,ne){var u=z.children;if(u!==void 0)if(q)if(N(u)){for(q=0;q<u.length;q++)f(u[q]);Object.freeze&&Object.freeze(u)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(u);if($.call(z,"key")){u=t(o);var O=Object.keys(z).filter(function(B){return B!=="key"});q=0<O.length?"{key: someKey, "+O.join(": ..., ")+": ...}":"{key: someKey}",U[u+q]||(O=0<O.length?"{"+O.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
22
|
+
<%s key={someKey} {...props} />`,q,u,O,u),U[u+q]=!0)}if(u=null,L!==void 0&&(a(L),u=""+L),l(z)&&(a(z.key),u=""+z.key),"key"in z){L={};for(var p in z)p!=="key"&&(L[p]=z[p])}else L=z;return u&&d(L,typeof o=="function"?o.displayName||o.name||"Unknown":o),j(o,u,D,K,c(),L,G,ne)}function f(o){typeof o=="object"&&o!==null&&o.$$typeof===x&&o._store&&(o._store.validated=1)}var b=s,x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),Y=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,N=Array.isArray,J=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(o){return o()}};var k,h={},I=b.react_stack_bottom_frame.bind(b,n)(),V=J(i(n)),U={};_e.Fragment=m,_e.jsx=function(o,z,L,q,K){var D=1e4>Y.recentlyCreatedOwnerStacks++;return v(o,z,L,!1,q,K,D?Error("react-stack-top-frame"):I,D?J(i(o)):V)},_e.jsxs=function(o,z,L,q,K){var D=1e4>Y.recentlyCreatedOwnerStacks++;return v(o,z,L,!0,q,K,D?Error("react-stack-top-frame"):I,D?J(i(o)):V)}}()),_e}var Qe;function jt(){return Qe||(Qe=1,process.env.NODE_ENV==="production"?Ne.exports=vt():Ne.exports=wt()),Ne.exports}var e=jt();const kt=({as:t="p",children:r,className:a="",href:i,target:c,rel:n,color:l="#333",bgColor:d,fontSize:S="16px",fontWeight:j="normal",textAlign:v="left",textTransform:f="none",lineHeight:b="normal",letterSpacing:x="normal",maxWidth:w,padding:m,margin:C,borderRadius:g,boxShadow:y,shadowColor:E="rgba(0,0,0,0.1)",wordBreak:T="normal",italic:_=!1,bold:A=!1,underline:R=!1,strikethrough:M=!1,selectable:X=!0,truncate:F=!1,hoverColor:Y,hoverBgColor:$,hoverTextDecoration:N,activeColor:J,activeBgColor:k,transitionDuration:h="0.25s",onClick:I})=>{const V=s.useMemo(()=>{const D=[];return R&&D.push("underline"),M&&D.push("line-through"),D.join(" ")||"none"},[R,M]),U={color:l,backgroundColor:d||"transparent",fontSize:S,fontWeight:A?"bold":j,textAlign:v,textTransform:f,lineHeight:b,letterSpacing:x,maxWidth:w,padding:m,margin:C,borderRadius:g,textDecoration:V,fontStyle:_?"italic":"normal",wordBreak:T,boxShadow:y||(E?`0 1px 4px ${E}`:void 0),cursor:I||i?"pointer":"default",userSelect:X?"text":"none",transition:`all ${h} ease-in-out`,overflow:F?"hidden":void 0,whiteSpace:F?"nowrap":void 0,textOverflow:F?"ellipsis":void 0},K={className:a,style:U,onClick:I,onMouseEnter:D=>{const G=D.currentTarget;Y&&(G.style.color=Y),$&&(G.style.backgroundColor=$),N&&(G.style.textDecoration=N)},onMouseLeave:D=>{const G=D.currentTarget;G.style.color=l,G.style.backgroundColor=d||"transparent",G.style.textDecoration=V},onMouseDown:D=>{const G=D.currentTarget;J&&(G.style.color=J),k&&(G.style.backgroundColor=k)},onMouseUp:D=>{const G=D.currentTarget;G.style.color=Y||l,G.style.backgroundColor=$||d||"transparent"}};return t==="a"||i?e.jsx("a",{...K,href:i,target:c,rel:n||(c==="_blank"?"noopener noreferrer":void 0),children:r}):e.jsx(t,{...K,children:r})},Ue=({src:t,alt:r="Image",width:a="100%",height:i="auto",borderRadius:c="8px",borderColor:n="transparent",borderStyle:l="solid",borderWidth:d="0px",shadow:S=!1,boxShadow:j,opacity:v=1,objectFit:f="cover",overlayText:b,overlayColor:x="rgba(0, 0, 0, 0.5)",svgIcon:w,responsive:m=!1,padding:C,margin:g,lazyLoad:y=!1,hoverOpacity:E,hoverShadow:T=!1,hoverScale:_,hoverRotate:A,transitionDuration:R="0.3s",overflow:M="hidden",className:X,style:F,onClick:Y})=>{const $={width:m?"100%":a,height:m?"100%":i,borderRadius:c,border:`${d} ${l} ${n}`,objectFit:f,opacity:v,boxShadow:S?j||"0 4px 12px rgba(0,0,0,0.15)":"none",transition:`all ${R} ease`,display:"block"},N=h=>{h.currentTarget.style.opacity=E!==void 0?E.toString():$.opacity?.toString()||"1",h.currentTarget.style.boxShadow=T?"0 8px 20px rgba(0,0,0,0.3)":$.boxShadow?.toString()||"none",h.currentTarget.style.transform=`scale(${_||1}) rotate(${A||0}deg)`},J=h=>{h.currentTarget.style.opacity=$.opacity?.toString()||"1",h.currentTarget.style.boxShadow=$.boxShadow?.toString()||"none",h.currentTarget.style.transform="scale(1) rotate(0deg)"},k=(()=>{switch(M){case"x":return{overflowX:"hidden"};case"y":return{overflowY:"hidden"};default:return{overflow:M}}})();return e.jsxs("div",{role:"img","aria-label":r,onClick:Y,className:X,style:{width:m?"100%":a,height:m?"auto":i,padding:C,margin:g,position:"relative",cursor:Y?"pointer":"default",display:"inline-block",transition:`all ${R} ease`,...k,...F},children:[w?e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:w}):e.jsx("img",{src:t,alt:r,loading:y?"lazy":"eager",style:$,onMouseEnter:N,onMouseLeave:J}),b&&e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:x,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",fontSize:"1.25rem",textAlign:"center",padding:"1rem",boxSizing:"border-box"},children:b})]})},St=({children:t,type:r="button",onClick:a,iconBefore:i,iconAfter:c,className:n="",style:l,fullWidth:d=!1,disabled:S=!1,loading:j=!1,loadingText:v="Loading...",paddingHorizontal:f=30,paddingVertical:b=8,fontSize:x="16px",fontWeight:w=400,borderRadius:m=6,backgroundColor:C="#02b314",textColor:g="white",borderColor:y="transparent",hoverBgColor:E="transparent",hoverTextColor:T="black",hoverBorderColor:_,boxShadow:A="0 1px 2px rgba(0, 0, 0, 0.05)"})=>{const[R,M]=s.useState(!1),X=R&&!S&&T||g,F=R&&!S&&_||y,Y=R&&!S?E:C,$={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:`${b}px ${f}px`,fontSize:x,fontWeight:w,borderRadius:`${m}px`,width:d?"100%":"auto",color:X,border:`1px solid ${F}`,backgroundColor:Y,boxShadow:A,cursor:S?"not-allowed":"pointer",opacity:S?.6:1,transition:"all 0.2s ease-in-out",gap:"8px",...l};return e.jsxs("button",{type:r,className:n,style:$,onClick:!S&&!j?a:void 0,disabled:S,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[j?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{width:"18px",height:"18px",border:"2px solid currentColor",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),e.jsx("span",{children:v})]}):e.jsxs(e.Fragment,{children:[i&&e.jsx("span",{children:i}),e.jsx("span",{children:t}),c&&e.jsx("span",{children:c})]}),e.jsx("style",{children:`
|
|
23
23
|
@keyframes spin {
|
|
24
24
|
to { transform: rotate(360deg); }
|
|
25
25
|
}
|
|
@@ -28,227 +28,182 @@ React keys must be passed directly to JSX without using spread:
|
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const Tt=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rt=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,a,i)=>i?i.toUpperCase():a.toLowerCase()),et=t=>{const r=Rt(t);return r.charAt(0).toUpperCase()+r.slice(1)},ot=(...t)=>t.filter((r,a,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===a).join(" ").trim(),$t=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
32
32
|
* @license lucide-react v0.536.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var
|
|
36
|
+
*/var zt={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"};/**
|
|
37
37
|
* @license lucide-react v0.536.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const Mt=s.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:c="",children:n,iconNode:l,...d},S)=>s.createElement("svg",{ref:S,...zt,width:r,height:r,stroke:t,strokeWidth:i?Number(a)*24/Number(r):a,className:ot("lucide",c),...!n&&!$t(d)&&{"aria-hidden":"true"},...d},[...l.map(([j,v])=>s.createElement(j,v)),...Array.isArray(n)?n:[n]]));/**
|
|
42
42
|
* @license lucide-react v0.536.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const te=(t,r)=>{const a=s.forwardRef(({className:i,...c},n)=>s.createElement(Mt,{ref:n,iconNode:r,className:ot(`lucide-${Tt(et(t))}`,`lucide-${t}`,i),...c}));return a.displayName=et(t),a};/**
|
|
47
47
|
* @license lucide-react v0.536.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const It=[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],Ct=te("captions",It);/**
|
|
52
52
|
* @license lucide-react v0.536.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const Et=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],it=te("chevron-left",Et);/**
|
|
57
57
|
* @license lucide-react v0.536.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const _t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],at=te("chevron-right",_t);/**
|
|
62
62
|
* @license lucide-react v0.536.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const Lt=[["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"}]],Pt=te("circle-alert",Lt);/**
|
|
67
67
|
* @license lucide-react v0.536.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const At=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Nt=te("circle-check-big",At);/**
|
|
72
72
|
* @license lucide-react v0.536.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const Bt=[["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"}]],Ot=te("download",Bt);/**
|
|
77
77
|
* @license lucide-react v0.536.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
81
|
+
*/const Ft=[["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"}]],Wt=te("eye-off",Ft);/**
|
|
82
82
|
* @license lucide-react v0.536.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const Dt=[["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"}]],Yt=te("eye",Dt);/**
|
|
87
87
|
* @license lucide-react v0.536.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const Vt=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Ht=te("heart",Vt);/**
|
|
92
92
|
* @license lucide-react v0.536.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const Xt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ut=te("info",Xt);/**
|
|
97
97
|
* @license lucide-react v0.536.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const qt=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Gt=te("loader",qt);/**
|
|
102
102
|
* @license lucide-react v0.536.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const Jt=[["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"}]],lt=te("maximize",Jt);/**
|
|
107
107
|
* @license lucide-react v0.536.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const Kt=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],ct=te("minimize",Kt);/**
|
|
112
112
|
* @license lucide-react v0.536.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const Zt=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],tt=te("music",Zt);/**
|
|
117
117
|
* @license lucide-react v0.536.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const Qt=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Be=te("pause",Qt);/**
|
|
122
122
|
* @license lucide-react v0.536.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const er=[["path",{d:"M2 10h6V4",key:"zwrco"}],["path",{d:"m2 4 6 6",key:"ug085t"}],["path",{d:"M21 10V7a2 2 0 0 0-2-2h-7",key:"git5jr"}],["path",{d:"M3 14v2a2 2 0 0 0 2 2h3",key:"1f7fh3"}],["rect",{x:"12",y:"14",width:"10",height:"7",rx:"1",key:"1wjs3o"}]],tr=te("picture-in-picture",er);/**
|
|
127
127
|
* @license lucide-react v0.536.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
131
|
+
*/const rr=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Le=te("play",rr);/**
|
|
132
132
|
* @license lucide-react v0.536.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
136
|
+
*/const nr=[["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"}]],qe=te("rotate-ccw",nr);/**
|
|
137
137
|
* @license lucide-react v0.536.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const sr=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],or=te("settings",sr);/**
|
|
142
142
|
* @license lucide-react v0.536.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const ir=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],ar=te("share-2",ir);/**
|
|
147
147
|
* @license lucide-react v0.536.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const lr=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],cr=te("shuffle",lr);/**
|
|
152
152
|
* @license lucide-react v0.536.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const dr=[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",key:"15892j"}],["path",{d:"M3 20V4",key:"1ptbpl"}]],Oe=te("skip-back",dr);/**
|
|
157
157
|
* @license lucide-react v0.536.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const ur=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],Fe=te("skip-forward",ur);/**
|
|
162
162
|
* @license lucide-react v0.536.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const
|
|
166
|
+
*/const pr=[["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"}]],fr=te("triangle-alert",pr);/**
|
|
167
167
|
* @license lucide-react v0.536.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
171
|
+
*/const xr=[["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"}]],hr=te("user",xr);/**
|
|
172
172
|
* @license lucide-react v0.536.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
176
|
+
*/const gr=[["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"}]],br=te("volume-1",gr);/**
|
|
177
177
|
* @license lucide-react v0.536.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
181
|
+
*/const yr=[["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"}]],Ge=te("volume-2",yr);/**
|
|
182
182
|
* @license lucide-react v0.536.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
186
|
+
*/const mr=[["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"}]],We=te("volume-x",mr);/**
|
|
187
187
|
* @license lucide-react v0.536.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const
|
|
192
|
-
* @license lucide-react v0.536.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const Ln=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],_n=re("shuffle",Ln);/**
|
|
197
|
-
* @license lucide-react v0.536.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const An=[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",key:"15892j"}],["path",{d:"M3 20V4",key:"1ptbpl"}]],ut=re("skip-back",An);/**
|
|
202
|
-
* @license lucide-react v0.536.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const Pn=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],pt=re("skip-forward",Pn);/**
|
|
207
|
-
* @license lucide-react v0.536.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const Nn=[["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"}]],Bn=re("triangle-alert",Nn);/**
|
|
212
|
-
* @license lucide-react v0.536.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const Fn=[["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"}]],Wn=re("user",Fn);/**
|
|
217
|
-
* @license lucide-react v0.536.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const Dn=[["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"}]],On=re("volume-1",Dn);/**
|
|
222
|
-
* @license lucide-react v0.536.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const Yn=[["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"}]],xt=re("volume-2",Yn);/**
|
|
227
|
-
* @license lucide-react v0.536.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const Vn=[["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"}]],st=re("volume-x",Vn);/**
|
|
232
|
-
* @license lucide-react v0.536.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const Un=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],at=re("x",Un),Xn=n.forwardRef(({type:t="text",placeholder:s="",label:c,value:i,defaultValue:u,onChange:a,name:d="",disabled:p=!1,readOnly:z=!1,required:C=!1,error:j,success:h=!1,autoFocus:m=!1,iconLeft:g,iconRight:k,borderColor:w="#ccc",focusBorderColor:_="#2563eb",hoverBorderColor:y="#4b5563",backgroundColor:v="#ffffff",textColor:A="#111827",errorColor:M="#dc2626",successColor:B="#16a34a",labelColor:Y="#374151",size:R="md",radius:E="6px",fontSize:J="14px",rows:H=4,cols:Q,maxLength:$,resize:F=!0,showCharacterCount:ne=!0,className:S,style:b},L)=>{const G=n.useRef(null),[K,l]=n.useState(u||""),[I,P]=n.useState(!1);n.useImperativeHandle(L,()=>G.current);const ee=x=>{$&&x.target.value.length>$||(l(x.target.value),a&&a(d,x.target.value))},oe=()=>{switch(R){case"sm":return"6px 12px";case"lg":return"12px 20px";default:return"10px 16px"}},q=()=>{switch(R){case"sm":return"13px";case"lg":return"16px";default:return J}},Z=j?M:h?B:w,de={width:"100%",padding:oe(),paddingLeft:g?"40px":oe().split(" ")[1],paddingRight:k||t==="password"?"40px":oe().split(" ")[1],border:`1px solid ${Z}`,borderRadius:E,backgroundColor:v,color:A,fontSize:q(),outline:"none",resize:t==="textarea"&&!F?"none":void 0,...b};return e.jsxs("div",{style:{width:"100%",fontFamily:"sans-serif"},className:S,children:[c&&e.jsxs("label",{htmlFor:d,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:Y},children:[c," ",C&&e.jsx("span",{style:{color:M},children:"*"})]}),e.jsxs("div",{style:{position:"relative",width:"100%"},children:[g&&e.jsx("span",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"#6b7280"},children:g}),t==="textarea"?e.jsx("textarea",{ref:G,name:d,value:i??K,onChange:ee,placeholder:s,rows:H,cols:Q,maxLength:$,disabled:p,readOnly:z,autoFocus:m,style:de,onFocus:x=>{x.currentTarget.style.borderColor=_},onBlur:x=>{x.currentTarget.style.borderColor=Z},onMouseEnter:x=>{x.currentTarget.style.borderColor=y},onMouseLeave:x=>{x.currentTarget.style.borderColor=Z}}):e.jsx("input",{ref:G,id:d,name:d,type:t==="password"?I?"text":"password":t,value:i??K,onChange:ee,placeholder:s,disabled:p,readOnly:z,autoFocus:m,style:de,onFocus:x=>{x.currentTarget.style.borderColor=_},onBlur:x=>{x.currentTarget.style.borderColor=Z},onMouseEnter:x=>{x.currentTarget.style.borderColor=y},onMouseLeave:x=>{x.currentTarget.style.borderColor=Z}}),t==="password"&&e.jsx("button",{type:"button",onClick:()=>P(!I),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",padding:0},children:I?e.jsx(nn,{size:18}):e.jsx(St,{size:18})}),k&&t!=="password"&&e.jsx("span",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"#6b7280"},children:k})]}),t==="textarea"&&ne&&$&&e.jsxs("div",{style:{textAlign:"right",fontSize:"12px",color:"#6b7280",marginTop:"4px"},children:[(i??K).length,"/",$]}),j&&e.jsx("p",{style:{color:M,fontSize:"12px",marginTop:"4px",lineHeight:"1.3"},children:j})]})}),Hn=({title:t,titleIcon:s,items:c,type:i="unordered",bulletColor:u="#2563eb",textColor:a="#111827",backgroundColor:d="#fff",borderColor:p="#e5e7eb",fontSize:z="15px",fontWeight:C=500,borderRadius:j="12px",padding:h="16px",spacing:m="12px",className:g,style:k})=>{const w=i==="ordered",_=i==="inline",y={backgroundColor:d,borderColor:p,color:a,borderWidth:p?"1px":"0px",borderStyle:"solid",borderRadius:j,padding:h,...k},v=_?{display:"flex",gap:m,paddingLeft:0,listStyleType:"none",margin:0}:{listStyleType:w?"decimal":"none",paddingLeft:w?"20px":"0",margin:0},A=w?"ol":"ul";return e.jsxs("div",{className:g,style:y,children:[t&&e.jsxs("div",{style:{display:"flex",alignItems:"center",fontSize:"17px",fontWeight:600,marginBottom:"10px",gap:"8px"},children:[s&&e.jsx("span",{style:{fontSize:"18px"},children:s}),e.jsx("span",{children:t})]}),e.jsx(A,{style:v,children:c.map((M,B)=>e.jsx(Zt,{...M,bulletColor:u,textColor:a,fontSize:z,fontWeight:C,spacing:m,isInline:_},B))})]})},Zt=({text:t,icon:s,onClick:c,subItems:i,bulletColor:u,textColor:a,fontSize:d,fontWeight:p,spacing:z,isInline:C})=>{const j={display:"flex",flexDirection:"column",gap:"6px",marginBottom:C?"0":z},h={display:"flex",alignItems:"center",gap:"8px",fontSize:d,fontWeight:p,color:a,cursor:c?"pointer":"default"},m={width:"8px",height:"8px",backgroundColor:u,borderRadius:"50%",flexShrink:0},g={listStyleType:"disc",paddingLeft:"20px",margin:0};return e.jsxs("li",{style:j,children:[e.jsxs("div",{style:h,onClick:c,children:[s?e.jsx("span",{style:{fontSize:"16px",color:a},children:s}):!C&&e.jsx("span",{style:m}),e.jsx("span",{children:t})]}),i&&i.length>0&&e.jsx("ul",{style:g,children:i.map((k,w)=>e.jsx(Zt,{...k,bulletColor:u,textColor:a,fontSize:d,fontWeight:p,spacing:z,isInline:!1},w))})]})},$t=({tabs:t,defaultActive:s=0,tabPosition:c,activeTabClassName:i="",inactiveTabClassName:u="",tabContainerClassName:a="",contentContainerClassName:d="",className:p="",activeTabStyle:z,inactiveTabStyle:C,tabContainerStyle:j,contentContainerStyle:h,style:m,tabsWidth:g="240px",tabGap:k=8,tabPadding:w="12px 16px",tabBorderRadius:_=8,primaryColor:y="#2563eb",textColor:v="#374151",backgroundColor:A="#ffffff",hoverTextColor:M="#1e40af",disabledColor:B="#d1d5db",responsiveBreakpoint:Y=768,showDrawerLabel:R="Select Tab",drawerIcon:E="☰",transitionDuration:J=200,onTabChange:H,role:Q="tablist",ariaOrientation:$="horizontal"})=>{const[F,ne]=n.useState(s),[S,b]=n.useState(null),[L,G]=n.useState(!1),[K,l]=n.useState(!1);n.useEffect(()=>{const X=()=>{G(window.innerWidth<=Y)};return X(),window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[Y]),n.useEffect(()=>{s>=0&&s<t.length&&ne(s)},[s,t.length]);const I=X=>{t[X].disabled||(ne(X),H?.(X))},P=c==="left"||c==="right",oe={display:"flex",flexDirection:L?"column":P?c==="left"?"row":"row-reverse":"column",width:"100%",height:"100%",backgroundColor:A,...m},q={width:L?"100%":P?g:"100%",display:"flex",flexDirection:L||P?"column":"row",gap:k,padding:L?"0":"8px",boxSizing:"border-box",overflowX:L?"hidden":"visible",...j},Z={flexGrow:1,padding:L?"16px":"24px",background:"#f9fafb",boxSizing:"border-box",minWidth:0,width:L?"100%":P?`calc(100% - ${g})`:"100%",...h},de={cursor:"pointer",display:"flex",alignItems:"center",gap:8,padding:w,borderRadius:_,border:"none",backgroundColor:"transparent",fontWeight:500,transition:`all ${J}ms ease`,width:L||P?"100%":"auto",marginBottom:L||P?k:0,marginRight:!P&&!L?k:0,justifyContent:"flex-start",textAlign:"left",fontSize:L?"14px":"inherit"},x={backgroundColor:y,color:"#fff",fontWeight:600,boxShadow:`0 2px 10px ${y}33`,...z},V={backgroundColor:"transparent",color:v,...C},f={backgroundColor:`${y}11`,color:M},W={cursor:"not-allowed",color:B,opacity:.7},ae={...de,...x,justifyContent:"space-between",width:"100%",marginBottom:k,fontSize:"16px"};return e.jsxs("div",{className:`react-tabs ${p}`,style:oe,role:Q,"aria-orientation":L||P?"vertical":$,children:[e.jsx("style",{children:`
|
|
191
|
+
*/const vr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],De=te("x",vr),wr=s.forwardRef(({type:t="text",placeholder:r="",label:a,value:i,defaultValue:c,onChange:n,name:l="",disabled:d=!1,readOnly:S=!1,required:j=!1,error:v,success:f=!1,autoFocus:b=!1,iconLeft:x,iconRight:w,borderColor:m="#ccc",focusBorderColor:C="#2563eb",hoverBorderColor:g="#4b5563",backgroundColor:y="#ffffff",textColor:E="#111827",errorColor:T="#dc2626",successColor:_="#16a34a",labelColor:A="#374151",size:R="md",radius:M="6px",fontSize:X="14px",rows:F=4,cols:Y,maxLength:$,resize:N=!0,showCharacterCount:J=!0,className:k,style:h},I)=>{const V=s.useRef(null),[U,o]=s.useState(c||""),[z,L]=s.useState(!1);s.useImperativeHandle(I,()=>V.current);const q=u=>{$&&u.target.value.length>$||(o(u.target.value),n&&n(l,u.target.value))},K=()=>{switch(R){case"sm":return"6px 12px";case"lg":return"12px 20px";default:return"10px 16px"}},D=()=>{switch(R){case"sm":return"13px";case"lg":return"16px";default:return X}},G=v?T:f?_:m,ne={width:"100%",padding:K(),paddingLeft:x?"40px":K().split(" ")[1],paddingRight:w||t==="password"?"40px":K().split(" ")[1],border:`1px solid ${G}`,borderRadius:M,backgroundColor:y,color:E,fontSize:D(),outline:"none",resize:t==="textarea"&&!N?"none":void 0,...h};return e.jsxs("div",{style:{width:"100%",fontFamily:"sans-serif"},className:k,children:[a&&e.jsxs("label",{htmlFor:l,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:A},children:[a," ",j&&e.jsx("span",{style:{color:T},children:"*"})]}),e.jsxs("div",{style:{position:"relative",width:"100%"},children:[x&&e.jsx("span",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"#6b7280"},children:x}),t==="textarea"?e.jsx("textarea",{ref:V,name:l,value:i??U,onChange:q,placeholder:r,rows:F,cols:Y,maxLength:$,disabled:d,readOnly:S,autoFocus:b,style:ne,onFocus:u=>{u.currentTarget.style.borderColor=C},onBlur:u=>{u.currentTarget.style.borderColor=G},onMouseEnter:u=>{u.currentTarget.style.borderColor=g},onMouseLeave:u=>{u.currentTarget.style.borderColor=G}}):e.jsx("input",{ref:V,id:l,name:l,type:t==="password"?z?"text":"password":t,value:i??U,onChange:q,placeholder:r,disabled:d,readOnly:S,autoFocus:b,style:ne,onFocus:u=>{u.currentTarget.style.borderColor=C},onBlur:u=>{u.currentTarget.style.borderColor=G},onMouseEnter:u=>{u.currentTarget.style.borderColor=g},onMouseLeave:u=>{u.currentTarget.style.borderColor=G}}),t==="password"&&e.jsx("button",{type:"button",onClick:()=>L(!z),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",padding:0},children:z?e.jsx(Wt,{size:18}):e.jsx(Yt,{size:18})}),w&&t!=="password"&&e.jsx("span",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"#6b7280"},children:w})]}),t==="textarea"&&J&&$&&e.jsxs("div",{style:{textAlign:"right",fontSize:"12px",color:"#6b7280",marginTop:"4px"},children:[(i??U).length,"/",$]}),v&&e.jsx("p",{style:{color:T,fontSize:"12px",marginTop:"4px",lineHeight:"1.3"},children:v})]})}),jr=({title:t,titleIcon:r,items:a,type:i="unordered",bulletColor:c="#2563eb",textColor:n="#111827",backgroundColor:l="#fff",borderColor:d="#e5e7eb",fontSize:S="15px",fontWeight:j=500,borderRadius:v="12px",padding:f="16px",spacing:b="12px",className:x,style:w})=>{const m=i==="ordered",C=i==="inline",g={backgroundColor:l,borderColor:d,color:n,borderWidth:d?"1px":"0px",borderStyle:"solid",borderRadius:v,padding:f,...w},y=C?{display:"flex",gap:b,paddingLeft:0,listStyleType:"none",margin:0}:{listStyleType:m?"decimal":"none",paddingLeft:m?"20px":"0",margin:0},E=m?"ol":"ul";return e.jsxs("div",{className:x,style:g,children:[t&&e.jsxs("div",{style:{display:"flex",alignItems:"center",fontSize:"17px",fontWeight:600,marginBottom:"10px",gap:"8px"},children:[r&&e.jsx("span",{style:{fontSize:"18px"},children:r}),e.jsx("span",{children:t})]}),e.jsx(E,{style:y,children:a.map((T,_)=>e.jsx(dt,{...T,bulletColor:c,textColor:n,fontSize:S,fontWeight:j,spacing:b,isInline:C},_))})]})},dt=({text:t,icon:r,onClick:a,subItems:i,bulletColor:c,textColor:n,fontSize:l,fontWeight:d,spacing:S,isInline:j})=>{const v={display:"flex",flexDirection:"column",gap:"6px",marginBottom:j?"0":S},f={display:"flex",alignItems:"center",gap:"8px",fontSize:l,fontWeight:d,color:n,cursor:a?"pointer":"default"},b={width:"8px",height:"8px",backgroundColor:c,borderRadius:"50%",flexShrink:0},x={listStyleType:"disc",paddingLeft:"20px",margin:0};return e.jsxs("li",{style:v,children:[e.jsxs("div",{style:f,onClick:a,children:[r?e.jsx("span",{style:{fontSize:"16px",color:n},children:r}):!j&&e.jsx("span",{style:b}),e.jsx("span",{children:t})]}),i&&i.length>0&&e.jsx("ul",{style:x,children:i.map((w,m)=>e.jsx(dt,{...w,bulletColor:c,textColor:n,fontSize:l,fontWeight:d,spacing:S,isInline:!1},m))})]})},Je=({tabs:t,defaultActive:r=0,tabPosition:a,activeTabClassName:i="",inactiveTabClassName:c="",tabContainerClassName:n="",contentContainerClassName:l="",className:d="",activeTabStyle:S,inactiveTabStyle:j,tabContainerStyle:v,contentContainerStyle:f,style:b,tabsWidth:x="240px",tabGap:w=8,tabPadding:m="12px 16px",tabBorderRadius:C=8,primaryColor:g="#2563eb",textColor:y="#374151",backgroundColor:E="#ffffff",hoverTextColor:T="#1e40af",disabledColor:_="#d1d5db",responsiveBreakpoint:A=768,showDrawerLabel:R="Select Tab",drawerIcon:M="☰",transitionDuration:X=200,onTabChange:F,role:Y="tablist",ariaOrientation:$="horizontal"})=>{const[N,J]=s.useState(r),[k,h]=s.useState(null),[I,V]=s.useState(!1),[U,o]=s.useState(!1);s.useEffect(()=>{if(typeof window>"u")return;const W=()=>{V(window.innerWidth<=A)};return W(),window.addEventListener("resize",W),()=>window.removeEventListener("resize",W)},[A]),s.useEffect(()=>{r>=0&&r<t.length&&J(r)},[r,t.length]);const z=W=>{t[W].disabled||(J(W),F?.(W))},L=a==="left"||a==="right",K={display:"flex",flexDirection:I?"column":L?a==="left"?"row":"row-reverse":"column",width:"100%",height:"100%",backgroundColor:E,...b},D={width:I?"100%":L?x:"100%",display:"flex",flexDirection:I||L?"column":"row",gap:w,padding:I?"0":"8px",boxSizing:"border-box",overflowX:I?"hidden":"visible",...v},G={flexGrow:1,padding:I?"16px":"24px",background:"#f9fafb",boxSizing:"border-box",minWidth:0,width:I?"100%":L?`calc(100% - ${x})`:"100%",...f},ne={cursor:"pointer",display:"flex",alignItems:"center",gap:8,padding:m,borderRadius:C,border:"none",backgroundColor:"transparent",fontWeight:500,transition:`all ${X}ms ease`,width:I||L?"100%":"auto",marginBottom:I||L?w:0,marginRight:!L&&!I?w:0,justifyContent:"flex-start",textAlign:"left",fontSize:I?"14px":"inherit"},u={backgroundColor:g,color:"#fff",fontWeight:600,boxShadow:`0 2px 10px ${g}33`,...S},O={backgroundColor:"transparent",color:y,...j},p={backgroundColor:`${g}11`,color:T},B={cursor:"not-allowed",color:_,opacity:.7},Q={...ne,...u,justifyContent:"space-between",width:"100%",marginBottom:w,fontSize:"16px"};return e.jsxs("div",{className:`react-tabs ${d}`,style:K,role:Y,"aria-orientation":I||L?"vertical":$,children:[e.jsx("style",{children:`
|
|
237
192
|
.react-tabs {
|
|
238
|
-
--primary-color: ${
|
|
239
|
-
--text-color: ${
|
|
240
|
-
--bg-color: ${
|
|
241
|
-
--hover-color: ${
|
|
242
|
-
--disabled-color: ${
|
|
243
|
-
--transition-duration: ${
|
|
193
|
+
--primary-color: ${g};
|
|
194
|
+
--text-color: ${y};
|
|
195
|
+
--bg-color: ${E};
|
|
196
|
+
--hover-color: ${T};
|
|
197
|
+
--disabled-color: ${_};
|
|
198
|
+
--transition-duration: ${X}ms;
|
|
244
199
|
}
|
|
245
200
|
|
|
246
201
|
.react-tabs__mobile-drawer {
|
|
247
202
|
display: flex;
|
|
248
203
|
flex-direction: column;
|
|
249
|
-
gap: ${
|
|
204
|
+
gap: ${w}px;
|
|
250
205
|
width: 100%;
|
|
251
|
-
animation: react-tabs-slideDown ${
|
|
206
|
+
animation: react-tabs-slideDown ${X}ms ease-out;
|
|
252
207
|
}
|
|
253
208
|
|
|
254
209
|
@keyframes react-tabs-slideDown {
|
|
@@ -265,15 +220,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
265
220
|
outline: none;
|
|
266
221
|
}
|
|
267
222
|
|
|
268
|
-
@media (max-width: ${
|
|
223
|
+
@media (max-width: ${A}px) {
|
|
269
224
|
.react-tabs__drawer-button {
|
|
270
225
|
width: 100%;
|
|
271
226
|
display: flex;
|
|
272
227
|
justify-content: space-between;
|
|
273
228
|
align-items: center;
|
|
274
|
-
padding: ${
|
|
275
|
-
border-radius: ${
|
|
276
|
-
margin-bottom: ${
|
|
229
|
+
padding: ${m};
|
|
230
|
+
border-radius: ${C}px;
|
|
231
|
+
margin-bottom: ${w}px;
|
|
277
232
|
}
|
|
278
233
|
|
|
279
234
|
.react-tabs__nav {
|
|
@@ -284,43 +239,43 @@ React keys must be passed directly to JSX without using spread:
|
|
|
284
239
|
padding: 16px;
|
|
285
240
|
}
|
|
286
241
|
}
|
|
287
|
-
`}),L?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>l(!K),style:ae,className:"react-tabs__drawer-button","aria-expanded":K,"aria-controls":"mobile-tabs-drawer","aria-haspopup":"true",children:[e.jsx("span",{children:R}),e.jsx("span",{children:E})]}),K&&e.jsx("div",{id:"mobile-tabs-drawer",className:"react-tabs__mobile-drawer",role:"menu",children:t.map((X,se)=>{const ce=se===F,fe=S===se,pe=X.disabled;return e.jsxs("button",{onClick:()=>{I(se),l(!1)},onMouseEnter:()=>!pe&&b(se),onMouseLeave:()=>b(null),className:ce?i:u,style:{...de,...ce?x:V,...fe&&!ce&&!pe?f:{},...pe?W:{}},role:"menuitemradio","aria-checked":ce,"aria-disabled":pe,"aria-label":X.ariaLabel||(typeof X.label=="string"?X.label:`Tab ${se+1}`),disabled:pe,children:[X.icon&&e.jsx("span",{"aria-hidden":"true",children:X.icon}),e.jsx("span",{children:X.label})]},se)})})]}):e.jsx("nav",{className:`react-tabs__nav ${a}`,style:q,role:Q,"aria-label":"Tabs Navigation",children:t.map((X,se)=>{const ce=se===F,fe=S===se,pe=X.disabled;return e.jsxs("button",{onClick:()=>I(se),onMouseEnter:()=>!pe&&b(se),onMouseLeave:()=>b(null),className:ce?i:u,style:{...de,...ce?x:V,...fe&&!ce&&!pe?f:{},...pe?W:{}},role:"tab","aria-selected":ce,"aria-disabled":pe,"aria-controls":`tabpanel-${se}`,id:`tab-${se}`,tabIndex:ce?0:-1,disabled:pe,children:[X.icon&&e.jsx("span",{"aria-hidden":"true",children:X.icon}),e.jsx("span",{children:X.label})]},se)})}),e.jsx("section",{className:`react-tabs__content ${d}`,style:Z,role:"tabpanel",id:`tabpanel-${F}`,"aria-labelledby":`tab-${F}`,tabIndex:0,children:t[F]?.content})]})},er=t=>e.jsx($t,{...t,tabPosition:"left",ariaOrientation:"vertical"}),tr=t=>e.jsx($t,{...t,tabPosition:"top"}),rr=t=>e.jsx($t,{...t,tabPosition:"right",ariaOrientation:"vertical"}),qn={Left:er,Top:tr,Right:rr},Gn=({src:t,poster:s,title:c,autoPlay:i=!1,loop:u=!1,muted:a=!1,width:d="100%",height:p="400px",borderRadius:z="16px",theme:C="dark",primaryColor:j="#3b82f6",className:h,showProgress:m=!0,showVolumeSlider:g=!0,showSettings:k=!0,showDownload:w=!0,showShare:_=!0,showPiP:y=!0,showSubtitles:v=!1,showPlaybackSpeed:A=!0,showQuality:M=!0,previewThumbnails:B=!1,customControls:Y=!0,hideControlsDelay:R=3e3,seekStep:E=10,volumeStep:J=.1,onPlay:H,onPause:Q,onEnded:$,onTimeUpdate:F,onVolumeChange:ne})=>{const S=n.useRef(null),b=n.useRef(null),L=n.useRef(null),G=n.useRef(0),[K,l]=n.useState(i),[I,P]=n.useState(0),[ee,oe]=n.useState(0),[q,Z]=n.useState(a?0:.8),[de,x]=n.useState(a),[V,f]=n.useState(!1),[W,ae]=n.useState(!1),[X,se]=n.useState(u),[ce,fe]=n.useState(1),[pe,ve]=n.useState("auto"),[ke,Re]=n.useState(!0),[Me,Ie]=n.useState(!1),[we,Se]=n.useState(!1),[Ae,Pe]=n.useState(!1),[he,me]=n.useState(0),[De,Oe]=n.useState(!1),[qe,Ne]=n.useState(0),le={dark:{background:"linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%)",controlsBg:"rgba(0, 0, 0, 0.8)",text:"#ffffff",textSecondary:"#a3a3a3",border:"rgba(255, 255, 255, 0.1)",hover:"rgba(255, 255, 255, 0.1)"},light:{background:"linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)",controlsBg:"rgba(255, 255, 255, 0.95)",text:"#212529",textSecondary:"#6c757d",border:"rgba(0, 0, 0, 0.1)",hover:"rgba(0, 0, 0, 0.05)"},glass:{background:"rgba(255, 255, 255, 0.1)",controlsBg:"rgba(255, 255, 255, 0.1)",text:"#ffffff",textSecondary:"#a3a3a3",border:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.2)"},neon:{background:"linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 100%)",controlsBg:"rgba(139, 69, 19, 0.8)",text:"#00ffff",textSecondary:"#ff00ff",border:"rgba(0, 255, 255, 0.3)",hover:"rgba(255, 0, 255, 0.2)"}}[C],Te=n.useCallback(()=>{G.current&&clearTimeout(G.current),G.current=window.setTimeout(()=>{K&&Re(!1)},R)},[K,R]),Ye=n.useCallback(()=>{Re(!0),Te()},[Te]);n.useEffect(()=>{S.current&&(S.current.volume=q,S.current.loop=X,S.current.muted=de,S.current.playbackRate=ce)},[q,X,de,ce]),n.useEffect(()=>{K?Te():(G.current&&clearTimeout(G.current),Re(!0))},[K,Te]);const Ee=()=>{S.current&&(K?(S.current.pause(),l(!1),Q?.()):(S.current.play().catch(console.error),l(!0),H?.()))},Ge=()=>{if(!S.current)return;const O=S.current.currentTime,ge=S.current.duration;P(O),oe(ge),F?.(O)},D=O=>{if(!S.current||!L.current)return;const ge=L.current.getBoundingClientRect(),$e=(O.clientX-ge.left)/ge.width*ee;S.current.currentTime=$e,P($e)},xe=O=>{if(!L.current)return;const ge=L.current.getBoundingClientRect(),$e=(O.clientX-ge.left)/ge.width*ee;me($e),Ne(O.clientX-ge.left),Oe(!0)},ye=O=>{S.current&&(S.current.currentTime=Math.min(Math.max(0,S.current.currentTime+O),ee))},Ce=O=>{const ge=Math.min(Math.max(O,0),1);Z(ge),x(ge===0),ne?.(ge)},ue=async()=>{if(b.current)try{V?document.exitFullscreen&&await document.exitFullscreen():b.current.requestFullscreen&&await b.current.requestFullscreen(),f(!V)}catch(O){console.error("Fullscreen error:",O)}},Je=async()=>{if(S.current)try{W?document.exitPictureInPicture&&await document.exitPictureInPicture():S.current.requestPictureInPicture&&await S.current.requestPictureInPicture(),ae(!W)}catch(O){console.error("Picture-in-Picture error:",O)}},it=()=>{const O=document.createElement("a");O.href=t,O.download=c||"video",O.click()},It=async()=>{try{navigator.share?await navigator.share({title:c||"Video",url:window.location.href}):await navigator.clipboard.writeText(window.location.href)}catch(O){console.error("Share error:",O)}},Qe=O=>{if(!O||isNaN(O))return"0:00";const ge=Math.floor(O/3600),Be=Math.floor(O%3600/60),$e=Math.floor(O%60);return ge>0?`${ge}:${Be.toString().padStart(2,"0")}:${$e.toString().padStart(2,"0")}`:`${Be}:${$e.toString().padStart(2,"0")}`},ft=()=>de||q===0?e.jsx(st,{size:18}):q<.3?e.jsx(st,{size:18}):q<.7?e.jsx(On,{size:18}):e.jsx(xt,{size:18});return n.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),e.jsxs("div",{ref:b,className:h,style:{position:"relative",width:d,height:p,background:le.background,borderRadius:z,overflow:"hidden",boxShadow:C==="glass"?"inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.3)":"0 10px 30px rgba(0, 0, 0, 0.3)",backdropFilter:C==="glass"?"blur(16px)":"none",userSelect:"none",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},onMouseMove:Ye,onMouseLeave:()=>Re(!1),children:[e.jsx("video",{ref:S,src:t,poster:s,autoPlay:i,loop:u,muted:a,controls:!1,onClick:Ee,onTimeUpdate:Ge,onLoadedMetadata:Ge,onWaiting:()=>Pe(!0),onCanPlay:()=>Pe(!1),onEnded:()=>{l(!1),$?.()},style:{width:"100%",height:"100%",objectFit:"cover",backgroundColor:"#000"}}),Ae&&e.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:le.text,animation:"spin 1s linear infinite"},children:e.jsx(Qt,{size:48})}),!K&&!Ae&&e.jsx("button",{onClick:Ee,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:`${j}CC`,borderRadius:"50%",border:"none",padding:"24px",cursor:"pointer",color:"#fff",backdropFilter:"blur(10px)",transition:"all 0.3s ease",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.3)"},onMouseEnter:O=>{O.currentTarget.style.transform="translate(-50%, -50%) scale(1.1)",O.currentTarget.style.background=j},onMouseLeave:O=>{O.currentTarget.style.transform="translate(-50%, -50%) scale(1)",O.currentTarget.style.background=`${j}CC`},children:e.jsx(He,{size:32})}),c&&ke&&e.jsx("div",{style:{position:"absolute",top:"16px",left:"16px",right:"16px",color:le.text,fontSize:"18px",fontWeight:"600",textShadow:"0 2px 4px rgba(0, 0, 0, 0.8)",opacity:ke?1:0,transition:"opacity 0.3s ease"},children:c}),Y&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:le.controlsBg,backdropFilter:"blur(10px)",color:le.text,padding:"16px",transform:ke?"translateY(0)":"translateY(100%)",transition:"transform 0.3s ease"},children:[m&&e.jsxs("div",{style:{marginBottom:"12px",position:"relative"},children:[e.jsx("div",{ref:L,onClick:D,onMouseMove:xe,onMouseLeave:()=>Oe(!1),style:{height:"6px",background:"rgba(255, 255, 255, 0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"visible"},children:e.jsx("div",{style:{width:`${I/ee*100||0}%`,height:"100%",background:j,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",width:"12px",height:"12px",background:j,borderRadius:"50%",transform:"translateY(-50%)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.3)"}})})}),De&&B&&e.jsx("div",{style:{position:"absolute",bottom:"12px",left:`${qe}px`,transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.9)",color:"#fff",padding:"4px 8px",borderRadius:"4px",fontSize:"12px",whiteSpace:"nowrap"},children:Qe(he)})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"12px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("button",{onClick:()=>ye(-E),style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(ut,{size:20})}),e.jsx("button",{onClick:Ee,style:{background:j,borderRadius:"50%",padding:"12px",color:"#fff",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:K?e.jsx(ot,{size:20}):e.jsx(He,{size:20})}),e.jsx("button",{onClick:()=>ye(E),style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(pt,{size:20})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[e.jsx("button",{onClick:()=>x(!de),onMouseEnter:()=>g&&Se(!0),style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(ft,{})}),g&&e.jsx("div",{onMouseEnter:()=>Se(!0),onMouseLeave:()=>Se(!1),style:{position:we?"relative":"absolute",left:we?"0":"40px",bottom:we?"0":"40px",width:we?"80px":"30px",height:we?"6px":"80px",background:"rgba(255, 255, 255, 0.2)",borderRadius:"3px",cursor:"pointer",opacity:we?1:0,transition:"all 0.3s ease"},onClick:O=>{const ge=O.currentTarget.getBoundingClientRect(),Be=(O.clientX-ge.left)/ge.width;Ce(Be)},children:e.jsx("div",{style:{width:`${q*100}%`,height:"100%",background:j,borderRadius:"3px"}})})]}),e.jsxs("div",{style:{fontSize:"14px",color:le.textSecondary,minWidth:"100px"},children:[Qe(I)," / ",Qe(ee)]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[v&&e.jsx("button",{style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(Xr,{size:18})}),k&&e.jsx("button",{onClick:()=>Ie(!Me),style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(In,{size:18})}),w&&e.jsx("button",{onClick:it,style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(Jt,{size:18})}),_&&e.jsx("button",{onClick:It,style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(Kt,{size:18})}),y&&e.jsx("button",{onClick:Je,style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(jn,{size:18})}),e.jsx("button",{onClick:()=>se(!X),style:{background:"none",border:"none",color:X?j:le.text,cursor:"pointer",padding:"8px"},children:e.jsx(Mt,{size:18})}),e.jsx("button",{onClick:ue,style:{background:"none",border:"none",color:le.text,cursor:"pointer",padding:"8px"},children:V?e.jsx(Rt,{size:18}):e.jsx(zt,{size:18})})]})]})]}),Me&&e.jsxs("div",{style:{position:"absolute",bottom:"80px",right:"16px",background:le.controlsBg,backdropFilter:"blur(10px)",borderRadius:"12px",padding:"16px",minWidth:"200px",color:le.text,border:`1px solid ${le.border}`,opacity:Me?1:0,transform:Me?"translateY(0)":"translateY(10px)",transition:"all 0.3s ease"},children:[A&&e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("div",{style:{fontSize:"14px",marginBottom:"8px",color:le.textSecondary},children:"Playback Speed"}),e.jsx("div",{style:{display:"flex",gap:"4px",flexWrap:"wrap"},children:[.25,.5,.75,1,1.25,1.5,1.75,2].map(O=>e.jsxs("button",{onClick:()=>fe(O),style:{background:ce===O?j:"transparent",border:`1px solid ${le.border}`,borderRadius:"6px",padding:"4px 8px",color:le.text,cursor:"pointer",fontSize:"12px"},children:[O,"x"]},O))})]}),M&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"14px",marginBottom:"8px",color:le.textSecondary},children:"Quality"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:["auto","1080p","720p","480p","360p"].map(O=>e.jsx("button",{onClick:()=>ve(O),style:{background:pe===O?j:"transparent",border:"none",borderRadius:"6px",padding:"8px",color:le.text,cursor:"pointer",fontSize:"12px",textAlign:"left"},children:O},O))})]})]}),e.jsx("style",{children:`
|
|
242
|
+
`}),I?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>o(!U),style:Q,className:"react-tabs__drawer-button","aria-expanded":U,"aria-controls":"mobile-tabs-drawer","aria-haspopup":"true",children:[e.jsx("span",{children:R}),e.jsx("span",{children:M})]}),U&&e.jsx("div",{id:"mobile-tabs-drawer",className:"react-tabs__mobile-drawer",role:"menu",children:t.map((W,Z)=>{const re=Z===N,ie=k===Z,se=W.disabled;return e.jsxs("button",{onClick:()=>{z(Z),o(!1)},onMouseEnter:()=>!se&&h(Z),onMouseLeave:()=>h(null),className:re?i:c,style:{...ne,...re?u:O,...ie&&!re&&!se?p:{},...se?B:{}},role:"menuitemradio","aria-checked":re,"aria-disabled":se,"aria-label":W.ariaLabel||(typeof W.label=="string"?W.label:`Tab ${Z+1}`),disabled:se,children:[W.icon&&e.jsx("span",{"aria-hidden":"true",children:W.icon}),e.jsx("span",{children:W.label})]},Z)})})]}):e.jsx("nav",{className:`react-tabs__nav ${n}`,style:D,role:Y,"aria-label":"Tabs Navigation",children:t.map((W,Z)=>{const re=Z===N,ie=k===Z,se=W.disabled;return e.jsxs("button",{onClick:()=>z(Z),onMouseEnter:()=>!se&&h(Z),onMouseLeave:()=>h(null),className:re?i:c,style:{...ne,...re?u:O,...ie&&!re&&!se?p:{},...se?B:{}},role:"tab","aria-selected":re,"aria-disabled":se,"aria-controls":`tabpanel-${Z}`,id:`tab-${Z}`,tabIndex:re?0:-1,disabled:se,children:[W.icon&&e.jsx("span",{"aria-hidden":"true",children:W.icon}),e.jsx("span",{children:W.label})]},Z)})}),e.jsx("section",{className:`react-tabs__content ${l}`,style:G,role:"tabpanel",id:`tabpanel-${N}`,"aria-labelledby":`tab-${N}`,tabIndex:0,children:t[N]?.content})]})},ut=t=>e.jsx(Je,{...t,tabPosition:"left",ariaOrientation:"vertical"}),pt=t=>e.jsx(Je,{...t,tabPosition:"top"}),ft=t=>e.jsx(Je,{...t,tabPosition:"right",ariaOrientation:"vertical"}),kr={Left:ut,Top:pt,Right:ft},Sr=({src:t,poster:r,title:a,autoPlay:i=!1,loop:c=!1,muted:n=!1,width:l="100%",height:d="400px",borderRadius:S="16px",theme:j="dark",primaryColor:v="#3b82f6",className:f,showProgress:b=!0,showVolumeSlider:x=!0,showSettings:w=!0,showDownload:m=!0,showShare:C=!0,showPiP:g=!0,showSubtitles:y=!1,showPlaybackSpeed:E=!0,showQuality:T=!0,previewThumbnails:_=!1,customControls:A=!0,hideControlsDelay:R=3e3,seekStep:M=10,volumeStep:X=.1,onPlay:F,onPause:Y,onEnded:$,onTimeUpdate:N,onVolumeChange:J})=>{const k=s.useRef(null),h=s.useRef(null),I=s.useRef(null),V=s.useRef(0),[U,o]=s.useState(i),[z,L]=s.useState(0),[q,K]=s.useState(0),[D,G]=s.useState(n?0:.8),[ne,u]=s.useState(n),[O,p]=s.useState(!1),[B,Q]=s.useState(!1),[W,Z]=s.useState(c),[re,ie]=s.useState(1),[se,ce]=s.useState("auto"),[fe,xe]=s.useState(!0),[he,ye]=s.useState(!1),[pe,ge]=s.useState(!1),[we,je]=s.useState(!1),[de,Te]=s.useState(0),[Re,$e]=s.useState(!1),[Ye,ke]=s.useState(0),ee={dark:{background:"linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%)",controlsBg:"rgba(0, 0, 0, 0.8)",text:"#ffffff",textSecondary:"#a3a3a3",border:"rgba(255, 255, 255, 0.1)",hover:"rgba(255, 255, 255, 0.1)"},light:{background:"linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)",controlsBg:"rgba(255, 255, 255, 0.95)",text:"#212529",textSecondary:"#6c757d",border:"rgba(0, 0, 0, 0.1)",hover:"rgba(0, 0, 0, 0.05)"},glass:{background:"rgba(255, 255, 255, 0.1)",controlsBg:"rgba(255, 255, 255, 0.1)",text:"#ffffff",textSecondary:"#a3a3a3",border:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.2)"},neon:{background:"linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 100%)",controlsBg:"rgba(139, 69, 19, 0.8)",text:"#00ffff",textSecondary:"#ff00ff",border:"rgba(0, 255, 255, 0.3)",hover:"rgba(255, 0, 255, 0.2)"}}[j],Me=s.useCallback(()=>{typeof window>"u"||(V.current&&clearTimeout(V.current),V.current=window.setTimeout(()=>{U&&xe(!1)},R))},[U,R]),Ie=s.useCallback(()=>{xe(!0),Me()},[Me]);s.useEffect(()=>{k.current&&(k.current.volume=D,k.current.loop=W,k.current.muted=ne,k.current.playbackRate=re)},[D,W,ne,re]),s.useEffect(()=>{U?Me():(V.current&&clearTimeout(V.current),xe(!0))},[U,Me]);const Ce=()=>{k.current&&(U?(k.current.pause(),o(!1),Y?.()):(k.current.play().catch(console.error),o(!0),F?.()))},Pe=()=>{if(!k.current)return;const P=k.current.currentTime,le=k.current.duration;L(P),K(le),N?.(P)},H=P=>{if(!k.current||!I.current)return;const le=I.current.getBoundingClientRect(),Se=(P.clientX-le.left)/le.width*q;k.current.currentTime=Se,L(Se)},oe=P=>{if(!I.current)return;const le=I.current.getBoundingClientRect(),Se=(P.clientX-le.left)/le.width*q;Te(Se),ke(P.clientX-le.left),$e(!0)},ue=P=>{k.current&&(k.current.currentTime=Math.min(Math.max(0,k.current.currentTime+P),q))},be=P=>{const le=Math.min(Math.max(P,0),1);G(le),u(le===0),J?.(le)},me=async()=>{if(h.current)try{O?document.exitFullscreen&&await document.exitFullscreen():h.current.requestFullscreen&&await h.current.requestFullscreen(),p(!O)}catch(P){console.error("Fullscreen error:",P)}},Ae=async()=>{if(k.current)try{B?document.exitPictureInPicture&&await document.exitPictureInPicture():k.current.requestPictureInPicture&&await k.current.requestPictureInPicture(),Q(!B)}catch(P){console.error("Picture-in-Picture error:",P)}},He=()=>{const P=document.createElement("a");P.href=t,P.download=a||"video",P.click()},yt=async()=>{if(!(typeof window>"u")&&navigator)try{const P=window.location.href;navigator.share?await navigator.share({title:a||"Video",url:P}):navigator.clipboard?(await navigator.clipboard.writeText(P),console.log("URL copied to clipboard!")):console.warn("Share API and Clipboard API not supported in this browser.")}catch(P){console.error("Share error:",P)}},Xe=P=>{if(!P||isNaN(P))return"0:00";const le=Math.floor(P/3600),ze=Math.floor(P%3600/60),Se=Math.floor(P%60);return le>0?`${le}:${ze.toString().padStart(2,"0")}:${Se.toString().padStart(2,"0")}`:`${ze}:${Se.toString().padStart(2,"0")}`},mt=()=>ne||D===0?e.jsx(We,{size:18}):D<.3?e.jsx(We,{size:18}):D<.7?e.jsx(br,{size:18}):e.jsx(Ge,{size:18});return s.useEffect(()=>()=>{V.current&&clearTimeout(V.current)},[]),e.jsxs("div",{ref:h,className:f,style:{position:"relative",width:l,height:d,background:ee.background,borderRadius:S,overflow:"hidden",boxShadow:j==="glass"?"inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.3)":"0 10px 30px rgba(0, 0, 0, 0.3)",backdropFilter:j==="glass"?"blur(16px)":"none",userSelect:"none",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},onMouseMove:Ie,onMouseLeave:()=>xe(!1),children:[e.jsx("video",{ref:k,src:t,poster:r,autoPlay:i,loop:c,muted:n,controls:!1,onClick:Ce,onTimeUpdate:Pe,onLoadedMetadata:Pe,onWaiting:()=>je(!0),onCanPlay:()=>je(!1),onEnded:()=>{o(!1),$?.()},style:{width:"100%",height:"100%",objectFit:"cover",backgroundColor:"#000"}}),we&&e.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:ee.text,animation:"spin 1s linear infinite"},children:e.jsx(Gt,{size:48})}),!U&&!we&&e.jsx("button",{onClick:Ce,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:`${v}CC`,borderRadius:"50%",border:"none",padding:"24px",cursor:"pointer",color:"#fff",backdropFilter:"blur(10px)",transition:"all 0.3s ease",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.3)"},onMouseEnter:P=>{P.currentTarget.style.transform="translate(-50%, -50%) scale(1.1)",P.currentTarget.style.background=v},onMouseLeave:P=>{P.currentTarget.style.transform="translate(-50%, -50%) scale(1)",P.currentTarget.style.background=`${v}CC`},children:e.jsx(Le,{size:32})}),a&&fe&&e.jsx("div",{style:{position:"absolute",top:"16px",left:"16px",right:"16px",color:ee.text,fontSize:"18px",fontWeight:"600",textShadow:"0 2px 4px rgba(0, 0, 0, 0.8)",opacity:fe?1:0,transition:"opacity 0.3s ease"},children:a}),A&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:ee.controlsBg,backdropFilter:"blur(10px)",color:ee.text,padding:"16px",transform:fe?"translateY(0)":"translateY(100%)",transition:"transform 0.3s ease"},children:[b&&e.jsxs("div",{style:{marginBottom:"12px",position:"relative"},children:[e.jsx("div",{ref:I,onClick:H,onMouseMove:oe,onMouseLeave:()=>$e(!1),style:{height:"6px",background:"rgba(255, 255, 255, 0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"visible"},children:e.jsx("div",{style:{width:`${z/q*100||0}%`,height:"100%",background:v,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",width:"12px",height:"12px",background:v,borderRadius:"50%",transform:"translateY(-50%)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.3)"}})})}),Re&&_&&e.jsx("div",{style:{position:"absolute",bottom:"12px",left:`${Ye}px`,transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.9)",color:"#fff",padding:"4px 8px",borderRadius:"4px",fontSize:"12px",whiteSpace:"nowrap"},children:Xe(de)})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"12px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("button",{onClick:()=>ue(-M),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Oe,{size:20})}),e.jsx("button",{onClick:Ce,style:{background:v,borderRadius:"50%",padding:"12px",color:"#fff",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:U?e.jsx(Be,{size:20}):e.jsx(Le,{size:20})}),e.jsx("button",{onClick:()=>ue(M),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Fe,{size:20})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[e.jsx("button",{onClick:()=>u(!ne),onMouseEnter:()=>x&&ge(!0),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(mt,{})}),x&&e.jsx("div",{onMouseEnter:()=>ge(!0),onMouseLeave:()=>ge(!1),style:{position:pe?"relative":"absolute",left:pe?"0":"40px",bottom:pe?"0":"40px",width:pe?"80px":"30px",height:pe?"6px":"80px",background:"rgba(255, 255, 255, 0.2)",borderRadius:"3px",cursor:"pointer",opacity:pe?1:0,transition:"all 0.3s ease"},onClick:P=>{const le=P.currentTarget.getBoundingClientRect(),ze=(P.clientX-le.left)/le.width;be(ze)},children:e.jsx("div",{style:{width:`${D*100}%`,height:"100%",background:v,borderRadius:"3px"}})})]}),e.jsxs("div",{style:{fontSize:"14px",color:ee.textSecondary,minWidth:"100px"},children:[Xe(z)," / ",Xe(q)]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[y&&e.jsx("button",{style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Ct,{size:18})}),w&&e.jsx("button",{onClick:()=>ye(!he),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(or,{size:18})}),m&&e.jsx("button",{onClick:He,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Ot,{size:18})}),C&&e.jsx("button",{onClick:yt,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(ar,{size:18})}),g&&e.jsx("button",{onClick:Ae,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(tr,{size:18})}),e.jsx("button",{onClick:()=>Z(!W),style:{background:"none",border:"none",color:W?v:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(qe,{size:18})}),e.jsx("button",{onClick:me,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:O?e.jsx(ct,{size:18}):e.jsx(lt,{size:18})})]})]})]}),he&&e.jsxs("div",{style:{position:"absolute",bottom:"80px",right:"16px",background:ee.controlsBg,backdropFilter:"blur(10px)",borderRadius:"12px",padding:"16px",minWidth:"200px",color:ee.text,border:`1px solid ${ee.border}`,opacity:he?1:0,transform:he?"translateY(0)":"translateY(10px)",transition:"all 0.3s ease"},children:[E&&e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("div",{style:{fontSize:"14px",marginBottom:"8px",color:ee.textSecondary},children:"Playback Speed"}),e.jsx("div",{style:{display:"flex",gap:"4px",flexWrap:"wrap"},children:[.25,.5,.75,1,1.25,1.5,1.75,2].map(P=>e.jsxs("button",{onClick:()=>ie(P),style:{background:re===P?v:"transparent",border:`1px solid ${ee.border}`,borderRadius:"6px",padding:"4px 8px",color:ee.text,cursor:"pointer",fontSize:"12px"},children:[P,"x"]},P))})]}),T&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"14px",marginBottom:"8px",color:ee.textSecondary},children:"Quality"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:["auto","1080p","720p","480p","360p"].map(P=>e.jsx("button",{onClick:()=>ce(P),style:{background:se===P?v:"transparent",border:"none",borderRadius:"6px",padding:"8px",color:ee.text,cursor:"pointer",fontSize:"12px",textAlign:"left"},children:P},P))})]})]}),e.jsx("style",{children:`
|
|
288
243
|
@keyframes spin {
|
|
289
244
|
from { transform: rotate(0deg); }
|
|
290
245
|
to { transform: rotate(360deg); }
|
|
291
246
|
}
|
|
292
|
-
`})]})},Jn=({src:t,thumbnail:s,autoPlay:c=!1,loop:i=!1,backgroundColor:u="#000000",primaryColor:a="#10b981",secondaryColor:d="#ffffff",borderRadius:p="12px",padding:z="16px",width:C="100%",className:j})=>{const h=n.useRef(null),m=n.useRef(null),[g,k]=n.useState(c),[w,_]=n.useState(0),[y,v]=n.useState(0),[A,M]=n.useState(.5),[B,Y]=n.useState(!1),[R,E]=n.useState(i);n.useEffect(()=>{h.current&&(h.current.volume=A)},[A]),n.useEffect(()=>{h.current&&(h.current.loop=R)},[R]);const J=()=>{h.current&&(g?h.current.pause():h.current.play(),k(!g))},H=()=>{h.current&&(_(h.current.currentTime),v(h.current.duration))},Q=S=>{if(!h.current||!S.currentTarget)return;const b=S.currentTarget.getBoundingClientRect(),G=(S.clientX-b.left)/b.width*y;h.current.currentTime=G,_(G)},$=S=>{h.current&&(h.current.currentTime+=S)},F=()=>{m.current&&(B?document.exitFullscreen?.():m.current.requestFullscreen?.(),Y(!B))},ne=S=>{const b=Math.floor(S/60),L=Math.floor(S%60);return`${b}:${L<10?"0":""}${L}`};return e.jsxs("div",{ref:m,className:j,style:{position:"relative",width:C,backgroundColor:u,borderRadius:p,color:d,boxShadow:"0 4px 12px rgba(0,0,0,0.3)",overflow:"hidden",padding:z,boxSizing:"border-box",maxWidth:"100%"},children:[e.jsx("audio",{ref:h,src:t,autoPlay:c,loop:i,onTimeUpdate:H,onLoadedMetadata:H}),s&&e.jsx("img",{src:s,alt:"Audio Thumbnail",style:{width:"100%",objectFit:"cover",borderRadius:p,marginBottom:"16px",maxHeight:"150px"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",flexShrink:0,marginTop:"10px"},children:[e.jsx("button",{onClick:()=>$(-10),"aria-label":"Skip Back 10s",children:e.jsx(ut,{size:20})}),e.jsx("button",{onClick:J,style:{background:a,borderRadius:"9999px",padding:"10px",color:"#fff",border:"none",cursor:"pointer"},"aria-label":g?"Pause":"Play",children:g?e.jsx(ot,{size:20}):e.jsx(He,{size:20})}),e.jsx("button",{onClick:()=>$(10),"aria-label":"Skip Forward 10s",children:e.jsx(pt,{size:20})})]}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"12px",width:"100%"},children:[e.jsxs("div",{style:{flexShrink:0,minWidth:"60px",textAlign:"center"},children:[e.jsx("span",{style:{fontSize:"14px",marginRight:"4px"},children:ne(w)}),e.jsxs("span",{style:{fontSize:"14px",color:"#aaa"},children:["/ ",ne(y)]})]}),e.jsx("div",{onClick:Q,style:{flex:1,height:"8px",background:"#444",borderRadius:"4px",cursor:"pointer",position:"relative",minWidth:"100px"},children:e.jsx("div",{style:{width:`${w/y*100||0}%`,height:"100%",background:a,borderRadius:"4px"}})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0},children:[e.jsx("button",{onClick:()=>E(!R),"aria-label":"Toggle Loop",children:e.jsx(Mt,{size:18,color:R?a:void 0})}),e.jsx("button",{onClick:()=>M(A>0?0:.5),"aria-label":"Toggle Mute",children:A>0?e.jsx(xt,{size:18}):e.jsx(st,{size:18})}),e.jsx("button",{onClick:F,"aria-label":"Toggle Fullscreen",children:B?e.jsx(Rt,{size:18}):e.jsx(zt,{size:18})})]})]})]})};function be(t,s,c){return t==null?c:typeof t!="object"?t:t[s]??c}const Xt=t=>t<768?"sm":t<1024?"md":"lg",Qn=({display:t={sm:"block",md:"flex",lg:"grid"},flexDirection:s={sm:"column",md:"row",lg:"row"},justifyContent:c={sm:"flex-start",md:"center",lg:"space-between"},alignItems:i={sm:"stretch",md:"center",lg:"center"},gridTemplateColumns:u={sm:"1fr",md:"1fr 1fr",lg:"1fr 1fr 1fr"},gridTemplateRows:a={sm:"auto",md:"auto",lg:"auto"},gap:d={sm:"10px",md:"20px",lg:"30px"},rowGap:p,columnGap:z,width:C={sm:"100%",md:"90%",lg:"80%"},maxWidth:j={sm:"100%",md:"800px",lg:"1200px"},height:h={sm:"auto",md:"auto",lg:"auto"},padding:m={sm:"10px",md:"20px",lg:"40px"},margin:g={sm:"0 auto",md:"0 auto",lg:"0 auto"},textAlign:k={sm:"left",md:"center",lg:"center"},backgroundColor:w="#fff",border:_={sm:"none",md:"1px solid #ddd",lg:"2px solid #ccc"},borderRadius:y={sm:"0",md:"8px",lg:"12px"},boxShadow:v={sm:"none",md:"0 4px 6px rgba(0,0,0,0.1)",lg:"0 6px 10px rgba(0,0,0,0.15)"},overflow:A={sm:"visible",md:"hidden",lg:"auto"},children:M,className:B,style:Y})=>{const[R,E]=n.useState(()=>Xt(window.innerWidth));n.useEffect(()=>{const H=()=>E(Xt(window.innerWidth));return window.addEventListener("resize",H),()=>window.removeEventListener("resize",H)},[]);const J=n.useMemo(()=>{const H=be(t,R,"block"),Q=be(s,R,void 0),$=be(c,R,void 0),F=be(i,R,void 0),ne=be(u,R,void 0),S=be(a,R,void 0),b=be(d,R,void 0),L=be(p,R,void 0),G=be(z,R,void 0),K=be(C,R,"100%"),l=be(j,R,void 0),I=be(h,R,void 0),P=be(m,R,void 0),ee=be(g,R,void 0),oe=be(k,R,void 0),q=be(_,R,void 0),Z=be(y,R,void 0),de=be(v,R,void 0),x=be(A,R,void 0);return{display:H,...Q&&{flexDirection:Q},...$&&{justifyContent:$},...F&&{alignItems:F},...ne&&{gridTemplateColumns:ne},...S&&{gridTemplateRows:S},...b&&{gap:b},...L&&{rowGap:L},...G&&{columnGap:G},width:K,...l&&{maxWidth:l},...I&&{height:I},...P&&{padding:P},...ee&&{margin:ee},...oe&&{textAlign:oe},backgroundColor:w,...q&&{border:q},...Z&&{borderRadius:Z},...de&&{boxShadow:de},...x&&{overflow:x},boxSizing:"border-box",...Y}},[R,t,s,c,i,u,a,d,p,z,C,j,h,m,g,k,w,_,y,v,A,Y]);return e.jsx("div",{className:B,style:J,children:M})},Kn=({items:t,allowMultiple:s=!1,defaultOpenIndex:c=[],borderColor:i="#d1d5db",backgroundColor:u="#ffffff",textColor:a="#111827",hoverBgColor:d="#f3f4f6",hoverTextColor:p="#111827",paddingVertical:z="16px",paddingHorizontal:C="16px",margin:j="12px 0",iconOpen:h="−",iconClose:m="+",transitionDuration:g="300ms",borderRadius:k="8px",shadow:w="0 2px 8px rgba(0, 0, 0, 0.05)",contentPadding:_="16px",fontSize:y="16px",fontWeight:v="600",iconSize:A="18px",contentFontSize:M="14px",contentFontWeight:B="400",contentBackgroundColor:Y="#ffffff",contentTextColor:R="#111827",className:E,style:J})=>{const[H,Q]=n.useState(c),$=n.useRef([]),F=n.useRef([]);n.useEffect(()=>{$.current.forEach((S,b)=>{S&&(S.style.maxHeight=H.includes(b)?`${S.scrollHeight}px`:"0px")})},[H]);const ne=S=>{Q(b=>s?b.includes(S)?b.filter(L=>L!==S):[...b,S]:b.includes(S)?[]:[S])};return e.jsx("div",{className:E,style:{width:"100%",...J},children:t.map((S,b)=>e.jsxs("div",{style:{border:`1px solid ${i}`,borderRadius:k,margin:j,boxShadow:w,overflow:"hidden",transition:`all ${g} ease`},children:[e.jsxs("button",{ref:L=>{F.current[b]=L},onClick:()=>ne(b),style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:u,color:a,padding:`${z} ${C}`,fontWeight:v,fontSize:y,cursor:"pointer",outline:"none",border:"none",transition:`all ${g}`},onMouseEnter:L=>{L.currentTarget.style.backgroundColor=d,L.currentTarget.style.color=p},onMouseLeave:L=>{L.currentTarget.style.backgroundColor=u,L.currentTarget.style.color=a},children:[e.jsx("span",{children:S.title}),e.jsx("span",{style:{fontSize:A},children:H.includes(b)?h:m})]}),e.jsx("div",{ref:L=>{$.current[b]=L},style:{overflow:"hidden",maxHeight:H.includes(b)?`${$.current[b]?.scrollHeight}px`:"0px",transition:`max-height ${g} ease-in-out`},children:e.jsx("div",{style:{borderTop:`1px solid ${i}`,backgroundColor:Y,color:R,padding:_,fontSize:M,fontWeight:B},children:S.content})})]},b))})},Zn=({type:t,name:s,options:c,selectedValues:i,onChange:u,disabled:a=!1,readOnly:d=!1,required:p=!1,error:z,className:C="",customIcon:j,style:h,labelStyle:m,iconSize:g=20,iconCheckedBgColor:k="#2563eb",iconUncheckedBorderColor:w="#9ca3af",textColor:_="#374151",errorStyle:y})=>{const v=t==="checkbox",A=M=>{if(u)if(v){const B=Array.isArray(i)?i.includes(M)?i.filter(Y=>Y!==M):[...i,M]:[M];u(B)}else u(M)};return e.jsxs("div",{className:C,style:{display:"flex",flexDirection:"column",gap:8,...h},role:t,"aria-disabled":a,children:[c.map(M=>{const B=v?Array.isArray(i)&&i.includes(M.value):i===M.value;return e.jsxs("label",{style:{display:"flex",alignItems:"center",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,gap:8,userSelect:"none",...m},children:[e.jsx("input",{type:t,name:s,value:M.value,checked:B,disabled:a||d,required:p,onChange:()=>A(M.value),style:{display:"none"}}),j?j(B):e.jsxs("span",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:g,height:g,borderRadius:v?4:"50%",border:`2px solid ${B?k:w}`,backgroundColor:B?k:"transparent",transition:"all 0.2s ease",flexShrink:0},children:[B&&!v&&e.jsx("span",{style:{width:g/2,height:g/2,borderRadius:"50%",backgroundColor:"white"}}),B&&v&&e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",style:{width:g*.6,height:g*.6},children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})]}),e.jsx("span",{style:{color:_,fontSize:14},children:M.label})]},M.value)}),z&&e.jsx("p",{role:"alert",style:{color:"#dc2626",fontSize:12,marginTop:4,...y},children:z})]})},eo=({label:t="Open Drawer",icon:s,iconPosition:c="left",onClick:i,style:u={}})=>e.jsxs("button",{onClick:i,style:{padding:"10px 16px",backgroundColor:"#2563eb",color:"#fff",border:"none",borderRadius:"6px",cursor:"pointer",display:"inline-flex",alignItems:"center",fontSize:"14px",gap:"8px",...u},children:[s&&c==="left"&&s,t,s&&c==="right"&&s]}),to=({open:t,onClose:s,position:c="right",width:i="300px",height:u="300px",backgroundColor:a="#fff",transitionDuration:d=300,style:p={},children:z,showCloseButton:C=!0,closeButtonStyle:j={}})=>{const[h,m]=n.useState(t);n.useEffect(()=>{t?m(!0):setTimeout(()=>m(!1),d)},[t,d]);const g=n.useMemo(()=>{if(t)return"translate(0, 0)";switch(c){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)";default:return"translate(0, 0)"}},[t,c]),k={position:"fixed",zIndex:1e3,backgroundColor:a,transition:`transform ${d}ms ease, opacity ${d}ms ease`,transform:g,opacity:t?1:0,...p,...c==="left"||c==="right"?{top:0,[c]:0,width:i,height:"100%"}:{left:0,[c]:0,height:u,width:"100%"}},w={position:"fixed",display:h?"block":"none",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:999,transition:`opacity ${d}ms ease`,opacity:t?1:0,pointerEvents:t?"auto":"none"},_={position:"absolute",top:"10px",right:"10px",fontSize:"20px",background:"none",border:"none",cursor:"pointer",color:"#000"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:w,onClick:s}),e.jsxs("div",{style:{...k,display:"block",visibility:h?"visible":"hidden",pointerEvents:t?"auto":"none"},children:[C&&e.jsx("button",{onClick:s,style:{..._,...j},children:e.jsx(at,{size:20,color:"rgba(255, 0, 0, 1)"})}),z]})]})},ro=({options:t,value:s,defaultValue:c,onChange:i,placeholder:u="Select an option",disabled:a=!1,searchable:d=!1,multiSelect:p=!1,clearable:z=!1,virtualized:C=!1,optionHeight:j=36,visibleOptions:h=5,width:m="100%",height:g="auto",borderColor:k="#d1d5db",focusBorderColor:w="#2563eb",errorBorderColor:_="#dc2626",backgroundColor:y="#ffffff",textColor:v="#111827",placeholderColor:A="#9ca3af",hoverColor:M="#f3f4f6",selectedColor:B="#eff6ff",disabledColor:Y="#f3f4f6",padding:R="0.5rem 0.75rem",margin:E="0",borderRadius:J="0.375rem",boxShadow:H="0 1px 2px 0 rgba(0, 0, 0, 0.05)",optionPadding:Q="0.5rem 0.75rem",optionGap:$="0.5rem",transitionDuration:F="200ms",dropdownMaxHeight:ne="300px",dropdownMinWidth:S="100%",className:b="",dropdownClassName:L="",optionClassName:G="",inputClassName:K="",style:l,dropdownStyle:I,optionStyle:P,inputStyle:ee,iconPrefix:oe,iconSuffix:q,clearIcon:Z="×",dropdownIcon:de="▼",checkIcon:x="✓",ariaLabel:V,ariaLabelledby:f,ariaDescribedby:W,onFocus:ae,onBlur:X,onOpen:se,onClose:ce})=>{const[fe,pe]=n.useState([]),[ve,ke]=n.useState(!1),[Re,Me]=n.useState(""),[Ie,we]=n.useState(null),Se=n.useRef(null),Ae=n.useRef(null),Pe=n.useRef([]);n.useEffect(()=>{pe(s?p?s.split(","):[s]:c?p?c.split(","):[c]:[])},[s,c,p]);const he=d?t.filter(D=>D.label.toLowerCase().includes(Re.toLowerCase())):t;n.useEffect(()=>{const D=xe=>{Se.current&&!Se.current.contains(xe.target)&&(ke(!1),ce?.())};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[ce]),n.useEffect(()=>{const D=xe=>{if(ve)switch(xe.key){case"ArrowDown":xe.preventDefault(),we(ye=>{const Ce=ye===null?0:Math.min(ye+1,he.length-1);return me(Ce),Ce});break;case"ArrowUp":xe.preventDefault(),we(ye=>{const Ce=ye===null?0:Math.max(ye-1,0);return me(Ce),Ce});break;case"Enter":xe.preventDefault(),Ie!==null&&De(he[Ie].value);break;case"Escape":xe.preventDefault(),ke(!1),ce?.();break;case"Tab":ke(!1),ce?.();break}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[ve,Ie,he]);const me=n.useCallback(D=>{Pe.current[D]?.scrollIntoView({block:"nearest",behavior:"smooth"})},[]),De=D=>{let xe;p?xe=fe.includes(D)?fe.filter(ye=>ye!==D):[...fe,D]:(xe=[D],ke(!1),ce?.()),pe(xe),i?.(p?xe.join(","):D)},Oe=D=>{D.stopPropagation(),pe([]),i?.(""),Me("")},qe=()=>{if(a)return;const D=!ve;ke(D),D?(se?.(),d&&setTimeout(()=>Ae.current?.focus(),0)):ce?.()},Ne=t.find(D=>D.value===fe[0]),je=t.filter(D=>fe.includes(D.value)),[le,Te]=n.useState(0),Ye=Math.min(h,he.length),Ee=Math.min(le+Ye,he.length),Ge=C?he.slice(le,Ee):he;return e.jsxs("div",{ref:Se,className:`dropdown-container ${b}`,style:{position:"relative",width:m,margin:E,fontFamily:"'Inter', sans-serif",...l},children:[e.jsx("style",{children:`
|
|
247
|
+
`})]})},Tr=({src:t,thumbnail:r,autoPlay:a=!1,loop:i=!1,backgroundColor:c="#000000",primaryColor:n="#10b981",secondaryColor:l="#ffffff",borderRadius:d="12px",padding:S="16px",width:j="100%",className:v})=>{const f=s.useRef(null),b=s.useRef(null),[x,w]=s.useState(a),[m,C]=s.useState(0),[g,y]=s.useState(0),[E,T]=s.useState(.5),[_,A]=s.useState(!1),[R,M]=s.useState(i);s.useEffect(()=>{f.current&&(f.current.volume=E)},[E]),s.useEffect(()=>{f.current&&(f.current.loop=R)},[R]);const X=()=>{f.current&&(x?f.current.pause():f.current.play(),w(!x))},F=()=>{f.current&&(C(f.current.currentTime),y(f.current.duration))},Y=k=>{if(!f.current||!k.currentTarget)return;const h=k.currentTarget.getBoundingClientRect(),V=(k.clientX-h.left)/h.width*g;f.current.currentTime=V,C(V)},$=k=>{f.current&&(f.current.currentTime+=k)},N=()=>{b.current&&(_?document.exitFullscreen?.():b.current.requestFullscreen?.(),A(!_))},J=k=>{const h=Math.floor(k/60),I=Math.floor(k%60);return`${h}:${I<10?"0":""}${I}`};return e.jsxs("div",{ref:b,className:v,style:{position:"relative",width:j,backgroundColor:c,borderRadius:d,color:l,boxShadow:"0 4px 12px rgba(0,0,0,0.3)",overflow:"hidden",padding:S,boxSizing:"border-box",maxWidth:"100%"},children:[e.jsx("audio",{ref:f,src:t,autoPlay:a,loop:i,onTimeUpdate:F,onLoadedMetadata:F}),r&&e.jsx("img",{src:r,alt:"Audio Thumbnail",style:{width:"100%",objectFit:"cover",borderRadius:d,marginBottom:"16px",maxHeight:"150px"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",flexShrink:0,marginTop:"10px"},children:[e.jsx("button",{onClick:()=>$(-10),"aria-label":"Skip Back 10s",children:e.jsx(Oe,{size:20})}),e.jsx("button",{onClick:X,style:{background:n,borderRadius:"9999px",padding:"10px",color:"#fff",border:"none",cursor:"pointer"},"aria-label":x?"Pause":"Play",children:x?e.jsx(Be,{size:20}):e.jsx(Le,{size:20})}),e.jsx("button",{onClick:()=>$(10),"aria-label":"Skip Forward 10s",children:e.jsx(Fe,{size:20})})]}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"12px",width:"100%"},children:[e.jsxs("div",{style:{flexShrink:0,minWidth:"60px",textAlign:"center"},children:[e.jsx("span",{style:{fontSize:"14px",marginRight:"4px"},children:J(m)}),e.jsxs("span",{style:{fontSize:"14px",color:"#aaa"},children:["/ ",J(g)]})]}),e.jsx("div",{onClick:Y,style:{flex:1,height:"8px",background:"#444",borderRadius:"4px",cursor:"pointer",position:"relative",minWidth:"100px"},children:e.jsx("div",{style:{width:`${m/g*100||0}%`,height:"100%",background:n,borderRadius:"4px"}})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0},children:[e.jsx("button",{onClick:()=>M(!R),"aria-label":"Toggle Loop",children:e.jsx(qe,{size:18,color:R?n:void 0})}),e.jsx("button",{onClick:()=>T(E>0?0:.5),"aria-label":"Toggle Mute",children:E>0?e.jsx(Ge,{size:18}):e.jsx(We,{size:18})}),e.jsx("button",{onClick:N,"aria-label":"Toggle Fullscreen",children:_?e.jsx(ct,{size:18}):e.jsx(lt,{size:18})})]})]})]})};function ae(t,r,a){return t==null?a:typeof t!="object"?t:t[r]??a}const rt=t=>t<768?"sm":t<1024?"md":"lg",Rr=({display:t={sm:"block",md:"flex",lg:"grid"},flexDirection:r={sm:"column",md:"row",lg:"row"},justifyContent:a={sm:"flex-start",md:"center",lg:"space-between"},alignItems:i={sm:"stretch",md:"center",lg:"center"},gridTemplateColumns:c={sm:"1fr",md:"1fr 1fr",lg:"1fr 1fr 1fr"},gridTemplateRows:n={sm:"auto",md:"auto",lg:"auto"},gap:l={sm:"10px",md:"20px",lg:"30px"},rowGap:d,columnGap:S,width:j={sm:"100%",md:"90%",lg:"80%"},maxWidth:v={sm:"100%",md:"800px",lg:"1200px"},height:f={sm:"auto",md:"auto",lg:"auto"},padding:b={sm:"10px",md:"20px",lg:"40px"},margin:x={sm:"0 auto",md:"0 auto",lg:"0 auto"},textAlign:w={sm:"left",md:"center",lg:"center"},backgroundColor:m="#fff",border:C={sm:"none",md:"1px solid #ddd",lg:"2px solid #ccc"},borderRadius:g={sm:"0",md:"8px",lg:"12px"},boxShadow:y={sm:"none",md:"0 4px 6px rgba(0,0,0,0.1)",lg:"0 6px 10px rgba(0,0,0,0.15)"},overflow:E={sm:"visible",md:"hidden",lg:"auto"},children:T,className:_,style:A})=>{const[R,M]=s.useState("lg");s.useEffect(()=>{M(rt(window.innerWidth));const F=()=>M(rt(window.innerWidth));return window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]);const X=s.useMemo(()=>{const F=ae(t,R,"block"),Y=ae(r,R,void 0),$=ae(a,R,void 0),N=ae(i,R,void 0),J=ae(c,R,void 0),k=ae(n,R,void 0),h=ae(l,R,void 0),I=ae(d,R,void 0),V=ae(S,R,void 0),U=ae(j,R,"100%"),o=ae(v,R,void 0),z=ae(f,R,void 0),L=ae(b,R,void 0),q=ae(x,R,void 0),K=ae(w,R,void 0),D=ae(C,R,void 0),G=ae(g,R,void 0),ne=ae(y,R,void 0),u=ae(E,R,void 0);return{display:F,...Y&&{flexDirection:Y},...$&&{justifyContent:$},...N&&{alignItems:N},...J&&{gridTemplateColumns:J},...k&&{gridTemplateRows:k},...h&&{gap:h},...I&&{rowGap:I},...V&&{columnGap:V},width:U,...o&&{maxWidth:o},...z&&{height:z},...L&&{padding:L},...q&&{margin:q},...K&&{textAlign:K},backgroundColor:m,...D&&{border:D},...G&&{borderRadius:G},...ne&&{boxShadow:ne},...u&&{overflow:u},boxSizing:"border-box",...A}},[R,t,r,a,i,c,n,l,d,S,j,v,f,b,x,w,m,C,g,y,E,A]);return e.jsx("div",{className:_,style:X,children:T})},$r=({items:t,allowMultiple:r=!1,defaultOpenIndex:a=[],borderColor:i="#d1d5db",backgroundColor:c="#ffffff",textColor:n="#111827",hoverBgColor:l="#f3f4f6",hoverTextColor:d="#111827",paddingVertical:S="16px",paddingHorizontal:j="16px",margin:v="12px 0",iconOpen:f="−",iconClose:b="+",transitionDuration:x="300ms",borderRadius:w="8px",shadow:m="0 2px 8px rgba(0, 0, 0, 0.05)",contentPadding:C="16px",fontSize:g="16px",fontWeight:y="600",iconSize:E="18px",contentFontSize:T="14px",contentFontWeight:_="400",contentBackgroundColor:A="#ffffff",contentTextColor:R="#111827",className:M,style:X})=>{const[F,Y]=s.useState(a),$=s.useRef([]),N=s.useRef([]);s.useEffect(()=>{$.current.forEach((k,h)=>{k&&(k.style.maxHeight=F.includes(h)?`${k.scrollHeight}px`:"0px")})},[F]);const J=k=>{Y(h=>r?h.includes(k)?h.filter(I=>I!==k):[...h,k]:h.includes(k)?[]:[k])};return e.jsx("div",{className:M,style:{width:"100%",...X},children:t.map((k,h)=>e.jsxs("div",{style:{border:`1px solid ${i}`,borderRadius:w,margin:v,boxShadow:m,overflow:"hidden",transition:`all ${x} ease`},children:[e.jsxs("button",{ref:I=>{N.current[h]=I},onClick:()=>J(h),style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:c,color:n,padding:`${S} ${j}`,fontWeight:y,fontSize:g,cursor:"pointer",outline:"none",border:"none",transition:`all ${x}`},onMouseEnter:I=>{I.currentTarget.style.backgroundColor=l,I.currentTarget.style.color=d},onMouseLeave:I=>{I.currentTarget.style.backgroundColor=c,I.currentTarget.style.color=n},children:[e.jsx("span",{children:k.title}),e.jsx("span",{style:{fontSize:E},children:F.includes(h)?f:b})]}),e.jsx("div",{ref:I=>{$.current[h]=I},style:{overflow:"hidden",maxHeight:F.includes(h)?`${$.current[h]?.scrollHeight}px`:"0px",transition:`max-height ${x} ease-in-out`},children:e.jsx("div",{style:{borderTop:`1px solid ${i}`,backgroundColor:A,color:R,padding:C,fontSize:T,fontWeight:_},children:k.content})})]},h))})},zr=({type:t,name:r,options:a,selectedValues:i,onChange:c,disabled:n=!1,readOnly:l=!1,required:d=!1,error:S,className:j="",customIcon:v,style:f,labelStyle:b,iconSize:x=20,iconCheckedBgColor:w="#2563eb",iconUncheckedBorderColor:m="#9ca3af",textColor:C="#374151",errorStyle:g})=>{const y=t==="checkbox",E=T=>{if(c)if(y){const _=Array.isArray(i)?i.includes(T)?i.filter(A=>A!==T):[...i,T]:[T];c(_)}else c(T)};return e.jsxs("div",{className:j,style:{display:"flex",flexDirection:"column",gap:8,...f},role:t,"aria-disabled":n,children:[a.map(T=>{const _=y?Array.isArray(i)&&i.includes(T.value):i===T.value;return e.jsxs("label",{style:{display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",opacity:n?.6:1,gap:8,userSelect:"none",...b},children:[e.jsx("input",{type:t,name:r,value:T.value,checked:_,disabled:n||l,required:d,onChange:()=>E(T.value),style:{display:"none"}}),v?v(_):e.jsxs("span",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:x,height:x,borderRadius:y?4:"50%",border:`2px solid ${_?w:m}`,backgroundColor:_?w:"transparent",transition:"all 0.2s ease",flexShrink:0},children:[_&&!y&&e.jsx("span",{style:{width:x/2,height:x/2,borderRadius:"50%",backgroundColor:"white"}}),_&&y&&e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",style:{width:x*.6,height:x*.6},children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})]}),e.jsx("span",{style:{color:C,fontSize:14},children:T.label})]},T.value)}),S&&e.jsx("p",{role:"alert",style:{color:"#dc2626",fontSize:12,marginTop:4,...g},children:S})]})},Mr=({label:t="Open Drawer",icon:r,iconPosition:a="left",onClick:i,style:c={}})=>e.jsxs("button",{onClick:i,style:{padding:"10px 16px",backgroundColor:"#2563eb",color:"#fff",border:"none",borderRadius:"6px",cursor:"pointer",display:"inline-flex",alignItems:"center",fontSize:"14px",gap:"8px",...c},children:[r&&a==="left"&&r,t,r&&a==="right"&&r]}),Ir=({open:t,onClose:r,position:a="right",width:i="300px",height:c="300px",backgroundColor:n="#fff",transitionDuration:l=300,style:d={},children:S,showCloseButton:j=!0,closeButtonStyle:v={}})=>{const[f,b]=s.useState(t);s.useEffect(()=>{t?b(!0):setTimeout(()=>b(!1),l)},[t,l]);const x=s.useMemo(()=>{if(t)return"translate(0, 0)";switch(a){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)";default:return"translate(0, 0)"}},[t,a]),w={position:"fixed",zIndex:1e3,backgroundColor:n,transition:`transform ${l}ms ease, opacity ${l}ms ease`,transform:x,opacity:t?1:0,...d,...a==="left"||a==="right"?{top:0,[a]:0,width:i,height:"100%"}:{left:0,[a]:0,height:c,width:"100%"}},m={position:"fixed",display:f?"block":"none",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:999,transition:`opacity ${l}ms ease`,opacity:t?1:0,pointerEvents:t?"auto":"none"},C={position:"absolute",top:"10px",right:"10px",fontSize:"20px",background:"none",border:"none",cursor:"pointer",color:"#000"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:m,onClick:r}),e.jsxs("div",{style:{...w,display:"block",visibility:f?"visible":"hidden",pointerEvents:t?"auto":"none"},children:[j&&e.jsx("button",{onClick:r,style:{...C,...v},children:e.jsx(De,{size:20,color:"rgba(255, 0, 0, 1)"})}),S]})]})},Cr=({options:t,value:r,defaultValue:a,onChange:i,placeholder:c="Select an option",disabled:n=!1,searchable:l=!1,multiSelect:d=!1,clearable:S=!1,virtualized:j=!1,optionHeight:v=36,visibleOptions:f=5,width:b="100%",height:x="auto",borderColor:w="#d1d5db",focusBorderColor:m="#2563eb",errorBorderColor:C="#dc2626",backgroundColor:g="#ffffff",textColor:y="#111827",placeholderColor:E="#9ca3af",hoverColor:T="#f3f4f6",selectedColor:_="#eff6ff",disabledColor:A="#f3f4f6",padding:R="0.5rem 0.75rem",margin:M="0",borderRadius:X="0.375rem",boxShadow:F="0 1px 2px 0 rgba(0, 0, 0, 0.05)",optionPadding:Y="0.5rem 0.75rem",optionGap:$="0.5rem",transitionDuration:N="200ms",dropdownMaxHeight:J="300px",dropdownMinWidth:k="100%",className:h="",dropdownClassName:I="",optionClassName:V="",inputClassName:U="",style:o,dropdownStyle:z,optionStyle:L,inputStyle:q,iconPrefix:K,iconSuffix:D,clearIcon:G="×",dropdownIcon:ne="▼",checkIcon:u="✓",ariaLabel:O,ariaLabelledby:p,ariaDescribedby:B,onFocus:Q,onBlur:W,onOpen:Z,onClose:re})=>{const[ie,se]=s.useState([]),[ce,fe]=s.useState(!1),[xe,he]=s.useState(""),[ye,pe]=s.useState(null),ge=s.useRef(null),we=s.useRef(null),je=s.useRef([]);s.useEffect(()=>{se(r?d?r.split(","):[r]:a?d?a.split(","):[a]:[])},[r,a,d]);const de=l?t.filter(H=>H.label.toLowerCase().includes(xe.toLowerCase())):t;s.useEffect(()=>{const H=oe=>{ge.current&&!ge.current.contains(oe.target)&&(fe(!1),re?.())};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[re]),s.useEffect(()=>{const H=oe=>{if(ce)switch(oe.key){case"ArrowDown":oe.preventDefault(),pe(ue=>{const be=ue===null?0:Math.min(ue+1,de.length-1);return Te(be),be});break;case"ArrowUp":oe.preventDefault(),pe(ue=>{const be=ue===null?0:Math.max(ue-1,0);return Te(be),be});break;case"Enter":oe.preventDefault(),ye!==null&&Re(de[ye].value);break;case"Escape":oe.preventDefault(),fe(!1),re?.();break;case"Tab":fe(!1),re?.();break}};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[ce,ye,de]);const Te=s.useCallback(H=>{je.current[H]?.scrollIntoView({block:"nearest",behavior:"smooth"})},[]),Re=H=>{let oe;d?oe=ie.includes(H)?ie.filter(ue=>ue!==H):[...ie,H]:(oe=[H],fe(!1),re?.()),se(oe),i?.(d?oe.join(","):H)},$e=H=>{H.stopPropagation(),se([]),i?.(""),he("")},Ye=()=>{if(n)return;const H=!ce;fe(H),H?(Z?.(),l&&setTimeout(()=>we.current?.focus(),0)):re?.()},ke=t.find(H=>H.value===ie[0]),Ve=t.filter(H=>ie.includes(H.value)),[ee,Me]=s.useState(0),Ie=Math.min(f,de.length),Ce=Math.min(ee+Ie,de.length),Pe=j?de.slice(ee,Ce):de;return e.jsxs("div",{ref:ge,className:`dropdown-container ${h}`,style:{position:"relative",width:b,margin:M,fontFamily:"'Inter', sans-serif",...o},children:[e.jsx("style",{children:`
|
|
293
248
|
.dropdown-container {
|
|
294
|
-
--border-color: ${
|
|
295
|
-
--focus-border-color: ${
|
|
296
|
-
--error-border-color: ${
|
|
297
|
-
--bg-color: ${
|
|
298
|
-
--text-color: ${
|
|
299
|
-
--placeholder-color: ${
|
|
300
|
-
--hover-color: ${
|
|
301
|
-
--selected-color: ${
|
|
302
|
-
--disabled-color: ${
|
|
303
|
-
--transition-duration: ${
|
|
249
|
+
--border-color: ${w};
|
|
250
|
+
--focus-border-color: ${m};
|
|
251
|
+
--error-border-color: ${C};
|
|
252
|
+
--bg-color: ${g};
|
|
253
|
+
--text-color: ${y};
|
|
254
|
+
--placeholder-color: ${E};
|
|
255
|
+
--hover-color: ${T};
|
|
256
|
+
--selected-color: ${_};
|
|
257
|
+
--disabled-color: ${A};
|
|
258
|
+
--transition-duration: ${N};
|
|
304
259
|
}
|
|
305
|
-
`}),e.jsxs("div",{role:"button",onClick:
|
|
260
|
+
`}),e.jsxs("div",{role:"button",onClick:Ye,"aria-disabled":n,"aria-haspopup":"listbox","aria-expanded":ce,"aria-label":O,"aria-labelledby":p,"aria-describedby":B,className:`dropdown-control ${U}`,style:{width:"100%",minHeight:x,padding:R,backgroundColor:n?A:g,color:y,borderWidth:"1px",borderStyle:"solid",borderColor:ce?m:w,borderRadius:X,boxShadow:F,display:"flex",alignItems:"center",justifyContent:"space-between",cursor:n?"not-allowed":"pointer",opacity:n?.7:1,transition:`all ${N} ease-in-out`,textAlign:"left",...q,...ce&&{boxShadow:`0 0 0 1px ${m}`}},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:$,flex:1,overflow:"hidden"},children:[K&&e.jsx("span",{className:"dropdown-icon-prefix",style:{flexShrink:0},children:K}),d?e.jsx("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",flex:1,overflow:"hidden"},children:Ve.length>0?Ve.map(H=>e.jsxs("span",{style:{backgroundColor:_,padding:"0.25rem 0.5rem",borderRadius:"0.25rem",fontSize:"0.875rem",display:"flex",alignItems:"center",gap:"0.25rem",flexShrink:0},children:[H.icon&&e.jsx("span",{style:{flexShrink:0},children:H.icon}),e.jsx("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:H.label})]},H.value)):e.jsx("span",{style:{color:E},children:c})}):e.jsxs("span",{style:{color:ke?y:E,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:$},children:[ke?.icon&&e.jsx("span",{style:{flexShrink:0},children:ke.icon}),ke?ke.label:c]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginLeft:"0.5rem",flexShrink:0},children:[S&&ie.length>0&&e.jsx("span",{onClick:$e,style:{cursor:n?"not-allowed":"pointer",fontSize:"1rem",color:y,opacity:.7,display:"flex",alignItems:"center",justifyContent:"center"},"aria-label":"Clear selection",children:G}),e.jsx("span",{style:{transition:`transform ${N}`,transform:ce?"rotate(180deg)":"rotate(0deg)",fontSize:"0.75rem",color:y,opacity:.7},children:ne})]})]}),ce&&e.jsxs("div",{className:`dropdown-menu ${I}`,style:{position:"absolute",top:"100%",left:0,zIndex:1e3,width:"100%",minWidth:k,maxHeight:J,overflowY:"auto",backgroundColor:g,border:`1px solid ${w}`,borderRadius:X,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",marginTop:"0.25rem",transition:`opacity ${N}, transform ${N}`,opacity:0,transform:"translateY(-0.5rem)",animation:`dropdownFadeIn ${N} ease-out forwards`,...z},role:"listbox","aria-multiselectable":d,children:[l&&e.jsx("div",{style:{padding:"0.5rem",borderBottom:`1px solid ${w}`},children:e.jsx("input",{ref:we,type:"text",value:xe,onChange:H=>he(H.target.value),placeholder:"Search...",style:{width:"100%",padding:"0.5rem 0.75rem",borderWidth:"1px",borderStyle:"solid",color:y,borderColor:ce?m:w,borderRadius:"0.25rem",outline:"none",transition:`border-color ${N}`,...ce&&{boxShadow:`0 0 0 1px ${m}`}},onFocus:Q,onBlur:W})}),e.jsx("ul",{style:{margin:0,padding:"0.25rem 0",listStyle:"none"},children:de.length>0?Pe.map((H,oe)=>{const ue=ie.includes(H.value),be=ye===(j?ee+oe:oe),me=H.disabled;return e.jsxs("li",{ref:Ae=>{if(Ae){const He=j?ee+oe:oe;je.current[He]=Ae}},onClick:()=>!me&&Re(H.value),onMouseEnter:()=>!me&&pe(j?ee+oe:oe),className:`dropdown-option ${V} ${me?"disabled":""}`,style:{padding:Y,cursor:me?"not-allowed":"pointer",backgroundColor:ue?_:be?T:g,color:me?A:y,display:"flex",alignItems:"center",gap:$,transition:`background-color ${N}`,...L},role:"option","aria-selected":ue,"aria-disabled":me,children:[d&&e.jsx("span",{style:{flexShrink:0},children:ue?u:"○"}),H.icon&&e.jsx("span",{style:{flexShrink:0},children:H.icon}),e.jsx("span",{style:{flex:1},children:H.label})]},H.value)}):e.jsx("li",{style:{padding:Y,color:E,textAlign:"center"},children:"No options found"})}),j&&de.length>Ie&&e.jsx("div",{style:{height:`${(de.length-Ie)*v}px`}})]}),e.jsx("style",{children:`
|
|
306
261
|
@keyframes dropdownFadeIn {
|
|
307
262
|
to {
|
|
308
263
|
opacity: 1;
|
|
309
264
|
transform: translateY(0);
|
|
310
265
|
}
|
|
311
266
|
}
|
|
312
|
-
`})]})},no=({columns:t,data:s,className:c="",pagination:i=!0,rowsPerPage:u=5,colors:a={headerBg:"#3b82f6",headerText:"#ffffff",rowBg:"#ffffff",rowText:"#000000",borderColor:"#d1d5db",hoverBg:"#e5e7eb",paginationBg:"#d1d5db",paginationText:"#000000",evenRowBg:"#f9fafb",selectedRowBg:"#e0f2fe"},borderRadius:d={table:"8px",header:"8px",pagination:"6px"},sortable:p=!0,defaultSort:z,bodyAlign:C="left",headerAlign:j="left",rowSelection:h={enabled:!1},emptyState:m=e.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"No data available"}),onRowClick:g,rowClassName:k,cellPadding:w="12px",headerCellPadding:_="12px",stickyHeader:y=!1,maxHeight:v,scrollShadow:A=!1})=>{const[M,B]=n.useState(z?.column||null),[Y,R]=n.useState(z?.direction||"asc"),[E,J]=n.useState(1),[H,Q]=n.useState(null),[$,F]=n.useState([]),ne=(x,V)=>{!p||!V||(M===x?R(Y==="asc"?"desc":"asc"):(B(x),R("asc")),J(1))},S=x=>{const V=$.some(W=>W.id===x.id);let f;V?f=$.filter(W=>W.id!==x.id):f=[...$,x],F(f),h.onSelect?.(f)},b=()=>{$.length===G.length?(F([]),h.onSelect?.([])):(F([...G]),h.onSelect?.([...G]))},L=n.useMemo(()=>M?[...s].sort((x,V)=>{const f=x[M],W=V[M];if(f==null&&W==null)return 0;if(f==null)return Y==="asc"?-1:1;if(W==null)return Y==="asc"?1:-1;if(typeof f=="number"&&typeof W=="number")return Y==="asc"?f-W:W-f;if(f instanceof Date&&W instanceof Date)return Y==="asc"?f.getTime()-W.getTime():W.getTime()-f.getTime();const ae=String(f).toLowerCase(),X=String(W).toLowerCase();return ae===X?0:Y==="asc"?ae>X?1:-1:ae<X?1:-1}):[...s],[s,M,Y]),G=i?L.slice((E-1)*u,E*u):L,K=Math.ceil(s.length/u),l=x=>$.some(V=>V.id===x.id),I=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"})}),P=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z"})}),ee=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 320 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M182.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L128 109.3l0 293.5L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7l0-293.5 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96z"})}),oe=e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("path",{d:"M9 12l2 2 4-4"})]}),q=e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]}),Z=$.length===G.length&&G.length>0,de=$.length>0&&!Z;return e.jsxs("div",{style:{overflowX:"auto",width:"100%",maxHeight:v,position:"relative",boxShadow:A?"0 2px 4px rgba(0,0,0,0.1)":"none"},className:c,children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",border:`1px solid ${a.borderColor}`,tableLayout:"auto",minWidth:"400px",borderRadius:d.table,borderSpacing:0,overflow:"hidden"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[h.enabled&&e.jsx("th",{style:{width:h.selectionColumnWidth||"40px",padding:_,backgroundColor:a.headerBg,color:a.headerText,border:`1px solid ${a.borderColor}`,position:y?"sticky":void 0,top:y?0:void 0,zIndex:y?1:void 0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:b,children:de?q:Z?oe:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})})})}),t.map(({key:x,label:V,sortable:f,icon:W,width:ae,align:X,headerClassName:se},ce)=>e.jsx("th",{onClick:()=>ne(x,f),style:{width:ae,padding:_,border:`1px solid ${a.borderColor}`,cursor:p&&f?"pointer":"default",backgroundColor:a.headerBg,color:a.headerText,userSelect:"none",borderTopLeftRadius:ce===0&&!h.enabled?d.header:void 0,borderTopRightRadius:ce===t.length-1?d.header:void 0,textAlign:X||j,whiteSpace:"nowrap",position:y?"sticky":void 0,top:y?0:void 0,zIndex:y?1:void 0},className:se,"aria-sort":M===x?Y==="asc"?"ascending":"descending":void 0,role:p&&f?"button":void 0,tabIndex:p&&f?0:void 0,onKeyDown:fe=>{p&&f&&(fe.key==="Enter"||fe.key===" ")&&(fe.preventDefault(),ne(x,f))},children:e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px",justifyContent:X==="right"?"flex-end":X==="center"?"center":"flex-start"},children:[W&&e.jsx("span",{children:W}),e.jsx("span",{children:V}),p&&f&&(M===x?Y==="asc"?I:P:ee)]})},x))]})}),e.jsx("tbody",{children:G.length>0?G.map((x,V)=>{const f=l(x),W=V%2===0;return e.jsxs("tr",{style:{backgroundColor:f?a.selectedRowBg:W&&a.evenRowBg||a.rowBg,color:a.rowText,transition:"background-color 0.2s ease-in-out",cursor:g?"pointer":"default"},onMouseEnter:()=>Q(V),onMouseLeave:()=>Q(null),onClick:()=>g?.(x,V),className:k?.(x,V),children:[h.enabled&&e.jsx("td",{style:{padding:w,border:`1px solid ${a.borderColor}`,textAlign:"center"},onClick:ae=>{ae.stopPropagation(),S(x)},children:f?oe:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})})}),t.map(({key:ae,align:X,render:se,cellClassName:ce})=>e.jsx("td",{style:{padding:w,border:`1px solid ${a.borderColor}`,whiteSpace:"nowrap",textAlign:X||C},className:ce,children:se?se(x[ae],x):x[ae]},ae))]},V)}):e.jsx("tr",{children:e.jsx("td",{colSpan:t.length+(h.enabled?1:0),style:{padding:"20px",textAlign:"center",border:`1px solid ${a.borderColor}`},children:m})})})]}),i&&K>1&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"12px",padding:"8px",userSelect:"none"},children:[e.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",backgroundColor:a.paginationBg,color:a.paginationText,borderRadius:d.pagination,border:"none",opacity:E===1?.5:1,cursor:E===1?"not-allowed":"pointer",fontSize:"0.875rem"},disabled:E===1,onClick:()=>J(x=>Math.max(x-1,1)),"aria-label":"Previous page",type:"button",children:[e.jsx(Tt,{size:16}),"Prev"]}),e.jsx("div",{style:{display:"flex",gap:"4px"},children:Array.from({length:Math.min(5,K)},(x,V)=>{let f;return K<=5||E<=3?f=V+1:E>=K-2?f=K-4+V:f=E-2+V,e.jsx("button",{style:{padding:"6px 12px",backgroundColor:E===f?a.headerBg:a.paginationBg,color:E===f?a.headerText:a.paginationText,borderRadius:d.pagination,border:"none",cursor:"pointer",fontSize:"0.875rem",minWidth:"36px"},onClick:()=>J(f),"aria-label":`Page ${f}`,type:"button",children:f},f)})}),e.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",backgroundColor:a.paginationBg,color:a.paginationText,borderRadius:d.pagination,border:"none",opacity:E===K?.5:1,cursor:E===K?"not-allowed":"pointer",fontSize:"0.875rem"},disabled:E===K,onClick:()=>J(x=>Math.min(x+1,K)),"aria-label":"Next page",type:"button",children:["Next",e.jsx(Ct,{size:16})]})]})]})},oo=(t,s)=>{const{as:c,children:i,className:u="",style:a={},background:d="#fff",backgroundImage:p,backgroundSize:z="cover",backgroundPosition:C="center",backgroundRepeat:j="no-repeat",backgroundGradient:h,backgroundBlendMode:m,textColor:g="#000",hoverStyles:k={},activeStyles:w={},borderRadius:_=12,border:y="none",borderTop:v,borderRight:A,borderBottom:M,borderLeft:B,boxShadow:Y="0 4px 12px rgba(0,0,0,0.1)",hoverShadow:R,transition:E="all 0.2s ease",padding:J,paddingX:H,paddingY:Q,margin:$,marginX:F,marginY:ne,width:S,minWidth:b,maxWidth:L="100%",height:G,minHeight:K,maxHeight:l,display:I="flex",flexDirection:P="column",justifyContent:ee="flex-start",alignItems:oe="stretch",alignContent:q,flexWrap:Z,flex:de,gap:x=16,position:V,top:f,right:W,bottom:ae,left:X,zIndex:se,overflow:ce,overflowX:fe,overflowY:pe,cursor:ve,pointerEvents:ke,userSelect:Re,transform:Me,transformOrigin:Ie,backdropFilter:we,filter:Se,opacity:Ae,visibility:Pe,...he}=t,me=c||"div",De={background:h?`${h}${d?`, ${d}`:""}`:d,color:g,...p?{backgroundImage:`url(${p})`,backgroundSize:z,backgroundPosition:C,backgroundRepeat:j}:{},backgroundBlendMode:m,borderRadius:_,boxShadow:Y,transition:E,...J?{padding:J}:{paddingTop:Q,paddingBottom:Q,paddingLeft:H,paddingRight:H},...$?{margin:$}:{marginTop:ne,marginBottom:ne,marginLeft:F,marginRight:F},width:S,minWidth:b,maxWidth:L,height:G,minHeight:K,maxHeight:l,display:I,flexDirection:P,justifyContent:ee,alignItems:oe,alignContent:q,flexWrap:Z,flex:de,gap:x,position:V,top:f,right:W,bottom:ae,left:X,zIndex:se,overflow:ce,overflowX:fe,overflowY:pe,cursor:ve,pointerEvents:ke,userSelect:Re,transform:Me,transformOrigin:Ie,backdropFilter:we,filter:Se,opacity:Ae,visibility:Pe,border:y,...v&&{borderTop:v},...A&&{borderRight:A},...M&&{borderBottom:M},...B&&{borderLeft:B},boxSizing:"border-box"},Oe={"--hover-shadow":R,"--hover-styles":JSON.stringify(k),"--active-styles":JSON.stringify(w)};return e.jsx(me,{ref:s,className:`card ${u}`,style:{...De,...Oe,...a},...he,children:i})},so=n.forwardRef(oo),ao=Object.assign(so,{displayName:"Card"}),Ht=t=>t<768?"sm":t<1024?"md":"lg",io=({columns:t={sm:1,md:2,lg:3},gap:s="16px",padding:c="20px",alignItems:i="stretch",justifyItems:u="stretch",backgroundColor:a="transparent",width:d="100%",maxWidth:p="100%",height:z="auto",children:C,style:j})=>{const[h,m]=n.useState(Ht(window.innerWidth));n.useEffect(()=>{const w=()=>m(Ht(window.innerWidth));return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]);const g=n.useMemo(()=>typeof t=="number"?t:t[h]??1,[t,h]),k=n.useMemo(()=>({display:"grid",gridTemplateColumns:`repeat(${g}, 1fr)`,gap:s,padding:c,alignItems:i,justifyItems:u,backgroundColor:a,width:d,maxWidth:p,height:z,boxSizing:"border-box",...j}),[g,s,c,i,u,a,d,p,z,j]);return e.jsx("div",{style:k,children:C})},qt=t=>t<768?"sm":t<1024?"md":"lg",lo=({direction:t="row",align:s="center",justify:c="space-between",gap:i=16,padding:u=20,backgroundColor:a="transparent",width:d="100%",maxWidth:p="100%",height:z="auto",style:C,children:j})=>{const[h,m]=n.useState(qt(window.innerWidth));n.useEffect(()=>{const w=()=>m(qt(window.innerWidth));return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]);const g=n.useMemo(()=>typeof t=="string"?t:t[h]??"row",[t,h]),k=n.useMemo(()=>({display:"flex",flexDirection:g,alignItems:s,justifyContent:c,gap:typeof i=="number"?`${i}px`:i,padding:typeof u=="number"?`${u}px`:u,backgroundColor:a,width:d,maxWidth:p,height:z,boxSizing:"border-box",...C}),[g,s,c,i,u,a,d,p,z,C]);return e.jsx("div",{style:k,children:j})},co={success:{bg:"#ecfdf5",border:"#34d399",iconColor:"#059669",Icon:e.jsx(Kr,{size:20})},error:{bg:"#fef2f2",border:"#f87171",iconColor:"#dc2626",Icon:e.jsx(Jr,{size:20})},warning:{bg:"#fffbeb",border:"#facc15",iconColor:"#d97706",Icon:e.jsx(Bn,{size:20})},info:{bg:"#eff6ff",border:"#3b82f6",iconColor:"#2563eb",Icon:e.jsx(fn,{size:20})}},uo=t=>{const s={position:"fixed",zIndex:9999};switch(t){case"top-left":return{...s,top:"20px",left:"20px"};case"top-center":return{...s,top:"20px",left:"50%",transform:"translateX(-50%)"};case"top-right":return{...s,top:"20px",right:"20px"};case"bottom-left":return{...s,bottom:"20px",left:"20px"};case"bottom-center":return{...s,bottom:"20px",left:"50%",transform:"translateX(-50%)"};case"bottom-right":default:return{...s,bottom:"20px",right:"20px"}}},po=({title:t="",description:s="",type:c="info",dismissible:i=!0,onClose:u,duration:a,icon:d,actionButton:p,position:z="top-right",className:C,style:j})=>{const[h,m]=n.useState(!0);if(n.useEffect(()=>{if(a){const v=setTimeout(()=>{m(!1),u?.()},a);return()=>clearTimeout(v)}},[a,u]),!h)return null;const{bg:g,border:k,iconColor:w,Icon:_}=co[c],y=uo(z);return e.jsxs("div",{className:C,style:{...y,display:"flex",gap:"12px",padding:"16px",backgroundColor:g,borderLeft:`4px solid ${k}`,borderRadius:"8px",color:"#111827",alignItems:"flex-start",boxShadow:"0 4px 12px rgba(0,0,0,0.08)",transition:"all 0.3s ease",animation:"slideIn 0.3s ease",maxWidth:"600px",width:"calc(100% - 40px)",...j},children:[e.jsx("div",{style:{color:w,marginTop:"3px"},children:d||_}),e.jsxs("div",{style:{flex:1},children:[t&&e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:t}),s&&e.jsx("div",{style:{fontSize:"14px",color:"#374151"},children:s}),p&&e.jsx("div",{style:{marginTop:"10px"},children:p})]}),i&&e.jsx("button",{onClick:()=>{m(!1),u?.()},style:{background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",marginLeft:"8px"},children:e.jsx(at,{size:16})}),e.jsx("style",{children:`
|
|
267
|
+
`})]})},Er=({columns:t,data:r,className:a="",pagination:i=!0,rowsPerPage:c=5,colors:n={headerBg:"#3b82f6",headerText:"#ffffff",rowBg:"#ffffff",rowText:"#000000",borderColor:"#d1d5db",hoverBg:"#e5e7eb",paginationBg:"#d1d5db",paginationText:"#000000",evenRowBg:"#f9fafb",selectedRowBg:"#e0f2fe"},borderRadius:l={table:"8px",header:"8px",pagination:"6px"},sortable:d=!0,defaultSort:S,bodyAlign:j="left",headerAlign:v="left",rowSelection:f={enabled:!1},emptyState:b=e.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"No data available"}),onRowClick:x,rowClassName:w,cellPadding:m="12px",headerCellPadding:C="12px",stickyHeader:g=!1,maxHeight:y,scrollShadow:E=!1})=>{const[T,_]=s.useState(S?.column||null),[A,R]=s.useState(S?.direction||"asc"),[M,X]=s.useState(1),[F,Y]=s.useState(null),[$,N]=s.useState([]),J=(u,O)=>{!d||!O||(T===u?R(A==="asc"?"desc":"asc"):(_(u),R("asc")),X(1))},k=u=>{const O=$.some(B=>B.id===u.id);let p;O?p=$.filter(B=>B.id!==u.id):p=[...$,u],N(p),f.onSelect?.(p)},h=()=>{$.length===V.length?(N([]),f.onSelect?.([])):(N([...V]),f.onSelect?.([...V]))},I=s.useMemo(()=>T?[...r].sort((u,O)=>{const p=u[T],B=O[T];if(p==null&&B==null)return 0;if(p==null)return A==="asc"?-1:1;if(B==null)return A==="asc"?1:-1;if(typeof p=="number"&&typeof B=="number")return A==="asc"?p-B:B-p;if(p instanceof Date&&B instanceof Date)return A==="asc"?p.getTime()-B.getTime():B.getTime()-p.getTime();const Q=String(p).toLowerCase(),W=String(B).toLowerCase();return Q===W?0:A==="asc"?Q>W?1:-1:Q<W?1:-1}):[...r],[r,T,A]),V=i?I.slice((M-1)*c,M*c):I,U=Math.ceil(r.length/c),o=u=>$.some(O=>O.id===u.id),z=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"})}),L=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z"})}),q=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 320 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M182.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L128 109.3l0 293.5L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7l0-293.5 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96z"})}),K=e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("path",{d:"M9 12l2 2 4-4"})]}),D=e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]}),G=$.length===V.length&&V.length>0,ne=$.length>0&&!G;return e.jsxs("div",{style:{overflowX:"auto",width:"100%",maxHeight:y,position:"relative",boxShadow:E?"0 2px 4px rgba(0,0,0,0.1)":"none"},className:a,children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",border:`1px solid ${n.borderColor}`,tableLayout:"auto",minWidth:"400px",borderRadius:l.table,borderSpacing:0,overflow:"hidden"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[f.enabled&&e.jsx("th",{style:{width:f.selectionColumnWidth||"40px",padding:C,backgroundColor:n.headerBg,color:n.headerText,border:`1px solid ${n.borderColor}`,position:g?"sticky":void 0,top:g?0:void 0,zIndex:g?1:void 0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:h,children:ne?D:G?K:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})})})}),t.map(({key:u,label:O,sortable:p,icon:B,width:Q,align:W,headerClassName:Z},re)=>e.jsx("th",{onClick:()=>J(u,p),style:{width:Q,padding:C,border:`1px solid ${n.borderColor}`,cursor:d&&p?"pointer":"default",backgroundColor:n.headerBg,color:n.headerText,userSelect:"none",borderTopLeftRadius:re===0&&!f.enabled?l.header:void 0,borderTopRightRadius:re===t.length-1?l.header:void 0,textAlign:W||v,whiteSpace:"nowrap",position:g?"sticky":void 0,top:g?0:void 0,zIndex:g?1:void 0},className:Z,"aria-sort":T===u?A==="asc"?"ascending":"descending":void 0,role:d&&p?"button":void 0,tabIndex:d&&p?0:void 0,onKeyDown:ie=>{d&&p&&(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),J(u,p))},children:e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px",justifyContent:W==="right"?"flex-end":W==="center"?"center":"flex-start"},children:[B&&e.jsx("span",{children:B}),e.jsx("span",{children:O}),d&&p&&(T===u?A==="asc"?z:L:q)]})},u))]})}),e.jsx("tbody",{children:V.length>0?V.map((u,O)=>{const p=o(u),B=O%2===0;return e.jsxs("tr",{style:{backgroundColor:p?n.selectedRowBg:B&&n.evenRowBg||n.rowBg,color:n.rowText,transition:"background-color 0.2s ease-in-out",cursor:x?"pointer":"default"},onMouseEnter:()=>Y(O),onMouseLeave:()=>Y(null),onClick:()=>x?.(u,O),className:w?.(u,O),children:[f.enabled&&e.jsx("td",{style:{padding:m,border:`1px solid ${n.borderColor}`,textAlign:"center"},onClick:Q=>{Q.stopPropagation(),k(u)},children:p?K:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})})}),t.map(({key:Q,align:W,render:Z,cellClassName:re})=>e.jsx("td",{style:{padding:m,border:`1px solid ${n.borderColor}`,whiteSpace:"nowrap",textAlign:W||j},className:re,children:Z?Z(u[Q],u):u[Q]},Q))]},O)}):e.jsx("tr",{children:e.jsx("td",{colSpan:t.length+(f.enabled?1:0),style:{padding:"20px",textAlign:"center",border:`1px solid ${n.borderColor}`},children:b})})})]}),i&&U>1&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"12px",padding:"8px",userSelect:"none"},children:[e.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",backgroundColor:n.paginationBg,color:n.paginationText,borderRadius:l.pagination,border:"none",opacity:M===1?.5:1,cursor:M===1?"not-allowed":"pointer",fontSize:"0.875rem"},disabled:M===1,onClick:()=>X(u=>Math.max(u-1,1)),"aria-label":"Previous page",type:"button",children:[e.jsx(it,{size:16}),"Prev"]}),e.jsx("div",{style:{display:"flex",gap:"4px"},children:Array.from({length:Math.min(5,U)},(u,O)=>{let p;return U<=5||M<=3?p=O+1:M>=U-2?p=U-4+O:p=M-2+O,e.jsx("button",{style:{padding:"6px 12px",backgroundColor:M===p?n.headerBg:n.paginationBg,color:M===p?n.headerText:n.paginationText,borderRadius:l.pagination,border:"none",cursor:"pointer",fontSize:"0.875rem",minWidth:"36px"},onClick:()=>X(p),"aria-label":`Page ${p}`,type:"button",children:p},p)})}),e.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",backgroundColor:n.paginationBg,color:n.paginationText,borderRadius:l.pagination,border:"none",opacity:M===U?.5:1,cursor:M===U?"not-allowed":"pointer",fontSize:"0.875rem"},disabled:M===U,onClick:()=>X(u=>Math.min(u+1,U)),"aria-label":"Next page",type:"button",children:["Next",e.jsx(at,{size:16})]})]})]})},_r=(t,r)=>{const{as:a,children:i,className:c="",style:n={},background:l="#fff",backgroundImage:d,backgroundSize:S="cover",backgroundPosition:j="center",backgroundRepeat:v="no-repeat",backgroundGradient:f,backgroundBlendMode:b,textColor:x="#000",hoverStyles:w={},activeStyles:m={},borderRadius:C=12,border:g="none",borderTop:y,borderRight:E,borderBottom:T,borderLeft:_,boxShadow:A="0 4px 12px rgba(0,0,0,0.1)",hoverShadow:R,transition:M="all 0.2s ease",padding:X,paddingX:F,paddingY:Y,margin:$,marginX:N,marginY:J,width:k,minWidth:h,maxWidth:I="100%",height:V,minHeight:U,maxHeight:o,display:z="flex",flexDirection:L="column",justifyContent:q="flex-start",alignItems:K="stretch",alignContent:D,flexWrap:G,flex:ne,gap:u=16,position:O,top:p,right:B,bottom:Q,left:W,zIndex:Z,overflow:re,overflowX:ie,overflowY:se,cursor:ce,pointerEvents:fe,userSelect:xe,transform:he,transformOrigin:ye,backdropFilter:pe,filter:ge,opacity:we,visibility:je,...de}=t,Te=a||"div",Re={background:f?`${f}${l?`, ${l}`:""}`:l,color:x,...d?{backgroundImage:`url(${d})`,backgroundSize:S,backgroundPosition:j,backgroundRepeat:v}:{},backgroundBlendMode:b,borderRadius:C,boxShadow:A,transition:M,...X?{padding:X}:{paddingTop:Y,paddingBottom:Y,paddingLeft:F,paddingRight:F},...$?{margin:$}:{marginTop:J,marginBottom:J,marginLeft:N,marginRight:N},width:k,minWidth:h,maxWidth:I,height:V,minHeight:U,maxHeight:o,display:z,flexDirection:L,justifyContent:q,alignItems:K,alignContent:D,flexWrap:G,flex:ne,gap:u,position:O,top:p,right:B,bottom:Q,left:W,zIndex:Z,overflow:re,overflowX:ie,overflowY:se,cursor:ce,pointerEvents:fe,userSelect:xe,transform:he,transformOrigin:ye,backdropFilter:pe,filter:ge,opacity:we,visibility:je,border:g,...y&&{borderTop:y},...E&&{borderRight:E},...T&&{borderBottom:T},..._&&{borderLeft:_},boxSizing:"border-box"},$e={"--hover-shadow":R,"--hover-styles":JSON.stringify(w),"--active-styles":JSON.stringify(m)};return e.jsx(Te,{ref:r,className:`card ${c}`,style:{...Re,...$e,...n},...de,children:i})},Lr=s.forwardRef(_r),Pr=Object.assign(Lr,{displayName:"Card"}),nt=t=>t<768?"sm":t<1024?"md":"lg",Ar=({columns:t={sm:1,md:2,lg:3},gap:r="16px",padding:a="20px",alignItems:i="stretch",justifyItems:c="stretch",backgroundColor:n="transparent",width:l="100%",maxWidth:d="100%",height:S="auto",children:j,style:v})=>{const[f,b]=s.useState("lg");s.useEffect(()=>{b(nt(window.innerWidth));const m=()=>b(nt(window.innerWidth));return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const x=s.useMemo(()=>typeof t=="number"?t:t[f]??1,[t,f]),w=s.useMemo(()=>({display:"grid",gridTemplateColumns:`repeat(${x}, 1fr)`,gap:r,padding:a,alignItems:i,justifyItems:c,backgroundColor:n,width:l,maxWidth:d,height:S,boxSizing:"border-box",...v}),[x,r,a,i,c,n,l,d,S,v]);return e.jsx("div",{style:w,children:j})},st=t=>t<768?"sm":t<1024?"md":"lg",Nr=({direction:t="row",align:r="center",justify:a="space-between",gap:i=16,padding:c=20,backgroundColor:n="transparent",width:l="100%",maxWidth:d="100%",height:S="auto",style:j,children:v})=>{const[f,b]=s.useState("lg");s.useEffect(()=>{b(st(window.innerWidth));const m=()=>b(st(window.innerWidth));return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const x=s.useMemo(()=>typeof t=="string"?t:t[f]??"row",[t,f]),w=s.useMemo(()=>({display:"flex",flexDirection:x,alignItems:r,justifyContent:a,gap:typeof i=="number"?`${i}px`:i,padding:typeof c=="number"?`${c}px`:c,backgroundColor:n,width:l,maxWidth:d,height:S,boxSizing:"border-box",...j}),[x,r,a,i,c,n,l,d,S,j]);return e.jsx("div",{style:w,children:v})},Br={success:{bg:"#ecfdf5",border:"#34d399",iconColor:"#059669",Icon:e.jsx(Nt,{size:20})},error:{bg:"#fef2f2",border:"#f87171",iconColor:"#dc2626",Icon:e.jsx(Pt,{size:20})},warning:{bg:"#fffbeb",border:"#facc15",iconColor:"#d97706",Icon:e.jsx(fr,{size:20})},info:{bg:"#eff6ff",border:"#3b82f6",iconColor:"#2563eb",Icon:e.jsx(Ut,{size:20})}},Or=t=>{const r={position:"fixed",zIndex:9999};switch(t){case"top-left":return{...r,top:"20px",left:"20px"};case"top-center":return{...r,top:"20px",left:"50%",transform:"translateX(-50%)"};case"top-right":return{...r,top:"20px",right:"20px"};case"bottom-left":return{...r,bottom:"20px",left:"20px"};case"bottom-center":return{...r,bottom:"20px",left:"50%",transform:"translateX(-50%)"};case"bottom-right":default:return{...r,bottom:"20px",right:"20px"}}},Fr=({title:t="",description:r="",type:a="info",dismissible:i=!0,onClose:c,duration:n,icon:l,actionButton:d,position:S="top-right",className:j,style:v})=>{const[f,b]=s.useState(!0);if(s.useEffect(()=>{if(n){const y=setTimeout(()=>{b(!1),c?.()},n);return()=>clearTimeout(y)}},[n,c]),!f)return null;const{bg:x,border:w,iconColor:m,Icon:C}=Br[a],g=Or(S);return e.jsxs("div",{className:j,style:{...g,display:"flex",gap:"12px",padding:"16px",backgroundColor:x,borderLeft:`4px solid ${w}`,borderRadius:"8px",color:"#111827",alignItems:"flex-start",boxShadow:"0 4px 12px rgba(0,0,0,0.08)",transition:"all 0.3s ease",animation:"slideIn 0.3s ease",maxWidth:"600px",width:"calc(100% - 40px)",...v},children:[e.jsx("div",{style:{color:m,marginTop:"3px"},children:l||C}),e.jsxs("div",{style:{flex:1},children:[t&&e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:t}),r&&e.jsx("div",{style:{fontSize:"14px",color:"#374151"},children:r}),d&&e.jsx("div",{style:{marginTop:"10px"},children:d})]}),i&&e.jsx("button",{onClick:()=>{b(!1),c?.()},style:{background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",marginLeft:"8px"},children:e.jsx(De,{size:16})}),e.jsx("style",{children:`
|
|
313
268
|
@keyframes slideIn {
|
|
314
269
|
from { opacity: 0; transform: translateY(-10px); }
|
|
315
270
|
to { opacity: 1; transform: translateY(0); }
|
|
316
271
|
}
|
|
317
|
-
`})]})},
|
|
272
|
+
`})]})},Wr=({text:t,color:r="#2563eb",textColor:a="#fff",borderColor:i="#2563eb",icon:c,iconPosition:n="left",rounded:l=!1,borderRadius:d,borderWidth:S="0",fontSize:j="14px",fontWeight:v=500,horizontalPadding:f="10px",verticalPadding:b="6px",margin:x="0",shadow:w="0 1px 4px rgba(0, 0, 0, 0.1)",notificationDot:m=!1,dotColor:C="#ef4444",count:g,pulse:y=!1,style:E,onClick:T})=>{const _={display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:r,border:`${S} solid ${i}`,borderRadius:d||(l?"9999px":"6px"),padding:`${b} ${f}`,fontSize:j,fontWeight:v,margin:x,boxShadow:w,position:"relative",cursor:T?"pointer":"default",...E},A={color:a,display:"inline"},R={display:"flex",alignItems:"center",color:a},M={...R,marginRight:t?"6px":"0px"},X={...R,marginLeft:t?"6px":"0px"},F={position:"absolute",top:"-6px",right:"-6px",backgroundColor:"#ef4444",color:"#fff",borderRadius:"50%",minWidth:"20px",height:"20px",fontSize:"12px",padding:"0 6px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,zIndex:1},Y={position:"absolute",top:"-4px",right:"-4px",height:"8px",width:"8px",backgroundColor:C,borderRadius:"50%",zIndex:1,animation:y?"pulseAnim 1.2s infinite":void 0};return e.jsxs("span",{style:_,onClick:T,children:[m&&e.jsx("span",{style:Y}),typeof g<"u"&&e.jsx("span",{style:F,children:g}),c&&n==="left"&&e.jsx("span",{style:M,children:c}),t&&e.jsx("span",{style:A,children:t}),c&&n==="right"&&e.jsx("span",{style:X,children:c}),e.jsx("style",{children:`
|
|
318
273
|
@keyframes pulseAnim {
|
|
319
274
|
0% { transform: scale(1); opacity: 1; }
|
|
320
275
|
50% { transform: scale(1.5); opacity: 0.5; }
|
|
321
276
|
100% { transform: scale(1); opacity: 1; }
|
|
322
277
|
}
|
|
323
|
-
`})]})},fo=({isOpen:t,onClose:s,children:c,overlayStyle:i,modalStyle:u,closeButtonStyle:a})=>t?e.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3,...i},onClick:s,children:e.jsxs("div",{style:{position:"relative",backgroundColor:"#fff",borderRadius:12,width:"90vw",maxWidth:700,maxHeight:"90vh",overflowY:"auto",padding:24,boxShadow:"0 10px 40px rgba(0,0,0,0.25)",...u},onClick:d=>d.stopPropagation(),children:[e.jsx("button",{onClick:s,"aria-label":"Close modal",style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",cursor:"pointer",padding:4,color:"#444",transition:"color 0.2s ease",...a},onMouseEnter:d=>d.currentTarget.style.color="#000",onMouseLeave:d=>d.currentTarget.style.color="#444",children:e.jsx(at,{size:24})}),c]})}):null,nr={xs:24,sm:32,md:40,lg:48,xl:56,"2xl":64},ho={xs:6,sm:8,md:10,lg:12,xl:14,"2xl":16},or={xs:10,sm:12,md:14,lg:16,xl:18,"2xl":20},sr=t=>{switch(t){case"square":return"0px";case"rounded":return"8px";case"circular":default:return"50%"}},go=(t,s)=>{switch(t){case"top-left":return{top:1,left:1};case"top-right":return{top:1,right:1};case"bottom-left":return{bottom:1,left:1};case"bottom-right":default:return{bottom:1,right:1}}},bo=(t,s)=>{switch(t){case"tight":return-(s*.5);case"loose":return-(s*.15);case"normal":default:return-(s*.35)}},ar=({src:t,alt:s="User Avatar",size:c="md",variant:i="circular",isOnline:u=!1,isOffline:a=!1,className:d="",style:p,statusClassName:z="",statusStyle:C,statusPosition:j="bottom-right",fallback:h,ring:m=!1,ringColor:g="#3b82f6",onClick:k})=>{const[w,_]=n.useState(!1),[y,v]=n.useState(!1),A=nr[c],M=ho[c],B=or[c],Y=sr(i),R=h||s.split(" ").map(F=>F[0]).join("").toUpperCase().slice(0,2);let E="",J="";u?(E="#10b981",J="Online"):a&&(E="#6b7280",J="Offline");const H=u||a,Q=t&&!w,$=!!k;return e.jsxs("div",{style:{position:"relative",width:A,height:A,borderRadius:Y,overflow:"visible",display:"inline-block",flexShrink:0,cursor:$?"pointer":"default",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",transform:y&&$?"scale(1.05)":"scale(1)",boxShadow:m?`0 0 0 3px ${g}20, 0 0 0 1px ${g}`:y&&$?"0 8px 25px -8px rgba(0, 0, 0, 0.3)":"0 1px 3px rgba(0, 0, 0, 0.1)",...p},className:d,"aria-label":s,role:$?"button":"img",tabIndex:$?0:-1,onClick:k,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),onKeyDown:F=>{$&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),k?.())},children:[Q?e.jsx("div",{style:{borderRadius:Y,overflow:"hidden",width:"100%",height:"100%"},children:e.jsx("img",{src:t,alt:s,width:A,height:A,loading:"lazy",onError:()=>_(!0),style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"center",display:"block",transition:"opacity 0.2s ease-in-out"}})}):e.jsx("div",{style:{width:"100%",height:"100%",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:B,fontWeight:"600",borderRadius:Y,position:"relative"},children:R?e.jsx("span",{style:{userSelect:"none"},children:R}):e.jsx(Wn,{size:A*.5,strokeWidth:1.5})}),H&&e.jsx("div",{className:z,style:{position:"absolute",width:M,height:M,borderRadius:"50%",backgroundColor:E,border:"2px solid white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.12)",...go(j),...C},"aria-label":J,title:J})]})},yo=({avatars:t,max:s=4,size:c="md",className:i="",style:u,spacing:a="normal",direction:d="left"})=>{const p=nr[c],z=or[c],C=t.slice(0,s),j=t.length-s,h=bo(a,p);return e.jsxs("div",{style:{display:"flex",alignItems:"center",flexDirection:d==="right"?"row-reverse":"row",...u},className:i,"aria-label":`Avatar group with ${t.length} members`,role:"group",children:[C.map((m,g)=>{const k=d==="left"?g===0:g===C.length-1,w=d==="left"?C.length-g:g+1;return e.jsx("div",{style:{marginLeft:d==="left"&&!k?h:0,marginRight:d==="right"&&!k?h:0,position:"relative",zIndex:w,transition:"transform 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},className:"group-hover:translate-x-1",onMouseEnter:_=>{const y=_.currentTarget;y.style.transform=`translateY(-2px) ${d==="right"?"translateX(4px)":"translateX(-4px)"}`,y.style.zIndex="100"},onMouseLeave:_=>{const y=_.currentTarget;y.style.transform="translateY(0) translateX(0)",y.style.zIndex=w.toString()},children:e.jsx("div",{style:{border:"3px solid white",borderRadius:sr(m.variant||"circular"),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},children:e.jsx(ar,{...m,size:c,style:{boxShadow:"none"}})})},g)}),j>0&&e.jsxs("div",{style:{marginLeft:d==="left"?h:0,marginRight:d==="right"?h:0,width:p,height:p,borderRadius:"50%",background:"linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)",color:"#374151",fontSize:z*.9,fontWeight:"600",display:"flex",justifyContent:"center",alignItems:"center",border:"3px solid white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",userSelect:"none",cursor:"default",flexShrink:0,position:"relative",zIndex:0,transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},"aria-label":`${j} more members`,title:`${j} more members`,onMouseEnter:m=>{const g=m.currentTarget;g.style.transform="translateY(-2px) scale(1.05)",g.style.background="linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%)"},onMouseLeave:m=>{const g=m.currentTarget;g.style.transform="translateY(0) scale(1)",g.style.background="linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)"},children:["+",j]})]})},mo=[{src:"https://www.soundjay.com/misc/sounds/bell-ringing-05.wav",title:"Morning Bell",artist:"Nature Sounds",duration:"0:15",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-4.wav",title:"Digital Click",artist:"Tech Audio",duration:"0:05",thumbnail:"https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-10.wav",title:"Soft Chime",artist:"Ambient Studio",duration:"0:08",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"}];function vo({tracks:t=mo,className:s="",galleryTitle:c="Audio Gallery",primaryColor:i="#8b5cf6",backgroundColor:u="#0f0f23",textColor:a="#e4e4e7",secondaryColor:d="#1a1a2e",border:p=0,borderColor:z,maxWidth:C=420,autoplay:j=!1,loop:h=!1}){const[m,g]=n.useState(null),[k,w]=n.useState(!1),[_,y]=n.useState(0),[v,A]=n.useState(0),[M,B]=n.useState(.7),[Y,R]=n.useState(!1),[E,J]=n.useState(h),[H,Q]=n.useState(!1),[$,F]=n.useState(!1),[ne,S]=n.useState(!1),b=n.useRef(null),L=n.useRef(null),G=n.useRef(null);n.useEffect(()=>{b.current&&(b.current.volume=M)},[M]),n.useEffect(()=>{b.current&&(b.current.loop=E)},[E]),n.useEffect(()=>{m===null&&b.current&&(b.current.pause(),w(!1),y(0),A(0))},[m]);const K=f=>{if(m===f){if(!b.current)return;b.current.paused?(b.current.play().catch(()=>{}),w(!0)):(b.current.pause(),w(!1))}else g(f),setTimeout(()=>{b.current&&(b.current.play().catch(()=>{}),w(!0))},100)},l=()=>{b.current&&(y(b.current.currentTime),b.current.duration&&A(b.current.duration))},I=f=>{if(!b.current||!v)return;const W=f.currentTarget.getBoundingClientRect(),se=(f.clientX-W.left)/W.width*v;b.current.currentTime=se,y(se)},P=f=>{const W=f.currentTarget.getBoundingClientRect(),X=(f.clientX-W.left)/W.width,se=Math.max(0,Math.min(1,X));B(se)},ee=f=>{if(b.current&&v){let W=b.current.currentTime+f;W=Math.min(Math.max(W,0),v),b.current.currentTime=W,y(W)}},oe=()=>{if(m===null)return;let f;H?f=Math.floor(Math.random()*t.length):f=(m+1)%t.length,K(f)},q=()=>{if(m===null)return;let f;H?f=Math.floor(Math.random()*t.length):f=(m-1+t.length)%t.length,K(f)},Z=()=>{B(f=>f>0?0:.7)},de=()=>{S(!0),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{S(!1)},3e3)},x=f=>{if(isNaN(f))return"0:00";const W=Math.floor(f/60),ae=Math.floor(f%60);return`${W}:${ae<10?"0":""}${ae}`},V=m!==null?t[m]:null;return e.jsxs("div",{className:s,style:{maxWidth:`${C}px`,margin:"20px auto",background:`linear-gradient(145deg, ${u}, ${d})`,color:a,borderRadius:"24px",padding:"24px 16px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",userSelect:"none",backdropFilter:"blur(20px)",border:`${p}px solid ${z}40`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:`linear-gradient(135deg, ${i}, ${d})`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Ut,{size:20,color:"white"})}),e.jsxs("div",{children:[e.jsx("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:"700",color:i},children:c}),e.jsxs("p",{style:{margin:0,fontSize:"0.875rem",opacity:.7},children:[t.length," tracks"]})]})]}),e.jsx("button",{onClick:()=>Q(!H),style:{background:H?i:"transparent",border:"none",borderRadius:"12px",padding:"8px",cursor:"pointer",transition:"all 0.3s ease",opacity:H?1:.6},"aria-label":"Toggle Shuffle",children:e.jsx(_n,{size:18,color:H?"white":a})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"20px",maxHeight:"240px",overflowY:"auto",paddingRight:"4px"},children:t.map((f,W)=>{const ae=m===W,X=ae&&k;return e.jsxs("div",{onClick:()=>K(W),style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:"16px",background:ae?`linear-gradient(135deg, ${i}20, ${i}10)`:"rgba(255,255,255,0.05)",border:ae?`1px solid ${i}40`:"1px solid transparent",cursor:"pointer",transition:"all 0.3s ease",backdropFilter:ae?"blur(20px)":"none"},children:[e.jsxs("div",{style:{width:"48px",height:"48px",borderRadius:"12px",background:f.thumbnail?`url(${f.thumbnail}) center/cover`:i,display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",position:"relative",overflow:"hidden"},children:[!f.thumbnail&&e.jsx(Ut,{size:20,color:"white"}),X&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("div",{style:{width:"16px",height:"16px",display:"flex",gap:"2px",alignItems:"end",justifyContent:"center"},children:[0,1,2].map(se=>e.jsx("div",{style:{width:"3px",background:"white",borderRadius:"2px",animation:`equalizer 1s ease-in-out infinite ${se*.2}s`,height:"12px"}},se))})})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:"600",fontSize:"0.95rem",color:ae?i:a,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:f.title}),f.artist&&e.jsx("div",{style:{fontSize:"0.8rem",opacity:.7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:f.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[f.duration&&e.jsx("span",{style:{fontSize:"0.8rem",opacity:.6},children:f.duration}),e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"8px",background:ae?i:"rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease"},children:X?e.jsx(ot,{size:16,color:"white"}):e.jsx(He,{size:16,color:"white"})})]})]},W)})}),V&&e.jsxs("div",{ref:L,style:{background:`linear-gradient(135deg, ${d}, ${u})`,borderRadius:"20px",padding:"20px",border:`1px solid ${i}40`,backdropFilter:"blur(20px)",position:"relative",overflow:"hidden"},children:[V.thumbnail&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url(${V.thumbnail})`,backgroundSize:"cover",backgroundPosition:"center",filter:"blur(60px) opacity(0.1)",transform:"scale(1.1)"}}),e.jsxs("div",{style:{position:"relative",zIndex:1},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:"20px"},children:[e.jsx("h3",{style:{margin:"0 0 4px 0",fontSize:"1.1rem",fontWeight:"700",color:i},children:V.title}),V.artist&&e.jsx("p",{style:{margin:0,opacity:.7,fontSize:"0.9rem"},children:V.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"20px",marginBottom:"20px"},children:[e.jsx("button",{onClick:q,style:We(a,"rgba(255,255,255,0.1)"),"aria-label":"Previous Track",children:e.jsx(ut,{size:20})}),e.jsxs("button",{onClick:()=>ee(-10),style:We(a,"rgba(255,255,255,0.1)"),"aria-label":"Skip back 10 seconds",children:[e.jsx(ut,{size:16}),e.jsx("span",{style:{fontSize:"0.7rem",marginLeft:"2px"},children:"10"})]}),e.jsx("button",{onClick:()=>{b.current&&(k?(b.current.pause(),w(!1)):(b.current.play().catch(()=>{}),w(!0)))},style:{...We("#fff",i),width:"60px",height:"60px",borderRadius:"50%",boxShadow:`0 8px 25px ${i}40`},"aria-label":k?"Pause":"Play",children:k?e.jsx(ot,{size:24}):e.jsx(He,{size:24})}),e.jsxs("button",{onClick:()=>ee(10),style:We(a,"rgba(255,255,255,0.1)"),"aria-label":"Skip forward 10 seconds",children:[e.jsx("span",{style:{fontSize:"0.7rem",marginRight:"2px"},children:"10"}),e.jsx(pt,{size:16})]}),e.jsx("button",{onClick:oe,style:We(a,"rgba(255,255,255,0.1)"),"aria-label":"Next Track",children:e.jsx(pt,{size:20})})]}),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px",fontSize:"0.8rem",opacity:.7},children:[e.jsx("span",{children:x(_)}),e.jsx("span",{children:x(v)})]}),e.jsx("div",{onClick:I,style:{height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"hidden"},children:e.jsx("div",{style:{width:`${_/v*100||0}%`,height:"100%",background:`linear-gradient(90deg, ${i}, #ec4899)`,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",transform:"translateY(-50%)",width:"12px",height:"12px",background:i,borderRadius:"50%",boxShadow:`0 2px 8px ${i}60`}})})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>F(!$),style:We($?"#ec4899":a,"rgba(255,255,255,0.1)"),"aria-label":"Like",children:e.jsx(nt,{size:16,fill:$?"#ec4899":"none"})}),e.jsx("button",{onClick:()=>J(!E),style:We(E?i:a,"rgba(255,255,255,0.1)"),"aria-label":"Toggle Loop",children:e.jsx(Mt,{size:16})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[ne&&e.jsx("div",{onClick:P,style:{width:"80px",height:"4px",background:"rgba(255,255,255,0.2)",borderRadius:"2px",cursor:"pointer",position:"relative"},children:e.jsx("div",{style:{width:`${M*100}%`,height:"100%",background:i,borderRadius:"2px"}})}),e.jsx("button",{onClick:Z,onMouseEnter:de,style:We(a,"rgba(255,255,255,0.1)"),"aria-label":M>0?"Mute":"Unmute",children:M>0?e.jsx(xt,{size:16}):e.jsx(st,{size:16})})]})]})]}),e.jsx("audio",{ref:b,src:V.src,autoPlay:j,loop:E,onTimeUpdate:l,onEnded:()=>{w(!1),E||oe()},onLoadedMetadata:l,preload:"metadata",style:{display:"none"}})]}),e.jsx("style",{children:`
|
|
278
|
+
`})]})},Dr=({isOpen:t,onClose:r,children:a,overlayStyle:i,modalStyle:c,closeButtonStyle:n})=>t?e.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3,...i},onClick:r,children:e.jsxs("div",{style:{position:"relative",backgroundColor:"#fff",borderRadius:12,width:"90vw",maxWidth:700,maxHeight:"90vh",overflowY:"auto",padding:24,boxShadow:"0 10px 40px rgba(0,0,0,0.25)",...c},onClick:l=>l.stopPropagation(),children:[e.jsx("button",{onClick:r,"aria-label":"Close modal",style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",cursor:"pointer",padding:4,color:"#444",transition:"color 0.2s ease",...n},onMouseEnter:l=>l.currentTarget.style.color="#000",onMouseLeave:l=>l.currentTarget.style.color="#444",children:e.jsx(De,{size:24})}),a]})}):null,xt={xs:24,sm:32,md:40,lg:48,xl:56,"2xl":64},Yr={xs:6,sm:8,md:10,lg:12,xl:14,"2xl":16},ht={xs:10,sm:12,md:14,lg:16,xl:18,"2xl":20},gt=t=>{switch(t){case"square":return"0px";case"rounded":return"8px";case"circular":default:return"50%"}},Vr=(t,r)=>{switch(t){case"top-left":return{top:1,left:1};case"top-right":return{top:1,right:1};case"bottom-left":return{bottom:1,left:1};case"bottom-right":default:return{bottom:1,right:1}}},Hr=(t,r)=>{switch(t){case"tight":return-(r*.5);case"loose":return-(r*.15);case"normal":default:return-(r*.35)}},bt=({src:t,alt:r="User Avatar",size:a="md",variant:i="circular",isOnline:c=!1,isOffline:n=!1,className:l="",style:d,statusClassName:S="",statusStyle:j,statusPosition:v="bottom-right",fallback:f,ring:b=!1,ringColor:x="#3b82f6",onClick:w})=>{const[m,C]=s.useState(!1),[g,y]=s.useState(!1),E=xt[a],T=Yr[a],_=ht[a],A=gt(i),R=f||r.split(" ").map(N=>N[0]).join("").toUpperCase().slice(0,2);let M="",X="";c?(M="#10b981",X="Online"):n&&(M="#6b7280",X="Offline");const F=c||n,Y=t&&!m,$=!!w;return e.jsxs("div",{style:{position:"relative",width:E,height:E,borderRadius:A,overflow:"visible",display:"inline-block",flexShrink:0,cursor:$?"pointer":"default",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",transform:g&&$?"scale(1.05)":"scale(1)",boxShadow:b?`0 0 0 3px ${x}20, 0 0 0 1px ${x}`:g&&$?"0 8px 25px -8px rgba(0, 0, 0, 0.3)":"0 1px 3px rgba(0, 0, 0, 0.1)",...d},className:l,"aria-label":r,role:$?"button":"img",tabIndex:$?0:-1,onClick:w,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onKeyDown:N=>{$&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),w?.())},children:[Y?e.jsx("div",{style:{borderRadius:A,overflow:"hidden",width:"100%",height:"100%"},children:e.jsx("img",{src:t,alt:r,width:E,height:E,loading:"lazy",onError:()=>C(!0),style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"center",display:"block",transition:"opacity 0.2s ease-in-out"}})}):e.jsx("div",{style:{width:"100%",height:"100%",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:_,fontWeight:"600",borderRadius:A,position:"relative"},children:R?e.jsx("span",{style:{userSelect:"none"},children:R}):e.jsx(hr,{size:E*.5,strokeWidth:1.5})}),F&&e.jsx("div",{className:S,style:{position:"absolute",width:T,height:T,borderRadius:"50%",backgroundColor:M,border:"2px solid white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.12)",...Vr(v),...j},"aria-label":X,title:X})]})},Xr=({avatars:t,max:r=4,size:a="md",className:i="",style:c,spacing:n="normal",direction:l="left"})=>{const d=xt[a],S=ht[a],j=t.slice(0,r),v=t.length-r,f=Hr(n,d);return e.jsxs("div",{style:{display:"flex",alignItems:"center",flexDirection:l==="right"?"row-reverse":"row",...c},className:i,"aria-label":`Avatar group with ${t.length} members`,role:"group",children:[j.map((b,x)=>{const w=l==="left"?x===0:x===j.length-1,m=l==="left"?j.length-x:x+1;return e.jsx("div",{style:{marginLeft:l==="left"&&!w?f:0,marginRight:l==="right"&&!w?f:0,position:"relative",zIndex:m,transition:"transform 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},className:"group-hover:translate-x-1",onMouseEnter:C=>{const g=C.currentTarget;g.style.transform=`translateY(-2px) ${l==="right"?"translateX(4px)":"translateX(-4px)"}`,g.style.zIndex="100"},onMouseLeave:C=>{const g=C.currentTarget;g.style.transform="translateY(0) translateX(0)",g.style.zIndex=m.toString()},children:e.jsx("div",{style:{border:"3px solid white",borderRadius:gt(b.variant||"circular"),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},children:e.jsx(bt,{...b,size:a,style:{boxShadow:"none"}})})},x)}),v>0&&e.jsxs("div",{style:{marginLeft:l==="left"?f:0,marginRight:l==="right"?f:0,width:d,height:d,borderRadius:"50%",background:"linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)",color:"#374151",fontSize:S*.9,fontWeight:"600",display:"flex",justifyContent:"center",alignItems:"center",border:"3px solid white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",userSelect:"none",cursor:"default",flexShrink:0,position:"relative",zIndex:0,transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},"aria-label":`${v} more members`,title:`${v} more members`,onMouseEnter:b=>{const x=b.currentTarget;x.style.transform="translateY(-2px) scale(1.05)",x.style.background="linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%)"},onMouseLeave:b=>{const x=b.currentTarget;x.style.transform="translateY(0) scale(1)",x.style.background="linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)"},children:["+",v]})]})},Ur=[{src:"https://www.soundjay.com/misc/sounds/bell-ringing-05.wav",title:"Morning Bell",artist:"Nature Sounds",duration:"0:15",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-4.wav",title:"Digital Click",artist:"Tech Audio",duration:"0:05",thumbnail:"https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-10.wav",title:"Soft Chime",artist:"Ambient Studio",duration:"0:08",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"}];function qr({tracks:t=Ur,className:r="",galleryTitle:a="Audio Gallery",primaryColor:i="#8b5cf6",backgroundColor:c="#0f0f23",textColor:n="#e4e4e7",secondaryColor:l="#1a1a2e",border:d=0,borderColor:S,maxWidth:j=420,autoplay:v=!1,loop:f=!1}){const[b,x]=s.useState(null),[w,m]=s.useState(!1),[C,g]=s.useState(0),[y,E]=s.useState(0),[T,_]=s.useState(.7),[A,R]=s.useState(!1),[M,X]=s.useState(f),[F,Y]=s.useState(!1),[$,N]=s.useState(!1),[J,k]=s.useState(!1),h=s.useRef(null),I=s.useRef(null),V=s.useRef(null);s.useEffect(()=>{h.current&&(h.current.volume=T)},[T]),s.useEffect(()=>{h.current&&(h.current.loop=M)},[M]),s.useEffect(()=>{b===null&&h.current&&(h.current.pause(),m(!1),g(0),E(0))},[b]);const U=p=>{if(b===p){if(!h.current)return;h.current.paused?(h.current.play().catch(()=>{}),m(!0)):(h.current.pause(),m(!1))}else x(p),setTimeout(()=>{h.current&&(h.current.play().catch(()=>{}),m(!0))},100)},o=()=>{h.current&&(g(h.current.currentTime),h.current.duration&&E(h.current.duration))},z=p=>{if(!h.current||!y)return;const B=p.currentTarget.getBoundingClientRect(),Z=(p.clientX-B.left)/B.width*y;h.current.currentTime=Z,g(Z)},L=p=>{const B=p.currentTarget.getBoundingClientRect(),W=(p.clientX-B.left)/B.width,Z=Math.max(0,Math.min(1,W));_(Z)},q=p=>{if(h.current&&y){let B=h.current.currentTime+p;B=Math.min(Math.max(B,0),y),h.current.currentTime=B,g(B)}},K=()=>{if(b===null)return;let p;F?p=Math.floor(Math.random()*t.length):p=(b+1)%t.length,U(p)},D=()=>{if(b===null)return;let p;F?p=Math.floor(Math.random()*t.length):p=(b-1+t.length)%t.length,U(p)},G=()=>{_(p=>p>0?0:.7)},ne=()=>{k(!0),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{k(!1)},3e3)},u=p=>{if(isNaN(p))return"0:00";const B=Math.floor(p/60),Q=Math.floor(p%60);return`${B}:${Q<10?"0":""}${Q}`},O=b!==null?t[b]:null;return e.jsxs("div",{className:r,style:{maxWidth:`${j}px`,margin:"20px auto",background:`linear-gradient(145deg, ${c}, ${l})`,color:n,borderRadius:"24px",padding:"24px 16px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",userSelect:"none",backdropFilter:"blur(20px)",border:`${d}px solid ${S}40`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:`linear-gradient(135deg, ${i}, ${l})`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(tt,{size:20,color:"white"})}),e.jsxs("div",{children:[e.jsx("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:"700",color:i},children:a}),e.jsxs("p",{style:{margin:0,fontSize:"0.875rem",opacity:.7},children:[t.length," tracks"]})]})]}),e.jsx("button",{onClick:()=>Y(!F),style:{background:F?i:"transparent",border:"none",borderRadius:"12px",padding:"8px",cursor:"pointer",transition:"all 0.3s ease",opacity:F?1:.6},"aria-label":"Toggle Shuffle",children:e.jsx(cr,{size:18,color:F?"white":n})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"20px",maxHeight:"240px",overflowY:"auto",paddingRight:"4px"},children:t.map((p,B)=>{const Q=b===B,W=Q&&w;return e.jsxs("div",{onClick:()=>U(B),style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:"16px",background:Q?`linear-gradient(135deg, ${i}20, ${i}10)`:"rgba(255,255,255,0.05)",border:Q?`1px solid ${i}40`:"1px solid transparent",cursor:"pointer",transition:"all 0.3s ease",backdropFilter:Q?"blur(20px)":"none"},children:[e.jsxs("div",{style:{width:"48px",height:"48px",borderRadius:"12px",background:p.thumbnail?`url(${p.thumbnail}) center/cover`:i,display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",position:"relative",overflow:"hidden"},children:[!p.thumbnail&&e.jsx(tt,{size:20,color:"white"}),W&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("div",{style:{width:"16px",height:"16px",display:"flex",gap:"2px",alignItems:"end",justifyContent:"center"},children:[0,1,2].map(Z=>e.jsx("div",{style:{width:"3px",background:"white",borderRadius:"2px",animation:`equalizer 1s ease-in-out infinite ${Z*.2}s`,height:"12px"}},Z))})})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:"600",fontSize:"0.95rem",color:Q?i:n,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:p.title}),p.artist&&e.jsx("div",{style:{fontSize:"0.8rem",opacity:.7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:p.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[p.duration&&e.jsx("span",{style:{fontSize:"0.8rem",opacity:.6},children:p.duration}),e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"8px",background:Q?i:"rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease"},children:W?e.jsx(Be,{size:16,color:"white"}):e.jsx(Le,{size:16,color:"white"})})]})]},B)})}),O&&e.jsxs("div",{ref:I,style:{background:`linear-gradient(135deg, ${l}, ${c})`,borderRadius:"20px",padding:"20px",border:`1px solid ${i}40`,backdropFilter:"blur(20px)",position:"relative",overflow:"hidden"},children:[O.thumbnail&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url(${O.thumbnail})`,backgroundSize:"cover",backgroundPosition:"center",filter:"blur(60px) opacity(0.1)",transform:"scale(1.1)"}}),e.jsxs("div",{style:{position:"relative",zIndex:1},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:"20px"},children:[e.jsx("h3",{style:{margin:"0 0 4px 0",fontSize:"1.1rem",fontWeight:"700",color:i},children:O.title}),O.artist&&e.jsx("p",{style:{margin:0,opacity:.7,fontSize:"0.9rem"},children:O.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"20px",marginBottom:"20px"},children:[e.jsx("button",{onClick:D,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Previous Track",children:e.jsx(Oe,{size:20})}),e.jsxs("button",{onClick:()=>q(-10),style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Skip back 10 seconds",children:[e.jsx(Oe,{size:16}),e.jsx("span",{style:{fontSize:"0.7rem",marginLeft:"2px"},children:"10"})]}),e.jsx("button",{onClick:()=>{h.current&&(w?(h.current.pause(),m(!1)):(h.current.play().catch(()=>{}),m(!0)))},style:{...ve("#fff",i),width:"60px",height:"60px",borderRadius:"50%",boxShadow:`0 8px 25px ${i}40`},"aria-label":w?"Pause":"Play",children:w?e.jsx(Be,{size:24}):e.jsx(Le,{size:24})}),e.jsxs("button",{onClick:()=>q(10),style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Skip forward 10 seconds",children:[e.jsx("span",{style:{fontSize:"0.7rem",marginRight:"2px"},children:"10"}),e.jsx(Fe,{size:16})]}),e.jsx("button",{onClick:K,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Next Track",children:e.jsx(Fe,{size:20})})]}),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px",fontSize:"0.8rem",opacity:.7},children:[e.jsx("span",{children:u(C)}),e.jsx("span",{children:u(y)})]}),e.jsx("div",{onClick:z,style:{height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"hidden"},children:e.jsx("div",{style:{width:`${C/y*100||0}%`,height:"100%",background:`linear-gradient(90deg, ${i}, #ec4899)`,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",transform:"translateY(-50%)",width:"12px",height:"12px",background:i,borderRadius:"50%",boxShadow:`0 2px 8px ${i}60`}})})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>N(!$),style:ve($?"#ec4899":n,"rgba(255,255,255,0.1)"),"aria-label":"Like",children:e.jsx(Ht,{size:16,fill:$?"#ec4899":"none"})}),e.jsx("button",{onClick:()=>X(!M),style:ve(M?i:n,"rgba(255,255,255,0.1)"),"aria-label":"Toggle Loop",children:e.jsx(qe,{size:16})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[J&&e.jsx("div",{onClick:L,style:{width:"80px",height:"4px",background:"rgba(255,255,255,0.2)",borderRadius:"2px",cursor:"pointer",position:"relative"},children:e.jsx("div",{style:{width:`${T*100}%`,height:"100%",background:i,borderRadius:"2px"}})}),e.jsx("button",{onClick:G,onMouseEnter:ne,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":T>0?"Mute":"Unmute",children:T>0?e.jsx(Ge,{size:16}):e.jsx(We,{size:16})})]})]})]}),e.jsx("audio",{ref:h,src:O.src,autoPlay:v,loop:M,onTimeUpdate:o,onEnded:()=>{m(!1),M||K()},onLoadedMetadata:o,preload:"metadata",style:{display:"none"}})]}),e.jsx("style",{children:`
|
|
324
279
|
@keyframes equalizer {
|
|
325
280
|
0%, 100% { height: 4px; }
|
|
326
281
|
50% { height: 12px; }
|
|
@@ -344,7 +299,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
344
299
|
div::-webkit-scrollbar-thumb:hover {
|
|
345
300
|
background: ${i}dd;
|
|
346
301
|
}
|
|
347
|
-
`})]})}function We(t,s){return{border:"none",backgroundColor:s,color:t,cursor:"pointer",padding:"10px",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",backdropFilter:"blur(10px)"}}const kt={primary:"#3b82f6",secondary:"#6366f1",accent:"#f59e0b",background:"#0f172a",surface:"#1e293b",text:"#f8fafc",textSecondary:"#94a3b8",textTertiary:"#64748b",border:"#334155",shadow:"0 10px 25px rgba(0,0,0,0.3)",hoverShadow:"0 15px 30px rgba(0,0,0,0.4)",gradient:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",borderRadius:"0px 0px 12px 12px",borderRadiusSmall:"6px",borderRadiusLarge:"16px",transitionSpeed:"0.3s",transitionEasing:"ease",fontFamily:"inherit",fontSizeBase:"16px",fontWeightNormal:"400",fontWeightBold:"600",spacingUnit:"16px",backdropBlur:"8px",overlayOpacity:"0.7"},wo={xs:1,sm:2,md:3,lg:4,xl:5,"2xl":6,"3xl":7},ko=({videos:t,layout:s="grid",columns:c=wo,gap:i="16px",aspectRatio:u="16:9",theme:a=kt,showThumbnails:d=!0,showMetadata:p=!0,metadataPosition:z="below",showControls:C=!0,controlsPosition:j="bottom",showProgress:h=!0,showVolume:m=!0,showQualityOptions:g=!1,showSpeedOptions:k=!1,autoPlay:w=!1,autoPlayDelay:_=2e3,autoAdvance:y=!1,autoAdvanceDelay:v=5e3,loop:A=!1,muted:M=!0,preload:B="metadata",lazyLoading:Y=!0,infiniteScroll:R=!1,loadMoreThreshold:E=1e3,lightbox:J=!0,lightboxAnimation:H="zoom",lightboxTransitionSpeed:Q=300,keyboard:$=!0,swipeGestures:F=!0,title:ne="Video Gallery",description:S="A collection of videos",ariaLabel:b="Video gallery",structured:L=!0,search:G=!0,searchPlaceholder:K="Search videos...",filter:l=!0,sort:I=!0,sortOptions:P=["date","title","views","likes","duration"],playlist:ee=!1,fullscreen:oe=!0,pictureInPicture:q=!1,sharing:Z=!0,download:de=!1,favorites:x=!0,customLoader:V,customEmptyState:f,customErrorState:W,onVideoClick:ae,onVideoEnd:X,onVideoPlay:se,onVideoPause:ce,onVideoLike:fe,onVideoShare:pe,onVideoDownload:ve,onLayoutChange:ke,onSearch:Re,onFilter:Me,onSort:Ie,className:we="",containerClassName:Se="",videoItemClassName:Ae="",controlsClassName:Pe=""})=>{const[he,me]=n.useState(null),[De,Oe]=n.useState(!1),[qe,Ne]=n.useState({width:1024,height:768}),[je,le]=n.useState(""),[Te,Ye]=n.useState("all"),[Ee,Ge]=n.useState("date"),[D,xe]=n.useState(new Set),[ye,Ce]=n.useState(12),[ue,Je]=n.useState(s),[it,It]=n.useState("auto"),[Qe,ft]=n.useState(1),[O,ge]=n.useState(null),Be=n.useRef(null),$e=n.useRef(null),o=n.useMemo(()=>({...kt,hoverShadow:a.hoverShadow??kt.hoverShadow,...a}),[a]),ir=n.useCallback(()=>{const{width:r}=qe;return r<480?c.xs??1:r<640?c.sm??2:r<768?c.md??3:r<1024?c.lg??4:r<1280?c.xl??5:r<1536?c["2xl"]??6:c["3xl"]??7},[qe,c]);n.useEffect(()=>{const r=()=>{Ne({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]);const ht=n.useMemo(()=>{try{let r=[...t];return je&&(r=r.filter(T=>T.title?.toLowerCase().includes(je.toLowerCase())||T.description?.toLowerCase().includes(je.toLowerCase())||T.tags?.some(ie=>ie.toLowerCase().includes(je.toLowerCase()))||T.author?.toLowerCase().includes(je.toLowerCase())),Re?.(je)),Te!=="all"&&(r=r.filter(T=>T.category===Te),Me?.(Te)),r.sort((T,ie)=>{switch(Ee){case"title":return(T.title||"").localeCompare(ie.title||"");case"views":return(ie.views||0)-(T.views||0);case"likes":return(ie.likes||0)-(T.likes||0);case"duration":return(ie.duration||0)-(T.duration||0);case"random":return Math.random()-.5;case"trending":const N=(T.views||0)/((T.likes||0)+1)*(T.publishDate?new Date(T.publishDate).getTime():0);return(ie.views||0)/((ie.likes||0)+1)*(ie.publishDate?new Date(ie.publishDate).getTime():0)-N;case"date":default:return new Date(ie.publishDate||"").getTime()-new Date(T.publishDate||"").getTime()}}),Ie?.(Ee),R?r.slice(0,ye):r}catch(r){return ge("Error filtering videos"),console.error(r),[]}},[t,je,Te,Ee,R,ye]),Et=n.useMemo(()=>{const r=t.map(T=>T.category).filter(T=>!!T);return["all",...Array.from(new Set(r))]},[t]);n.useEffect(()=>{if(!$||he===null)return;const r=T=>{switch(T.key){case"Escape":me(null);break;case"ArrowLeft":T.preventDefault(),me(ie=>ie!==null?(ie-1+t.length)%t.length:null);break;case"ArrowRight":T.preventDefault(),me(ie=>ie!==null?(ie+1)%t.length:null);break;case" ":T.preventDefault();break;case"m":T.preventDefault();break;case"f":T.preventDefault();break}};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[$,he,t.length]),n.useEffect(()=>{if(!F||!$e.current||he===null)return;let r=0,T=0,ie=0,N=0;const U=Le=>{r=Le.changedTouches[0].screenX,T=Le.changedTouches[0].screenY},ze=Le=>{ie=Le.changedTouches[0].screenX,N=Le.changedTouches[0].screenY;const Ke=r-ie,Fe=T-N;Math.abs(Ke)>50&&Math.abs(Fe)<50&&(Ke>0?me(Ue=>Ue!==null?(Ue+1)%t.length:null):me(Ue=>Ue!==null?(Ue-1+t.length)%t.length:null))},Ve=$e.current;return Ve.addEventListener("touchstart",U),Ve.addEventListener("touchend",ze),()=>{Ve.removeEventListener("touchstart",U),Ve.removeEventListener("touchend",ze)}},[F,he,t.length]),n.useEffect(()=>{if(!R)return;const r=()=>{window.innerHeight+window.scrollY>=document.body.offsetHeight-E&&Ce(T=>Math.min(T+12,t.length))};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[R,t.length,E]);const lr=()=>{if(!L)return null;const r={"@context":"https://schema.org","@type":"VideoGallery",name:ne,description:S,video:t.map(T=>({"@type":"VideoObject",name:T.title,description:T.description,thumbnailUrl:T.poster||T.thumbnail,contentUrl:T.src,uploadDate:T.publishDate,duration:T.duration?`PT${T.duration}S`:void 0,author:{"@type":"Person",name:T.author},interactionStatistic:[{"@type":"InteractionCounter",interactionType:"https://schema.org/WatchAction",userInteractionCount:T.views||0},{"@type":"InteractionCounter",interactionType:"https://schema.org/LikeAction",userInteractionCount:T.likes||0}]}))};return e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(r)}})},gt=r=>{Je(r),ke?.(r)},Lt=r=>{xe(T=>{const ie=new Set(T);if(ie.has(r)){ie.delete(r);const N=t.find(U=>U.id===r);N&&fe?.(N,!1)}else{ie.add(r);const N=t.find(U=>U.id===r);N&&fe?.(N,!0)}return ie})},cr=r=>{navigator.share?navigator.share({title:r.title,text:r.description,url:r.src}).catch(()=>{navigator.clipboard?.writeText(r.src)}):navigator.clipboard?.writeText(r.src),pe?.(r)},dr=r=>{const T=document.createElement("a");T.href=r.src,T.download=r.title||"video",T.click(),ve?.(r)},bt=r=>{if(!r||isNaN(r))return"0:00";const T=Math.floor(r/3600),ie=Math.floor(r%3600/60),N=Math.floor(r%60);return T>0?`${T}:${ie.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}`:`${ie}:${N.toString().padStart(2,"0")}`},_t=({video:r,isLightbox:T=!1,onClick:ie})=>{const N=n.useRef(null),U=n.useRef(null),[ze,Ve]=n.useState(!1),[Le,Ke]=n.useState(0),[Fe,Ue]=n.useState(0),[lt,At]=n.useState(.7),[Xe,yt]=n.useState(M),[ct,hr]=n.useState(!1),[gr,Pt]=n.useState(!1),[Nt,Ze]=n.useState(!0),[mt,br]=n.useState(!1),[yr,mr]=n.useState(0),[vr,wr]=n.useState(0),[So,To]=n.useState(!1),[Co,zo]=n.useState(!1),[vt,Bt]=n.useState(!1);n.useEffect(()=>{const te=()=>{br(window.innerWidth<768)};return te(),window.addEventListener("resize",te),()=>window.removeEventListener("resize",te)},[]),n.useEffect(()=>{let te;return ze?(Ze(!0),te=setTimeout(()=>{Ze(!1)},2e3)):Ze(!0),()=>clearTimeout(te)},[ze,Le]);const wt=n.useCallback(()=>{N.current&&(ze?(N.current.pause(),ce?.(r,t.findIndex(te=>te.id===r.id))):(N.current.play(),se?.(r,t.findIndex(te=>te.id===r.id))),Ve(!ze))},[ze,r]),Ft=()=>{N.current&&(Ke(N.current.currentTime),N.current.duration&&Ue(N.current.duration))},kr=te=>{if(!N.current||!Fe)return;const _e=te.currentTarget.getBoundingClientRect(),et=(te.clientX-_e.left)/_e.width*Fe;N.current.currentTime=et,Ke(et)},jr=()=>{N.current?.parentElement&&(ct?document.exitFullscreen?.():N.current.parentElement.requestFullscreen?.(),hr(!ct))},Sr=()=>{N.current&&(Xe?(yt(!1),N.current.muted=!1,lt===0&&At(.5)):(yt(!0),N.current.muted=!0))},Tr=te=>{N.current&&(N.current.playbackRate=te,ft(te)),Bt(!1)},Cr=te=>{mr(te.touches[0].clientX),wr(te.touches[0].clientY),Ze(!0)},zr=te=>{const _e=te.changedTouches[0].clientX,Wt=te.changedTouches[0].clientY,et=yr-_e,$r=vr-Wt;Math.abs(et)>50&&Math.abs($r)<50?et>0?N.current&&(N.current.currentTime+=10):N.current&&(N.current.currentTime-=10):wt()},Rr=()=>u==="auto"||u==="custom"?{}:{paddingBottom:{"16:9":"56.25%","4:3":"75%","1:1":"100%","3:2":"66.67%","21:9":"42.86%","9:16":"177.78%"}[u]},Mr=()=>{const te={padding:o.spacingUnit,color:o.text};switch(z){case"overlay":return{...te,position:"absolute",bottom:0,left:0,right:0,background:`linear-gradient(to top, rgba(0,0,0,${o.overlayOpacity}), transparent)`};case"hover":return{...te,position:"absolute",bottom:0,left:0,right:0,opacity:0,transition:`opacity ${o.transitionSpeed} ${o.transitionEasing}`,background:`linear-gradient(to top, rgba(0,0,0,${o.overlayOpacity}), transparent)`};default:return te}};return e.jsxs("div",{style:{position:"relative",overflow:"hidden",backgroundColor:o.surface,borderRadius:o.borderRadius,boxShadow:o.shadow,border:`1px solid ${o.border}`,cursor:ie?"pointer":"default",height:"100%"},onTouchStart:mt?Cr:void 0,onTouchEnd:mt?zr:void 0,onMouseMove:()=>Ze(!0),className:Ae,children:[e.jsxs("div",{style:{position:"relative",width:"100%",...Rr()},children:[d&&e.jsx("video",{ref:N,src:r.src,poster:r.poster||r.thumbnail,preload:B,loop:A,muted:Xe,onTimeUpdate:Ft,onLoadedMetadata:Ft,onWaiting:()=>Pt(!0),onCanPlay:()=>Pt(!1),onEnded:()=>{Ve(!1),X?.(r,t.findIndex(te=>te.id===r.id))},style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:u==="auto"?o.borderRadius:`${o.borderRadius} ${o.borderRadius} 0 0`,...u==="auto"?{aspectRatio:"16/9"}:{position:"absolute",top:0,left:0}}}),he===null&&!ze&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.3)",cursor:"pointer",backdropFilter:`blur(${o.backdropBlur})`},onClick:ie||wt,children:gr?V||e.jsx("div",{style:{animation:"spin 1s linear infinite"},children:e.jsx(Qt,{size:48,color:o.primary})}):e.jsx("div",{style:{backgroundColor:`${o.primary}33`,backdropFilter:"blur(4px)",borderRadius:"50%",padding:"16px"},children:e.jsx(He,{size:32,color:o.text,fill:o.text})})}),r.duration&&e.jsx("div",{style:{position:"absolute",bottom:"8px",right:"8px",padding:"4px 8px",fontSize:"12px",fontWeight:o.fontWeightBold,borderRadius:o.borderRadiusSmall,backgroundColor:o.background+"CC",color:o.text,backdropFilter:`blur(${o.backdropBlur})`},children:bt(r.duration)}),x&&e.jsx("button",{onClick:te=>{te.stopPropagation(),Lt(r.id)},style:{position:"absolute",top:"8px",right:"8px",padding:"8px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",border:"none",cursor:"pointer",backdropFilter:`blur(${o.backdropBlur})`},"aria-label":D.has(r.id)?"Unlike video":"Like video",children:e.jsx(nt,{size:16,color:D.has(r.id)?o.accent:o.text,fill:D.has(r.id)?o.accent:"none"})})]}),T&&Nt&&e.jsxs("div",{ref:U,style:{position:"absolute",bottom:0,left:0,right:0,padding:o.spacingUnit,background:"linear-gradient(to top, rgba(0,0,0,0.8), transparent)",borderRadius:`0 0 ${o.borderRadius} ${o.borderRadius}`,backdropFilter:`blur(${o.backdropBlur})`,transition:`opacity ${o.transitionSpeed} ease`,opacity:Nt?1:0},className:Pe,children:[h&&e.jsx("div",{onClick:kr,style:{height:"4px",backgroundColor:"rgba(255, 255, 255, 0.3)",borderRadius:o.borderRadiusSmall,cursor:"pointer",position:"relative",marginBottom:"12px"},children:e.jsx("div",{style:{height:"100%",borderRadius:o.borderRadiusSmall,width:`${Le/Fe*100||0}%`,backgroundColor:o.primary}})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("button",{onClick:wt,style:{padding:"8px",borderRadius:"50%",backgroundColor:o.primary,border:"none",cursor:"pointer"},"aria-label":ze?"Pause":"Play",children:ze?e.jsx(ot,{size:20,color:o.text}):e.jsx(He,{size:20,color:o.text})}),m&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:Sr,style:{padding:"6px",borderRadius:"50%",backgroundColor:"transparent",border:"none",cursor:"pointer"},"aria-label":Xe?"Unmute":"Mute",children:Xe?e.jsx(st,{size:18,color:o.text}):e.jsx(xt,{size:18,color:o.text})}),!mt&&e.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:Xe?0:lt,onChange:te=>{const _e=parseFloat(te.target.value);At(_e),N.current&&(N.current.volume=_e,_e>0&&yt(!1))},style:{width:"80px",height:"4px",borderRadius:"2px",background:`linear-gradient(to right, ${o.primary} 0%, ${o.primary} ${(Xe?0:lt)*100}%, rgba(255,255,255,0.3) ${(Xe?0:lt)*100}%, rgba(255,255,255,0.3) 100%)`},"aria-label":"Volume control"})]}),e.jsxs("span",{style:{fontSize:"14px",color:o.text,minWidth:"40px"},children:[bt(Le)," / ",bt(Fe)]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[k&&e.jsxs("div",{style:{position:"relative"},children:[e.jsxs("button",{onClick:()=>Bt(!vt),style:{padding:"6px 10px",borderRadius:o.borderRadiusSmall,backgroundColor:vt?"rgba(255, 255, 255, 0.2)":"transparent",border:"none",color:o.text,cursor:"pointer",fontSize:"14px"},"aria-label":"Playback speed",children:[Qe,"x"]}),vt&&e.jsx("div",{style:{position:"absolute",bottom:"100%",right:0,backgroundColor:o.surface,borderRadius:o.borderRadiusSmall,padding:"8px",boxShadow:o.shadow,zIndex:10,minWidth:"80px"},children:[.5,.75,1,1.25,1.5,2].map(te=>e.jsxs("button",{onClick:()=>Tr(te),style:{width:"100%",padding:"6px 10px",backgroundColor:Qe===te?o.primary+"33":"transparent",border:"none",color:o.text,cursor:"pointer"},children:[te,"x"]},te))})]}),oe&&e.jsx("button",{onClick:jr,style:{padding:"6px",borderRadius:"50%",backgroundColor:"transparent",border:"none",cursor:"pointer"},"aria-label":ct?"Exit fullscreen":"Enter fullscreen",children:ct?e.jsx(Rt,{size:18,color:o.text}):e.jsx(zt,{size:18,color:o.text})})]})]})]}),p&&e.jsxs("div",{style:Mr(),children:[r.title&&e.jsx("h3",{style:{color:o.text,fontWeight:o.fontWeightBold,fontSize:"14px",margin:"0 0 8px 0",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:r.title}),r.description&&z!=="hover"&&e.jsx("p",{style:{color:o.textSecondary,fontSize:"12px",margin:"0 0 8px 0",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:r.description}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"12px",color:o.textSecondary},children:[e.jsxs("div",{style:{display:"flex",gap:"12px"},children:[r.views&&e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[e.jsx(St,{size:12})," ",r.views.toLocaleString()]}),r.likes&&e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[e.jsx(nt,{size:12})," ",r.likes.toLocaleString()]})]}),r.publishDate&&e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[e.jsx(Vr,{size:12})," ",new Date(r.publishDate).toLocaleDateString()]})]}),r.tags&&r.tags.length>0&&e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginTop:"8px"},children:r.tags.slice(0,3).map((te,_e)=>e.jsxs("span",{style:{padding:"4px 8px",fontSize:"12px",borderRadius:"16px",backgroundColor:o.primary+"33",color:o.primary},children:["#",te]},_e))})]}),!T&&h&&ze&&Fe>0&&e.jsx("div",{style:{position:"absolute",bottom:0,left:0,height:"4px",width:`${Le/Fe*100}%`,backgroundColor:o.primary}})]})},ur=()=>{if(he===null||!J)return null;const r=t[he];if(!r)return null;const T=()=>{me(U=>U!==null?(U-1+t.length)%t.length:null)},ie=()=>{me(U=>U!==null?(U+1)%t.length:null)},N=window.innerWidth<768;return e.jsxs("div",{ref:$e,style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.95)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,padding:"20px"},onClick:U=>{U.target===U.currentTarget&&me(null)},children:[e.jsx("button",{onClick:()=>me(null),style:{position:"absolute",top:"20px",right:"20px",padding:"12px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.7)",border:"none",cursor:"pointer",transition:"all 0.3s ease",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},onMouseEnter:U=>{U.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.9)",U.currentTarget.style.transform="scale(1.1)"},onMouseLeave:U=>{U.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.7)",U.currentTarget.style.transform="scale(1)"},"aria-label":"Close lightbox",children:e.jsx(at,{size:24,color:"white"})}),t.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:T,style:{position:"absolute",left:"20px",top:"50%",transform:"translateY(-50%)",padding:"12px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.7)",border:"none",cursor:"pointer",transition:"all 0.3s ease",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},onMouseEnter:U=>{U.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.9)",U.currentTarget.style.transform="translateY(-50%) scale(1.1)"},onMouseLeave:U=>{U.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.7)",U.currentTarget.style.transform="translateY(-50%) scale(1)"},"aria-label":"Previous video",children:e.jsx(Tt,{size:24,color:"white"})}),e.jsx("button",{onClick:ie,style:{position:"absolute",right:"20px",top:"50%",transform:"translateY(-50%)",padding:"12px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.7)",border:"none",cursor:"pointer",transition:"all 0.3s ease",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},onMouseEnter:U=>{U.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.9)",U.currentTarget.style.transform="translateY(-50%) scale(1.1)"},onMouseLeave:U=>{U.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.7)",U.currentTarget.style.transform="translateY(-50%) scale(1)"},"aria-label":"Next video",children:e.jsx(Ct,{size:24,color:"white"})})]}),e.jsxs("div",{style:{position:"relative",width:"100%",maxWidth:"90vw",maxHeight:"90vh",display:"flex",flexDirection:"column",gap:"20px"},children:[e.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,padding:"16px",background:"linear-gradient(to bottom, rgba(0,0,0,0.8), transparent)",display:"flex",justifyContent:"space-between",alignItems:"flex-start",zIndex:1e3},children:[e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("h2",{style:{color:"white",fontSize:N?"18px":"20px",fontWeight:"bold",margin:"0 0 4px 0",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.title}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"16px",color:"rgb(209, 213, 219)",fontSize:N?"12px":"14px"},children:[r.views&&e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[e.jsx(St,{size:N?12:14})," ",r.views.toLocaleString()," views"]}),r.likes&&e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[e.jsx(nt,{size:N?12:14})," ",r.likes.toLocaleString()," likes"]})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:N?"8px":"12px"},children:[x&&e.jsxs("button",{onClick:()=>Lt(r.id),style:{padding:N?"6px":"8px",borderRadius:"50%",backgroundColor:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.3s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:U=>{U.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.1)"},onMouseLeave:U=>{U.currentTarget.style.backgroundColor="transparent"},"aria-label":D.has(r.id)?"Unlike video":"Like video",children:[e.jsx(nt,{size:N?18:20,color:D.has(r.id)?o.accent:"white",fill:D.has(r.id)?o.accent:"none"}),N&&e.jsx("span",{style:{fontSize:"10px",color:"white",marginTop:"2px"},children:D.has(r.id)?"Liked":"Like"})]}),de&&e.jsxs("button",{onClick:()=>dr(r),style:{padding:N?"6px":"8px",borderRadius:"50%",backgroundColor:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.3s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:U=>{U.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.1)"},onMouseLeave:U=>{U.currentTarget.style.backgroundColor="transparent"},"aria-label":"Download video",children:[e.jsx(Jt,{size:N?18:20,color:"white"}),N&&e.jsx("span",{style:{fontSize:"10px",color:"white",marginTop:"2px"},children:"Download"})]}),Z&&e.jsxs("button",{onClick:()=>cr(r),style:{padding:N?"6px":"8px",borderRadius:"50%",backgroundColor:"transparent",border:"none",cursor:"pointer",transition:"background-color 0.3s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:U=>{U.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.1)"},onMouseLeave:U=>{U.currentTarget.style.backgroundColor="transparent"},"aria-label":"Share video",children:[e.jsx(Kt,{size:N?18:20,color:"white"}),N&&e.jsx("span",{style:{fontSize:"10px",color:"white",marginTop:"2px"},children:"Share"})]})]})]}),e.jsx(_t,{video:r,isLightbox:!0})]})]})},pr=()=>{const r=ir(),T=typeof i=="string"?i:o.spacingUnit;switch(ue){case"grid":return{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gap:T};case"masonry":return{columnCount:r,columnGap:T};case"list":return{display:"flex",flexDirection:"column",gap:T};case"carousel":return{display:"grid",gridAutoFlow:"column",gridAutoColumns:`calc(100% / ${r})`,gap:T,overflowX:"auto",scrollSnapType:"x mandatory",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}};case"mosaic":return{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gridTemplateRows:"masonry",gap:T};case"compact":return{display:"grid",gridTemplateColumns:`repeat(${r*2}, 1fr)`,gap:T};case"highlight":return{display:"grid",gridTemplateColumns:`repeat(${r-1}, 1fr) 2fr`,gap:T};default:return{display:"grid",gridTemplateColumns:`repeat(${r}, 1fr)`,gap:T}}},xr=()=>f||e.jsxs("div",{style:{textAlign:"center",padding:"60px 20px",color:o.textSecondary},children:[e.jsx("div",{style:{fontSize:"48px",marginBottom:"16px",opacity:.5},children:"🎥"}),e.jsx("h3",{style:{color:o.text,fontSize:"20px",margin:"0 0 8px 0"},children:"No videos found"}),e.jsx("p",{style:{fontSize:"16px",margin:0},children:je||Te!=="all"?"Try adjusting your search or filter criteria.":"No videos available in this gallery."})]}),fr=()=>W||e.jsxs("div",{style:{textAlign:"center",padding:"60px 20px",color:o.textSecondary},children:[e.jsx("div",{style:{fontSize:"48px",marginBottom:"16px",opacity:.5},children:"⚠️"}),e.jsx("h3",{style:{color:o.text,fontSize:"20px",margin:"0 0 8px 0"},children:"Error loading videos"}),e.jsx("p",{style:{fontSize:"16px",margin:0},children:O||"An unknown error occurred while loading the videos."}),e.jsx("button",{onClick:()=>window.location.reload(),style:{marginTop:"16px",padding:"8px 16px",borderRadius:o.borderRadiusSmall,backgroundColor:o.primary,color:o.text,border:"none",cursor:"pointer",transition:`all ${o.transitionSpeed} ${o.transitionEasing}`},onMouseEnter:r=>{r.currentTarget.style.transform="scale(1.05)"},onMouseLeave:r=>{r.currentTarget.style.transform="scale(1)"},children:"Try Again"})]});return e.jsxs("div",{ref:Be,className:`${we} ${Se}`,style:{backgroundColor:o.background,minHeight:"100vh",padding:o.spacingUnit,fontFamily:o.fontFamily,fontSize:o.fontSizeBase,color:o.text},"aria-label":b,children:[lr(),e.jsxs("div",{style:{marginBottom:o.spacingUnit},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:o.spacingUnit},children:[e.jsxs("div",{children:[e.jsx("h1",{style:{color:o.text,fontSize:"32px",fontWeight:o.fontWeightBold,margin:"0 0 8px 0"},children:ne}),S&&e.jsx("p",{style:{color:o.textSecondary,fontSize:"16px",margin:"0 0 24px 0",lineHeight:"1.6"},children:S})]}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>gt("grid"),style:{padding:"8px",borderRadius:o.borderRadiusSmall,backgroundColor:ue==="grid"?o.primary:"transparent",border:"none",cursor:"pointer",transition:`all ${o.transitionSpeed} ${o.transitionEasing}`},onMouseEnter:r=>{ue!=="grid"&&(r.currentTarget.style.backgroundColor=o.primary+"33")},onMouseLeave:r=>{ue!=="grid"&&(r.currentTarget.style.backgroundColor="transparent")},"aria-label":"Grid layout",children:e.jsx(un,{size:20,color:ue==="grid"?o.text:o.textSecondary})}),e.jsx("button",{onClick:()=>gt("masonry"),style:{padding:"8px",borderRadius:o.borderRadiusSmall,backgroundColor:ue==="masonry"?o.primary:"transparent",border:"none",cursor:"pointer",transition:`all ${o.transitionSpeed} ${o.transitionEasing}`},onMouseEnter:r=>{ue!=="masonry"&&(r.currentTarget.style.backgroundColor=o.primary+"33")},onMouseLeave:r=>{ue!=="masonry"&&(r.currentTarget.style.backgroundColor="transparent")},"aria-label":"Masonry layout",children:e.jsx(en,{size:20,color:ue==="masonry"?o.text:o.textSecondary})}),e.jsx("button",{onClick:()=>gt("list"),style:{padding:"8px",borderRadius:o.borderRadiusSmall,backgroundColor:ue==="list"?o.primary:"transparent",border:"none",cursor:"pointer",transition:`all ${o.transitionSpeed} ${o.transitionEasing}`},onMouseEnter:r=>{ue!=="list"&&(r.currentTarget.style.backgroundColor=o.primary+"33")},onMouseLeave:r=>{ue!=="list"&&(r.currentTarget.style.backgroundColor="transparent")},"aria-label":"List layout",children:e.jsx(gn,{size:20,color:ue==="list"?o.text:o.textSecondary})})]})]}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:o.spacingUnit,alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",gap:o.spacingUnit,alignItems:"center",flex:1},children:[G&&e.jsxs("div",{style:{position:"relative",flex:1,maxWidth:"400px"},children:[e.jsx("input",{type:"text",placeholder:K,value:je,onChange:r=>le(r.target.value),style:{width:"100%",padding:"10px 16px 10px 40px",borderRadius:o.borderRadius,border:`1px solid ${o.border}`,backgroundColor:o.surface,color:o.text,fontSize:o.fontSizeBase,transition:`all ${o.transitionSpeed} ${o.transitionEasing}`,outline:"none"},onFocus:r=>{r.currentTarget.style.borderColor=o.primary||"none"},onBlur:r=>{r.currentTarget.style.borderColor=o.border||"none"},"aria-label":"Search videos"}),e.jsx(Mn,{size:18,color:o.textSecondary,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}})]}),l&&Et.length>1&&e.jsxs("div",{style:{position:"relative"},children:[e.jsx("select",{value:Te,onChange:r=>Ye(r.target.value),style:{padding:"10px 36px 10px 16px",borderRadius:o.borderRadius,border:`1px solid ${o.border}`,backgroundColor:o.surface,color:o.text,fontSize:o.fontSizeBase,appearance:"none",cursor:"pointer",transition:`all ${o.transitionSpeed} ${o.transitionEasing}`,outline:"none"},onFocus:r=>{r.currentTarget.style.borderColor=o.primary||"none"},onBlur:r=>{r.currentTarget.style.borderColor=o.border||"none"},"aria-label":"Filter videos by category",children:Et.map(r=>e.jsx("option",{value:r,style:{backgroundColor:o.surface,color:o.text},children:r.charAt(0).toUpperCase()+r.slice(1)},r))}),e.jsx(cn,{size:16,color:o.textSecondary,style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none"}})]}),I&&P&&P.length>0&&e.jsxs("div",{style:{position:"relative"},children:[e.jsx("select",{value:Ee,onChange:r=>Ge(r.target.value),style:{padding:"10px 36px 10px 16px",borderRadius:o.borderRadius,border:`1px solid ${o.border}`,backgroundColor:o.surface,color:o.text,fontSize:o.fontSizeBase,appearance:"none",cursor:"pointer",transition:`all ${o.transitionSpeed} ${o.transitionEasing}`,outline:"none"},onFocus:r=>{r.currentTarget.style.borderColor=o.primary||"none"},onBlur:r=>{r.currentTarget.style.borderColor=o.border||"none"},"aria-label":"Sort videos",children:P.map(r=>e.jsx("option",{value:r,style:{backgroundColor:o.surface,color:o.text},children:r.charAt(0).toUpperCase()+r.slice(1)},r))}),e.jsx(Or,{size:16,color:o.textSecondary,style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none"}})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:o.textSecondary,fontSize:"14px"},children:[e.jsx(an,{size:16}),e.jsxs("span",{children:["Showing ",ht.length," of ",t.length," videos"]})]})]})]}),O?e.jsx(fr,{}):ht.length===0?e.jsx(xr,{}):e.jsx("div",{style:pr(),className:Se,children:ht.map((r,T)=>e.jsx("div",{style:{breakInside:ue==="masonry"?"avoid":void 0,pageBreakInside:ue==="masonry"?"avoid":void 0},children:e.jsx(_t,{video:r,onClick:()=>{me(T),ae?.(r,T)}})},r.id))}),e.jsx(ur,{}),R&&ye<t.length&&e.jsx("div",{style:{display:"flex",justifyContent:"center",marginTop:o.spacingUnit},children:e.jsxs("button",{onClick:()=>Ce(r=>Math.min(r+12,t.length)),style:{padding:"12px 24px",borderRadius:o.borderRadius,backgroundColor:o.primary,color:o.text,border:"none",cursor:"pointer",fontSize:"16px",fontWeight:o.fontWeightBold,display:"flex",alignItems:"center",gap:"8px",transition:`all ${o.transitionSpeed} ${o.transitionEasing}`},onMouseEnter:r=>{r.currentTarget.style.transform="translateY(-2px)",r.currentTarget.style.boxShadow=o.hoverShadow||"none"},onMouseLeave:r=>{r.currentTarget.style.transform="translateY(0)",r.currentTarget.style.boxShadow="none"},"aria-label":"Load more videos",children:[e.jsx(Cn,{size:18}),"Load More Videos"]})})]})},jo=({images:t,columns:s=3,gap:c="10px",layout:i="grid",lightbox:u=!0,className:a=""})=>{const[d,p]=n.useState(null),[z,C]=n.useState(typeof s=="number"?s:s.default||3),[j,h]=n.useState(null),[m,g]=n.useState(0);n.useEffect(()=>{const y=()=>{if(typeof s=="number")C(s);else{const v=window.innerWidth;v<640&&s.sm?C(s.sm):v<1024&&s.md?C(s.md):v<1280&&s.lg?C(s.lg):v>=1280&&s.xl?C(s.xl):C(s.default||3)}};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[s]);const k=()=>p(null),w=y=>{y.stopPropagation(),d!==null&&(h("prev"),p(v=>(v-1+t.length)%t.length),g(v=>v+1))},_=y=>{y.stopPropagation(),d!==null&&(h("next"),p(v=>(v+1)%t.length),g(v=>v+1))};return e.jsxs("div",{style:{width:"100%"},className:a,children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${z}, 1fr)`,gap:c,gridAutoFlow:i==="masonry"?"dense":"row"},children:t.map((y,v)=>e.jsx("div",{style:{position:"relative",overflow:"hidden",borderRadius:"8px",cursor:u?"pointer":"default"},onClick:()=>{p(v),h(null)},children:e.jsx(jt,{src:y.src,alt:y.alt||"Gallery Image",lazyLoad:!0,hoverScale:1.05,transitionDuration:"0.3s",style:{display:"block",width:"100%",height:"auto"}})},v))}),u&&d!==null&&e.jsxs("div",{onClick:k,style:{position:"fixed",inset:"0",background:"rgba(0,0,0,0.8)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},role:"dialog","aria-modal":"true",children:[e.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",maxWidth:"90%",maxHeight:"90%"},onClick:y=>y.stopPropagation(),children:[e.jsx("button",{onClick:w,"aria-label":"Previous image",style:{position:"absolute",left:"5px",top:"50%",transform:"translateY(-50%)",color:"white",background:"rgba(0,0,0,0.5)",border:"none",padding:"10px",borderRadius:"50%",cursor:"pointer",zIndex:2},children:e.jsx(Tt,{size:24})}),e.jsx("div",{style:{animation:j==="next"?"slideInFromRight 0.4s ease":j==="prev"?"slideInFromLeft 0.4s ease":"fadeIn 0.3s ease"},children:e.jsx(jt,{src:t[d].src,alt:t[d].alt||"Preview",lazyLoad:!0,style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}})},m),e.jsx("button",{onClick:_,"aria-label":"Next image",style:{position:"absolute",right:"5px",top:"50%",transform:"translateY(-50%)",color:"white",background:"rgba(0,0,0,0.5)",border:"none",padding:"10px",borderRadius:"50%",cursor:"pointer",zIndex:2},children:e.jsx(Ct,{size:24})})]}),e.jsx("button",{onClick:k,"aria-label":"Close preview",style:{position:"absolute",top:"20px",right:"20px",color:"white",background:"rgba(0,0,0,0.5)",border:"none",padding:"10px",borderRadius:"50%",cursor:"pointer"},children:e.jsx(at,{size:28})}),e.jsx("style",{children:`
|
|
302
|
+
`})]})}function ve(t,r){return{border:"none",backgroundColor:r,color:t,cursor:"pointer",padding:"10px",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",backdropFilter:"blur(10px)"}}const Gr=({images:t,columns:r=3,gap:a="10px",layout:i="grid",lightbox:c=!0,className:n=""})=>{const[l,d]=s.useState(null),[S,j]=s.useState(()=>typeof r=="number"?r:r.default??3),[v,f]=s.useState(null),[b,x]=s.useState(0);s.useEffect(()=>{if(typeof window>"u")return;const g=()=>{if(typeof r=="number")j(r);else{const y=window.innerWidth;y<640&&r.sm!=null?j(r.sm):y<1024&&r.md!=null?j(r.md):y<1280&&r.lg!=null?j(r.lg):y>=1280&&r.xl!=null?j(r.xl):j(r.default??3)}};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[r]);const w=()=>d(null),m=g=>{g.stopPropagation(),l!==null&&(f("prev"),d(y=>(y-1+t.length)%t.length),x(y=>y+1))},C=g=>{g.stopPropagation(),l!==null&&(f("next"),d(y=>(y+1)%t.length),x(y=>y+1))};return e.jsxs("div",{style:{width:"100%"},className:n,children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${S}, 1fr)`,gap:a,gridAutoFlow:i==="masonry"?"dense":"row"},children:t.map((g,y)=>e.jsx("div",{style:{position:"relative",overflow:"hidden",borderRadius:"8px",cursor:c?"pointer":"default"},onClick:()=>{d(y),f(null)},children:e.jsx(Ue,{src:g.src,alt:g.alt||"Gallery Image",lazyLoad:!0,hoverScale:1.05,transitionDuration:"0.3s",style:{display:"block",width:"100%",height:"auto"}})},y))}),c&&l!==null&&e.jsxs("div",{onClick:w,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.8)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},role:"dialog","aria-modal":"true",children:[e.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",maxWidth:"90%",maxHeight:"90%"},onClick:g=>g.stopPropagation(),children:[e.jsx("button",{onClick:m,"aria-label":"Previous image",style:{position:"absolute",left:"5px",top:"50%",transform:"translateY(-50%)",color:"white",background:"rgba(0,0,0,0.5)",border:"none",padding:"10px",borderRadius:"50%",cursor:"pointer",zIndex:2},children:e.jsx(it,{size:24})}),e.jsx("div",{style:{animation:v==="next"?"slideInFromRight 0.4s ease":v==="prev"?"slideInFromLeft 0.4s ease":"fadeIn 0.3s ease"},children:e.jsx(Ue,{src:t[l].src,alt:t[l].alt||"Preview",lazyLoad:!0,style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}})},b),e.jsx("button",{onClick:C,"aria-label":"Next image",style:{position:"absolute",right:"5px",top:"50%",transform:"translateY(-50%)",color:"white",background:"rgba(0,0,0,0.5)",border:"none",padding:"10px",borderRadius:"50%",cursor:"pointer",zIndex:2},children:e.jsx(at,{size:24})})]}),e.jsx("button",{onClick:w,"aria-label":"Close preview",style:{position:"absolute",top:"20px",right:"20px",color:"white",background:"rgba(0,0,0,0.5)",border:"none",padding:"10px",borderRadius:"50%",cursor:"pointer"},children:e.jsx(De,{size:28})}),e.jsx("style",{children:`
|
|
348
303
|
@keyframes slideInFromRight {
|
|
349
304
|
from { transform: translateX(100%); opacity: 0; }
|
|
350
305
|
to { transform: translateX(0); opacity: 1; }
|
|
@@ -357,4 +312,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
357
312
|
from { opacity: 0; }
|
|
358
313
|
to { opacity: 1; }
|
|
359
314
|
}
|
|
360
|
-
`})]})]})};exports.Accordation
|
|
315
|
+
`})]})]})};exports.Accordation=$r;exports.Alert=Fr;exports.AudioGallery=qr;exports.AudioPlayer=Tr;exports.Avatar=bt;exports.AvatarGroup=Xr;exports.Badge=Wr;exports.Button=St;exports.Card=Pr;exports.CheckRadio=zr;exports.Container=Rr;exports.Drawer=Ir;exports.DrawerButton=Mr;exports.Dropdown=Cr;exports.Flexbox=Nr;exports.GridView=Ar;exports.Image=Ue;exports.ImageGallery=Gr;exports.Input=wr;exports.LeftTabs=ut;exports.List=jr;exports.Modal=Dr;exports.RightTabs=ft;exports.Table=Er;exports.Tabs=kr;exports.Text=kt;exports.TopTabs=pt;exports.VideoPlayer=Sr;
|