PageSourceSearch

https://ieltsscience.fun/wp-content/plugins/ielts-science-lms/publ…/build/1152.js?ver=42281205e646a7e15724

js ieltsscience.fun collected 2026-10-08 05:51:19 UTC 39,382 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunk_ielts_science_shell=globalThis.webpackChunk_ielts_science_shell||[]).push([[1152],{59375(e,t,i){i.d(t,{A:()=>x});var s=i(51609),n=i(66101),r=i(50772),a=i(1743),o=i(63743),l=i(45120),c=i(99616),d=i(24e3),p=i(61197),u=i(60903),m=i(89712),g=i(60977),h=i(10790);function f(e){return null}function x({id:e,label:t,error:i,size:x="medium",sx:b,...y}){let A=s.useId();return e&&(A=e),(0,h.jsxs)(n.q,{allowWheelScrub:!0,...y,render:(e,t)=>(0,h.jsx)(c.A,{size:x,ref:e.ref,disabled:t.disabled,required:t.required,error:i,variant:"outlined",sx:b,children:e.children}),children:[(0,h.jsx)(f,{...y}),(0,h.jsx)(u.A,{htmlFor:A,children:t}),(0,h.jsx)(r.Y,{id:A,render:(e,i)=>(0,h.jsx)(d.A,{label:t,inputRef:e.ref,value:i.inputValue,onBlur:e.onBlur,onChange:e.onChange,onKeyUp:e.onKeyUp,onKeyDown:e.onKeyDown,onFocus:e.onFocus,slotProps:{input:e},endAdornment:(0,h.jsxs)(p.A,{position:"end",sx:{flexDirection:"column",maxHeight:"unset",alignSelf:"stretch",borderLeft:"1px solid",borderColor:"divider",ml:0,"& button":{py:0,flex:1,borderRadius:.5}},children:[(0,h.jsx)(a.P,{render:(0,h.jsx)(l.A,{size:x,"aria-label":"Increase"}),children:(0,h.jsx)(m.A,{fontSize:x,sx:{transform:"translateY(2px)"}})}),(0,h.jsx)(o.X,{render:(0,h.jsx)(l.A,{size:x,"aria-label":"Decrease"}),children:(0,h.jsx)(g.A,{fontSize:x,sx:{transform:"translateY(-2px)"}})})]}),sx:{pr:0}})})]})}f.muiName="Input"},50826(e,t,i){i.d(t,{$:()=>_});var s=i(39907),n=i(51609),r=i(61930),a=i(14121),o=i(68917),l=i(3716),c=i(27723),d=i(27026),p=i(45120),u=i(88581),m=i(97552),g=i(99511),h=i(15107),f=i(41214),x=i(89981),b=i(86203),y=i(31588),A=i(54092),v=i(93832),j=i(10790);const w=({open:e,onClose:t,...i})=>{const s=(0,n.useRef)(null),w=window.ielts_speaking_data?.site_logo_url||"",_=window.ielts_speaking_data?.logo_alt||"Site Logo",k=window.ielts_speaking_data?.site_title||"IELTS Writify",S=window.ielts_speaking_data?.social_login_active,I=Boolean(window.ielts_speaking_data?.register_url),[C,E]=(0,n.useState)(!I),[D,F]=(0,n.useState)(""),[T,M]=(0,n.useState)(""),[R,L]=(0,n.useState)(!0),[P,W]=(0,n.useState)(""),[O,$]=(0,n.useState)(!1),[z,N]=(0,n.useState)(!1),[B,U]=(0,n.useState)(!1),V=()=>{const e=new URL(window.location.href),t=e.protocol.replace(":","")||"https",i=`intent://${e.host}${e.pathname}${e.search}#Intent;scheme=${t};package=com.android.chrome;end`,s=navigator.userAgent||"";/Android/i.test(s)?window.location.href=i:window.open(window.location.href,"_blank","noopener,noreferrer")},G=()=>{t&&t({},"backdropClick"),F(""),M(""),W("")};return(0,n.useEffect)(()=>{if(e){const e=(()=>{if("undefined"==typeof window||"undefined"==typeof navigator)return!1;const e=navigator.userAgent||"";return!!/Android|iPhone|iPad|iPod/i.test(e)&&(/(FBAN|FBAV|FB_IAB|Instagram|Line\/|MicroMessenger|TikTok|Snapchat|;\s?wv\)|\swv\s|WebView)/i.test(e)||/(iPhone|iPod|iPad)(?!.*Safari)(?!.*CriOS)(?!.*FxiOS)(?!.*EdgiOS)/i.test(e))})();if(N(e),U(!1),e){const e=setTimeout(()=>{V()},300);return()=>clearTimeout(e)}}e&&window.nsLinkClickHandler&&setTimeout(()=>{"function"==typeof window.nsLinkClickHandler&&window.nsLinkClickHandler()},100)},[e]),(0,j.jsxs)(r.A,{open:e,onClose:G,maxWidth:"xs",fullWidth:!0,...i,PaperProps:{sx:{borderRadius:2,overflow:"hidden"}},children:[(0,j.jsx)(o.A,{sx:{pt:3,pb:1,px:3},children:(0,j.jsxs)(d.A,{sx:{py:2,px:3,textAlign:"center",position:"relative"},children:[(0,j.jsx)(p.A,{onClick:G,sx:{position:"absolute",top:3,right:3},children:(0,j.jsx)(b.A,{})}),(0,j.jsx)(d.A,{sx:{mb:2,display:"flex",justifyContent:"center",alignItems:"center"},children:w?(0,j.jsx)(d.A,{component:"img",src:w,alt:_,sx:{height:"50px",maxWidth:"100%"}}):(0,j.jsx)(u.A,{variant:"h5",fontWeight:"bold",children:k})}),(0,j.jsx)(u.A,{variant:"h5",fontWeight:"bold",gutterBottom:!0,children:C?(0,c.__)("Welcome Back!","ielts-science-lms"):(0,c.__)("Create your account!","ielts-science-lms")}),(0,j.jsx)(u.A,{variant:"body2",children:C?(0,c.__)("Log in to access your account","ielts-science-lms"):(0,c.__)("Sign up for a free account to get started","ielts-science-lms")})]})}),(0,j.jsxs)(a.A,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",gap:2,px:3,pb:3,pt:1},children:[z?(0,j.jsxs)(d.A,{width:"100%",display:"flex",flexDirection:"column",gap:2,children:[(0,j.jsxs)(d.A,{component:"ol",sx:{m:0,pl:3,display:"grid",gap:1.5,color:"text.primary"},children:[(0,j.jsx)(d.A,{component:"li",sx:{pl:.5},children:(0,j.jsx)(u.A,{variant:"body1",fontWeight:"bold",children:(0,c.__)("Tap the menu in the top-right corner.","ielts-science-lms")})}),(0,j.jsx)(d.A,{component:"li",sx:{pl:.5},children:(0,j.jsx)(u.A,{variant:"body1",fontWeight:"bold",children:(0,c.__)('Choose "Open in browser" or "Open in Safari/Chrome".',"ielts-science-lms")})})]}),(0,j.jsx)(m.A,{severity:"info",variant:"outlined",sx:{alignItems:"flex-start"},children:(0,c.__)("Open with external browser to use the app.","ielts-science-lms")}),(0,j.jsx)(l.A,{fullWidth:!0,variant:"contained",size:"large",startIcon:(0,j.jsx)(y.A,{}),onClick:V,sx:{fontWeight:"bold",py:1.5},children:(0,c.__)("Open in external browser","ielts-science-lms")}),(0,j.jsx)(l.A,{fullWidth:!0,variant:"text",size:"small",onClick:async()=>{try{await navigator.clipboard.writeText(window.location.href),U(!0)}catch(e){console.error("Copy link failed:",e)}},children:B?(0,c.__)("Link copied","ielts-science-lms"):(0,c.__)("Copy page link","ielts-science-lms")})]}
1):(0,j.jsxs)(j.Fragment,{children:[C&&(0,j.jsxs)(d.A,{component:"form",onSubmit:async e=>{if(e.preventDefault(),D.trim()&&T.trim()){$(!0),W("");try{const e=window.ielts_speaking_data?.ajax_url;if(!e)throw new Error("AJAX URL not found");const i=new FormData;i.append("action","ielts_science_login"),i.append("username",D),i.append("password",T),i.append("remember",R?"1":"0"),i.append("nonce",window.ielts_speaking_data?.nonce||"");const s=await fetch(e,{method:"POST",body:i,credentials:"include"}),n=await s.json();n.success?(t&&t({},"backdropClick"),window.location.reload()):(W(n.data?.message||(0,c.__)("Login failed. Please check your credentials.","ielts-science-lms")),console.error("Login error:",n.data))}catch(e){W((0,c.__)("An error occurred. Please try again.","ielts-science-lms")),console.error("Login error:",e)}finally{$(!1)}}else W((0,c.__)("Please enter both username and password","ielts-science-lms"))},width:"100%",children:[(0,j.jsx)(g.A,{fullWidth:!0,margin:"normal",label:(0,c.__)("Email or Username","ielts-science-lms"),variant:"outlined",value:D,onChange:e=>F(e.target.value),required:!0}),(0,j.jsx)(g.A,{fullWidth:!0,margin:"normal",label:(0,c.__)("Password","ielts-science-lms"),type:"password",variant:"outlined",value:T,onChange:e=>M(e.target.value),required:!0}),(0,j.jsx)(h.A,{control:(0,j.jsx)(f.A,{checked:R,onChange:e=>L(e.target.checked),color:"primary"}),label:(0,c.__)("Remember me","ielts-science-lms")}),P&&(0,j.jsx)(u.A,{color:"error",variant:"body2",sx:{mt:1},children:P}),(0,j.jsx)(l.A,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",size:"large",disabled:O,sx:{fontWeight:"bold",py:1.5,mt:2},children:O?(0,c.__)("Logging in...","ielts-science-lms"):(0,c.__)("Login","ielts-science-lms")}),S&&(0,j.jsx)(x.A,{sx:{width:"100%",my:2},children:(0,j.jsx)(u.A,{variant:"body2",color:"text.secondary",children:(0,c.__)("OR","ielts-science-lms")})})]}),S&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("a",{ref:s,href:(()=>{const e=window.ielts_speaking_data?.login_url||"http://localhost:10004/wp-login.php";return(0,v.addQueryArgs)(e,{loginSocial:"google",action:"connect",redirect:"current",provider:"google"})})(),"data-plugin":"nsl","data-action":"connect","data-redirect":"current","data-provider":"google","data-popupwidth":"600","data-popupheight":"600",hidden:!0,children:(0,c.__)("Google Login","ielts-science-lms")}),(0,j.jsx)(l.A,{fullWidth:!0,variant:"contained",size:"large",onClick:e=>{e.preventDefault(),z||s.current&&s.current.click()},startIcon:(0,j.jsx)(A.A,{}),sx:{fontWeight:"bold",py:1.5,backgroundColor:"#4285F4","&:hover":{backgroundColor:"#357ae8"}},children:C?(0,c.__)("Login with Google","ielts-science-lms"):(0,c.__)("Sign up with Google","ielts-science-lms")})]}),I&&(0,j.jsxs)(j.Fragment,{children:[!C&&S&&(0,j.jsx)(x.A,{sx:{width:"100%",my:1},children:(0,j.jsx)(u.A,{variant:"body2",color:"text.secondary",children:(0,c.__)("OR","ielts-science-lms")})}),(0,j.jsx)(d.A,{textAlign:"center",children:(0,j.jsxs)(u.A,{variant:"body2",children:[C?(0,c.__)("Don't have an account?","ielts-science-lms"):(0,c.__)("Already have an account?","ielts-science-lms"),(0,j.jsx)(l.A,{variant:"text",color:"primary",onClick:()=>{I&&E(!C)},sx:{padding:0,fontWeight:"bold",minWidth:"auto"},children:C?(0,c.__)("Sign up","ielts-science-lms"):(0,c.__)("Login","ielts-science-lms")})]})})]})]}),(0,j.jsx)(u.A,{variant:"caption",color:"text.secondary",align:"center",sx:{mt:1},children:(0,c.__)("By continuing, you agree to our Terms of Service and Privacy Policy","ielts-science-lms")})]})]})},_=()=>{const e=(0,s.b9)();return{openLoginDialog:async()=>{await e.open(w)}}}},28414(e,t,i){i.d(t,{V:()=>w});var s=i(39907),n=(i(51609),i(61930)),r=i(33153),a=i(68917),o=i(47143),l=i(27723),c=i(41233),d=i(45120),p=i(89981),u=i(5525),m=i(27026),g=i(88581),h=i(67561),f=i(69692),x=i(11419),b=i(99511),y=i(86203),A=i(59375),v=i(10790);const j=({open:e,onClose:t})=>{const i=(0,o.useSelect)(e=>({language:e(c.store).get("ielts-science-lms/settings","language"),bulkFeedbackEnabled:e(c.store).get("ielts-science-lms/settings","bulkFeedbackEnabled"),feedbackStyleSample:e(c.store).get("ielts-science-lms/settings","feedbackStyleSample"),feedbackStyleSampleVI:e(c.store).get("ielts-science-lms/settings","feedbackStyleSampleVI"),targetScore:e(c.store).get("ielts-science-lms/settings","targetScore")}),[]),{set:s,toggle:j}=(0,o.useDispatch)(c.store);return(0,v.jsxs)(n.A,{open:e,onClose:(e,i)=>
1t?.(e,i),maxWidth:"sm",fullWidth:!0,children:[(0,v.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between","&.MuiDialogTitle-root":{fontSize:"1.5rem"}},children:[(0,l.__)("Settings","ielts-science-lms"),(0,v.jsx)(d.A,{onClick:()=>t?.({},"backdropClick"),children:(0,v.jsx)(y.A,{})})]}),(0,v.jsx)(p.A,{}),(0,v.jsx)(r.A,{children:(0,v.jsxs)(u.A,{spacing:2,divider:(0,v.jsx)(p.A,{flexItem:!0}),children:[(0,v.jsxs)(m.A,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,v.jsx)(g.A,{fontWeight:"bold",children:(0,l.__)("Feedback Languague","ielts-science-lms")}),(0,v.jsxs)(h.A,{label:(0,l.__)("Language","ielts-science-lms"),variant:"standard",value:i.language,onChange:e=>{s("ielts-science-lms/settings","language",e.target.value)},children:[(0,v.jsx)(f.A,{value:"en",children:(0,l.__)("English","ielts-science-lms")}),(0,v.jsx)(f.A,{value:"vi",children:(0,l.__)("Vietnamese","ielts-science-lms")})]})]}),(0,v.jsxs)(m.A,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,v.jsxs)(m.A,{display:"flex",flexDirection:"column",gap:1,children:[(0,v.jsx)(g.A,{fontWeight:"bold",children:(0,l.__)("Bulk Feedback","ielts-science-lms")}),(0,v.jsx)(g.A,{variant:"body2",children:(0,l.__)("This option open result page in new tabs helping teachers grade multiple essays simultaneously.","ielts-science-lms")})]}),(0,v.jsx)(x.A,{checked:i.bulkFeedbackEnabled,onChange:()=>{j("ielts-science-lms/settings","bulkFeedbackEnabled")}})]}),(0,v.jsxs)(m.A,{display:"flex",flexDirection:"column",gap:1,children:[(0,v.jsx)(g.A,{fontWeight:"bold",children:(0,l.__)("Target Score","ielts-science-lms")}),(0,v.jsx)(g.A,{variant:"body2",children:(0,l.__)("Select your target IELTS score to tailor the feedback accordingly.","ielts-science-lms")}),(0,v.jsx)(A.A,{label:(0,l.__)("Target Score","ielts-science-lms"),value:i.targetScore,onValueChange:e=>{null!==e&&s("ielts-science-lms/settings","targetScore",e)},min:5,max:9})]}),(0,v.jsxs)(m.A,{display:"flex",flexDirection:"column",gap:1,children:[(0,v.jsx)(g.A,{fontWeight:"bold",children:(0,l.__)("Feedback Style","ielts-science-lms")}),(0,v.jsx)(g.A,{variant:"body2",children:(0,l.__)("Give a sample of your usual feedback to help the AI learn your tone. This will not affect the scores.","ielts-science-lms")}),(0,v.jsx)(b.A,{multiline:!0,fullWidth:!0,label:(0,l.__)("Sample Feedback (EN)","ielts-science-lms"),placeholder:(0,l.__)("E.g. Your essay is pretty good ...| I find your essay exceeddingly acceptable ...","ielts-science-lms"),minRows:4,maxRows:8,value:i.feedbackStyleSample,onChange:e=>{s("ielts-science-lms/settings","feedbackStyleSample",e.target.value)}})]}),(0,v.jsxs)(m.A,{display:"flex",flexDirection:"column",gap:1,children:[(0,v.jsx)(g.A,{fontWeight:"bold",children:(0,l.__)("Vietnamese Feedback Sample","ielts-science-lms")}),(0,v.jsx)(g.A,{variant:"body2",children:(0,l.__)("Provide your feedback sample in Vietnamese.","ielts-science-lms")}),(0,v.jsx)(b.A,{multiline:!0,fullWidth:!0,label:(0,l.__)("Sample Feedback (VI)","ielts-science-lms"),placeholder:(0,l.__)("Ví dụ: Bài viết của em khá tốt ... | Ủa thấy bài nỉ khá okela ... | Cụ thấy bài cháu cũng được ...","ielts-science-lms"),minRows:4,maxRows:8,value:i.feedbackStyleSampleVI,onChange:e=>{s("ielts-science-lms/settings","feedbackStyleSampleVI",e.target.value)}})]})]})})]})},w=()=>{const e=(0,s.b9)();return{openSettingsDialog:async()=>{await e.open(j)}}}},18694(e,t,i){i.d(t,{F:()=>r,o:()=>a});var s=i(69589);function n(e){return{...e??{}}}function r(){const e=function(){if("undefined"!=typeof window)return window.ielts_speaking_data}(),t=e?.current_user,i=Array.isArray(e?.user_roles)?e.user_roles:[];return{is_logged_in:Boolean(e?.is_logged_in),wp_id:t?.id??null,capabilities:n(t?.capabilities),roles:i,has_subscription:Boolean(e?.has_subscription_active),name:e?.user_display_name||t?.name||"",email:t?.email||"",image:e?.user_avatar||t?.avatar_urls?.[96]||""}}function a(){const e=(0,s.w)(),t=r();if(!e)return t;const i=Array.isArray(e.user.roles)?e.user.roles:[];return{is_logged_in:!0,wp_id:e.user.wp_id,capabilities:n(e.user.capabilities??t.capabilities),roles:i,has_subscription:Boolean(e.user.has_subscription),name:e.user.name||t.name,email:e.user.email||t.email,image:e.user.image||t.image}}},85346(e,t,i){i.d(t,{ev:()=>n.ev});var s=i(68775),n=i(78547);(0,s.Q)()},43715(e,t,i){i.r(t),i.d(t,{SpeakingShellSubmissionPage:()=>he,default:()=>fe});var s=i(51609),n=i(13392),r=i(27026),a=i(88581),o=i(5525),l=i(44437),c=i(15107),d=i(41214),p=i(45120),u=i(92173),m=i(83589),g=i(71174),h=i(27723),f=i(47143),x=i(41233),b=i(3716),y=i(561),A=i(93402),v=i(71300),j=i(45892),w=i(20938),_=i(85346);var k=i(21404),S=i(54890),I=i(85502),C=i(91783),E=i(51319),D=i(96674),F=i(43666),T=i(21443),M=i(29721),R=i(20704),L=i(27835),P=i(90782),W=i(68204),O=i(42157),$=i(11955),z=i(82080),N=i(50104),B=i(10790);const U=(e,t=2)=>{if(0===e)return"0 Bytes";const i=t<0?0:t,s=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,s)).toFixed(i))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][s]},V=({file:e,onDelete:t,status:i,preview:s,progress:n,errorMessage:l,iconColor:c="primary",progressColor:d="primary"})=>{const u=(0,$.m)();return(0,B.jsx)(z.N,{value:e,id:e.id,dragListener:!1,dragControls:u,drag:"y",style:{position:"relative",listStyleType:"none",padding:0},children:(0,B.jsxs)(r.A,{sx:{display:"flex",alignItems:"center",p:2,mb:1,border:"1px solid",borderColor:"divider",borderRadius:1,backgroundColor:"background.paper"},children:[(0,B.jsx)(p.A,{size:"small",sx:{mr:1,cursor:"grab",touchAction:"none"},onPointerDown:e=>u.start(e),children:(0,B.jsx)(W.A,{})}),(()=>{if(s)return(0,B.jsx)(r.A,{component:"img",src:s,alt:e?.file.name||"File preview",sx:{height:50,borderRadius:1,mr:2}});const t=e?.file.type?.split("/")[0];switch(t){case"audio":return(0,B.jsx)(L.A,{color:c});case"video":return(0,B.jsx)(P.A,{color:c});default:return(0,B.jsx)(F.A,{color:c})}})(),(0,B.jsxs)(r.A,{sx:{ml:{xs:0,md:2},flexGrow:1},children:[(0,B.jsx)(a.A,{variant:"body2",noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:{xs:"50px",sm:"unset"}},children:e?.file.name?(0,B.jsx)("span",{dangerouslySetInnerHTML:{__html:e.file.name}}):(0,B.jsx)(I.A,{variant:"text",width:100,sx:{fontSize:"0.875rem"}})}),(0,B.jsxs)(o.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,B.jsx)(a.A,{variant:"caption",color:"textSecondary",children:void 0!==e.file.size?U(e.file.size):(0,B.jsx)(I.A,{variant:"text",width:40,sx:{fontSize:"0.75rem"}})}),("ERROR"===i||"CANCELED"===i)&&l&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(a.A,{variant:"caption",color:"textSecondary",children:"•"}),(0,B.jsx)(a.A,{variant:"caption",color:"ERROR"===i?"error":"warning",children:l})]})]}),("UPLOADING"===i||"number"==typeof n)&&(0,B.jsx)(C.A,{variant:"determinate",value:n,color:d,sx:{mt:1,height:4,borderRadius:2}}),"PENDING_METADATA"===i&&(0,B.jsx)(C.A,{variant:"indeterminate",color:d,sx:{mt:1,height:4,borderRadius:2}})]}),(0,B.jsxs)(r.A,{sx:{ml:2,display:"flex",alignItems:"center"},children:["COMPLETE"===i?(0,B.jsx)(T.A,{color:"success"}):"ERROR"===i?(0,B.jsx)(M.A,{color:"error"}):"CANCELED"===i?(0,B.jsx)(M.A,{color:"warning"}):"UPLOADING"===i||"number"==typeof n?`${Math.round(n||0)}%`:"PENDING_METADATA"===i?(0,B.jsx)(S.A,{size:25}):null,(0,B.jsx)(p.A,{onClick:()=>t(e.id),size:"small",children:(0,B.jsx)(R.A,{})})]})]})})},G=(0,D.Ay)("div")(({theme:e,isDragAccept:t,isDragReject:i})=>({border:`2px dashed ${(e.vars||e).palette.divider}`,borderRadius:e.shape.borderRadius,padding:e.spacing(3),textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:e.spacing(2,0),cursor:"pointer",transition:"border-color 0.3s ease",...t&&{borderColor:(e.vars||e).palette.success.main,backgroundColor:(e.vars||e).palette.background.default},...i&&{borderColor:(e.vars||e).palette.error.main,backgroundColor:(e.vars||e).palette.error.dark}})),X=({acceptedFileTypes:e,maxFileSize:t,uploadIcon:i=(0,B.jsx)(k.A,{color:"primary"}),linkText:s="Select file",descriptionText:n="or drag and drop",captionText:l,pasteInstructionText:c,files:d=[],setFiles:p,onDrop:u,handleDelete:m,onReorderComplete:g})=>{const h={onDrop:u,accept:e,maxSize:t}
1,{getRootProps:f,getInputProps:x,isDragActive:b,isDragAccept:y,isDragReject:A}=(0,O.VB)(h),v=()=>e||t?`Accepted file types: ${e?Object.entries(e).map(([e,t])=>t.length>0?t.join(", "):e.replace("/*","")).join(", "):"all file types"}. ${t?`Max file size: ${U(t)}`:""}`:null;return(0,B.jsxs)(r.A,{children:[(0,B.jsxs)(G,{...f({isDragAccept:y,isDragReject:b&&A}),children:[(0,B.jsx)("input",{...x()}),i,(0,B.jsxs)(o.A,{direction:{xs:"column",md:"row"},spacing:1,alignItems:"center",children:[(0,B.jsx)(E.A,{underline:"hover",children:s}),(0,B.jsx)(a.A,{variant:"body2",children:n})]}),c&&(0,B.jsx)(a.A,{variant:"body2",color:"textSecondary",sx:{mt:1},children:c}),v()&&(0,B.jsx)(a.A,{variant:"caption",color:"textSecondary",mt:1,children:v()}),l&&(0,B.jsx)(a.A,{variant:"caption",color:"textSecondary",mt:1,children:l})]}),(0,B.jsx)(r.A,{sx:{mt:1},children:(0,B.jsx)(N.x,{axis:"y",values:d,onReorder:e=>{p(e),g&&g(e)},layoutScroll:!0,style:{padding:0},children:d.map(e=>(0,B.jsx)(V,{file:e,status:e.status,preview:e.preview,progress:e.progress,errorMessage:e.errorMessage,onDelete:m},e.id))})})]})};var q=i(22785),H=i(61930),K=i(68917),Q=i(14121),J=i(33153),Y=i(28385),Z=i(11624);const ee=({open:e,file:t,onComplete:i,onCancel:n})=>{const[a,l]=(0,s.useState)(null),c=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(t){const e=new FileReader;e.onload=()=>l(e.result),e.readAsDataURL(t)}},[t]);const d=e=>()=>{c.current?.rotateImage(e)};return(0,B.jsxs)(H.A,{open:e,onClose:n,maxWidth:"lg",children:[(0,B.jsxs)(r.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:3,pt:2,pb:0},children:[(0,B.jsx)(K.A,{sx:{"&.MuiDialogTitle-root":{fontSize:{xs:"0.85",md:"1rem"},fontWeight:"bold",p:0}},children:"Crop Image"}),(0,B.jsxs)(Q.A,{sx:{p:0},children:[(0,B.jsx)(b.A,{onClick:n,size:"medium",children:"Cancel"}),(0,B.jsx)(b.A,{onClick:()=>{if(c.current&&t){const e=c.current.getCanvas();e&&e.toBlob(e=>{if(e){const s=new File([e],t.name,{type:t.type||"image/jpeg",lastModified:Date.now()});i(s)}},t.type||"image/jpeg")}},color:"primary",variant:"contained",size:"medium",children:"Save Crop"})]})]}),(0,B.jsx)(J.A,{children:a&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(q.IOb,{src:a,ref:c,className:"cropper",style:{maxHeight:"calc(100vh - 300px)"}}),(0,B.jsxs)(o.A,{spacing:2,direction:"row",justifyContent:"center",mt:1,children:[(0,B.jsx)(p.A,{size:"large","aria-label":"rotate left",onClick:d(-90),children:(0,B.jsx)(Y.A,{})}),(0,B.jsx)(p.A,{size:"large","aria-label":"rotate right",onClick:d(90),children:(0,B.jsx)(Z.A,{})})]})]})})]})},te=({enableImageCropping:e=!1,onDrop:t,files:i,setFiles:n,handleDelete:r,acceptedFileTypes:a,maxFileSize:o,enableClipboardPaste:l=!1,...c})=>
1{const[d,p]=(0,s.useState)(null),[u,m]=(0,s.useState)([]),g=(0,s.useRef)(null),f=(0,s.useCallback)(e=>{if(!a)return!0;for(const[t]of Object.entries(a))if(t.endsWith("/*")){const i=t.replace("/*","");if(e.type.startsWith(i))return!0}else if(e.type===t)return!0;return!1},[a]),x=(0,s.useCallback)(e=>!o||e.size<=o,[o]),b=(0,s.useCallback)((i,s)=>{if(e){const e=i.filter(e=>e.type.startsWith("image/")),n=i.filter(e=>!e.type.startsWith("image/"));e.length>0&&(p(e[0]),m(t=>[...t,...e.slice(1)])),n.length>0&&t(n,s)}else t(i,s)},[e,t]),y=(0,s.useCallback)(e=>{if(!l)return;const t=e.clipboardData?.items;if(!t)return;const i=[],s=[];for(let e=0;e<t.length;e++){const n=t[e];if("file"!==n.kind)continue;const r=n.getAsFile();if(!r)continue;const a=r.name?.trim(),l=a?r:(()=>{const[e,t]=r.type.split("/"),i=t||"bin",s=(new Date).toISOString().replace(/[:.]/g,"-");return new File([r],`pasted-${e||"file"}-${s}.${i}`,{type:r.type,lastModified:r.lastModified})})();f(l)?x(l)?i.push(l):s.push({file:l,errors:[{code:"file-too-large",message:`File is larger than ${o} bytes`}]}):s.push({file:l,errors:[{code:"file-invalid-type",message:`File type ${l.type} is not accepted`}]})}(i.length>0||s.length>0)&&(e.preventDefault(),b(i,s))},[l,b,f,x,o]);return(0,s.useEffect)(()=>{if(l)return g.current?(document.addEventListener("paste",y),()=>{document.removeEventListener("paste",y)}):void 0},[l,y]),(0,B.jsxs)("div",{ref:g,children:[(0,B.jsx)(X,{...c,acceptedFileTypes:a,maxFileSize:o,pasteInstructionText:l?(0,h.__)("Tip: You can also paste audio files directly (Ctrl+V)","ielts-science-lms"):void 0,onDrop:b,files:i,setFiles:n,handleDelete:r}),e&&(0,B.jsx)(ee,{open:!!d,file:d,onComplete:e=>{t([e],[]),u.length>0?(p(u[0]),m(e=>e.slice(1))):p(null)},onCancel:()=>{u.length>0?(p(u[0]),m(e=>e.slice(1))):p(null)}})]})},ie=({initialMediaIds:e=[],onFileUploadComplete:t,onFileDelete:i,onChartMediaIdsChange:n})=>{const{files:r,setFiles:a,onDrop:o,handleDelete:l}=(({initialMediaIds:e=[],onFileUploadComplete:t,onFileDelete:i,queryKeyPrefix:n="mediaMetadata"})=>{const r=(0,A.jE)(),[a,o]=(0,s.useState)(()=>e?e.map(e=>({id:(0,w.A)(),mediaId:e,status:"PENDING_METADATA",preview:null,errorMessage:null,file:{type:"unknown/placeholder"}})):[]),l=(0,s.useRef)(!1),c=(0,s.useRef)({}),d=(0,v.E)({queries:e.map(e=>({queryKey:[n,e],queryFn:()=>(0,_.ev)(e),enabled:!!e&&!l.current,staleTime:1/0,gcTime:1/0,retry:!1}))}),p=d.every(e=>!e.isPending),u=(0,s.useCallback)((e,t,i)=>{const s=i||(0,w.A)();if(e.isError)return{id:s,mediaId:t,status:"ERROR",preview:null,errorMessage:e.error?.message||`Could not load media metadata for ID: ${t}`,file:{type:"unknown/placeholder",name:`Media ID: ${t}`},metadata:null};if(e.isSuccess&&e.data){const t=e.data;
1return{id:s,mediaId:t.id,status:"COMPLETE",progress:100,preview:t.mime_type?.startsWith("image/")?t.source_url:null,errorMessage:null,file:{name:t.title.rendered,size:t.media_details?.filesize,type:t.mime_type},metadata:t}}return null},[]);(0,s.useEffect)(()=>{if(p&&!l.current){if(0===e.length)return void(l.current=!0);o(t=>{const i=new Map(t.map(e=>[e.id,e]));let s=!1;return d.forEach((n,r)=>{const a=e[r];if(void 0===a)return;const o=t.find(e=>e.mediaId===a);if(o&&"PENDING_METADATA"!==o.status)return;const l="PENDING_METADATA"===o?.status?o:void 0,c=u(n,a,l?.id);if(c){const e=i.get(c.id);JSON.stringify(e)!==JSON.stringify(c)&&(i.set(c.id,c),s=!0)}else console.log(`useEffect: mapQueryToFileObject returned null for mediaId ${a}. Query status: ${n.status}`)}),e.every(e=>{const t=Array.from(i.values()).find(t=>t.mediaId===e);return t&&"PENDING_METADATA"!==t.status})&&(l.current=!0),s?Array.from(i.values()):t})}else l.current||p||console.log("useEffect: Skipped run, queries not settled yet.")},[e,p,u,d]);const m=(0,j.n)({mutationFn:({file:e,id:t})=>new Promise((i,s)=>{const n=new XMLHttpRequest,r=new FormData;r.append("file",e,e.name),r.append("title",e.name),r.append("create_speech_attempt","true"),c.current[t]=n,n.upload.onprogress=e=>{if(e.lengthComputable){const i=Math.min(90,Math.round(e.loaded/e.total*100));o(e=>e.map(e=>e.id===t?{...e,progress:i,status:"UPLOADING"}:e))}},n.onload=()=>{if(c.current[t]&&delete c.current[t],n.status>=200&&n.status<300)try{const e=JSON.parse(n.responseText);i(e)}catch(e){s(new Error("Failed to parse server response."))}else{console.error(`XHR Load Error Status for ID: ${t}`,n.status,n.statusText);let e=`${n.status} ${n.statusText}`;try{const t=JSON.parse(n.responseText);t.message&&(e=t.message)}catch(e){}s(new Error(e))}},n.onerror=()=>{console.error(`XHR Network Error for ID: ${t}`),c.current[t]&&delete c.current[t],s(new Error("Network error during upload."))},n.onabort=()=>{c.current[t]&&delete c.current[t],s(new Error("Upload canceled"))};const a=window.ielts_speaking_data?.nonce,l=window.ielts_speaking_data?.root_url;a&&l?(n.open("POST",`${l}wp/v2/media`),n.setRequestHeader("X-WP-Nonce",a),n.send(r)):s(new Error("WordPress nonce or root URL is missing."))}),onMutate:({file:e,id:t})=>{const i={id:t,file:{name:e.name,size:e.size,type:e.type},status:"UPLOADING",progress:0,preview:e.type.startsWith("image/")?URL.createObjectURL(e):null,errorMessage:null,metadata:null};return o(e=>[...e,i]),{fileObjectId:t}},onSuccess:(e,i,s)=>{const a=s?.fileObjectId;if(a){if(o(t=>t.map(t=>t.id===a?{...t,status:"COMPLETE",progress:100,errorMessage:null,mediaId:e.id,preview:e.mime_type?.startsWith("image/")?e.source_url:null,file:{name:e.title.rendered,size:e.media_details?.filesize,type:e.mime_type},metadata:e}:t)),t){const i=e?.speech_attempt?.id;t(e.id,Number(i))}r.setQueryData([n,e.id],e)}},onError:(e,t,i)=>{const s=i?.fileObjectId;if(!s)return;const n="Upload canceled"===e.message?"CANCELED":"ERROR",r=e.message;o(e=>e.map(e=>e.id===s?{...e,status:n,progress:void 0,errorMessage:r}:e))}}),g=(0,j.n)({mutationFn:async e=>Promise.resolve({success:!0}),onMutate:async e=>{const t=[...a],i=t.find(t=>t.mediaId===e);return i&&o(t=>t.filter(t=>t.mediaId!==e)),{previousFiles:t,fileToRemove:i}},onSuccess:(e,t,s)=>{i&&i(t)},onError:(e,t,i)=>{console.error(`Error handling UI removal for media ID ${t}:`,e),i?.previousFiles&&o(i.previousFiles)}}),h=(0,s.useCallback)((e,t)=>{e.forEach(e=>{const t=(0,w.A)();m.mutate({file:e,id:t})}),t.forEach(({file:e,errors:t})=>{const i={id:(0,w.A)(),file:{name:e.name,size:e.size,type:e.type},status:"ERROR",errorMessage:t[0]?.message||"File rejected by validator",preview:null,metadata:null};o(e=>[...e,i])})},[m]),f=(0,s.useCallback)(e=>{const t=a.find(t=>t.id===e);if(t){if("UPLOADING"===t.status){const t=c.current[e];t?t.abort():console.warn(`Attempted to cancel upload for ${e}, but no XHR found.`)}t.preview&&t.preview.startsWith("blob:")&&URL.revokeObjectURL(t.preview),"UPLOADING"!==t.status&&o(t=>t.filter(t=>t.id!==e)),t.mediaId&&"COMPLETE"===t.status?g.mutate(t.mediaId):i&&t.mediaId&&"COMPLETE"!==t.status&&i(t.mediaId)}},[a,g,i]);return(0,s.useEffect)(()=>{const e=c.current;return()=>{Object.entries(e).forEach(([e,t])=>{t&&t.readyState>0&&t.readyState<4&&t.abort()}),o(e=>
1(e.forEach(e=>{e.preview&&e.preview.startsWith("blob:")&&URL.revokeObjectURL(e.preview)}),e)),c.current={}}},[]),{files:a,setFiles:o,onDrop:h,handleDelete:f,isInitialMediaLoading:d.some(e=>e.isPending),initialMediaError:d.find(e=>e.isError)?.error||null}})({initialMediaIds:e||[],onFileUploadComplete:t,onFileDelete:i,queryKeyPrefix:"media"});return(0,B.jsx)(te,{enableImageCropping:!1,enableClipboardPaste:!0,acceptedFileTypes:{"audio/*":[]},maxFileSize:26214400,uploadIcon:(0,B.jsx)(k.A,{color:"primary"}),linkText:(0,h.__)("Select Audio File","ielts-science-lms"),descriptionText:(0,h.__)("or drag and drop audio files here","ielts-science-lms"),files:r,setFiles:a,onDrop:o,handleDelete:l,onReorderComplete:e=>{const t=e.filter(e=>void 0!==e.mediaId).map(e=>e.mediaId).filter(Boolean);n&&n(t)}})};var se=i(82877);var ne=i(50826),re=i(18694);const ae=({active:e=!1})=>{const t=(0,se.Zp)(),i=(0,re.o)(),o=(0,f.useSelect)(e=>e(x.store).get("ielts-science-lms/settings","bulkFeedbackEnabled"),[]),{audioMediaIds:c,isLoading:d,handleFileUploadComplete:p,handleFileDelete:u,handleAudioMediaIdsChange:m,handleSubmit:g,formValidation:h}=(({formType:e="speaking",initialAudioMediaIds:t=[],storageKey:i="ielts_speaking_entries",active:n=!0}={})=>
1{const[r,a]=(0,s.useState)(t),[o,l]=(0,s.useState)(!0),[c,d]=(0,s.useState)(!0),[p,u]=(0,s.useState)(void 0),[m,g]=(0,s.useState)(!1),[h,f]=(0,s.useState)({valid:!1,reason:""}),x=(0,s.useCallback)(()=>JSON.parse(localStorage.getItem(i)||"[]"),[i]),b=(0,s.useCallback)(e=>{localStorage.setItem(i,JSON.stringify(e))},[i]),y=(0,s.useCallback)((t,i)=>{const s=x(),n=Date.now(),r=s.filter(t=>t.form===e&&"sending"===t.status),a=s.filter(t=>t.form===e&&"sending"!==t.status),o=s.filter(t=>t.form!==e),l=a.filter(e=>"editing"===e.status);let c;if(l.length>0){c=l.sort((e,t)=>t.timestamp-e.timestamp)[0],c.timestamp=n,u(c["entry-id"]),void 0!==t&&(c.audioMediaIds=t);const e=c.audioMediaIds||[],s=c.audioAttemptMap||{},r={};e.forEach(e=>{void 0!==s[e]&&(r[e]=s[e])}),i&&i.attemptId&&e.includes(i.mediaId)&&(r[i.mediaId]=i.attemptId),c.audioAttemptMap=r}else{const s=a.filter(e=>"completed"===e.status);if(s.length>0){const e=s.sort((e,t)=>t.timestamp-e.timestamp),r=(0,w.A)();c={...e[0],"entry-id":r,status:"editing",timestamp:n},u(r),void 0!==t&&(c.audioMediaIds=t);const a=c.audioMediaIds||[],o=c.audioAttemptMap||{},l={};a.forEach(e=>{void 0!==o[e]&&(l[e]=o[e])}),i&&i.attemptId&&a.includes(i.mediaId)&&(l[i.mediaId]=i.attemptId),c.audioAttemptMap=l}else{const s=(0,w.A)();c={"entry-id":s,form:e,status:"editing",timestamp:n},u(s),void 0!==t&&(c.audioMediaIds=t),i&&i.attemptId&&(c.audioAttemptMap={[i.mediaId]:i.attemptId})}}const d=[...o,...r,c];b(d)},[e,x,b]);(0,s.useEffect)(()=>{if(!n)return;if(m)return;const i=x(),s=i.filter(t=>t.form===e),r=s.filter(e=>"editing"===e.status),o=s.filter(e=>"completed"===e.status),c=s.filter(e=>"sending"===e.status);if(r.length>0){const s=r.sort((e,t)=>t.timestamp-e.timestamp),n=s[0];if(s.length>1){const t=i.filter(t=>t.form!==e||"editing"!==t.status||t["entry-id"]===n["entry-id"]);b(t)}a(n.audioMediaIds||t),l(!(n.audioMediaIds&&n.audioMediaIds.length>0)),u(n["entry-id"])}else if(o.length>0){const s=o.sort((e,t)=>t.timestamp-e.timestamp),n=s[0];if(s.length>1){const t=i.filter(t=>t.form!==e||"completed"!==t.status||t["entry-id"]===n["entry-id"]);b(t)}a(n.audioMediaIds||t),l(!(n.audioMediaIds&&n.audioMediaIds.length>0)),u(n["entry-id"])}else if(c.length>0){const e=c.sort((e,t)=>t.timestamp-e.timestamp)[0];a(e.audioMediaIds||t),l(!1),u(e["entry-id"])}else a(t),l(!(t&&t.length>0)),u(void 0);d(!1),g(!0)},[e,t,x,b,n,m]);const A=(0,s.useCallback)(()=>r&&0!==r.length?x().some(t=>t.form===e&&"editing"===t.status)?{valid:!0,reason:""}:{valid:!1,reason:"This entry has already been submitted"}:{valid:!1,reason:"Please upload at least one audio file"},[r,x,e]);return(0,s.useEffect)(()=>{f(A())},[r,A]),{audioMediaIds:r,isButtonVisible:o,isLoading:c,handleFileUploadComplete:(e,t)=>{a(i=>{if(void 0===i)return[e];const s=[...i,e];return y(s,{mediaId:e,attemptId:t}),l(!1),s})},handleFileDelete:e=>{a(t=>{if(void 0===t)return[];const i=t.filter(t=>t!==e);return y(i),l(0===i.length),i})},handleAudioMediaIdsChange:e=>{a(e),y(e),l(0===e.length)},handleSubmit:()=>{const t=x(),i=Date.now(),s=t.find(t=>t.form===e&&"editing"===t.status);if(!s)return"";s.status="sending",s.timestamp=i;const n=t.map(e=>e["entry-id"]===s["entry-id"]?s:e);return b(n),f(A()),s["entry-id"]},isFormValid:A,getEntryId:()=>p,formValidation:h}})({active:e}),{openLoginDialog:A}=(0,ne.$)();return(0,B.jsxs)(n.A,{maxWidth:"lg",sx:{mt:4},children:[(0,B.jsx)(a.A,{variant:"h2",gutterBottom:!0,align:"center",fontWeight:700,children:"IELTS Speaking"}),(0,B.jsx)(a.A,{variant:"body1",gutterBottom:!0,align:"center",children:"Chấm và chữa IELTS Speaking"}),(0,B.jsxs)(r.A,{sx:{mt:4,gap:2,display:"flex",flexDirection:"column"},children:[(0,B.jsxs)(r.A,{children:[(0,B.jsx)(a.A,{variant:"h4",gutterBottom:!0,align:"center",fontWeight:"bold",children:"File Audio"}),!d&&void 0!==c&&(0,B.jsx)(ie,{initialMediaIds:c,onFileUploadComplete:p,onFileDelete:u,onChartMediaIdsChange:m})]}),(0,B.jsx)(l.A,{title:h.valid?"":h.reason,placement:"top",arrow:!0,children:(0,B.jsx)("span",{children:(0,B.jsx)(b.A,{fullWidth:!0,variant:"contained",color:"primary",size:"large",sx:{py:2},endIcon:(0,B.jsx)(y.A,{}),onClick:async()=>
1{if(!h.valid)return;if(!i.is_logged_in)return void await A();const e=g(),s=`/${window.ielts_speaking_data.pages.speaking_result}/${e}`;o?window.open(s,"_blank"):t(s)},disabled:!h.valid,children:"CHẤM BÀI"})})})]})]})};var oe=i(11419),le=i(15503);const ce=(0,D.Ay)(oe.A)(({theme:e})=>({width:80,height:48,padding:8,[`& .${le.A.switchBase}`]:{padding:11,color:e.palette.primary.main},[`& .${le.A.thumb}`]:{width:26,height:26,backgroundColor:e.palette.common.white},[`& .${le.A.track}`]:{background:e.palette.primary.main,opacity:"1 !important",borderRadius:20,position:"relative","&:before, &:after":{display:"inline-block",position:"absolute",top:"50%",width:"50%",transform:"translateY(-50%)",color:e.palette.common.white,textAlign:"center",fontSize:"0.75rem",fontWeight:500},"&:before":{content:'"EN"',left:4,opacity:0},"&:after":{content:'"VN"',right:4}},[`& .${le.A.checked}`]:{[`&.${le.A.switchBase}`]:{color:e.palette.info.dark,transform:"translateX(32px)","&:hover":{backgroundColor:(0,m.X4)(e.palette.info.dark,.08)}},[`& .${le.A.thumb}`]:{backgroundColor:e.palette.common.white},[`& + .${le.A.track}`]:{background:e.palette.info.dark+" !important","&:before":{opacity:1},"&:after":{opacity:0}
1}}})),de=()=>{const{language:e}=(0,f.useSelect)(e=>({language:e(x.store).get("ielts-science-lms/settings","language")}),[]),{set:t}=(0,f.useDispatch)(x.store);return(0,B.jsx)(ce,{checked:"en"===e,onChange:(e,i)=>{t("ielts-science-lms/settings","language",i?"en":"vi")},inputProps:{"aria-label":"Language switcher"}})};var pe=i(28414),ue=i(59375);const me=i.p+"images/Asset 1.1ee610e2.png",ge=i.p+"images/Asset 2.617335a6.png",he=()=>{const{mode:e}=(0,u.Ut)(),t=(0,s.useRef)(null),{openSettingsDialog:i}=(0,pe.V)(),{bulkFeedbackEnabled:b,targetScore:y}=(0,f.useSelect)(e=>({bulkFeedbackEnabled:e(x.store).get("ielts-science-lms/settings","bulkFeedbackEnabled"),targetScore:e(x.store).get("ielts-science-lms/settings","targetScore")}),[]),{toggle:A,set:v}=(0,f.useDispatch)(x.store);return e?(0,B.jsxs)(n.A,{maxWidth:!1,sx:{position:"relative",pt:5,gap:1,pb:12,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,B.jsxs)(r.A,{sx:{position:"absolute",borderRadius:2,top:76,left:0,right:0,height:"calc(90vh - 76px)",background:e=>`linear-gradient(0deg, ${(0,m.X4)(e.palette.info.light,.2)} 0%, transparent 50%)`,overflow:"hidden"},children:[(0,B.jsx)(r.A,{component:"img",src:me,alt:"","aria-hidden":!0,sx:{position:"absolute",bottom:0,left:0,width:{xs:120,sm:180,md:1e3},opacity:.6,pointerEvents:"none"}}),(0,B.jsx)(r.A,{component:"img",src:ge,alt:"","aria-hidden":!0,sx:{position:"absolute",bottom:0,right:0,width:{xs:120,sm:180,md:1e3},opacity:.6,pointerEvents:"none"}})]}),(0,B.jsxs)(r.A,{sx:{position:"relative",width:"100%",display:"flex",flexDirection:"column",gap:4},children:[(0,B.jsxs)(r.A,{children:[(0,B.jsx)(a.A,{variant:"h3",align:"center",color:"primary",fontWeight:500,gutterBottom:!0,children:(0,h.__)("IELTS Science","ielts-science-lms")}),(0,B.jsx)(a.A,{variant:"h1",align:"center",fontWeight:700,children:(0,h.__)("Evaluate IELTS Speaking x AI","ielts-science-lms")})]}),(0,B.jsxs)(n.A,{ref:t,maxWidth:"lg",sx:e=>({borderRadius:2,backgroundColor:"background.paper",outline:"1px solid",outlineColor:(0,m.X4)(e.palette.primary.light,.2),border:"1px solid",borderColor:"divider",boxShadow:`0 0 12px 8px ${(0,m.X4)(e.palette.primary.light,.2)}`,px:{xs:1,md:2},pt:{xs:1,md:2},pb:7,zIndex:1}),children:[(0,B.jsxs)(o.A,{direction:"row",justifyContent:"flex-end",spacing:1,useFlexGap:!0,sx:{overflow:"visible",borderBottom:1,borderColor:"divider",pb:1},children:[(0,B.jsx)(de,{}),(0,B.jsx)(l.A,{title:(0,h.__)("Select your target IELTS score to tailor the feedback accordingly.","ielts-science-lms"),arrow:!0,children:(0,B.jsx)(r.A,{sx:{width:100},children:(0,B.jsx)(ue.A,{label:(0,h.__)("Target Score","ielts-science-lms"),size:"small",value:y,onValueChange:e=>{null!==e&&v("ielts-science-lms/settings","targetScore",e)},min:0,max:9})})}),(0,B.jsx)(l.A,{title:(0,h.__)("Open result pages in new tabs to help teachers grade multiple submissions simultaneously","ielts-science-lms"),arrow:!0,children:(0,B.jsx)(c.A,{control:(0,B.jsx)(d.A,{checked:b,onChange:()=>{A("ielts-science-lms/settings","bulkFeedbackEnabled")},color:"primary"}),label:(0,h.__)("Bulk Feedback","ielts-science-lms")})}),(0,B.jsx)(p.A,{"aria-label":(0,h.__)("settings","ielts-science-lms"),color:"primary",onClick:i,children:(0,B.jsx)(g.A,{})})]}),(0,B.jsx)(ae,{active:!0})]})]})]}):null},fe=he},78547(e,t,i){i.d(t,{eT:()=>c,Tu:()=>p,Lh:()=>u,ev:()=>
1o,im:()=>a,vv:()=>d,o7:()=>l});var s=i(1455),n=i.n(s),r=i(93832);const a=async(e,t={})=>{const i=(0,r.addQueryArgs)(`/wp/v2/users/${e}`,t),s=await n()({path:i,method:"GET"});if(!s)throw new Error(`Failed to fetch user with ID: ${e}`);return s},o=async(e,t={})=>{const i=(0,r.addQueryArgs)(`/wp/v2/media/${e}`,t),s=await n()({path:i,method:"GET"});if(!s)throw new Error(`Failed to fetch media item with ID: ${e}`);return s},l=async(e,t={})=>{const i=new FormData;i.append("file",e),Object.entries(t).forEach(([e,t])=>{null!=t&&("object"==typeof t?i.append(e,JSON.stringify(t)):i.append(e,String(t)))});const s=await n()({path:"/wp/v2/media",method:"POST",body:i});if(!s)throw new Error("Failed to upload media file");return s},c=async e=>{const t=await n()({path:"/wp/v2/comments",method:"POST",data:e});if(!t)throw new Error("Failed to create comment");return t},d=async(e,t)=>{const i=await n()({path:`/wp/v2/comments/${e}`,method:"POST",data:t});if(!i)throw new Error(`Failed to update comment with ID: ${e}`);return i},p=async(e,t=!1)=>{const i=(0,r.addQueryArgs)(`/wp/v2/comments/${e}`,{force:t}),s=await n()({path:i,method:"DELETE"});if(!s)throw new Error(`Failed to delete comment with ID: ${e}`);return s},u=async(e={})=>{const t={per_page:10,page:1,status:"approve",...e},i=(0,r.addQueryArgs)("/wp/v2/comments",t),s=await n()({path:i,method:"GET",parse:!1});if(!s.ok)throw new Error("Failed to fetch comments");const a=await s.json(),o=parseInt(s.headers.get("X-WP-Total")||"0",10),l=parseInt(s.headers.get("X-WP-TotalPages")||"0",10);return{data:a,total:o,totalPages:l,hasMore:(t.page||1)<l}}}}]);

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.