PageSourceSearch

https://clipo.ai/assets/CourseProjectCreatePage-4DyMI3vJ.js

js clipo.ai collected 2026-10-05 11:56:53 UTC 5,633 bytes, 2 lines download raw bytes

1import{h1 as w,g$ as k,a as E,i as P,w as T,x as l,r as d,jd as S,c as O,je as R,y as A,j as a,ff as _,X as C,a4 as x,t as p,D}from"./index-aREvobyF.js";import{c as I}from"./helpers-D9B3X5P1.js";import{P as N}from"./PageMetaHeader-6lUw-EYb.js";import{P as q}from"./ProjectEditForm-BsR8OZq6.js";import"./big-C3dewPw-.js";import"./projectIn.zod-DhZtY_Bm.js";import"./ButtonWithTooltip-mLqxUQDU.js";import"./BorderStyle-66LuUJot.js";import"./grid-DsfbS9aq.js";import"./grid-item-DKjw6wQ8.js";import"./ResetInputConfirmModal-BlHQjZHT.js";import"./alert-4blNHQ0a.js";import"./alert-Brzb1jZD.js";import"./number-input-CRP-Yqgs.js";import"./ai-failure-messages-rTmvRgra.js";import"./MDXRichEditor-1z6faDwW.js";import"./KatexRender-C66B1828.js";import"./mathLatex-CP574j0c.js";import"./index-Cn7rxYiT.js";import"./index-B1SmgUP9.js";import"./syntax-Rwz07zQm.js";import"./input-group-BhrJGvNG.js";import"./input-element-D7gNC_RA.js";import"./simple-grid-CyZDy2Fv.js";import"./index-tSUJqBuq.js";import"./WritingTraceHelpModalButton-BC-7DY4P.js";import"./WritingTraceOverview-BaQKqclB.js";import"./IconButtonWithTooltip-BidBKNAt.js";import"./react-apexcharts.min-fYSCb3wM.js";import"./index-Dz2fSXDx.js";import"./switch-BmUkzzHy.js";import"./file-CYbLPrGl.js";import"./sort-9qeDC_ML.js";import"./HomeworkSubmitTypeCard-CE0LPFRH.js";import"./usePrompt-DLyyo_pO.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="be6888cb-cd29-4600-b6c5-3cab6810293e",e._sentryDebugIdIdentifier="sentry-dbid-be6888cb-cd29-4600-b6c5-3cab6810293e")}catch{}const K=8,ge=()=>{const{course:e}=w(),{activeTour:r}=k(),t=r==="ai-scoring",u=E(),{state:s}=P(),{data:i}=T({...l.projects.detail({projectKey:(s==null?void 0:s.projectKey)??""}),enabled:!t&&(s==null?void 0:s.projectKey)!==void 0}),m=d.useMemo(()=>t?S:G({project:i,template:s==null?void 0:s.projectTemplate,subject:e.subject}),[t,e.subject,i,s==null?void 0:s.projectTemplate]),{mutate:f,isPending:h}=O({mutationFn:o=>t?Promise.resolve({}):R.appsProjectsApiCreateCourseProject({courseKey:e.key,formData:o})}),b=A(),g=o=>{if(t)return;const c={...o,tables:JSON.stringify(o.tables),elements:JSON.stringify(o.elements),sections:JSON.stringify(o.sections),homework:JSON.stringify(o.homework)};f(c,{onSuccess:()=>{p.create({title:"수행평가 설계가 등록되었습니다.",type:"success"}),b.invalidateQueries({queryKey:l.users.profile._ctx.teacher.queryKey}),b.invalidateQueries({queryKey:l.courses.detail({courseKey:e.key}).queryKey}),u("..")},onError:n=>{if(n instanceof x&&n.status===400&&n.body.detail==="과제 개수 제한에 도달했습니다."){p.create({title:"클리포 무료 체험권은 최대 10개의 수행평가를 지원해요. 수행평가를 추가로 생성하려면 클리포 이용권 구매가 필요해요.",type:"error"});return}p.create({title:D(n),type:"error"})}})},[y,v]=d.useState(null);return d.useEffect(()=>{if(!t)return;const o=()=>{const n=document.querySelector(`[data-testid="${_.PROJECT_CREATE_PAGE}"]`);n&&v(n.getBoundingClientRect().right)};o(),window.addEventListener("resize",o);const c=window.setInterval(o,250);return()=>{window.removeEventListener("resize",o),window.clearInterval(c)}},[t]),a.jsxs(a.Fragment,{children:[t&&y!==null&&a.jsx("div",{"data-testid":_.CREATE_PROJECT_PAGE_ANCHOR,style:{position:"fixed",top:"50vh",left:y+K,width:1,height:1,pointerEvents:"none",zIndex:1}}),a.jsxs(C,{width:"100%",height:"100%",rowGap:0,"data-testid":_.PROJECT_CREATE_PAGE,children:[a.jsx(N,{title:"수행평가(과제) 설계",description:"성취기준과 채점기준 등을 입력하고 과제물 제출 방식을 설정할 수 있습니다. 임시 저장도 가능합니다.",backLink:"../"}),a.jsx(q,{project:m,isPending:h,isSaved:!1,onSubmit:g},(i==null?void 0:i.key)??"new")]})]})},G=({project:e,template:r,subject:t})=>{const u=[I(t)];if(e){const s=(t==null?void 0:t.id)===e.course_subject.id;return{name:e.name,is_public:e.is_public,sections:e.sections,tables:s&&e.tables.length>0?e.tables.map(i=>({...i,achievement_standard_item:{...i.achievement_standard_item,code:i.achievement_standard_item.code.startsWith("etc$")?"":i.achievement_standard_item.code}})):u,elements:e.elements.length>0?e.elements.map(i=>({key:void 0,title:i.title,levels:i.levels.map(m=>({...m,key:void 0}))})):[],custom_rubric:e.custom_rubric,unsubmission:e.unsubmission,unapply:e.unapply,homework:e.homework?{...e.homework,is_bulk_uploaded_by_teacher:e.homework.is_bulk_uploaded_by_teacher??!1,submit_types:e.homework.submit_types??[],enable_late_submit:e.homework.enable_late_submit??!1,schedules:null,key:void 0,questions:(e.homework.questions??[]).map(({title:i,recommended_character_count:m})=>({title:i,recommended_character_count:m}))}:{is_bulk_uploaded_by_teacher:!0,submit_types:["PR"],max_file_count:1,enable_late_submit:!1,can_use_clipboard:!0}}}if(r){const s=(t==null?void 0:t.id)===r.subject.id;return{template_key:r.key,is_public:r.is_public,tables:s&&r.schema_info.tables.length>0?r.schema_info.tables:u,elements:r.schema_info.elements.length>0?r.schema_info.elements:[],sections:[],custom_rubric:!1,unsubmission:0,unapply:0,homework:{is_bulk_uploaded_by_teacher:!0,submit_types:["PR"],max_file_count:1}}}return{name:"",is_public:!0,tables:u,elements:[],sections:[],custom_rubric:!1,unsubmission:0,unapply:0,homework:{is_bulk_uploaded_by_teacher:!0,submit_types:["PR"],max_file_count:1,can_use_clipboard:!0}}};export{ge as default,G as getDefaultProject};
2//# sourceMappingURL=CourseProjectCreatePage-4DyMI3vJ.js.map

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.