1import{T as g,G as e,H as s,a1 as A,O as W,ao as C,F as S,ag as Y,t as b}from"./OP8dCFE0.js";import{ay as U,aM as w,aK as K,b as Q,O as J,B as R,N as o,P as X,Q as Z,G as B,aT as ee,g as te,i as l,u as re,C as se,d as q,l as D,n as ae}from"./NtxIxK6o.js";import{u as F}from"./DK3BMYOq.js";import{u as L}from"./-C6bgOz1.js";import{B as ne}from"./Q2UD5DGK.js";import"./3d9pRCLa.js";import{S as oe}from"./9BC7Me3d.js";import"./CyIcYvCZ.js";import"./Ss_qDTY8.js";import"./lQiOOcz9.js";const ie="_fadeIn_175ex_1",_e="_fadeInUp_175ex_1",le="_slideInRight_175ex_1",f={"flex-center-center":"_flex-center-center_175ex_1","flex-center-start":"_flex-center-start_175ex_7","base-box-shadow":"_base-box-shadow_175ex_13","base-blur-hover":"_base-blur-hover_175ex_23","form-group":"_form-group_175ex_95","base-input":"_base-input_175ex_126",fadeIn:ie,fadeInUp:_e,slideInRight:le},ce=t=>{const{formMethods:r}=t,{t:a}=g();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s(f["form-group"]),children:[e.jsx("label",{children:a("login.item.username")}),e.jsx(U,{type:"email",formMethods:r,registerName:"username",registerOptions:{required:w.required,validate:{email:w.email()}},addClassNameBase:s(f["base-input"]),inputProps:{placeholder:a("login.placeholder.username")}})]}),e.jsxs("div",{className:s(f["form-group"]),children:[e.jsx("label",{children:a("login.item.password")}),e.jsx(U,{type:"password",formMethods:r,registerName:"password",registerOptions:{required:w.required},addClassNameBase:s(f["base-input"]),inputProps:{placeholder:a("login.placeholder.password")},isDisplayEye:!0})]})]})},de=t=>{const r=structuredClone(t);return{username:r.username,password:r.password}},ue="_fadeIn_tf4z0_1",pe="_fadeInUp_tf4z0_1",me="_slideInRight_tf4z0_1",p={"flex-center-center":"_flex-center-center_tf4z0_1","flex-center-start":"_flex-center-start_tf4z0_7","base-box-shadow":"_base-box-shadow_tf4z0_13","base-blur-hover":"_base-blur-hover_tf4z0_23","form-button":"_form-button_tf4z0_95","login-button":"_login-button_tf4z0_98","forgot-password-button":"_forgot-password-button_tf4z0_103","label-button":"_label-button_tf4z0_107","right-icon":"_right-icon_tf4z0_110","gradient-button":"_gradient-button_tf4z0_116","no-border-button":"_no-border-button_tf4z0_121",fadeIn:ue,fadeInUp:pe,slideInRight:me},fe=t=>{const{formMethods:r,anyError:a,isServiceMaterialDownloadLogin:c}=t,{handleSubmit:i}=r,{t:_}=g(),n=A(),[h]=W(),x=C(),{termsOfUseVersion:I}=K(),{signIn:z,signOut:j}=Q(),{showToast:G}=J(),[E,T]=S(!1),H=async k=>{var y,O,N,M;if(!E){T(!0),a.actions.reset();try{const u=await z(de(k));if((y=u.userInfo)!=null&&y.terms_of_use_version)if((O=u.userInfo)!=null&&O.is_pre_member)n(o.PRIVATE_USER.MEMBERSHIP.CHANGE_PRE_MEMBER_INFO,{replace:!0});else if(I!==((N=u.userInfo)==null?void 0:N.terms_of_use_version))n(o.PRIVATE_USER.AGREE_TERM_OF_USAGE,{replace:!0});else if(c)n({pathname:Y(o.PRIVATE.SERVICE.MATERIAL_DOWNLOAD,{id:x.id})});else{const P=h.get(X.QUERY.REDIRECT);P?n(P):n(o.HOME,{replace:!0})}else(M=u.userInfo)!=null&&M.user_id?n(o.PRIVATE_USER.MEMBERSHIP.CHANGE_PRE_MEMBER_INFO,{replace:!0}):n(o.PRIVATE_USER.MEMBERSHIP.REGISTER,{replace:!0})}catch{a.actions.set("common",_("messageID.0201001")),j()}finally{T(!1)}}},V=()=>{a.actions.reset(),G(Z.TYPE.ERROR,_("common.item.toast.has_error_input")),j()};return e.jsxs("div",{className:s(p["form-button"]),children:[e.jsx(R,{addClassNames:{button:s(p["login-button"])},buttonColor:"gradient",rightIconType:"white",isSpinner:E,buttonProps:{onClick:i(H,V),disabled:E},children:_("login.button.login")}),e.jsx(R,{addClassNames:{button:s(p["forgot-password-button"]),label:s(p["label-button"]),rightIcon:s(p["right-icon"])},buttonColor:"noBorder",rightIconType:"default",to:o.PUBLIC.FORGOT_PASSWORD,children:_("login.item.forgot_pwd")})]})},be="_fadeIn_1ulxb_1",ge="_fadeInUp_1ulxb_1",he="_slideInRight_1ulxb_1",m={"flex-center-center":"_flex-center-center_1ulxb_1","flex-center-start":"_flex-center-start_1ulxb_7","base-box-shadow":"_base-box-shadow_1ulxb_13","base-blur-hover":"_base-blur-hover_1ulxb_23","error-feedback":"_error-feedback_1ulxb_95","login-wrapper__form-login":"_login-wrapper__form-login_1ulxb_110","wrapper-header":"_wrapper-header_1ulxb_114","wrapper-content":"_wrapper-content_1ulxb_117","base-wrapper":"_base-wrapper_1ulxb_136",fadeIn:be,fadeInUp:ge,slideInRight:he},xe=t=>{const{anyError:r}=t,a=r.actions.get("common");return e.jsx(B,{addClassNames:{base:s(m["login-wrapper__form-login"],m["base-wrapper"]),header:s(m["wrapper-header"]),body:s(m["wrapper-content"])},header:e.jsx(ee,{message:a,addClassNames:{errorFeedback:s(m["error-feedback"])}}),body:e.jsxs("div",{children:[e.jsx(ce,{...t}),e.jsx(fe,{...t})]})})},Ie="_title_m9qam_106",Ee="_fadeIn_m9qam_1",we="_fadeInUp_m9qam_1",Re="_slideInRight_m9qam_1",d={"flex-center-center":"_flex-center-center_m9qam_1","flex-center-start":"_flex-center-start_m9qam_7","base-box-shadow":"_base-box-shadow_m9qam_13","base-blur-hover":"_base-blur-hover_m9qam_23","form-register":"_form-register_m9qam_95","wrapper-header":"_wrapper-header_m9qam_103",title:Ie,"wrapper-content":"_wrapper-content_m9qam_113","wrapper-footer":"_wrapper-footer_m9qam_117","register-email-button":"_register-email-button_m9qam_120","base-wrapper":"_base-wrapper_m9qam_127",fadeIn:Ee,fadeInUp:we,slideInRight:Re},Se=()=>{const{t}=g();return e.jsx(B,{addClassNames:{base:s(d["form-register"],d["base-wrapper"]),header:s(d["wrapper-header"]),body:s(d["wrapper-content"]),footer:s(d["wrapper-footer"])},header:e.jsx("h3",{className:s(d.title),children:t("login.item.not_member")}),body:e.jsx("div",{children:e.jsx("img",{src:te("background/group-8025.png"),alt:"images",width:"180.83",height:"205"})}),footer:e.jsx(R,{addClassNames:{button:s(d["register-email-button"])},rightIconType:"default",to:o.PUBLIC.REGISTER_EMAIL,children:t("login.button.join_free")})})},je=(t,r)=>r?l.t("og.F_1_115.title",{service_name:t==null?void 0:t.service_name}):l.t("og.F_1_57.title"),Te=(t,r)=>r?l.t("og.F_1_115.description",{service_name:t==null?void 0:t.service_name,business_name:t==null?void 0:t.business_name}):l.t("og.F_1_57.description"),ye=t=>t?[{label:l.t("home.title"),to:o.HOME},{label:l.t("service.material_download.title")}]:[{label:l.t("home.title"),to:o.HOME},{label:l.t("login.title")}],Oe="_fadeIn_en8r7_1",Ne="_fadeInUp_en8r7_1",Me="_slideInRight_en8r7_1",v={"flex-center-center":"_flex-center-center_en8r7_1","flex-center-start":"_flex-center-start_en8r7_7","base-box-shadow":"_base-box-shadow_en8r7_13","base-blur-hover":"_base-blur-hover_en8r7_23","login-container":"_login-container_en8r7_1","login-wrapper":"_login-wrapper_en8r7_98",fadeIn:Oe,fadeInUp:Ne,slideInRight:
1Me},$=t=>{const{isServiceMaterialDownloadLogin:r}=t,{t:a,i18n:c}=g(),[i,_]=b.useState(),{setDescription:n,setTitle:h,setCrumbs:x,setMetaUpdateTime:I}=re();return b.useEffect(()=>{h(je(i,r)),n(Te(i,r)),x(ye(r)),I()},[c.language,i,r]),e.jsxs("div",{id:s(v["login-container"]),children:[e.jsx(ne,{type:se.BACKGROUND_TYPE.NO_LOGO,title:a(r?"service.material_download.title":"login.title")}),r&&e.jsx(oe,{setService:_}),e.jsxs("div",{className:s(v["login-wrapper"]),children:[e.jsx(xe,{...t}),e.jsx(Se,{})]})]})},$e=()=>{const{resetStoreAll:t}=L(),r=F(),[a,c]=S(!0);return b.useLayoutEffect(()=>{t(),c(!1)},[]),e.jsx(e.Fragment,{children:a?e.jsx(q,{}):e.jsx(D,{children:i=>e.jsx($,{formMethods:i,anyError:r})})})},ze=()=>{const t=C(),r=A(),{resetStoreAll:a}=L(),c=F(),[i,_]=S(!0);return b.useLayoutEffect(()=>{ae(t.id)?(a(),_(!1)):r(o.ERROR.PAGE_NOT_FOUND,{replace:!0})},[]),e.jsx(e.Fragment,{children:i?e.jsx(q,{}):e.jsx(D,{children:n=>e.jsx($,{formMethods:n,anyError:c,isServiceMaterialDownloadLogin:!0})})})};export{$e as Login,ze as ServiceMaterialDownloadLogin};
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.