1import{d as e,ax as t,g as a,r as s,w as o,o as i,c as n,A as r,Y as l,B as d,C as p,D as f,H as u,j as c,u as m,I as g,$ as I,L as y,G as v,P as h,Q as b,t as C,E as x,aa as O,av as S,ad as k,ay as L,ae as T,af as R,a3 as D}from"./vue-vendor-fc9d70f0.js";import{o as w,C as F,ab as $,s as _,v as j,ak as A,_ as B}from"./index-761c6c6f.js";/* empty css *//* empty css */import"./i18n-e53c91ad.js";import"./http-crypto-09d0f023.js";const E={class:"auth-content1 m-auto bg-white my-3 md:my-12 mb-40"},M={class:"font-bold text-2xl mb-5"},U={class:"font-bold mb-3"},P={class:"font-bold mt-14"},z={class:"w-full rounded-md px-8 py-4 pt-5 flex flex-col justify-center items-left text-center mt-2 border-dashed border-[#e5e5e5] border",ref:"uploadCe"},N={class:"flex items-center"},Q={class:"uploadDiv ml-3 text-left"},q={class:"text-sm text-[#333] font-bold"},H={class:"text-xs text-[#999] mt-1"},V=B(e({__name:"uploadAttache",emits:["returnFirst"],setup(e,{emit:B}){const V=t(),{locale:W}=w.global,Y=a().appContext.config.globalProperties,G=C({addressFileList:[]}),K=B,J=s(),X=s(),Z=s(!1),ee=s({Authorization:""}),te=s(F.BASEURL+Y.$config.RESQUEST.UPLOADFILE),ae=C({addressFileList:[{required:!0,validator:(e,t,a)=>{0===t.length?a(Y.$t("selectMer.key45")):a()},trigger:"blur"}]});o(()=>W.value,e=>{J.value.clearValidate()}),i(async()=>{let e=await $();_.commit("updateState",{supplementInfo:e||{}}),(()=>{var e,t,a;if((null==(a=null==(t=null==(e=_.state.supplementInfo)?void 0:e.uploadAttachmentDTO)?void 0:t.fileUrlList)?void 0:a.length)>0)for(let s of _.state.supplementInfo.uploadAttachmentDTO.fileUrlList)G.addressFileList.push({url:s.url,name:s.fileName})})()});const se=()=>{_.commit("updateState",{uploadAttachReturn:!0}),K("returnFirst")},oe=()=>{J.value.validate(e=>{if(e){let e=[];for(let a of G.addressFileList)e.push({fileName:a.name.substring(0,20),url:a.response&&a.response.data||a.url});let t={fileUrlList:e};console.log(t),Z.value=!0,Y.$post(Y.$config.RESQUEST.SUBMITATTACHMENT,t,{"content-type":"application/json"}).then(async e=>{if(Z.value=!1,"success"===e.code){let e=await $(),t=await A();Y.$store.commit("updateState",{supplementInfo:e||{},KYCInfo:t||{}}),V.push("/dashboard")}else x({showClose:!0,duration:1e4,message:e.msg,type:"error",offset:80})}).catch(e=>{Z.value=!1,console.log(e)})}})},ie=n(()=>{let e=_.state.supplementInfo;return 5===e.entpType?"cn"===e.countryCode.toLowerCase()?e.cnCertificateInfoDTO&&e.cnCertificateInfoDTO.refund&&e.cnCertificateInfoDTO.isSubmit?{isOne:!1,page:1}:e.addressInfo&&e.addressInfo.refund&&e.addressInfo.isSubmit?{isOne:!1,page:2}:{isOne:!0,page:0}:"hk"===e.countryCode.toLowerCase()?e.hkCertificateInfoDTO&&e.hkCertificateInfoDTO.refund&&e.hkCertificateInfoDTO.isSubmit||e.hkCompanyRegistrationInfo&&e.hkCompanyRegistrationInfo.refund&&e.hkCompanyRegistrationInfo.isSubmit?{isOne:!1,page:1===e.entpType?4:1}:e.addressInfo&&e.addressInfo.refund&&e.addressInfo.isSubmit&&5===e.entpType?{isOne:!1,page:1===e.entpType?4:2}:{isOne:!0,page:0}:e.passportCertificateInfoDTO&&e.passportCertificateInfoDTO.refund&&e.passportCertificateInfoDTO.isSubmit?{isOne:!1,page:1}:e.addressInfo&&e.addressInfo.refund&&e.addressInfo.isSubmit?{isOne:!1,page:2}:{isOne:!0,page:0}:e.hkCompanyRegistrationInfo&&e.hkCompanyRegistrationInfo.refund&&e.hkCompanyRegistrationInfo.isSubmit||e.cnCompanyRegistrationInfo&&e.cnCompanyRegistrationInfo.refund&&e.cnCompanyRegistrationInfo.isSubmit||e.otherCompanyRegistrationInfo&&e.otherCompanyRegistrationInfo.refund&&e.otherCompanyRegistrationInfo.isSubmit||e.directorInfoList[0].isSubmit&&_.state.supplementInfo.directorInfoList[0].refund||e.businessInfo.isSubmit&&_.state.supplementInfo.businessInfo.refund||e.otherDirectorBackInfoMap&&e.otherDirectorBackInfoMap.isSubmit&&_.state.supplementInfo.otherDirectorBackInfoMap.refund?{isOne:!1,page:4}:{isOne:!0,page:0}});return(e,t)=>{var a,s;const o=S,i=r("Loading"),n=k,C=r("Paperclip"),w=L,F=T,$=R,A=r("VaButton"),B=D;return l((d(),p("div",E,[f("h1",M,u(e.$t("selectMer.key43")),1),f("p",U,u(e.$t("wallet.key84")),1),c(o,{title:null==(s=null==(a=m(_).state.supplementInfo)?void 0:a.uploadAttachmentDTO)?void 0:s.suggestion,type:"warning","show-icon":"",closable:!1},null,8,["title"]),f("p",P,u(e.$t("selectMer.key44")),1),c($,{model:G,ref_key:"businessInfoFormRef",ref:J,rules:ae,"label-position":"top",class:"max-w-[470px]",labelWidth:"140px"},{default:g(()=>
1[c(F,{prop:"addressFileList"},{default:g(()=>[c(w,{class:"upload-demo relative",limit:10,ref_key:"addressFileRef",ref:X,"on-remove":e=>{var t,a;t&&t.length>0&&(t=[],a&&a.clearFiles())},action:te.value+"?type=0","before-upload":e=>(e=>{const t=e.size<10485760,a="image/jpeg"===e.type||"image/jpg"===e.type||"image/png"===e.type||"application/pdf"===e.type||"application/bmp"===e.type;if(!t)return x.error(Y.$t("active.uploadLimit10M")),!1;if(!a)return x.error(Y.$t("active.uploadImagPDFErr")),!1;O(function(){"fail"==e.status&&x.error("Internal Server Error")});const s=j();ee.value.Authorization="Bearer "+s})(e),"on-success":(e,t)=>((e,t,a,s,o)=>{"success"==e.code?J.value.validateField(o):x({showClose:!0,duration:1e4,message:e.msg,type:"error",offset:80})})(e,0,0,0,"addressFileRef"),"list-type":"text",headers:ee.value,"file-list":G.addressFileList,"onUpdate:fileList":t[0]||(t[0]=e=>G.addressFileList=e)},{default:g(()=>[l(f("div",z,[f("div",N,[l(c(n,{class:"is-loading",style:{"margin-top":"8px","font-size":"20px"}},{default:g(()=>[c(i)]),_:1},512),[[I,e.uploadCeloadingIcon]]),l(c(n,{class:"text-[var(--sys-blue)] text-3xl"},{default:g(()=>[c(C)]),_:1},512),[[I,!e.uploadCeloadingIcon]]),f("div",Q,[f("div",q,u(e.$t("active.SelectFile")),1),f("div",H,u(e.$t("auth.key59")),1)])])],512),[[I,G.addressFileList.length<10]])]),_:1},8,["on-remove","action","before-upload","on-success","headers","file-list"])]),_:1})]),_:1},8,["model","rules"]),f("div",{class:b(["mt-12 mx-auto flex justify-center",{"flex-col-reverse":1===m(_).state.deviceWidth}])},[ie.value.isOne?h("",!0):(d(),y(A,{key:0,class:"advanceBtn w-full md:w-auto",onClick:se},{default:g(()=>[v(u(e.$t("register.Return")),1)]),_:1})),c(A,{class:"advanceBtn nextBtn w-full md:w-auto",type:"primary",onClick:oe},{default:g(()=>[v(u(e.$t("active.Submit")),1)]),_:1})],2)])),[[B,Z.value]])}}}),[["__scopeId","data-v-5b2c9827"]]);export{V as default};
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.