PageSourceSearch

https://naemo.ai/_next/static/chunks/app/page-c55da8b664c76e9d.js

js naemo.ai collected 2026-10-02 01:12:18 UTC 146,802 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{28910:function(e,t,n){Promise.resolve().then(n.bind(n,85801)),Promise.resolve().then(n.bind(n,75444))},60850:function(e,t,n){"use strict";n.d(t,{CZ:function(){return i},R2:function(){return r},T9:function(){return l},fk:function(){return s},mK:function(){return o}}),n(83079);var a=n(12119),i=(0,a.$)("489a0c9551b931e08d89f7f5f5c892c7b23fefff"),r=(0,a.$)("2a95e2f3f90e7fed938e495986951730a05744b5"),s=(0,a.$)("b4d076709ab489b493a50d11e39e0979ff1959b6"),l=(0,a.$)("b9f327ac565182d2647700118e1b3771a61f0997"),o=(0,a.$)("0fc61a8119cacee671e8cde298a46648317d4bef")},85801:function(e,t,n){"use strict";n.d(t,{default:function(){return t$}});var a=n(57437),i=n(90982),r=n(22797),s=n(2265),l=n(30166),o=n(40875),d=n(35224),c=n(10407),u=n(95805),x=n(29090),h=n(37760),m=n(24156),f=n(58346);function p(e){let{size:t=16,className:n="",...i}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,...i,children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M15 14a1 1 0 1 1 0 2 1 1 0 0 1 0-2m-.53-5.53a.75.75 0 0 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06-1.06zM9 8a1 1 0 1 1 0 2 1 1 0 0 1 0-2"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.762 1.924a1.75 1.75 0 0 1 2.475 0L15.314 4h2.936c.966 0 1.75.783 1.75 1.75v2.936l2.076 2.076a1.75 1.75 0 0 1 0 2.475L20 15.314v2.936A1.75 1.75 0 0 1 18.25 20h-2.937l-2.076 2.076a1.75 1.75 0 0 1-2.475 0L8.686 20H5.75A1.75 1.75 0 0 1 4 18.25v-2.937l-2.076-2.076a1.75 1.75 0 0 1 0-2.475L4 8.686V5.75C4 4.783 4.783 4 5.75 4h2.936zm1.415 1.06a.25.25 0 0 0-.354 0L9.527 5.28a.75.75 0 0 1-.53.22H5.75a.25.25 0 0 0-.25.25v3.247a.75.75 0 0 1-.22.53l-2.296 2.296a.25.25 0 0 0 0 .354l2.296 2.296c.14.14.22.331.22.53v3.247c0 .138.112.25.25.25h3.284a.75.75 0 0 1 .493.22l2.296 2.296a.25.25 0 0 0 .354 0l2.296-2.296a.75.75 0 0 1 .53-.22h3.247a.25.25 0 0 0 .25-.25v-3.247c0-.199.079-.39.22-.53l2.296-2.296a.25.25 0 0 0 0-.354L18.72 9.527a.75.75 0 0 1-.22-.53V5.75a.25.25 0 0 0-.25-.25h-3.247a.75.75 0 0 1-.53-.22z"})]})})}function b(e){let{size:t=16,className:n="",...i}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,...i,children:(0,a.jsxs)("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[(0,a.jsx)("path",{d:"M12 7.512a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9m0 1.5a3 3 0 1 0 0 6 3 3 0 0 0 0-6"}),(0,a.jsx)("path",{d:"M13.517 1.512a1.75 1.75 0 0 1 1.668 1.223l.726 2.297.166.096 2.352-.52a1.75 1.75 0 0 1 1.894.833l1.517 2.628a1.75 1.75 0 0 1-.225 2.057L20 11.892v.214l1.617 1.767a1.75 1.75 0 0 1 .225 2.056l-1.517 2.628a1.75 1.75 0 0 1-1.894.834l-2.321-.514q-.102.061-.207.12l-.716 2.268a1.75 1.75 0 0 1-1.668 1.223h-3.035a1.75 1.75 0 0 1-1.668-1.223L8.1 18.998l-.208-.12-2.322.514a1.75 1.75 0 0 1-1.893-.834L2.159 15.93a1.75 1.75 0 0 1 .225-2.056L4 12.108v-.216l-1.616-1.766a1.75 1.75 0 0 1-.225-2.056l1.517-2.628a1.75 1.75 0 0 1 1.893-.834l2.352.52.167-.096.726-2.297a1.75 1.75 0 0 1 1.668-1.223zm-3.035 1.5a.25.25 0 0 0-.238.175l-.817 2.588a.75.75 0 0 1-.375.442 7 7 0 0 0-.586.339.75.75 0 0 1-.57.103l-2.65-.586a.25.25 0 0 0-.271.119L3.458 8.82a.25.25 0 0 0 .032.293l1.824 1.992a.75.75 0 0 1 .195.548 7 7 0 0 0 0 .698.75.75 0 0 1-.197.545l-1.822 1.99a.25.25 0 0 0-.032.294l1.517 2.628a.25.25 0 0 0 .27.12l2.622-.58a.75.75 0 0 1 .573.104q.3.197.621.36a.75.75 0 0 1 .376.443l.808 2.558a.25.25 0 0 0 .238.175h3.035a.25.25 0 0 0 .238-.175l.808-2.56.012-.035a.75.75 0 0 1 .364-.407q.32-.163.62-.36l.032-.02a.75.75 0 0 1 .541-.085l2.622.58a.25.25 0 0 0 .27-.119l1.517-2.628a.25.25 0 0 0-.032-.293l-1.823-1.992a.75.75 0 0 1-.196-.545 7 7 0 0 0-.001-.697.75.75 0 0 1 .195-.547l1.824-1.992a.25.25 0 0 0 .032-.294L19.024 6.19a.25.25 0 0 0-.27-.119l-2.651.586a.75.75 0 0 1-.57-.103 7 7 0 0 0-.586-.338.75.75 0 0 1-.375-.442l-.817-2.588a.25.25 0 0 0-.238-.175z"})]})})}function v(e){let{size:t=16,className:n="",...i}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,...i,children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M12 15.5a1 1 0 1 1 0 2 1 1 0 0 1 0-2m1.25-9A2.75 2.75 0 0 1 16 9.25v.382a2.75 2.75 0 0 1-1.309 2.343l-1.941 1.194v.581a.75.75 0 0 1-1.5 0v-1a.75.75 0 0 1 .357-.639l2.298-1.414c.37-.227.595-.63.595-1.065V9.25c0-.69-.56-1.25-1.25-1.25h-2.5c-.69 0-1.25.56-1.25 1.25v.25a.75.75 0 0 1-1.5 0v-.25a2.75 2.75 0 0 1 2.75-2.75z"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17"})]})})}function g(e){let{size:t=16,className:n="",...i}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,...i,children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M13.25 3a.75.75 0 0 1 0 1.5h-7.5c-.686 0-1.25.564-1.25 1.25v12.5c0 .686.564 1.25 1.25 1.25h7.5a.75.75 0 0 1 0 1.5h-7.5A2.756 2.756 0 0 1 3 18.25V5.75A2.756 2.756 0 0 1 5.75 3z"}),(0,a.jsx)("path",{d:"M15.47 7.22a.75.75 0 0 1 1.032-.027l.028.027 4.25 4.25a1 1 0 0 1 .067.076l.005.006a1 1 0 0 1 .055.086l.003.006.017.034.012.024q0 .005.003.008l.009.022.005.015.006.017.006.018.014.055.003.016.003.015.004.023.002.014a.7.7 0 0 1 0 .19l-.002.014-.004.023-.003.015-.003.016-.005.02-.01.034-.005.019-.006.017-.005.015-.01.021-.002.008-.012.025-.017.034-.003.006a1 1 0 0 1-.055.086l-.005.005a1 1 0 0 1-.067.077l-4.25 4.25a.75.75 0 0 1-1.06-1.06l2.97-2.97H8.75a.75.75 0 0 1 0-1.5h9.69l-2.97-2.97-.027-.028a.75.75 0 0 1 .027-1.032"})]})})}function w(e){let{size:t=16,className:n="",...i}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,...i,children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M15.25 16.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5zm0-3a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5z"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.005 2h.032l.004.001.031.003h.013l.083.015.008.002.022.005.005.002.068.023.011.004.017.007.01.005.03.014.014.007.013.007.018.01.009.006a1 1 0 0 1 .083.06l.002.001.024.02.004.004.024.024 6.5 6.5.023.024.004.004q.046.051.082.11l.005.008.01.018.008.013.005.01.016.033.005.011.007.016.004.012q.018.045.03.095l.002.007a1 1 0 0 1 .019.164V20.25c0 .964-.786 1.75-1.75 1.75h-13c-.964 0-1.75-.786-1.75-1.75V3.75C3.75 2.786 4.536 2 5.5 2zM5.5 3.5a.253.253 0 0 0-.25.25v16.5c0 .136.114.25.25.25h13c.136 0 .25-.114.25-.25V10H13a.75.75 0 0 1-.75-.75V3.5zm8.25 5h3.94l-3.94-3.94z"})]})})}function j(e){let{size:t=16,className:n="",...i}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,...i,children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M15.22 9.22a.75.75 0 0 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-2.5-2.5-.027-.028a.75.75 0 0 1 1.06-1.059l.027.027 1.97 1.97z"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.251 3c.967 0 1.75.784 1.75 1.75v8.28a6.75 6.75 0 0 1-3.382 5.85l-5.245 3.02a.75.75 0 0 1-.748 0l-5.244-3.02A6.75 6.75 0 0 1 3 13.032V4.75C3 3.784 3.784 3 4.75 3zM4.75 4.5a.25.25 0 0 0-.25.25v8.281a5.25 5.25 0 0 0 2.63 4.55L12 20.384l4.87-2.803a5.25 5.25 0 0 0 2.631-4.55V4.75a.25.25 0 0 0-.25-.25z"})]})})}function k(e){let{size:t=16,className:n="",...i}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,...i,children:(0,a.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M17.728 2.212a.75.75 0 0 1 1.044 1.076l-2.131 2.07a5.7 5.7 0 0 1 1.101 3.132 2.25 2.25 0 0 0 2.005-1.799l.018-.088a.75.75 0 0 1 1.47.294l-.017.088A3.75 3.75 0 0 1 17.75 9.99v2.26h3a.75.75 0 0 1 0 1.5h-3v2.509a3.7
15 3.75 0 0 1 3.468 3.006l.017.087a.75.75 0 0 1-1.47.295l-.018-.088a2.25 2.25 0 0 0-2.196-1.809 5.751 5.751 0 0 1-11.103 0 2.25 2.25 0 0 0-2.195 1.809l-.018.088a.75.75 0 0 1-1.47-.294l.017-.088a3.75 3.75 0 0 1 3.468-3.006V13.75H3.5a.75.75 0 0 1 0-1.5h2.75V9.99a3.75 3.75 0 0 1-3.468-3.005l-.017-.088a.75.75 0 0 1 1.47-.294l.018.088a2.25 2.25 0 0 0 2.004 1.8 5.7 5.7 0 0 1 1.101-3.134l-2.13-2.069a.75.75 0 0 1 1.045-1.076l2.12 2.06A5.73 5.73 0 0 1 12 3a5.72 5.72 0 0 1 3.605 1.272zM7.75 10v6.25a4.25 4.25 0 0 0 8.5 0V10zM12 4.5a4.25 4.25 0 0 0-4.242 4h8.484A4.25 4.25 0 0 0 12 4.5"})})}function y(e){let{size:t=16,className:n="",...i}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,...i,children:(0,a.jsxs)("g",{fill:"currentColor",children:[(0,a.jsx)("path",{d:"M8 9.75a1 1 0 1 1 0 2 1 1 0 0 1 0-2m4 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2m4 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.75 2A8.25 8.25 0 0 1 22 10.25v.5A8.25 8.25 0 0 1 13.75 19H6.535l-3.42 1.905A.75.75 0 0 1 2 20.25v-10A8.25 8.25 0 0 1 10.25 2zm-3.5 1.5a6.75 6.75 0 0 0-6.75 6.75v8.723l2.475-1.378a.75.75 0 0 1 .365-.095h7.41a6.75 6.75 0 0 0 6.75-6.75v-.5a6.75 6.75 0 0 0-6.75-6.75z"})]})})}var z=n(54887),N=n(32489),E=n(27526),C=n(53185),S=n(34137),D=n(83444),L=n(61882);function M(e){let{isOpen:t,onClose:n}
1=e,[i,r]=(0,s.useState)(!1),[l,o]=(0,s.useState)(!1),[d,c]=(0,s.useState)(!1),[u,x]=(0,s.useState)(!1);if((0,s.useEffect)(()=>(o(!0),()=>o(!1)),[]),(0,s.useEffect)(()=>{if(!t)return;let e=!1;return(0,E.J9)().then(t=>{e||c(!!(null==t?void 0:t.apple))}).catch(()=>{}),()=>{e=!0}},[t]),(0,S.j)(n,t),!t||!l)return null;let h=async e=>{r(!0);try{await (0,C.o)(e),r(!1)}catch(e){console.error("Login failed:",e),r(!1)}};return(0,z.createPortal)((0,a.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/60 dark:bg-black/80 backdrop-blur-sm p-4",children:(0,a.jsxs)("div",{className:"relative w-full max-w-[400px] bg-white dark:bg-[#18181b] rounded-2xl shadow-2xl border border-zinc-200 dark:border-zinc-800 p-6 flex flex-col items-center animate-in fade-in zoom-in-95 duration-200",children:[(0,a.jsx)("button",{"aria-label":"닫기",onClick:n,className:"absolute top-2.5 right-2.5 p-2 text-zinc-500 dark:text-zinc-400 hover:text-black dark:hover:text-white transition-colors rounded-lg",children:(0,a.jsx)(N.Z,{size:20})}),(0,a.jsxs)("div",{className:"text-center mb-8 mt-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold text-zinc-900 dark:text-white mb-2",children:"로그인 또는 회원 가입"}),(0,a.jsx)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 leading-relaxed",children:"나만의 맞춤 교무수첩을 이용할 수 있습니다."})]}),(0,a.jsxs)("div",{className:"w-full space-y-2.5 mb-6",children:[(()=>{let e="undefined"!=typeof navigator&&(0,L.nO)(navigator.userAgent),t="w-full h-[46px] rounded-xl bg-white hover:bg-zinc-50 dark:bg-[#27272a] dark:hover:bg-[#3f3f46] border border-zinc-200 dark:border-zinc-700 hover:border-zinc-300 dark:hover:border-zinc-600 flex items-center justify-center gap-3 text-zinc-700 dark:text-white transition disabled:opacity-50 shadow-sm",n=d?(0,a.jsxs)("button",{type:"button","data-testid":"login-modal-apple",onClick:()=>h("apple"),disabled:i,className:t,children:[(0,a.jsx)(D.qw,{}),(0,a.jsx)("span",{className:"font-medium text-sm",style:{color:"inherit"},children:"Apple로 계속하기"})]},"apple"):null,r=(0,a.jsxs)("button",{type:"button","data-testid":"login-modal-google",onClick:()=>h("google"),disabled:i,className:t,children:[(0,a.jsxs)("svg",{viewBox:"0 0 24 24",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,a.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,a.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,a.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),(0,a.jsx)("span",{className:"font-medium text-sm",style:{color:"inherit"},children:"Google로 계속하기"})]},"google");return n?e?(0,a.jsxs)(a.Fragment,{children:[n,r]}):(0,a.jsxs)(a.Fragment,{children:[r,n]}):r})(),(0,a.jsx)("button",{type:"button","data-testid":"login-modal-more-methods","aria-expanded":u,onClick:()=>x(e=>!e),disabled:i,className:"w-full h-10 text-sm text-zinc-500 dark:text-zinc-400 underline underline-offset-2 hover:text-zinc-700 dark:hover:text-zinc-200 transition disabled:opacity-50",children:"다른 방법으로 로그인"}),u&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{onClick:()=>h("naver"),disabled:i,className:"w-full h-[46px] rounded-xl bg-white hover:bg-zinc-50 dark:bg-[#27272a] dark:hover:bg-[#3f3f46] border border-zinc-200 dark:border-zinc-700 hover:border-zinc-300 dark:hover:border-zinc-600 flex items-center justify-center gap-3 text-zinc-700 dark:text-white transition disabled:opacity-50 shadow-sm",children:[(0,a.jsx)("svg",{viewBox:"-3 -3 30 30",width:"18",height:"18",fill:"#03C75A",children:(0,a.jsx)("path",{d:"M16.273 12.845L7.376 0H0v24h7.726V11.156L16.624 24H24V0h-7.727v12.845z"})}),(0,a.jsx)("span",{className:"font-medium text-sm",children:"네이버로 ê
1³„속하기"})]}),(0,a.jsxs)("button",{onClick:()=>h("kakao"),disabled:i,className:"w-full h-[46px] rounded-xl bg-white hover:bg-zinc-50 dark:bg-[#27272a] dark:hover:bg-[#3f3f46] border border-zinc-200 dark:border-zinc-700 hover:border-zinc-300 dark:hover:border-zinc-600 flex items-center justify-center gap-3 text-zinc-700 dark:text-white transition disabled:opacity-50 shadow-sm",children:[(0,a.jsx)("svg",{viewBox:"0 0 24 24",width:"18",height:"18",className:"fill-[#381C1D] dark:fill-[#FEE500]",children:(0,a.jsx)("path",{d:"M12 3C5.9 3 1 6.9 1 11.8c0 2.9 2.0 5.6 5.2 7.1-.2.7-.8 2.6-.8 3 .0.1.0.2.1.3.1.1.2.1.4.1.1 0 .2 0 .3-.1 2.7-1.8 3.8-2.6 3.8-2.6.6.1 1.3.2 2.0.2 6.1 0 11.0-3.9 11.0-8.8S18.1 3 12 3z"})}),(0,a.jsx)("span",{className:"font-medium text-sm",children:"카카오로 계속하기"})]})]})]}),(0,a.jsxs)("p",{className:"text-xs text-center leading-relaxed text-zinc-500 dark:text-zinc-400",children:["계속하면 내모의"," ",(0,a.jsx)("a",{href:"/terms",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 hover:text-zinc-700 dark:hover:text-zinc-200",children:"이용약관"})," ","및"," ",(0,a.jsx)("a",{href:"/privacy",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 hover:text-zinc-700 dark:hover:text-zinc-200",children:"개인정보 처리방침"}),"에 동의하게 됩니다."]})]})}),document.body)}var A=n(41671),I=n(51817),T=n(93448);n(83079);var R=n(12119),Z=(0,R.$)("622adbf8b38907b3dd31a4ee942db9a86b36b8bf"),B=n(45444);function O(e){let{isOpen:t,onClose:n,userEmail:i,userName:r,onShowHistory:l}=e,[o,d]=(0,s.useState)(""),[c,u]=(0,s.useState)(!1),[x,h]=(0,s.use
1State)(!1),[m,f]=(0,s.useState)(null),[p,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>(b(!0),()=>b(!1)),[]),(0,s.useEffect)(()=>{t&&(d(""),f(null),h(!1))},[t]);let v=async()=>{if(!o.trim()){f("내용을 입력해주세요.");return}u(!0),f(null);try{let e=await Z({title:"버그 신고",description:o.trim(),contactEmail:i||void 0,userName:r});e.success?(h(!0),setTimeout(()=>{n(),h(!1)},5e3)):f(e.error||"버그 신고 전송에 실패했습니다.")}catch(e){f("오류가 발생했습니다. 다시 시도해주세요.")}finally{u(!1)}};(0,S.j)(n,t&&!c);let g=(0,B.X)(v,t&&!c);return t&&p?(0,z.createPortal)((0,a.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/40 dark:bg-black/60 backdrop-blur-sm p-4",children:(0,a.jsx)("div",{className:"relative w-full max-w-[560px] bg-white dark:bg-[#1a1a1a] rounded-2xl shadow-2xl border border-zinc-200 dark:border-zinc-800 p-4 flex flex-col animate-in fade-in zoom-in-95 duration-200",children:x?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-10",children:[(0,a.jsx)(A.Z,{size:40,className:"text-green-500 mb-3"}),(0,a.jsx)("h2",{className:"text-base font-bold text-zinc-900 dark:text-white mb-1",children:"신고가 접수되었습니다"}),(0,a.jsx)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"소중한 피드백 감사합니다."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-zinc-900 dark:text-white",children:"무슨 일이 일어났나요?"}),(0,a.jsx)("button",{"aria-label":"닫기",onClick:n,disabled:c,className:"p-1 rounded-lg text-zinc-400 hover:text-zinc-600 dark:hover:text-white transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:(0,a.jsx)(N.Z,{size:20})})]}),(0,a.jsx)("textarea",{placeholder:"어떤 문제가 일어났는지 알려주세요",value:o,onChange:e=>{let t=e.target.value;t.length<=2e3&&d(t)},onKeyDown:g,disabled:c,className:"w-full h-[280px] bg-transparent border-none rounded-lg px-0 py-2.5 text-sm text-zinc-900 dark:text-white placeholder:text-zinc-400 dark:placeholder:text-zinc-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 transition-colors disabled:opacity-50 resize-y"}),(0,a.jsx)("div",{className:"flex justify-end mt-1.5 px-1",children:(0,a.jsxs)("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[o.length,"/",2e3,"자 사용"]})}),m&&(0,a.jsx)("div",{className:"text-xs text-red-400 bg-red-900/20 px-2.5 py-1.5 rounded-lg mt-3",children:m}),(0,a.jsxs)("div",{className:"flex items-center mt-4",children:[l&&(0,a.jsx)("button",{onClick:l,disabled:c,className:"text-xs text-zinc-500 hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-200 transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded",children:"지난 내역"}),(0,a.jsx)("button",{onClick:v,disabled:c||!o.trim(),className:(0,T.cn)("ml-auto px-4 py-1.5 rounded-full text-sm font-medium transition flex items-center justify-center gap-1.5","bg-zinc-900 text-white hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200","disabled:opacity-40 disabled:cursor-not-allowed shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(I.Z,{size:14,className:"animate-spin"}),(0,a.jsx)("span",{children:"전송 중..."})]}):(0,a.jsx)("span",{children:"보내기"})})]})]})})}),document.body):null}var F=(0,R.$)("c083016a056c168a43de465139e0f05149e0e7c0");function P(e){let{isOpen:t,onClose:n,userEmail:i,userName:r,onShowHistory:l}=e,[o,d]=(0,s.useState)(""),[c,u]=(0,s.useState)(!1),[x,h]=(0,s.use
1State)(!1),[m,f]=(0,s.useState)(null),[p,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>(b(!0),()=>b(!1)),[]),(0,s.useEffect)(()=>{t&&(d(""),f(null),h(!1))},[t]);let v=async()=>{if(!o.trim()){f("내용을 입력해주세요.");return}u(!0),f(null);try{let e=await F({title:"문의하기",description:o.trim(),contactEmail:i||void 0,userName:r});e.success?(h(!0),setTimeout(()=>{n(),h(!1)},5e3)):f(e.error||"문의 전송에 실패했습니다.")}catch(e){f("오류가 발생했습니다. 다시 시도해주세요.")}finally{u(!1)}};(0,S.j)(n,t&&!c);let g=(0,B.X)(v,t&&!c);return t&&p?(0,z.createPortal)((0,a.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/40 dark:bg-black/60 backdrop-blur-sm p-4",children:(0,a.jsx)("div",{className:"relative w-full max-w-[560px] bg-white dark:bg-[#1a1a1a] rounded-2xl shadow-2xl border border-zinc-200 dark:border-zinc-800 p-4 flex flex-col animate-in fade-in zoom-in-95 duration-200",children:x?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-10",children:[(0,a.jsx)(A.Z,{size:40,className:"text-green-500 mb-3"}),(0,a.jsx)("h2",{className:"text-base font-bold text-zinc-900 dark:text-white mb-1",children:"문의가 접수되었습니다"}),(0,a.jsx)("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"소중한 의견 감사합니다."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-zinc-900 dark:text-white",children:"무엇을 도와드릴까요?"}),(0,a.jsx)("button",{"aria-label":"닫기",onClick:n,disabled:c,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-white transition-colors disabled:opacity-50",children:(0,a.jsx)(N.Z,{size:20})})]}),(0,a.jsx)("textarea",{placeholder:"궁금한 점이나 요청사항을 알려주세요",value:o,onChange:e=>{let t=e.target.value;t.length<=2e3&&d(t)},onKeyDown:g,disabled:c,className:"w-full h-[280px] bg-transparent border-none rounded-lg px-0 py-2.5 text-sm text-zinc-900 dark:text-white placeholder:text-zinc-400 dark:placeholder:text-zinc-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 transition-colors disabled:opacity-50 resize-y"}),(0,a.jsx)("div",{className:"flex justify-end mt-1.5 px-1",children:(0,a.jsxs)("span",{className:"text-xs text-zinc-500",children:[o.length,"/",2e3,"자 사용"]})}),m&&(0,a.jsx)("div",{className:"text-xs text-red-400 bg-red-900/20 px-2.5 py-1.5 rounded-lg mt-3",children:m}),(0,a.jsxs)("div",{className:"flex items-center mt-4",children:[l&&(0,a.jsx)("button",{onClick:l,disabled:c,className:"text-xs text-zinc-500 hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-200 transition-colors disabled:opacity-50",children:"지난 내역"}),(0,a.jsx)("button",{onClick:v,disabled:c||!o.trim(),style:{backgroundColor:"#EEEEE8"},className:(0,T.cn)("ml-auto px-4 py-1.5 rounded-full text-sm font-medium transition flex items-center justify-center gap-1.5","text-black dark:bg-white dark:text-black","disabled:opacity-50 disabled:cursor-not-allowed shadow-sm"),children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(I.Z,{size:14,className:"animate-spin"}),(0,a.jsx)("span",{children:"전송 중..."})]}):(0,a.jsx)("span",{children:"보내기"})})]})]})})}),document.body):null}var V=n(47260),U=n(75368),W=(0,R.$)("84dd762832a5e8c8878481ab26c397391e7f893f"),_=(0,R.$)("8fec50ddbecd847080513117009b7695287fea1e"),G=(0,R.$)("4044d2d05b3b5e0f2349339829914e62ebb19d3d"),H=n(64954);function K(e){try{return new Date(e).toLocaleString("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}catch(e){return""}}function X(e){let{isOpen:t,onClose:n}
1=e,[i,r]=(0,s.useState)(!1),[l,d]=(0,s.useState)(!0),[c,u]=(0,s.useState)([]),[x,h]=(0,s.useState)(null);if((0,s.useEffect)(()=>(r(!0),()=>r(!1)),[]),(0,s.useEffect)(()=>{if(!t)return;let e=!0;return d(!0),h(null),W().then(t=>{e&&u(t)}).catch(()=>{e&&u([])}).finally(()=>{e&&d(!1)}),()=>{e=!1}},[t]),(0,S.j)(n,t),!t||!i)return null;let m=e=>{let t=x!==e.id;h(t?e.id:null),t&&e.repliedAt&&!e.readAt&&(G(e.id),u(t=>t.map(t=>t.id===e.id?{...t,readAt:new Date().toISOString()}:t)))};return(0,z.createPortal)((0,a.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/40 dark:bg-black/60 backdrop-blur-sm p-4",children:(0,a.jsxs)("div",{className:"relative w-full max-w-[560px] bg-white dark:bg-[#1a1a1a] rounded-2xl shadow-2xl border border-zinc-200 dark:border-zinc-800 p-4 flex flex-col animate-in fade-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-zinc-900 dark:text-white",children:"지난 내역"}),(0,a.jsx)("button",{"aria-label":"닫기",onClick:n,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-white transition-colors",children:(0,a.jsx)(N.Z,{size:20})})]}),(0,a.jsx)("div",{className:"h-[340px] overflow-y-auto -mx-1 px-1",children:l?(0,a.jsx)("div",{className:"h-full flex items-center justify-center",children:(0,a.jsx)(I.Z,{size:20,className:"animate-spin text-zinc-400"})}):0===c.length?(0,a.jsx)("div",{className:"h-full flex items-center justify-center",children:(0,a.jsx)(H.Z,{size:"sm",title:"아직 보낸 문의가 없습니다",description:"문의 또는 버그를 접수하시면 답변 내역을 확인할 수 있습니다."})}):(0,a.jsx)("div",{className:"space-y-2",children:c.map(e=>{let t="bug"===e.type,n="answered"===e.status&&!!e.repliedAt,i=x===e.id;return(0,a.jsxs)("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800 overflow-hidden",children:[(0,a.jsxs)("button",{onClick:()=>m(e),className:"w-full flex items-center gap-2.5 p-3 text-left hover:bg-zinc-50 dark:hover:bg-zinc-900/40 transition-colors",children:[t?(0,a.jsx)(V.Z,{size:15,className:"shrink-0 text-red-500"}):(0,a.jsx)(U.Z,{size:15,className:"shrink-0 text-blue-500"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-0.5",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-zinc-500 dark:text-zinc-400",children:t?"버그 신고":"문의"}),(0,a.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full ".concat(n?"bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400":"bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400"),children:n?"답변 완료":"답변 대기"})]}),(0,a.jsx)("p",{className:"text-sm text-zinc-800 dark:text-zinc-100 truncate",children:e.description}),(0,a.jsx)("p",{className:"text-[11px] text-zinc-400 mt-0.5",children:K(e.createdAt)})]}),(0,a.jsx)(o.Z,{size:16,className:"shrink-0 text-zinc-400 transition-transform ".concat(i?"rotate-180":"")})]}),i&&(0,a.jsxs)("div",{className:"border-t border-zinc-200 dark:border-zinc-800 p-3 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-zinc-500 dark:text-zinc-400",children:"보낸 내용"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-zinc-600 dark:text-zinc-300 whitespace-pre-wrap leading-relaxed",children:e.description})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-zinc-500 dark:text-zinc-400",children:"답변"}),n?(0,a.jsxs)("div",{className:"mt-1 rounded-lg bg-zinc-50 dark:bg-zinc-800/50 border border-zinc-200 dark:border-zinc-700/50 p-3",children:[(0,a.jsx)("p",{className:"text-sm text-zinc-800 dark:text-zinc-100 whitespace-pre-wrap leading-relaxed",children:e.replyBody}),e.repliedAt&&(0,a.jsx)("p",{className:"text-[11px] text-zinc-400 mt-2",children:K(e.repliedAt)})]}):(0,a.jsx)("p",{className:"mt-1 text-xs text-zinc-400",children:"아직 답변을 준비하고 있어요."})]})]})]},e.id)})})})]})}),document.body)}var q=n(25997),J=n(4908),$=n(48013),Y=n(43232),Q=n(92846),ee=n(39561),et=n(86315),en=n(45007),ea=n(33145),ei=n(60850);let er=new Set(["student-management","work-notes","survey","seating","cleaning","random-picker","attendance-print","nametag"]);function es(e){var t,n,i,r,l,z,N,C,S,D,L,A,I,R,Z,B,F;let{currentView:V,onMenuClick:U,onMenuHover:W,session:_}
1=e,[G,H]=(0,s.useState)(!1),[K,es]=(0,s.useState)(!1),[el,eo]=(0,s.useState)(!1),[ed,ec]=(0,s.useState)(!1),[eu,ex]=(0,s.useState)(!1),[eh,em]=(0,s.useState)(!1),[ef,ep]=(0,s.useState)(!1),[eb,ev]=(0,s.useState)(!1),[eg,ew]=(0,s.useState)([]),[ej,ek]=(0,s.useState)(null),ey=(0,ee.g)(),[ez,eN]=(0,s.useState)(0),eE=(0,s.useRef)(V);(0,s.useEffect)(()=>{"dashboard"===V&&"dashboard"!==eE.current&&eN(e=>e+1),eE.current=V},[V]);let{openSettings:eC}=(0,q.Y)(),{students:eS,isLoading:eD}=(0,J.AF)(),eL=!eD&&0===eS.length;(0,s.useEffect)(()=>{let e=async()=>{if(null==_?void 0:_.user)try{var e;let t=await (0,ei.T9)();t.success&&(null===(e=t.data)||void 0===e?void 0:e.schoolName)?ek(t.data.schoolName):ek(null)}catch(e){console.error("[Sidebar] Failed to load school info:",e)}else ek(null)};e();let t=()=>e();return window.addEventListener("school-settings-updated",t),()=>window.removeEventListener("school-settings-updated",t)},[null==_?void 0:_.user]),(0,s.useEffect)(()=>{es(!0);let e=()=>{let e=window.innerWidth;if(e<768){H(!0);return}let t=e<1280,n=localStorage.getItem("sidebarCollapsed");if(null===n){H(t);return}try{H(JSON.parse(n))}catch(e){H(t)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let eM=()=>{let e=!G;H(e),localStorage.setItem("sidebarCollapsed",JSON.stringify(e))},eA=(0,s.useRef)(null),eI=e=>{ew(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},{config:eT}=(0,et.Nv)(),eR=[...eT.topLevelOrder.map(e=>({id:e,icon:(0,et.m3)(e),label:(0,et.Kg)(e)})),...eT.recordToolsOrder.length>0?[{id:"record-tools",icon:o.Z,label:et.U8,children:eT.recordToolsOrder.map(e=>({id:e,icon:(0,et.m3)(e),label:(0,et.Kg)(e)}))}]:[],...eT.classToolsOrder.length>0?[{id:"class-tools",icon:o.Z,label:et.zN,children:eT.classToolsOrder.map(e=>({id:e,icon:(0,et.m3)(e),label:(0,et.Kg)(e)}))}]:[]],eZ=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=eR.filter(e=>e.children&&e.children.length>0);if(0===e.length||eZ.current===V)return;eZ.current=V;let t=e.find(e=>e.children.some(e=>e.id===V));t&&ew(e=>e.includes(t.id)?e:[...e,t.id])},[V,eR]),(0,s.useEffect)(()=>{let e=e=>{eA.current&&!eA.current.contains(e.target)&&eo(!1)};return el?document.addEventListener("mouseup",e):document.removeEventListener("mouseup",e),()=>{document.removeEventListener("mouseup",e)}},[el]);let eB=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(G){H(!1),t?(Q.MU.selection(),ew(t=>t.includes(e)?t:[...t,e])):U(e);return}t?(Q.MU.selection(),eI(e)):U(e)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("aside",{className:(0,T.cn)("flex h-full flex-col border-r duration-300 ease-in-out shrink-0 print:hidden","bg-[#09090b] border-[#27272a]",!er.has(V)&&"nav-rail-shadow",G?"w-[70px]":"w-64"),children:[(0,a.jsxs)("div",{className:(0,T.cn)("h-16 flex items-center transition-all duration-300 px-4 relative shrink-0",G&&"group/logo cursor-pointer justify-center"),onClick:G?eM:void 0,role:G?"button":void 0,tabIndex:G?0:void 0,"aria-label":G?"메뉴 펼치기":void 0,onKeyDown:G?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),eM())}:void 0,children:[(0,a.jsxs)("div",{className:"flex items-center overflow-hidden",children:[(0,a.jsxs)("div",{className:"relative shrink-0",children:[(0,a.jsx)(Y.O,{className:(0,T.cn)("transition duration-200 text-[#37352F] dark:text-white",ez>0&&"brand-logo-swing",G&&"group-hover/logo:opacity-0 group-hover/logo:scale-50")},ez),(0,a.jsx)($.jp,{size:20,className:(0,T.cn)("absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-[#71717a] group-hover/logo:text-white transition-all duration-200 opacity-0 scale-50",G&&"group-hover/logo:opacity-100 group-hover/logo:scale-100")})]}),(0,a.jsx)("span",{className:(0,T.cn)("text-[17px] font-semibold whitespace-nowrap overflow-hidden transition-all duration-300 text-[#37352F] dark:text-white sidebar-brand-text",G?"max-w-0 opacity-0 ml-0":"max-w-[120px] opacity-100 ml-2"),children:"NAEMO"})]}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),eM()},onMouseDown:e=>e.preventDefault(),"aria-label":"메뉴 접기",className:(0,T.cn)("absolute right-4 text-[#71717a] hover:text-white transition-all duration-300 p-1",G?"opacity-0 pointer-events-none scale-90":"opacity-100 scale-100"),title:"메뉴 접기",children:(0,a.jsx)(d.Z,{size:18})})]}),(0,a.jsx)("nav",{className:"flex-1 px-3 pt-3 pb-3 space-y-0.5 overflow-y-auto custom-scrollbar overflow-x-hidden min-h-0",children:eR.map(e=>{var t;let n=e.icon,i=!!e.children,r=eg.includes(e.id),s=r?o.Z:c.Z,l=i&&(null===(t=e.children)||void 0===t?void 0:t.some(e=>e.id===V)),d=V===e.id||l,u="!text-zinc-500 dark:!text-zinc-400",x="transition-colors group-hover:!text-zinc-900 dark:group-hover:!text-zinc-200",h=i?void 0:(0,et.sV)(e.id),m=(0,T.cn)("transition-colors shrink-0",i?(0,T.cn)(u,x):d||l?"text-white":"text-[#71717a] dark:text-white group-hover:text-white");return(0,a.jsxs)("div",{className:(0,T.cn)("record-tools"===e.id&&"mt-2"),children:[(0,a.jsxs)("button",{onClick:()=>eB(e.id,i),onMouseEnter:()=>!i&&(null==W?void 0:W(e.id)),onMouseDown:e=>e.preventDefault(),title:G?e.label:void 0,className:(0,T.cn)("w-full flex items-center transition-[background-color] duration-200 group relative py-2.5 px-3 rounded-md min-h-[44px]",i&&"sidebar-group-header",i?"text-zinc-500 dark:text-zinc-400":d&&!i?"bg-[#202023] text-white":"text-[#d4d4d8] hover:bg-[#202023] hover:text-white",l&&"text-white"),children:[i&&!G?null:h?(0,a.jsx)(en.w,{src:h,size:20,className:m}):i?(0,a.jsx)(s,{size:14,strokeWidth:1.5,className:m}):(0,a.jsx)(n,{size:20,strokeWidth:1.5,className:m}),(0,a.jsx)("span",{className:(0,T.cn)("text-sm font-normal whitespace-nowrap overflow-hidden text-ellipsis transition-all duration-300 flex-1 text-left",i&&u,i&&x,i&&"!text-[12px]",i&&"!flex-none",G?"max-w-0 opacity-0 ml-0 pointer-events-none":i?"max-w-[200px] opacity-100 ml-0":"max-w-[200px] opacity-100 ml-3"),children:e.label}),i&&!G&&(0,a.jsx)(s,{size:14,strokeWidth:1.5,className:(0,T.cn)("ml-1 shrink-0",u,x),"aria-hidden":"true"}),G&&(0,a.jsx)("div",{className:"absolute left-full ml-2 px-2.5 py-1 bg-[#18181b] border border-white/10 text-[11px] font-medium text-white rounded-lg shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity duration-150",children:e.label})]}),i&&(0,a.jsx)("div",{"aria-hidden":!r,className:(0,T.cn)("grid transition-all duration-200 ease-out",r?"grid-rows-[1fr] opacity-100 mt-0.5":"grid-rows-[0fr] opacity-0 invisible mt-0"),children:(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)("div",{className:"space-y-0.5",children:e.children.map(e=>{let t=e.icon,n=V===e.id,i=(0,et.sV)(e.id),r=(0,T.cn)("transition-colors shrink-0",n?"text-white":"text-[#a1a1aa] group-hover:text-white");return(0,a.jsxs)("button",{onClick:()=>{U(e.id)},onMouseEnter:()=>null==W?void 0:W(e.id),onMouseDown:e=>e.preventDefault(),className:(0,T.cn)("w-full flex items-center transition-colors duration-200 py-2.5 px-3 rounded-md min-h-[44px] group relative",n?"bg-[#202023] text-white":"text-[#d4d4d8] hover:bg-[#202023] hover:text-white"),children:[i?(0,a.jsx)(en.w,{src:i,size:20,className:r}):(0,a.jsx)(t,{size:20,strokeWidth:1.5,className:r}),(0,a.jsx)("span",{className:(0,T.cn)("text-sm font-normal whitespace-nowrap overflow-hidden text-ellipsis text-left flex-1 transition-all duration-300",G?"max-w-0 opacity-0 ml-0 pointer-events-none":"max-w-[200px] opacity-100 ml-3"),children:e.label}),G&&(0,a.jsx)("div",{className:"absolute left-full ml-2 px-2.5 py-1 bg-[#18181b] border border-white/10 text-[11px] font-medium text-white rounded-lg shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity duration-150",children:e.label})]},e.id)})})})})]},e.id)})}),(0,a.jsxs)("div",{className:(0,T.cn)("shrink-0 mt-auto px-2 mb-1.5",G?"flex flex-col items-center gap-1.5":"flex items-center gap-1.5"),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eC("student-list"),title:eL?"학생 명단 (학생이 없습니다)":"학생 명단","aria-label":"학생 명단",className:(0,T.cn)("group relative flex items-center justify-center rounded-full transition-colors","bg-zinc-100 dark:bg-[#202023] hover:bg-zinc-200 dark:hover:bg-[#3f3f46]","text-zinc-600 dark:text-[#a1a1aa] hover:text-zinc-900 dark:hover:text-white",G?"p-2":"flex-1 gap-1.5 px-3 py-1.5"),children:[(0,a.jsx)(u.Z,{size:14,strokeWidth:1.5,className:"shrink-0"}),!G&&(0,a.jsxs)("span",{className:"text-xs font-medium inline-flex items-center gap-1.5",children:["학생 명단",eL&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 shrink-0","aria-hidden":"true"})]}),G&&eL&&(0,a.jsx)("span",{className:"absolute top-0.5 right-0.5 w-1.5 h-1.5 rounded-full bg-red-500 ring-2 ring-zinc-50 dark:ring-[#09090b]","aria-hidden":"true"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>eC("grade-file"),title:"성적 파일","aria-label":"성적 파일",className:(0,T.cn)("group flex items-center justify-center rounded-full transition-colors","bg-zinc-100 dark:bg-[#202023] hover:bg-zinc-200 dark:hover:bg-[#3f3f46]","text-zinc-600 dark:text-[#a1a1aa] hover:text-zinc-900 dark:hover:text-white",G?"p-2":"flex-1 gap-1.5 px-3 py-1.5"),children:[(0,a.jsx)(f.d,{name:"student-cap",size:14,className:"shrink-0 opacity-80"}),!G&&(0,a.jsx)("span",{className:"text-xs font-medium",children:"성적 파일"})]})]}),(0,a.jsxs)("div",{className:"relative shrink-0 z-20",ref:eA,children:[el&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:(0,T.cn)("absolute bottom-full left-3 mb-0 w-56 bg-[#fafaf9] dark:bg-[#18181b] border border-zinc-200 dark:border-[#27272a] rounded-xl shadow-xl overflow-hidden z-50 flex flex-col scale-100 opacity-100 transition origin-bottom-left",G&&"left-14"),children:[(0,a.jsx)("div",{className:"px-4 pt-3 pb-2",children:(0,a.jsx)("p",{className:"text-xs text-[#71717a] truncate",children:(null==_?void 0:null===(t=_.user)||void 0===t?void 0:t.email)||"이메일 미등록"})}),(0,a.jsxs)("div",{className:"p-1",children:[(null==_?void 0:null===(n=_.user)||void 0===n?void 0:n.isSystemAdmin)&&(0,a.jsxs)("a",{href:"/admin",target:"_blank",rel:"noopener noreferrer",className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-amber-400 hover:bg-amber-400/10 rounded-lg transition-colors text-left profile-menu-item",onClick:()=>eo(!1),children:[(0,a.jsx)(f.d,{name:"building",size:16,className:"opacity-80"}),(0,a.jsx)("span",{children:"관리자 대시보드"})]}),(null==_?void 0:null===(r=_.user)||void 0===r?void 0:null===(i=r.email)||void 0===i?void 0:i.trim().toLowerCase())==="[email protected]"&&(0,a.jsxs)("a",{href:"/school-collaboration",target:"_blank",rel:"noopener noreferrer","aria-label":"학교 협업 (새 탭)",className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5 rounded-lg transition-colors text-left profile-menu-item",onClick:()=>{eo(!1),ev(!1)},children:[(0,a.jsx)(f.d,{name:"building",size:16,className:"opacity-80"}),(0,a.jsx)("span",{children:"학교 협업"})]}
1),!ey&&(0,a.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5 rounded-lg transition-colors text-left profile-menu-item",onClick:()=>{window.dispatchEvent(new CustomEvent("navigate-view",{detail:"plans"})),eo(!1)},children:[(0,a.jsx)(p,{size:16}),(0,a.jsx)("span",{children:"플랜 안내"})]}),(0,a.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5 rounded-lg transition-colors text-left profile-menu-item",onClick:()=>{eC(),eo(!1)},children:[(0,a.jsx)(b,{size:16}),(0,a.jsx)("span",{children:"설정"})]}),(0,a.jsxs)("button",{style:{border:"none",outline:"none",boxShadow:"none"},className:(0,T.cn)("w-full flex items-center justify-between px-3 py-2 text-sm rounded-lg transition-colors text-left profile-help-button",eb?"text-zinc-900 dark:text-white":"text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5"),onClick:e=>{e.preventDefault(),e.stopPropagation(),ev(!eb)},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(v,{size:16}),(0,a.jsx)("span",{children:"도움말"})]}),(0,a.jsx)(c.Z,{size:14,className:"text-zinc-400 dark:text-[#a1a1aa]"})]}),(null==_?void 0:_.user)?(0,a.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-red-500 dark:text-red-400 hover:bg-red-500/10 rounded-lg transition-colors text-left profile-menu-item-logout",onClick:()=>(0,E.w7)(),children:[(0,a.jsx)(g,{size:16}),(0,a.jsx)("span",{children:"로그아웃"})]}):(0,a.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-blue-500 dark:text-blue-400 hover:bg-blue-500/10 rounded-lg transition-colors text-left profile-menu-item-login",onClick:()=>{ec(!0),eo(!1)},children:[(0,a.jsx)(x.Z,{size:16}),(0,a.jsx)("span",{children:"로그인"})]})]})]}),eb&&(0,a.jsxs)("div",{className:(0,T.cn)("absolute bottom-[calc(100%+3.2rem)] left-[14.5rem] w-48 bg-[#fafaf9] dark:bg-[#18181b] border border-zinc-200 dark:border-[#27272a] rounded-xl shadow-xl overflow-hidden z-[60] flex flex-col p-1 animate-in fade-in slide-in-from-left-2 duration-200",G&&"left-[17.5rem]"),onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("a",{href:"/legal",target:"_blank",rel:"noopener noreferrer",className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5 rounded-lg transition-colors text-left",onClick:()=>{eo(!1),ev(!1)},children:[(0,a.jsx)(w,{size:16}),(0,a.jsx)("span",{children:"이용약관 및 정책"})]}),(0,a.jsxs)("a",{href:"https://edzip.kr/product-detail/69c4bed034e49888c77d25d7",target:"_blank",rel:"noopener noreferrer",className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5 rounded-lg transition-colors text-left",onClick:()=>{eo(!1),ev(!1)},children:[(0,a.jsx)(j,{size:16}),(0,a.jsx)("span",{children:"에듀집 등록 확인"})]}),(0,a.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5 rounded-lg transition-colors text-left",onClick:()=>{ex(!0),eo(!1),ev(!1)},children:[(0,a.jsx)(k,{size:16}),(0,a.jsx)("span",{children:"버그 신고"})]}),(0,a.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5 rounded-lg transition-colors text-left",onClick:()=>{em(!0),eo(!1),ev(!1)},children:[(0,a.jsx)(y,{size:16}),(0,a.jsx)("span",{children:"문의하기"})]}),(0,a.jsxs)("a",{href:"https://www.instagram.com/naemo.ai/",target:"_blank",rel:"noopener noreferrer",className:"w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 dark:text-[#E0E0E0] hover:bg-zinc-200/60 dark:hover:bg-white/5 rounded-lg transition-colors text-left",onClick:()=>{eo(!1),ev(!1)},children:[(0,a.jsx)(h.Z,{size:16}),(0,a.jsx)("span",{children:"소식 안내"})]})]})]}),(0,a.jsxs)("div",{onClick:()=>{(null==_?void 0:_.user)?eo(!el):ec(!0)},onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),(null==_?void 0:_.user)?eo(!el):ec(!0))},role:"button",tabIndex:0,"aria-label":(null==_?void 0:_.user)?"프로필 메뉴":"로그인","aria-haspopup":(null==_?void 0:_.user)?"menu":void 0,"aria-expanded":(null==_?void 0:_.user)?el:void 0,className:(0,T.cn)("group/profile relative transition-all cursor-pointer hover:bg-[#3f3f46] sidebar-profile-hover mb-1 mx-1 rounded-md",G?"p-3 flex justify-center":"p-3"),children:[(0,a.jsxs)("div",{className:(0,T.cn)("flex items-center",G?"justify-center":"gap-3 px-1"),children:[(null==_?void 0:null===(l=_.user)||void 0===l?void 0:l.image)?(0,a.jsx)(ea.default,{src:_.user.image,alt:"Profile",width:32,height:32,className:"rounded-full"}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-[#27272a] border border-[#e0e0e0] dark:border-[#3f3f46] flex items-center justify-center text-xs font-medium text-white shrink-0",children:(null==_?void 0:null===(N=_.user)||void 0===N?void 0:null===(z=N.name)||void 0===z?void 0:z[0])||"G"}),!G&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-white truncate",children:(null==_?void 0:null===(C=_.user)||void 0===C?void 0:C.name)||"Guest"}),(0,a.jsx)("p",{className:"text-xs text-[#71717a] truncate",children:(null==_?void 0:null===(S=_.user)||void 0===S?void 0:S.schoolName)||ej||"학교 미설정"})]}),(0,a.jsx)(m.Z,{size:16,className:"ml-auto text-[#71717a] -mr-1"})]})]}),G&&(0,a.jsxs)("div",{className:"absolute left-full ml-2 px-3 py-1.5 bg-[#18181b] border border-white/10 rounded-lg shadow-xl opacity-0 group-hover/profile:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity duration-150 flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-[12px] font-medium text-white leading-tight",children:(null==_?void 0:null===(D=_.user)||void 0===D?void 0:D.name)||"Guest"}),(0,a.jsx)("span",{className:"text-[10px] text-[#a1a1aa] leading-tight",children:(null==_?void 0:null===(L=_.user)||void 0===L?void 0:L.schoolName)||ej||"학교 미설정"})]})]})]})]}),(0,a.jsx)(M,{isOpen:ed,onClose:()=>ec(!1)}),(0,a.jsx)(O,{isOpen:eu,onClose:()=>ex(!1),userEmail:(null==_?void 0:null===(A=_.user)||void 0===A?void 0:A.email)||void 0,userName:(null==_?void 0:null===(I=_.user)||void 0===I?void 0:I.name)||void 0,onShowHistory:(null==_?void 0:null===(R=_.user)||void 0===R?void 0:R.id)?()=>{ex(!1),ep(!0)}:void 0}),(0,a.jsx)(P,{isOpen:eh,onClose:()=>em(!1),userEmail:(null==_?void 0:null===(Z=_.user)||void 0===Z?void 0:Z.email)||void 0,userName:(null==_?void 0:null===(B=_.user)||void 0===B?void 0:B.name)||void 0,onShowHistory:(null==_?void 0:null===(F=_.user)||void 0===F?void 0:F.id)?()=>{em(!1),ep(!0)}:void 0}),(0,a.jsx)(X,{isOpen:ef,onClose:()=>ep(!1)})]})}var el=n(46977),eo=n(98728),ed=n(85929),ec=n(97226),eu=n(79862),ex=n(73247),eh=n(65621),em=n(54080),ef=n(98381);function ep(e){return e.metaKey||e.ctrlKey}function eb(e,t){return e.map(e=>{switch(e){case"mod":return t?"⌘":"Ctrl";case"shift":return t?"⇧":"Shift";case"alt":return t?"⌥":"Alt";case"enter":return t?"↵":"Enter";case"esc":return"Esc";case"up":return"↑";case"down":return"↓";default:return 1===e.length?e.toUpperCase():e}})}let ev=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],eg={ㄲ:"ㄱ",ㄸ:"ㄷ",ㅃ:"ㅂ",ㅆ:"ㅅ",ㅉ:"ㅈ"};function ew(e){let t="";for(let r of e){var n,a,i;let e=null!==(n=r.codePointAt(0))&&void 0!==n?n:0;if(e>=44032&&e<=55203){let n=ev[Math.floor((e-44032)/588)];t+=null!==(a=eg[n])&&void 0!==a?a:n}else t+=null!==(i=eg[r])&&void 0!==i?i:r}return t}function ej(e){return e.length>0&&/^[ㄱ-ㅎ]+$/.test(e)}function ek(e,t){if(!e)return!0;let n=0;for(let a=0;a<t.length&&n<e.length;a++)t[a]===e[n]&&n++;return n===e.length}var ey=n(73369);let ez={dashboard:["dashboard","home","홈","메인","요약"],survey:["survey","설문","조사","앙케트"],"work-notes":["worknote","notes","memo","메모","노트","업무일지"],"work-schedule":["schedule","todo","calendar","일정","할일","캘린더","달력","스케줄"],"student-management":["student","students","학생","명단","로스터","roster"],"evaluation-record":["evaluation","세특","수행","평가","생기부","교과세특"],"behavior-record":["behavior","행발","행동특성","행동","종합의견"],attendance:["attendance","출석","출결","결석","지각"],activity:["activity","자율","진로","창체","동아리","활동"],seating:["seating","seat","자리","자리배치","좌석","배치"],nametag:["nametag","이름표","명찰","네임택"],cleaning:["cleaning","청소","청소구역","당번","분담"],"random-picker":["random","picker","뽑기","랜덤","추첨","제비뽑기"],"attendance-print":["print","출력","인쇄","출결출력"]},eN=e=>e.toLowerCase().replace(/\s+/g,""),eE="naemo:command-recents";function eC(){try{let e=localStorage.getItem(eE),t=e?JSON.parse(e):[];return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch(e){return[]}}function eS(e){let{onNavigate:t}
1=e,[n,i]=(0,s.useState)(!1),[r,l]=(0,s.useState)(""),[o,d]=(0,s.useState)(0),[c,u]=(0,s.useState)(!0),[x,h]=(0,s.useState)([]),m=(0,s.useRef)(null),f=(0,s.useRef)(null),{theme:p,toggleTheme:b}=(0,ef.F)(),{openSettings:v}=(0,q.Y)(),{config:g}=(0,et.Nv)(),{students:w}=(0,J.AF)(),j=(0,s.useCallback)(()=>{i(!1),l(""),d(0)},[]),k=(0,s.useCallback)(()=>{h(eC()),l(""),d(0),i(!0)},[]),y=(0,s.useRef)(n),z=(0,s.useRef)(v);(0,s.useEffect)(()=>{y.current=n,z.current=v}),(0,s.useEffect)(()=>{u(function(){if("undefined"==typeof navigator)return!1;let e=navigator.userAgentData;if(null==e?void 0:e.platform)return/mac/i.test(e.platform);let t=navigator.platform||"",n=navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)||/Mac OS X/i.test(n)}())},[]);let E=(0,s.useMemo)(()=>{let e=[...g.topLevelOrder,...g.recordToolsOrder,...g.classToolsOrder],t=new Set(e);return[...e,...et.cf.map(e=>e.id).filter(e=>!t.has(e))].filter(e=>et.cf.some(t=>t.id===e))},[g]),C=(0,s.useMemo)(()=>[...E.map(e=>{var n;return{id:"nav:".concat(e),label:(0,et.Kg)(e),group:"nav",icon:(0,et.m3)(e),keywords:null!==(n=ez[e])&&void 0!==n?n:[],run:()=>t(e)}}),{id:"action:settings",label:"설정 열기",group:"action",icon:eo.Z,keywords:["settings","설정","환경설정","preferences","config"],shortcut:["mod",","],run:()=>v()},{id:"action:theme",label:"dark"===p?"라이트 모드로 전환":"다크 모드로 전환",group:"action",icon:"dark"===p?ed.Z:ec.Z,keywords:["theme","dark","light","테마","다크","라이트","야간","모드","화면"],run:()=>b()}],[E,t,v,b,p]),S=(0,s.useMemo)(()=>[...w].sort(ey.Xs).map(e=>({id:"student:".concat(e.id),label:e.name,meta:[e.grade?"".concat(e.grade,"학년"):"",e.classNum?"".concat(e.classNum,"반"):"",e.number?"".concat(e.number,"번"):""].filter(Boolean).join(" "),group:"student",icon:eu.Z,keywords:[],run:()=>window.dispatchEvent(new CustomEvent("navigate-to-student",{detail:{studentId:e.id}}))})),[w]),D=(0,s.useMemo)(()=>{let e=new Map;for(let t of C)e.set(t.id,t);
1for(let t of S)e.set(t.id,t);return e},[C,S]),L=(0,s.useMemo)(()=>{if(!r.trim())return[...x.slice(0,3).map(e=>D.get(e)).filter(e=>!!e).map(e=>({cmd:e,section:"recent"})),...C.map(e=>({cmd:e,section:e.group}))];let e=C.map(e=>({cmd:e,score:function(e,t){let n=eN(t);if(!n)return 1;let a=eN(e.label),i=[a,...e.keywords.map(eN)];if(i.some(e=>e===n))return 100;if(a.startsWith(n))return 92;if(i.some(e=>e.startsWith(n)))return 84;if(a.includes(n))return 74;if(i.some(e=>e.includes(n)))return 64;let r=ew(a);if(ej(n)){let e=ew(n);if(r.startsWith(e))return 58;if(r.includes(e))return 52}return ek(n,a)?36:i.some(e=>ek(n,e))?30:0}(e,r)})).filter(e=>e.score>0),t=e.filter(e=>"nav"===e.cmd.group),n=e.filter(e=>"action"===e.cmd.group),a=S.map(e=>({cmd:e,score:function(e,t){let n=eN(t);if(!n)return 0;let a=eN(e);if(a===n)return 100;if(a.startsWith(n))return 92;if(a.includes(n))return 74;if(ej(n)){let e=ew(a),t=ew(n);if(e.startsWith(t))return 58;if(e.includes(t))return 52}return 0}(e.label,r)})).filter(e=>e.score>0).sort((e,t)=>t.score-e.score).slice(0,8),i=e=>e.reduce((e,t)=>Math.max(e,t.score),0);return(i(a)>i(t)?[...a,...t,...n]:[...t,...a,...n]).map(e=>{let{cmd:t}=e;return{cmd:t,section:t.group}})},[r,C,S,D,x]),M=L.map(e=>e.cmd);(0,s.useEffect)(()=>{d(e=>Math.min(e,Math.max(0,M.length-1)))},[M.length]),(0,s.useEffect)(()=>{let e=e=>{if(ep(e)&&("k"===e.key||"K"===e.key)){e.preventDefault(),y.current?j():k();return}if(ep(e)&&!e.shiftKey&&!e.altKey&&","===e.key){e.preventDefault(),y.current&&j(),z.current();return}let t=e.target instanceof HTMLElement&&e.target.closest('[role="dialog"],[aria-modal="true"]');y.current||"/"!==e.key||ep(e)||e.altKey||function(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||!!e.isContentEditable}(e.target)||t||(e.preventDefault(),k())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[k,j]),(0,s.useEffect)(()=>{let e=()=>k();return window.addEventListener("open-command-palette",e),()=>window.removeEventListener("open-command-palette",e)},[k]),(0,s.useEffect)(()=>{var e;if(!n)return;null===(e=m.current)||void 0===e||e.focus();let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[n]),(0,s.useEffect)(()=>{var e;if(!n)return;let t=null===(e=f.current)||void 0===e?void 0:e.querySelector('[data-selected="true"]');null==t||t.scrollIntoView({block:"nearest"})},[o,n,r]);let A=(0,s.useCallback)(e=>{e&&(!function(e){try{let t=[e,...eC().filter(t=>t!==e)].slice(0,3);localStorage.setItem(eE,JSON.stringify(t))}catch(e){}}(e.id),j(),setTimeout(()=>e.run(),0))},[j]),I=(0,el.a)(n,j);if(!n)return null;let R=eb(["mod","k"],c),Z={recent:"최근 사용",nav:"이동",student:"학생",action:"액션"},B="";return(0,a.jsxs)("div",{className:"modal-viewport keyboard-shrink-top z-[200] flex items-start justify-center px-4 pt-[14vh]",ref:I,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"빠른 실행",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/40 dark:bg-black/60 backdrop-blur-sm",onClick:j}),(0,a.jsxs)("div",{className:"relative w-full max-w-lg bg-white dark:bg-[#18181b] border border-zinc-200 dark:border-[#27272a] rounded-xl overflow-hidden shadow-lg animate-in fade-in zoom-in-95 duration-150",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 px-3.5 py-3 border-b border-zinc-200 dark:border-[#27272a]",children:[(0,a.jsx)(ex.Z,{size:16,className:"shrink-0 text-zinc-400 dark:text-[#71717a]"}),(0,a.jsx)("input",{ref:m,type:"text",value:r,onChange:e=>{l(e.target.value),d(0)},onKeyDown:e=>{e.nativeEvent.isComposing||("ArrowDown"===e.key?(e.preventDefault(),d(e=>Math.min(e+1,M.length-1))):"ArrowUp"===e.key?(e.preventDefault(),d(e=>Math.max(e-1,0))):"Home"===e.key?(e.preventDefault(),d(0)):"End"===e.key?(e.preventDefault(),d(M.length-1)):"Enter"===e.key&&(e.preventDefault(),A(M[o])))},placeholder:"화면, 명령, 학생 이름을 검색하세요",className:"flex-1 min-w-0 bg-transparent text-zinc-900 dark:text-white placeholder:text-zinc-400 dark:placeholder:text-[#52525b] focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 text-sm","aria-label":"명령어 검색",autoComplete:"off",spellCheck:!1}),(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-0.5 shrink-0",children:R.map(e=>(0,a.jsx)("kbd",{className:"px-1.5 py-0.5 rounded bg-zinc-100 dark:bg-[#27272a] text-[10px] font-medium text-zinc-400 dark:text-[#71717a]",children:e},e))}),(0,a.jsx)("button",{"aria-label":"닫기",onClick:j,className:"shrink-0 p-1 rounded-md text-zinc-400 hover:text-zinc-600 dark:text-[#71717a] dark:hover:text-white hover:bg-zinc-100 dark:hover:bg-[#27272a] transition-colors",children:(0,a.jsx)(N.Z,{size:15})})]}),(0,a.jsx)("div",{ref:f,className:"max-h-[52vh] overflow-y-auto custom-scrollbar py-1.5",children:0===M.length?(0,a.jsxs)("div",{className:"px-4 py-9 text-center text-[13px] text-zinc-400 dark:text-[#52525b]",children:["‘",r,"’ 에 대한 결과가 없습니다"]}):L.map((e,t)=>{let{cmd:n,section:i}=e,s=i!==B;B=i;let l=t===o,u=n.icon;return(0,a.jsxs)("div",{children:[s&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-3.5 pt-2.5 pb-1 text-[11px] font-medium text-zinc-400 dark:text-[#52525b]",children:["recent"===i&&(0,a.jsx)(eh.Z,{size:11}),Z[i]]}),(0,a.jsxs)("button",{"data-selected":l,onClick:()=>A(n),onMouseEnter:()=>d(t),className:(0,T.cn)("w-full flex items-center gap-2.5 px-3.5 py-2 text-left transition-colors",l?"bg-zinc-100 dark:bg-[#27272a] text-zinc-900 dark:text-white":"text-zinc-600 dark:text-[#a1a1aa]"),children:[(0,a.jsx)(u,{size:16,strokeWidth:1.5,className:l?"text-zinc-900 dark:text-white":"text-zinc-400 dark:text-[#71717a]"}),(0,a.jsx)("span",{className:"flex-1 min-w-0 truncate text-[13px]",children:function(e,t){let n=t.trim();if(!n)return e;let i=e.toLowerCase().indexOf(n.toLowerCase());return -1===i?e:(0,a.jsxs)(a.Fragment,{children:[e.slice(0,i),(0,a.jsx)("span",{className:"font-semibold text-zinc-900 dark:text-white",children:e.slice(i,i+n.length)}),e.slice(i+n.length)]})}(n.label,r)}),n.meta&&(0,a.jsx)("span",{className:"shrink-0 text-[12px] tabular-nums text-zinc-400 dark:text-[#71717a]",children:n.meta}),n.shortcut&&(0,a.jsx)("span",{className:"flex items-center gap-0.5",children:eb(n.shortcut,c).map((e,t)=>(0,a.jsx)("kbd",{className:"px-1 py-0.5 rounded bg-zinc-200/70 dark:bg-[#3f3f46] text-[10px] font-medium text-zinc-500 dark:text-[#a1a1aa]",children:e},t))}),l&&(0,a.jsx)(em.Z,{size:13,className:"text-zinc-400 dark:text-[#71717a]"})]})]},"".concat(i,":").concat(n.id))})}),(0,a.jsxs)("div",{className:"flex items-center gap-3.5 px-3.5 py-2 border-t border-zinc-200 dark:border-[#27272a] text-[11px] text-zinc-400 dark:text-[#52525b]",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("kbd",{className:"px-1 py-0.5 rounded bg-zinc-100 dark:bg-[#27272a]",children:"↑↓"})," 이동"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("kbd",{className:"px-1 py-0.5 rounded bg-zinc-100 dark:bg-[#27272a]",children:"↵"})," 실행"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("kbd",{className:"px-1 py-0.5 rounded bg-zinc-100 dark:bg-[#27272a]",children:"Esc"})," 닫기"]})]})]})]})}var eD=n(98319),eL=n(76865),eM=n(41681),eA=n(96720);class eI extends s.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e,silentReloading:!1}}componentDidCatch(e,t){var n;try{if((0,eA.Hu)(e,sessionStorage,()=>window.location.reload())){this.setState({silentReloading:!0});return}}catch(e){}console.error("ErrorBoundary caught an error:",e,t),(0,eM.F)(e,{boundary:this.props.fallbackMessage||"ErrorBoundary",componentStack:null!==(n=t.componentStack)&&void 0!==n?n:void 0})}get isChunkError(){return!!this.state.error&&(0,eA.lP)(this.state.error)}
1render(){if(this.state.silentReloading)return null;if(this.state.hasError){var e;let t=this.isChunkError;return(0,a.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-center px-6 bg-white dark:bg-[#09090b]",children:[(0,a.jsx)(eL.Z,{size:20,className:"text-zinc-400 dark:text-zinc-500 mb-3"}),(0,a.jsx)("h2",{className:"text-[17px] font-semibold text-zinc-900 dark:text-white",children:t?"화면을 불러오지 못했습니다":this.props.fallbackMessage||"오류가 발생했습니다"}),(0,a.jsx)("p",{className:"mt-1.5 text-[13px] leading-relaxed text-zinc-500 dark:text-zinc-400 max-w-[280px]",children:t?"다시 열면 이어서 사용할 수 있습니다.":(null===(e=this.state.error)||void 0===e?void 0:e.message)||"예기치 않은 오류가 발생했습니다. 다시 시도해 주세요."}),(0,a.jsx)("button",{onClick:this.handleReset,className:"mt-5 px-4 py-2 rounded-lg text-[13px] font-medium bg-zinc-900 text-white dark:bg-white dark:text-black hover:opacity-90 active:scale-[0.98] transition-[opacity,transform] duration-150",children:t?"다시 열기":"다시 시도"})]})}return this.props.children}constructor(...e){super(...e),this.state={hasError:!1,error:null,silentReloading:!1},this.handleReset=()=>{this.isChunkError?window.location.reload():this.setState({hasError:!1,error:null})}}}var eT=n(54292),eR=n(34687),eZ=n(30419),eB=n(52570),eO=n(30401),eF=n(84929);function eP(){let{isQuotaModalOpen:e,quotaInfo:t,closeQuotaModal:n}=(0,eF.f)(),[i,r]=(0,s.useState)(!1),l=(0,ee.g)();if((0,S.j)(n,e),(0,s.useEffect)(()=>(r(!0),()=>r(!1)),[]),!e||!i||!t)return null;let o=parseFloat((Math.max(t.currentUsage,t.limit)/1048576).toFixed(1)),d=(t.limit/1048576).toFixed(0);return(0,z.createPortal)((0,a.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onClick:e=>{e.target===e.currentTarget&&n()},children:(0,a.jsxs)("div",{className:"relative w-full max-w-[400px] bg-white dark:bg-[#0D0D0D] border border-zinc-200 dark:border-white/10 rounded-xl overflow-hidden animate-in fade-in zoom-in-95 duration-150 flex flex-col p-6",children:[(0,a.jsx)("button",{"aria-label":"닫기",onClick:n,className:"absolute top-4 right-4 p-1 text-zinc-400 hover:text-zinc-600 dark:hover:text-white transition-colors",children:(0,a.jsx)(N.Z,{size:18})}),(0,a.jsxs)("div",{className:"pt-2 pb-6 text-center",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-zinc-900 dark:text-white mb-2",children:"저장 용량이 가득 찼어요"}),(0,a.jsxs)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 mb-6 leading-relaxed",children:["무료 계정의 저장 공간(",d,"MB)을 모두 사용했습니다."]}),(0,a.jsxs)("div",{className:"bg-zinc-50 dark:bg-white/5 rounded-lg p-4 border border-zinc-100 dark:border-white/5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"사용량"}),(0,a.jsxs)("span",{className:"text-xs font-semibold text-zinc-900 dark:text-white",children:[o,"MB / ",d,"MB"]})]}),(0,a.jsx)("div",{className:"w-full h-2 bg-zinc-200 dark:bg-zinc-700/50 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-zinc-900 dark:bg-white rounded-full transition-all duration-500 ease-out",style:{width:"".concat(100,"%")}})})]})]}),(0,a.jsxs)("div",{className:"space-y-3 mb-8",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400 px-1",children:"프로 플랜 혜택"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-1",children:[(0,a.jsx)("div",{className:"w-5 h-5 rounded-full bg-zinc-100 dark:bg-white/10 flex items-center justify-center shrink-0 mt-0.5",children:(0,a.jsx)(eO.Z,{size:12,className:"text-zinc-900 dark:text-white",strokeWidth:3})}),(0,a.jsx)("span",{className:"text-sm text-zinc-600 dark:text-zinc-300",children:"용량 제한 없는 파일 업로드"})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3 p-1",children:[(0,a.jsx)("div",{className:"w-5 h-5 rounded-full bg-zinc-100 dark:bg-white/10 flex items-center justify-center shrink-0 mt-0.5",children:(0,a.jsx)(eO.Z,{size:12,className:"text-zinc-900 dark:text-white",strokeWidth:3})}),(0,a.jsx)("span",{className:"text-sm text-zinc-600 dark:text-zinc-300",children:"우리 학급을 한눈에 관리"})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3 p-1",children:[(0,a.jsx)("div",{className:"w-5 h-5 rounded-full bg-zinc-100 dark:bg-white/10 flex items-center justify-center shrink-0 mt-0.5",children:(0,a.jsx)(eO.Z,{size:12,className:"text-zinc-900 dark:text-white",strokeWidth:3})}),(0,a.jsx)("span",{className:"text-sm text-zinc-600 dark:text-zinc-300",children:"학기별 성적 추이 및 교과별 분석"})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3 p-1",children:[(0,a.jsx)("div",{className:"w-5 h-5 rounded-full bg-zinc-100 dark:bg-white/10 flex items-center justify-center shrink-0 mt-0.5",children:(0,a.jsx)(eO.Z,{size:12,className:"text-zinc-900 dark:text-white",strokeWidth:3})}),(0,a.jsx)("span",{className:"text-sm text-zinc-600 dark:text-zinc-300",children:"학생별 생활기록부 AI 분석"})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3 p-1",children:[(0,a.jsx)("div",{className:"w-5 h-5 rounded-full bg-zinc-100 dark:bg-white/10 flex items-center justify-center shrink-0 mt-0.5",children:(0,a.jsx)(eO.Z,{size:12,className:"text-zinc-900 dark:text-white",strokeWidth:3})}),(0,a.jsx)("span",{className:"text-sm text-zinc-600 dark:text-zinc-300",children:"상담에 필요한 시각적 자료 제공"})]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[!l&&(0,a.jsx)("button",{type:"button",onClick:()=>{window.dispatchEvent(new CustomEvent("navigate-view",{detail:"plans"})),n()},className:"w-full h-12 bg-zinc-900 hover:bg-zinc-800 dark:bg-zinc-100 dark:hover:bg-zinc-200 text-white dark:text-zinc-900 text-sm font-semibold rounded-lg cursor-pointer transition flex items-center justify-center gap-2 shadow-sm focus-visible:ring-2 focus-visible:ring-blue-500",children:"요금제 확인하기"}),(0,a.jsx)("button",{onClick:n,className:"w-full h-10 text-sm font-medium text-zinc-500 hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-200 transition-colors",children:l?"확인":"나중에 하기"})]})]})}),document.body)}var eV=n(91723),eU=n(77265),eW=n(46221),e_=n(64972),eG=n(55900);function eH(e){let{daysLeft:t,expiryDate:n,onExtend:i,onClose:r}
1=e,[l,o]=(0,s.useState)(!1);if((0,s.useEffect)(()=>(o(!0),()=>o(!1)),[]),(0,S.j)(r),!l)return null;let d=new Date(n).toLocaleDateString("ko-KR",{year:"numeric",month:"long",day:"numeric"});return(0,z.createPortal)((0,a.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onClick:e=>{e.target===e.currentTarget&&r()},children:(0,a.jsxs)("div",{className:"relative w-full max-w-[400px] bg-white dark:bg-[#0D0D0D] border border-zinc-200 dark:border-white/10 rounded-xl overflow-hidden animate-in fade-in zoom-in-95 duration-150 flex flex-col p-6",children:[(0,a.jsx)("button",{"aria-label":"닫기",onClick:r,className:"absolute top-4 right-4 p-1 text-zinc-400 hover:text-zinc-600 dark:hover:text-white transition-colors",children:(0,a.jsx)(N.Z,{size:18})}),(0,a.jsxs)("div",{className:"pt-2 pb-6 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-zinc-100 dark:bg-white/10 rounded-full flex items-center justify-center mx-auto mb-4",children:(0,a.jsx)(eV.Z,{size:24,className:"text-zinc-500 dark:text-zinc-400"})}),(0,a.jsx)("h2",{className:"text-xl font-bold text-zinc-900 dark:text-white mb-2",children:0===t?"이용 기간이 오늘까지입니다":"이용 기간이 ".concat(t,"일 남았습니다")}),(0,a.jsxs)("p",{className:"text-sm text-zinc-500 leading-relaxed",children:["프로 플랜이 ",(0,a.jsx)("span",{className:"font-semibold text-zinc-700 dark:text-zinc-300",children:d}),"에 만료됩니다."]})]}),(0,a.jsxs)("div",{className:"space-y-3 mb-8",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400 px-1",children:"프로 플랜 혜택"}),(0,a.jsx)("div",{className:"space-y-2",children:[{icon:A.Z,label:"기본 요금제의 모든 기능 이용"},{icon:eU.Z,label:"파일 업로드 무제한"},{icon:eW.Z,label:"학생 성적 관리 (내신, 모의고사)"},{icon:e_.Z,label:"생활기록부 AI 요약"},{icon:eG.Z,label:"대학 추천 기능"},{icon:u.Z,label:"교무실, 학교 단위로 이용 가능"}].map(e=>{let{icon:t,label:n}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-1",children:[(0,a.jsx)(t,{size:18,className:"text-zinc-400 dark:text-zinc-500 shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-zinc-600 dark:text-zinc-300",children:n})]},n)})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{role:"button",onClick:()=>{i(),r()},className:"w-full h-12 bg-zinc-900 dark:bg-zinc-100 !text-white dark:!text-zinc-900 text-sm font-semibold rounded-lg cursor-pointer transition flex items-center justify-center gap-2 shadow-sm select-none",onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#3f3f46"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=""},children:"기간 연장하기"}),(0,a.jsx)("button",{onClick:r,className:"w-full h-10 text-sm font-medium text-zinc-500 hover:text-zinc-800 dark:text-zinc-400 dark:hover:text-zinc-200 transition-colors",children:"나중에 하기"})]})]})}),document.body)}var eK=n(92451);let eX=[],eq="saemo_dismissed_announcements";function eJ(){try{var e;return JSON.parse(null!==(e=localStorage.getItem(eq))&&void 0!==e?e:"[]")}catch(e){return[]}}function e$(e){let t=eJ();t.includes(e)||localStorage.setItem(eq,JSON.stringify([...t,e]))}let eY={"neis-attendance-auto-v1":{title:"NEIS 출결 자동입력",description:"",ctaLabel:"출결 관리 바로가기",images:[{src:"/images/announcement-neis-attendance-1.jpg",alt:"NEIS 출결 자동입력"},{src:"/images/announcement-neis-attendance-2.jpg",alt:"NEIS 출결 자동입력"},{src:"/images/announcement-neis-attendance-3.jpg",alt:"NEIS 출결 자동입력"}]}};function eQ(e){let{announcementId:t,onClose:n,onNavigate:i}=e,[r,l]=(0,s.useState)(!1),[o,d]=(0,s.useState)(0),u=(0,s.useRef)(null),x=eY[t];if((0,S.j)(n),(0,s.useEffect)(()=>(l(!0),()=>l(!1)),[]),!r||!x)return null;let{images:h}=x,m=h.length,f=m>1,p=()=>d(e=>Math.max(0,e-1)),b=()=>d(e=>Math.min(m-1,e+1)),v=()=>{n()};return(0,z.createPortal)((0,a.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onClick:e=>{e.target===e.currentTarget&&v()},children:(0,a.jsxs)("div",{className:"w-full max-w-[400px] bg-white dark:bg-[#0D0D0D] border border-zinc-200 dark:border-white/10 rounded-xl overflow-hidden animate-in fade-in zoom-in-95 duration-150 flex flex-col",children:[(0,a.jsx)("div",{className:"px-5 pt-5 pb-3",children:(0,a.jsx)("p",{className:"text-base font-semibold text-zinc-700 dark:text-zinc-300",children:"내모 업데이트 안내"})}),(0,a.jsxs)("div",{className:"relative w-full aspect-[1080/1154] overflow-hidden bg-zinc-50 dark:bg-zinc-900 select-none",onTouchStart:e=>{u.current=e.touches[0].clientX},onTouchEnd:e=>{if(null===u.current)return;let t=u.current-e.changedTouches[0].clientX;t>40?b():t<-40&&p(),u.current=null},children:[(0,a.jsx)(ea.default,{src:h[o].src,alt:h[o].alt,fill:!0,sizes:"400px",className:"object-cover animate-in fade-in duration-200",priority:0===o},o),f&&o>0&&(0,a.jsx)("div",{role:"button",onClick:p,className:"absolute left-3 top-1/2 -translate-y-1/2 w-8 h-8 bg-black/10 hover:bg-black/20 rounded-full flex items-center justify-center cursor-pointer transition-colors",children:(0,a.jsx)(eK.Z,{size:16,className:"text-white/70",strokeWidth:2.5})}),f&&o<m-1&&(0,a.jsx)("div",{role:"button",onClick:b,className:"absolute right-3 top-1/2 -translate-y-1/2 w-8 h-8 bg-black/10 hover:bg-black/20 rounded-full flex items-center justify-center cursor-pointer transition-colors",children:(0,a.jsx)(c.Z,{size:16,className:"text-white/70",strokeWidth:2.5})})]}),f&&(0,a.jsxs)("div",{className:"relative flex items-center justify-center gap-1.5 pt-2.5 pb-0.5 px-5",children:[h.map((e,t)=>(0,a.jsx)("div",{role:"button",onClick:()=>d(t),className:"rounded-full cursor-pointer transition duration-200 ".concat(t===o?"w-2 h-2 bg-blue-700 dark:bg-blue-400":"w-1.5 h-1.5 bg-zinc-300 dark:bg-zinc-600")},t)),(0,a.jsxs)("span",{className:"absolute right-5 text-xs font-medium text-zinc-400 dark:text-zinc-500 pointer-events-none",children:[o+1,"/",m]})]}),(0,a.jsxs)("div",{className:"px-5 pt-4 pb-5",children:[x.description&&(0,a.jsx)("p",{className:"text-sm text-zinc-500 dark:text-zinc-400 leading-relaxed whitespace-pre-line",children:x.description}),(0,a.jsxs)("div",{className:"mt-5 flex flex-col items-center gap-3",children:[(0,a.jsx)("button",{onClick:()=>{e$(t),null==i||i(),n()},className:"announcement-cta-btn w-full h-10 text-sm font-medium rounded-lg transition-colors dark:bg-zinc-100 dark:!text-zinc-900 dark:hover:bg-zinc-200",children:x.ctaLabel}),(0,a.jsx)("button",{type:"button",onClick:()=>{e$(t),n()},className:"text-sm text-zinc-400 dark:text-zinc-500 py-2 px-4 roun
1ded-lg active:bg-zinc-100 dark:active:bg-white/5 transition-colors",children:"다시 보지 않기"})]})]})]})}),document.body)}let e0="naemo_dismissed_ops_notices";function e2(){try{let e=localStorage.getItem(e0),t=e?JSON.parse(e):[];return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch(e){return[]}}function e1(e){let{isAuthenticated:t}=e,[n,i]=(0,s.useState)(null);return((0,s.useEffect)(()=>{let e=!1;return fetch("/api/notices").then(e=>e.ok?e.json():null).then(n=>{var a;if(e||!n)return;let r=e2(),s=null===(a=n.notices)||void 0===a?void 0:a.find(e=>!r.includes(e.id)&&("authenticated"!==e.target||!!t));i(null!=s?s:null)}).catch(()=>{}),()=>{e=!0}},[t]),n)?(0,a.jsxs)("div",{role:"status",className:"shrink-0 border-b border-emerald-700/30 bg-emerald-50 dark:border-emerald-800/40 dark:bg-emerald-950/40 px-4 py-2.5 flex items-start gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-[13px] font-medium text-emerald-900 dark:text-emerald-100",children:n.title}),(0,a.jsx)("p",{className:"mt-0.5 text-[12px] text-emerald-800/80 dark:text-emerald-100/80 whitespace-pre-wrap",children:n.body})]}),(0,a.jsx)("button",{type:"button",onClick:()=>{!function(e){try{localStorage.setItem(e0,JSON.stringify(e.slice(-50)))}catch(e){}}([...e2(),n.id]),i(null)},"aria-label":"공지 닫기",className:"shrink-0 p-1 text-emerald-700/70 hover:text-emerald-900 dark:text-emerald-300/70 dark:hover:text-emerald-100",children:(0,a.jsx)(N.Z,{size:14})})]}):null}var e5=n(89345);function e7(e){let{replies:t,onClose:n}
1=e,[i,r]=(0,s.useState)(!1),[l,o]=(0,s.useState)(0),[d,c]=(0,s.useState)(!1);if((0,s.useEffect)(()=>(r(!0),()=>r(!1)),[]),!i||0===t.length||l>=t.length)return null;let u=t[l],x="bug"===u.type,h=l===t.length-1,m=(()=>{try{return new Date(u.repliedAt).toLocaleString("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}catch(e){return""}})(),f=async()=>{c(!0);try{await G(u.id)}finally{c(!1),h?n():o(e=>e+1)}};return(0,z.createPortal)((0,a.jsx)("div",{className:"modal-viewport z-[100] flex items-center justify-center bg-black/40 dark:bg-black/60 backdrop-blur-sm p-4",children:(0,a.jsxs)("div",{className:"relative w-full max-w-[520px] bg-white dark:bg-[#1a1a1a] rounded-2xl shadow-2xl border border-zinc-200 dark:border-zinc-800 p-5 flex flex-col animate-in fade-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 mb-1",children:[(0,a.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-700/40",children:(0,a.jsx)(e5.Z,{size:18,className:"text-slate-500 dark:text-slate-300"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-zinc-900 dark:text-white",children:"답변이 도착했습니다"}),m&&(0,a.jsx)("p",{className:"text-[11px] text-zinc-400",children:m})]}),t.length>1&&(0,a.jsxs)("span",{className:"ml-auto text-[11px] text-zinc-400",children:[l+1," / ",t.length]})]}),(0,a.jsxs)("div",{className:"mt-4 rounded-lg bg-zinc-50 dark:bg-zinc-900/60 border border-zinc-200 dark:border-zinc-800 p-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5",children:[x?(0,a.jsx)(V.Z,{size:13,className:"text-red-500"}):(0,a.jsx)(U.Z,{size:13,className:"text-blue-500"}),(0,a.jsx)("span",{className:"text-[11px] font-medium text-zinc-500 dark:text-zinc-400",children:x?"내 버그 신고":"내 문의"})]}),(0,a.jsx)("p",{className:"text-xs text-zinc-600 dark:text-zinc-300 whitespace-pre-wrap max-h-24 overflow-y-auto leading-relaxed",children:u.description})]}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-zinc-500 dark:text-zinc-400",children:"답변"}),(0,a.jsx)("div",{className:"mt-1.5 rounded-lg bg-zinc-50 dark:bg-zinc-800/50 border border-zinc-200 dark:border-zinc-700/50 p-3",children:(0,a.jsx)("p",{className:"text-sm text-zinc-800 dark:text-zinc-100 whitespace-pre-wrap max-h-60 overflow-y-auto leading-relaxed",children:u.replyBody})})]}),(0,a.jsx)("div",{className:"flex justify-end mt-5",children:(0,a.jsx)("button",{onClick:f,disabled:d,className:(0,T.cn)("inquiry-confirm-btn","px-5 py-1.5 rounded-full text-sm font-medium transition flex items-center justify-center gap-1.5","disabled:opacity-50 disabled:cursor-not-allowed shadow-sm"),children:d?(0,a.jsx)(I.Z,{size:14,className:"animate-spin"}):(0,a.jsx)("span",{children:h?"확인":"다음"})})})]})}),document.body)}var e3=n(93202),e4=n(48313),e6=n(9244);function e8(e,t,n){return t||"authenticating"===e?e:(null==n?void 0:n.lockOnBackground)?"locked":e}function e9(e){return e?"unlocked":"locked"}var te=n(8679),tt=n(26862);function tn(e){let{children:t,enabled:i=!0,currentView:r=""}=e,{enabled:l,mode:o,hydrated:d}=(0,tt.t)(),c=d&&l,u=!!(i&&c&&"sensitive_menus"===o&&(0,te.Io)(r)),{locked:x,retry:h}=function(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],a=arguments.length>1?arguments[1]:void 0,i=null!==(e=null==a?void 0:a.backgroundGraceMs)&&void 0!==e?e:te.c5,r=(0,e6.cz)()&&t,[l,o]=(0,s.use
1State)("unlocked"),d=(0,s.useRef)(l);d.current=l;let c=(0,s.useRef)(!1),u=(0,s.useRef)(null),x=(0,s.useCallback)(async()=>{if(r&&!c.current){c.current=!0,o("authenticating");try{let{NativeBiometric:e}=await n.e(731).then(n.bind(n,60731)),t=await e.isAvailable({useFallback:!0});if(!t.isAvailable&&!t.deviceIsSecure){o("unlocked");return}await e.verifyIdentity({reason:"학생 개인정보 보호를 위해 본인 확인이 필요합니다",title:"내모 잠금 해제",useFallback:!0,fallbackTitle:"기기 암호 사용"}),o(e9(!0))}catch(e){o(e9(!1))}finally{c.current=!1}}},[r]);return(0,s.useEffect)(()=>{r?x():(o("unlocked"),u.current=null)},[r]),(0,s.useEffect)(()=>{let e;if(!r)return;let t=!1;return(async()=>{let{App:a}=await n.e(663).then(n.bind(n,90663)),r=await a.addListener("appStateChange",e=>{let{isActive:t}=e;if(!t){"authenticating"!==d.current&&(u.current=Date.now()),o(e8(d.current,!1));return}let n=u.current;u.current=null;let a=null==n?0:Date.now()-n;if((0,te.C4)(a,i)&&"unlocked"===d.current){o("locked"),x();return}let r=e8(d.current,!0);o(r),"locked"===r&&x()});t?r.remove():e=r})(),()=>{t=!0,null==e||e.remove()}},[r,x,i]),{locked:r&&"unlocked"!==l,retry:x}}(!!(i&&c&&"app_open"===o)||u);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{inert:x?"":void 0,"aria-hidden":x||void 0,style:{isolation:"isolate"},children:t}),x&&(0,a.jsx)(e4.Z,{children:(0,a.jsxs)("div",{className:"fixed inset-0 flex flex-col items-center justify-center gap-4 bg-[#09090b] px-6 text-center text-white",style:{zIndex:2147483e3},role:"dialog","aria-modal":"true",children:[(0,a.jsx)("p",{className:"text-[15px] font-medium",children:"Face ID로 잠금을 해제해주세요"}),(0,a.jsx)("button",{onClick:h,className:"rounded-full bg-zinc-900 px-5 py-2.5 text-[13px] font-semibold text-white dark:bg-white dark:text-zinc-900",children:"다시 시도"})]})})]})}var ta=n(17829),ti=n(61961),tr=n(21751);function ts(e){let{currentView:t}=e,{subHeaderTitle:n,goBackFromSubHeader:i}=(0,tr.jM)(),r=null!==n,l=r?n:"settings"===t?"설정":(0,et.Kg)(t),o="hub"===t,d=(0,s.useRef)([]);return o?null:(0,a.jsxs)("header",{className:(0,T.cn)("md:hidden fixed top-0 left-0 right-0 z-50","flex items-center gap-3 px-4","bg-[#FBFBF9]/80 dark:bg-[#09090b]/80 border-b border-zinc-200/40 dark:border-zinc-800/40","backdrop-blur-xl backdrop-saturate-150"),style:{top:"var(--vv-offset-top, 0px)",height:"calc(44px + env(safe-area-inset-top, 0px))",paddingTop:"env(safe-area-inset-top, 0px)"},children:[(0,a.jsx)("button",{onClick:()=>{if(r){Q.MU.tap(),i();return}window.dispatchEvent(new CustomEvent("navigate-view",{detail:"hub"}))},className:(0,T.cn)("flex items-center justify-center w-11 h-11 -ml-2 rounded-lg active-spring transition-colors","text-zinc-600 dark:text-zinc-300 active:text-zinc-900 dark:active:text-white active:bg-zinc-200/50 dark:active:bg-white/[0.08]"),"aria-label":r?"뒤로가기":"홈으로",children:(0,a.jsx)(eK.Z,{size:20,strokeWidth:2})}),(0,a.jsx)("h1",{onClick:()=>{let e=Date.now();d.current=[...d.current,e].filter(t=>e-t<3e3),d.current.length>=5&&(d.current=[],window.dispatchEvent(new Event(ti.R)))},className:"flex-1 text-[15px] font-semibold truncate select-none text-zinc-800 dark:text-zinc-100",children:l}),(0,a.jsx)("div",{className:"w-8"})]})}var tl=n(16338),to=n(86267),td=n(67920),tc=n(83008);function tu(){return"undefined"!=typeof document&&"hidden"===document.visibilityState}var tx=n(58819);function th(e,t){return"true"===new URLSearchParams(e).get("payment_success")?t?"hub":"dashboard":null}var tm=n(54696);function tf(e,t){let[n,a]=(0,s.useState)(t),[i,r]=(0,s.useState)(!1);(0,s.useEffect)(()=>{try{let t=window.localStorage.getItem(e);t&&a(JSON.parse(t))}catch(t){console.warn('Error reading localStorage key "'.concat(e,'":'),t)}r(!0)},[e]);let l=(0,s.useCallback)(t=>{try{let i=t instanceof Function?t(n):t;a(i),window.localStorage.setItem(e,JSON.stringify(i))}catch(t){console.warn('Error setting localStorage key "'.concat(e,'":'),t)}},[e,n]);return[n,l]}let tp="--pwa-banner-offset";function tb(){let{data:e}=(0,E.kP)(),{canShow:t,platform:n,install:i,dismiss:r}=function(e){let[t,n]=tf("naemo-pwa-install-dismissed-at",0),[a,i]=tf("naemo-pwa-install-installed",!1),[r,l]=(0,s.use
1State)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(!1),[x,h]=(0,s.useState)(!1),m=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!e)return;l(window.matchMedia("(display-mode: standalone)").matches||!0===window.navigator.standalone),d((0,L.ei)(window.navigator.userAgent));let t=e=>{e.preventDefault(),m.current=e,u(!0)},n=()=>{m.current=null,i(!0)};window.addEventListener("beforeinstallprompt",t),window.addEventListener("appinstalled",n);let a=window.setTimeout(()=>h(!0),2e3);return()=>{window.removeEventListener("beforeinstallprompt",t),window.removeEventListener("appinstalled",n),window.clearTimeout(a)}},[e,i]);let f=(0,L.E1)({isIOS:o,hasAndroidPrompt:c}),p=e&&(0,L.vy)({isStandalone:r,isInstalled:a,platform:f,dismissedAt:t,now:Date.now(),delayElapsed:x}),b=(0,s.useCallback)(()=>{n(Date.now())},[n]);return{canShow:p,platform:f,install:(0,s.useCallback)(async()=>{let e=m.current;if(!e)return;await e.prompt();let t=await e.userChoice;m.current=null,u(!1),"dismissed"===t.outcome?b():i(!0)},[b,i]),dismiss:b}}(!!(null==e?void 0:e.user)&&!(0,e6.cz)()),[l,o]=(0,s.use
1State)(!1),d=(0,s.useRef)(null);return((0,s.useEffect)(()=>{if(!t){o(!1);return}let e=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(e)},[t]),(0,s.useEffect)(()=>{let e=document.documentElement;if(l&&d.current){let t=d.current.getBoundingClientRect().height;e.style.setProperty(tp,"".concat(Math.ceil(t),"px"))}else e.style.setProperty(tp,"0px");return()=>{e.style.setProperty(tp,"0px")}},[l]),t)?(0,a.jsx)(e4.Z,{children:(0,a.jsx)("div",{className:"md:hidden fixed inset-x-0 bottom-0 z-[90] px-4 transition-transform duration-300 ease-out",style:{paddingBottom:"max(env(safe-area-inset-bottom, 0px), 16px)",transform:l?"translateY(0)":"translateY(120%)"},role:"dialog","aria-label":"홈 화면에 추가",children:(0,a.jsxs)("div",{ref:d,className:"flex items-center gap-3 rounded-2xl border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 px-4 py-3.5 text-zinc-900 dark:text-white shadow-2xl",children:[(0,a.jsx)("img",{src:"/brand-app-icon.svg",alt:"",className:"h-10 w-10 shrink-0 rounded-xl"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-[13px] font-semibold text-zinc-900 dark:text-white",children:"내모를 홈 화면에 추가하세요"}),(0,a.jsx)("p",{className:"truncate text-[12px] text-zinc-500 dark:text-zinc-400",children:"ios"===n?'공유 버튼 → "홈 화면에 추가"를 눌러주세요':"앱처럼 빠르게 열고 쓸 수 있어요"})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:["android"===n&&(0,a.jsx)("button",{onClick:i,className:"rounded-full bg-zinc-900 dark:bg-white px-3 py-1.5 text-[12px] font-semibold text-white dark:text-zinc-900 active:scale-95 transition",children:"추가하기"}),(0,a.jsx)("button",{onClick:r,className:"rounded-full px-3 py-1.5 text-[12px] font-medium text-zinc-500 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-white active:bg-zinc-100 dark:active:bg-zinc-800 transition",children:"ios"===n?"알겠어요":"나중에"})]})]})})}):null}var tv=n(52345),tg=n(28242);function tw(e){let{onConfirm:t,orderId:n}=e,i=(0,el.a)(!0,t),r=(0,tv.J)();return(0,s.useEffect)(()=>{var e;null===(e=i.current)||void 0===e||e.focus()},[i]),(0,a.jsx)("div",{className:"modal-viewport z-[100000] flex items-center justify-center bg-black/40 p-5",children:(0,a.jsxs)("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":"payment-success-title",tabIndex:-1,className:"w-full max-w-[360px] rounded-xl border border-zinc-200 bg-white px-8 pb-8 pt-7 text-center outline-none dark:border-zinc-700 dark:bg-zinc-800",children:[(0,a.jsx)("div",{className:"mb-4 flex justify-center text-zinc-900 dark:text-zinc-100","aria-hidden":"true",children:(0,a.jsx)(en.w,{src:"/lordicons/collaboration-confetti.json",size:88,trigger:r?"none":"in",originalColors:!0})}),(0,a.jsx)("h2",{id:"payment-success-title",className:"mb-8 text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100",children:"결제가 완료되었습니다"}),(0,a.jsx)("button",{type:"button",onClick:t,className:"btn-primary-solid w-full rounded-lg !bg-[#18181b] px-4 py-3 text-sm font-semibold !text-[#ffffff] transition-colors hover:!bg-[#27272a] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-zinc-500 motion-reduce:transition-none",children:"홈 화면으로 이동"}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(tg.Z,{orderId:n,fullWidth:!0})})]})})}let tj=["hub","dashboard","work-schedule","student-management","school-collaboration","attendance","seating","nametag","cleaning","activity","random-picker","survey","work-notes","evaluation-record","behavior-record","plans","checkout","attendance-print","settings"];var tk=n(7153),ty=n(21652);let tz="naemo:currentView";function tN(){try{return{local:window.localStorage,session:window.sessionStorage}}catch(e){return{local:null,session:null}}}function tE(){let e=window.location.hash.slice(1);return tj.includes(e)?e:"dashboard"}function tC(){var e,t;return e=(0,ty.UM)(),t=(0,ty.nX)()||(0,e6.cz)(),e||t}function tS(){let{variant:e="cards",label:t,desktopVariant:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.jsx)(eT.MobileLoadingSwap,{variant:e,label:t,fallback:(0,a.jsx)(i.ContentLoadingState,{variant:null!=n?n:"students"===e?"workspace":"menu"===e?"list":e,label:t,className:"h-full overflow-auto"})})}let tD=(0,l.default)(()=>Promise.all([n.e(4168),n.e(3500),n.e(8726),n.e(2360),n.e(6078),n.e(9804),n.e(9531)]).then(n.bind(n,69531)),{loadableGenerated:{webpack:()=>[69531]},loading:()=>(0,a.jsx)(tS,{})}),tL=(0,l.default)(()=>Promise.all([n.e(3878),n.e(5855),n.e(1255),n.e(8985)]).then(n.bind(n,61255)),{loadableGenerated:{webpack:()=>[61255]},loading:()=>(0,a.jsx)(tS,{})}),tM=(0,l.default)(()=>n.e(5960).then(n.bind(n,75163)),{loadableGenerated:{webpack:()=>[75163]},loading:()=>(0,a.jsx)(eR.Ck,{})}),tA=(0,l.default)(()=>Promise.all([n.e(3500),n.e(6710),n.e(9842)]).then(n.bind(n,99842)),{loadableGenerated:{webpack:()=>[99842]},loading:()=>(0,a.jsx)(eT.MobileLoadingSwap,{label:"출결 정보를 불러오고 있어요",fallback:(0,a.jsx)(eZ.p7,{})})}),tI=(0,l.default)(()=>Promise.all([n.e(6460),n.e(3450)]).then(n.bind(n,93450)),{loadableGenerated:{webpack:()=>[93450]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"zones",label:"좌석 배치를 불러오고 있어요"})}),tT=(0,l.default)(()=>n.e(8331).then(n.bind(n,58331)),{loadableGenerated:{webpack:()=>[58331]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"zones",label:"청소 구역을 불러오고 있어요"})}),tR=(0,l.default)(()=>Promise.all([n.e(2211),n.e(5398),n.e(9136),n.e(9284)]).then(n.bind(n,49284)),{loadableGenerated:{webpack:()=>[49284]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"table",label:"활동 기록을 불러오고 있어요"})}),tZ=(0,l.default)(()=>Promise.all([n.e(4346),n.e(2360),n.e(6710),n.e(2952)]).then(n.bind(n,42952)),{loadableGenerated:{webpack:()=>[42952]},loading:()=>(0,a.jsx)(eZ.uk,{})}),tB=(0,l.default)(()=>Promise.all([n.e(9136),n.e(8280)]).then(n.bind(n,48280)),{loadableGenerated:{webpack:()=>[48280]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"table",label:"평가 기록을 불러오고 있어요"})}),tO=(0,l.default)(()=>Promise.all([n.e(5096),n.e(9136),n.e(7861)]).then(n.bind(n,67861)),{loadableGenerated:{webpack:()=>[67861]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"table",label:"행동특성 기록을 불러오고 있어요"})}),tF=(0,l.default)(()=>n.e(3285).then(n.bind(n,13285)),{loadableGenerated:{webpack:()=>[13285]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"zones",label:"명찰을 준비하고 있어요"})}),tP=(0,l.default)(()=>Promise.all([n.e(4831),n.e(3807)]).then(n.bind(n,3807)),{loadableGenerated:{webpack:()=>[3807]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"zones",label:"학생 명단을 불러오고 있어요"})}),tV=(0,l.default)(()=>Promise.all([n.e(2211),n.e(5398),n.e(9646)]).then(n.bind(n,89646)),{loadableGenerated:{webpack:()=>[89646]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"workspace",label:"설문을 불러오고 있어요"})}),tU=(0,l.default)(()=>n.e(2207).then(n.bind(n,72207)),{loadableGenerated:{webpack:()=>[72207]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"workspace",label:"업무 노트를 불러오고 있어요"})}),tW=(0,l.default)(()=>n.e(1487).then(n.bind(n,41487)),{loadableGenerated:{webpack:()=>[41487]},loading:()=>(0,a.jsx)(tS,{variant:"menu",label:"교무수첩을 준비하고 있어요"})}),t_=(0,l.default)(()=>n.e(3213).then(n.bind(n,73213)),{loadableGenerated:{webpack:()=>[73213]},loading:()=>(0,a.jsx)(tS,{})}),tG=(0,l.default)(()=>n.e(1658).then(n.bind(n,61658)),{loadableGenerated:{webpack:()=>[61658]},loading:()=>(0,a.jsx)(tS,{})}),tH=(0,l.default)(()=>n.e(2537).then(n.bind(n,52537)),{loadableGenerated:{webpack:()=>[52537]},loading:()=>(0,a.jsx)(tS,{desktopVariant:"table",label:"출결 서식을 불러오고 있어요"})}),tK=(0,l.default)(()=>n.e(8259).then(n.bind(n,68259)),{loadableGenerated:{webpack:()=>[68259]},loading:()=>(0,a.jsx)(tS,{})}),tX=(0,l.default)(()=>Promise.all([n.e(2211),n.e(5398),n.e(6385),n.e(9136),n.e(9589)]).then(n.bind(n,99589)),{loadableGenerated:{webpack:()=>[99589]},loading:()=>(0,a.jsx)(tS,{})}),tq=(0,l.default)(()=>Promise.all([n.e(2397),n.e(6038)]).then(n.bind(n,96038)),{loadableGenerated:{webpack:()=>[96038]},loading:()=>(0,a.jsx)(tS,{variant:"zones",label:"청소 구역을 불러오고 있어요"})}),tJ=(0,l.default)(()=>Promise.all([n.e(4831),n.e(5784)]).then(n.bind(n,5784)),{loadableGenerated:{webpack:()=>[5784]},loading:()=>(0,a.jsx)(tS,{})});function t$(e){var t,n,i,l,o,d,c,u;let{session:x}=e,{update:h,data:m,status:f}=(0,E.kP)();(0,tm.Dv)();let p=(0,s.useRef)(null!=m?m:x);(null==m?void 0:m.user)&&(p.current=m);let b=(null==m?void 0:m.user)?m:(0,tm.YY)()?p.current:m,{students:v,isLoaded:g}
1=(0,J.AF)(),[w,j]=(0,s.useState)("dashboard"),[k,y]=(0,s.useState)(!1),z=(0,tx.d)(),N=k&&z,C=(0,s.useRef)(w);C.current=w;let S=(0,s.useRef)(!1),D=(0,s.useCallback)(async e=>{if(e!==C.current){if(S.current)return;S.current=!0;let e=await (0,r.H)();if(S.current=!1,!e){window.history.replaceState(window.history.state,"","".concat(window.location.pathname).concat(window.location.search,"#").concat(C.current));return}}let t=(0,e6.Ig)()&&(0,tk.ZO)(e)?(0,ty.UM)()?"hub":"dashboard":e;!function(e,t,n){let{local:a,session:i}={...tN()};try{null==i||i.setItem(tz,e),t&&(null==a||a.setItem(tz,e))}catch(e){}}(t,tC()),j(t)},[]);(0,s.useEffect)(()=>{var e,t;let n=(0,ty.UM)(),a=tC(),i=tj.includes(window.location.hash.slice(1));D(null!==(t=th(window.location.search,n))&&void 0!==t?t:i?tE():null!==(e=function(e,t){let{local:n,session:a}={...tN()};try{var i;let t=e&&null!==(i=null==n?void 0:n.getItem(tz))&&void 0!==i?i:null==a?void 0:a.getItem(tz);return tj.includes(t)?t:null}catch(e){return null}}(a))&&void 0!==e?e:n?"hub":"dashboard"),y(!0)},[D]);let[L,A]=(0,s.useState)(!1),{isOpen:I,dismiss:R,orderId:Z}=function(e,t){let[n,a]=(0,s.useState)(!1),[i,r]=(0,s.useState)(null),l=(0,s.useRef)(!1);return(0,s.useEffect)(()=>{e&&!l.current&&th(window.location.search,!1)&&(l.current=!0,r(new URLSearchParams(window.location.search).get("payment_order_id")),a(!0),t().catch(console.error))},[e,t]),{isOpen:n,dismiss:(0,s.useCallback)(()=>{let e=new URL(window.location.href);e.searchParams.delete("payment_success"),e.searchParams.delete("payment_order_id"),window.history.replaceState(window.history.state,"","".concat(e.pathname).concat(e.search).concat(e.hash)),a(!1)},[]),orderId:i}}(k,h),[B,O]=(0,s.useState)(null),[F,P]=(0,s.useState)([]),[V,U]=(0,s.useState)(null),[W,G]=(0,s.useState)(null),{showToast:H}=(0,eD.pm)();!function(){var e;let{data:t,status:n}=(0,E.kP)(),{toasts:a,showToast:i,removeToast:r}=(0,eD.pm)(),l=(0,td.XC)(),o=(0,s.useRef)(!1),d=(0,s.useRef)(a),c=(0,s.useRef)(null),u=(0,s.useRef)(null),x=(0,s.useRef)(null),[h,m]=(0,s.useState)(0);(0,s.useEffect)(()=>{d.current=a},[a]),(0,s.useEffect)(()=>{let e=c.current;e&&a.some(t=>t.id!==e.toastId)&&(r(e.toastId),u.current&&(clearTimeout(u.current),u.current=null),c.current=null)},[a,r]),(0,s.useEffect)(()=>{let e=()=>{tu()||!x.current||c.current||(0,T.FB)(new Date)===x.current||m(e=>e+1)};document.addEventListener("visibilitychange",e),window.addEventListener("focus",e);let t=setInterval(e,36e5);return()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("focus",e),clearInterval(t)}},[]),(0,s.useEffect)(()=>{if("authenticated"!==n||!(null==t?void 0:t.user)||!l.user.id||o.current)return;o.current=!0;let e=!1,a=[],r=[],s=t=>{if(!tu()){t();return}let n=()=>{tu()||(document.removeEventListener("visibilitychange",n),e||t())};document.addEventListener("visibilitychange",n),r.push(()=>document.removeEventListener("visibilitychange",n))},h=async t=>{let n;if(e)return;if(tu()){s(m);return}if(d.current.length>0){0===t&&a.push(setTimeout(()=>h(1),3e3));return}try{n=await (0,tc.X)("getSuggestion",{},l)}catch(e){return}if(e||!(null==n?void 0:n.success)||!n.data)return;let{id:r,message:o,actionLabel:x,actionHref:f}=n.data;if(d.current.length>0)return;let p=()=>{u.current&&(clearTimeout(u.current),u.current=null),(0,tc.X)("markSuggestionShown",{id:r},l)},b=i(o,"suggestion",x&&f?{label:x,onClick:()=>{p(),(0,tc.X)("markSuggestionActed",{id:r},l),c.current=null;let e=function(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=t.indexOf("?"),a=-1===n?t:t.slice(0,n);if(-1===n)return{view:a};let i=new URLSearchParams(t.slice(n+1)),r=i.get("student")||void 0,s=i.get("tab")||void 0;return{view:a,...r?{studentId:r}:{},...s?{tab:s}:{}}}(f);e.studentId?window.dispatchEvent(new CustomEvent("navigate-to-student",{detail:{studentId:e.studentId,tab:e.tab}})):window.location.hash=e.view}}:void 0,()=>{p(),(0,tc.X)("markSuggestionDismissed",{id:r},l),c.current=null});c.current={toastId:b,suggestionId:r};let v=setTimeout(()=>{u.current=null,tu()||(0,tc.X)("markSuggestionShown",{id:r},l)},1500);u.current=v,a.push(v);let g=setTimeout(()=>{var e;(null===(e=c.current)||void 0===e?void 0:e.toastId)===b&&(c.current=null)},1e4);a.push(g)};
1function m(){x.current=(0,T.FB)(new Date),a.push(setTimeout(()=>void h(0),2500))}return s(m),()=>{e=!0,a.forEach(clearTimeout),r.forEach(e=>e()),o.current=!1}},[n,null==t?void 0:null===(e=t.user)||void 0===e?void 0:e.id,i,l,h])}(),(0,s.useEffect)(()=>{if(!k)return;let e=w===((0,ty.UM)()?"hub":"dashboard")?"":"#".concat(w);if(window.location.hash!==e){let t=window.location.pathname+window.location.search;!function(e){let t=window.history.state,n=!!(t&&(t.__NA||t._N));window.history.pushState(n?t:null,"",e)}(e?t+e:t)}},[w,k]),(0,s.useEffect)(()=>{let e=()=>{let e=(0,ty.UM)(),t=tE(),n=e&&"dashboard"===t&&!window.location.hash?"hub":t;n!==w&&D(n)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[w,D]),(0,s.useEffect)(()=>{let e=document.documentElement;return e.classList.add("app-shell-locked"),()=>e.classList.remove("app-shell-locked")},[]),(0,s.useEffect)(()=>{let e=(0,ty.UM)();e&&(0,eB.T)("hub");let t=setTimeout(()=>{e?((0,eB.T)("settings"),(0,eB.T)("student-management")):(0,eB.T)("dashboard"),(0,eB.T)("attendance")},1e3);return()=>clearTimeout(t)},[]);let{loadFromDB:K}=(0,tl.o)(),{loadFromDB:X}=(0,to.X)(),q=(0,td.XC)();(0,s.useEffect)(()=>{k&&"authenticated"===f&&(null==m?void 0:m.user)&&(K(q),X())},[null==m?void 0:null===(t=m.user)||void 0===t?void 0:t.id,k,f]);let[$,Y]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(0);(0,s.useEffect)(()=>{var e,t;if(!k||"authenticated"!==f)return;let n=null==m?void 0:null===(e=m.user)||void 0===e?void 0:e.paidUntil,a=null==m?void 0:null===(t=m.user)||void 0===t?void 0:t.recurringStatus;if(!n||"ACTIVE"===a)return;let i=new Date,r=new Date(n),s=e=>{let t=new Date(e);return t.setHours(0,0,0,0),t},l=Math.round((s(r).getTime()-s(i).getTime())/864e5);if(![5,3,1,0].includes(l))return;let o=r.toISOString().slice(0,10),d="subscription-expiry-dismissed-".concat(o,"-").concat(l,"d");!localStorage.getItem(d)&&((0,e6.Ig)()||(et(l),Y(!0)))},[k,f,null==m?void 0:null===(n=m.user)||void 0===n?void 0:n.paidUntil,null==m?void 0:null===(i=m.user)||void 0===i?void 0:i.recurringStatus]);let en=(0,s.useCallback)(e=>{if(e===w)return;let t=tj.includes(e)?e:"dashboard";t!==e&&console.warn('[AppShell] handleNavigate: invalid view "'.concat(e,'" → fallback to "dashboard"')),Q.MU.selection(),D(t)},[w,D]),ea=(0,s.useCallback)(()=>{en("plans")},[en]),ei=(0,s.useCallback)(()=>{var e;Y(!1);let t=null==m?void 0:null===(e=m.user)||void 0===e?void 0:e.paidUntil,n=t?new Date(t).toISOString().slice(0,10):"unknown",a="subscription-expiry-dismissed-".concat(n,"-").concat(ee,"d");localStorage.setItem(a,new Date().toISOString())},[ee,null==m?void 0:null===(l=m.user)||void 0===l?void 0:l.paidUntil]);(0,s.useEffect)(()=>{},[]),(0,s.useEffect)(()=>{let e=e=>{en(e.detail)};return window.addEventListener("navigate-view",e),()=>window.removeEventListener("navigate-view",e)},[en]),(0,s.useEffect)(()=>{let e=()=>{A(!0)};return window.addEventListener("open-login-modal",e),()=>window.removeEventListener("open-login-modal",e)},[]),(0,s.useEffect)(()=>{if(!k||"loading"===f||(0,ty.UM)())return;let e="authenticated"===f;if(e&&!g||e&&0===v.length&&!localStorage.getItem("rosterWizardCompleted")&&!(0,e6.Ig)())return;let t=function(e){var t;let n=eJ();return null!==(t=eX.find(t=>!n.includes(t.id)&&("authenticated"!==t.target||!!e)))&&void 0!==t?t:null}(e);t&&O(t.id)},[k,f,g,v.length]),(0,s.useEffect)(()=>{if(!k||"authenticated"!==f)return;let e=!1;return _().then(t=>{!e&&t.length>0&&P(t)}).catch(()=>{}),()=>{e=!0}},[k,f]),(0,s.useEffect)(()=>{var e;if(!k||"authenticated"!==f||!(null==m?void 0:null===(e=m.user)||void 0===e?void 0:e.id))return;let t="activityNotif:since:".concat(m.user.id),n=async()=>{if("visible"!==document.visibilityState)return;let e=localStorage.getItem(t)||new Date(Date.now()-864e5).toISOString();try{let i=await fetch("/api/activities/notifications?since=".concat(encodeURIComponent(e)));if(i.ok){var n,a;let e=await i.json(),t=(n=e.count,a=e.latestStudentName,n<=0?"":1===n&&a?"".concat(a," 학생이 자율\xb7진로 활동을 제출\xb7수정했어요"):"학생 ".concat(n,"명이 자율\xb7진로 활동을 제출\xb7수정했어요"));t&&H(t,"info")}localStorage.setItem(t,new Date().toISOString())}catch(e){}};n();let a=setInterval(n,72e5),i=()=>{"visible"===document.visibilityState&&n()};
1return document.addEventListener("visibilitychange",i),()=>{clearInterval(a),document.removeEventListener("visibilitychange",i)}},[k,f,null==m?void 0:null===(o=m.user)||void 0===o?void 0:o.id,H]);let er=(0,s.useCallback)(e=>{U(e),Q.MU.selection(),D("student-management")},[D]);return(0,s.useEffect)(()=>{let e=e=>{var t,n;(null===(t=e.detail)||void 0===t?void 0:t.studentId)&&(G(null!==(n=e.detail.tab)&&void 0!==n?n:null),er(e.detail.studentId))};return window.addEventListener("navigate-to-student",e),()=>window.removeEventListener("navigate-to-student",e)},[er]),(0,a.jsx)(tn,{enabled:!!(null==x?void 0:x.user),currentView:w,children:(0,a.jsxs)(e3.L,{children:[(0,a.jsx)(eS,{onNavigate:en}),(0,a.jsx)(tb,{}),(0,a.jsxs)("main",{className:"app-viewport h-screen h-[100dvh] min-h-[100dvh] w-full flex bg-[#fafaf9] dark:bg-[#09090b] overflow-hidden font-sans text-zinc-900 dark:text-[#fafafa]",children:[(0,a.jsx)("div",{className:"hidden md:flex relative z-30",children:(0,a.jsx)(es,{currentView:k?w:"",onMenuClick:en,onMenuHover:eB.T,session:b})}),(0,a.jsxs)("section",{className:"flex-1 h-full relative flex flex-col bg-[#fafaf9] dark:bg-[#09090b] sm:pt-0 min-w-0 overflow-x-hidden",children:[(0,a.jsx)(ts,{currentView:w}),"hub"!==w&&(0,a.jsx)("div",{className:"md:hidden shrink-0",style:{height:"calc(44px + env(safe-area-inset-top, 0px))"}}),(0,a.jsx)(e1,{isAuthenticated:"authenticated"===f}),!(null==b?void 0:b.user)&&(0,a.jsxs)("header",{className:"w-full border-b border-zinc-200 dark:border-zinc-800 bg-[#fafaf9] dark:bg-[#09090b] flex items-center justify-between px-6 shrink-0",style:{height:"hub"===w?"calc(".concat(48,"px + env(safe-area-inset-top, 0px))"):"".concat(48,"px"),paddingTop:"hub"===w?"env(safe-area-inset-top, 0px)":void 0},children:[(0,a.jsx)("span",{className:"text-sm text-zinc-500 font-medium",children:"아래는 사용 예시 화면입니다"}),(0,a.jsx)("button",{onClick:()=>A(!0),className:"px-4 py-2 bg-zinc-900 hover:bg-zinc-800 text-white text-sm font-semibold rounded-full shadow-lg transition-colors mb-[1px]",children:"시작하기"})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-hidden relative",children:[N&&(0,a.jsx)("div",{hidden:!(u="hub"===w),"aria-hidden":!u,className:"absolute inset-0","data-hub-keep-alive":"true","data-hub-active":u?"true":"false",ref:e=>{var t;return t="hub"===w,void(e&&(t?e.removeAttribute("inert"):e.setAttribute("inert","")))},children:(0,a.jsx)(eI,{fallbackMessage:"메뉴를 불러올 수 없습니다",children:(0,a.jsx)(tW,{})})}),!(N&&"hub"===w)&&(0,a.jsx)("div",{className:(0,T.cn)("h-full","hub"!==w&&"view-fade-in"),children:(()=>{if(!k)return(0,a.jsx)(tS,{});switch(w){case"hub":if(N)return null;return(0,a.jsx)(eI,{fallbackMessage:"메뉴를 불러올 수 없습니다",children:(0,a.jsx)(tW,{})});case"dashboard":return(0,a.jsx)(eI,{fallbackMessage:"대시보드를 불러올 수 없습니다",children:(0,a.jsx)(ta.Z,{children:(0,a.jsx)(tD,{onNavigateToStudent:er})})});case"work-schedule":return(0,a.jsx)(eI,{fallbackMessage:"일정 관리를 불러올 수 없습니다",children:(0,a.jsx)(tZ,{})});case"school-collaboration":return(0,a.jsx)(eI,{fallbackMessage:"학교 협업을 불러올 수 없습니다",children:(0,a.jsx)(tL,{})});case"student-management":return(0,a.jsx)(eI,{fallbackMessage:"학생 관리를 불러올 수 없습니다",children:(0,a.jsx)(tM,{initialStudentId:V,initialTab:W,onStudentIdConsumed:()=>{U(null),G(null)}})});case"attendance":return(0,a.jsx)(eI,{fallbackMessage:"출결 관리를 불러올 수 없습니다",children:(0,a.jsx)(tA,{})});case"seating":return(0,a.jsx)(eI,{fallbackMessage:"자리 배치를 불러올 수 없습니다",children:(0,a.jsx)(tI,{})});case"nametag":return(0,a.jsx)(eI,{fallbackMessage:"이름표를 불러올 수 없습니다",children:(0,a.jsx)(tF,{})});case"cleaning":return(0,a.jsx)(eI,{fallbackMessage:"청소 구역을 불러올 수 없습니다",children:z?(0,a.jsx)("div",{className:"h-full",children:(0,a.jsx)(tq,{})}):(0,a.jsx)("div",{className:"h-full",children:(0,a.jsx)(tT,{})})});case"activity":return(0,a.jsx)(eI,{fallbackMessage:"자율\xb7진로를 불러올 수 없습니다",children:z?(0,a.jsx)("div",{className:"h-full",children:(0,a.jsx)(tX,{})}):(0,a.jsx)("div",{className:"h-full",children:(0,a.jsx)(tR,{})})});case"random-picker":return(0,a.jsx)(eI,{fallbackMessage:"랜덤 뽑기를 불러올 수 없습니다",children:z?(0,a.jsx)("div",{className:"h-full",children:(0,a.jsx)(tJ,{})}):(0,a.jsx)("div",{className:"h-full",children:(0,a.jsx)(tP,{})})});case"survey":return(0,a.jsx)(eI,{fallbackMessage:"설문 조사를 불러올 수 없습니다",children:(0,a.jsx)(tV,{})});case"work-notes":return(0,a.jsx)(eI,{fallbackMessage:"업무 노트를 불러올 수 없습니다",children:(0,a.jsx)(tU,{})});case"evaluation-record":return(0,a.jsx)(eI,{fallbackMessage:"평가 기록을 불러올 수 없습니다",children:(0,a.jsx)(tB,{})});case"behavior-record":return(0,a.jsx)(eI,{fallbackMessage:"행동특성 기록을 불러올 수 없습니다",children:(0,a.jsx)(tO,{})});case"plans":return(0,a.jsx)(eI,{fallbackMessage:"요금제 안내를 불러올 수 없습니다",children:(0,a.jsx)(t_,{})});case"checkout":return(0,a.jsx)(eI,{fallbackMessage:"결제 페이지를 불러올 수 없습니다",children:(0,a.jsx)(tG,{})});case"attendance-print":return(0,a.jsx)(eI,{fallbackMessage:"출결 출력을 불러올 수 없습니다",children:(0,a.jsx)(tH,{})});case"settings":return(0,a.jsx)(eI,{fallbackMessage:"설정을 불러올 수 없습니다",children:(0,a.jsx)(tK,{})});default:return(0,a.jsx)(eI,{fallbackMessage:"대시보드를 불러올 수 없습니다",children:(0,a.jsx)(tD,{})})}})()},w)]})]})]}),(0,a.jsx)(M,{isOpen:L,onClose:()=>A(!1)}),(0,a.jsx)(eP,{}),B&&(0,a.jsx)(eQ,{announcementId:B,onClose:()=>O(null),onNavigate:()=>en("attendance")}),F.length>0&&(0,a.jsx)(e7,{replies:F,onClose:()=>P([])}),$&&(0,a.jsx)(eH,{daysLeft:ee,expiryDate:null!==(c=null==m?void 0:null===(d=m.user)||void 0===d?void 0:d.paidUntil)&&void 0!==c?c:new Date(Date.now()+864e5*ee).toISOString(),onExtend:ea,onClose:ei}),I&&(0,a.jsx)(e4.Z,{children:(0,a.jsx)(tw,{onConfirm:R,orderId:Z})})]})})}},75444:function(e,t,n){"use strict";n.d(t,{default:function(){return E}});var a=n(57437),i=n(29),r=n.n(i),s=n(2265),l=n(30166),o=n(33145),d=n(53185),c=n(93448),u=n(83444),x=n(92846);function h(e){let{provider:t,icon:n,label:i,onPress:r,loading:l=!1,disabled:o=!1,style:d}
1=e,[c,u]=(0,s.useState)(!1);return(0,a.jsxs)("button",{type:"button","data-provider":t,onClick:()=>{var e;(e={disabled:o,loading:l}).disabled||e.loading||((0,x.Jn)(),r())},onPointerDown:()=>u(!0),onPointerUp:()=>u(!1),onPointerCancel:()=>u(!1),onPointerLeave:()=>u(!1),disabled:o||l,"aria-busy":l,style:{height:"48px",borderRadius:"8px",width:"100%",display:"flex",alignItems:"center",gap:"10px",padding:"0 14px",fontSize:"14px",fontWeight:500,border:"1px solid var(--naemo-line)",backgroundColor:c?"var(--naemo-surface-pressed)":"var(--naemo-surface)",color:"var(--naemo-ink)",transition:"background-color 100ms linear",opacity:o&&!l?.4:1,...d},children:[(0,a.jsx)("span",{style:{flexShrink:0,display:"flex"},"aria-hidden":"true",children:n}),(0,a.jsx)("span",{style:{flex:1,textAlign:"center"},children:l?"연결 중...":i}),(0,a.jsx)("span",{style:{flexShrink:0,width:18},"aria-hidden":"true"})]})}var m=n(45007),f=n(27526);function p(){let[e,t]=(0,s.useState)(!1),[n,i]=(0,s.useState)(""),[r,l]=(0,s.useState)(""),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(null),x=async e=>{e.preventDefault(),u(null),d(!0);try{let e=await (0,f.zB)("review-demo",{email:n.trim(),password:r,redirect:!1,callbackUrl:"/?client=ios"});if(!(null==e?void 0:e.ok)||e.error){u("계정 정보를 확인해 주세요.");return}window.location.assign(e.url||"/?client=ios")}catch(e){u("로그인에 연결하지 못했습니다. 다시 시도해 주세요.")}finally{d(!1)}};return(0,a.jsxs)("div",{className:"w-full text-center",children:[(0,a.jsx)("button",{type:"button","data-testid":"review-login-toggle","aria-expanded":e,onClick:()=>t(e=>!e),className:"min-h-10 px-2 text-xs text-zinc-500 underline underline-offset-2 dark:text-zinc-400",children:"App Review 계정으로 로그인"}),e&&(0,a.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":"App Review 계정 로그인",className:"fixed inset-0 z-[200] flex items-center justify-center overflow-y-auto bg-black/55 px-5 py-8",children:(0,a.jsxs)("form",{onSubmit:x,className:"w-full max-w-[380px] rounded-2xl bg-white p-5 text-left shadow-2xl dark:bg-zinc-900",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-zinc-900 dark:text-white",children:"App Review 계정 로그인"}),(0,a.jsx)("button",{type:"button",onClick:()=>t(!1),className:"min-h-10 px-2 text-sm text-zinc-500","aria-label":"닫기",children:"닫기"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-xs text-zinc-600 dark:text-zinc-300",children:["이메일",(0,a.jsx)("input",{"data-testid":"review-login-email",type:"email",autoComplete:"username",required:!0,value:n,onChange:e=>i(e.target.value),className:"mt-1 h-11 w-full rounded-xl border border-zinc-300 bg-white px-3 text-sm text-zinc-900 dark:border-zinc-700 dark:bg-zinc-900 dark:text-white"})]}),(0,a.jsxs)("label",{className:"text-xs text-zinc-600 dark:text-zinc-300",children:["비밀번호",(0,a.jsx)("input",{"data-testid":"review-login-password",type:"password",autoComplete:"current-password",required:!0,value:r,onChange:e=>l(e.target.value),className:"mt-1 h-11 w-full rounded-xl border border-zinc-300 bg-white px-3 text-sm text-zinc-900 dark:border-zinc-700 dark:bg-zinc-900 dark:text-white"})]}),c&&(0,a.jsx)("p",{role:"alert",className:"text-xs text-red-600",children:c}),(0,a.jsx)("button",{type:"submit",disabled:o,className:"h-11 rounded-xl bg-[#007AFF] text-sm font-medium text-white disabled:opacity-50",children:o?"로그인 중…":"로그인"})]})]})})]})}let b=[{id:"google",label:"Google로 계속하기",icon:(0,a.jsx)(u._8,{})}],v=[{id:"naver",label:"Naver로 계속하기",icon:(0,a.jsx)(u.bg,{})},{id:"kakao",label:"Kakao로 계속하기",icon:(0,a.jsx)(u.Pv,{})}],g={id:"apple",label:"Apple로 계속하기",icon:(0,a.jsx)(u.qw,{})};function w(e){let{appleLoginEnabled:t=!1,preferAppleFirst:n=!1,nativeIos:i=!1,reviewLoginEnabled:r=!1}
1=e,[l,o]=(0,s.useState)(null),[c,u]=(0,s.useState)(!1),[x,m]=(0,s.useState)(null),f=t?n?[g,...b]:[...b,g]:b,w=async e=>{m(null),o(e);try{await (0,d.o)(e,i),o(null)}catch(e){m("로그인에 연결하지 못했어요. 인터넷 연결을 확인하고 로그인 버튼을 다시 눌러 주세요."),o(null)}};return(0,a.jsxs)("div",{className:"naemo-landing",style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 24px",paddingBottom:72,backgroundColor:"var(--naemo-paper)",color:"var(--naemo-ink)",textAlign:"center"},children:[(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,a.jsx)(j,{}),(0,a.jsxs)("h1",{style:{marginTop:12,display:"flex",alignItems:"center",gap:10,fontSize:24,lineHeight:"32px",fontWeight:600,letterSpacing:"0.06em"},children:[(0,a.jsx)(k,{}),"NAEMO"]}),i&&(0,a.jsxs)("div",{"data-testid":"landing-ios-s1",style:{marginTop:16,maxWidth:320},children:[(0,a.jsx)("p",{"data-testid":"landing-ios-helper",style:{margin:0,fontSize:14,lineHeight:"20px",color:"var(--naemo-muted)"},children:"학생 명단과 학급 첫 설정은 웹에서 해주세요."}),(0,a.jsx)("p",{"data-testid":"landing-ios-returning",style:{margin:"8px 0 0",fontSize:14,lineHeight:"20px",color:"var(--naemo-muted)"},children:"아래에서 로그인하거나 새 계정을 만드세요."})]}),(0,a.jsxs)("div",{style:{marginTop:40,width:"100%",display:"flex",flexDirection:"column",gap:8},children:[x&&(0,a.jsx)("p",{role:"alert",className:"text-sm text-red-700 dark:text-red-300",children:x}),f.map(e=>(0,a.jsx)(h,{provider:e.id,icon:e.icon,label:e.label,loading:l===e.id,disabled:null!==l&&l!==e.id,onPress:()=>void w(e.id)},e.id)),(0,a.jsx)("button",{type:"button","data-testid":"landing-more-methods","aria-expanded":c,onClick:()=>u(e=>!e),style:{height:40,width:"100%",background:"none",border:"none",fontSize:13,color:"var(--naemo-muted)",textDecoration:"underline",textUnderlineOffset:3},children:"다른 방법으로 로그인"}),c&&v.map(e=>(0,a.jsx)(h,{provider:e.id,icon:e.icon,label:e.label,loading:l===e.id,disabled:null!==l&&l!==e.id,onPress:()=>void w(e.id)},e.id)),r&&(0,a.jsx)(p,{}),i?(0,a.jsx)("p",{"data-testid":"landing-native-signup-hint",style:{marginTop:4,width:"100%",fontSize:14,color:"var(--naemo-muted)"},children:"계정이 없으신가요? 위 방법 중 하나로 가입할 수 있습니다."}):(0,a.jsx)("button",{type:"button","data-testid":"landing-guest",onClick:()=>{window.location.href="/?guest=1"},style:{marginTop:4,height:44,width:"100%",background:"none",border:"none",fontSize:14,color:"var(--naemo-muted)",textDecoration:"underline",textUnderlineOffset:3},children:"로그인 없이 둘러보기"})]})]}),(0,a.jsxs)("p",{"data-testid":"landing-legal",style:{position:"absolute",left:24,right:24,bottom:"calc(env(safe-area-inset-bottom) + 20px)",fontSize:12,lineHeight:"18px",color:"var(--naemo-muted)"},children:["시작하면 내모의"," ",(0,a.jsx)("a",{href:"/terms",style:{textDecoration:"underline"},children:"이용약관"})," ","및"," ",(0,a.jsx)("a",{href:"/privacy",style:{textDecoration:"underline"},children:"개인정보 처리방침"}),"에 동의하게 됩니다."]}),(0,a.jsx)("style",{children:"\n                .naemo-landing {\n                    --naemo-paper: #ffffff;\n                    --naemo-ink: #1d1715;\n                    --naemo-muted: #787774;\n                    --naemo-line: #E9E9E7;\n                    --naemo-surface: #ffffff;\n                    --naemo-surface-pressed: #F1F1EF;\n                }\n                .dark .naemo-landing {\n                    --naemo-paper: #191919;\n                    --naemo-ink: #EDEDEC;\n                    --naemo-muted: #9B9B9B;\n                    --naemo-line: #2F2F2F;\n                    --naemo-surface: #191919;\n                    --naemo-surface-pressed: #262626;\n                }\n                /* 앱 전역의 버튼 눌림 물결 효과는 이 화면에서 쓰지 않는다.\n                   버튼 자신의 배경 전환 하나로 충분하다. */\n                .naemo-landing button::after {\n                    content: none;\n                }\n                /* 카카오 심볼은 짙은 갈색이라 어두운 배경에서 사라진다.\n                   이 화면 안에서만 노란 심볼로 바꾼다 — 데스크톱 로그인 패널이\n                   쓰는 같은 아이콘은 밝은 배경이므로 건드리지 않는다. */\n                .dark .naemo-landing .kakao-symbol {\n                    fill: #FEE500;\n                }\n            "})]})}function j(){return(0,a.jsx)("div",{"data-testid":"landing-rocket","aria-hidden":"true",style:{width:112,height:112,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,a.jsx)(m.w,{src:"/lordicons/rocket-loop.json",size:112,trigger:"loop",originalColors:!0})})}function k(){return(0,a.jsx)("svg",{"data-testid":"landing-mark",
1width:"28",height:"28",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M32 19L45 32L32 45L19 32Z",stroke:"var(--naemo-ink)",strokeWidth:"5",strokeLinejoin:"round"})})}let y=(0,l.default)(()=>n.e(101).then(n.bind(n,90101)),{loadableGenerated:{webpack:()=>[90101]},ssr:!1});function z(e){let{onClick:t,disabled:n,loading:i,icon:r,label:s}=e;return(0,a.jsxs)("button",{onClick:t,disabled:n,className:(0,c.cn)("w-full h-[46px] flex items-center gap-3 px-5 rounded-xl","border border-[#E5E4E0] bg-white hover:bg-[#f8f8f5]","text-[13.5px] font-medium text-[#1d1715]","transition duration-150","disabled:opacity-50 disabled:cursor-not-allowed","shadow-[0_1px_2px_rgba(0,0,0,0.06)]"),children:[(0,a.jsx)("span",{className:"shrink-0",children:r}),(0,a.jsx)("span",{className:"flex-1 text-center",children:i?"연결 중...":s})]})}function N(){return(0,a.jsxs)("div",{className:"flex-1 relative overflow-hidden animate-fadeSlideIn",children:[(0,a.jsx)(o.default,{src:"/images/brand-gradient.png",alt:"",fill:!0,priority:!0,style:{objectFit:"cover"}}),(0,a.jsx)(y,{})]})}function E(e){let{appleLoginEnabled:t=!1,preferAppleFirst:n=!1,nativeIos:i=!1,reviewLoginEnabled:l=!1}=e,[c,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),[f,b]=(0,s.useState)(!1),[v,g]=(0,s.useState)(null),j=async e=>{g(null),x(!0),m(e);try{await (0,d.o)(e,i),x(!1),m(null)}catch(e){g("로그인에 연결하지 못했어요. 인터넷 연결을 확인하고 로그인 버튼을 다시 눌러 주세요."),x(!1),m(null)}};return(0,a.jsxs)("div",{style:{backgroundColor:"#fafaf9",color:"#1d1715"},className:"jsx-2d8ce714dfc9baaa app-viewport h-screen w-full flex overflow-hidden font-sans",children:[(0,a.jsx)("div",{className:"jsx-2d8ce714dfc9baaa md:hidden w-full h-full",children:(0,a.jsx)(w,{appleLoginEnabled:t,preferAppleFirst:n,nativeIos:i,reviewLoginEnabled:l})}),(0,a.jsxs)("div",{className:"jsx-2d8ce714dfc9baaa hidden md:flex flex-col flex-1 min-w-0 overflow-hidden relative",children:[(0,a.jsx)("div",{style:{background:"linear-gradient(to left, rgba(0,0,0,0.055) 0%, transparent 100%)",zIndex:20},className:"jsx-2d8ce714dfc9baaa absolute right-0 top-0 bottom-0 w-8 pointer-events-none"}),(0,a.jsx)("div",{className:"jsx-2d8ce714dfc9baaa flex-1 flex min-h-0 overflow-hidden",children:(0,a.jsx)(N,{})})]}),(0,a.jsxs)("div",{style:{backgroundColor:"#ffffff",boxShadow:"none"},className:"jsx-2d8ce714dfc9baaa hidden md:flex md:flex-none md:w-[400px] shrink-0 flex-col justify-center px-10",children:[(0,a.jsxs)("div",{className:"jsx-2d8ce714dfc9baaa mb-7",children:[(0,a.jsx)("h2",{style:{color:"#1d1715"},className:"jsx-2d8ce714dfc9baaa text-[24px] font-bold mb-1.5",children:"내모 시작하기"}),(0,a.jsxs)("p",{style:{color:"#787774"},className:"jsx-2d8ce714dfc9baaa flex items-center gap-1 text-[13.5px]",children:[(0,a.jsx)(o.default,{src:"/icons/landing-shield.svg",alt:"",width:14,height:14,className:"shrink-0","aria-hidden":!0}),"에듀집 및 학습지원 소프트웨어 등록"]}),(0,a.jsx)("p",{style:{color:"#787774"},className:"jsx-2d8ce714dfc9baaa text-[13.5px]",children:"무료로 시작 \xb7 개인 또는 단체 사용 가능"}),i&&(0,a.jsxs)("div",{"data-testid":"landing-ios-s1-desktop",className:"jsx-2d8ce714dfc9baaa mt-4 space-y-2",children:[(0,a.jsx)("p",{"data-testid":"landing-ios-helper-desktop",style:{color:"#787774"},className:"jsx-2d8ce714dfc9baaa text-[13.5px] leading-5",children:"학생 명단과 학급 첫 설정은 웹에서 해주세요."}),(0,a.jsx)("p",{"data-testid":"landing-ios-returning-desktop",style:{color:"#787774"},className:"jsx-2d8ce714dfc9baaa text-[13.5px] leading-5",children:"아래에서 로그인하거나 새 계정을 만드세요."})]})]}),(0,a.jsxs)("div",{className:"jsx-2d8ce714dfc9baaa flex flex-col gap-2.5",children:[v&&(0,a.jsx)("p",{role:"alert",className:"jsx-2d8ce714dfc9baaa text-sm text-red-700",children:v}),(0,a.jsx)(z,{onClick:()=>j("google"),disabled:c,loading:"google"===h,icon:(0,a.jsx)(u._8,{}),label:"Google로 로그인"}),t&&(0,a.jsx)(z,{onClick:()=>j("apple"),disabled:c,loading:"apple"===h,icon:(0,a.jsx)(u.qw,{}),label:"Apple로 로그인"}),(0,a.jsx)("button",{type:"button","data-testid":"landing-more-methods","aria-expanded":f,onClick:()=>b(e=>!e),style:{color:"#787774",background:"none",border:"none"},className:"jsx-2d8ce714dfc9baaa w-full h-10 text-[13px] underline underline-offset-2 transition",children:"다른 방법으로 로그인"}),f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(z,{onClick:()=>j("naver"),disabled:c,loading:"naver"===h,icon:(0,a.jsx)(u.bg,{}),label:"Naver로 로그인"}),(0,a.jsx)(z,{onClick:()=>j("kakao"),disabled:c,loading:"kakao"===h,icon:(0,a.jsx)(u.Pv,{}),label:"Kakao로 로그인"})]}),l&&(0,a.jsx)(p,{})]}),(0,a.jsxs)("div",{className:"jsx-2d8ce714dfc9baaa hidden md:block",children:[(0,a.jsxs)("div",{className:"jsx-2d8ce714dfc9baaa flex items-center gap-3 my-6",children:[(0,a.jsx)("div",{style:{backgroundColor:"#E5E4E0"},className:"jsx-2d8ce714dfc9baaa flex-1 h-px"}),(0,a.jsx)("span",{style:{color:"#B0B8C1"},className:"jsx-2d8ce714dfc9baaa text-[12.5px]",children:"또는"}),(0,a.jsx)("div",{style:{backgroundColor:"#E5E4E0"},className:"jsx-2d8ce714dfc9baaa flex-1 h-px"})]}),i?(0,a.jsx)("p",{"data-testid":"landing-native-signup-hint-desktop",style:{color:"#787774"},className:"jsx-2d8ce714dfc9baaa text-center text-[13px]",children:"계정이 없으신가요? 위 방법 중 하나로 가입할 수 있습니다."}):(0,a.jsx)("button",{type:"button","data-testid":"landing-guest-desktop",onClick:()=>{window.location.href="/?guest=1"},style:{border:"1px solid #E5E4E0",backgroundColor:"transparent",color:"#787774"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f2f2ef",e.currentTarget.style.color="#1d1715"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.color="#787774"},className:"jsx-2d8ce714dfc9baaa w-full h-[44px] flex items-center justify-center rounded-xl text-[13px] transition duration-150",children:"로그인 없이 둘러보기"})]}),(0,a.jsxs)("p",{style:{color:"#B0B8C1"},className:"jsx-2d8ce714dfc9baaa mt-6 text-[11px] leading-relaxed",children:["시작하면 내모의"," ",(0,a.jsx)("a",{href:"/terms",style:{color:"#787774"},className:"jsx-2d8ce714dfc9baaa underline underline-offset-2 transition-colors hover:text-[#1d1715]",children:"이용약관"})," ","및"," ",(0,a.jsx)("a",{href:"/privacy",style:{color:"#787774"},className:"jsx-2d8ce714dfc9baaa underline underline-offset-2 transition-colors hover:text-[#1d1715]",children:"개인정보 처리방침"}),"에 동의하게 됩니다."]})]}),(0,a.jsx)(r(),{id:"2d8ce714dfc9baaa",children:"@-webkit-keyframes fadeSlideIn{from{opacity:0;-webkit-transform:translatey(8px);transform:translatey(8px)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@-moz-keyframes fadeSlideIn{from{opacity:0;-moz-transform:translatey(8px);transform:translatey(8px)}to{opacity:1;-moz-transform:translatey(0);transform:translatey(0)}}@-o-keyframes fadeSlideIn{from{opacity:0;-o-transform:translatey(8px);transform:translatey(8px)}to{opacity:1;-o-transform:translatey(0);transform:translatey(0)}}@keyframes fadeSlideIn{from{opacity:0;-webkit-transform:translatey(8px);-moz-transform:translatey(8px);-o-transform:translatey(8px);transform:translatey(8px)}to{opacity:1;-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}}.animate-fadeSlideIn.jsx-2d8ce714dfc9baaa{-webkit-animation:fadeSlideIn.3s ease-out forwards;-moz-animation:fadeSlideIn.3s ease-out forwards;-o-animation:fadeSlideIn.3s ease-out forwards;animation:fadeSlideIn.3s ease-out forwards}"})]})}},64954:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var a=n(57437);n(2265);var i=n(93448),r=n(51028);function s(e){let{title:t,description:n,action:s,badge:l,size:o="md",className:d="",iconSize:c,animate:u=!0}=e,x="sm"===o,h="lg"===o;return(0,a.jsxs)("div",{className:(0,i.cn)("group relative flex flex-col items-center justify-center text-center select-none",x?"py-8 px-4":h?"py-20 px-8"
1:"py-16 px-6",d),children:[l&&(0,a.jsx)("span",{className:"mb-3.5 inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-zinc-100 dark:bg-white/[0.06] text-zinc-600 dark:text-zinc-300 border border-zinc-200/80 dark:border-white/10",children:l}),(0,a.jsx)("div",{className:(0,i.cn)("relative flex items-center justify-center transition-transform duration-300 ease-out",u&&"group-hover:scale-105",x?"mb-3":h?"mb-5":"mb-4"),children:(0,a.jsx)(r.w,{size:null!=c?c:x?48:h?80:64,showGlow:!1})}),(0,a.jsx)("h3",{className:(0,i.cn)("font-bold text-zinc-800 dark:text-zinc-100 tracking-tight",x?"text-sm":h?"text-[20px]":"text-base"),children:t}),n&&(0,a.jsx)("div",{className:(0,i.cn)("text-zinc-500 dark:text-zinc-400 font-normal leading-relaxed",x?"text-xs mt-1.5 max-w-xs":h?"text-[14px] mt-2 max-w-lg":"text-[13px] mt-1.5 max-w-md"),children:n}),s&&(0,a.jsx)("div",{className:(0,i.cn)("flex items-center justify-center",x?"mt-4":"mt-6"),children:s})]})}},51028:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});var a=n(57437),i=n(2265);function r(e){let{size:t=64,accentColor:n="#d97757",showGlow:r=!0,className:s="",...l}=e,o=i.useId(),d=i.useId();return(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 430 430",fill:"none",className:s,...l,children:[(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:d,x1:"90",y1:"90",x2:"300",y2:"300",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:n,stopOpacity:"0.15"}),(0,a.jsx)("stop",{offset:"50%",stopColor:"#38bdf8",stopOpacity:"0.08"}),(0,a.jsx)("stop",{offset:"100%",stopColor:n,stopOpacity:"0.03"})]}),r&&(0,a.jsx)("filter",{id:o,x:"-20%",y:"-20%",width:"140%",height:"140%",children:(0,a.jsx)("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:n,floodOpacity:"0.25"})})]}),(0,a.jsxs)("g",{strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"14",children:[(0,a.jsx)("circle",{cx:"191",cy:"192",r:"102",fill:"url(#".concat(d,")"),className:"transition-colors duration-300"}),(0,a.jsx)("path",{className:"stroke-zinc-700 dark:stroke-zinc-200 transition-colors duration-200",strokeWidth:"13",d:"M293.7 89.4c56.7 56.7 56.7 148.6 0 205.3s-148.6 56.7-205.3 0-56.7-148.7 0-205.3 148.6-56.7 205.3 0"}),(0,a.jsx)("path",{stroke:n,strokeWidth:"13",d:"M82.1 147.5c5.7-14.1 14.2-27.3 25.7-38.7 13.7-13.7 29.9-23.2 47.1-28.7",filter:r?"url(#".concat(o,")"):void 0}),(0,a.jsx)("path",{className:"stroke-zinc-700 dark:stroke-zinc-200 transition-colors duration-200",strokeWidth:"15",d:"m296.1 296.6 88 86.5"})]})]})}},58346:function(e,t,n){"use strict";n.d(t,{d:function(){return s}});var a=n(57437),i=n(93448);let r={"avatars-group":"data:image/svg+xml,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23121331%22%20d%3D%22M1%2015.75A4.75%204.75%200%200%201%205.75%2011h1.5a.75.75%200%200%201%200%201.5h-1.5a3.25%203.25%200%200%200-3.25%203.25V16h1.75a.75.75%200%200%201%200%201.5h-2.5a.75.75%200%200%201-.75-.75zm20.5%200a3.25%203.25%200%200%200-3.25-3.25h-1.5a.75.75%200%200%201%200-1.5h1.5A4.75%204.75%200%200%201%2023%2015.75v1a.75.75%200%200%201-.75.75h-2.5a.75.75%200%200%201%200-1.5h1.75zM14%209a2%202%200%201%200-4%200%202%202%200%200%200%204%2
100m1.5%200a3.5%203.5%200%201%201-7%200%203.5%203.5%200%200%201%207%200m1%209.75a3.25%203.25%200%200%200-3.25-3.25h-2.5a3.25%203.25%200%200%200-3.25%203.25v.75h9zm1.5%201.5a.75.75%200%200%201-.75.75H6.75a.75.75%200%200%201-.75-.75v-1.5A4.75%204.75%200%200%201%2010.75%2014h2.5A4.75%204.75%200%200%201%2018%2018.75zM4%206.5a3%203%200%200%201%204.95-2.28l.05.044.028.027A.75.75%200%200%201%208%205.38a1.5%201.5%200%201%200-1.334%202.581.75.75%200%200%201-.294%201.471l-.038-.007-.062-.015A3%203%200%200%201%204%206.5m14.5%200A1.5%201.5%200%200%200%2016%205.382l-.03.025A.75.75%200%200%201%2015%204.264l.05-.044a3%203%200%201%201%202.616%205.206.75.75%200%201%201-.332-1.463A1.5%201.5%200%200%200%2018.5%206.5%22/%3E%3C/svg%3E",building:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22%23121331%22%3E%3Cpath%20d%3D%22M8.25%2010a.75.75%200%200%201%20.75.75v1.5a.75.75%200%200%201-1.5%200v-1.5a.75.75%200%200%201%20.75-.75M12%2010a.75.75%200%200%201%20.75.75v1.5a.75.75%200%200%201-1.5%200v-1.5A.75.75%200%200%201%2012%2010m3.75%200a.75.75%200%200%201%20.75.75v1.5a.75.75%200%200%201-1.5%200v-1.5a.75.75%200%200%201%20.75-.75m-7.5-4.5a.75.75%200%200%201%20.75.75v1.5a.75.75%200%200%201-1.5%200v-1.5a.75.75%200%200%201%20.75-.75m3.75%200a.75.75%200%200%201%20.75.75v1.5a.75.75%200%200%201-1.5%200v-1.5A.75.75%200%200%201%2012%205.5m3.75%200a.75.75%200%200%201%20.75.75v1.5a.75.75%200%200%201-1.5%200v-1.5a.75.75%200%200%201%20.75-.75%22/%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M18.25%202c.966%200%201.75.784%201.75%201.75v16.5A1.75%201.75%200%200%201%2018.25%2022H5.75A1.75%201.75%200%200%201%204%2020.25V3.75C4%202.784%204.784%202%205.75%202zM5.75%203.5a.25.25%200%200%200-.25.25v16.5c0%20.138.112.25.25.25H9v-4.75a.75.75%200%200%201%20.75-.75h4.5a.75.75%200%200%201%20.75.75v4.75h3.25a.25.25%200%200%200%20.25-.25V3.75a.25.25%200%200%200-.25-.25zm4.75%2017h3v-4h-3z%22%20clip-rule%3D%22evenodd%22/%3E%3C/g%3E%3C/svg%3E",cross:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23121331%22%20d%3D%22M19.22%203.72a.75.75%200%201%201%201.06%201.06L13.06%2012l7.22%207.22.052.056a.75.75%200%200%201-1.056%201.056l-.056-.052L12%2013.06l-7.22%207.22a.75.75%200%201%201-1.06-1.06L10.94%2012%203.72%204.78a.75.75%200%201%201%201.06-1.06L12%2010.94z%22/%3E%3C/svg%3E",magnifier:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23121331%22%20d%3D%22M16.334%204.667a8.25%208.25%200%200%201%20.506%2011.114l3.94%203.94.027.027a.75.75%200%200%201-1.06%201.06l-.027-.027-3.94-3.94a8.25%208.25%200%201%201%20.554-12.174M5.727%205.728a6.75%206.75%200%201%200%209.546%209.546%206.75%206.75%200%200%200-9.546-9.546%22/%3E%3C/svg%3E","student-cap":"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23121331%22%20fill-rule%3D%22evenodd%22%20d%3D%22M11.12%202.144a1.75%201.75%200%200%201%201.76%200l8.76%205.092c.516.3.801.798.858%201.318q.011.06.012.124v5.572a.75.75%200%200%201-1.5%200v-3.622L19%2011.797v5.843c0%20.656-.367%201.257-.95%201.556l-5.25%202.695a1.75%201.75%200%200%201-1.598%200l-5.25-2.695c-.584-.3-.951-.9-.952-1.556v-5.843l-2.64-1.534c-1.16-.675-1.16-2.352%200-3.027zm1.76%2013.212a1.75%201.75%200%200%201-1.76%200L6.5%2012.669v4.97a.25.25%200%200%200%20.136.223l5.25%202.694a.25.25%200%200%200%20.229%200l5.25-2.695a.25.25%200%200%200%20.136-.221v-4.97zM12.124%203.44a.25.25%200%200%200-.25%200l-8.76%205.093a.25.25%200%200%200%200%20.433l8.76%205.093a.25.25%200%200%200%20.252%200l8.76-5.093a.25.25%200%200%200%200-.433z%22%20clip-rule%3D%22evenodd%22/%3E%3C/svg%3E","trash-bin":"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22%23121331%22%3E%3Cpath%20d%3D%22M9.75%209a.75.75%200%200%201%20.75.75v7.5a.75.75%200%200%201-1.5%200v-7.5A.75.75%200%200%201%209.75%209m4.5%200a.75.75%200%200%201%20.75.75v7.5a.75.75%200%200%201-1.5%200v-7.5a.75.75%200%200%201%20.75-.75%22/%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M12%201a4%204%200%200%201%203.929%203.25h4.321a.75.75%200%200%201%200%201.5h-.75v13.5A2.75%202.75%200%200%201%2016.75%2022h-9.5a2.75%202.75%200%200%201-2.75-2.75V5.75h-.75a.75.75%200%200%201%200-1.5h4.321A4%204%200%200%201%2012%201M6%2019.25c0%20.69.56%201.25%201.25%201.25h9.5c.69%200%201.25-.56%201.25-1.25V5.75H6zM12
1%202.5a2.5%202.5%200%200%200-2.385%201.75h4.77A2.5%202.5%200%200%200%2012%202.5%22%20clip-rule%3D%22evenodd%22/%3E%3C/g%3E%3C/svg%3E","trending-up":"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20stroke%3D%22%23121331%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M15.75%206.75h5.5v5.5%22/%3E%3Cpath%20d%3D%22m2.75%2018.25%206.63-6.67%203.54%203.55%208.33-8.38%22/%3E%3C/g%3E%3C/svg%3E","trophy-star":"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22%23121331%22%3E%3Cpath%20d%3D%22M11.765%205.35a.262.262%200%200%201%20.47%200l.615%201.244%201.373.199a.263.263%200%200%201%20.145.45l-.993.967.234%201.368a.262.262%200%200%201-.38.276L12%209.21l-1.229.645a.262.262%200%200%201-.38-.276l.234-1.368-.993-.968a.263.263%200%200%201%20.145-.449l1.373-.2z%22/%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M16.25%202c.966%200%201.75.784%201.75%201.75V4h2.25c.966%200%201.75.784%201.75%201.75v1.5A4.75%204.75%200%200%201%2017.25%2012h-.055a6%206%200%200%201-4.445%202.951V16.5h3.5c.966%200%201.75.784%201.75%201.75v2A1.75%201.75%200%200%201%2016.25%2022h-8.5A1.75%201.75%200%200%201%206%2020.25v-2c0-.966.784-1.75%201.75-1.75h3.5v-1.549a6%206%200%200%201-4.447-2.955A4.91%204.91%200%200%201%202%207.086V5.68C2%204.752%202.752%204%203.679%204H6v-.25C6%202.784%206.784%202%207.75%202zm-8.5%2016a.25.25%200%200%200-.25.25v2c0%20.138.112.25.25.25h8.5a.25.25%200%200%200%20.25-.25v-2a.25.25%200%200%200-.25-.25zm0-14.5a.25.25%200%200%200-.25.25V9a4.5%204.5%200%201%200%209%200V3.75a.25.25%200%200%200-.25-.25zM18%209c0%20.5-.063.984-.178%201.448A3.25%203.25%200%200%200%2020.5%207.25v-1.5a.25.25%200%200%200-.25-.25H18zM3.679%205.5a.18.18%200%200%200-.179.179v1.408c0%201.63%201.142%202.99%202.669%203.33A6%206%200%200%201%206%209V5.5z%22%20clip-rule%3D%22evenodd%22/%3E%3C/g%3E%3C/svg%3E"};function s(e){let{name:t,size:n=24,className:s}=e,l=r[t];return l?(0,a.jsx)("img",{src:l,alt:"",width:n,height:n,className:(0,i.cn)("dark:invert",s),draggable:!1}):null}},28242:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});
1var a=n(57437),i=n(2265),r=n(51817),s=n(92735);function l(e){let{orderId:t,kind:n="receipt",fullWidth:l=!1}=e,[o,d]=(0,i.useState)(!1),[c,u]=(0,i.useState)(""),x=(0,i.useRef)(!1),h="receipt"===n?"영수증":"청구서",m=async()=>{if(t&&!x.current){x.current=!0,d(!0),u("");try{var e;let a=new URLSearchParams({orderId:t,kind:n}),i=await fetch("/api/payments/documents?".concat(a),{cache:"no-store"});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e.error||"다운로드에 실패했습니다. 다시 시도해 주세요.")}if(!(null===(e=i.headers.get("Content-Type"))||void 0===e?void 0:e.includes("application/pdf")))throw Error("문서를 받지 못했습니다. 다시 로그인해 주세요.");let r=URL.createObjectURL(await i.blob()),s=document.createElement("a");s.href=r,s.download="".concat(h,"-").concat(t.replace(/[^a-zA-Z0-9_-]/g,"_"),".pdf"),document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(r),6e4)}catch(e){u(e instanceof Error?e.message:"다운로드에 실패했습니다.")}finally{x.current=!1,d(!1)}}};return(0,a.jsxs)("div",{className:l?"w-full":"",children:[(0,a.jsxs)("button",{type:"button",onClick:m,disabled:o||!t,className:"inline-flex items-center justify-center gap-2 rounded-lg border border-zinc-200 bg-white px-3 py-2.5 text-sm font-medium text-zinc-700 hover:bg-zinc-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-500 disabled:cursor-not-allowed disabled:opacity-50 dark:border-zinc-600 dark:bg-zinc-800 dark:text-zinc-100 dark:hover:bg-zinc-700 ".concat(l?"w-full":""),children:[o?(0,a.jsx)(r.Z,{"aria-hidden":!0,size:15,className:"animate-spin motion-reduce:animate-none"}):(0,a.jsx)(s.Z,{"aria-hidden":!0,size:15}),o?"".concat(h," 준비 중…"):"".concat(h," 다운로드")]}),!t&&(0,a.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:"플랜 안내의 결제 내역에서 다운로드할 수 있습니다."}),c&&(0,a.jsx)("p",{role:"alert",className:"mt-2 text-xs text-red-600 dark:text-red-400",children:c})]})}},43232:function(e,t,n){"use strict";n.d(t,{O:function(){return i}});var a=n(57437);let i=e=>{let{size:t=32,className:n="",strokeWidth:i=1.9}=e;return(0,a.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:i,strokeLinecap:"square",strokeLinejoin:"miter",className:n,children:(0,a.jsx)("path",{d:"M12 7 L17 12 L12 17 L7 12 Z"})})}},34687:function(e,t,n){"use strict";n.d(t,{$z:function(){return h},Ck:function(){return p},V$:function(){return f},yR:function(){return x}});
1var a=n(57437),i=n(2265),r=n(73247),s=n(21235),l=n(90982),o=n(54292),d=n(58346),c=n(93448);let u=0;function x(){return u>0}function h(e){let{label:t="학생 명단을 불러오고 있어요",rows:n=14}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Q,{label:t,className:"sr-only"}),(0,a.jsx)("div",{"aria-hidden":"true",className:"space-y-0.5",children:Array.from({length:n},(e,t)=>(0,a.jsxs)("div",{className:"flex h-8 items-center gap-3 px-3",children:[(0,a.jsx)(s.Od,{width:16,height:12,className:"shrink-0 rounded"}),(0,a.jsx)(s.Od,{width:t%3==0?56:44,height:14,className:"rounded"})]},t))})]})}function m(e){let{i:t}=e;return(0,a.jsxs)("div",{className:"flex flex-col overflow-hidden rounded-lg bg-white shadow-sm dark:bg-[#191919] dark:shadow-none",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,a.jsx)(s.Od,{width:t%2?88:104,height:16,className:"rounded"}),t<3&&(0,a.jsx)(s.Od,{width:64,height:10,className:"rounded"})]}),(0,a.jsx)("div",{className:"px-4 pb-4",children:Array.from({length:5},(e,t)=>(0,a.jsxs)("div",{className:"flex h-[37px] items-center gap-3",children:[(0,a.jsx)(s.Od,{width:12,height:12,className:"shrink-0 rounded"}),(0,a.jsx)(s.Od,{width:"".concat(36-4*t,"%"),height:12,className:"rounded"}),(0,a.jsx)(s.Od,{width:40,height:12,className:"ml-auto rounded"})]},t))})]})}function f(e){let{label:t}=e;return(0,a.jsx)("div",{className:"flex-1 overflow-y-auto bg-[#fafaf9] dark:bg-[#09090b]","aria-busy":"true",children:(0,a.jsxs)("div",{className:"mx-auto max-w-[1600px] space-y-4 p-4",children:[t&&(0,a.jsx)(l.Q,{label:t,className:"sr-only"}),(0,a.jsx)("div",{"aria-hidden":"true",className:"grid grid-cols-1 gap-4 lg:grid-cols-2 2xl:grid-cols-3",children:Array.from({length:6},(e,t)=>(0,a.jsx)(m,{i:t},t))}),(0,a.jsxs)("div",{"aria-hidden":"true",className:"overflow-hidden rounded-lg bg-white shadow-sm dark:bg-[#191919] dark:shadow-none",children:[(0,a.jsx)("div",{className:"px-4 py-3",children:(0,a.jsx)(s.Od,{width:120,height:16,className:"rounded"})}),(0,a.jsx)("div",{className:"h-9 bg-zinc-50 dark:bg-white/[0.03]"}),Array.from({length:4},(e,t)=>(0,a.jsxs)("div",{className:"flex h-[37px] items-center gap-6 border-t border-zinc-100 px-6 dark:border-white/[0.04]",children:[(0,a.jsx)(s.Od,{width:20,height:12,className:"rounded"}),(0,a.jsx)(s.Od,{width:56,height:12,className:"rounded"}),(0,a.jsx)(s.Od,{width:36,height:12,className:"ml-auto rounded"}),(0,a.jsx)(s.Od,{width:36,height:12,className:"rounded"})]},t))]})]})})}function p(e){let{label:t="학생 명단을 불러오고 있어요"}=e,n=function(){let[e]=(0,i.useState)(()=>0===u);return(0,i.useLayoutEffect)(()=>(u+=1,()=>{u-=1}),[]),e}();return(0,a.jsxs)("div",{className:"h-full flex flex-col md:flex-row bg-zinc-50 text-sm dark:bg-[#0c0c0e]","data-loading-layout":"students",children:[(0,a.jsx)(o.r,{variant:"students",label:t,className:"md:hidden px-4"}),(0,a.jsxs)("div",{className:(0,c.cn)("hidden md:flex w-60 shrink-0 flex-col border-r border-zinc-200 bg-white dark:border-white/5 dark:bg-[#09090b] student-sidebar nav-rail-shadow",n&&"sub-sidebar-enter"),children:[(0,a.jsx)("div",{className:"border-b border-zinc-200 p-3 dark:border-white/5",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(r.Z,{className:"absolute left-2.5 top-2.5 text-zinc-400 dark:text-white/30",size:14,"aria-hidden":"true"}),(0,a.jsx)("div",{className:"rounded-md bg-[#fafaf9] py-2 pl-8 pr-3 text-xs text-zinc-400 dark:bg-[#18181b] dark:text-white/30",children:"학생 검색..."})]})}),(0,a.jsxs)("div",{className:"flex-1 overflow-hidden p-2 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex w-full items-center gap-3 rounded-md bg-zinc-100 px-3 py-1.5 text-zinc-900 dark:bg-[#202023] dark:text-white student-sidebar-item","data-selected":"true",children:[(0,a.jsx)("span",{className:"flex w-5 shrink-0 justify-center",children:(0,a.jsx)(d.d,{name:"avatars-group",size:16,className:"opacity-50"})}),(0,a.jsx)("span",{className:"truncate text-sm font-semibold student-sidebar-name",children:"전체 학생"}),(0,a.jsx)(s.Od,{width:24,height:12,className:"ml-auto rounded"})]}),(0,a.jsx)(h,{label:t})]})]}),(0,a.jsx)("div",{className:"hidden md:flex md:flex-1 md:flex-col overflow-hidden bg-white dark:bg-[#0c0c0e]",children:(0,a.jsx)(f,{})})]})}},26862:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});var a=n(2265),i=n(8679);function r(){let[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)("app_open"),[s,l]=(0,a.useState)(!1),o=(0,a.useCallback)(()=>{t((0,i.Kw)()),r((0,i.k2)()),l(!0)},[]);return(0,a.useEffect)(()=>{o();let e=()=>
1o();return window.addEventListener("biometric-lock-prefs-changed",e),window.addEventListener("storage",e),()=>{window.removeEventListener("biometric-lock-prefs-changed",e),window.removeEventListener("storage",e)}},[o]),{enabled:e,mode:n,hydrated:s,setEnabled:(0,a.useCallback)(e=>{(0,i.TG)(e),t(e)},[]),setMode:(0,a.useCallback)(e=>{(0,i.qo)(e),r(e)},[])}}},45444:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});var a=n(2265);function i(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(0,a.useCallback)(n=>{t&&"Enter"===n.key&&(n.metaKey||n.ctrlKey)&&(n.nativeEvent.isComposing||229===n.keyCode||(n.preventDefault(),e()))},[e,t])}},58819:function(e,t,n){"use strict";n.d(t,{d:function(){return r}});var a=n(2265),i=n(21652);function r(){let[e,t]=(0,a.useState)(()=>(0,i.UM)());return(0,a.useEffect)(()=>{let e=()=>t((0,i.UM)());e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e);let n="function"==typeof window.matchMedia?window.matchMedia(i.RS):null;return(null==n?void 0:n.addEventListener)?n.addEventListener("change",e):null==n||n.addListener(e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),(null==n?void 0:n.removeEventListener)?n.removeEventListener("change",e):null==n||n.removeListener(e)}},[]),e}},8679:function(e,t,n){"use strict";n.d(t,{C4:function(){return h},Io:function(){return o},Kw:function(){return d},TG:function(){return u},c5:function(){return s},k2:function(){return c},qo:function(){return x}});let a="biometricLockEnabled",i="biometricLockMode",r="app_open",s=3e5,l=["student-management","evaluation-record","activity","behavior-record"];function o(e){return l.includes(e)}function d(){try{var e;return e=localStorage.getItem(a),null!=e&&""!==e&&("true"===e||"1"===e)}catch(e){return!1}}function c(){try{var e;return e=localStorage.getItem(i),"sensitive_menus"===e||"app_open"===e?e:r}catch(e){return r}}function u(e){localStorage.setItem(a,e?"true":"false"),window.dispatchEvent(new CustomEvent("biometric-lock-prefs-changed"))}function x(e){localStorage.setItem(i,e),window.dispatchEvent(new CustomEvent("biometric-lock-prefs-changed"))}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return e>=t}},22797:function(e,t,n){"use strict";n.d(t,{H:function(){return r},y:function(){return i}});let a=null;function i(e){return a=e,()=>{a===e&&(a=null)}}async function r(){return!a||a()}},53185:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var a=n(27526),i=n(9244),r=n(12618);async function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(0,i.cz)()){await (0,a.zB)(e,(0,r.a)(t));return}(0,r.u)();let s=new Uint8Array(32);crypto.getRandomValues(s);let l=btoa(String.fromCharCode(...Array.from(s))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),o=btoa(String.fromCharCode(...Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",new TextEncoder().encode(l)))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");localStorage.setItem("naemo:nativeAuthVerifier",l);let{Browser:d}=await n.e(9090).then(n.bind(n,49090));await d.open({url:"https://naemo.ai/auth/native-start?provider=".concat(encodeURIComponent(e),"&challenge=").concat(o)})}},16338:function(e,t,n){"use strict";n.d(t,{o:function(){return l}});var a=n(3011),i=n(89134),r=n(83008);let s=null,l=(0,a.U)()((0,i.tJ)((e,t)=>({title:"체크리스트",items:[],isLoaded:!1,isLoading:!1,syncWithDB:async e=>{var n;if((null==e?void 0:null===(n=e.user)||void 0===n?void 0:n.id)&&"teacher-1"!==e.user.id){if(!t().isLoaded){console.warn("[checklist] 서버에서 아직 불러오지 못해 저장을 보류합니다.");return}s&&clearTimeout(s),s=setTimeout(async()=>{s=null;let{title:n,items:a}=t();try{await (0,r.X)("saveChecklist",{title:n,items:a},e)}catch(e){console.error("Failed to sync checklist with DB:",e)}},700)}},flushSync:async e=>{var n;if(!(null==e?void 0:null===(n=e.user)||void 0===n?void 0:n.id)||"teacher-1"===e.user.id||!t().isLoaded||!s)return;clearTimeout(s),s=null;let{title:a,items:i}=t();try{await (0,r.X)("saveChecklist",{title:a,items:i},e)}catch(e){console.error("Failed to flush checklist to DB:",e)}},loadFromDB:async n=>{if(n&&"teacher-1"!==n.user.id&&!t().isLoading&&!t().isLoaded){e({isLoading:!0});try{let t=await (0,r.X)("getChecklist",{},n);t.success?t.data?e({title:t.data.title||"체크리스트",items:t.data.items||[],isLoaded:!0,isLoading:!1}):e({isLoaded:!0,isLoading:!1}):(console.warn("[checklist] load failed, keeping local data:",t.message||t.error),e({isLoading:!1}))}catch(t){console.error("Failed to load checklist from DB:",t),e({isLoading:!1})}}},setTitle:(n,a)=>{e({title:n}),t().syncWithDB(a)},addItem:function(n){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=crypto.randomUUID();return e(e=>({items:[...e.items,{id:i,text:a,checked:!1}
1]})),t().syncWithDB(n),i},updateItem:(n,a,i)=>{e(e=>({items:e.items.map(e=>e.id===n?{...e,text:a}:e)})),t().syncWithDB(i)},toggleItem:(n,a)=>{e(e=>({items:e.items.map(e=>e.id===n?{...e,checked:!e.checked}:e)})),t().syncWithDB(a)},deleteItem:(n,a)=>{e(e=>({items:e.items.filter(e=>e.id!==n)})),t().syncWithDB(a)},reorderItems:(n,a)=>{e({items:n}),t().syncWithDB(a)},clearItems:()=>{s&&(clearTimeout(s),s=null),e({items:[],isLoaded:!1,isLoading:!1})}}),{name:"checklist-storage-v1",partialize:e=>({title:e.title,items:e.items})}))},86267:function(e,t,n){"use strict";n.d(t,{X:function(){return s}});var a=n(3011),i=n(89134),r=n(83008);let s=(0,a.U)()((0,i.tJ)((e,t)=>({linkedNotes:[],targetNoteId:null,isLoaded:!1,syncWithDB:async()=>{if(!t().isLoaded){console.warn("[workNoteShortcut] 서버에서 아직 불러오지 못해 저장을 보류합니다.");return}let{linkedNotes:e}=t();try{await (0,r.X)("saveWorkNoteShortcut",{linkedNotes:e},{user:{id:"",name:"",role:""}})}catch(e){console.error("Failed to sync work note shortcuts with DB:",e)}},loadFromDB:async()=>{try{let i=await (0,r.X)("getWorkNoteShortcut",{},{user:{id:"",name:"",role:""}});if(i.success){var n,a;e({linkedNotes:null!==(a=null===(n=i.data)||void 0===n?void 0:n.linkedNotes)&&void 0!==a?a:t().linkedNotes,isLoaded:!0})}else console.warn("[workNoteShortcut] 불러오기 실패, 이 기기 데이터를 유지합니다.")}catch(e){console.error("Failed to load work note shortcuts from DB:",e)}},addLinkedNote:(n,a)=>{e(e=>e.linkedNotes.some(e=>e.id===n)?e:{linkedNotes:[...e.linkedNotes,{id:n,title:a}]}),t().syncWithDB()},removeLinkedNote:n=>{e(e=>({linkedNotes:e.linkedNotes.filter(e=>e.id!==n)})),t().syncWithDB()},setTargetNoteId:t=>e({targetNoteId:t}),clearTargetNoteId:()=>e({targetNoteId:null}),clear:()=>e({linkedNotes:[],targetNoteId:null,isLoaded:!1})}),{name:"work-note-shortcut-v2",partialize:e=>({linkedNotes:e.linkedNotes})}))}},function(e){e.O(0,[2211,6137,2558,7526,1351,6689,5176,3145,3100,9585,2873,2825,5480,8319,3369,7790,6248,6011,6245,3202,5101,882,4666,7135,2971,2117,1744],function(){return e(e.s=28910)}),_N_E=e.O()}]);

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.