1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6038],{35596:function(e,t,n){n.d(t,{Z:function(){return y}});var i=n(57437),s=n(2265),r=n(52345),l=n(59717),a=n(81906),c=n(33728),d=n(57586),o=n(13100),u=n(32489),x=n(46977),m=n(93448),b=n(21652),p=n(8345),f=n(82941);let h=0,g=[],v=0,z=!1;function k(){v++,window.history.back()}let j="";function y(e){let{isOpen:t,onClose:n,title:y,children:N,footer:w,className:C}=e,I=(0,s.useId)(),E=(0,r.J)(),R=(0,l.o)(),Z=(0,a.c)(0);(0,s.useEffect)(()=>{t&&Z.set(0)},[t,Z]);let S=(0,c.H)(Z,[0,240],[1,0]),T=(0,s.useRef)(n),L=(0,s.useRef)(!1);(0,s.useEffect)(()=>{T.current=n},[n]),(0,s.useEffect)(()=>{if(!t)return;h||(j=document.body.style.overflow),h++,z||(z=!0,window.addEventListener("popstate",e=>{var t;if((v>0||g.length>0)&&(0,p.l)(e),v>0){v--;return}null===(t=g.at(-1))||void 0===t||t.onPop()},{capture:!0}));let e={id:I,onPop:()=>{L.current&&(L.current=!1,T.current())}};g.push(e),document.body.style.overflow="hidden";let n=(0,b.UM)(),i=window.history.state||{};return n&&!L.current&&(window.history.pushState({...i,isBottomSheet:!0,sheetId:I},""),L.current=!0),()=>{var t;L.current&&(null===(t=window.history.state)||void 0===t?void 0:t.sheetId)===I&&(L.current=!1,k()),g.splice(g.indexOf(e),1),--h<=0&&(h=0,document.body.style.overflow=j)}},[t,I]);let F=(0,s.useCallback)(()=>{L.current&&(L.current=!1,k()),n()},[n]),A=(0,x.a)(t,F),B=(0,s.useCallback)((e,t)=>{"pointercancel"!==e.type&&"touchcancel"!==e.type&&(t.velocity.y>500||t.offset.y>100)&&F()},[F]),M=(0,s.useRef)(null),P=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if(!t)return;let e=M.current;if(!e)return;let n=[],i=function(t){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!e.contains(t)||P.current!==t)return;let i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),r=(0,f.Wk)({top:s.top-i.top,bottom:s.bottom-i.top},e.clientHeight,12,12);0!==r&&e.scrollTo({top:Math.max(0,e.scrollTop+r),behavior:n?"smooth":"auto"})},s=e=>{let t=e.target;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable)&&(P.current=t,i(t,!1),n.push(setTimeout(()=>i(t,!0),120)),n.push(setTimeout(()=>i(t,!0),300)),n.push(setTimeout(()=>i(t,!0),500)))},r=()=>{P.current=null},l=()=>{P.current&&i(P.current,!0)};e.addEventListener("focusin",s),e.addEventListener("focusout",r);let a=window.visualViewport;return null==a||a.addEventListener("resize",l),()=>{n.forEach(clearTimeout),e.removeEventListener("focusin",s),e.removeEventListener("focusout",r),null==a||a.removeEventListener("resize",l)}},[t]),(0,i.jsx)(d.M,{children:t&&(0,i.jsxs)("div",{className:"md:hidden fixed inset-x-0 z-[100] flex items-end",style:{top:"var(--vv-offset-top, 0px)",height:"var(--app-height)"},children:[(0,i.jsx)(o.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.22,ease:[.22,1,.36,1]},className:"absolute inset-0",children:(0,i.jsx)(o.E.div,{style:{opacity:S},onClick:F,className:"absolute inset-0 bg-black/50 backdrop-blur-sm"})}),(0,i.jsxs)(o.E.div,{style:{y:Z,maxHeight:"90%"},initial:E?{opacity:0}:{y:"100%"},animate:{y:0,opacity:1},exit:E?{opacity:0}:{y:"100%"},transition:E?{duration:.12}:{type:"spring",damping:30,stiffness:320,mass:.8},drag:"y",dragListener:!1,dragControls:R,dragConstraints:{top:0},dragSnapToOrigin:!0,dragMomentum:!1,dragElastic:{top:.12,bottom:.75},onDragEnd:B,ref:A,tabIndex:-1,"aria-label":y||"ìì¸ ì¤ì ",role:"dialog","aria-modal":"true",className:(0,m.cn)("relative w-full bg-white dark:bg-[#18181b] border-t border-transparent dark:border-white/[0.08] rounded-t-2xl","flex flex-col overflow-hidden mobile-sheet-pad shadow-2xl",C),children:[(0,i.jsxs)("div",{onPointerDown:e=>{e.target.closest("button")||R.start(e)},className:"shrink-0 cursor-grab active:cursor-grabbing touch-none select-none",children:[(0,i.jsx)("div",{className:"flex justify-center pt-3 pb-2",children:(0,i.jsx)("div",{className:"w-9 h-1 rounded-full bg-zinc-400/70 dark:bg-zinc-700"})}),(0,i.jsxs)("div",{className:"flex items-center justify-between px-4 pb-2 border-b border-zinc-200/40 dark:border-zinc-800/60",children:[(0,i.jsx)("h3",{className:"text-[var(--mobile-font-h2)] font-semibold text-zinc-900 dark:text-zinc-100",children:y}),(0,i.jsx)("button",{type:"button",onClick:F,"aria-label":"ë«ê¸°",className:"flex h-11 w-11 items-center justify-center rounded-lg text-zinc-600 dark:text-zinc-300",children:(0,i.jsx)(u.Z,{size:20})})]})]}),(0,i.jsx)("div",{ref:M,className:"flex-1 overflow-y-auto overflow-x-hidden px-4 pt-3 pb-2 mobile-scroll mobile-sheet-scroll",children:N}),w&&(0,i.jsx)("div",{className:"shrink-0 px-4 pt-2.5 pb-1 border-t border-zinc-100 dark:border-zinc-800/80 bg-white/95 dark:bg-[#18181b]/95 backdrop-blur-md",children:w})]})]})})}},96038:function(e,t,n){n.r(t),n.d(t,{default:function(){return R}});var i=n(57437),s=n(54292),r=n(92804),l=n(10136),a=n(2265),c=n(30401),d=n(66337),o=n(49589),u=n(18930),x=n(32489),m=n(95805),b=n(8522),p=n(22135),f=n(40875),h=n(82431),g=n(99397),v=n(49322),z=n(58346),k=n(93448),j=n(4908),y=n(83008),N=n(67920),w=n(27526),C=n(54696),I=n(35596);function E(e){let{zone:t,allStudents:n,onRemoveStudent:s,onToggleLock:r,onDelete:l,onRename:m,onTap:b,isAssignTarget:p}=e,[f,h]=(0,a.useState)(!1),[g,v]=(0,a.useState)(t.name),z=(0,a.useRef)(null),j=e=>n.find(t=>t.id===e),y=null!==t.capacity&&t.studentIds.length>=t.capacity,N=()=>{m(g.trim()||t.name),h(!1)};return(0,i.jsxs)("div",{className:(0,k.cn)("rounded-2xl border-2 bg-white dark:bg-zinc-900 flex flex-col overflow-hidden transition duration-150 shadow-sm",p?"border-blue-400 ring-2 ring-blue-300/40 scale-[1.02]":"border-zinc-200 dark:border-zinc-800"),children:[(0,i.jsxs)("div",{className:"flex items-center gap-1 px-3 pt-3 pb-2 border-b border-zinc-100 dark:border-zinc-800",onClick:e=>e.stopPropagation(),children:[f?(0,i.jsxs)("div",{className:"flex items-center gap-1.5 flex-1",children:[(0,i.jsx)("input",{ref:z,type:"text",value:g,onChange:e=>v(e.target.value),onKeyDown:e=>"Enter"===e.key&&N(),onBlur:N,autoFocus:!0,className:"flex-1 text-[16px] font-bold text-zinc-900 dark:text-zinc-100 bg-zinc-50 dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-lg px-2 py-1 focus:outline-none focus:ring-2 focus:ring-blue-500/30 min-w-0"}),(0,i.jsx)("button",{"aria-label":"íì¸",onClick:N,className:"p-2 text-emerald-600 dark:text-emerald-400 shrink-0",children:(0,i.jsx)(c.Z,{size:14})})]}):(0,i.jsx)("button",{onClick:()=>{v(t.name),h(!0)},className:"flex-1 text-left text-xs font-bold text-zinc-900 dark:text-zinc-100 truncate min-w-0 py-1.5",children:t.name}),(0,i.jsx)("button",{"aria-label":t.locked?"ì ê¸ í´ì ":"ì ê¸",onClick:r,className:(0,k.cn)("p-2.5 rounded-lg transition shrink-0",t.locked?"text-amber-500 bg-amber-50 dark:bg-amber-950/40":"text-zinc-400 dark:text-zinc-500 bg-zinc-50 dark:bg-zinc-800"),children:t.locked?(0,i.jsx)(d.Z,{size:14}):(0,i.jsx)(o.Z,{size:14})}),(0,i.jsx)("button",{"aria-label":"".concat(t.name," 구ì ìì "),onClick:l,className:"p-2.5 rounded-lg text-red-500 dark:text-red-400 bg-red-50 dark:bg-red-950/40 shrink-0 transition active:scale-95",children:(0,i.jsx)(u.Z,{size:14})})]}),(0,i.jsx)("div",{className:"flex-1 px-2.5 py-2 space-y-1 min-h-[60
1px]",children:0===t.studentIds.length?(0,i.jsx)("button",{onClick:b,className:"w-full h-full min-h-[48px] flex items-center justify-center text-zinc-400 dark:text-zinc-400 text-[11px] border border-dashed border-zinc-200 dark:border-zinc-800 rounded-xl transition active:bg-zinc-50 dark:active:bg-zinc-800",children:"ííì¬ ë°°ì "}):(0,i.jsxs)(i.Fragment,{children:[t.studentIds.map(e=>{let t=j(e);return t?(0,i.jsxs)("div",{className:"flex items-center justify-between py-1 px-2 bg-zinc-50 dark:bg-zinc-800/60 rounded-lg group",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,i.jsx)("span",{className:"w-4 h-4 rounded-full bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 text-[9px] font-bold flex items-center justify-center shrink-0",children:t.number}),(0,i.jsx)("span",{className:"text-xs font-medium text-zinc-800 dark:text-zinc-200 truncate",children:t.name})]}),(0,i.jsx)("button",{"aria-label":"ì ì¸",onClick:()=>s(e),className:"p-0.5 text-zinc-300 active:text-red-500 transition-colors shrink-0 ml-1",children:(0,i.jsx)(x.Z,{size:11})})]},e):null}),(0,i.jsx)("button",{onClick:b,className:"w-full py-1 text-[10px] text-zinc-500 text-center border border-dashed border-zinc-300 rounded-lg transition active:bg-zinc-50",children:"+ ì¶ê°"})]})}),(0,i.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-t border-zinc-100",children:[(0,i.jsxs)("span",{className:(0,k.cn)("text-[11px] font-semibold",y?"text-blue-500":"text-zinc-400"),children:[t.studentIds.length,"ëª
",null!==t.capacity&&" / ".concat(t.capacity,"ëª
")]}),y&&(0,i.jsx)("span",{className:"text-[10px] text-blue-500 font-bold",children:"ìë£"})]})]})}function R(){var e,t;let{students:c}=(0,j.AF)(),d=(0,N.XC)(),o=(0,l.N)(),{status:u}=(0,w.kP)(),x=(0,C.Dv)()||c.length>0&&"guest-user"===c[0].userId,R=x?c:c.filter(e=>"ë´ì íê¸"===e.homeClassId),Z=(0,a.useRef)(x);Z.current=x;let S=(0,a.useRef)(d);S.current=d;let[T,L]=(0,a.useState)([]),[F,A]=(0,a.useState)(!0),[B,M]=(0,a.useState)(!0),[P,D]=(0,a.useState)(null),[O,G]=(0,a.useState)(null),[U,X]=(0,a.useState)(!1),[_,H]=(0,a.useState)(null),[W,J]=(0,a.useState)(!1),[K,V]=(0,a.useState)([]),q=(0,a.useRef)(!1),Q=(0,a.useRef)(!1),Y=(0,a.useRef)(!1),$=(0,a.useRef)([]),ee=(0,a.useRef)(null),et=(0,a.useRef)(!1),en=(0,a.useRef)(!1),ei=(0,a.useRef)(!1),es=(0,a.useCallback)(async()=>{M(!0),D(null);try{if(Z.current){let e=await Promise.resolve().then(n.bind(n,96214)),t=await e.getGuestCleaningZones();q.current=!0,Q.current=!0,L(t)}else{let e=await (0,y.X)("getCleaningZones",{},S.current);if(e.success&&e.data&&Array.isArray(e.data)){let t=e.data.map((e,t)=>{var n,i,s;return{id:e.id,name:e.name,studentIds:e.studentIds||[],order:null!==(n=e.sortOrder)&&void 0!==n?n:t,locked:null!==(i=e.locked)&&void 0!==i&&i,columnId:void 0!==e.columnId?e.columnId:t%4,capacity:null!==(s=e.capacity)&&void 0!==s?s:null}});q.current=!0,Q.current=!0,L(t)}else e.success||D("ë°ì´í°ë¥¼ ë¶ë¬ì¤ëë° ì¤í¨íìµëë¤.")}}catch(e){D("ìì² ì¤ ì¤ë¥ê° ë°ìíìµëë¤.")}finally{M(!1)}},[]),er=(0,a.useCallback)(async e=>{if(Z.current){let t=await Promise.resolve().then(n.bind(n,96214));await t.saveGuestCleaningZones(e);return}let t={},i=e.map(e=>{var n,i,s;let r=null!==(n=e.columnId)&&void 0!==n?n:0;return void 0===t[r]&&(t[r]=0),{id:e.id,name:e.name,studentIds:e.studentIds,columnId:r,sortOrder:t[r]++,locked:null!==(i=e.locked)&&void 0!==i&&i,capacity:null!==(s=e.capacity)&&void 0!==s?s:null}});await (0,y.X)("saveAllCleaningZones",{zones:i},S.current)},[]),el=(0,a.useCallback)(async()=>{if(!q.current)return;if(et.current){en.current=!0;return}et.current=!0;let e=!0;try{do{en.current=!1;try{await er($.current)}catch(t){console.error("[MobileCleaning] flush save error:",t),e=!1;break}}while(en.current);e&&(ei.current=!1)}finally{et.current=!1}},[er]),ea=(0,a.useCallback)(()=>{ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>{ee.current=null,el()},600)},[el]);(0,a.useEffect)(()=>{Y.current||0===c.length&&"authenticated"!==u||(Y.current=!0,es())},[c.length,u,es]),(0,a.useEffect)(()=>
1{if(q.current){if(Q.current){Q.current=!1;return}$.current=T,ei.current=!0,ea()}},[T,ea]),(0,a.useEffect)(()=>{let e=()=>{ee.current&&(clearTimeout(ee.current),ee.current=null),q.current&&ei.current&&el()},t=()=>{"hidden"===document.visibilityState&&e()};return window.addEventListener("pagehide",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("pagehide",e),document.removeEventListener("visibilitychange",t),e()}},[el]);let ec=async e=>{var t,n,i;let s=T.find(t=>t.id===e),l=null!==(t=null==s?void 0:s.studentIds.length)&&void 0!==t?t:0;await o({title:"'".concat(null!==(n=null==s?void 0:s.name)&&void 0!==n?n:"ì´ êµ¬ì","'").concat((0,r.Ge)(null!==(i=null==s?void 0:s.name)&&void 0!==i?i:"ì´ êµ¬ì","ì","를")," ìì í ê¹ì?"),description:l>0?"ì´ êµ¬ìì ë°°ì ë íì ".concat(l,"ëª
ì ë°°ì ë í¨ê» ì¬ë¼ì§ëë¤."):"ìì í 구ìì ëë릴 ì ììµëë¤."})&&L(t=>t.filter(t=>t.id!==e))},ed=(e,t)=>L(n=>n.map(n=>n.id===e?{...n,name:t}:n)),eo=e=>L(t=>t.map(t=>t.id===e?{...t,locked:!t.locked}:t)),eu=(e,t)=>{L(n=>{let i=n.find(e=>e.id===t);return i&&(i.studentIds.includes(e)||null===i.capacity||!(i.studentIds.length>=i.capacity))?n.map(n=>({...n,studentIds:n.id===t?[...n.studentIds.filter(t=>t!==e),e]:n.studentIds.filter(t=>t!==e)})):n})},ex=(e,t)=>{L(n=>n.map(n=>n.id===e?{...n,studentIds:n.studentIds.filter(e=>e!==t)}:n))},em=e=>{let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},eb=new Set(T.flatMap(e=>e.studentIds)),ep=R.filter(e=>!eb.has(e.id)),ef=W&&K.length>0?K.map(e=>ep.find(t=>t.id===e)).filter(e=>void 0!==e):[...ep].sort((e,t)=>(e.number||0)-(t.number||0)),eh=e=>{G(e),H(null),X(!0)},eg=e=>{O?(eu(O,e),G(null)):(H(e),G(null),X(!0))},ev=()=>{X(!1),G(null),H(null)},ez=e=>{_?(eu(e,_),ev()):O&&(eu(O,e),ev())},ek=!!_,ej=!!O;return(0,i.jsxs)("div",{className:"flex flex-col h-full bg-[#FBFBF9] dark:bg-zinc-950",children:[(0,i.jsxs)("div",{className:"bg-[#FBFBF9] dark:bg-zinc-950 border-b border-zinc-200/50 dark:border-zinc-800/60 shrink-0",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(m.Z,{size:14,className:"text-zinc-500 dark:text-zinc-400"}),(0,i.jsx)("span",{className:"text-sm font-semibold text-zinc-700 dark:text-zinc-300",children:"미배ì íì"}),(0,i.jsxs)("span",{className:(0,k.cn)("text-xs font-bold px-1.5 py-0.5 rounded-full",0===ep.length?"bg-emerald-100 dark:bg-emerald-950/50 text-emerald-600 dark:text-emerald-400":"bg-zinc-200/70 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-400"),children:[ep.length,"ëª
"]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("button",{"aria-label":W?"ìë ììë¡":"ì기",onClick:()=>{W?(J(!1),V([])):(V(em(ep).map(e=>e.id)),J(!0))},className:(0,k.cn)("p-1.5 rounded-lg transition active:scale-90",W?"bg-blue-100 dark:bg-blue-950/50 text-blue-600 dark:text-blue-400":"bg-zinc-200/60 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-400"),children:(0,i.jsx)(b.Z,{size:13})}),(0,i.jsx)("button",{onClick:()=>A(e=>!e),"aria-label":F?"미배ì íì ëª©ë¡ ì 기":"미배ì íì ëª©ë¡ í¼ì¹ê¸°","aria-expanded":F,className:"p-1.5 rounded-lg bg-zinc-200/60 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-400 active:scale-90 transition",children:F?(0,i.jsx)(p.Z,{size:13}):(0,i.jsx)(f.Z,{size:13})})]})]}),F&&(0,i.jsx)("div",{className:"px-4 pb-3",children:0===ep.length?(0,i.jsx)("div",{className:"text-xs text-zinc-400 dark:text-zinc-500 text-center py-2 font-medium",children:"â 모ë íìì´ ë°°ì ëììµëë¤"}):(0,i.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1 -mx-1 px-1",children:ef.map(e=>(0,i.jsxs)("button",{onClick:()=>eh(e.id),className:(0,k.cn)("flex-shrink-0 flex flex-col items-center gap-0.5 px-2.5 py-2 rounded-xl","border border-zinc-200/70 dark:border-zinc-800 bg-white dark:bg-zinc-900 active:scale-95 transition shadow-sm","min-w-[52px]"),children:[(0,i.jsxs)("span",{className:"text-[9px] text-zinc-400 dark:text-zinc-500 leading-none",children:[e.number,"ë²"]}),(0,i.jsx)("span",{className:"text-xs font-bold text-zinc-800 dark:text-zinc-200 leading-tight",children:e.name})]},e.id))})})]}),(0,i.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 mobile-scroll-bottom",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsxs)("h2",{className:"text-sm font-bold text-zinc-700 dark:text-zinc-300 min-w-0 truncate",children:["ì²ì 구ì",T.length>0&&(0,i.jsxs)("span",{className:"ml-1.5 text-zinc-400 dark:text-zinc-500 font-normal text-xs",children:[T.length,"ê°"]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,i.jsx)("button",{onClick:()=>L(e=>e.map(e=>e.locked?e:{...e,studentIds:[]})),className:"p-2 rounded-xl bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 active:scale-95 transition shrink-0",title:"ì ê¸ëì§ ìì 구ì ì´ê¸°í",children:(0,i.jsx)(h.Z,{size:14})}),(0,i.jsxs)("button",{onClick:()=>
1{let e={id:crypto.randomUUID(),name:"ì²ì 구ì ".concat(T.length+1),studentIds:[],order:T.length,locked:!1,columnId:T.length%4,capacity:null};L(t=>[...t,e])},className:"flex items-center gap-1.5 px-4 py-1.5 rounded-full bg-blue-500 text-white text-sm font-semibold active:scale-95 transition hover:bg-blue-600 whitespace-nowrap shrink-0",children:[(0,i.jsx)(g.Z,{size:16,className:"shrink-0"}),"구ì ì¶ê°"]})]})]}),B?(0,i.jsx)(s.r,{variant:"zones",label:"ì²ì 구ìì ë¶ë¬ì¤ê³ ìì´ì"}):P?(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 text-center animate-in fade-in duration-300",children:[(0,i.jsx)(v.Z,{className:"w-12 h-12 text-red-400 mb-3 opacity-80"}),(0,i.jsx)("p",{className:"text-zinc-600 dark:text-zinc-400 text-[15px] font-medium mb-1",children:"구ì ì 보를 ë¶ë¬ì¤ì§ 못íìµëë¤"}),(0,i.jsx)("p",{className:"text-zinc-400 text-[13px] mb-6",children:P}),(0,i.jsxs)("button",{onClick:es,className:"flex items-center gap-2 px-5 py-2.5 bg-zinc-100 dark:bg-white/10 hover:bg-zinc-200 dark:hover:bg-white/20 text-zinc-700 dark:text-zinc-300 rounded-full font-medium text-[14px] transition-colors active:scale-95",children:[(0,i.jsx)(h.Z,{size:16,strokeWidth:2}),(0,i.jsx)("span",{children:"ë¤ì ìë"})]})]}):0===T.length?(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 text-zinc-300",children:[(0,i.jsx)(z.d,{name:"trash-bin",size:40,className:"mb-3 opacity-50"}),(0,i.jsx)("p",{className:"text-sm font-medium text-zinc-400",children:"ì²ì 구ìì´ ììµëë¤"}),(0,i.jsx)("p",{className:"text-xs text-zinc-300 mt-1",children:'ìì "구ì ì¶ê°" ë²í¼ì ëë¬ ììíì¸ì'})]}):(0,i.jsx)("div",{className:"grid grid-cols-2 gap-3",children:T.map(e=>(0,i.jsx)(E,{zone:e,allStudents:R,onRemoveStudent:t=>ex(e.id,t),onToggleLock:()=>eo(e.id),onDelete:()=>ec(e.id),onRename:t=>ed(e.id,t),onTap:()=>eg(e.id),isAssignTarget:!1},e.id))})]}),(0,i.jsxs)(I.Z,{isOpen:U,onClose:ev,title:ek?"ë°°ì í íì ì í":ej?"구ì ì í":"ë°°ì ",children:[ej&&O&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"mb-4 flex items-center gap-2 p-3 bg-zinc-50 rounded-xl border border-zinc-200",children:[(0,i.jsx)("span",{className:"text-[11px] text-zinc-400",children:"ì íí íì"}),(0,i.jsx)("span",{className:"text-sm font-bold text-zinc-900",children:null===(e=R.find(e=>e.id===O))||void 0===e?void 0:e.name})]}),(0,i.jsx)("div",{className:"space-y-2",children:T.map(e=>{let t=null!==e.capacity&&e.studentIds.length>=e.capacity,n=e.studentIds.includes(O);return(0,i.jsxs)("button",{onClick:()=>ez(e.id),disabled:t&&!n,className:(0,k.cn)("w-full flex items-center justify-between px-4 py-3.5 rounded-xl border transition active:scale-[0.98]",n?"border-blue-200 bg-blue-50 text-blue-700":t?"border-zinc-100 bg-zinc-50 opacity-40":"border-zinc-200 bg-white active:bg-zinc-50"),children:[(0,i.jsx)("span",{className:"text-sm font-semibold text-zinc-800 dark:text-zinc-200",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[n&&(0,i.jsx)("span",{className:"text-[10px] text-blue-500 font-bold",children:"ë°°ì ë¨"}),(0,i.jsxs)("span",{className:"text-xs text-zinc-400",children:[e.studentIds.length,null!==e.capacity&&"/".concat(e.capacity),"ëª
"]})]})]},e.id)})})]}),ek&&_&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"mb-4 flex items-center gap-2 p-3 bg-zinc-50 rounded-xl border border-zinc-200",children:[(0,i.jsx)("span",{className:"text-[11px] text-zinc-400",children:"ì íí 구ì"}),(0,i.jsx)("span",{className:"text-sm font-bold text-zinc-900",children:null===(t=T.find(e=>e.id===_))||void 0===t?void 0:t.name})]}),(0,i.jsx)("div",{className:"space-y-1.5",children:R.sort((e,t)=>(e.number||0)-(t.number||0)).map(e=>{var t;let n=T.find(t=>t.studentIds.includes(e.id)),s=null===(t=T.find(e=>e.id===_))||void 0===t?void 0:t.studentIds.includes(e.id);return(0,i.jsxs)("button",{onClick:()=>{s?(ex(_,e.id),ev()):ez(e.id)},className:(0,k.cn)("w-full flex items-center justify-between px-4 py-3 rounded-xl border transition active:scale-[0.98]",s?"border-blue-200 bg-blue-50":"border-zinc-200 bg-white active:bg-zinc-50"),children:[(0,i.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,i.jsx)("span",{className:"w-6 h-6 rounded-full bg-zinc-100 text-zinc-500 text-[11px] font-bold flex items-center justify-center shrink-0",children:e.number}),(0,i.jsx)("span",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:e.name})]}),(0,i.jsx)("div",{className:"flex items-center gap-1.5",children:s?(0,i.jsx)("span",{className:"text-[10px] text-blue-600 font-bold",children:"ì¬ê¸° ë°°ì ë¨ \xb7 ííì¬ ì ê±°"}):n?(0,i.jsx)("span",{className:"text-[10px] text-zinc-400",children:n.name}):(0,i.jsx)("span",{className:"text-[10px] text-zinc-300",children:"미배ì "})})]},e.id)})})]})]})]})}},92804:function(e,t,n){n.d(t,{Ge:function(){return i}});function i(e,t,n){return!function(e){let t=e.trim().slice(-1);if(!t)return!1;let n=t.charCodeAt(0);return n>=44032&&n<=55203?(n-44032)%28!=0:t>="0"&&t<="9"&&["0","1","3","6","7","8"].includes(t)}(e)?n:t}}}]);
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.