1import{r as n,j as e}from"./vendor-trpc-BW0ubQFZ.js";import{c as h,u as q,t as p,L as d,S as D}from"./index-B27n6TE2.js";import{C as B,U as Q,H as V}from"./users-round-Ij44W5UL.js";import{C as W,a as T}from"./chart-column-cbTmI_tZ.js";import{C as G}from"./clipboard-plus-BSfAcdV4.js";import{M as X,L as J}from"./menu-CFs8JZ8T.js";import{S as K}from"./search-Co7B4elC.js";import{X as Y}from"./x-BRqhJYF4.js";import"./vendor-react-COd4auuD.js";import"./vendor-ui-BIS3fIqt.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Z=h("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 7 * @license lucide-react v0.453.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const ee=h("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** 12 * @license lucide-react v0.453.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const te=h("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 17 * @license lucide-react v0.453.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const se=h("UserRoundCog",[["path",{d:"M2 21a8 8 0 0 1 10.434-7.62",key:"1yezr2"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["path",{d:"m19.5 14.3-.4.9",key:"1eb35c"}],["path",{d:"m16.9 20.8-.4.9",key:"dfjc4z"}],["path",{d:"m21.7 19.5-.9-.4",key:"q4dx6b"}],["path",{d:"m15.2 16.9-.9-.4",key:"1r0w5f"}],["path",{d:"m21.7 16.5-.9.4",key:"1knoei"}],["path",{d:"m15.2 19.1-.9.4",key:"j188fs"}],["path",{d:"m19.5 21.7-.4-.9",key:"1tonu5"}],["path",{d:"m16.9 15.2-.4-.9",key:"699xu"}]]),I=[{items:[{label:"ëìë³´ë",path:"/admin",icon:Z}]},{label:"íì ì´ì",items:[{label:"ì ì²ì",path:"/admin/applicants",icon:B,roles:["super_admin","screening_manager","cs"]},{label:"íì",path:"/admin/members",icon:Q,roles:["super_admin","matching_manager"]},{label:"1:1 매ì¹",path:"/admin/matching",icon:V,roles:["super_admin","matching_manager"]},{label:"íë¼ì´ë¹ ìì ",path:"/admin/social",icon:W,roles:["super_admin"]},{label:"Host ì ì ê²ì",path:"/admin/host-leads",icon:G,roles:["super_admin","screening_manager"]}]},{label:"ì 무 ê´ë¦¬",items:[{label:"í ì¼ Â· ì¼ì ",path:"/admin/operations",icon:te,roles:["super_admin","screening_manager","matching_manager","cs"]}]},{label:"íµê³ · ë¶ì",items:[{label:"íµê³ · Funnel",path:"/admin/analytics",icon:T,roles:["super_admin","marketing"]}]},{label:"ìì¤í ê´ë¦¬",items:[{label:"ê´ë¦¬ì · ê¶í",path:"/admin/admins",icon:se,roles:["super_admin"]},{label:"ê°ì¬ ë¡ê·¸",path:"/admin/audit-log",icon:D,roles:["super_admin"]},{label:"ì¤ì ",path:"/admin/settings",icon:ee,roles:["super_admin"]}]}];function O(x,a){return a==="/admin"?x===a:x===a||x.startsWith(`${a}/`)}function he({children:x}){const[a,l]=q(),{data:s,isLoading:f}=p.adminAuth.me.useQuery(),U=p.adminAuth.logout.useMutation({onSuccess:()=>l("/admin/login")}),[m,b]=n.useState(!1),[L,u]=n.useState(""),j=n.useRef(null),A=n.useRef(null),o=n.useCallback((t=!0)=>{b(!1),t&&requestAnimationFrame(()=>j.current?.focus())},[]),c=L.trim(),w=["super_admin","screening_manager","cs"].includes(s?.role??""),N=["super_admin","matching_manager"].includes(s?.role??""),$=["super_admin","matching_manager"].includes(s?.role??""),{data:v,isFetching:k}=p.irumOs.applicants.list.useQuery({search:c},{enabled:c.length>=2&&w}),{data:C,isFetching:_}=p.irumOs.members.list.useQuery({search:c},{enabled:c.length>=2&&N}),{data:F,isFetching:S}=p.matches.list.useQuery(void 0,{enabled:c.length>=1&&$}),R=(F??[]).filter(t=>String(t.id).includes(c)||String(t.status).toLowerCase().includes(c.toLowerCase())).slice(0,4);n.useEffect(()=>{!f&&!s&&l("/admin/login")},[f,s,l]),n.useEffect(()=>{s?.role==="social_host"&&l(s.mustChangePassword?"/host/change-password":"/host",{replace:!0})},[s?.mustChangePassword,s?.role,l]),n.useEffect(()=>{s?.role!=="social_host"&&s?.mustChangePassword&&a!=="/admin/change-password"&&l("/admin/change-password",{replace:!0})},[s?.mustChangePassword,a,l]),n.useEffect(()=>{const t=i=>{i.key==="Escape"&&m&&o()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[o,m]),n.useEffect(()=>{if(!m)return;const t=document.body.style.overflow;return document.body.style.overflow="hidden",requestAnimationFrame(()=>A.current?.focus()),()=>{document.body.style.overflow=t}},[m]),n.useEffect(()=>{o(!1)},[o,a]),n.useEffect(()=>{const t=()=>{window.innerWidth>=1024&&o(!1)};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[o]);function P(t){t.preventDefault(),c&&(b(!1),w?l(`/admin/applicants?search=${encodeURIComponent(c)}`):N&&l(`/admin/members?search=${encodeURIComponent(c)}`))}if(f)return e.jsx("div",{"data-loc":"client/src/components/AdminLayout.t
21sx:148",className:"flex min-h-screen items-center justify-center bg-[#f6f6f2]",children:e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:148",className:"h-8 w-8 animate-spin border-2 border-[#c59c2a] border-t-transparent"})});if(!s)return e.jsx("main",{"data-loc":"client/src/components/AdminLayout.tsx:152",className:"flex min-h-screen items-center justify-center bg-[#f6f6f2] p-6",children:e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:153",className:"w-full max-w-md border border-black/10 bg-white p-8 text-center shadow-sm",children:[e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:154",className:"text-[11px] font-semibold tracking-[0.16em] text-[#a98722]",children:"IRUM OS"}),e.jsx("h1",{"data-loc":"client/src/components/AdminLayout.tsx:155",className:"mt-3 text-xl font-semibold text-[#1d1c19]",children:"ê´ë¦¬ì ë¡ê·¸ì¸ì´ íìí©ëë¤"}),e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:156",className:"mt-2 text-sm leading-6 text-[#6e6b63]",children:"ì ì²ìì ë§¤ì¹ ì´ì ì ë³´ë ê¶íì´ ìë ì´ìììê²ë§ ì ê³µë©ëë¤."}),e.jsx(d,{"data-loc":"client/src/components/AdminLayout.tsx:157",href:"/admin/login",className:"mt-6 inline-flex min-h-11 items-center justify-center bg-[#171614] px-5 text-sm font-semibold text-white",children:"ë¡ê·¸ì¸ íë©´ì¼ë¡ ì´ë"})]})});if(s.role==="social_host")return e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:164",className:"flex min-h-screen items-center justify-center bg-[#f6f6f2]",children:e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:164",className:"h-8 w-8 animate-spin border-2 border-[#c59c2a] border-t-transparent"})});if(s.mustChangePassword&&a!=="/admin/change-password")return e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:169",className:"flex min-h-screen items-center justify-center bg-[#f6f6f2]",children:e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:169",className:"h-8 w-8 animate-spin border-2 border-[#c59c2a] border-t-transparent"})});const y=I.flatMap(t=>t.items).filter(t=>t.path!=="/admin").find(t=>O(a,t.path));if(!(!y||!y.roles||y.roles.includes(s.role)))return e.jsx("main",{"data-loc":"client/src/components/AdminLayout.tsx:178",className:"flex min-h-screen items-center justify-center bg-[#f6f6f2] p-6",children:e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:179",className:"w-full max-w-md border border-black/10 bg-white p-8 text-center shadow-sm",children:[e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:180",className:"text-[11px] font-semibold tracking-[0.16em] text-[#a98722]",children:"IRUM OS"}),e.jsx("h1",{"data-loc":"client/src/components/AdminLayout.tsx:181",className:"mt-3 text-xl font-semibold text-[#1d1c19]",children:"ì ê·¼ ê¶íì´ ììµëë¤"}),e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:182",className:"mt-2 text-sm leading-6 text-[#6e6b63]",children:"íì¬ ì´ìì ìí ë¡ë ì´ ë©ë´ë¥¼ ì´ ì ììµëë¤."}),e.jsx(d,{"data-loc":"client/src/components/AdminLayout.tsx:183",href:"/admin",className:"mt-6 inline-flex min-h-11 items-center justify-center bg-[#171614] px-5 text-sm font-semibold text-white",children:"ëìë³´ëë¡ ì´ë"})]})});const M=({mobile:t=!1})=>e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:190",className:"flex h-full flex-col bg-[#171614] text-white",children:[e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:191",className:"flex h-[72px] items-center justify-between border-b border-white/10 px-5",children:[e.jsxs(d,{"data-loc":"client/src/components/AdminLayout.tsx:192",href:"/admin",onClick:()=>o(!1),className:"flex items-center gap-3",children:[e.jsx("img",{"data-loc":"client/src/components/AdminLayout.tsx:193",src:"/manus-storage/irum-logo-cropped_9307126b.png",alt:"IRUM",className:"h-8 w-8 object-contain"}),e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:194",children:[e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:195",className:"text-[11px] tracking-[0.18em] text-[#c59c2a]",children:"IRUM OS"}
21),e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:196",className:"mt-0.5 text-sm font-semibold tracking-tight text-white",children:"ì´ì ì½ì"})]})]}),t&&e.jsx("button",{"data-loc":"client/src/components/AdminLayout.tsx:199",ref:A,type:"button","aria-label":"ë©ë´ ë«ê¸°",onClick:()=>o(),className:"grid h-11 w-11 place-items-center text-white/65 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#f2cc68]",children:e.jsx(Y,{"data-loc":"client/src/components/AdminLayout.tsx:199",size:19})})]}),e.jsx("nav",{"data-loc":"client/src/components/AdminLayout.tsx:202",className:"flex-1 overflow-y-auto px-3 py-4",children:I.map((i,E)=>{const z=i.items.filter(r=>!r.roles||r.roles.includes(s.role));return z.length?e.jsxs("section",{"data-loc":"client/src/components/AdminLayout.tsx:207",className:E?"mt-6":"",children:[i.label&&e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:208",className:"mb-2 px-3 text-[10px] font-semibold tracking-[0.14em] text-white/38",children:i.label}),e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:209",className:"space-y-1",children:z.map(r=>{const g=O(a,r.path),H=r.icon;return e.jsx(d,{"data-loc":"client/src/components/AdminLayout.tsx:214",href:r.path,"aria-current":g?"page":void 0,onClick:()=>o(!1),children:e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:215",className:`flex min-h-11 items-center gap-3 px-3 text-[13px] transition-colors ${g?"border-l-2 border-[#c59c2a] bg-white/[0.09] font-semibold text-[#f2cc68]":"border-l-2 border-transparent text-white/62 hover:bg-white/[0.06] hover:text-white"}`,children:[e.jsx(H,{"data-loc":"client/src/components/AdminLayout.tsx:216",size:16,strokeWidth:g?2:1.7}),e.jsx("span",{"data-loc":"client/src/components/AdminLayout.tsx:217",children:r.label})]})},r.path)})})]},i.label??E):null})}),e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:228",className:"border-t border-white/10 p-3",children:e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:229",className:"flex items-center gap-3 rounded-sm px-2 py-2.5",children:[e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:230",className:"grid h-8 w-8 place-items-center rounded-full bg-[#c59c2a] text-xs font-bold text-[#171614]",children:(s.displayName??s.username).slice(0,1)}),e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:231",className:"min-w-0 flex-1",children:[e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:232",className:"truncate text-xs font-medium text-white",children:s.displayName??s.username}),e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:233",className:"mt-0.5 truncate text-[10px] text-white/42",children:{super_admin:"ì´ê´ ê´ë¦¬ì",screening_manager:"ì¬ì¬ 매ëì ",matching_manager:"ë§¤ì¹ ë§¤ëì ",social_host:"ìì
í¸ì¤í¸",marketing:"ë§ì¼í
",cs:"ê³ ê° ì§ì"}[s.role]??s.role})]}),e.jsx("button",{"data-loc":"client/src/components/AdminLayout.tsx:235","aria-label":"ë¡ê·¸ìì",onClick:()=>U.mutate(),className:"grid h-9 w-9 place-items-center text-white/45 transition-colors hover:text-white",children:e.jsx(J,{"data-loc":"client/src/components/AdminLayout.tsx:235",size:16})})]})})]});return e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:242",className:"admin-shell min-h-screen bg-[#f6f6f2] text-[#24221f]",children:[e.jsx("aside",{"data-loc":"client/src/components/AdminLayout.tsx:243",className:"fixed inset-y-0 left-0 z-30 hidden w-[248px] lg:block",children:e.jsx(M,{"data-loc":"client/src/components/AdminLayout.tsx:243"})}),m&&e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:245",className:"fixed inset-0 z-50 lg:hidden","data-admin-mobile-navigation":!0,children:[e.jsx("button",{"data-loc":"client/src/components/AdminLayout.tsx:246",type:"button","aria-label":"ë©ë´ ë«ê¸°",className:"absolute inset-0 cursor-default bg-black/45",onClick:()=>o()}),e.jsx("aside",{"data-loc":"client/src/components/AdminLayout.tsx:247",id:"admin-mobile-navigation",role:"dialog","aria-modal":"true","aria-label":"ê´ë¦¬ì ì ì²´ ë©ë´",className:"absolute inset-y-0 left-0 w-[min(84vw,320px)] shadow-2xl",children:e.jsx(M,{"data-loc":"client/src/components/AdminLayout.t
21sx:247",mobile:!0})})]}),e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:250",className:"min-h-screen lg:pl-[248px]",children:[e.jsxs("header",{"data-loc":"client/src/components/AdminLayout.tsx:251",className:"sticky top-0 z-20 flex h-[72px] items-center gap-3 border-b border-[#e5e2da] bg-[#fdfcf9]/95 px-4 backdrop-blur md:px-7",children:[e.jsx("button",{"data-loc":"client/src/components/AdminLayout.tsx:252",ref:j,type:"button","aria-label":"ì ì²´ ë©ë´ ì´ê¸°","aria-controls":"admin-mobile-navigation","aria-expanded":m,onClick:()=>b(!0),className:"grid h-11 w-11 place-items-center border border-[#dedad0] bg-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#b48a20] lg:hidden",children:e.jsx(X,{"data-loc":"client/src/components/AdminLayout.tsx:252",size:19})}),e.jsxs("form",{"data-loc":"client/src/components/AdminLayout.tsx:253",onSubmit:P,className:"relative min-w-0 flex-1 max-w-[460px]",children:[e.jsx(K,{"data-loc":"client/src/components/AdminLayout.tsx:254",className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-[#8a857b]",size:16}),e.jsx("input",{"data-loc":"client/src/components/AdminLayout.tsx:255",value:L,onChange:t=>u(t.target.value),placeholder:"ì´ë¦ · ì íë²í¸ · Applicant ID ê²ì",className:"h-10 w-full border border-[#dedad0] bg-white pl-10 pr-4 text-[13px] outline-none transition focus:border-[#b48a20] focus:ring-2 focus:ring-[#c59c2a]/15"}),c.length>=2&&e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:257",className:"absolute left-0 right-0 top-[calc(100%+6px)] z-40 overflow-hidden border border-[#dedad0] bg-white shadow-xl",children:[(k||_||S)&&e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:258",className:"px-4 py-3 text-xs text-[#8a8377]",children:"ê²ì ì¤ì
ëë¤."}),v?.slice(0,4).map(({application:t,operation:i})=>e.jsxs(d,{"data-loc":"client/src/components/AdminLayout.tsx:260",href:`/admin/applicants/${t.id}`,onClick:()=>u(""),className:"flex items-center justify-between gap-3 border-b border-[#f0eee9] px-4 py-3 text-left last:border-b-0 hover:bg-[#fbfaf7]",children:[e.jsxs("span",{"data-loc":"client/src/components/AdminLayout.tsx:261",className:"min-w-0",children:[e.jsx("span",{"data-loc":"client/src/components/AdminLayout.tsx:261",className:"mr-2 text-[10px] font-semibold tracking-[.08em] text-[#a37d1d]",children:"ì ì²ì"}),e.jsx("span",{"data-loc":"client/src/components/AdminLayout.tsx:261",className:"text-[13px] font-semibold text-[#3f3a32]",children:t.name}),e.jsxs("span",{"data-loc":"client/src/components/AdminLayout.tsx:261",className:"ml-2 text-[11px] text-[#817a6f]",children:["AP-",String(t.id).padStart(8,"0")]})]}),e.jsx("span",{"data-loc":"client/src/components/AdminLayout.tsx:262",className:"text-[11px] text-[#817a6f]",children:i?.stage??"new"})]},`a-${t.id}`)),C?.slice(0,4).map(({member:t,application:i})=>e.jsxs(d,{"data-loc":"client/src/components/AdminLayout.tsx:266",href:`/admin/members/${t.id}`,onClick:()=>u(""),className:"flex items-center justify-between gap-3 border-b border-[#f0eee9] px-4 py-3 text-left last:border-b-0 hover:bg-[#fbfaf7]",children:[e.jsxs("span",{"data-loc":"client/src/components/AdminLayout.tsx:267",className:"min-w-0",children:[e.jsx("span",{"data-loc":"client/src/components/AdminLayout.tsx:267",className:"mr-2 text-[10px] font-semibold tracking-[.08em] text-[#5d625f]",children:"íì"}),e.jsx("span",{"data-loc":"client/src/components/AdminLayout.tsx:267",className:"text-[13px] font-semibold text-[#3f3a32]",children:i.name})]}),e.jsx("span",{"data-loc":"client/src/components/AdminLayout.tsx:268",className:"text-[11px] text-[#817a6f]",children:t.memberStatus})]},`m-${t.id}`)),R.map(t=>e.jsxs(d,{"data-loc":"client/src/components/AdminLayout.tsx:272",href:`/admin/matching/${t.id}`,onClick:()=>u(""),className:"flex items-center justify-between gap-3 border-b border-[#f0eee9] px-4 py-3 text-left last:border-b-0 hover:bg-[#fbfaf7]",children:[e.jsxs("span",{"data-loc":"client/src/components/AdminLayout.tsx:273",className:"min-w-0",children:[e.jsx("span",{"data-loc":"client/src/components/AdminLayout.t
21sx:273",className:"mr-2 text-[10px] font-semibold tracking-[.08em] text-[#9a6b5a]",children:"매ì¹"}),e.jsxs("span",{"data-loc":"client/src/components/AdminLayout.tsx:273",className:"text-[13px] font-semibold text-[#3f3a32]",children:["ë§¤ì¹ #",t.id]})]}),e.jsx("span",{"data-loc":"client/src/components/AdminLayout.tsx:274",className:"text-[11px] text-[#817a6f]",children:t.status})]},`match-${t.id}`)),!k&&!_&&!S&&!v?.length&&!C?.length&&!R.length&&e.jsx("div",{"data-loc":"client/src/components/AdminLayout.tsx:277",className:"px-4 py-3 text-xs text-[#8a8377]",children:"ê²ì ê²°ê³¼ê° ììµëë¤."})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AdminLayout.tsx:281",className:"ml-auto hidden text-right sm:block",children:[e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:282",className:"text-[11px] text-[#817b70]",children:"IRUM PRIVATE MATCHING"}),e.jsx("p",{"data-loc":"client/src/components/AdminLayout.tsx:283",className:"text-xs font-semibold text-[#3a3731]",children:"ì´ì íí©"})]})]}),e.jsx("main",{"data-loc":"client/src/components/AdminLayout.tsx:286",className:"min-h-[calc(100vh-72px)]",children:x})]})]})}export{he as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.