1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3450],{51013:function(e,t,n){n.d(t,{NU:function(){return u},ZP:function(){return d},nF:function(){return x}});var s=n(57437);n(2265);var a=n(76865),r=n(82431),i=n(64954),l=n(7888),c=n(92804),o=n(93448);function d(e){let{isLoading:t=!1,error:n=null,onRetry:d,isEmpty:x=!1,emptyTitle:m="ìì§ ì무ê²ë ììµëë¤",emptyDescription:h,emptyAction:p,skeleton:f,subject:b,size:g="md",className:v,children:w}=e;return n?(0,s.jsxs)("div",{role:"alert",className:(0,o.cn)("flex flex-col items-center justify-center text-center px-6 py-14 gap-3",v),children:[(0,s.jsx)(a.Z,{size:22,className:"text-red-600 dark:text-red-400","aria-hidden":"true"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-[14px] font-semibold text-zinc-900 dark:text-zinc-100 break-keep",children:b?"".concat(b).concat((0,c.Ge)(b,"ì","를")," ë¶ë¬ì¤ì§ 못íìµëë¤"):"ë´ì©ì ë¶ë¬ì¤ì§ 못íìµëë¤"}),(0,s.jsx)("p",{className:"mt-1 text-[13px] text-zinc-600 dark:text-zinc-300 break-keep max-w-[320px]",children:(0,l.q)(n,"ì ì í ë¤ì ìëí´ ì£¼ì¸ì. ê³ì ì ëë©´ ë¤í¸ìí¬ ìí를 íì¸í´ 주ì¸ì.")})]}),d&&(0,s.jsxs)("button",{type:"button",onClick:d,className:"inline-flex items-center gap-1.5 min-h-[44px] px-4 rounded-xl text-[13px] font-semibold bg-zinc-100 dark:bg-zinc-800 text-zinc-800 dark:text-zinc-100 hover:bg-zinc-200 dark:hover:bg-zinc-700 active:scale-[0.97] transition",children:[(0,s.jsx)(r.Z,{size:14,"aria-hidden":"true"}),"ë¤ì ìë"]})]}):t?(0,s.jsxs)("div",{className:v,"aria-busy":"true","aria-live":"polite",children:[null!=f?f:(0,s.jsx)(u,{}),(0,s.jsx)("span",{className:"sr-only",children:"ë¶ë¬ì¤ë ì¤"})]}):x?(0,s.jsx)(i.Z,{title:m,description:h,action:p,size:g,className:v}):(0,s.jsx)(s.Fragment,{children:w})}function u(e){let{rows:t=5,className:n}=e;return(0,s.jsx)("div",{className:(0,o.cn)("space-y-2 py-2",n),"aria-hidden":"true",children:Array.from({length:t}).map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2.5 px-2 py-1",children:[(0,s.jsx)("div",{className:"w-24 h-3 rounded bg-zinc-200/80 dark:bg-zinc-800 animate-pulse"}),(0,s.jsx)("div",{className:"flex-1 h-2 rounded-full bg-zinc-200/80 dark:bg-zinc-800 animate-pulse",style:{maxWidth:"".concat(70-8*t,"%")}})]},t))})}function x(e){let{cells:t=12,className:n,cellClassName:a}=e;return(0,s.jsx)("div",{className:(0,o.cn)("grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-4",n),"aria-hidden":"true",children:Array.from({length:t}).map((e,t)=>(0,s.jsx)("div",{className:(0,o.cn)("h-20 rounded-xl bg-zinc-200/70 dark:bg-zinc-800 animate-pulse",a),style:{animationDelay:"".concat(t%6*60,"ms")}},t))})}},35596:function(e,t,n){n.d(t,{Z:function(){return m}});var s=n(57437),a=n(2265),r=n(59717),i=n(81906),l=n(33728),c=n(57586),o=n(13100),d=n(93448),u=n(21652);let x=0;function m(e){let{isOpen:t,onClose:n,title:m,children:h,footer:p,className:f}=e,b=(0,r.o)(),g=(0,i.c)(0);(0,a.useEffect)(()=>{t&&g.set(0)},[t,g]);let v=(0,l.H)(g,[0,240],[1,0]),w=(0,a.useRef)(n),y=(0,a.useRef)(!1);(0,a.useEffect)(()=>{w.current=n},[n]),(0,a.useEffect)(()=>{if(!t)return;x++,document.body.style.overflow="hidden";let e=(0,u.UM)(),n=window.history.state||{};!e||y.current||n.isBottomSheet||(window.history.pushState({...n,isBottomSheet:!0},""),y.current=!0);let s=()=>{y.current&&(y.current=!1,w.current())};return window.addEventListener("popstate",s),()=>{window.removeEventListener("popstate",s),--x<=0&&(x=0,document.body.style.overflow="")}},[t]);let j=(0,a.useCallback)(()=>{y.current&&(y.current=!1,window.history.back()),n()},[n]),N=(0,a.useCallback)((e,t)=>{(t.velocity.y>500||t.offset.y>100)&&j()},[j]),k=(0,a.useRef)(null),z=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(!t)return;let e=k.current;if(!e)return;let n=[],s=function(t){let n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!e||!e.contains(t))return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect(),r=a.top-s.top,i=Math.min(24,Math.max(12,(e.clientHeight-a.height)/2)),l=e.scrollTop+r-i;e.scrollTo({top:Math.max(0,l),behavior:n?"smooth":"auto"})},a=e=>{let t=e.target;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable)&&(z.current=t,s(t,!1),n.push(setTimeout(()=>s(t,!0),120)),n.push(setTimeout(()=>s(t,!0),300)),n.push(setTimeout(()=>s(t,!0),500)))},r=()=>{z.current=null},i=()=>{z.current&&s(z.current,!0)};e.addEventListener("focusin",a),e.addEventListener("focusout",r);
1let l=window.visualViewport;return null==l||l.addEventListener("resize",i),()=>{n.forEach(clearTimeout),e.removeEventListener("focusin",a),e.removeEventListener("focusout",r),null==l||l.removeEventListener("resize",i)}},[t]),(0,s.jsx)(c.M,{children:t&&(0,s.jsxs)("div",{className:"md:hidden fixed inset-x-0 z-[100] flex items-end",role:"dialog","aria-modal":"true","aria-label":m,style:{top:"var(--vv-offset-top, 0px)",height:"var(--app-height)"},children:[(0,s.jsx)(o.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.22,ease:[.22,1,.36,1]},className:"absolute inset-0",children:(0,s.jsx)(o.E.div,{style:{opacity:v},onClick:j,className:"absolute inset-0 bg-black/50 backdrop-blur-sm"})}),(0,s.jsxs)(o.E.div,{style:{y:g,maxHeight:"90%"},initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30,stiffness:320,mass:.8},drag:"y",dragListener:!1,dragControls:b,dragConstraints:{top:0},dragElastic:{top:.12,bottom:.75},onDragEnd:N,role:"dialog","aria-modal":"true",className:(0,d.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",f),children:[(0,s.jsx)("div",{onPointerDown:e=>b.start(e),className:"flex justify-center pt-3 pb-2 shrink-0 cursor-grab active:cursor-grabbing touch-none select-none",children:(0,s.jsx)("div",{className:"w-9 h-1 rounded-full bg-zinc-300 dark:bg-zinc-700"})}),m&&(0,s.jsx)("div",{className:"px-4 pb-3 border-b border-zinc-200/40 dark:border-zinc-800/60 shrink-0",children:(0,s.jsx)("h3",{className:"text-[var(--mobile-font-h2)] font-semibold text-zinc-900 dark:text-zinc-100",children:m})}),(0,s.jsx)("div",{ref:k,className:"flex-1 overflow-y-auto overflow-x-hidden px-4 pt-3 pb-2 mobile-scroll mobile-sheet-scroll",children:h}),p&&(0,s.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:p})]})]})})}},91455:function(e,t,n){n.d(t,{s:function(){return i}});var s=n(57437),a=n(2265),r=n(93448);function i(e){let{options:t,value:n,onChange:i,className:l,itemClassName:c,activeItemClassName:o,inactiveItemClassName:d,indicatorClassName:u,variant:x="pill",underlineThickness:m=2,disabled:h=!1,equalWidth:p=!1,"aria-label":f}=e,b=(0,a.useRef)(null),g=(0,a.useRef)({}),[v,w]=(0,a.useState)(null),[y,j]=(0,a.useState)(!1),N=t.map(e=>e.key).join("\0"),k=(0,a.useCallback)(()=>{let e=b.current,t=g.current[n];if(!e||!t||0===t.offsetWidth){w(e=>null===e?e:null);return}let s={left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight};w(e=>e&&e.left===s.left&&e.top===s.top&&e.width===s.width&&e.height===s.height?e:s)},[n]);(0,a.useLayoutEffect)(()=>{k()},[k,N,x]),(0,a.useEffect)(()=>{if(!v||y)return;let e=requestAnimationFrame(()=>j(!0));return()=>cancelAnimationFrame(e)},[v,y]),(0,a.useEffect)(()=>{let e=b.current;if(!e||"undefined"==typeof ResizeObserver)return;let t=new ResizeObserver(()=>k());return t.observe(e),Object.values(g.current).forEach(e=>{e&&t.observe(e)}),()=>t.disconnect()},[k,N]),(0,a.useEffect)(()=>{let e=document.fonts;if(!(null==e?void 0:e.ready))return;let t=!1;return e.ready.then(()=>{t||k()}).catch(()=>{}),()=>{t=!0}},[k]);let z=!!v&&!h;return(0,s.jsxs)("div",{ref:b,role:"group","aria-label":f,className:(0,r.cn)("relative flex items-center",l),children:[(0,s.jsx)("div",{"aria-hidden":!0,className:(0,r.cn)("absolute left-0 top-0 pointer-events-none","pill"===x?"rounded-lg":"rounded-full",y&&"transition-[transform,width,opacity] duration-300 ease-out motion-reduce:transition-none",z?"opacity-100":"opacity-0",u),style:v?{transform:"translate3d(".concat(v.left,"px, ").concat("underline"===x?v.top+v.height-m:v.top,"px, 0)"),width:v.width,height:"underline"===x?m:v.height}:void 0}),t.map(e=>{let t=e.key===n;return(0,s.jsx)("button",{ref:t=>{g.current[e.key]=t},type:"button","aria-pressed":t,title:e.title,"aria-label":e.ariaLabel,disabled:h,onClick:()=>i(e.key),className:(0,r.cn)("relative z-10 flex items-center justify-center transition-colors duration-200 motion-reduce:transition-none",p&&"flex-1",c,t?o:d,e.className),children:e.label},e.key)})]})}},93450:function(e,t,n){n.r(t),n.d(t,{default:function(){return U}});var s=n(57437),a=n(51013),r=n(98319),i=n(2265),l=n(99376),c=n(21047),o=n(99397),d=n(49322),u=n(82431),x=n(52264),m=n(35224),h=n(40875),p=n(10407),f=n(30401),b=n(95468),g=n(18930),v=n(8522),w=n(41414),y=n(92735),j=n(34415),N=n(45884),k=n(66337),z=n(49589),C=n(93448),A=n(91455),S=n(98728),E=n(35596);let I=e=>{let{label:t,value:n,min:a,max:r,onChange:i}=e;return(0,s.jsxs)("div",{className:"flex items-center justify-between bg-zinc-50 px-4 py-3 rounded-xl border border-zinc-200/70",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-zinc-600 dark:text-zinc-400",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("button",{"aria-label":"".concat(t," ì¤ì´ê¸°"),onClick:()=>n>a&&i(n-1),disabled:n<=a,className:"w-8 h-8 rounded-lg bg-white border border-zinc-200 flex items-center justify-center text-zinc-600 dark:text-zinc-400 active:scale-90 transition disabled:opacity-30 shadow-sm",children:(0,s.jsx)(c.Z,{size:13})}),(0,s.jsx)("span",{className:"text-sm font-bold min-w-[24px] text-center text-zinc-900",children:n}),(0,s.jsx)("button",{"aria-label":"".concat(t," ë리기"),onClick:()=>n<r&&i(n+1),disabled:n>=r,className:"w-8 h-8 rounded-lg bg-white border border-zinc-200 flex items-center justify-center text-zinc-600 dark:text-zinc-400 active:scale-90 transition disabled:opacity-30 shadow-sm",children:(0,s.jsx)(o.Z,{size:13})})]})]})};function D(e){var t,n;let{students:a,seats:r,inactiveSeats:l,cols:c,rows:o,mode:d,groupCount:u,groupLayout:x,isRotated:m,isShuffling:h,constraints:p,onSwap:y,onToggleStatus:j,onShuffle:N,onRotate:D,onChangeMode:L,onChangeRows:M,onChangeCols:Z,onChangeGroupCount:R,onChangeGroupLayout:T,onAddBan:B,onRemoveBan:F,selectedClass:G,classList:O,onSelectClass:P,lockedSeats:X,onToggleLock:W,showStudentNumber:q=!1,onToggleShowStudentNumber:U,distributeEvenlyByClass:H=!1,onToggleDistributeEvenlyByClass:Y}=e,[_,K]=(0,i.useState)(null),[V,J]=(0,i.useState)(null),Q=(0,i.useRef)(null),$=(0,i.useRef)(null),ee=(0,i.useRef)(null),[et,en]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(!1),[er,ei]=(0,i.useState)("add"),[el,ec]=(0,i.useState)([]),[eo,ed]=(0,i.useState)(!1),eu=()=>{$.current&&(clearTimeout($.current),$.current=null)},ex=(e,t)=>{if(h)return;let n=t.touches[0].clientX,s=t.touches[0].clientY,a=!1;$.current=setTimeout(()=>{$.current=null,!(a||l.has(e))&&(ee.current={isDragging:!0,sourceIdx:e,currentOverIdx:null},K(e),"vibrate"in navigator&&navigator.vibrate(40))},380);let r=t=>{var r,i;let c=t.touches[0],o=c.clientX-n,d=c.clientY-s;if(!(null===(r=ee.current)||void 0===r?void 0:r.isDragging)){(Math.abs(o)>8||Math.abs(d)>8)&&(a=!0,eu());return}t.preventDefault();let u=document.elementFromPoint(c.clientX,c.clientY),x=null==u?void 0:u.closest("[data-seat-idx]"),m=x?parseInt(null!==(i=x.dataset.seatIdx)&&void 0!==i?i:"-1"):null,h=null===m||isNaN(m)||m===e||l.has(m)?null:m;if(ee.current.currentOverIdx=h,J(h),Q.current){let e=Q.current.getBoundingClientRect();c.clientY<e.top+60?Q.current.scrollTop-=8:c.clientY>e.bottom-60&&(Q.current.scrollTop+=8)}},i=()=>{var t;if(eu(),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",i),document.removeEventListener("touchcancel",i),null===(t=ee.current)||void 0===t?void 0:t.isDragging){let{sourceIdx:e,currentOverIdx:t}=ee.current;ee.current=null,K(null),J(null),null!==t&&t!==e&&y(e,t)}else ee.current=null,K(null),J(null),a||j(e)};document.addEventListener("touchmove",r,{passive:!1}),document.addEventListener("touchend",i),document.addEventListener("touchcancel",i)},em=e=>{ec(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].slice(-2))},eh=async()=>{2===el.length&&(ed(!0),await B(el[0],el[1]),ec([]),ei("list"),ed(!1))}
1,ep=e=>a.find(t=>t.id===e),ef=c<=3?"text-base":c<=5?"text-sm":c<=7?"text-xs":"text-[11px]",eb=null!==_,eg=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=l.has(e),a=r[e],i=_===e,c=V===e&&!n;return(0,s.jsxs)("button",{"data-seat-idx":e,onTouchStart:t=>ex(e,t),"aria-label":n?"".concat(e+1,"ë² ì리 (ì¬ì© ì í¨)"):a?"".concat(e+1,"ë² ì리, ").concat(a.name):"".concat(e+1,"ë² ì리 (ë¹ì리)"),className:(0,C.cn)("w-full aspect-square rounded-xl flex flex-col items-center justify-center relative","border transition duration-150 select-none overflow-hidden touch-none",h&&"opacity-0 scale-90",eb&&!i&&!c&&"opacity-50",n?"border-dashed border-zinc-200 dark:border-zinc-800 opacity-30":i?"border-2 border-blue-400 bg-blue-50 dark:bg-blue-950/40 scale-105 dark:shadow-none z-10 opacity-70":c?"border-2 border-emerald-400 bg-emerald-50 dark:bg-emerald-950/40 scale-[1.08] dark:shadow-none z-20":"border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 shadow-sm"),children:[!n&&!t&&(0,s.jsx)("span",{className:"absolute top-[2px] left-[3px] text-[8px] text-zinc-500 dark:text-zinc-400 font-mono leading-none pointer-events-none",children:e+1}),!n&&a&&(0,s.jsx)("button",{"aria-label":X.has(e)?"ì ê¸ í´ì ":"ì ê¸",onTouchStart:e=>{e.stopPropagation()},onClick:t=>{t.stopPropagation(),W(e,t)},className:(0,C.cn)("absolute p-0.5 rounded transition-all z-20",m?"bottom-1 left-1 rotate-180":"top-1 right-1",X.has(e)?"text-amber-400 opacity-100":"text-zinc-500/50 dark:text-zinc-400/50 active:text-amber-400"),children:X.has(e)?(0,s.jsx)(k.Z,{size:t?10:12}):(0,s.jsx)(z.Z,{size:t?10:12})}),n?(0,s.jsx)(b.Z,{size:t?12:14,className:"text-zinc-400 dark:text-zinc-500",strokeWidth:1.5}):a?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center w-full pointer-events-none px-0.5",children:[q&&(0,s.jsxs)("span",{className:(0,C.cn)("font-medium text-zinc-400 dark:text-zinc-500 leading-none mb-0.5 select-none text-center truncate max-w-full",t?"text-[8px]":"text-[9px]"),children:[a.classNum?"".concat(a.classNum,"ë° "):"",a.number,"ë²"]}),(0,s.jsx)("span",{className:(0,C.cn)("font-bold text-center leading-tight break-keep text-zinc-900 dark:text-zinc-100 w-full truncate",t?"text-[11px]":ef),children:a.name})]}):(0,s.jsx)("span",{className:(0,C.cn)("text-zinc-400 dark:text-zinc-500 leading-none pointer-events-none",t?"text-[8px]":"text-[9px]"),children:"ë¹ì리"}),c&&(0,s.jsx)("span",{className:"absolute inset-0 rounded-[10px] border-2 border-emerald-400 pointer-events-none animate-pulse"})]},e)},ev=(e,t)=>{if(0===e)return[];let n="2x3"===t?2:3;if(e<=n)return Array(e).fill(1);let s=Math.min(2,Math.ceil(e/n)),a=[],r=e;for(;r>0;)a.push(Math.min(s,r)),r-=s;return a},ew=()=>0===a.length?4:Math.ceil(a.length/Math.max(1,u));return(0,s.jsxs)("div",{className:"flex flex-col h-full bg-[#FBFBF9] dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden px-3 pt-[88px]",children:[!m&&(0,s.jsx)("div",{className:"w-full bg-zinc-800 dark:bg-zinc-700 text-white py-1.5 rounded-xl text-center text-xs font-bold mb-2 tracking-widest shadow-sm shrink-0",children:"ì¹ í"}),(0,s.jsx)("div",{ref:Q,className:"flex-1 overflow-y-auto pb-2",children:"grid"===d?(0,s.jsx)("div",{className:"grid gap-1.5",style:{gridTemplateColumns:"repeat(".concat(c,", 1fr)")},children:(m?Array.from({length:o*c},(e,t)=>o*c-1-t):Array.from({length:o*c},(e,t)=>t)).map(e=>eg(e))}):(()=>{let e=ev(u,x),t=m?[...e].reverse():e,n=ew(),a="2x3"===x?2:3,r=m?u-1:0,i=m?-1:1;return(0,s.jsx)("div",{className:"space-y-2.5",children:t.map((e,t)=>{let l=[];for(let t=0;t<e;t++)l.push(r),r+=i;return(0,s.jsx)("div",{className:"grid gap-2.5",style:{gridTemplateColumns:"repeat(".concat(e,", 1fr)")},children:l.map(e=>{let t=Array.from({length:n},(t,s)=>m?e*n+n-1-s:e*n+s);return(0,s.jsxs)("div",{className:"rounded-2xl border border-zinc-200 bg-white px-2 py-2 shadow-sm",children:[(0,s.jsxs)("p",{className:"text-[9px] font-bold tracking-widest text-zinc-300 text-center mb-1.5 pointer-events-none",children:["G",e+1]}
1),(0,s.jsx)("div",{className:"grid gap-1",style:{gridTemplateColumns:"repeat(".concat(a,", 1fr)")},children:t.map(e=>eg(e,!0))})]},e)})},t)})})})()}),m&&(0,s.jsx)("div",{className:"w-full bg-zinc-800 dark:bg-zinc-700 text-white py-1.5 rounded-xl text-center text-xs font-bold mt-2 tracking-widest shadow-sm shrink-0",children:"ì¹ í"})]}),(0,s.jsx)("div",{className:"shrink-0 px-4 py-1 text-center",children:(0,s.jsx)("p",{className:(0,C.cn)("text-[10px] transition duration-200",eb?"text-emerald-600 font-semibold":"text-zinc-400"),children:eb?"êµíí ì리ì ìì ëì¼ì¸ì":"í â ë¹íì±/íì± \xb7 ê¸¸ê² ëë¥´ê³ ëëê·¸ â ì리 êµí"})}),(0,s.jsx)("div",{className:"shrink-0 border-t border-zinc-200/60 dark:border-zinc-800 bg-white dark:bg-zinc-900 mobile-bottom-action-bar",children:(0,s.jsxs)("div",{className:"grid grid-cols-4 divide-x divide-zinc-100 dark:divide-zinc-800",children:[(0,s.jsxs)("button",{onClick:()=>N(),disabled:h||0===a.length,className:"flex flex-col items-center justify-center gap-1 py-3 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors disabled:opacity-40",children:[(0,s.jsx)(v.Z,{size:20,className:(0,C.cn)(h?"text-blue-400 animate-spin":"text-blue-500")}),(0,s.jsx)("span",{className:"text-[10px] font-medium text-blue-500",children:"ì기"})]}),(0,s.jsxs)("button",{onClick:()=>D(),className:(0,C.cn)("flex flex-col items-center justify-center gap-1 py-3 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",m&&"bg-emerald-50/70 dark:bg-emerald-950/30"),children:[(0,s.jsx)(w.Z,{size:20,className:(0,C.cn)("transition-transform duration-500",m?"text-emerald-500 rotate-180":"text-zinc-500 dark:text-zinc-400")}),(0,s.jsx)("span",{className:(0,C.cn)("text-[10px] font-medium",m?"text-emerald-500":"text-zinc-500 dark:text-zinc-400"),children:"íì "})]}),(0,s.jsxs)("button",{onClick:()=>{ei("add"),en(!0)},className:"flex flex-col items-center justify-center gap-1 py-3 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(b.Z,{size:20,className:"text-zinc-500 dark:text-zinc-400"}),p.length>0&&(0,s.jsx)("span",{className:"absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-red-500 text-white text-[8px] flex items-center justify-center font-bold leading-none",children:p.length})]}),(0,s.jsx)("span",{className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400",children:"ì§ê¿ê¸ì§"})]}),(0,s.jsxs)("button",{onClick:()=>ea(!0),className:"flex flex-col items-center justify-center gap-1 py-3 active:bg-zinc-50 dark:active:bg-zinc-800 transition-colors",children:[(0,s.jsx)(S.Z,{size:20,className:"text-zinc-500 dark:text-zinc-400"}),(0,s.jsx)("span",{className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400",children:"ì¤ì "})]})]})}),(0,s.jsxs)(E.Z,{isOpen:et,onClose:()=>{en(!1),ec([])},title:"ì§ê¿ ê¸ì§",children:[(0,s.jsx)(A.s,{value:er,onChange:ei,"aria-label":"ì§ê¿ ê¸ì§ 보기",equalWidth:!0,className:"bg-zinc-100 rounded-xl p-1 mb-4",itemClassName:"py-2 rounded-lg text-sm font-semibold",activeItem
1ClassName:"text-zinc-900",inactiveItemClassName:"text-zinc-500",indicatorClassName:"bg-white rounded-lg shadow-sm",options:[{key:"add",label:"ìë¡ ì¶ê°"},{key:"list",label:(0,s.jsxs)(s.Fragment,{children:["목ë¡",p.length>0&&(0,s.jsxs)("span",{className:"ml-1 text-xs text-zinc-400",children:["(",p.length,")"]})]})}]}),"add"===er&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center gap-2 mb-4 px-1",children:[0,1].map(e=>{var t;return(0,s.jsx)("div",{className:(0,C.cn)("flex-1 h-10 rounded-xl border border-dashed flex items-center justify-center text-sm font-medium transition-colors",el[e]?"border-zinc-300 text-zinc-800 dark:text-zinc-200":"border-zinc-200 text-zinc-300"),children:el[e]?null===(t=ep(el[e]))||void 0===t?void 0:t.name:0===e?"첫 ë²ì§¸":"ë ë²ì§¸"},e)})}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2 mb-4",children:a.slice().sort((e,t)=>{var n,s;return(null!==(n=e.number)&&void 0!==n?n:0)-(null!==(s=t.number)&&void 0!==s?s:0)}).map(e=>{let t=el.includes(e.id);return(0,s.jsxs)("button",{onClick:()=>em(e.id),"aria-pressed":t,className:(0,C.cn)("py-2.5 px-2 rounded-xl border text-center transition-colors active:scale-95",t?"border-red-400 bg-white text-zinc-800 dark:text-zinc-200":"border-zinc-200 bg-white text-zinc-800 dark:text-zinc-200"),children:[(0,s.jsxs)("span",{className:"text-[9px] text-zinc-400 block leading-none mb-0.5",children:[e.number,"ë²"]}),(0,s.jsx)("span",{className:"text-xs font-semibold leading-tight",children:e.name}),t&&(0,s.jsx)(f.Z,{size:10,className:"text-red-500 mx-auto mt-0.5"})]},e.id)})}),(0,s.jsx)("button",{onClick:eh,disabled:2!==el.length||eo,className:(0,C.cn)("seating-ban-register-btn w-full py-3.5 rounded-xl font-semibold text-sm transition-colors active:scale-[0.98]",2===el.length?"bg-black !text-white":"bg-zinc-100 text-zinc-400"),children:eo?"ë±ë¡íë ì¤â¦":2===el.length?"".concat(null===(t=ep(el[0]))||void 0===t?void 0:t.name," \xb7 ").concat(null===(n=ep(el[1]))||void 0===n?void 0:n.name," ì§ê¿ ê¸ì§í기"):"íì 2ëª
ì ì ííì¸ì"})]}),"list"===er&&(0===p.length?(0,s.jsxs)("div",{className:"text-center py-10",children:[(0,s.jsx)("p",{className:"text-sm text-zinc-500",children:"ìì§ ê¸ì§í ì§ê¿ì´ ììµëë¤"}),(0,s.jsx)("button",{onClick:()=>ei("add"),className:"mt-3 text-xs text-blue-500 font-medium",children:"ìë¡ ì¶ê°í기"})]}):(0,s.jsx)("div",{className:"space-y-2",children:p.map(e=>{var t,n;let a=ep(e.studentAId),r=ep(e.studentBId);return a||r?(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 bg-zinc-50 rounded-xl border border-zinc-200/70",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-zinc-800 dark:text-zinc-200",children:[(0,s.jsx)("span",{children:null!==(t=null==a?void 0:a.name)&&void 0!==t?t:"?"}),(0,s.jsx)(b.Z,{size:11,className:"text-red-400",strokeWidth:2}),(0,s.jsx)("span",{children:null!==(n=null==r?void 0:r.name)&&void 0!==n?n:"?"})]}),(0,s.jsx)("button",{"aria-label":"ìì ",onClick:()=>F(e.id),className:"p-1.5 rounded-lg text-zinc-400 active:text-red-500 active:bg-red-50 transition",children:(0,s.jsx)(g.Z,{size:14})})]},e.id):null})}))]}),(0,s.jsx)(E.Z,{isOpen:es,onClose:()=>ea(!1),title:"ì리 ì¤ì ",children:(0,s.jsxs)("div",{className:"space-y-5 py-1",children:[O.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-bold text-zinc-400 uppercase tracking-wider mb-2.5",children:"íê¸"}),(0,s.jsx)("div",{className:"flex flex-col gap-2",children:O.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>P(e),className:(0,C.cn)("w-full text-left px-4 py-3 rounded-xl text-sm font-semibold border transition active:scale-[0.99]",G===e?"bg-white text-zinc-900 border-zinc-900":"bg-white text-zinc-600 border-zinc-200"),children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-bold text-zinc-400 uppercase tracking-wider mb-2.5",children:"ë°°ì´ ë°©ì"}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2",children:["grid","group"].map(e=>(0,s.jsx)("button",{onClick:()=>L(e),className:(0,C.cn)("py-3 rounded-xl text-sm font-semibold border transition active:scale-95",d===e?"bg-white text-zinc-900 border-zinc-900":"bg-white text-zinc-600 dark:text-zinc-400 border-zinc-200"),children:"grid"===e?"기본 (ì¤)":"모ë "},e))})]}),"grid"===d&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-bold text-zinc-400 uppercase tracking-wider mb-2.5",children:"ì±
ì 구조"}),(0,s.jsx)(I,{label:"í ì (ê°ë¡)",value:o,min:1,max:12,onChange:M}),(0,s.jsx)(I,{label:"ì´ ì (ì¸ë¡)",value:c,min:1,max:12,onChange:Z})]}),"group"===d&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("p",{className:"text-xs font-bold text-zinc-400 uppercase tracking-wider mb-1",children:"모ë 구조"}),(0,s.jsx)(I,{label:"모ë ì",value:u,min:2,max:12,onChange:R}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-medium text-zinc-500 mb-2",children:"ì¢ì ë°°ì´"}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2",children:["2x3","3x2"].map(e=>(0,s.jsx)("button",{onClick:()=>T(e),className:(0,C.cn)("py-2.5 rounded-xl text-sm font-semibold border transition active:scale-95",x===e?"text-amber-500 dark:text-amber-400 bg-amber-500/10 border-amber-500 dark:border-amber-400 shadow-sm":"text-zinc-600 dark:text-zinc-400 hover:text-amber-500 dark:hover:text-amber-400 bg-white dark:bg-zinc-800 border-zinc-200 dark:border-zinc-700"),children:"2x3"===e?"2ì´ ë°°ì´":"3ì´ ë°°ì´"},e))})]})]}),(U||Y)&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-bold text-zinc-400 uppercase tracking-wider mb-2.5",children:"ìì¸ ì¤ì "}),(0,s.jsxs)("div",{className:"space-y-2",children:[U&&(0,s.jsxs)("label",{className:"flex items-center gap-2.5 text-sm text-zinc-700 dark:text-zinc-300 cursor-pointer select-none py-0.5",children:[(0,s.jsx)("input",{type:"checkbox",checked:q,onCh
1ange:e=>U(e.target.checked),className:"cursor-pointer"}),(0,s.jsx)("span",{className:"font-medium text-sm",children:"ë° ë²í¸ íì"})]}),Y&&(0,s.jsxs)("label",{className:(0,C.cn)("flex items-center gap-2.5 text-sm select-none py-0.5","ë´ì íê¸"===G?"text-zinc-400 dark:text-zinc-600 cursor-not-allowed":"text-zinc-700 dark:text-zinc-300 cursor-pointer"),title:"ë´ì íê¸"===G?"ë´ì íê¸ì ë°ì´ íëë¿ì´ë¼ ì¬ì©í ì ììµëë¤":"êµê³¼ íê¸ìì ì¬ë¬ ë° íìë¤ì´ í¹ì ì¤ì´ë 모ë ì ëª°ë¦¬ì§ ìëë¡ ê³ ë¥´ê² ë¶ì° ë°°ì¹í©ëë¤",children:[(0,s.jsx)("input",{type:"checkbox",checked:"ë´ì íê¸"!==G&&H,disabled:"ë´ì íê¸"===G,onChange:e=>Y(e.target.checked),className:"cursor-pointer disabled:cursor-not-allowed"}),(0,s.jsx)("span",{className:"font-medium text-sm",children:"ë° ê³ ë¥´ê² ë¶ë°°"})]})]})]}),(0,s.jsxs)("div",{className:"bg-zinc-50 dark:bg-zinc-800/60 rounded-xl p-3.5 border border-zinc-200/60 dark:border-white/10",children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-zinc-700 dark:text-zinc-200 mb-1.5",children:"ì¡°ì ë°©ë²"}),(0,s.jsxs)("ul",{className:"space-y-1",children:[(0,s.jsxs)("li",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[(0,s.jsx)("strong",{className:"text-zinc-800 dark:text-zinc-200",children:"í"})," â ì¢ì ë¹íì±/íì± ì í"]}),(0,s.jsxs)("li",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[(0,s.jsx)("strong",{className:"text-zinc-800 dark:text-zinc-200",children:"ê¸¸ê² ë른 ë¤ ëëê·¸"})," â ë ì¢ì êµí"]})]})]})]})})]})}var L=n(58652);let M=(e,t)=>{if(0===e)return[];let n="2x3"===t?2:3;if(e<=n)return Array(e).fill(1);let s=Math.ceil(e/n),a=[],r=e;for(let e=0;e<n;e++){let e=Math.min(s,r);a.push(e),r-=e}if(a.length>=2&&a[a.length-1]<=s/2&&a[a.length-1]>0){let e=a.pop();for(let t=0;t<e;t++)a[t%a.length]++}return a.filter(e=>e>0)},Z=(e,t,n,s,a)=>{let r=e=>'<div style="height: '.concat(e,"px; line-height: ").concat(e,'px; font-size: 1px; overflow: hidden;"> </div>');return a?function(e,t,n,s){let{groupCount:a,seatsPerGroup:r,groupLayout:i}=n,l=M(a,i),c="2x3"===i?2:3,o=Math.ceil(r/c),d=a<=6?55:45,u=a<=6?"12pt":"10pt",x=a<=6?"9pt":"8pt",m=a<=6?"11pt":"9pt",h=Math.max(...l),p=Math.floor(680/h)-20,f=(t,n)=>{let s='<td style="vertical-align: top; padding: 8px;">';s+='<table border="1" cellspacing="0" cellpadding="0" style="width: '.concat(p,"px; border-collapse: collapse; text-align: center; font-family: 'Malgun Gothic', sans-serif;\">")+'<tr><td colspan="'.concat(c,'" style="height: 28px; background-color: #f0f0f0; font-weight: bold; font-size: ').concat(m,';">GROUP ').concat(t+1,"</td></tr>");for(let a=0;a<o;a++){s+="<tr>";for(let i=0;i<c;i++){let l=a*c+i,o=t*r+l,m=l<r&&e[o]||null,h=" ";if(m){if("nameOnly"===n)h='<span style="font-size: '.concat(u,'; font-weight: bold;">').concat(m.name,"</span>");else{let e=m.number?"".concat(m.number,". "):"";h='<span style="font-size: '.concat(x,';">').concat(e,'</span><span style="font-size: ').concat(u,'; font-weight: bold;">').concat(m.name,"</span>")}}s+='<td style="width: '.concat(Math.floor(p/c),"px; height: ").concat(d,'px; vertical-align: middle; text-align: center;">').concat(h,"</td>")}s+="</tr>"}return s+"</table></td>"},b=e=>{let t="",n=0;for(let s of(t+='<table cellspacing="0" cellpadding="0" style="width: 100%; border-collapse: collapse;">',l)){t+="<tr>";for(let a=0;a<s;a++)t+=f(n++,e);for(let e=s;e<h;e++)t+="<td></td>";t+="</tr>"+'<tr><td colspan="'.concat(h,'" style="height: 16px;"></td></tr>')}return t+"</table>"};return R(t,'\n <div style="display: block; width: 100%;">\n '.concat(s(20),"\n ").concat(b("nameOnly"),'\n </div>\n\n <div style="page-break-before: always;"></div>\n\n <div style="display: block; width: 100%;">\n ').concat(s(20),"\n ").concat(b("nameNum"),"\n </div>\n "))}(e,s,a,r):function(e,t,n,s,a){let r=[],i=[];for(let s=0;s<t;s++){let t=[];for(let a=0;a<n;a++)t.push(e[s*n+a]);r.push(t)}let l=[...e].reverse();for(let e=0;e<t;e++){let t=[];for(let s=0;s<n;s++)t.push(l[e*n+s]);i.push(t)}let c=e=>"<div style=\"font-size: 13pt; font-weight: bold; margin-bottom: 8px; font-family: 'Malgun Gothic', sans-serif;\">".concat(e,"</div>"),o="<p style=\"margin: 0; font-size: 14pt; line-height: 1.6; font-family: 'Malgun Gothic', sans-serif;\"> </p>",d=(e,s)=>{let a='\n <div style="margin-bottom: 20px;">\n <table border="1" cellspacing="0" cellpadding="0" style="width: 100%; border-collapse: collapse; text-align: center; font-family: \'Malgun Gothic\', sans-serif;">\n ';
1return e.forEach(e=>{a+="<tr>",e.forEach(e=>{let r=" ";if(e){let n=t>8?"11pt":"14pt";if("nameOnly"===s)r='<div style="text-align: center; width: 100%;"><span style="font-size: '.concat(n,'; font-weight: bold;">').concat(e.name,"</span></div>");else{let s=e.number?"".concat(e.number,". "):"";r='<div style="text-align: center; width: 100%;"><span style="font-size: '.concat(t>8?"9pt":"11pt",';">').concat(s,'</span><span style="font-size: ').concat(n,'; font-weight: bold;">').concat(e.name,"</span></div>")}}a+='<td style="width: '.concat(100/n,"%; height: ").concat(60,'px; vertical-align: middle; text-align: center;">').concat(r,"</td>")}),a+="</tr>"}),a+="\n </table>\n </div>\n "};return R(s,'\n <div style="display: block; width: 100%;">\n '.concat(a(20),"\n ").concat(c("1. ì ìë ìì (ì´ë¦ë§)"),"\n ").concat(d(i,"nameOnly"),"\n ").concat(o,'\n </div>\n\n <div style="page-break-before: always;"></div>\n\n <div style="display: block; width: 100%;">\n ').concat(a(20),"\n ").concat(c("2. íì ìì (ì´ë¦ë§)"),"\n ").concat(d(r,"nameOnly"),"\n ").concat(o,'\n </div>\n\n <div style="page-break-before: always;"></div>\n\n <div style="display: block; width: 100%;">\n ').concat(a(20),"\n ").concat(c("3. ì ìë ìì (ë²í¸&ì´ë¦)"),"\n ").concat(d(i,"nameNum"),"\n ").concat(o,'\n </div>\n\n <div style="page-break-before: always;"></div>\n\n <div style="display: block; width: 100%;">\n ').concat(a(20),"\n ").concat(c("4. íì ìì (ë²í¸&ì´ë¦)"),"\n ").concat(d(r,"nameNum"),"\n ").concat(o,"\n </div>\n "))}(e,t,n,s,r)};function R(e,t){return'\n<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>'.concat(e," ì리 ë°°ì¹í</title>\n<style>\n @page { margin: 15mm; size: A4 portrait; }\n body { margin: 0; padding: 0; font-family: 'Malgun Gothic', sans-serif; }\n</style>\n</head>\n<body>\n ").concat(t,"\n ").concat((0,L.mv)(),"\n</body>\n</html>\n ")}var T=n(67920),B=n(4908),F=n(54696),G=n(64954),O=n(96214),P=n(83008);let X=e=>"guest-absent-".concat(e),W=(e,t)=>{let n=e.find(e=>(null==e?void 0:e.type)==="absent"&&e.id===X(t));return Array.isArray(null==n?void 0:n.studentIds)?n.studentIds:[]},q=e=>{let{label:t,value:n,min:a,max:r,onChange:i}=e;return(0,s.jsxs)("div",{className:"flex items-center justify-between bg-black/20 p-2 rounded-lg border border-white/5",children:[(0,s.jsx)("span",{className:"text-sm text-[#B4B4B4] pl-1 seating-stepper-label",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{"aria-label":"".concat(t," ì¤ì´ê¸°"),onClick:()=>n>a&&i(n-1),className:"w-6 h-6 rounded bg-[#3A3A3A] hover:bg-[#444] flex items-center justify-center text-white transition-colors disabled:opacity-30",disabled:n<=a,children:(0,s.jsx)(c.Z,{size:12})}),(0,s.jsx)("span",{className:"text-sm font-bold min-w-[20px] text-center seating-stepper-value",children:n}),(0,s.jsx)("button",{"aria-label":"".concat(t," ë리기"),onClick:()=>n<r&&i(n+1),className:"w-6 h-6 rounded bg-[#3A3A3A] hover:bg-[#444] flex items-center justify-center text-white transition-colors disabled:opacity-30",disabled:n>=r,children:(0,s.jsx)(o.Z,{size:12})})]})]})};function U(){var e,t,n,c;let o=(0,T.XC)(),{showToast:S}=(0,r.p)(),E=(0,l.useRouter)(),I=(0,F.Dv)(),{students:L,classes:M,isLoading:R}=(0,B.AF)(),U=(0,i.useRef)(o);U.current=o;let[H,Y]=(0,i.useState)(!1),[_,K]=(0,i.useState)(0),V=(0,l.useSearchParams)(),[J,Q]=(0,i.useState)(()=>new URLSearchParams(window.location.search).get("class")||"ë´ì íê¸");(0,i.useEffect)(()=>{let e=V.get("class");e&&e!==J?Q(e):e||"ë´ì íê¸"===J||Q("ë´ì íê¸")},[V,J]);let $=e=>{Q(e);let t=new URLSearchParams(V.toString());"ë´ì íê¸"===e?t.delete("class"):t.set("class",e),E.push("?".concat(t.toString()).concat(window.location.hash),{scroll:!1})},[ee,et]=(0,i.useState)("grid"),[en,es]=(0,i.useState)(5),[ea,er]=(0,i.useState)(6),[ei,el]=(0,i.useState)(6),[ec,eo]=(0,i.useState)("2x3"),[ed,eu]=(0,i.useState)([]),[ex,em]=(0,i.useState)(new Set),eh=(0,i.useRef)(ex);(0,i.useEffect)(()=>{eh.current=ex},[ex]);let[ep,ef]=(0,i.useState)(new Set),eb=(0,i.useRef)(ep);(0,i.useEffect)(()=>{eb.current=ep},[ep]);let[eg,ev]=(0,i.useState)([]),ew=(0,i.useRef)(eg);(0,i.useEffect)(()=>{ew.current=eg},[eg]);let[ey,ej]=(0,i.useState)(null),[eN,ek]=(0,i.useState)(""),[ez,eC]=(0,i.useState)([]),[eA,eS]=(0,i.useState)(!1),eE=(0,i.useRef)(!1),[eI,eD]=(0,i.useState)(!1),[eL,eM]=(0,i.useState)(!1),[eZ,eR]=(0,i.useState)(!1),eT=(0,i.useRef)(!1);(0,i.useEffect)(()=>{let e=eT.current;if(eT.current=eL,e&&!eL){eR(!0);let e=setTimeout(()=>eR(!1),360);return()=>clearTimeout(e)}},[eL]);let[eB,eF]=(0,i.useState)(!1),[eG,eO]=(0,i.useState)(!1),[eP,eX]=(0,i.useState)(!1),[eW,eq]=(0,i.useState)(!1),eU=(0,i.useRef)(null);(0,i.useEffect)(()=>{let e=()=>
1{eq(!!(document.fullscreenElement||document.webkitFullscreenElement))};return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e)}},[]);let[eH,eY]=(0,i.useState)(1),e_=(0,i.useRef)(null),eK=(0,i.useRef)(null);(0,i.useEffect)(()=>{let e=()=>{let e=e_.current,t=eK.current;if(!eW||"group"!==ee||!e||!t){eY(1);return}let n=e.offsetWidth,s=e.offsetHeight;n&&s&&eY(Math.max(1,Math.min(Math.min(t.clientWidth/n,t.clientHeight/s),2.5)))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[eW,ee,ei,ec,ed.length]);let eV=async()=>{if(eW)try{let e=document;e.exitFullscreen?await e.exitFullscreen():e.webkitExitFullscreen?await e.webkitExitFullscreen():eq(!1)}catch(e){eq(!1)}else try{let e=eU.current;if(!e)return;e.requestFullscreen?await e.requestFullscreen():e.webkitRequestFullscreen?await e.webkitRequestFullscreen():eq(!0)}catch(e){eq(!0)}},[eJ,eQ]=(0,i.useState)(null),[e$,e0]=(0,i.useState)(null),[e1,e2]=(0,i.useState)(null),e5=null!==eJ,[e4,e3]=(0,i.useState)("select"),[e8,e6]=(0,i.useState)([]),[e9,e7]=(0,i.useState)(!0);(0,i.useEffect)(()=>{let e=localStorage.getItem("seating-ban-visible");null!==e&&e7("true"===e)},[]);let[te,tt]=(0,i.useState)(new Set),[tn,ts]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=localStorage.getItem("seating-exclude-visible");null!==e&&ts("true"===e)},[]);let[ta,tr]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=localStorage.getItem("seating-show-student-number");null!==e&&tr("true"===e)},[]);let ti=e=>{tr(e),localStorage.setItem("seating-show-student-number",String(e))},[tl,tc]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=localStorage.getItem("seating-distribute-evenly");null!==e&&tc("true"===e)},[]);let to=e=>{tc(e),localStorage.setItem("seating-distribute-evenly",String(e))},td=e=>{let t=[];return e.classNum&&t.push("".concat(e.classNum,"ë°")),e.number&&t.push("".concat(e.number,"ë²")),t.length>0?t.join(" "):""},tu=L.filter(e=>"ë´ì íê¸"===J?"ë´ì íê¸"===e.homeClassId:e.homeClassId===J||Array.isArray(e.customClassIds)&&e.customClassIds.includes(J)),tx=e=>L.filter(t=>"ë´ì íê¸"===e?"ë´ì íê¸"===t.homeClassId:t.homeClassId===e||Array.isArray(t.customClassIds)&&t.customClassIds.includes(e)).length,tm=()=>0===tu.length?4:Math.ceil(tu.length/Math.max(1,ei)),th=(e,t)=>{if(0===e)return[];let n="2x3"===t?2:3;if(e<=n)return Array(e).fill(1);let s=Math.ceil(e/n),a=[],r=e;for(let e=0;e<n;e++){let e=Math.min(s,r);a.push(e),r-=e}if(a.length>=2&&a[a.length-1]<=s/2&&a[a.length-1]>0){let e=a.pop();for(let t=0;t<e;t++)a[t%a.length]++}return a.filter(e=>e>0)},tp=(0,i.useCallback)(async()=>{if(I){let e=(await (0,O.getGuestData)()).seatConstraints||[];eC(e.filter(e=>"absent"!==e.type).map(e=>({id:e.id,studentAId:e.studentAId,studentBId:e.studentBId,type:e.type}))),tt(new Set(W(e,J)));return}let e=await (0,P.X)("getSeatConstraints",{classId:J},o);if(e.success&&e.data){var t;let n=e.data;eC(n.filter(e=>"absent"!==e.type).map(e=>({id:e.id,studentAId:e.studentIds[0]||"",studentBId:e.studentIds[1]||"",type:e.type}))),tt(new Set((null===(t=n.find(e=>"absent"===e.type))||void 0===t?void 0:t.studentIds)||[]))}},[J,I,o]);(0,i.useEffect)(()=>{let e=!1;return(async()=>{var t,n;Y(!1);let s=[],a=[];if(I){let t=await (0,O.getGuestData)();if(e)return;let n=t.seatConstraints||[];s=n.filter(e=>"absent"!==e.type).map(e=>({id:e.id,studentAId:e.studentAId,studentBId:e.studentBId,type:e.type})),a=W(n,J)}else{let n=await (0,P.X)("getSeatConstraints",{classId:J},U.current);if(e)return;if(n.success&&n.data){let e=n.data;s=e.filter(e=>"absent"!==e.type).map(e=>({id:e.id,studentAId:e.studentIds[0]||"",studentBId:e.studentIds[1]||"",type:e.type})),a=(null===(t=e.find(e=>"absent"===e.type))||void 0===t?void 0:t.studentIds)||[]}}if(e||(eC(s),tt(new Set(a))),I){let t=await (0,O.getGuestData)();if(e)return;let s=(null===(n=t.seatLayouts)||void 0===n?void 0:n[J])||null;s?(eu(s.grid||[]),s.rows&&es(s.rows),s.cols&&er(s.cols),"group"===ee&&s.rows&&el(s.rows),em(new Set(s.inactiveSeats||[])),ef(new Set(s.lockedSeats||[])),ev(s.groupNames||[])):("grid"===ee?(es(5),er(6)):el(6),eu([]),em(new Set),ef(new Set),ev([]))}else{let t=await (0,P.X)("getSeatLayout",{classId:J,mode:ee},U.current);if(e)return;if(t.success&&t.data){let e=t.data;eu(e.grid||[]),e.rows&&es(e.rows),e.cols&&er(e.cols),"group"===ee&&e.rows&&el(e.rows),em(new Set(e.inactiveSeats||[])),ef(new Set(e.lockedSeats||[])),ev(e.groupNames||[])}else t.success?("grid"===ee?(es(5),er(6)):el(6),eu([]),em(new Set),ef(new Set),ev([])):Y(!0)}})(),()=>{e=!0}},[J,ee,I,_]);let tf=(0,i.useRef)(ee);(0,i.useEffect)(()=>{let e=tf.current!==ee;tf.current=ee;let t=tm(),n="grid"===ee?en*ea:ei*t;eu(t=>
1{if(t.length===n)return t;let s=Array(n).fill(null);for(let e=0;e<Math.min(t.length,n);e++)s[e]=t[e];return t.length>0&&!e&&tb(eh.current,s),s})},[en,ea,ei,ee]);let tb=async(e,t,n,s)=>{let a=null!=n?n:eb.current,r=null!=s?s:ew.current;if(I){let n=(await (0,O.getGuestData)()).seatLayouts||{};n[J]={rows:"grid"===ee?en:ei,cols:"grid"===ee?ea:0,grid:t,inactiveSeats:Array.from(e),lockedSeats:Array.from(a),groupNames:r},(0,O.saveGuestData)("seatLayouts",n);return}let i={classId:J,mode:ee,rows:"grid"===ee?en:ei,cols:"grid"===ee?ea:0,grid:t,inactiveSeats:Array.from(e),lockedSeats:Array.from(a),groupNames:r};await (0,P.X)("saveSeatLayout",i,o)},tg=async e=>{let t=new Set(ex);t.has(e)?t.delete(e):t.add(e),em(t),await tb(t,ed)},tv=e=>{(!ed[e]||ex.has(e))&&tg(e)},tw=async()=>{if(!eE.current){eE.current=!0,eS(!0),eD(!0),window.setTimeout(()=>eD(!1),450),eM(!0),window.setTimeout(()=>eM(!1),1500);try{if(I){await new Promise(e=>setTimeout(e,800));let e=tm(),t="grid"===ee?en*ea:ei*e,n="ë´ì íê¸"!==J&&tl,s=new Set,a=Array(t).fill(null);Array.from(ep).forEach(e=>{if(e<0||e>=t||ex.has(e))return;let n=ed[e];!n||te.has(n.id)||(a[e]=n,s.add(n.id))});let r=[];for(let e=0;e<t;e++)ex.has(e)||ep.has(e)||r.push(e);let i=tu.filter(e=>!s.has(e.id)&&!te.has(e.id));if(r.length<i.length){S("ìë¦¬ê° ë¶ì¡±í©ëë¤. (ë°°ì¹í íì: ".concat(i.length,"ëª
, ë¹ ì리: ").concat(r.length,"ê°)"),"error");return}let l=ez.filter(e=>e.studentAId&&e.studentBId&&"absent"!==e.type),c=t=>{for(let n of l){let s=t.findIndex(e=>(null==e?void 0:e.id)===n.studentAId),a=t.findIndex(e=>(null==e?void 0:e.id)===n.studentBId);if(!(s<0)&&!(a<0)){if("grid"===ee){let e=Math.floor(s/ea),t=s%ea,n=Math.floor(a/ea),r=a%ea;if(e===n&&1===Math.abs(t-r))return!0}else if(Math.floor(s/e)===Math.floor(a/e))return!0}}return!1},o=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]]}if(!n)return t;let s=new Map;for(let e of t){let t=e.classNum?"".concat(e.classNum,"ë°"):e.homeClassId||"default";s.has(t)||s.set(t,[]),s.get(t).push(e)}let a=Array.from(s.keys());for(let e=a.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[a[e],a[t]]=[a[t],a[e]]}let r=[],i=!0,l=0;for(;i;){for(let e of(i=!1,a)){let t=s.get(e);l<t.length&&(r.push(t[l]),i=!0)}l++}return r},d=null,u=l.length>0?200:1;for(let e=0;e<u;e++){let e=o(i),t=[...a];if(e.forEach((e,n)=>{t[r[n]]=e}),!c(t)){d=t;break}}if(!d){S("ì§ê¿ ê¸ì§ë¥¼ ì§í¤ë©´ì ë°°ì¹íì§ ëª»íìµëë¤. ê¸ì§ë¥¼ ì¤ì´ê±°ë ë¤ì ìëí´ ì£¼ì¸ì.","error");return}eu(d),await tb(ex,d);return}let e="grid"===ee?{classId:J,rows:en,cols:ea,inactiveSeats:Array.from(ex),lockedSeats:Array.from(ep),respectConstraints:!0,distributeEvenlyByClass:"ë´ì íê¸"!==J&&tl,mode:"grid"}:{classId:J,rows:ei,cols:tm(),inactiveSeats:Array.from(ex),lockedSeats:Array.from(ep),respectConstraints:!0,distributeEvenlyByClass:"ë´ì íê¸"!==J&&tl,mode:"group"},t=await (0,P.X)("shuffleSeats",e,o);t.success?eu(t.data.seats):S(t.error||"ìì²ì ì²ë¦¬íì§ ëª»íìµëë¤.","error")}finally{eE.current=!1,eS(!1)}}},ty=async(e,t)=>{if(t.stopPropagation(),ex.has(e)||!ed[e])return;let n=new Set(ep);n.has(e)?n.delete(e):n.add(e),ef(n),await tb(ex,ed,n)},tj=async e=>{let t=new Set(te);t.has(e)?t.delete(e):t.add(e),tt(t);let n=Array.from(t);if(I){let e=await (0,O.getGuestData)(),t=X(J),s=(e.seatConstraints||[]).filter(e=>e.id!==t);n.length>0&&s.push({id:t,type:"absent",classId:J,studentIds:n}),(0,O.saveGuestData)("seatConstraints",s);return}await (0,P.X)("setAbsentStudents",{classId:J,studentIds:n},o)},tN=e=>{e6(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].slice(-2))},tk=async()=>{if(2!==e8.length)return;let[e,t]=e8;if(I){let n=(await (0,O.getGuestData)()).seatConstraints||[];if(!n.some(n=>n.studentAId===e&&n.studentBId===t||n.studentAId===t&&n.studentBId===e)){let s={id:"guest-constraint-".concat(Date.now()),studentAId:e,studentBId:t,type:"ban"};(0,O.saveGuestData)("seatConstraints",[...n,s]),await tp(),e6([]),e3("list")}return}let n=await (0,P.X)("addForbiddenPair",{classId:J,studentAId:e,studentBId:t},o);n.success?(await tp(),e6([]),e3("list")):S(n.error||"ìì²ì ì²ë¦¬íì§ ëª»íìµëë¤.","error")},tz=(0,i.useCallback)(async(e,t)=>{if(I){let n=(await (0,O.getGuestData)()).seatConstraints||[];if(!n.some(n=>n.studentAId===e&&n.studentBId===t||n.studentAId===t&&n.studentBId===e)){let s={id:"guest-constraint-".concat(Date.now()),studentAId:e,studentBId:t,type:"ban"};(0,O.saveGuestData)("seatConstraints",[...n,s]),await tp()}return}(await (0,P.X)("addForbiddenPair",{classId:J,studentAId:e,studentBId:t},o)).success&&await tp()},[I,o,tp,J]),tC=async e=>{if(I){let t=((await (0,O.getGuestData)()).seatConstraints||[]).filter(t=>t.id!==e);(0,O.saveGuestData)("seatConstraints",t),await tp();return}let t=await (0,P.X)("removeConstraint",{constraintId:e},o);t.success?await tp():S(t.error||"ìì²ì ì²ë¦¬íì§ ëª»íìµëë¤.","error")},tA=async(e,t)=>{if(e===t||ex.has(e)||ex.has(t))return;let n=[...ed];[n[e],n[t]]=[n[t],n[e]],eu(n),await tb(ex,n)},tS=(e,t)=>{if(ex.has(t)||!ed[t]||eA){e.preventDefault();return}eQ(t),e2(null),e.dataTransfer.effectAllowed="move";let n=e.currentTarget,s=n.cloneNode(!0);s.id="drag-ghost-clone",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px";let a=n.getBoundingClientRect();s.style.width="".concat(a.width,"px"),s.style.height="".concat(a.height,"px"),s.classList.remove("hover:ring-2","hover:scale-[1.02]","cursor-grab"),s.classList.add("shadow-2xl","ring-2","ring-blue-500","opacity-90"),eP&&s.querySelectorAll(".rotate-180").forEach(e
1=>e.classList.remove("rotate-180")),document.body.appendChild(s),e.dataTransfer.setDragImage(s,a.width/2,a.height/2),setTimeout(()=>{s.parentNode&&s.parentNode.removeChild(s)},0)},tE=(e,t)=>{e.preventDefault(),null===eJ||eJ===t||ex.has(t)||(e.dataTransfer.dropEffect="move",e0(t))},tI=()=>{e0(null)},tD=async(e,t)=>{e.preventDefault(),null===eJ||eJ===t||ex.has(t)||await tA(eJ,t),e0(null),setTimeout(()=>eQ(null),50)},tL=()=>{e0(null),setTimeout(()=>eQ(null),50)};return R&&0===L.length?(0,s.jsxs)("div",{className:"flex-1 overflow-hidden","aria-busy":"true","aria-live":"polite",children:[(0,s.jsx)(a.nF,{cells:12}),(0,s.jsx)("span",{className:"sr-only",children:"ë¶ë¬ì¤ë ì¤"})]}):(0,s.jsxs)("div",{className:"flex h-full overflow-hidden bg-[#0D0D0D] print:overflow-visible print:h-auto print:bg-white relative",children:[H&&(0,s.jsxs)("div",{className:"seating-load-error absolute inset-0 z-[60] flex flex-col items-center justify-center bg-[#0D0D0D]/95 backdrop-blur-sm p-8 text-center print:hidden",children:[(0,s.jsx)(d.Z,{className:"w-12 h-12 text-red-400 mb-3 opacity-80"}),(0,s.jsx)("p",{className:"seating-load-error-title text-white text-[15px] font-medium mb-1",children:"ì리 ë°°ì¹ë¥¼ ë¶ë¬ì¤ì§ 못íìµëë¤"}),(0,s.jsx)("p",{className:"seating-load-error-desc text-[#888] text-[13px] mb-6 max-w-xs",children:"ë¤í¸ìí¬ ìí를 íì¸í ë¤ ë¤ì ìëí´ ì£¼ì¸ì. 문ì ê° ê³ìëë©´ íì´ì§ë¥¼ ìë¡ê³ ì¹¨í´ ì£¼ì¸ì."}),(0,s.jsxs)("button",{onClick:()=>{Y(!1),K(e=>e+1)},className:"seating-load-error-retry flex items-center gap-2 px-5 py-2.5 bg-white/10 hover:bg-white/20 text-white rounded-full font-medium text-[14px] transition-colors active:scale-95",children:[(0,s.jsx)(u.Z,{size:16,strokeWidth:2}),(0,s.jsx)("span",{children:"ë¤ì ìë"})]})]}),(0,s.jsx)("div",{className:"absolute inset-0 z-50 md:hidden w-full h-full bg-[#FBFBF9] dark:bg-zinc-950",children:(0,s.jsx)(D,{students:tu,seats:ed,inactiveSeats:ex,cols:ea,rows:en,mode:ee,groupCount:ei,groupLayout:ec,isRotated:eP,isShuffling:eA,onSwap:tA,onToggleStatus:tg,onShuffle:tw,onRotate:()=>eX(e=>!e),onChangeMode:et,onChangeRows:es,onChangeCols:er,onChangeGroupCount:el,onChangeGroupLayout:eo,constraints:ez,onAddBan:tz,onRemoveBan:tC,selectedClass:J,classList:M,onSelectClass:$,lockedSeats:ep,onToggleLock:ty,showStudentNumber:ta,onToggleShowStudentNumber:ti,distributeEvenlyByClass:tl,onToggleDistributeEvenlyByClass:to})}),(0,s.jsxs)("div",{className:(0,C.cn)("flex flex-col border-r transition-all duration-500 relative z-20 print:hidden overflow-hidden ease-[cubic-bezier(0.4,0,0.2,1)] seating-sidebar nav-rail-shadow sub-sidebar-enter",eB?"w-[4.5rem] bg-[#0D0D0D] border-none":"w-64 h-full bg-[#121212] border-white/5"),children:[(0,s.jsx)("button",{onClick:()=>eF(!eB),onMouseDown:e=>e.preventDefault(),className:(0,C.cn)("absolute top-3 flex items-center justify-center w-10 h-10 rounded-lg text-[#71717a] hover:text-white hover:bg-white/5 transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)] z-50",eB?"right-4 active:scale-95":"right-1.5"),title:eB?"ë©ë´ í¼ì¹ê¸°":"ë©ë´ ì 기",children:eB?(0,s.jsx)(x.Z,{size:18}):(0,s.jsx)(m.Z,{size:18})}),!eB&&(0,s.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden px-3 pb-5 pt-7 gap-6 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsx)("h3",{className:"text-sm font-bold text-[#888] mb-3 seating-section-label",children:"íê¸ ì í"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("select",{value:J,onChange:e=>$(e.target.value),className:"w-full bg-[#1A1A1A] border border-white/10 rounded-xl px-3 py-2.5 text-sm text-white appearance-none focus:outline-none focus:ring-0 focus:border-white/10 transition cursor-pointer hover:bg-[#222] seating-class-select",children:M.map(e=>(0,s.jsxs)("option",{value:e,children:[e," (",tx(e),"ëª
)"]},e))}),(0,s.jsx)(h.Z,{className:"absolute right-4 top-1/2 -translate-y-1/2 text-white/30 pointer-events-none",size:16})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold text-[#888] mb-3 seating-section-label",children:"ë°°ì´ ë°©ì"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 mb-4",children:[(0,s.jsx)("button",{onClick:()=>et("grid"),className:(0,C.cn)("py-1.5 rounded-lg text-sm font-bold transition duration-200 border seating-layout-toggle","grid"===ee?"border-white/20 bg-white/10 text-white":"bg-[#1A1A1A] border-white/5 text-[#666] hover:bg-[#222] hover:text-white"),children:"기본"}),(0,s.jsx)("button",{onClick:()=>et("group"),className:(0,C.cn)("py-1.5 rounded-lg text-sm font-bold transition duration-200 border seating-layout-toggle","group"===ee?"border-white/20 bg-white/10 text-white":"bg-[#1A1A1A] border-white/5 text-[#666] hover:bg-[#222] hover:text-white"),children:"모ë "})]}),"grid"===ee?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(q,{label:"í",value:en,min:1,max:12,onChange:es}),(0,s.jsx)(q,{label:"ì´",value:ea,min:1,max:12,onChange:er})]}):(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(q,{label:"모ë ì",value:ei,min:2,max:12,onChange:el}),(0,s.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,s.jsx)("button",{onClick:()=>eo("2x3"),className:(0,C.cn)("flex-1 py-1.5 text-sm font-medium rounded-lg border transition-colors seating-group-layout-btn","2x3"===ec?"border-white/20 bg-white/10 text-white":"border-white/5 bg-[#1A1A1A] text-[#666]"),children:"2xN"}),(0,s.jsx)("button",{onClick:()=>eo("3x2"),className:(0,C.cn)("flex-1 py-1.5 text-sm font-medium rounded-lg border transition-colors seating-group-layout-btn","3x2"===ec?"border-white/20 bg-white/10 text-white":"border-white/5 bg-[#1A1A1A] text-[#666]"),children:"3xN"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold text-[#888] mb-3 seating-section-label",children:"ìì¸ ì¤ì "}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2.5 text-sm text-[#CCC] hover:text-white cursor-pointer select-none py-0.5 group",children:[(0,s.jsx)("input",{type:"checkbox",checked:ta,onChange:e=>ti(e.target.checked),className:"cursor-pointer"}),(0,s.jsx)("span",{className:"font-medium text-sm text-[#AAA] group-hover:text-white transition-colors",children:"ë° ë²í¸ íì"})]}),(0,s.jsxs)("label",{className:(0,C.cn)("flex items-center gap-2.5 text-sm select-none py-0.5 group","ë´ì íê¸"===J?"text-[#666] cursor-not-allowed":"text-[#CCC] hover:text-white cursor-pointer"),title:"ë´ì íê¸"===J?"ë´ì íê¸ì ë°ì´ íëë¿ì´ë¼ ì¬ì©í ì ììµëë¤":"êµê³¼ íê¸ìì ì¬ë¬ ë° íìë¤ì´ í¹ì ì¤ì´ë 모ë ì ëª°ë¦¬ì§ ìëë¡ ê³ ë¥´ê² ë¶ì° ë°°ì¹í©ëë¤",children:[(0,s.jsx)("input",{type:"checkbox",checked:"ë´ì íê¸"!==J&&tl,disabled:"ë´ì íê¸"===J,onChange:e=>to(e.target.checked),className:"cursor-pointer disabled:cursor-not-allowed"}),(0,s.jsx)("span",{className:(0,C.cn)("font-medium text-sm transition-colors","ë´ì íê¸"===J?"text-[#666]":"text-[#AAA] group-hover:text-white"),children:"ë° ê³ ë¥´ê² ë¶ë°°"})]})]})]}),(0,s.jsxs)("div",{className:"flex-1 flex flex-col min-h-0 gap-3",children:[(0,s.jsxs)("div",{className:(0,C.cn)("flex flex-col min-h-0 transition duration-300",e9?"flex-1":"shrink-0"),children:[(0,s.jsxs)("div",{className:(0,C.cn)("flex items-center justify-between h-8",e9&&"mb-3"),children:[(0,s.jsx)("h3",{className:"text-sm font-bold text-[#888] seating-section-label",children:(0,s.jsxs)("button",{onClick:()=>{let e=!e9;e7(e),localStorage.setItem("seating-ban-visible",String(e))},className:"flex items-center gap-1.5 hover:text-white transition-colors",title:e9?"ì 기":"í¼ì¹ê¸°","aria-expanded":e9,children:[e9?(0,s.jsx)(h.Z,{size:14}):(0,s.jsx)(p.Z,{size:14}),"ì§ê¿ ê¸ì§"]})}),e9&&(0,s.jsx)(A.s,{value:e4,onChange:e3,"aria-label":"ì§ê¿ ê¸ì§ 보기",className:"seating-ban-tabs bg-[#1A1A1A] rounded-lg p-0.5 border border-white/5",itemClassName:"px-2 py-0.5 text-xs rounded font-medium",activeItem
1ClassName:"text-white",inactiveItemClassName:"text-[#666] hover:text-[#888]",indicatorClassName:"bg-[#333] rounded",options:[{key:"select",label:"ì í"},{key:"list",label:"목ë¡"}]})]}),e9&&(0,s.jsx)("div",{className:"flex-1 overflow-y-auto custom-scrollbar -mr-2 pr-2 animate-in fade-in duration-200",children:"select"===e4?(0,s.jsx)("div",{className:"space-y-1.5 pb-4",children:tu.map(e=>{let t=e8.includes(e.id);return(0,s.jsxs)("button",{onClick:()=>tN(e.id),"aria-pressed":t,className:(0,C.cn)("seating-ban-row w-full flex items-center justify-between px-3 py-2 rounded-lg border transition-colors group",t?"bg-red-600/10 border-red-600/50":"bg-[#1A1A1A] border-white/5 hover:bg-[#222] hover:border-white/10"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate text-[#CCC] group-hover:text-white transition-colors seating-ban-student-name",children:e.name}),(0,s.jsx)("div",{className:"text-xs font-medium whitespace-nowrap text-[#555] group-hover:text-[#777] transition-colors",children:"ë´ì íê¸"!==J?(0,s.jsxs)(s.Fragment,{children:[e.grade?"".concat(e.grade,"íë
"):"",e.classNum?"".concat(e.classNum,"ë° "):"",e.number,"ë²"]}):"".concat(e.number,"ë²")})]}),t&&(0,s.jsx)(f.Z,{size:14,className:"text-red-600 shrink-0"})]},e.id)})}):(0,s.jsx)("div",{className:"space-y-2 pb-4",children:0===ez.length?(0,s.jsx)(G.Z,{size:"sm",title:"ê¸ì§í ì§ê¿ì´ ììµëë¤",description:"âì íâìì ë íìì ê³ ë¥´ë©´ ì§ê¿ ê¸ì§ ì¡°ê±´ì ë±ë¡í ì ììµëë¤."}):ez.map(e=>{let t=tu.find(t=>t.id===e.studentAId),n=tu.find(t=>t.id===e.studentBId);return t||n?(0,s.jsxs)("div",{className:"flex items-center justify-between p-2.5 bg-[#1A1A1A] border border-white/5 rounded-lg group",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"text-[#CCC]",children:(null==t?void 0:t.name)||"?"}),(0,s.jsx)(b.Z,{size:10,className:"text-red-600 opacity-50"}),(0,s.jsx)("span",{className:"text-[#CCC]",children:(null==n?void 0:n.name)||"?"})]}),(0,s.jsx)("button",{"aria-label":"ìì ",onClick:()=>tC(e.id),className:"text-[#555] hover:text-red-600 transition-colors",children:(0,s.jsx)(g.Z,{size:12})})]},e.id):null})})}),e9&&"select"===e4&&2===e8.length&&(0,s.jsx)("div",{className:"pt-3 animate-in fade-in duration-200",children:(0,s.jsx)("button",{onClick:tk,className:"seating-ban-register-btn w-full py-2.5 bg-black hover:bg-[#1a1a1a] border border-white/15 text-white rounded-lg font-medium text-sm transition-colors truncate px-3",children:"".concat(null!==(n=null===(e=tu.find(e=>e.id===e8[0]))||void 0===e?void 0:e.name)&&void 0!==n?n:""," \xb7 ").concat(null!==(c=null===(t=tu.find(e=>e.id===e8[1]))||void 0===t?void 0:t.name)&&void 0!==c?c:""," ì§ê¿ ê¸ì§í기")})})]}),(0,s.jsxs)("div",{className:(0,C.cn)("flex flex-col min-h-0 transition duration-300",tn?"flex-1":"shrink-0"),children:[(0,s.jsx)("div",{className:(0,C.cn)("flex items-center justify-between h-8",tn&&"mb-1"),children:(0,s.jsx)("h3",{className:"text-sm font-bold text-[#888] seating-section-label",children:(0,s.jsxs)("button",{onClick:()=>{let e=!tn;ts(e),localStorage.setItem("seating-exclude-visible",String(e))},className:"flex items-center gap-1.5 hover:text-white transition-colors",title:tn?"ì 기":"í¼ì¹ê¸°","aria-expanded":tn,children:[tn?(0,s.jsx)(h.Z,{size:14}):(0,s.jsx)(p.Z,{size:14}),"ê²°ìì ì ì¸"]})})}),tn&&(0,s.jsxs)("div",{className:"flex-1 flex flex-col min-h-0 animate-in fade-in duration-200",children:[(0,s.jsx)("p",{className:"text-xs text-[#555] mb-2 leading-relaxed shrink-0",children:"ì리를 ìì ë ì ì¸ë©ëë¤."}),(0,s.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto custom-scrollbar -mr-2 pr-2 space-y-1.5 pb-4",children:0===tu.length?(0,s.jsx)("div",{className:"py-8 text-center",children:(0,s.jsx)("p",{className:"text-sm text-[#888]",children:"íìì´ ììµëë¤"})}):tu.map(e=>{let t=te.has(e.id);return(0,s.jsxs)("button",{onClick:()=>tj(e.id),"aria-pressed":t,className:(0,C.cn)("seating-exclude-row w-full flex items-center justify-between px-3 py-2 rounded-lg border transition-colors group",t?"bg-red-600/10 border-red-600/50":"bg-[#1A1A1A] border-white/5 hover:bg-[#222] hover:border-white/10"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate text-[#CCC] group-hover:text-white transition-colors seating-exclude-student-name",children:e.name}),(0,s.jsx)("div",{className:"text-xs font-medium whitespace-nowrap text-[#555] group-hover:text-[#777] transition-colors",children:"ë´ì íê¸"!==J?(0,s.jsxs)(s.Fragment,{children:[e.grade?"".concat(e.grade,"íë
"):"",e.classNum?"".concat(e.classNum,"ë° "):"",e.number,"ë²"]}):"".concat(e.number,"ë²")})]}),t&&(0,s.jsx)(f.Z,{size:14,className:"text-red-600 shrink-0"})]},e.id)})})]})]})]})]})]}),(0,s.jsxs)("div",{ref:eU,className:(0,C.cn)("flex-1 overflow-y-auto custom-scrollbar flex flex-col bg-[#0D0D0D] print:overflow-visible print:h-auto",eW&&"absolute inset-0 z-[9999]"),children:[(0,s.jsx)("div",{className:(0,C.cn)("py-1 flex items-center justify-start shrink-0 transition-all duration-500",eB?"pl-2":"px-6"),children:(0,s.jsxs)("div",{className:"flex gap-2 print:hidden",children:[(0,s.jsxs)("button",{onClick:tw,disabled:eA||0===L.length,className:"h-10 px-3.5 rounded-lg bg-blue-600 hover:bg-blue-500 border border-blue-500/50 text-white transition-all flex items-center justify-center gap-1.5 text-sm font-medium hover:shadow-xl active:scale-95 disabled:opacity-30 hover:ring-2 hover:ring-blue-400/30 shuffle-seats-btn",title:"ì리 ì기",children:[(0,s.jsx)(v.Z,{size:18,className:(0,C.cn)("text-white",eI&&"animate-shuffle-shake")}),(0,s.jsx)("span",{children:"ì리 ì기"})]}),(0,s.jsxs)("button",{onClick:()=>eX(e=>!e),className:(0,C.cn)("seating-rotate-btn h-10 px-3.5 rounded-lg border transition flex items-center justify-center gap-1.5 text-sm font-medium shadow-lg hover:shadow-xl active:scale-95 hover:ring-2",eP?"bg-green-600 hover:bg-green-500 border-green-500/50 text-white shadow-green-900/20 hover:ring-green-400/30":"bg-[#2A2A2A] hover:bg-[#333] border-white/10 text-white/70 hover:text-white shadow-black/20 hover:ring-white/20"),title:"구조 ë³ê²½ (180ë íì )",children:[(0,s.jsx)(w.Z,{size:18,className:(0,C.cn)("transition-transform",eP&&"rotate-180")}
1),(0,s.jsx)("span",{children:"íì "})]}),(0,s.jsxs)("button",{onClick:()=>{let e;if("group"===ee){let t=tm(),n=ei*t,s=ed;ed.length<n?s=[...ed,...Array(n-ed.length).fill(null)]:ed.length>n&&(s=ed.slice(0,n)),e=Z(s,0,0,J,{groupCount:ei,seatsPerGroup:t,groupLayout:ec})}else{let t=en*ea,n=ed;ed.length<t?n=[...ed,...Array(t-ed.length).fill(null)]:ed.length>t&&(n=ed.slice(0,t)),e=Z(n,en,ea,J)}let t=new Blob([e],{type:"application/hwp"}),n=URL.createObjectURL(t),s=document.createElement("a");s.href=n,s.download="".concat(J,"_ì리 ë°°ì¹.hwp"),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(n)},className:"h-10 px-3.5 rounded-lg bg-[#2A2A2A] hover:bg-[#333] border border-white/10 text-white/70 hover:text-white transition flex items-center justify-center gap-1.5 text-sm font-medium hover:shadow-xl active:scale-95",title:"íê¸ íì¼ ë¤ì´ë¡ë",children:[(0,s.jsx)(y.Z,{size:18}),(0,s.jsx)("span",{children:"íê¸"})]}),(0,s.jsxs)("button",{onClick:eV,className:"h-10 px-3.5 rounded-lg bg-[#2A2A2A] hover:bg-[#333] border border-white/10 text-white/70 hover:text-white transition-all flex items-center justify-center gap-1.5 text-sm font-medium hover:shadow-xl active:scale-95",title:eW?"ì ì²´íë©´ ë기":"ì ì²´íë©´ì¼ë¡ í¬ê² 보기",children:[eW?(0,s.jsx)(j.Z,{size:18}):(0,s.jsx)(N.Z,{size:18}),(0,s.jsx)("span",{children:eW?"ì ì²´íë©´ ë기":"ì ì²´íë©´"})]})]})}),(0,s.jsx)("div",{className:(0,C.cn)("flex-1 flex items-center justify-center",eW?"p-6":"p-8"),children:(0,s.jsx)("div",{className:(0,C.cn)("w-full h-full rounded-xl p-2 flex items-center justify-center",eW?"max-w-none":"max-w-[1400px]"),children:(0,s.jsxs)("div",{className:(0,C.cn)("w-full h-full flex flex-col transition-transform duration-500",eP&&"rotate-180"),style:{transformOrigin:"center center"},children:[(0,s.jsx)("div",{className:(0,C.cn)("self-center bg-[#2A2A2A] text-[#EEE] rounded-lg text-center font-bold border border-white/5 shrink-0 shadow-lg tracking-widest bg-opacity-90 backdrop-blur-sm z-10 transition-transform duration-500 mb-4 seating-blackboard-text",eW?"w-[900px] py-4 text-xl":"w-[600px] py-3 text-base",eP&&"rotate-180"),children:"ì¹ í"}),(0,s.jsx)("div",{className:"flex-1 flex items-center justify-center overflow-visible p-2",children:"grid"===ee?(0,s.jsx)("div",{className:"grid gap-3 transition-all duration-300 w-full h-full",style:{gridTemplateColumns:"repeat(".concat(ea,", 1fr)"),gridTemplateRows:"repeat(".concat(en,", 1fr)")},children:Array.from({length:en*ea}).map((e,t)=>{let n=ex.has(t),a=ed[t];return(0,s.jsxs)("div",{onClick:()=>tv(t),onDoubleClick:()=>tg(t),role:"button",tabIndex:0,"aria-label":n?"".concat(t+1,"ë² ì리 (ì¬ì© ì í¨)"):a?"".concat(t+1,"ë² ì리, ").concat(a.name):"".concat(t+1,"ë² ì리 (ë¹ì리)"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),tg(t))},onMouseEnter:()=>e2(t),onMouseLeave:()=>e2(null),draggable:!n&&!!a&&!eA,onDragStart:e=>tS(e,t),onDragOver:e=>tE(e,t),onDragLeave:tI,onDrop:e=>tD(e,t),onDragEnd:tL,className:(0,C.cn)("group w-full h-full rounded-xl border flex flex-col items-center justify-center relative transition select-none duration-200",n?"opacity-20 border-dashed border-white/10 bg-transparent":"bg-[#252525] border-white/5 shadow-black/20 shadow-lg",!n&&!a&&"hover:bg-[#2A2A2A]",n&&"bg-red-600/5 border-red-600/30 opacity-100 print:opacity-20 print:bg-transparent print:border-white/10",eL&&!n&&"animate-shuffle-jitter !border-black seating-desk-shaking",!e5&&"cursor-pointer hover:ring-2 hover:ring-red-500/50 hover:scale-[1.02]",!e5&&!n&&!!a&&!eA&&"cursor-grab",eJ===t&&"opacity-40 scale-95 ring-2 ring-blue-500 cursor-grabbing",e$===t&&!n&&eJ!==t&&"ring-2 ring-green-400 scale-105 bg-green-500/10",e5&&eJ!==t&&!n&&"cursor-pointer hover:ring-2 hover:ring-green-400/50"),children:[!n&&(0,s.jsx)("span",{className:(0,C.cn)("absolute top-2.5 left-2.5 text-white/10 font-mono transition-transform duration-500",eW?"text-base":"text-xs",eP&&"rotate-180"),children:t+1}),!n&&a&&(0,s.jsx)("button",{onClick:e=>ty(t,e),className:(0,C.cn)("absolute p-1 rounded transition-all z-20",eP?"bottom-0.5 left-0.5 rotate-180":"top-0.5 right-0.5",ep.has(t)?"text-amber-400 opacity-100":"text-zinc-500/50 hover:text-amber-400 opacity-0 group-hover:opacity-100"),title:ep.has(t)?"ì리 ê³ ì í´ì ":"ì리 ê³ ì ",children:ep.has(t)?(0,s.jsx)(k.Z,{size:14}):(0,s.jsx)(z.Z,{size:14})}),!n&&a?(0,s.jsxs)("div",{className:(0,C.cn)("transition-transform relative z-10 w-full text-center flex flex-col items-center justify-center px-1",eP&&"rotate-180"),children:[ta&&(0,s.jsx)("span",{className:(0,C.cn)("font-medium text-white/50 leading-none select-none seating-desk-student-number truncate max-w-full",eW?"text-base md:text-lg lg:text-xl mb-1.5":"text-xs mb-1",eL?"o
1pacity-0":eZ&&"animate-snap-in"),children:td(a)}),(0,s.jsx)("div",{className:(0,C.cn)("font-bold text-white tracking-tight seating-desk-student-name w-full truncate",eW?"text-[clamp(1.5rem,2.5vw,3.25rem)]":"text-lg"),children:(0,s.jsx)("span",{className:(0,C.cn)("inline-block",eL?"opacity-0":eZ&&"animate-snap-in"),children:a.name})})]}):!n&&(0,s.jsx)("span",{className:(0,C.cn)("text-white/10 font-medium transition-transform duration-500",eW?"text-xl":"text-sm",eP&&"rotate-180"),children:"ë¹ ì리"}),!e5&&(0,s.jsx)("div",{className:(0,C.cn)("absolute inset-0 flex items-center justify-center transition-all duration-300 print:hidden pointer-events-none z-10",n?"text-red-600 opacity-100 scale-100":e1!==t||ep.has(t)?"opacity-0 scale-90":"opacity-20 scale-100"),children:n?(0,s.jsx)(b.Z,{size:40,strokeWidth:1.5}):(0,s.jsx)(b.Z,{size:65,className:"text-white/20",strokeWidth:1.5})})]},t)})}):(()=>{let e=th(ei,ec),t=ei<=4?"1.5rem":ei<=6?"1rem":ei<=9?"0.75rem":ei<=15?"0.5rem":"0.375rem",n=ei<=4?"1.5rem":ei<=6?"1rem":ei<=9?"0.75rem":ei<=15?"0.5rem":"0.375rem",a=0;return(0,s.jsx)("div",{ref:eK,className:"w-full h-full flex items-center justify-center overflow-hidden",children:(0,s.jsx)("div",{ref:e_,className:"flex flex-col justify-center items-center shrink-0",style:{gap:t,transform:1!==eH?"scale(".concat(eH,")"):void 0,transformOrigin:"center center"},children:e.map((e,t)=>(0,s.jsx)("div",{className:"flex justify-center",style:{gap:n},children:Array.from({length:e}).map(()=>
1{let e=a++,t="2x3"===ec?2:3,n=tm(),r=ei<=4?"w-32":ei<=6?"w-24":ei<=9?"w-20":ei<=12?"w-16":ei<=15?"w-14":"w-12",i=ei<=4?"h-24":ei<=6?"h-20":ei<=9?"h-16":ei<=12?"h-14":ei<=15?"h-12":"h-10",l=ei<=4?"p-5":ei<=6?"p-4":ei<=9?"p-3":ei<=15?"p-2":"p-1.5",c=ei<=4?"text-xl":ei<=6?"text-lg":ei<=9?"text-base":ei<=15?"text-xs":"text-[10px]",o=ei<=6?"text-sm":ei<=15?"text-xs":"text-[10px]";return(0,s.jsxs)("div",{className:(0,C.cn)("border flex flex-col items-center shadow-2xl transition hover:-translate-y-1 hover:shadow-black/40","border-white/10 bg-[#1E1E1E] text-white/90",l,ei<=6?"gap-2":"gap-1.5",ei<=9?"rounded-[2rem]":"rounded-[1.5rem]"),children:[(0,s.jsx)("div",{className:(0,C.cn)("font-bold tracking-[0.1em] opacity-60 border-b border-white/5 w-full text-center transition-transform duration-500",o,ei<=9?"pb-1.5":"pb-1",eP&&"rotate-180"),children:ey===e?(0,s.jsx)("input",{type:"text",autoFocus:!0,value:eN,onChange:e=>ek(e.target.value),onBlur:()=>{let t=[...eg];for(;t.length<=e;)t.push("");t[e]=eN.trim(),ev(t),ej(null),tb(ex,ed,void 0,t)},onKeyDown:e=>{"Enter"===e.key&&e.target.blur(),"Escape"===e.key&&ej(null)},className:(0,C.cn)("bg-transparent text-center w-full outline-none border-b border-white/30 focus:border-white/60 opacity-100",o),maxLength:20}):(0,s.jsx)("span",{className:"cursor-pointer hover:opacity-100 transition-opacity print:cursor-default",onClick:t=>{t.stopPropagation(),ej(e),ek(eg[e]||"".concat(e+1,"모ë "))},children:eg[e]||"".concat(e+1,"모ë ")})}),(0,s.jsx)("div",{className:"grid",style:{gridTemplateColumns:"repeat(".concat(t,", 1fr)"),gap:ei<=6?"0.75rem":ei<=9?"0.5rem":"0.375rem"},children:Array.from({length:n}).map((t,a)=>{let l=e*n+a,o=ex.has(l),d=ed[l];return(0,s.jsxs)("div",{onClick:()=>tv(l),onDoubleClick:()=>tg(l),onMouseEnter:()=>e2(l),onMouseLeave:()=>e2(null),draggable:!o&&!!d&&!eA,onDragStart:e=>tS(e,l),onDragOver:e=>tE(e,l),onDragLeave:tI,onDrop:e=>tD(e,l),onDragEnd:tL,className:(0,C.cn)("group/seat border flex flex-col items-center justify-center relative transition select-none shadow-md",ei<=9?"rounded-xl":"rounded-lg",r,i,o?"opacity-100 border-dashed border-red-600/30 bg-red-600/5 shadow-none print:opacity-20 print:bg-transparent print:border-white/10":"bg-white/5 border-white/5",!o&&!e5&&"cursor-pointer hover:ring-2 hover:ring-white/50 hover:bg-white/10",eL&&!o&&"animate-shuffle-jitter !border-black seating-desk-shaking",!e5&&!o&&!!d&&!eA&&"cursor-grab",eJ===l&&"opacity-40 scale-95 ring-2 ring-blue-500 cursor-grabbing",e$===l&&!o&&eJ!==l&&"ring-2 ring-green-400 scale-105 bg-green-500/10",e5&&eJ!==l&&!o&&"cursor-pointer hover:ring-2 hover:ring-green-400/50"),children:[!o&&d&&(0,s.jsx)("button",{onClick:e=>ty(l,e),className:(0,C.cn)("absolute p-1 rounded transition-colors z-20",eP?"bottom-0.5 left-0.5 rotate-180":"top-0.5 right-0.5",ep.has(l)?"text-amber-400 opacity-100":"text-[#666] hover:text-amber-400 opacity-0 group-hover/seat:opacity-100"),title:ep.has(l)?"ì리 ê³ ì í´ì ":"ì리 ê³ ì ",children:ep.has(l)?(0,s.jsx)(k.Z,{size:12}):(0,s.jsx)(z.Z,{size:12})}),!o&&d?(0,s.jsxs)("div",{className:(0,C.cn)("transition-transform relative z-10 w-full text-center flex flex-col items-center justify-center",ei<=9?"px-1":"px-0.5",eP&&"rotate-180"),children:[ta&&(0,s.jsx)("span",{className:(0,C.cn)("font-medium text-white/50 leading-none select-none seating-desk-student-number truncate max-w-full",ei<=4?"text-xs mb-1":ei<=6?"text-[10px] mb-0.5":ei<=9?"text-[9px] mb-0.5":"text-[8px] mb-0.5",eL?"opacity-0":eZ&&"animate-snap-in"),children:td(d)}),(0,s.jsx)("div",{className:(0,C.cn)("font-bold truncate w-full text-center seating-desk-student-name",c),children:(0,s.jsx)("span",{className:(0,C.cn)("inline-block",eL?"o
1pacity-0":eZ&&"animate-snap-in"),children:d.name})})]}):!o&&(0,s.jsx)("span",{className:(0,C.cn)("opacity-20 transition-transform duration-500",ei<=6?"text-[10px]":ei<=9?"text-[9px]":ei<=15?"text-[8px]":"text-[7px]",eP&&"rotate-180"),children:"ë¹ ì리"}),!e5&&(0,s.jsx)("div",{className:(0,C.cn)("absolute inset-0 flex items-center justify-center transition-opacity print:hidden pointer-events-none",o?"text-red-600 opacity-100":e1===l?"opacity-35 text-white":"opacity-0 text-white"),children:o?(0,s.jsx)(b.Z,{size:ei<=4?48:32,strokeWidth:1.5}):(0,s.jsx)(b.Z,{size:ei<=4?40:ei<=6?32:ei<=9?28:ei<=15?24:20,className:"text-white/20"})})]},a)})})]},e)})},t))})})})()})]})})})]})]})}},7888:function(e,t,n){n.d(t,{q:function(){return s}});function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ìì²ì ì²ë¦¬íì§ ëª»íìµëë¤. ì ì í ë¤ì ìëí´ ì£¼ì¸ì.",n=e instanceof Error?e.message:String(null!=e?e:""),s=n.toLowerCase();return s.trim()?/[ê°-í£]/.test(n)&&!/error|exception|prisma|econn|timeout|undefined|null|\bp\d{4}\b|stack|<|\bat\s/i.test(n)?n:s.includes("unauthorized")||s.includes("unauthenticated")||s.includes("ë¡ê·¸ì¸ ì¸ì
")?"ë¡ê·¸ì¸ì´ íìíê±°ë ì¸ì
ì´ ë§ë£ëììµëë¤. íì´ì§ë¥¼ ìë¡ê³ 침í ë¤ ë¤ì ìëí´ ì£¼ì¸ì.":s.includes("permission denied")||s.includes("forbidden")||s.includes("access denied")||s.includes(" 403")?"ì´ ìì
ì ìíí ê¶íì´ ììµëë¤.":s.includes("not found")||s.includes("no such")||s.includes("does not exist")?"ëìì ì°¾ì ì ììµëë¤. 목ë¡ì ìë¡ê³ 침í ë¤ ë¤ì ìëí´ ì£¼ì¸ì.":s.includes("transaction")&&(s.includes("closed")||s.includes("timeout")||s.includes("aborted")||s.includes("expired"))?"í ë²ì ì²ë¦¬í ìì´ ë§ì ìê°ì´ ì´ê³¼ëììµëë¤. ëë ì ë¤ì ìëí´ ì£¼ì¸ì.":s.includes("econnreset")||s.includes("econnrefused")||s.includes("fetch failed")||s.includes("socket hang up")||s.includes("enotfound")||s.includes("network")?"ìë² ì°ê²°ì´ ë¶ìì í©ëë¤. ì ì í ë¤ì ìëí´ ì£¼ì¸ì.":s.includes("timeout")||s.includes("timed out")||s.includes("etimedout")?"ìë² ìëµ ìê°ì´ ì´ê³¼ëììµëë¤. ì ì í ë¤ì ìëí´ ì£¼ì¸ì.":s.includes("unique constraint")||s.includes("p2002")||s.includes("duplicate key")?"ì´ë¯¸ ë±ë¡ëì´ ìë í목ì
ëë¤.":s.includes("no file provided")||s.includes("file provided")?"íì¼ì´ 첨ë¶ëì§ ìììµëë¤. íì¼ì ì íí ë¤ ë¤ì ìëí´ ì£¼ì¸ì.":s.includes("prisma")||/\bp\d{4}\b/.test(s)||s.includes("database")||s.includes("column ")||s.includes("relation ")?"ë°ì´í°ë¥¼ ì ì¥íë ì¤ ë¬¸ì ê° ë°ìíìµëë¤. ì ì í ë¤ì ìëí´ ì£¼ì¸ì.":t:t}},92804:function(e,t,n){n.d(t,{Ge:function(){return s}});function s(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}},58652:function(e,t,n){n.d(t,{mv:function(){return s}});let s=()=>"<div style=\"margin-top: 6mm; text-align: right; font-size: 8pt; color: #A0A0A0; font-family: 'Malgun Gothic', sans-serif;\">".concat("ë´ëª¨"," ").concat("https://naemo.ai","</div>")}}]);
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.