1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1622],{31622:function(e,t,l){l.r(t);var o=l(2403),n=l(12249),s=l(5194),i=l(1780),d=l(33583),r=l(60076),a=l(5853),c=l(57437),u=l(15207),v=l(42586),m=l(2265),f=l(69064),h=l(82323),x=l(77867),p=l(91685),b=l(47347),g=l(79602),y=l(83264),_=l(31633),N=l(99376),w=l(49567),C=l(56093),j=l(37856),k=l(76476),A=l(67754),I=/^[0-9]*$/;t.default=function(e){var t,l,F,P,D=e.showAddressModal,S=e.isEditMode,T=void 0!==S&&S,E=e.editAddressInfo,O=void 0===E?{}:E,Z=e.onCancel,M=void 0===Z?{}:Z,L=e.titleClassName,R=e.source,z=void 0===R?"":R,U=e.checkoutId,V=void 0===U?"":U,K=e.userSelectedLang,W=void 0===K?"en":K,$=e.isPartialScreen,B=e.skipNavigation,G=void 0!==B&&B,J=e.onAddressSaved,H=void 0===J?null:J,q=e.modalPositionZindex,Q=e.externalOrderId,Y=void 0===Q?"":Q,X=(0,d._)((0,m.useState)({lastName:"",mobileNo:"",country:"India",pinCode:"",district:"",state:"",city:"",address1:"",address2:"",flathouseno:""}),2),ee=X[0],et=X[1],el=(0,v.useTranslations)("addressPage");(0,v.useTranslations)("common");var eo=(0,v.useTranslations)("checkoutPage"),en=(0,d._)((0,m.useState)(!1),2),es=en[0],ei=en[1],ed=(0,d._)((0,m.useState)(!1),2),er=ed[0],ea=ed[1],ec=(0,d._)((0,m.useState)({id:"Please Select",title:el("please_select")}),2),eu=ec[0],ev=ec[1],em=(0,d._)((0,m.useState)(!1),2),ef=em[0],eh=em[1],ex=(0,d._)((0,m.useState)(!0),2),ep=ex[0],eb=ex[1],eg=(0,d._)((0,m.useState)(),2),ey=eg[0],e_=eg[1],eN=(0,d._)((0,m.useState)(),2),ew=eN[0],eC=eN[1],ej=(0,d._)((0,m.useState)(!1),2),ek=ej[0],eA=ej[1],eI=(0,d._)((0,m.useState)({}),2),eF=eI[0],eP=eI[1],eD=(0,m.useRef)(null),eS=(0,m.useRef)(null),eT=(0,m.useRef)(null),eE=(0,m.useRef)(null),eO=(0,m.useRef)(null),eZ=(0,m.useRef)(null),eM=(0,m.useRef)(null),eL=(0,m.useRef)(null),eR=(0,N.useRouter)(),ez=(0,w.I0)(),eU=(0,d._)((0,x.eI)(),1)[0],eV=(0,d._)((0,x.by)(),1)[0],eK=(0,d._)((0,x.AV)(),1)[0],eW="chatChangeDeliveryAddress"===z,e$=(0,h.lQ)(),eB=(0,h.ii)().provinces,eG=(0,h.zG)(),eJ=(0,d._)((0,p.di)(),1)[0],eH=(0,d._)((0,y.Vq)(),1)[0],eq=(0,h.qv)({type:"CHECKOUTADDRESSFORM"}).locationCoordinatesAPISettings,eQ=(void 0===eq?{}:eq)||{},eY=eQ.timeOutDuration,eX=void 0===eY?1e4:eY,e0=eQ.enableHighAccuracy,e1=void 0!==e0&&e0,e2=eQ.maximumAge,e3=void 0===e2?3e5:e2,e4=eG||{},e6=e4.userId,e5=void 0===e6?null:e6,e9=e4.guestUserId,e7=void 0===e9?"":e9,e8=e4.isGuestUser,te=void 0!==e8&&e8,tt=e4.accessToken,tl=void 0===tt?"":tt,to=e4.userExternalId,tn=void 0===to?"":to,ts=eF||{},ti=ts.enableAddressAutoFillWithCoordinates,td=void 0===ti||ti,tr=ts.formSettings,ta=(void 0===tr?{}:tr)||{},tc=ta.flathouseno,tu=void 0===tc?{}:tc,tv=ta.address1,tm=void 0===tv?{}:tv,tf=(0,x.s4)((te?tl&&(null==ee?void 0:null===(F=ee.pinCode)||void 0===F?void 0:F.length)===6:tl&&e5&&(null==ee?void 0:null===(P=ee.pinCode)||void 0===P?void 0:P.length)===6)?{pincode:null==ee?void 0:ee.pinCode,accessToken:tl}:u.skipToken),th=tf.data,tx=void 0===th?[]:th,tp=tf.isLoading,tb=tf.isFetching,tg=tf.isError,ty=tf.error,t_=(0,x.rz)(tl&&ey&&ew&&!T?{lat:ey,long:ew,accessToken:tl}:u.skipToken),tN=t_.data,tw=void 0===tN?{}:tN,tC=t_.isLoading,tj=t_.isFetching;(0,m.useEffect)(function(){eP((0,_.O)())},[]),(0,m.useEffect)(function(){!T&&td&&tk({triggerFrom:"auto"})},[td,eG,T]);var tk=(t=(0,o._)(function(e){var t,l,o,n,d,r,c,u;return(0,a.Jh)(this,function(a){l=void 0===(t=e.triggerFrom)?"":t;try{if(eA(!0),!navigator||!(null===(o=navigator)||void 0===o?void 0:o.geolocation))return eA(!1),[2];r=null,c=!1,u=setTimeout(function(){if(!c){if(c=!0,null!==r){var e,t;null===(t=navigator)||void 0===t||null===(e=t.geolocation)||void 0===e||e.clearWatch(r)}eA(!1),(0,f.ZP)(el("enter_address_manually"),{icon:"â¹ï¸",position:"top-center",className:"bg-white text-black border border-blue-500 rounded-md shadow-md"})}},eX||1e4),r=null===(d=navigator)||void 0===d?void 0:null===(n=d.geolocation)||void 0===n?void 0:n.watchPosition(function(e){if(!c){var t,o,n,d,a=(null==e?void 0:null===(t=e.coords)||void 0===t?void 0:t.latitude)||0,v=(null==e?void 0:null===(o=e.coords)||void 0===o?void 0:o.longitude)||0;c=!0,null!==r&&(null===(d=navigator)||void 0===d||null===(n=d.geolocation)||void 0===n||n.clearWatch(r)),clearTimeout(u),a!==ey||v!==ew?((0,b.Ug)({eventName:"wsf_generic_events",itemId:null,itemName:"locationAccess",eventAction:"access",
1sessionDetails:eG,itemAttributes:{triggerFrom:l,source:z,eventFrom:"addAddressModal"}}),e_(a),eC(v),et(function(e){return(0,i._)((0,s._)({},e),{flathouseno:"",address1:"",pinCode:"",city:"",district:"",state:"",address2:""})})):tA(),eA(!1)}},function(e){if(!c){if(c=!0,null!==r){var t,o;null===(o=navigator)||void 0===o||null===(t=o.geolocation)||void 0===t||t.clearWatch(r)}clearTimeout(u),(0,b.Ug)({eventName:"wsf_generic_events",itemId:null,itemName:"locationAccess",eventAction:"denied",sessionDetails:eG,itemAttributes:{triggerFrom:l,source:z,eventFrom:"addAddressModal"}}),"manual"===l&&(0,f.ZP)(el("enable_location_permission"),{icon:"â¹ï¸",position:"top-center",className:"bg-white text-black border border-blue-500 rounded-md shadow-md"}),eA(!1)}},{enableHighAccuracy:e1||!1,maximumAge:e3||3e5})}catch(e){eA(!1)}return[2]})}),function(e){return t.apply(this,arguments)});(0,m.useEffect)(function(){tA()},[tw]);var tA=function(){try{if(Object.keys(tw||{}).length){var e;et((0,i._)((0,s._)({},ee),{pinCode:(null==tw?void 0:null===(e=tw.pincode)||void 0===e?void 0:e.toString())||"",address1:(null==tw?void 0:tw.displayAddress)||""}))}}catch(e){}};(0,m.useEffect)(function(){!tg||tb||tp||(0,o._)(function(){var e,t,l,o,n,d,r,c,u,v,m;return(0,a.Jh)(this,function(a){return m=null==ty?void 0:ty.data,f.ZP.error(m,{position:"top-center"}),et(function(e){return(0,i._)((0,s._)({},e),{district:"",city:""})}),ev({id:"Please Select",title:el("please_select")}),eb(!0),eJ({error:ty,method:"AddAddress | pinCodeDataFetch | useEffect ",userId:te?e7:e5,isGuestUser:te,pagePath:(null===(t=window)||void 0===t?void 0:null===(e=t.location)||void 0===e?void 0:e.href)||"",connectionType:(null===(n=window)||void 0===n?void 0:null===(o=n.navigator)||void 0===o?void 0:null===(l=o.connection)||void 0===l?void 0:l.effectiveType)||"",connectionStrength:(null===(c=window)||void 0===c?void 0:null===(r=c.navigator)||void 0===r?void 0:null===(d=r.connection)||void 0===d?void 0:d.downlink)||"",userAgent:(null===(v=window)||void 0===v?void 0:null===(u=v.navigator)||void 0===u?void 0:u.userAgent)||""}),[2]})})()},[tg]);var tI=function(e){var t=e.lastName,l=void 0===t?"":t,o=e.mobileNo,n=void 0===o?"":o,s=e.pinCode,i=void 0===s?"":s,d=e.district,r=void 0===d?"":d,a=e.city,c=void 0===a?"":a,u=e.address1,v=void 0===u?"":u,m=/^\d{10}$/.test(null==n?void 0:n.trim()),f=/^\d{6}$/.test(null==i?void 0:i.trim());return(null==l?void 0:l.trim())!==""&&m&&f&&(null==r?void 0:r.trim())!==""&&(null==c?void 0:c.trim())!==""&&(null==v?void 0:v.trim())!==""&&(null==eu?void 0:eu.id)!=="Please Select"};(0,m.useEffect)(function(){ei(tI(ee))},[ee,eu]),(0,m.useEffect)(function(){if(T){et({lastName:(null==O?void 0:O.firstName)?"".concat(null==O?void 0:O.firstName," ").concat((null==O?void 0:O.lastName)||""):null==O?void 0:O.lastName,mobileNo:(null==O?void 0:O.phone)||"",country:"India",pinCode:(null==O?void 0:O.zip)||"",state:(null==O?void 0:O.province)||"",city:(null==O?void 0:O.city)||"",district:tP({addressData:null==O?void 0:O.address2,fieldKey:"district"}),address1:tP({addressData:(null==O?void 0:null===(e=O.address1)||void 0===e?void 0:e.includes(" - "))?"D.No: ".concat(null==O?void 0:O.address1):null==O?void 0:O.address1,fieldKey:"address1"}),address2:tP({addressData:null==O?void 0:O.address2,fieldKey:"address2"}),flathouseno:tP({addressData:(null==O?void 0:null===(t=O.address1)||void 0===t?void 0:t.includes(" - "))?"D.No: ".concat(null==O?void 0:O.address1):null==O?void 0:O.address1,fieldKey:"flathouseno"})}),ea((null==O?void 0:O.isDefault)||!1);var e,t,l=null==eB?void 0:eB.find(function(e){return(null==e?void 0:e.title)===(null==O?void 0:O.province)});l&&ev(l)}return function(){}},[T]),(0,m.useEffect)(function(){var e;if(tx&&Object.keys(tx).length&&(null==ee?void 0:null===(e=ee.pinCode)||void 0===e?void 0:e.length)===6){var t=null==eB?void 0:eB.find(function(e){return(null==e?void 0:e.title)===(null==tx?void 0:tx.state)});t?(et(function(e){return(0,i._)((0,s._)({},e),{district:(null==tx?void 0:tx.district)||"",city:(null==tx?void 0:tx.city)||""})}),eb(!0),ev(t)):(et(function(e){return(0,i._)((0,s._)({},e),{district:"",city:""})}),eb(!1),ev({id:"Please Select",title:"Please Select"}))}},[tx]),(0,m.useEffect)(function(){return 0===Object.keys(e$||{}).length&&ea(!0),function(){}},[e$]);var tF=function(){(eB||[]).length?ev(eB[0]):ev({}),et({lastName:"",mobileNo:"",country:"India",pinCode:"",state:"",city:"",address1:"",address2:"",district:"",flathouseno:""})},tP=function(e){var t=e.addressData,l=void 0===t?"":t,o=e.fieldKey,n=void 0===o?"":o;try{var s,i,d="",r="",a=[],c=/, Dist:/,u=!1;return"flathouseno"===n?r=/D\.No:\s*(.*?)\s*-/:"address1"===n?r=/(?:D\.No:.*?-)?\s*(.*)/:"district"===n?r=(u=c.test(l))?/, Dist:([^,]+)/:/Dist:\s*(.*?)\s*(-.*)?$/:"address2"===n&&(r=(u=c.test(l))?/(.+), Dist:/:/Dist:\s*([^-]*)(?:\s*-\s*)?(.*)/),(a=null==l?void 0:l.match(r))&&(a||[]).length?d="address2"!==n||u?(null==a?void 0:null===(i=a[1])||void 0===i?void 0:i.trim())||"":(null==a?void 0:null===(s=a[2])||void 0===s?void 0:s.trim())||"":"address2"===n&&(d=l),d}catch(e){}},tD=(0,m.useCallback)(function(e){var t,l=e.target,o=l.name,d=l.value;"pinCode"===o&&d.length<=6&&I.test(d)||"mobileNo"===o&&d.length<=10&&I.test(d)?"pinCode"===o&&5===d.length&&d.length<ee.pinCode.length?et((0,i._)((0,s._)({},ee),(t={},(0,n._)(t,o,d),(0,n._)(t,"address1",""),t))):et((0,i._)((0,s._)({},ee),(0,n._)({}
1,o,d))):"pinCode"!==o&&"mobileNo"!==o&&et((0,i._)((0,s._)({},ee),(0,n._)({},o,d)))}),tS=(l=(0,o._)(function(e){var t,l,o,n,d,r,c,u,v,m,h,x,p,g,_,N,w,C,j,k,A,I,F,P,D,S,E,Z,L,R,U,K,$,B,J,q,Q,X,et,en,ei,ed;return(0,a.Jh)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,10,,11]),e.preventDefault(),!es)return[3,8];return eh(!0),[4,{userId:e5,userExternalId:Number(tn),lastName:(null==ee?void 0:ee.lastName)||"",address1:(null==ee?void 0:ee.flathouseno)?"".concat(null==ee?void 0:ee.flathouseno," - ").concat(null==ee?void 0:ee.address1):null==ee?void 0:ee.address1,address2:"".concat((null==ee?void 0:ee.address2)?"Dist: ".concat(null==ee?void 0:ee.district," - ").concat(null==ee?void 0:ee.address2):"Dist: ".concat(null==ee?void 0:ee.district)),city:(null==ee?void 0:ee.city)||"",province:(null==eu?void 0:eu.id)||"",zip:(null==ee?void 0:ee.pinCode)||"",phone:(null==ee?void 0:ee.mobileNo)||"",name:"".concat((null==ee?void 0:ee.lastName)||""),isDefault:er,isDeleted:!1,country:"India",countryCode:"IN",countryName:"India",addressExternalId:0}];case 1:if(t=a.sent(),l=T?(0,s._)({id:null==O?void 0:O.id},t):t,er&&(l=(0,i._)((0,s._)({},l),{isDefaultAddressUpdated:!0,isDefault:er})),(0,b.Ug)({eventName:"wsf_user_address",itemId:null,itemName:eW?"change delivery address":"checkout"===z||"checkoutAddressList"===z?"update checkout address":T?"edit address":"add address",eventAction:"save",sessionDetails:eG,itemAttributes:(0,i._)((0,s._)({name:null==l?void 0:l.lastName,address1:null==l?void 0:l.address1,address2:null==l?void 0:l.address2,city:null==l?void 0:l.city,company:null==l?void 0:l.district,state:null==l?void 0:l.province,pincode:null==l?void 0:l.zip,phone:null==l?void 0:l.phone,country:"India",eventFrom:"addAddressModal"},eW?{externalOrderId:String(Y||"")}:{}),{source:z})}),!eW)return[3,3];return[4,eK({payload:{externalOrderId:String(Y||""),address1:(null==l?void 0:l.address1)||"",address2:(null==l?void 0:l.address2)||"",city:(null==l?void 0:l.city)||"",country:(null==l?void 0:l.country)||"",lastName:(null==l?void 0:l.lastName)||"",firstName:(null==l?void 0:l.firstName)||"",phone:(null==l?void 0:l.phone)||"",province:(null==l?void 0:l.province)||"",zip:(null==l?void 0:l.zip)||"",countryCode:(null==l?void 0:l.countryCode)||""},accessToken:tl}).unwrap()];case 2:case 4:return o=a.sent(),[3,7];case 3:if(!("checkout"===z||"checkoutAddressList"===z))return[3,5];return c=JSON.parse(null===(n=sessionStorage)||void 0===n?void 0:n.getItem("userAppliedCoupon")),u={selectedAddress:{address1:(null==l?void 0:l.address1)||"",address2:(null==l?void 0:l.address2)||"",city:(null==l?void 0:l.city)||"",company:null,country:(null==l?void 0:l.country)||"",lastName:(null==l?void 0:l.lastName)||"",firstName:(null==l?void 0:l.firstName)||"",phone:(null==l?void 0:l.phone)||"",province:(null==l?void 0:l.province)||"",zip:(null==l?void 0:l.zip)||"",countryCode:(null==l?void 0:l.countryCode)||""},discountAmount:(null==c?void 0:null===(d=c.value)||void 0===d?void 0:d.toString())||"0",discountCode:(null==c?void 0:null===(r=c.name)||void 0===r?void 0:r.toString())||"0"},te||(T?eV({payload:l,accessToken:tl}).unwrap():eU({payload:l,accessToken:tl}).unwrap()),ez((0,y.hE)(l)),[4,eH({checkoutPayload:u,checkoutId:V,userId:e5||"",accessToken:tl}).unwrap()];case 5:return[4,T?eV({payload:l,accessToken:tl}).unwrap():eU({payload:l,accessToken:tl}).unwrap()];case 6:o=a.sent(),a.label=7;case 7:return eW||(null==o?void 0:o.result)==="Success"||("checkout"===z||"checkoutAddressList"===z)&&o&&Object.keys(o).length?((0,b.Ug)({eventName:"wsf_user_address",itemId:null,itemName:eW?"change delivery address":"checkout"===z||"checkoutAddressList"===z?"update checkout address":T?"edit address":"add address",eventAction:"success",sessionDetails:eG,itemAttributes:(0,i._)((0,s._)({name:null==l?void 0:l.lastName,address1:null==l?void 0:l.address1,address2:null==l?void 0:l.address2,city:null==l?void 0:l.city,state:null==l?void 0:l.province,pincode:null==l?void 0:l.zip,phone:null==l?void 0:l.phone,country:"India",eventFrom:"addAddressModal"},eW?{externalOrderId:String(Y||"")}:{}),{source:z})}),"checkout"===z?eR.refresh():"checkoutAddressList"===z&&(v="".concat("en"!==W?"/"+W:"","/checkout/").concat(null==o?void 0:o.checkoutId,"/payment-mode"),G?(null==o?void 0:o.checkoutId)&&
1V&&o.checkoutId!==V&&eR.replace(v):eR.replace(v),eR.refresh()),eh(!1),eW||M(),"function"==typeof H&&H(),tF(),eW||f.ZP.success(el("address_saved_successfully"),{position:"top-center"})):"Failure"===o.result?(eh(!1),f.ZP.error(el("unable_save_address"),{position:"top-center"})):(eh(!1),f.ZP.error(eo("something_went_wrong_try_again",{position:"top-center"}))),[3,9];case 8:if(h=void 0===(m=ee.lastName)?"":m,p=void 0===(x=ee.mobileNo)?"":x,_=void 0===(g=ee.pinCode)?"":g,w=void 0===(N=ee.district)?"":N,j=void 0===(C=ee.city)?"":C,A=void 0===(k=ee.address1)?"":k,F=void 0===(I=ee.flathouseno)?"":I,P=/^\d{10}$/.test(null==p?void 0:p.trim()),D=/^\d{6}$/.test(null==_?void 0:_.trim()),h){if(!P)return null==eS||null===(Z=eS.current)||void 0===Z||Z.focus(),null==eS||null===(L=eS.current)||void 0===L||L.scrollIntoView({behavior:"smooth",block:"center"}),f.ZP.error(el("please_enter_mobile_no"),{position:"top-center"}),[2];if(!F&&(null==tu?void 0:tu.isMandatory))return null==eE||null===(R=eE.current)||void 0===R||R.focus(),null==eE||null===(U=eE.current)||void 0===U||U.scrollIntoView({behavior:"smooth",block:"center"}),f.ZP.error(el("please_enter_flathouseno"),{position:"top-center"}),[2];if(!A&&(null==tm?void 0:tm.isMandatory))return null==eO||null===(K=eO.current)||void 0===K||K.focus(),null==eO||null===($=eO.current)||void 0===$||$.scrollIntoView({behavior:"smooth",block:"center"}),f.ZP.error(el("please_enter_address_1"),{position:"top-center"}),[2];else if(!D)return null==eT||null===(B=eT.current)||void 0===B||B.focus(),null==eT||null===(J=eT.current)||void 0===J||J.scrollIntoView({behavior:"smooth",block:"center"}),f.ZP.error(el("please_enter_pincode"),{position:"top-center"}),[2];else if(!j)return null==eZ||null===(q=eZ.current)||void 0===q||q.focus(),null==eZ||null===(Q=eZ.current)||void 0===Q||Q.scrollIntoView({behavior:"smooth",block:"center"}),f.ZP.error(el("please_enter_city"),{position:"top-center"}),[2];else if(!w)return null==eM||null===(X=eM.current)||void 0===X||X.focus(),null==eM||null===(et=eM.current)||void 0===et||et.scrollIntoView({behavior:"smooth",block:"center"}),f.ZP.error(el("please_enter_district"),{position:"top-center"}),[2];else if((null==eu?void 0:eu.id)==="Please Select")return f.ZP.error(el("please_select_state"),{position:"top-center"}),[2]}else null==eD||null===(S=eD.current)||void 0===S||S.focus(),null==eD||null===(E=eD.current)||void 0===E||E.scrollIntoView({behavior:"smooth",block:"center"}),f.ZP.error(el("please_enter_name"),{position:"top-center"});a.label=9;case 9:return[3,11];case 10:return en=a.sent(),eh(!1),eW&&(ed=el("unable_to_update_delivery_address"),(null==en?void 0:null===(ei=en.data)||void 0===ei?void 0:ei.ErrorCode)==="PRODUCT_RESTRICTION"&&(ed=el("unable_update_delivery_address_product_restriction").replace("#STATE",null==eu?void 0:eu.title)),f.ZP.error(ed,{position:"top-center"})),[3,11];case 11:return[2]}})}),function(e){return l.apply(this,arguments)});return(0,c.jsxs)(k.Z,{modalTitle:T?el("edit_address"):el("add_address"),isModelOpen:void 0!==D&&D,modalPositionZindex:void 0===q?"!z-[1100]":q,onClose:function(){(0,b.Ug)({eventName:"wsf_user_address",itemId:null,itemName:T?"edit address":"add address",eventAction:"close",sessionDetails:eG,itemAttributes:{source:z,eventFrom:"addAddressModal"}}),tF(),M()},titleClassName:"".concat(void 0!==$&&$?"px-4 pt-4 pb-3 shrink-0 !mb-0 bg-[#F8F9FE]":"px-4 pt-4 pb-3 shrink-0 !mb-0 bg-[#F8F9FE] md:rounded-t-2xl"," ").concat(void 0===L?"":L),titleTextStyle:"text-lg md:text-xl font-semibold text-[#1F1F1F]",closeBtnClassName:"flex h-9 w-9 items-center justify-center rounded-full bg-[#E9EAF0] text-disableText hover:bg-[#DEDFE6] focu
1s:outline-none",closeBtnIconClassName:"w-5 h-5",modalInnerContainerClassname:"flex min-h-full items-end md:items-center justify-center md:p-4 mobileAddAddress text-center",modalOuterContainerClassName:"fixed inset-0 overflow-y-auto",innerDialoguePanelClassName:"w-full md:max-w-[480px] transform overflow-hidden rounded-t-2xl md:rounded-2xl bg-[#F8F9FE] p-0 align-middle shadow-xl transition-all fixed bottom-0 md:relative md:bottom-auto h-[80vh] max-h-[80vh] md:h-[85vh] md:max-h-[85vh] flex flex-col",children:[ek||tC||tj?(0,c.jsx)("div",{className:"h-full absolute top-0 left-0 !z-[999] w-full flex justify-center items-center bg-modalTransparentBg",children:(0,c.jsx)(j.default,{})}):(0,c.jsx)(c.Fragment,{}),(0,c.jsxs)("div",{className:"relative flex flex-col flex-1 min-h-0 overflow-hidden",children:[(0,c.jsx)("div",{className:"flex-1 min-h-0 overflow-y-scroll scroll-smooth no-scrollbar px-4 pb-[120px] pt-1",children:(0,c.jsxs)("form",{children:[!T&&td?(0,c.jsxs)("div",{className:"flex flex-row items-center mb-4",children:[(0,c.jsx)("div",{className:"flex flex-col mr-2 w-1/2 md:w-7/12",children:(0,c.jsx)("h3",{className:"text-base font-semibold leading-6 text-black text-left",children:el("details")})}),(0,c.jsx)("div",{className:"flex flex-col ml-2 w-1/2 md:w-5/12 justify-center",children:(0,c.jsxs)("button",{className:"bg-useMyLocation hover:bg-opacity-90 focus:bg-opacity-90 rounded-xl px-2.5 py-1.5 flex flex-row items-center justify-center",disabled:ek,onClick:function(e){e.preventDefault(),(0,b.Ug)({eventName:"wsf_generic_events",itemId:null,itemName:"useMyLocation",eventAction:"click",sessionDetails:eG,itemAttributes:{source:z,eventFrom:"addAddressModal"}}),tk({triggerFrom:"manual"})},children:[(0,c.jsx)(C.YZ,{fill:g.O.white,className:"w-4 h-4 mr-1.5"}),(0,c.jsx)("p",{className:"text-sm font-normal text-white text-center",children:el("use_my_location")})]})})]}):(0,c.jsx)(c.Fragment,{}),(0,c.jsxs)("div",{className:"flex flex-col mb-4",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("full_name"),(0,c.jsx)("span",{style:{color:"red"},children:" *"})]}),(0,c.jsx)("input",{ref:eD,className:"border border-borderColor rounded-xl w-full h-10 py-1 px-3 text-sm font-normal text-black leading-tight focus:outline-none focus:shadow-outline caret-sfPrimaryColor bg-white",type:"text",name:"lastName",value:null==ee?void 0:ee.lastName,onChange:tD})]}),(0,c.jsxs)("div",{className:"flex flex-col mb-4",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("mobile_no"),(0,c.jsx)("span",{style:{color:"red"},children:" *"})]}),(0,c.jsxs)("div",{className:"border border-borderColor rounded-xl overflow-hidden flex flex-row justify-center bg-white",children:[(0,c.jsx)("p",{className:"border-r border-borderColor text-sm font-medium text-black text-center h-10 w-12 bg-languageCard flex-row flex items-center justify-center",children:"+91"}),(0,c.jsx)("input",{ref:eS,className:"w-full h-10 py-1 px-3 text-sm font-normal text-black leading-tight focus:outline-none focus:shadow-outline caret-sfPrimaryColor",type:"tel",name:"mobileNo",value:null==ee?void 0:ee.mobileNo,onChange:tD,maxLength:"10",onWheel:function(e){var t;return null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.blur()}})]})]}),(0,c.jsxs)("div",{className:"flex flex-col mb-4",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("flat_houseno"),(null==tu?void 0:tu.isMandatory)?"":el("flat_houseno_ifany"),(null==tu?void 0:tu.isMandatory)?(0,c.jsx)("span",{style:{color:"red"},children:" *"}):(0,c.jsx)(c.Fragment,{})]}),(0,c.jsx)("input",{ref:eE,className:"border border-borderColor rounded-xl w-full h-10 py-1 px-3 text-sm font-normal text-black leading-tight focus:outline-none focus:shadow-outline caret-sfPrimaryColor bg-white",type:"text",name:"flathouseno",maxLength:(null==tu?void 0:tu.characterLength)||200,value:null==ee?void 0:ee.flathouseno,onChange:tD})]}),(0,c.jsxs)("div",{className:"flex flex-col mb-4",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("street_area_colony_village_mandal_taluk"),(null==tm?void 0:tm.isMandatory)?(0,c.jsx)("span",{style:{color:"red"},children:" *"}):(0,c.jsx)(c.Fragment,{})]}),(0,c.jsx)("input",{ref:eO,className:"border border-borderColor roun
1ded-xl w-full h-10 py-1 px-3 text-sm font-normal text-black leading-tight focus:outline-none focus:shadow-outline caret-sfPrimaryColor bg-white",type:"text",name:"address1",maxLength:(null==tm?void 0:tm.characterLength)||200,value:null==ee?void 0:ee.address1,onChange:tD})]}),(0,c.jsxs)("div",{className:"flex flex-row items-center",children:[(0,c.jsxs)("div",{className:"flex flex-col mb-4 mr-2 w-1/2",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("pincode"),(0,c.jsx)("span",{style:{color:"red"},children:" *"})]}),(0,c.jsx)("input",{ref:eT,className:"border border-borderColor rounded-xl w-full h-10 py-1 px-3 text-sm font-normal text-black leading-tight focus:outline-none focus:shadow-outline caret-sfPrimaryColor bg-white",type:"tel",name:"pinCode",value:null==ee?void 0:ee.pinCode,onChange:tD,maxLength:"6",onWheel:function(e){var t;return null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.blur()}})]}),(0,c.jsxs)("div",{className:"flex flex-col mb-4 ml-2 w-1/2",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("city"),(0,c.jsx)("span",{style:{color:"red"},children:" *"})]}),(0,c.jsx)("input",{ref:eZ,className:"border border-borderColor rounded-xl w-full h-10 py-1 px-3 text-sm font-normal text-black leading-tight focus:outline-none focus:shadow-outline caret-sfPrimaryColor bg-white",type:"text",name:"city",value:null==ee?void 0:ee.city,onChange:tD})]})]}),(0,c.jsxs)("div",{className:"flex flex-row items-center",children:[(0,c.jsxs)("div",{className:"flex flex-col mb-4 mr-2 w-1/2",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("district"),(0,c.jsx)("span",{style:{color:"red"},children:" *"})]}),(0,c.jsx)("input",{ref:eM,className:"border border-borderColor rounded-xl w-full h-10 py-1 px-3 text-sm font-normal text-black leading-tight focus:outline-none focus:shadow-outline caret-sfPrimaryColor bg-white",type:"text",name:"district",value:null==ee?void 0:ee.district,onChange:tD})]}),(0,c.jsxs)("div",{className:"flex flex-col mb-4 ml-2 w-1/2",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("state"),(0,c.jsx)("span",{style:{color:"red"},children:" *"})]}),(0,c.jsx)(A.default,{name:"state",selectOptions:[{id:"Please Select",title:el("please_select")}].concat((0,r._)(eB)),selectedValue:eu,setSelectedValue:function(e){"Please Select"===e.id&&f.ZP.error(el("please_select_state"),{position:"top-center"}),ev(e)},disabled:ep,selectClassName:"w-full",optionsClassName:"w-11/12"})]})]}),(0,c.jsxs)("div",{className:"flex flex-col mb-4",children:[(0,c.jsx)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:el("landmark")}),(0,c.jsx)("input",{ref:eL,className:"border border-borderColor rounded-xl w-full h-10 py-1 px-3 text-sm font-normal text-black leading-tight focus:outline-none focus:shadow-outline caret-sfPrimaryColor bg-white",type:"text",name:"address2",value:null==ee?void 0:ee.address2,onChange:tD})]}),(0,c.jsxs)("div",{className:"flex flex-col mb-4",children:[(0,c.jsxs)("label",{className:"text-sm font-normal text-disableText text-left mb-1",children:[el("country"),(0,c.jsx)("span",{style:{color:"red"},children:" *"})]}),(0,c.jsx)(A.default,{name:"country",selectedValue:{id:"India",title:"India"},disabled:!0,selectClassName:"w-full",optionsClassName:"w-11/12"})]})]})}),(0,c.jsxs)("div",{className:"absolute z-20 bottom-0 w-full left-0 px-4 py-3 bg-[#F8F9FE] border-t border-[#E7E8EE]",children:[(0,c.jsx)("div",{className:"flex items-center mb-3",children:eW||0===Object.keys(e$||{}).length||T&&(null==O?void 0:O.isDefault)?(0,c.jsx)(c.Fragment,{children:" "}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("input",{checked:er,id:"default-address-checkbox",type:"checkbox",value:"",className:"w-4 h-4 bg-white border border-borderColor !rounded-md focus:ring-mediumGreen circleCheckboxStyle",onChange:function(e){var t;return ea(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.checked)}}),(0,c.jsx)("label",{htmlFor:"default-address-checkbox",className:"ml-2 text-sm font-normal text-black",children:el("make_default_address")})]})}),(0,c.jsxs)("div",{className:"flex flex-row items-center gap-3",children:[(0,c.jsx)("button",{type:"button",onClick:function(){(0,b.Ug)({eventName:"wsf_user_address",itemId:null,itemName:"cancel address",eventAction:"cancel",sessionDetail
1s:eG,itemAttributes:{source:z,eventFrom:"addAddressModal"}}),tF(),M()},className:"bg-white border border-[#E7E8EE] w-6/12 hover:bg-[#FAFBFD] text-black font-semibold text-sm py-3 px-3 rounded-xl",children:el("cancel")}),(0,c.jsx)("button",{disabled:ef,className:"bg-sfPrimaryColor text-sm font-semibold text-white hover:bg-opacity-90 w-6/12 px-3 py-3 rounded-xl",type:"button",onClick:function(e){return tS(e)},children:T?el("update"):el("submit")})]})]})]})]})}}}]);
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.