PageSourceSearch

https://optikmelawai.com/_next/static/chunks/3439.ddbe667a0f696711.js

js optikmelawai.com collected 2026-09-24 23:45:40 UTC 18,651 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3439],{77244:function(e,a,l){l.d(a,{rA:function(){return u},Sp:function(){return d},e6:function(){return c},OM:function(){return m},Ox:function(){return p},nA:function(){return r}});var t=l(78551),n=l(98029),s=l(67294),i=l(63781);const o="https://api.optikmelawai.com",r=e=>{const a=(0,t.a)({queryKey:["getListAddressData"],queryFn:()=>(async()=>(await(0,i.RE)({method:i.Is.GET,overrideBaseUrl:o,subUrl:"/api/v1/customer/address",useStrapi:!1})).data)(),enabled:e});return(0,s.useEffect)(()=>{a.isError},[a.isError]),a},d=()=>{const e=(0,t.a)({queryKey:["getMainAddressData"],queryFn:()=>(async()=>(await(0,i.RE)({method:i.Is.GET,overrideBaseUrl:o,subUrl:"/api/v1/customer/address/main",useStrapi:!1})).data)()});return(0,s.useEffect)(()=>{e.isError},[e.isError]),e},m=()=>(0,n.D)({mutationFn:e=>(async e=>(await(0,i.RE)({method:i.Is.POST,overrideBaseUrl:o,subUrl:"/api/v1/customer/address",useStrapi:!1,data:e})).data)(e)}),c=()=>(0,n.D)({mutationFn:e=>(async e=>(await(0,i.RE)({method:i.Is.PATCH,overrideBaseUrl:o,subUrl:"/api/v1/customer/address/".concat((null==e?void 0:e.id)||""),useStrapi:!1,data:e})).data)(e)}),u=()=>(0,n.D)({mutationFn:e=>(async e=>(await(0,i.RE)({method:i.Is.DELETE,overrideBaseUrl:o,subUrl:"/api/v1/customer/address/".concat(e),useStrapi:!1})).data)(e)}),p=()=>(0,n.D)({mutationFn:e=>(async e=>(await(0,i.RE)({method:i.Is.PUT,overrideBaseUrl:o,subUrl:"/api/v1/customer/address/".concat(e,"/set-main"),useStrapi:!1})).data)(e)})},42968:function(e,a,l){l.d(a,{p:function(){return s}});var t=l(30381),n=l.n(t);const s=(e,a)=>n()(e).format(a)},23439:function(e,a,l){l.r(a),l.d(a,{default:function(){return x}});var t=l(85893),n=l(41664),s=l.n(n),i=l(30381),o=l.n(i),r=l(92666),d=l(67294),m=l(45451),c=l(77244),u=l(42968),p=l(11163),h=l(29480),b=l(50925);function x(){var e,a;const{locale:l}=(0,p.useRouter)(),n=h.j[l],[i,x]=(0,d.useState)(!0),f=(0,b.TI)(i),{setUserData:g,userData:v,setLoadingAuth:N}=(0,d.useContext)(m.V),k=(0,c.Sp)(),[w,j]=(0,d.useState)({});return(0,d.useEffect)(()=>{var e;f.isSuccess&&(N(!1),g((null==f||null===(e=f.data)||void 0===e?void 0:e.data)||{}),x(!1))},[f.isSuccess,f.isFetching]),(0,d.useEffect)(()=>{var e;(null==k?void 0:k.isSuccess)&&j((null==k||null===(e=k.data)||void 0===e?void 0:e.data)||{})},[null==k?void 0:k.isSuccess,null==k?void 0:k.isError]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"content overflow-hidden",children:(0,t.jsxs)("div",{className:"w-full h-full flex md:flex-row sm:flex-col",children:[(0,t.jsx)(r.Z,{activedMenu:"Profile"}),(0,t.jsxs)("div",{className:"md:w-[74%] sm:w-full border-[1px] border-zinc-200",children:[!(null==k?void 0:k.isFetched)&&(0,t.jsx)("div",{className:"w-full text-center py-64",children:(0,t.jsx)("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status",children:(0,t.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}),(null==k?void 0:k.isFetched)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"md:pb-5 sm:py-2 md:mt-6 sm:mt-0 border-b-[1px] border-zinc-200",children:(0,t.jsx)("div",{className:"p-25",children:(0,t.jsx)("p",{className:"text-black text-2xl font-bold font-epilogue",children:null==n?void 0:n.title})})}),(0,t.jsxs)("div",{className:"p-25",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-lg uppercase font-bold font-epilogue",children:null==n?void 0:n.title2}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("div",{className:"grid md:grid-cols-3 sm:grid-cols-2 mb-5",children:[(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.name}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:v.name||"-"})]}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.dateBirth}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:o()(v.birth_date).isValid()?o()(v.birth_date).format("DD MMM YYYY"):""})]}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.gender}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:2==(null==v?void 0:v.sex)?"Female":"Male"})]}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.address}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:v.address||"-"})]}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.city}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:(null===(e=v.city)||void 0===e?void 0:e.name)||"-"})]}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.province}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:(null===(a=v.province)||void 0===a?void 0:a.name)||"-"})]}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.job}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:v.job||"-"})]}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.religion}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:v.religion||"-"})]}),(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.interest}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:v.interest||"-"})]})]}),(0,t.jsx)(s(),{href:"/member/profile/edit",children:(0,t.jsx)("button",{className:"h-[40px] px-10 md:w-auto sm:w-full border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue hover:border-black hover:text-black",children:null==n?void 0:n.changeData})})]})]}),(0,t.jsxs)("div",{className:"mt-14",children:[(0,t.jsx)("p",{className:"text-black text-lg uppercase font-bold font-epilogue",children:null==n?void 0:n.password}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue my-4",children:v.password_updated_at?"".concat(null==n?void 0:n.lastUpdateOn," ").concat((0,u.p)(v.password_updated_at,"DD MMM YYYY HH:mm")):null==n?void 0:n.neverChangePass}),(0,t.jsx)(s(),{href:"/member/profile/edit-password",children:(0,t.jsxs)("button",{className:"h-[40px] px-10 md:w-auto sm:w-full border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue hover:border-black hover:text-black",children:[" ",null==n?void 0:n.edit]})})]})]}),(0,t.jsxs)("div",{className:"mt-14",children:[(0,t.jsx)("p",{className:"text-black text-lg uppercase font-bold font-epilogue",children:null==n?void 0:n.emailNumber}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue ",children:null==n?void 0:n.email}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:v.email||"-"})]}),(0,t.jsxs)("div",{className:"mt-4 ml-10 flex items-center",children:[(0,t.jsx)("div",{className:"h-4 w-4 roun
1ded-full bg-green-600"}),(0,t.jsx)("p",{className:"text-black text-[10px] uppercase font-bold font-epilogue ml-2 mt-1",children:null==n?void 0:n.emailVerified})]})]}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(s(),{href:"/member/profile/edit-mail",children:(0,t.jsx)("button",{className:"h-[40px] px-10 md:w-auto sm:w-full border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue hover:border-black hover:text-black",children:null==n?void 0:n.edit})})})]}),(0,t.jsxs)("div",{className:"mt-10",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-gray text-[10px] font-bold uppercase font-epilogue",children:null==n?void 0:n.mobileNumber}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:v.mobile_number||"-"})]}),(0,t.jsxs)("div",{className:"mt-4 ml-10 flex items-center",children:[(0,t.jsx)("div",{className:"h-4 w-4 rounded-full bg-green-600"}),(0,t.jsx)("p",{className:"text-black text-[10px] uppercase font-bold font-epilogue ml-2 mt-1",children:null==n?void 0:n.mobileVerified})]})]}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(s(),{href:"/member/profile/edit-phone-number",children:(0,t.jsx)("button",{className:"h-[40px] px-10 md:w-auto sm:w-full border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue hover:border-black hover:text-black",children:null==n?void 0:n.edit})})})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mt-10 lg:px-25 sm:px-15 border-t-[1px] border-zinc-200 pt-5",children:[(0,t.jsx)("p",{className:"text-black text-lg uppercase font-bold font-epilogue",children:null==n?void 0:n.address}),0!=Object.keys(w).length&&(0,t.jsx)("div",{className:"my-5 p-5 rounded-lg border border-primary",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-5 flex justify-end",children:(0,t.jsx)("span",{className:"inline-block whitespace-nowrap rounded-[5px] bg-primary p-[6px] text-center align-baseline font-epilogue uppercase font-bold leading-none text-white text-[10px]",children:null==n?void 0:n.mainAddress})}),(0,t.jsxs)("div",{className:"grid lg:grid-cols-3 sm:grid-cols-1 gap-2",children:[(0,t.jsx)("div",{className:"lg:h-[100px] sm:h-[50px]",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-gray text-xs font-bold uppercase font-epilogue",children:null==n?void 0:n.addressName}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-black text-sm font-bold font-epilogue",children:[" ",w.label]}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:w.name})]})]})}),(0,t.jsxs)("div",{className:"lg:h-[100px] sm:h-[50px]",children:[(0,t.jsx)("label",{className:"text-gray text-xs font-bold uppercase font-epilogue",children:null==n?void 0:n.completeAddress}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:w.detail})]}),(0,t.jsxs)("div",{className:"lg:h-[100px] sm:h-[50px] lg:text-center",children:[(0,t.jsx)("label",{className:"text-gray text-xs font-bold uppercase font-epilogue",children:null==n?void 0:n.mobileNumber}),(0,t.jsx)("p",{className:"text-black text-sm font-normal font-epilogue",children:w.phone})]})]})]})})]}),(0,t.jsx)("div",{className:"md:px-25 sm:px-15 md:pb-20 sm:pb-10 mt-10 space-x-2",children:(0,t.jsx)(s(),{href:"/member/profile/list",children:(0,t.jsx)("button",{className:"h-[40px] px-10 md:w-auto sm:w-full border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue hover:border-black hover:text-black",children:null==n?void 0:n.listAddress})})})]})]})]})]})})})}},29480:function(e,a,l){l.d(a,{j:function(){return t}});const t={id:{title:"Tentang Profil Anda",title2:"Data pribadi",titlePageEdit:"Ubah Data Pribadi Anda",titlePageEditMail:"Ubah Alamat Email Anda",titlePageEditNumber:"Ubah Nomor HP Anda",titleProfile:"Title",name:"Nama Lengkap",address:"Alamat",job:"Pekerjaan",dateBirth:"Tanggal Lahir",city:"Kota",religion:"Agama",interest:"minat",gender:"Jenis Kelamin",province:"Pulau",changeData:"Ubah Data Anda",edit:"Ubah",password:"Kata Sandi",lastUpdate:"Terakhir diupdate",emailNumber:"Email dan Nomor HP",email:"Email",mobileNumber:"Nomor HP",emailVerified:"Email Sudah Terverifikasi",mobileVerified:"Nomor HP Sudah Terverifikasi",connect:"Hubungkan",notConnectedFB:"Hubungkan dengan facebook",notConnectedGoogle:"Hubungkan dengan Google",addressName:"Nama Alamat",completeAddress:"Alamat Lengkap",mainAddress:"Alamat Utama",listAddress:"list Alamat",save:"Simpan Data",sendOtp:"Kirim OTP",submitCode:"Kirim Kode",back:"Kembali",continue:"Lanjutkan",currentPassword:"Kata Sandi Saat Ini",newPassword:"Kata Sandi Baru",confirmPassword:"Konfirmasi Kata Sandi",followingSteps:"Untuk Me
1ngubah alamat email Anda, Anda perlu melalui langkah-langkah berikut",followingStepsMail:"Untuk Mengubah Nomor HP Anda, Anda perlu melalui langkah-langkah berikut",followingStepsOnePhone:"Validasi alamat email",followingStepsOne:"Validasi nomor hp",followingStepsTwo:"Validasi Alamat Email Baru",followingStepsTwoPhone:"Validasi nomor hp baru",followingStepsThree:"Ganti email saat ini dengan email baru",followingStepsThreePhone:"Ganti nomor hp saat ini dengan nomor baru",alertNumberVerification:"Verifikasi alamat email hanya bisa digunakan maksimal 3 kali dalam 3 jam",alertMaxNumberVerification:"Verifikasi nomor hp hanya bisa digunakan maksimal 3 kali dalam 3 jam",weHaveSentOtpNumber:"Kami telah mengirimkan <span className='font-bold'>Kode OTP</span> ke nomor hp",pleaseCheckSmsEditPhone:"Silakan cek kotak masuk email Anda, Lalu masukkan kode OTP yang ada di email yang kami kirimkan",pleaseCheckSms:"Silakan cek SMS di ponsel Anda, Lalu masukkan kode OTP pada SMS yang kami kirimkan",notReceiveOtp:"Tidak menerima kode OTP?",lblOTP6:"Kirim Ulang",dontHaveAccessMobile:"Jika Anda tidak memiliki akses ke nomor hp",dontHaveAccessEmail:"Jika Anda tidak memiliki akses ke alamat email",pleaseContactReplaceMobile:"Silakan Hubungi <span className='font-bold'>Layanan Pelanggan</span> untuk mengganti nomor hp Anda",pleaseContactReplaceEmail:"Silakan Hubungi <span className='font-bold'>Layanan Pelanggan</span> untuk mengganti alamat email Anda",somethingWrong:"Ada Masalah",success:"Sukses",reEnterOtp:"Silakan masukkan kembali kode OTP Anda",otpCannotEmpty:"OTP Tidak Boleh Kosong",newEmail:"Alamat Email Baru",newNumber:"Nomor HP Baru",toChangeEmail:"Untuk mengganti email, Anda harus memasukkan OTP yang akan dikirimkan melalui sms Anda",toChangeNumber:"Untuk mengganti nomor hp Anda, Anda harus memasukkan OTP yang akan dikirimkan melalui email Anda",replaceCurrEmail:"Ganti email saat ini dengan email baru",replaceCurrNumber:"Ganti nomor hp saat ini dengan nomor hp baru",weHaveSentNewMailEditPhone:"Kami telah mengirimkan <span className='font-bold'> Kode OTP</span> ke alamat email",weHaveSentNewMail:"Kami telah mengirimkan <span className='font-bold'> Kode OTP</span> ke alamat email baru",pleaseCheckMail:"Please cek the OTP on your email, Then enter the OTP code in the email we sent",lblResend:"Kirim Ulang",neverChangePass:"Tidak pernah mengganti kata sandi",lastUpdateOn:"Terakhir diubah pada"},en:{title:"About Your Profile",title2:"Personal Data",titlePageEdit:"Change Personal Data",titlePageEditMail:" Edit Email Address",titlePageEditNumber:"Edit Mobile Number",titleProfile:"Title",name:"Name Surname",address:"Address",job:"Job",dateBirth:"Date of Birth",city:"City",religion:"Religion",gender:"Gender",province:"Province",interest:"Interest",changeData:"Change Your Data",edit:"Edit",password:"Password",lastUpdate:"Last updated on",emailNumber:"Email and Mobile Number",email:"Email",mobileNumber:"Mobile Number",emailVerified:"Email is Verified",mobileVerified:"Mobile Number is Verified",connect:"Connect",notConnectedFB:"Not Connected with facebook",notConnectedGoogle:"Not Connected with Google",addressName:"Address Name",completeAddress:"Complete Address",mainAddress:"Main Address",listAddress:"List Address",save:"Save",sendOtp:"Send Otp",submitCode:"Submit Code",back:"Back",continue:"Continue",currentPassword:"Current Password",newPassword:"New Password",confirmPassword:"Confirm password",followingSteps:"To Change your email address, you need to go through the following steps",followingStepsMail:"To Change your Mobile Number, you need to go through the following steps",followingStepsOnePhone:"Email Address validation",followingStepsOne:"Mobile number validation",followingStepsTwo:"New Email Address validation",followingStepsTwoPhone:"New mobile number validation",followingStepsThree:"Replace the current email with the new email",followingStepsThreePhone:"Replace the current mobile number with the new number",alertNumberVerification:"Email verification can be used 3 times, maximum 3 hours for one email address",alertMaxNumberVerification:"Mobile number verification can be used 3 time max in 3 hours for a mobile number",weHaveSentOtpNumber:"We have sent an <span className='font-bold'>
1 OTP Code</span> to the mobile number",pleaseCheckSms:"Please cek the SMS on your cellphone, Then enter the OTP code in the SMS we sent",pleaseCheckSmsEditPhone:"Please check your email inbox, then enter the OTP code that is in the email we sent",notReceiveOtp:"Did not receive the OTP code?",lblOTP6:"Resend",dontHaveAccessMobile:"You dont have access to the mobile number",dontHaveAccessEmail:"You dont have access to the email",pleaseContactReplaceMobile:"Please Contact <span className='font-bold'>Customer Service</span> to replace your cellphone number",pleaseContactReplaceEmail:"Please Contact <span className='font-bold'>Customer Service</span> to replace your email",somethingWrong:"Something Wrong",success:"Success",reEnterOtp:"Please re-enter your OTP code",otpCannotEmpty:"OTP Cannot Be Empty",newEmail:"New Email Address",newNumber:"New Mobile Number",toChangeEmail:"To change your email, you must enter the OTP which will be sent via your sms",toChangeNumber:"To change your mobile number, you must enter the OTP which will be sent via your email",replaceCurrEmail:"Replace the current email with the new email",replaceCurrNumber:"Replace the current mobile number with the new mobile number",weHaveSentNewMail:"We have sent an <span className='font-bold'> OTP Code</span> to the new email address",weHaveSentNewMailEditPhone:"We have sent an <span className='font-bold'> OTP Code</span> to the email address",pleaseCheckMail:"Please cek the OTP on your email, Then enter the OTP code in the email we sent",lblResend:"Resend",neverChangePass:"Never changed the password",lastUpdateOn:"Last updated on"}}}}]);

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.