PageSourceSearch

https://ballal.co.kr/assets/FreeSemesterScreen-CzngXc-T.js

js ballal.co.kr collected 2026-10-07 15:18:01 UTC 17,181 bytes, 5 lines download raw bytes

1import{v as xe,r as n,S as Y,i as Le,P as Ee,aq as Re,a3 as le,h as Ie,k as we,l as Te,j as s,Q as ce,$ as _e,am as Fe,ab as je,ap as Me,ao as Ge,a4 as Oe,a5 as He,a6 as De,a7 as Pe,a1 as Ne,O as ke,an as $e}from"./index-Bx9_uK1Q.js";import{R as Be}from"./RightLayerMenuLayout-DMyCNDkq.js";import{f as Ve,g as ze,h as We,u as qe,c as Ue,J as Ye,D as Ke,d as Je,w as Qe,T as Xe,t as Ze,e as et,q as tt,A as st,y as rt,z as at}from"./ThinMaterialGatePanel-Bvg0XZUk.js";import{u as nt}from"./useSchoolLevels-BTM_6o2W.js";import{l as ot,m as it,a8 as lt,F as ue,z as ae,A as ct,C as ut,Y as dt,_ as pt,I as mt,$ as ht,a3 as St,a4 as gt,a9 as ne,a7 as vt}from"./stepHeaderValues-CB72Kd2P.js";import{u as yt}from"./useShallowPrefill-DnquC5UP.js";import{G as ft,O as At,R as bt}from"./RosterResultStep-OpFCbjfz.js";import{T as Ct}from"./ThinMaterialNotice-CxlGLU27.js";import{R as xt}from"./ResultStep-BAhDRtzx.js";import"./activitySections-etSRXoM4.js";import"./wand-sparkles-DN_bgB1T.js";import"./pencil-line-CqJyDoaZ.js";import"./info-vbb2NWDA.js";import"./list-checks-jLIiWHK_.js";import"./postfixSignalLabels-CBq9pKER.js";import"./GenerateOptionsPanel-Dbl4ov4g.js";import"./refineGaveNothing-CTIUqO3f.js";const K=xe(["grade","area","activity","style","generate"]),Lt=["style"],D={career_search:"진로탐색",topic_choice:"주제선택",art_pe:"예술·체육",club:"동아리"},Q=["career_search","topic_choice","art_pe","club"],de={career_search:[1,2,3],topic_choice:[1,2,3],art_pe:[3],club:[3]};function Et(t){return t===null?Q:Q.filter(a=>de[a].includes(t))}function Rt(t,a){return a===null?!0:de[t].includes(a)}const oe=Ke("free_semester","중");function It(t){const a=t.schoolLevelId.length>0&&t.grade!==null,o=t.areaCode!==null,l=t.studentActivity.trim().length>0||t.activity.trim().length>0;return a&&o&&l}function wt(t){const a=t.studentActivity.trim();if(t.areaCode===null)return a;const o=D[t.areaCode],l=Number(t.areaHours.trim()),S=Number.isInteger(l)&&l>0?`[자유학기 ${o} 영역 · 이수 ${l}시간]`:`[자유학기 ${o} 영역]`;return a.length===0?S:`${S}
2${a}`}function Tt(t){var o;const a=((o=t.emphasis)==null?void 0:o.trim())??"";return{standards:[],achievementChips:[],visibleChips:[],studentActivity:t.studentActivity,activity:t.activity,...a.length>0?{emphasis:a}:{},options:t.options,writingStyle:t.writingStyle,embellishment:t.embellishment,schoolLevelCode:"중",recordItemCode:"free_semester"}}function _t(){const{schoolLevels:t,schoolLevelsError:a,retrySchoolLevels:o,codeOf:l}=nt(),[e,S]=n.useState(""),[d,C]=n.useState(null),[i,y]=n.useState(null),[x,_]=n.useState(""),R=n.useRef({studentActivity:"",activity:"",areaCode:null,areaHours:"",emphasis:""}),{generateOptions:I,writingStyle:F,embellishment:p,setLengthChars:w,setCount:T}=ot(oe),f=it(),m=Ve(),{clearSummaries:v,pruneSummaries:j}=m,{clearResults:M}=f,A=ze(),P=A.reset,N=We(A.run,P),{runGate:G,reset:O}=N,b=qe({chipsState:Ye,upload:m,liveGeneration:f,summaryLabels:{activityLabel:"자유학기 활동 참여",growthLabel:"변화·성장",slotLabels:{[Y]:le},optionalSlots:Re},resetRefine:O,bindRefineCreateCardMark:A.bindCreateCardMark}),k=b.api,{studentNo:$,studentActivity:u,activity:g,attachedFiles:L}=b.studentAxis,{fromCreateCard:H,createCardSource:r,refineSource:E,refineAppliedText:h}=b.studentAxis,{setStudentNo:B,setStudentActivity:pe,setActivity:me,setAttachedFiles:he,setExtraText:X,resetAllStudentAxis:Z,claimLiveOwner:ee}=k,V=b.studentAxis.extraTexts[Y]??"",Se=n.useCallback(c=>X(Y,c),[X]);R.current={studentActivity:u,activity:g,areaCode:i,areaHours:x,emphasis:V},n.useEffect(()=>{const c=t.find(z=>z.code==="중");c&&c.id!==e&&S(c.id)},[t,e]);const W=l(e),ge=n.useCallback(c=>{C(Number.isFinite(c)?c:null)},[]),ve=n.useCallback(c=>{y(c)},[]),ye=b.roster.nextStudent;n.useEffect(()=>{Z(),v(),M(),O()},[d,i,Z,v,M,O]),n.useEffect(()=>{i!==null&&!Rt(i,d)&&y(null)},[d,i]);const te=n.useRef(i);n.useEffect(()=>{const c=te.current;te.current=i,c!==null&&c!==i&&_("")},[i]),n.useEffect(()=>{j(L)},[L,j]);const q=n.useMemo(()=>It({schoolLevelId:e,grade:d,areaCode:i,studentActivity:u,activity:g})&&Le($),[e,d,i,u,g,$]),fe=n.useMemo(()=>({grade:e.length>0&&d!==null,area:i!==null,activity:u.trim().length>0||g.trim().length>0,style:!0,generate:!1}),[e,d,i,u,g]),Ae=n.useCallback(async()=>
2{if(!q||!W||m.parsing||m.anySummarizing||k.rosterGenerating||!await G({studentActivity:u,growth:g||void 0,hasAttachedFiles:L.length>0}))return;let c,z=g,se=V;if(m.hasSelectableSummary)c=m.getMergedFromSelected(u,L,A.activeArtifactFileIds(u));else{const Ce=u;c=await m.run(u,L);const U=R.current;if(U.studentActivity!==Ce){m.setWarning("생성 중 입력이 바뀌어 파일 반영을 취소했습니다. 다시 생성해 주세요.");return}z=U.activity,se=U.emphasis}const re=R.current,be=wt({areaCode:re.areaCode,areaHours:re.areaHours,studentActivity:c});ee(),f.generate({...Ue({studentActivity:u,fromCreateCard:H,refineSource:E,refineAppliedText:h}),...Tt({studentActivity:be,activity:z,emphasis:se,options:I,writingStyle:F,embellishment:p})})},[q,W,m,L,u,g,i,x,V,I,F,p,f,k.rosterGenerating,G,ee,H,E,h]);return{schoolLevels:t,schoolLevelsError:a,retrySchoolLevels:o,schoolLevelId:e,schoolLevelCode:W,recordItemCode:"free_semester",grade:d,grades:Ee,studentNo:$,areaCode:i,areaHours:x,studentActivity:u,fromCreateCard:H,createCardSource:r,runRestoreWrites:b.runRestoreWrites,activity:g,emphasis:V,attachedFiles:L,generateOptions:I,writingStyle:F,embellishment:p,stepDone:fe,canGenerate:q,setGrade:ge,setSchoolLevelId:S,setStudentNo:B,setAreaCode:ve,setAreaHours:_,setStudentActivity:pe,setActivity:me,setEmphasis:Se,setAttachedFiles:he,lengthLimit:oe,setLengthChars:w,setCount:T,resetStudentInput:ye,upload:m,generation:{...b.projectedGeneration,generate:f.generate},roster:b.roster,refine:A,thinGate:N,generate:Ae}}function Ft(t,a,o){const l=a&&o!==null?`${a}${o}`:null,e=t?`자유학기(${t})`:"자유학기";return l?`${e} - ${l}`:e}function jt(t){const{schoolLevels:a,schoolLevelId:o,grade:l,areaCode:e,areaHours:S,studentNo:d,studentActivity:C,fromCreateCard:i,createCardSource:y,activity:x,emphasis:_,generateOptions:R,embellishment:I}=t,F=n.useCallback((p,w)=>{var A;const T=((A=a.find(P=>P.id===o))==null?void 0:A.code)??null,f=e?D[e]:null,m=Ft(f,T,l),v=d.trim(),j=Ie("free_semester",{schoolLevelCode:T,grade:typeof l=="number"?l:null,areaCode:e||null,areaHours:typeof S=="string"&&S.trim().length>0?S.trim():null},v.length>0,{options:we({generateOptions:R,writingStyle:p.writingStyle,embellishment:I,writerAdapted:p.writerAdapted}),score:p.score??null}),M=Te({studentActivity:C,activity:x,emphasis:_,fromCreateCard:i,createCardSource:y},p.mergedStudentActivity);return{recordKind:"free_semester",title:m,finalText:p.text,studentNo:v.length>0?v:null,subjectLabel:f,recordItem:"free_semester",schoolLevel:T,curriculumLabel:null,aiRawText:w,stdCodes:null,byteLength:typeof p.byteLength=="number"?p.byteLength:null,status:"saved",meta:j,input:M,postfix:p.postfix??null}},[a,o,l,e,S,d,C,i,y,x,_,R,I]);return lt(t.generation.cards.length,F,t.generation.cards,t.generation.draftSessionId,t.generation.scoringSettled,t.generation.restoredRecordId)}function Mt({g:t}){const a=t.grades.map(o=>({value:String(o),label:`${o}학년`}));return s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:ue},children:s.jsx(ce,{label:"학년 (중학교)",options:a,value:t.grade===null?"":String(t.grade),onChange:o=>t.setGrade(Number(o)),clearable:!1,shape:"square"})})}function Gt({g:t}){const a=Et(t.grade),o=a.map(e=>({value:e,label:D[e]})),l=a.length===Q.length?"자유학기 4개 영역 중 이 특기사항을 작성할 영역을 하나 고르세요. 영역별로 따로 작성합니다(진로탐색·주제선택·예술·체육·동아리).":"이 학년에 편성되는 영역 중 이 특기사항을 작성할 영역을 하나 고르세요. 영역별로 따로 작성합니다(예술·체육·동아리 영역은 3학년만 편성됩니다).";return s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:ue},children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},children:[s.jsx(ae,{title:"활동 영역",description:l}),s.jsx(ce,{label:"",options:o,value:t.areaCode??"",onChange:e=>t.setAreaCode(e),clearable:!1,shape:"square"})]}),s.jsx(ct,{divided:!0,children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--spacing-sm)",maxWidth:"var(--width-form-field-min)"},children:[s.jsx(ae,{title:"이수시간 (선택)",description:"이 영역의 이수시간을 적으면 서술에 참고됩니다. 몰라도 비워 두면 됩니다."}),s.jsx(_e,{type:"text",inputMode:"numeric","aria-label":"이수시간",value:t.areaHours,maxLength:3,onChange:e=>t.setAreaHours(e.target.value.replace(/[^0-9]/g,"").replace(/^0+(?=\d)/,"").slice(0,3)),suffix:s.jsx("span",{style:{display:"flex",alignItems:"center",paddingRight:"var(--spacing-sm)",fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)",whiteSpace:"nowrap"},children:"시간"})})]})})]})}const ie={grade:"학년",area:"영역·이수시간",activity:"활동 내용",style:"스타일",generate:"생성"},Ot={grade:1,area:2,activity:4,style:1,generate:2},J=`학생 활동을 키워드나 메모하듯 입력해도 됩니다. 문장 다듬기가 제대로 된 문장으로 구조화해 정리해 드립니다.
3(문장 예시) 검사에서 나온 제빵사가 궁금해 동네 빵집 사장님을 인터뷰하고, 알게 된 점을 정리해 발표함.
4(키워드 예시) 제빵사 선택, 빵집 인터뷰, 정리·발표`;function Ht({g:t,onAfterNextStudent:a}){const o=jt(t);return s.jsx(bt,{generation:t.generation,save:o,roster:t.roster,nextStudentLabel:"다음 학생 (현재 학생은 목록에 보관)",nextStudentDisabled:t.upload.parsing||t.upload.anySummarizing,onAfterNextStudent:a})}function es({onNavigate:t,prefill:a,onPrefillConsumed:o,restore:l}={}){var H;const e=_t(),{isAuthenticated:S}=Fe(),d=je(),C=d==="XS"||d==="SM",[i,y]=n.useState(!1);Me(i&&!C);const x=n.useCallback(()=>{C&&y(!1),requestAnimationFrame(()=>{const r=document.getElementById(ut);r instanceof HTMLElement&&(r.scrollIntoView({behavior:"smooth",block:"center"}),r.focus({preventScroll:!0}))})},[C]),[_,R]=n.useState(!1),I=e.setAreaCode;yt({prefill:a,nav:"free-semester",schoolLevels:e.schoolLevels,schoolLevelsError:e.schoolLevelsError,setSchoolLevelId:e.setSchoolLevelId,setGrade:e.setGrade,applyExtra:r=>{const E=r.areaCode;typeof E=="string"&&E in D&&I(E);const h=r.areaHours;typeof h=="string"&&e.setAreaHours(h),$e(a==null?void 0:a.options,{setLengthChars:e.setLengthChars,setCount:e.setCount})},onConsumed:()=>{R(!0),o==null||o()}});const F=n.useCallback(r=>{e.runRestoreWrites(()=>Ge(r,{setStudentActivity:e.setStudentActivity,restoreCreateCardMark:e.refine.restoreCreateCardMark,setActivity:e.setActivity,setEmphasis:e.setEmphasis}))},[e]);dt({restore:l,masterConsumed:_,generationStatus:e.generation.status,cardCount:e.generation.cards.length,injectRestoredCard:e.generation.injectRestoredCard,applyScores:e.generation.applyScores,applyPostfix:e.generation.applyPostfix,applyMergedStudentActivity:e.generation.applyMergedStudentActivity,applyFreeInput:F});const[p,w]=n.useState(!1),T=n.useCallback(()=>{if(!S){w(!0);return}e.generate()},[S,e]),f=n.useCallback(r=>ie[r],[]),{lockedOf:m,current:v,setActiveStep:j,stepperItems:M}=pt(K,e.stepDone,{optionalSteps:Lt,labelOf:f}),A=n.useMemo(()=>Object.fromEntries(K.map(r=>[r,()=>j(r)])),[j]),P={...e,stepDone:{grade:e.stepDone.grade&&e.stepDone.area}},N=n.useMemo(()=>Je({studentActivity:e.studentActivity,growth:e.activity,hasAttachedFiles:e.attachedFiles.length>0}),[e.studentActivity,e.activity,e.attachedFiles.length]),[G,O]=n.useState(!0),b=n.useMemo(()=>s.jsx(Qe,{open:G,onToggle:()=>O(r=>!r),current:v==="style"}),[G,v]),k={grade:s.jsx(Mt,{g:e}),area:s.jsx(Gt,{g:e}),activity:s.jsx(At,{g:e,roster:e.roster,onOpenRosterPanel:()=>y(!0),showEmphasis:!0,labels:{activityTitle:"자유학기 활동 참여",recordItemLabel:"자유학기활동 특기사항",activityDescription:s.jsxs(s.Fragment,{children:["이 학생이 위에서 고른 영역의 활동에서 무엇을 하고 어떤 흥미·역량·성장을 보였는지 입력해 주세요(참여 태도·맡은 역할·관심 분야·산출물 등)."," ",s.jsx("strong",{style:{color:"var(--color-primary)",fontWeight:"var(--font-weight-semibold)",textDecoration:"underline dotted",textUnderlineOffset:"var(--spacing-xs)"},children:"구체적인 활동·흥미일수록 이 학생만의 특기사항"}),"이 만들어집니다."]}),activityAriaLabel:"자유학기 활동 참여",activityPlaceholder:J,uploadHint:"활동 계획서·소감문·산출물 업로드(선택)",uploadNotice:"업로드 파일은 자유학기활동상황 생성에만 쓰이고 요약 생성 직후 즉시 파기됩니다.",growthDescription:"비워 두면 위 활동 내용을 바탕으로 생성 시 자동으로 서술됩니다.",growthPlaceholder:`특별히 강조할 변화·성장이 있을 때만 적으세요.
5예: 처음에는 진로에 막연했으나, 탐색 활동을 거치며 관심 분야를 구체화하게 됨.`}}),style:s.jsx(st,{g:e,recordItemCode:e.recordItemCode,subjectNoun:"자유학기활동 특기사항",styleOpen:G,onStyleToggle:()=>O(r=>!r)}),generate:s.jsxs(s.Fragment,{children:[s.jsx(mt,{collapsible:!0,data:{curriculumLabel:[(H=e.schoolLevels.find(r=>r.id===e.schoolLevelId))==null?void 0:H.displayName,e.grade!=null?`${e.grade}학년`:null,"자유학기활동"].filter(Boolean).join(" ")||"-",subjectHidden:!0,studentNo:e.studentNo,standardCount:null,extraRows:[{label:"활동 영역",value:e.areaCode?D[e.areaCode]:"미선택"},...e.areaHours.trim()?[{label:"이수시간",value:`${e.areaHours.trim()}시간`}]:[],...e.emphasis.trim()?[{label:le,value:e.emphasis.trim()}]:[]],studentActivity:e.studentActivity,growthActivity:e.activity,writingStyleName:Pe(e.recordItemCode,e.writingStyle),writingStyleDescription:De(e.recordItemCode,e.writingStyle),embellishmentName:He(e.embellishment),embellishmentDescription:Oe(e.embellishment)}},e.roster.activeRowId),s.jsx(Ne,{children:s.jsx(Xe,{gate:e.thinGate,refine:e.refine,labels:{activityTitle:"자유학기 활동 참여",activityAriaLabel:"자유학기 활동 참여",activityPlaceholder:J,recordItemLabel:"자유학기활동 특기사항"},studentActivity:e.studentActivity,setStudentActivity:e.setStudentActivity,growth:e.activity,onGenerate:T,askMessage:s.jsx(Ze,{})})}),s.jsx(ft,{g:P,itemNoun:"자유학기활동 특기사항",limitBadge:s.jsx(ke,{variant:"gray",size:"md",children:tt("자유학기",e.lengthLimit,"영역별")}),lengthLimit:e.lengthLimit,generateButtonLabel:"자유학기활동 특기사항 생성하기",needMaterialHint:"이 영역의 활동 내용을 적거나 관련 자료를 올려 주세요.",prerequisiteHint:"학년과 활동 영역을 먼저 골라 주세요.",onGenerate:T,thinMaterialNotice:et(N)?s.jsx(Ct,{state:N,standardNoun:null,
5studentActivity:e.studentActivity,onChangeStudentActivity:e.setStudentActivity,activityPlaceholder:J}):null,optionsDivided:!0})]})},$=r=>{var E;switch(r){case"grade":return vt({levelName:(E=e.schoolLevels.find(h=>h.id===e.schoolLevelId))==null?void 0:E.displayName,grade:e.grade});case"area":{const h=e.areaHours.trim();return{headerValue:ne([e.areaCode?D[e.areaCode]:"활동 영역 미선택",h?`이수시간 ${h}시간`:null]),headerValueMissing:!e.areaCode}}case"activity":{const h=gt({items:[{label:"자유학기 활동 참여",count:e.studentActivity.trim().length,unit:"자"}]}),B=e.studentNo.trim();return B?{...h,headerValue:ne([`학생번호 ${B}`,h.headerValue])}:h}case"generate":return St({lengthChars:e.generateOptions.lengthChars});default:return{}}},u=K.map(r=>({...$(r),id:r,label:ie[r],locked:m[r],done:e.stepDone[r],current:v===r,skeletonFields:Ot[r],panel:k[r],onActivate:A[r],extraHeaderAction:r==="style"?b:void 0})),g=e.generation.status!=="idle",L=v==="generate"?"solid":"soft";return s.jsx(Be,{bodyScroll:"parent",reopenTab:{onReopen:()=>y(!0),ariaLabel:"여러 학생 작성 열기"},layerMenu:{isOpen:i,onClose:()=>y(!1),title:"여러 학생 작성",closeOnOutsideClick:!1,modalViewable:!1,children:s.jsx(at,{roster:e.roster,switchDisabled:e.upload.parsing||e.upload.anySummarizing,onAfterSwitch:x,defaultGrade:e.grade,config:{templateName:"자유학기활동"}})},children:s.jsx(rt,{active:i&&!C,roster:{rows:e.roster.rows,activeRowId:e.roster.activeRowId},children:s.jsx(ht,{title:"자유학기활동",subtitle:"진로탐색·주제선택·예술·체육·동아리 영역에서 학생이 보인 참여·흥미·성장을 자유학기활동상황 특기사항으로 작성합니다.",maxWidth:"xl",stepperItems:M,schoolLevelsError:e.schoolLevelsError,onRetrySchoolLevels:e.retrySchoolLevels,steps:u,resultNode:g?s.jsx(Ht,{g:e,onAfterNextStudent:x},e.roster.activeRowId):null,groundingNode:g?s.jsx(xt,{generation:e.generation,recordItemCode:e.recordItemCode,schoolLevelCode:e.schoolLevelCode,standardCount:0}):null,resultAccent:L,signupPromptOpen:p,onCloseSignupPrompt:()=>w(!1),onGoLogin:()=>{w(!1),t==null||t("auth","login")},onGoSignup:()=>{w(!1),t==null||t("auth","signup")}})})})}export{es as FreeSemesterScreen};

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.