1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8292],{48954:function(e,t,n){"use strict";n.d(t,{Z:function(){return ZoomFitContainer}});var i=n(85893);function ZoomFitContainer(e){return(0,i.jsx)("div",{className:"full padding-top",children:e.content})}},76566:function(e,t,n){"use strict";n.d(t,{a:function(){return OTPEmailVerifyComponent}});var i=n(10748),o=n(45959),r=n(63553),a=n(37247),l=n(82262),d=n(92777),c=n(59499),s=n(51233),u=n(11057),v=n(67294),h=n(38007),p=n(26369),f=n(49809),m=n(90727),x=n(13023),Z=n(86732),g=n(31096),b=n(46197),y=n(25929),j=n(83242),C=n(85893),D=function(e){(0,o.Z)(ConfirmTPModel,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,a.Z)(ConfirmTPModel);if(t){var i=(0,a.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,r.Z)(this,e)});function ConfirmTPModel(e,t){var o;return(0,d.Z)(this,ConfirmTPModel),o=n.call(this),(0,c.Z)((0,i.Z)(o),"ref",void 0),(0,c.Z)((0,i.Z)(o),"OTP",void 0),o.ref=e,o.OTP=t,o}return(0,l.Z)(ConfirmTPModel)}(m.Z);function OTPEmailVerifyComponent(e){var t=(0,f.Z)(e.locale),n=(0,v.useRef)(),i=(0,v.useState)(""),o=i[0],r=i[1],a=(0,v.useState)(""),l=a[0],d=a[1],c=(0,v.useState)(0),m=c[0],I=c[1],S=(0,v.useState)(),w=S[0],k=S[1],N=(0,v.useState)(0),F=N[0],T=N[1],M=(0,v.useState)(!0),O=M[0],_=M[1],P=(0,v.useState)(!1),E=P[0],A=P[1];return((0,v.useEffect)(function(){T(0),A(!0)},[]),(0,v.useEffect)(function(){F<=3&&function(){_(!0);var t={};try{t={p:e.sendData.phoneNumber,m:e.sendData.email}}catch(e){}var n=(0,j.Z)(e.tag,t,e.locale);n.UUID?(e.sendData.UUID=n.UUID,(0,h._i)(p.Oh?"":(0,p.yL)(),"OneTimePassword","RequestOTP",e.sendData,function(e,t){k(e),_(!1)},function(t,n,i){(0,Z.Z)(n,function(){e.onClose()})},e.locale)):(0,Z.Z)(n.msg,function(){e.onClose()})}()},[F]),(0,v.useEffect)(function(){var t,i;null!=w&&w.timeout&&null!=w&&w.ref&&(d(w.ref),t=w.timeout,n.current&&clearInterval(n.current),I(t),i=new Date().getTime()/1e3,n.current=setInterval(function(){var o=new Date().getTime()/1e3,r=(0,y.L)(t-(o-i));r<=0?(I(0),n.current&&clearInterval(n.current),e.onClose()):I(r)},1e3))},[w]),E)?(0,C.jsx)(C.Fragment,{children:O?(0,C.jsx)("div",{children:(0,C.jsx)(b.J,{})}):(0,C.jsx)("div",{children:(0,C.jsxs)(s.Z,{spacing:2,children:[(0,C.jsxs)("div",{className:"center-text title fli",style:{padding:"20px 0 0 0"},children:[(0,C.jsx)("div",{children:t.otp.dialogSendTo}),(0,C.jsx)("div",{className:"fmed",children:e.sendTo}),(0,C.jsx)("div",{children:t.otp.expiredIn.replaceAll("{x}",(((null==w?void 0:w.timeout)||300)/60).toString())}),(0,C.jsxs)("div",{style:{padding:"20px 0 20px 0"},children:[(0,C.jsx)("div",{className:"fli desc",children:"".concat(t.otp.ref," ").concat(l)}),(0,C.jsx)("div",{className:"fli desc",children:"(".concat(m," ").concat(t.otp.second,")")})]}),(0,C.jsx)("div",{style:{padding:"20px 0 10px 0"},children:(0,C.jsx)("div",{className:"fli desc",children:"th"===e.locale?"à¸à¸£à¸¸à¸à¸²à¸£à¸°à¸à¸¸à¸£à¸«à¸±à¸ªà¸à¸µà¹à¹à¸à¹à¸£à¸±à¸à¸à¸²à¸à¸à¸µà¹à¸¡à¸¥":"Please fill code from your email."})})]}),(0,C.jsx)("div",{className:"full center-text",style:{paddingBottom:"10px"},children:(0,C.jsx)(g.Z,{locale:e.locale,onChange:function(e){r(e)}})}),(0,C.jsx)("br",{}),(0,C.jsx)("div",{className:"desc",style:{alignSelf:"center"},children:(0,C.jsx)("div",{className:F<3?"hover":"",onClick:function(){3==F?(0,x.Z)("resendCount","resendCount == 3"):T(F+1)},children:"".concat("th"===e.locale?"ลà¸à¸à¸à¸µà¸à¸à¸£à¸±à¹à¸":"Try again."," ").concat(t.otp.dontGetCode," (").concat(F,"/3)")})}),(0,C.jsx)("br",{}),(0,C.jsx)("div",{className:"full center-text",children:(0,C.jsx)(u.Z,{id:"ConfirmDialog-close",variant:"contained",color:"primary",style:{color:"#FFFFFF",minWidth:"150px",maxWidth:"250px"},disabled:6!=o.length||m<=0,onClick:function(){6==o.length&&m>0&&(0,h._i)(p.Oh?"":(0,p.yL)(),"OneTimePassword","VerifyOTP",new D((null==w?void 0:w.ref)||"",o),function(t,n){t.tempToken?e.onFinish(t.tempToken):(0,Z.Z)(n)},function(t,n,i){(0,Z.Z)(n,function(){429==t&&e.onClose()})},e.locale)},children:t.otp.verify})})]})})}):null}},58862:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});
1var i=n(82262),o=n(92777),r=n(10748),a=n(45959),l=n(63553),d=n(37247),c=n(59499),s=function(e){(0,a.Z)(GetAddressMaster,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,d.Z)(GetAddressMaster);if(t){var i=(0,d.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,l.Z)(this,e)});function GetAddressMaster(e,t,i,a){var l;return(0,o.Z)(this,GetAddressMaster),l=n.call(this),(0,c.Z)((0,r.Z)(l),"countryCode",void 0),(0,c.Z)((0,r.Z)(l),"provinceCode",void 0),(0,c.Z)((0,r.Z)(l),"districtCode",void 0),(0,c.Z)((0,r.Z)(l),"subDistrictCode",void 0),l.countryCode=e,l.provinceCode=t,l.districtCode=i,l.subDistrictCode=a,l}return(0,i.Z)(GetAddressMaster)}(n(90727).Z)},42128:function(e,t,n){"use strict";n.d(t,{n:function(){return s}});var i=n(82262),o=n(92777),r=n(10748),a=n(45959),l=n(63553),d=n(37247),c=n(59499),s=function(e){(0,a.Z)(MCountryItem,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,d.Z)(MCountryItem);if(t){var i=(0,d.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,l.Z)(this,e)});function MCountryItem(e,t){var i;return(0,o.Z)(this,MCountryItem),i=n.call(this),(0,c.Z)((0,r.Z)(i),"code",void 0),(0,c.Z)((0,r.Z)(i),"name",void 0),i.code=e,i.name=t,i}return(0,i.Z)(MCountryItem)}(n(90727).Z)},68594:function(e,t,n){"use strict";n.d(t,{OY:function(){return h},ZP:function(){return v},hX:function(){return f},nA:function(){return p}});var i=n(82262),o=n(92777),r=n(10748),a=n(45959),l=n(63553),d=n(37247),c=n(59499),s=n(90727),u=n(94487);function _createSuper(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return(0,l.Z)(this,n)}}var v=function(e){(0,a.Z)(AddressModel,e);var t=_createSuper(AddressModel);function AddressModel(){var e;(0,o.Z)(this,AddressModel);for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,c.Z)((0,r.Z)(e),"name",void 0),(0,c.Z)((0,r.Z)(e),"branchName",void 0),(0,c.Z)((0,r.Z)(e),"firstname",void 0),(0,c.Z)((0,r.Z)(e),"lastname",void 0),(0,c.Z)((0,r.Z)(e),"phone",void 0),(0,c.Z)((0,r.Z)(e),"isDefault",void 0),(0,c.Z)((0,r.Z)(e),"address",void 0),(0,c.Z)((0,r.Z)(e),"province",void 0),(0,c.Z)((0,r.Z)(e),"district",void 0),(0,c.Z)((0,r.Z)(e),"subDistrict",void 0),(0,c.Z)((0,r.Z)(e),"country",void 0),(0,c.Z)((0,r.Z)(e),"zipCode",void 0),(0,c.Z)((0,r.Z)(e),"storeCode",void 0),(0,c.Z)((0,r.Z)(e),"currentLocation",void 0),(0,c.Z)((0,r.Z)(e),"isShippingAddress",void 0),(0,c.Z)((0,r.Z)(e),"isBillingAddress",void 0),(0,c.Z)((0,r.Z)(e),"addressTypeID",void 0),e}return(0,i.Z)(AddressModel)}(s.Z),h=function(e){(0,a.Z)(AddressInfoModel,e);var t=_createSuper(AddressInfoModel);function AddressInfoModel(e,n){var i;return(0,o.Z)(this,AddressInfoModel),i=t.call(this),(0,c.Z)((0,r.Z)(i),"code",void 0),(0,c.Z)((0,r.Z)(i),"name",void 0),i.code=e.replace("null",""),i.name=null==n?void 0:n.replace("null",""),i}return(0,i.Z)(AddressInfoModel)}(s.Z),p=function(e){(0,a.Z)(AddressPhoneModel,e);var t=_createSuper(AddressPhoneModel);function AddressPhoneModel(e,n){var i;return(0,o.Z)(this,AddressPhoneModel),i=t.call(this),(0,c.Z)((0,r.Z)(i),"regionID",void 0),(0,c.Z)((0,r.Z)(i),"phoneNumber",void 0),i.regionID=e,i.phoneNumber=(0,u.O4)(e,n||""),i}return(0,i.Z)(AddressPhoneModel)}(s.Z),f=function(e){(0,a.Z)(AddressCurrentLocationModel,e);var t=_createSuper(AddressCurrentLocationModel);function AddressCurrentLocationModel(){var e;(0,o.Z)(this,AddressCurrentLocationModel);for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,c.Z)((0,r.Z)(e),"latitude",void 0),(0,c.Z)((0,r.Z)(e),"longitude",void 0),(0,c.Z)((0,r.Z)(e),"detail",void 0),e}return(0,i.Z)(AddressCurrentLocationModel)}(s.Z)},1940:function(e,t,n){"use strict";n.d(t,{J:function(){return v},Z:function(){return u}});
1var i=n(82262),o=n(92777),r=n(10748),a=n(45959),l=n(63553),d=n(37247),c=n(59499),s=n(90727);function _createSuper(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return(0,l.Z)(this,n)}}var u=function(e){(0,a.Z)(ConfirmCheckoutModel,e);var t=_createSuper(ConfirmCheckoutModel);function ConfirmCheckoutModel(){var e;(0,o.Z)(this,ConfirmCheckoutModel);for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),(0,c.Z)((0,r.Z)(e),"custEmail",void 0),(0,c.Z)((0,r.Z)(e),"custPhone",void 0),(0,c.Z)((0,r.Z)(e),"shippingAddress",void 0),(0,c.Z)((0,r.Z)(e),"billingAddress",void 0),(0,c.Z)((0,r.Z)(e),"fullTaxInvoice",void 0),(0,c.Z)((0,r.Z)(e),"paymentMethodTypeID",void 0),(0,c.Z)((0,r.Z)(e),"itemList",void 0),(0,c.Z)((0,r.Z)(e),"freeItems",void 0),(0,c.Z)((0,r.Z)(e),"point",void 0),(0,c.Z)((0,r.Z)(e),"couponCode",void 0),(0,c.Z)((0,r.Z)(e),"shippingCost",void 0),(0,c.Z)((0,r.Z)(e),"cashbackReceive",void 0),(0,c.Z)((0,r.Z)(e),"promotions",void 0),(0,c.Z)((0,r.Z)(e),"selectableFreeItems",void 0),(0,c.Z)((0,r.Z)(e),"selectedPromotionItems",void 0),(0,c.Z)((0,r.Z)(e),"promotionItems",void 0),(0,c.Z)((0,r.Z)(e),"summaryTmp",void 0),(0,c.Z)((0,r.Z)(e),"clientID",void 0),(0,c.Z)((0,r.Z)(e),"salesman",void 0),e}return(0,i.Z)(ConfirmCheckoutModel)}(s.Z),v=function(e){(0,a.Z)(ConfirmCheckoutFullTaxInvoiceModel,e);var t=_createSuper(ConfirmCheckoutFullTaxInvoiceModel);function ConfirmCheckoutFullTaxInvoiceModel(){var e;return(0,o.Z)(this,ConfirmCheckoutFullTaxInvoiceModel),e=t.call(this),(0,c.Z)((0,r.Z)(e),"taxTypeID",void 0),(0,c.Z)((0,r.Z)(e),"number",void 0),(0,c.Z)((0,r.Z)(e),"legalEntityName",void 0),(0,c.Z)((0,r.Z)(e),"codeBrach",void 0),(0,c.Z)((0,r.Z)(e),"email",void 0),e.taxTypeID=1,e}return(0,i.Z)(ConfirmCheckoutFullTaxInvoiceModel)}(s.Z)},46737:function(e,t,n){"use strict";n.d(t,{N_:function(){return v},ZP:function(){return u}});var i=n(92777),o=n(82262),r=n(10748),a=n(45959),l=n(63553),d=n(37247),c=n(59499),s=n(90727);function _createSuper(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return(0,l.Z)(this,n)}}var u=function(e){(0,a.Z)(EtaxAddrModel,e);var t=_createSuper(EtaxAddrModel);function EtaxAddrModel(e,n){var o;return(0,i.Z)(this,EtaxAddrModel),o=t.call(this),(0,c.Z)((0,r.Z)(o),"code",void 0),(0,c.Z)((0,r.Z)(o),"name",void 0),(0,c.Z)((0,r.Z)(o),"title",void 0),o.code=e,o.name=n.replace("à¸à¸³à¹à¸ à¸","").replace("à¹à¸à¸","").replace("à¸à¸³à¸à¸¥","").replace("à¹à¸à¸§à¸",""),o}return(0,o.Z)(EtaxAddrModel,[{key:"getID",value:function(){return 0}},{key:"getTitle",value:function(){return this.name}},{key:"isActive",value:function(){return!1}}]),EtaxAddrModel}(s.Z),v=function(e){(0,a.Z)(GetOrderInfoData,e);var t=_createSuper(GetOrderInfoData);function GetOrderInfoData(e){var n;return(0,i.Z)(this,GetOrderInfoData),n=t.call(this),(0,c.Z)((0,r.Z)(n),"orderNumber",void 0),n.orderNumber=e,n}return(0,o.Z)(GetOrderInfoData)}(s.Z)},54539:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var i=n(82262),o=n(92777),r=n(10748),a=n(45959),l=n(63553),d=n(37247),c=n(59499),s=n(58646),u=n(38007),v=n(26369),h=n(37760),p=n(90727);function _createSuper(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=(0,d.Z)(e);if(t){var o=(0,d.Z)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return(0,l.Z)(this,n)}}var f=function(e){(0,a.Z)(CheckWhileListModel,e);var t=_createSuper(CheckWhileListModel);function CheckWhileListModel(e){var n;return(0,o.Z)(this,CheckWhileListModel),n=t.call(this),(0,c.Z)((0,r.Z)(n),"email",void 0),n.email=e,n}return(0,i.Z)(CheckWhileListModel)}(p.Z),m=function(e){(0,a.Z)(EtaxVerifyViewModel,e);var t=_createSuper(EtaxVerifyViewModel);function EtaxVerifyViewModel(e){return(0,o.Z)(this,EtaxVerifyViewModel),t.call(this,e)}return(0,i.Z)(EtaxVerifyViewModel,[{key:"preFiledEmail",value:function(e,t){var n;(0,u._i)(v.Oh?"":(0,v.Pt)(),"ETax","PreFiledEmail",new p.Z,function(t,n){e(t)},function(e,n){t()},this.getLocale(),null===(n=h.ZP.getUser())||void 0===n?void 0:n.token)}},{key:"checkWhileList",value:function(e,t,n){var i;(0,u._i)(v.Oh?"":(0,v.Pt)(),"ETax","CheckWhileList",new f(e),function(e,n){t(!0)},function(e,t){n()},this.getLocale(),null===(i=h.ZP.getUser())||void 0===i?void 0:i.token)}}]),EtaxVerifyViewModel}(s.Z)},95735:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return eb},default:function(){return ey}});var i=n(16835),o=n(9008),r=n.n(o),a=n(90340),l=n(22585),d=n(48954),c=n(70461),s=n(67764),u=n(67294),v=n(37760),h=n(10682),p=n(21608),f=n(12106),m=n(66705),x=n(42496),Z=n(39332),g=n(82262),b=n(92777),y=n(10748),j=n(45959),C=n(63553),D=n(37247),I=n(59499),S=n(58646),w=n(46737),k=n(38007),N=n(26369),F=n(86732),T=n(47668),M=n(74057),O=n(90727),_=n(63477),P=n(85893);function _createSuper(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=(0,D.Z)(e);if(t){var o=(0,D.Z)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return(0,C.Z)(this,n)}}var E=function(e){(0,j.Z)(ETagGetOrderModel,e);var t=_createSuper(ETagGetOrderModel);function ETagGetOrderModel(e){var n;return(0,b.Z)(this,ETagGetOrderModel),n=t.call(this),(0,I.Z)((0,y.Z)(n),"email",void 0),n.email=e,n}return(0,g.Z)(ETagGetOrderModel)}
1(O.Z),A=function(e){(0,j.Z)(EtaxInputViewModel,e);var t=_createSuper(EtaxInputViewModel);function EtaxInputViewModel(e){return(0,b.Z)(this,EtaxInputViewModel),t.call(this,e)}return(0,g.Z)(EtaxInputViewModel,[{key:"getComponent",value:function(e,t){switch(e.key){case"COMPONENT_001":return(0,P.jsx)("div",{children:(0,P.jsx)(T.Z,{data:e.data})},(0,x.Z)());case"COMPONENT_010":return(0,P.jsx)("div",{children:(0,P.jsx)(M.Z,{data:e.data})},(0,x.Z)());default:return null}}},{key:"getMSaleChannel",value:function(e){(0,k._i)(N.Oh?"":(0,N.Pt)(),"ETax","MSaleChannel",new O.Z,function(t,n){e(t)},function(e,t){(0,F.Z)(t)},this.getLocale())}},{key:"getMTaxType",value:function(e){(0,k._i)(N.Oh?"https://idev.shu.global/mockdata/WebSHU/CheckOut/MasterData/MTaxType/data.json":(0,N.Pt)(),"CheckOut","MTaxType",new O.Z,function(t,n){e(t)},function(e,t){(0,F.Z)(t)},this.getLocale())}},{key:"getPreOrder",value:function(e,t){var n;(0,k._i)(N.Oh?"https://idev.shu.global/mockdata/WebSHU/CheckOut/MasterData/MTaxType/data.json":(0,N.Pt)(),"ETax","GetOrder",new E(e),function(e,n){t(e)},function(e,n){t([])},this.getLocale(),null===(n=v.ZP.getUser())||void 0===n?void 0:n.token)}},{key:"getUserData",value:function(e,t,n){var i,o;null!==(i=v.ZP.getUser())&&void 0!==i&&i.token&&(0,k._i)(N.Oh?"":(0,N.Pt)(),"ETax","GetOrderInfo",new w.N_(e),function(e,n){t(e)},function(e,t){(0,F.Z)(t,function(){window.open("/order/tracking","_self")}),n()},this.getLocale(),null===(o=v.ZP.getUser())||void 0===o?void 0:o.token)}},{key:"save",value:function(e,t,n,i,o){var r,a,l,d,c,u,h,p,f,m,x,Z,g,b,y,j,C,D,I;"0"===e.branch&&(e.branch="");try{e.orderNumber=null===(a=e.orderNumber)||void 0===a?void 0:a.trim(),e.saleChannelID=null===(l=e.saleChannelID)||void 0===l?void 0:l.trim(),e.saleChannelKey=null===(d=e.saleChannelKey)||void 0===d?void 0:d.trim(),e.branch=null===(c=e.branch)||void 0===c?void 0:c.trim(),e.fullName=null===(u=e.fullName)||void 0===u?void 0:u.trim(),e.address=null===(h=e.address)||void 0===h?void 0:h.trim(),e.provinceID=null===(p=e.provinceID)||void 0===p?void 0:p.trim(),e.districtID=null===(f=e.districtID)||void 0===f?void 0:f.trim(),e.subDistrictID=null===(m=e.subDistrictID)||void 0===m?void 0:m.trim(),e.area=null===(x=e.area)||void 0===x?void 0:x.trim(),e.zipCode=null===(Z=e.zipCode)||void 0===Z?void 0:Z.trim(),e.passportID=null===(g=e.passportID)||void 0===g?void 0:g.trim(),e.taxID=null===(b=e.taxID)||void 0===b?void 0:b.trim(),e.email=null===(y=e.email)||void 0===y?void 0:y.trim(),e.phone=null===(j=e.phone)||void 0===j?void 0:j.trim(),e.optradio=null===(C=e.optradio)||void 0===C?void 0:C.trim(),e.saleChannelName=null===(D=e.saleChannelName)||void 0===D?void 0:D.trim(),e.taxTypeName=null===(I=e.taxTypeName)||void 0===I?void 0:I.trim()}catch(e){}(0,k._i)(N.Oh?"":(0,N.Be)(),"ETax","Save",e,function(t,n){s.Z.setItem("verified_etax_email_prefill",e.email),(0,F.Z)(n,function(){window.location.reload()})},function(e,t,r){400===e?r?i(r):(n(),(0,F.Z)(t,function(){})):40001===e?(n(),(0,_.Z)('<div style="padding: 20px 0;">'.concat(t,"</div>"),"th"===o.toLowerCase()?"รัà¸à¸à¸£à¸²à¸":"Acknowledge",function(){},"th"===o.toLowerCase()?"à¸à¸´à¸à¸à¹à¸à¹à¸à¸à¸¡à¸´à¸":" Contact the Admin",function(){window.open("https://www.facebook.com/www.shu.global","_blank")},!0)):40002===e?(n(),(0,F.Z)(t,function(){},void 0,"th"===o.toLowerCase()?"รัà¸à¸à¸£à¸²à¸":"Acknowledge")):(n(),(0,F.Z)(t,function(){}))},this.getLocale(),null===(r=v.ZP.getUser())||void 0===r?void 0:r.token)}}
1]),EtaxInputViewModel}(S.Z),R=n(55209),z=n(86789),L=n(38143),B=n.n(L),q=n(13023),V=n(30933),W=n(1852),H=n(49809),U=n(68594),G=n(71299),J=n(36693),K=n(47312),X=n(5616),Y=n(42128),Q=n(58862),$=n(50135),ee=n(8976);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,I.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AddressOnlyEditor(e){(0,G.Z)(e.locale);var t=(0,H.Z)(e.locale),n=(0,u.useState)(e.initial),i=n[0],o=n[1],r=(0,u.useState)([]);r[0],r[1];var a=(0,u.useState)([]),l=a[0],d=a[1],c=(0,u.useState)([]),s=c[0],h=c[1],p=(0,u.useState)([]),f=p[0],m=p[1],x=(0,u.useState)([]),Z=x[0],g=x[1],b=(0,u.useState)(),y=b[0],j=b[1],C=(0,u.useState)(),D=C[0],I=C[1],S=(0,u.useState)(),w=S[0],F=S[1],T=(0,u.useState)(),M=T[0],O=T[1],_=(0,u.useState)(),E=_[0],A=_[1],z=(0,u.useState)(!1),L=z[0],B=z[1],V=(0,u.useState)(!1),W=V[0],U=V[1],et=(0,u.useState)(!1),en=et[0],ei=et[1],eo=(0,u.useState)(!1),er=eo[0],ea=eo[1],el=(0,u.useState)(!1),ed=el[0],ec=el[1];if((0,u.useEffect)(function(){I(void 0),F(void 0),O(void 0),A(void 0),d([]),h([]),m([]),y&&getMaster("MProvince",new Q.Z(y.code),function(e){I(e.find(function(e){return e.code===i.province.code})),d(e)})},[y]),(0,u.useEffect)(function(){F(void 0),O(void 0),A(void 0),h([]),m([]),D&&getMaster("MDistrict",new Q.Z(null==y?void 0:y.code,null==D?void 0:D.code),function(e){F(e.find(function(e){return e.code===i.district.code})),h(e)})},[D]),(0,u.useEffect)(function(){O(void 0),A(void 0),m([]),w&&getMaster("MSubDistrict",new Q.Z(null==y?void 0:y.code,null==D?void 0:D.code,null==w?void 0:w.code),function(e){O(e.find(function(e){return e.code===i.subDistrict.code})),m(e)})},[w]),(0,u.useEffect)(function(){A(void 0),M&&getMaster("MZipCode",new Q.Z(null==y?void 0:y.code,null==D?void 0:D.code,null==w?void 0:w.code,null==M?void 0:M.code),function(e){A(e.find(function(e){return e.zipcode===i.zipcode})),g(e)})},[M]),(0,u.useEffect)(function(){(0,q.Z)("change",i),e.onChange(i)},[i]),(0,u.useEffect)(function(){(0,q.Z)("INITIAL-ADDRESS",e.initial),o(_objectSpread(_objectSpread({},i),{},{country:{code:"TH",name:"à¸à¸£à¸°à¹à¸à¸¨à¹à¸à¸¢"}})),j(new Y.n("TH","Thailand")),ec(!0)},[]),!ed)return null;function getMaster(t,n,i){var o;(0,k._i)(N.Oh?"https://idev.shu.global/mockdata/WebSHU/CheckOut/Data/GetAddress/data.json":(0,N.Pt)(),"Central",t,n,function(e,t){i(e)},function(e,t){i([])},e.locale,null===(o=v.ZP.getUser())||void 0===o?void 0:o.token)}return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{className:"fnormal",style:{margin:"6px 0 0 0"},children:(0,P.jsx)("div",{style:{margin:"0 0 6px 0"},children:(0,P.jsx)("div",{style:{paddingBottom:"4px"},children:(0,P.jsx)(R.Z,{sx:e.sxAddr,inputDataTest:"Address-input",id:"input-addr-7",label:t.address.address,initialValue:i.address,isRequiredField:!0,showValidateFailed:!1,validateText:"This field is required",onTextChange:function(e){(0,q.Z)("Address-Change",9),o(_objectSpread(_objectSpread({},i),{},{address:e}));try{var t=document.getElementById("province-select");t&&t.blur()}catch(e){(0,q.Z)("exception",e)}}})})})}),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:"fnormal",style:{margin:"6px 0 0 0"},children:[(0,P.jsx)("div",{style:{margin:"0 0 8px 0"},children:(0,P.jsx)("div",{className:"padding-bottom",children:(0,P.jsxs)(J.Z,{size:"small",fullWidth:!0,children:[D?(0,P.jsx)(K.Z,{shrink:!0,style:{backgroundColor:"#FFFFFF",padding:"0 6px"},children:(0,P.jsxs)("span",{children:[t.address.province,(0,P.jsx)("span",{style:{color:"#FF0000",paddingLeft:"2px"},children:"*"})]})}):null,(0,P.jsx)(ee.Z,{sx:e.sxProvince,id:"province-select",size:"small",options:l,autoHighlight:!0,getOptionLabel:function(e){return e.name||""},renderOption:function(e,t){return(0,P.jsx)(X.Z,_objectSpread(_objectSpread({"data-test":"Province-dropdown"+t.code,component:"li",sx:{"& > img":{mr:2,flexShrink:0}}},e),{},{children:(0,P.jsx)("span",{className:"desc fli",children:t.name||""})}))},renderInput:function(e){return(0,P.jsx)($.Z,_objectSpread(_objectSpread({},e),{},{"data-test":"Province-dropdown",label:D?"":(0,P.jsxs)("span",{children:[t.address.province,(0,P.jsx)("span",{style:{color:"#FF0000",paddingLeft:"2px"},children:"*"})]}),InputLabelProps:{shrink:L},inputProps:_objectSpread(_objectSpread({},e.inputProps),{},{autoComplete:"new-password"})}))},value:D,onInputChange:function(e,t){if(B(t.length>0),(null==D?void 0:D.name)!==t){if(t.length<=0)o(_objectSpread(_objectSpread({},i),{},{province:{code:"",name:""},district:{code:"",name:""},subDistrict:{code:"",name:""},zipcode:""})),I(void 0),F(void 0),O(void 0),A(void 0),U(!1),ei(!1),ea(!1);else{var n=l.find(function(e){return e.name===t});if(n){o(_objectSpread(_objectSpread({},i),{},{province:{code:(null==n?void 0:n.code)||"",name:(null==n?void 0:n.name)||""},district:{code:"",name:""},subDistrict:{code:"",name:""},zipcode:""})),I(n),F(void 0),O(void 0),A(void 0),U(!1),ei(!1),ea(!1);try{var r=document.getElementById("district-select-input");r&&r.blur()}catch(e){(0,q.Z)("exception",e)}}}}}})]})})}),(0,P.jsx)("div",{children:(0,P.jsx)("div",{className:"padding-bottom",children:(0,P.jsxs)(J.Z,{size:"small",fullWidth:!0,children:[w?(0,P.jsx)(K.Z,{shrink:!0,style:{backgroundColor:"#FFFFFF",padding:"0 6px"},children:(0,P.jsxs)("span",{children:[t.address.district,(0,P.jsx)("span",{style:{color:"#FF0000",paddingLeft:"2px"},children:"*"})]})}):null,(0,P.jsx)(ee.Z,{sx:e.sxDistrict,id:"district-select",size:"small",options:s,autoHighlight:!0,getOptionLabel:function(e){return e.name||""},renderOption:function(e,t){return(0,P.jsx)(X.Z,_objectSpread(_objectSpread({"data-test":"District-dropdown"+t.code,component:"li",sx:{"& > img":{mr:2,flexShrink:0}}},e),{},{children:(0,P.jsx)("span",{className:"desc fli",children:t.name||""})}))},renderInput:function(e){return(0,P.jsx)($.Z,_objectSpread(_objectSpread({},e),{},{"data-test":"District-dropdown",id:"district-select-input",label:w?"":(0,P.jsxs)("span",{children:[t.address.district,(0,P.jsx)("span",{style:{color:"#FF0000",paddingLeft:"2px"},children:"*"})]}),InputLabelProps:{shrink:W},inputProps:_objectSpread(_objectSpread({},e.inputProps),{},{autoComplete:"new-password"})}))},value:w,onInputChange:function(e,t){if(U(t.length>0),(null==w?void 0:w.name)!==t){if(t.length<=0)o(_objectSpread(_objectSpread({},i),{},{district:{code:"",name:""},subDistrict:{code:"",name:""},zipcode:""})),F(void 0),O(void 0),A(void 0),ei(!1),ea(!1);else{var n=s.find(function(e){return e.name===t});if(n){o(_objectSpread(_objectSpread({},i),{},{district:{code:(null==n?void 0:n.code)||"",name:(null==n?void 0:n.name)||""},subDistrict:{code:"",name:""},zipcode:""})),F(n),O(void 0),A(void 0),ei(!1),ea(!1);try{var r=document.getElementById("subdistrict-select-input");r&&r.blur()}catch(e){(0,q.Z)("exception",e)}}}}}})]})},(null==D?void 0:D.name)||"")})]}),(0,P.jsxs)("div",{className:"fnormal",style:{margin:"6px 0 0 0"},children:[(0,P.jsx)("div",{style:{margin:"0 0 8px 0"},children:(0,P.jsx)("div",{className:"padding-bottom",children:(0,P.jsxs)(J.Z,{size:"small",fullWidth:!0,children:[M?(0,P.jsx)(K.Z,{shrink:!0,style:{backgroundColor:"#FFFFFF",padding:"0 6px"},children:(0,P.jsxs)("span",{children:[t.address.subDistrict,(0,P.jsx)("span",{style:{color:"#FF0000",paddingLeft:"2px"},children:"*"})]})}):null,(0,P.jsx)(ee.Z,{sx:e.sxSubDistrict,id:"subdistrict-select",size:"small",options:f,autoHighlight:!0,getOptionLabel:function(e){return e.name||""},renderOption:function(e,t){return(0,P.jsx)(X.Z,_objectSpread(_objectSpread({"data-test":"Sub-district-dropdown"+t.code,component:"li",sx:{"& > img":{mr:2,flexShrink:0}}},e),{},{children:(0,P.jsx)("span",{className:"desc fli",children:t.name||""})}))},renderInput:function(e){return(0,P.jsx)($.Z,_objectSpread(_objectSpread({},e),{},{id:"Subdistrict-select-input",label:M?"":(0,P.jsxs)("span",{children:[t.address.subDistrict,(0,P.jsx)("span",{style:{color:"#FF0000",paddingLeft:"2px"},children:"*"})]}),InputLabelProps:{shrink:en},"data-test":"Sub-district-dropdown",inputProps:_objectSpread(_objectSpread({},e.inputProps),{},{autoComplete:"new-password"})}))},value:M,onInputChange:function(e,t){if(ei(t.length>0),(null==M?void 0:M.name)!==t){if(t.length<=0)o(_objectSpread(_objectSpread({},i),{},{subDistrict:{code:"",name:""},zipcode:""})),O(void 0),A(void 0),ea(!1);else{var n=f.find(function(e){return e.name===t});if(n){o(_objectSpread(_objectSpread({},i),{},{subDistrict:{code:(null==n?void 0:n.code)||"",name:(null==n?void 0:n.name)||""},zipcode:""})),O(n),A(void 0),ea(!1);try{var r=document.getElementById("zipcode-select-input");r&&r.blur()}catch(e){(0,q.Z)("exception",e)}}}}}})]})})}),(0,P.jsx)("div",{children:(0,P.jsx)("div",{className:"padding-bottom",children:(0,P.jsxs)(J.Z,{size:"small",fullWidth:!0,children:[E?(0,P.jsx)(K.Z,{shrink:!0,style:{backgroundColor:"#FFFFFF",padding:"0 6px"},children:(0,P.jsxs)("span",{children:[t.address.zipCode,(0,P.jsx)("span",{style:{color:"#FF0000",paddingLeft:"2px"},children:"*"})]})}):null,(0,P.jsx)(ee.Z,{sx:e.sxZipcode,id:"zipcode-select",size:"small",options:Z,autoHighlight:!0,getOptionLabel:function(e){return e.zipcode||""},renderOption:function(e,t){return(0,P.jsx)(X.Z,_objectSpread(_objectSpread({"data-test":"Zipcode-dropdown"+t.zipcode,component:"li",sx:{"& > img":{mr:2,flexShrink:0}}},e),{},{children:(0,P.jsx)("span",{className:"desc fli",children:t.zipcode||""})}))},renderInput:function(e){return(0,P.jsx)($.Z,_objectSpread(_objectSpread({},e),{},{id:"zipcode-select-input","data-test":"Zipcode-dropdown",label:E?"":(0,P.jsxs)("span",{children:[t.address.zipCode,(0,P.jsx)("span",{style:{color:"#FF0000",paddingLeft:"2px"},children:"*"})]}),InputLabelProps:{shrink:er},inputProps:_objectSpread(_objectSpread({},e.inputProps),{},{autoComplete:"new-password"})}))},value:E,onInputChange:function(e,t){if(ea(t.length>0),(null==E?void 0:E.zipcode)!==t){if(t.length<=0)o(_objectSpread(_objectSpread({},i),{},{zipcode:""})),A(void 0);else{var n=Z.find(function(e){return e.zipcode===t});n&&(o(_objectSpread(_objectSpread({},i),{},{zipcode:t})),A(n))}}}})]})},(null==M?void 0:M.name)||"")})]},(null==w?void 0:w.name)||"")]})]})}var et=n(83154),en=n(1940),ei=n(31085),eo=n(23599),er=n(51233),ea=n(11057),el=n(72669),ed=function(e){(0,j.Z)(EtaxInputSaveRequestData,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,D.Z)(EtaxInputSaveRequestData);if(t){var i=(0,D.Z)(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return(0,C.Z)(this,e)});function EtaxInputSaveRequestData(){var e;(0,b.Z)(this,EtaxInputSaveRequestData);for(var t=arguments.length,i=Array(t),o=0;o<t;o++)i[o]=arguments[o];return e=n.call.apply(n,[this].concat(i)),(0,I.Z)((0,y.Z)(e),"orderNumber",void 0),(0,I.Z)((0,y.Z)(e),"saleChannelID",void 0),(0,I.Z)((0,y.Z)(e),"saleChannelKe
1y",void 0),(0,I.Z)((0,y.Z)(e),"amount",void 0),(0,I.Z)((0,y.Z)(e),"branch",void 0),(0,I.Z)((0,y.Z)(e),"fullName",void 0),(0,I.Z)((0,y.Z)(e),"address",void 0),(0,I.Z)((0,y.Z)(e),"provinceID",void 0),(0,I.Z)((0,y.Z)(e),"districtID",void 0),(0,I.Z)((0,y.Z)(e),"subDistrictID",void 0),(0,I.Z)((0,y.Z)(e),"area",void 0),(0,I.Z)((0,y.Z)(e),"zipCode",void 0),(0,I.Z)((0,y.Z)(e),"passportID",void 0),(0,I.Z)((0,y.Z)(e),"taxID",void 0),(0,I.Z)((0,y.Z)(e),"email",void 0),(0,I.Z)((0,y.Z)(e),"phone",void 0),(0,I.Z)((0,y.Z)(e),"optradio",void 0),(0,I.Z)((0,y.Z)(e),"saleChannelName",void 0),(0,I.Z)((0,y.Z)(e),"taxTypeName",void 0),e}return(0,g.Z)(EtaxInputSaveRequestData)}(O.Z),ec=n(34001),es=n(54539),eu=n(76566),ev=n(83497);function EtaxChangeMail(e){var t=(0,H.Z)(e.locale),n=(0,u.useState)(e.initialMail),i=n[0],o=n[1],r=(0,u.useState)(!1),a=r[0],l=r[1],d=new es.Z(e.locale),c=(0,u.useState)(!0),v=c[0],h=c[1],p=(0,u.useState)(!1),f=p[0],x=p[1];return((0,u.useEffect)(function(){e.onMailChanging(!v)},[v]),v)?(0,P.jsxs)("div",{className:"full left-text",children:[(0,P.jsxs)("div",{className:"full flex justify-content-between",style:{position:"relative"},children:[(0,P.jsxs)("div",{className:"padding-top fmed",children:["th"===e.locale?"à¸à¸µà¹à¸¡à¸¥à¹à¸à¸à¸²à¸£à¸£à¸±à¸à¹à¸à¸à¸ªà¸²à¸£":"Email for receiving documents"," :"]}),(0,P.jsx)("div",{className:"desc",style:{position:"absolute",bottom:0,right:0,color:"#21A366"},children:"th"===e.locale?"ยืà¸à¸¢à¸±à¸à¸à¸µà¹à¸¡à¸¥à¹à¸£à¸µà¸¢à¸à¸£à¹à¸à¸¢à¹à¸¥à¹à¸§":"email is already confirmed"})]}),(0,P.jsx)(R.Z,{disable:!0,inputDataTest:"email",id:"Email",label:"th"===e.locale?"à¸à¸µà¹à¸¡à¸¥":"Email",initialValue:i,isRequiredField:!0,onTextChange:function(e){o(e),x(!1)}}),(0,P.jsx)("div",{className:"full desc right-text underline hover",style:{color:"#000000"},onClick:function(){h(!1)},children:"th"===e.locale?"à¸à¹à¸à¸à¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸à¸à¸µà¹à¸¡à¸¥":"Change email"})]}):(0,P.jsx)("div",{children:(0,P.jsxs)("div",{className:"full left-text",children:[(0,P.jsxs)("div",{className:"full flex justify-content-between",style:{position:"relative"},children:[(0,P.jsxs)("div",{className:"padding-top fmed",children:["th"===e.locale?"à¸à¸µà¹à¸¡à¸¥à¹à¸à¸à¸²à¸£à¸£à¸±à¸à¹à¸à¸à¸ªà¸²à¸£":"Email for receiving documents"," :"]}),(0,P.jsx)("div",{className:"desc",style:{position:"absolute",bottom:0,right:0,color:"#B64649"},children:"th"===e.locale?"à¸à¸µà¹à¸¡à¸¥à¸à¸µà¹à¸¢à¸±à¸à¹à¸¡à¹à¸à¸¹à¸à¸¢à¸·à¸à¸¢à¸±à¸":"This email address has not been verified"})]}),(0,P.jsx)(R.Z,{inputDataTest:"email",id:"Email",label:"th"===e.locale?"à¸à¸µà¹à¸¡à¸¥":"Email",isRequiredField:!0,onTextChange:function(e){o(e),x(!1)}}),(0,P.jsx)("div",{className:"padding-top"}),f?(0,P.jsx)("div",{children:(0,P.jsx)(eu.a,{tag:"Verify-mail",locale:e.locale||"TH",sendTo:i,sendData:new ev.Z(!1,i,"",!1,"",!0),onClose:function(){x(!1)},onFinish:function(t){s.Z.setItem("verified_etax_email",i),o(i),e.onMailChanged(i),h(!0),x(!1)}})}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(z.Z,{dataTest:"Agreement-checkbox",id:"Sign-up-cb-agreement",isCheck:a,label:(0,P.jsxs)(P.Fragment,{children:[t.register.agree+" ",(0,P.jsx)("a",{"data-test":"Terms-hyperlink",id:"link",className:"underline",href:(0,m.D)("/terms-and-conditions/",e.locale),target:"_blank",rel:"noreferrer",children:t.register.condition})," ",t.register.and,(0,P.jsx)("a",{"data-test":"Privacy-policy-hyperlink",id:"link",className:"underline",href:(0,m.D)("/privacy-policy/",e.locale),target:"_blank",rel:"noreferrer",children:t.register.privacy})," "+t.register.of]}),onCheck:function(e){l(e)}}),(0,P.jsx)("div",{className:"padding-top"}),(0,P.jsx)(ea.Z,{variant:"contained","data-test":"Confirm-email",id:"Confirm-email",className:B().sendBtn+" full",onClick:function(){(0,ec.Jh)(i)&&a?d.checkWhileList(i,function(){s.Z.setItem("verified_etax_email",i),o(i),e.onMailChanged(i),h(!0)},function(){(0,F.Z)("ระà¸à¸ https://shu.global à¹à¸à¹à¸ªà¹à¸à¸£à¸«à¸±à¸ª OTP à¹à¸à¸¢à¸±à¸ ".concat(i," à¸à¸µà¹à¸£à¸°à¸à¸¸ à¹à¸£à¸µà¸¢à¸à¸£à¹à¸à¸¢à¹à¸¥à¹à¸§"),function(){x(!0)},"ยืà¸à¸¢à¸±à¸à¸à¸²à¸£à¸ªà¹à¸à¸£à¸«à¸±à¸ª")}):(0,ec.Jh)(i)?a||(0,F.Z)("à¸à¸£à¸¸à¸à¸²à¸¢à¸à¸¡à¸£à¸±à¸ à¹à¸à¸·à¹à¸à¸à¹à¸à¹à¸¥à¸°à¸à¹à¸à¸à¸à¸¥à¸ à¹à¸¥à¸° à¸à¹à¸¢à¸à¸²à¸¢à¸à¸§à¸²à¸¡à¹à¸à¹à¸à¸ªà¹à¸§à¸à¸à¸±à¸§ à¸à¸à¸ SHU"):(0,F.Z)("รูà¸à¹à¸à¸à¸à¸µà¹à¸¡à¸¥à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸")},children:"th"===e.locale?"ยืà¸à¸¢à¸±à¸":"Confirm"})]})]})})}var eh=n(61563),ep=n(22430),ef=n(68239),em=n(52686),ex=n(68045);function ETaxConfirmDialogView(e){return(0,P.jsxs)("div",{className:"full left-text title",children:[(0,P.jsx)("div",{className:"full center-text fmed padding-bottom",children:"th"===e.local?"à¸à¹à¸à¸¡à¸¹à¸¥à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸²à¸£à¸à¸à¹à¸à¸à¸³à¸à¸±à¸à¸ าษีà¸à¸´à¹à¸¥à¹à¸à¸à¸£à¸à¸à¸´à¸à¸ªà¹":"Information for Requesting an e-Tax Invoice"}),(0,P.jsx)("div",{className:"fmed",children:"th"===e.local?"à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸ :":"Order detail :"}),(0,P.jsxs)("div",{children:["th"===e.local?"à¸à¹à¸à¸à¸à¸²à¸à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸ : ":"Purchase Channels : ",e.data.saleChannelName]}),(0,P.jsxs)("div",{children:["th"===e.local?"à¹à¸¥à¸à¸à¸µà¹à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸ : ":"Order number : ",e.data.orderNumber]}),(0,P.jsx)("div",{className:"fmed padding-top",children:"th"===e.local?"à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸¹à¹à¹à¸ªà¸µà¸¢à¸ าษี : ":"Tax information : "}),(0,P.jsxs)("div",{children:["th"===e.local?"à¸à¸£à¸°à¹à¸ à¸à¸à¸¹à¹à¹à¸ªà¸µà¸¢à¸ าษี : ":"Tax type : ",e.data.taxTypeName]}),"P"===e.data.optradio?(0,P.jsxs)("div",{children:["th"===e.local?"หมายà¹à¸¥à¸à¸à¸£à¸°à¸à¸³à¸à¸±à¸§à¸à¸£à¸°à¸à¸²à¸à¸ : ":"Personal ID : ",e.data.taxID]}):"T"===e.data.optradio?(0,P.jsxs)("div",{children:["th"===e.local?"หมายà¹à¸¥à¸à¸à¸²à¸ªà¸à¸à¸£à¹à¸ : ":"Passport number : ",e.data.passportID]}):"C"===e.data.optradio?(0,P.jsxs)("div",{children:[(0,P.jsxs)("div",{children:["th"===e.local?"หมายà¹à¸¥à¸à¹à¸ªà¸µà¸¢à¸ าษี : ":"TAX ID : ",e.data.taxID]}),(0,P.jsxs)("div",{children:["th"===e.local?"สาà¸à¸² : ":"Branch : ","0"===e.data.branch?"th"===e.local?"สำà¸à¸±à¸à¸à¸²à¸à¹à¸«à¸à¹":"Head office":e.data.branch]})]}):void 0,"C"===e.data.optradio?(0,P.jsxs)("div",{children:["th"===e.local?"à¸à¸·à¹à¸à¸à¸£à¸´à¸©à¸±à¸/à¸à¸´à¸à¸´à¸à¸¸à¸à¸¥ : ":"Name : ",e.data.fullName]}):(0,P.jsxs)("div",{children:["th"===e.local?"à¸à¸·à¹à¸-à¸à¸²à¸¡à¸ªà¸à¸¸à¸¥ : ":"Company/Legal Entity Name : ",e.data.fullName]}),(0,P.jsxs)("div",{children:["th"===e.local?"à¸à¸µà¹à¸¡à¸¥ : ":"Email : ",e.data.email]}),(0,P.jsxs)("div",{children:["th"===e.local?"à¹à¸à¸à¸£à¹à¹à¸à¸£à¸¨à¸±à¸à¸à¹ : ":"Phone Number : ",e.data.phone]}),(0,P.jsxs)("div",{children:["th"===e.local?"à¸à¸µà¹à¸à¸¢à¸¹à¹ : ":"Address : ",e.data.address," ",e.data.area]})]})}var eZ={styleOverrides:{root:{fontFamily:"DBHeaventLi, Arial",fontSize:18}}},eg=(0,ef.Z)({components:{MuiOutlinedInput:eZ,MuiInputLabel:eZ,MuiMenuItem:eZ,MuiButton:eZ,MuiAvatar:eZ},palette:{primary:{main:"#302E2E"},secondary:{main:"#747474"},info:{main:"#397EF5"},error:{main:"#B64648"},warning:{main:"#B64648"}}});
1function EtaxInputView(e){var t,n,i,o,r,a,l,d,c=(0,H.Z)(e.local),v=(0,el.Z)(e.local);(0,G.Z)(e.local),(0,W.useMediaQuery)({query:"(max-width: 576px)"});var h=new A(e.local),p=(0,u.useRef)(new ed),x=(0,u.useState)(new U.ZP),Z=x[0];x[1];var g=(0,u.useState)(),b=g[0],y=g[1],j=(0,u.useState)(),C=j[0],D=j[1],I=(0,u.useState)(),S=I[0],w=I[1],k=(0,u.useState)(),N=k[0],T=k[1],M=(0,u.useState)(new en.J),O=M[0],E=M[1],L=(0,u.useState)(!1),K=L[0],X=L[1],Y=(0,u.useState)(!1),Q=Y[0],$=Y[1],ee=(0,u.useState)(),es=ee[0],eu=ee[1],ev=(0,u.useState)(),ef=ev[0],eZ=ev[1],eb=(0,u.useState)([]),ey=eb[0],ej=eb[1],eC=(0,u.useState)(!1),eD=eC[0],eI=eC[1],eS=(0,u.useState)(!1),ew=eS[0],ek=eS[1],eN={"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"#FF0000"},"&:hover fieldset":{borderColor:"#FF0000"},"&.Mui-focused fieldset":{borderColor:"#FF0000"}}},eF=(0,u.useState)({saleChannel:void 0,order:void 0,name:void 0,phone:void 0,address:void 0,province:void 0,district:void 0,subDistrict:void 0,zipcode:void 0,branch:void 0,passport:void 0,taxID:void 0}),eT=eF[0],eM=eF[1];if((0,u.useEffect)(function(){N&&(p.current.taxTypeName=N.name)},[N]),(0,u.useEffect)(function(){console.log("validateSX",eT)},[eT]),(0,u.useEffect)(function(){if(e.webConfig.feature.etax.open){var t=s.Z.getItem("verified_etax_email");t?(p.current.email=t,eu(t),h.getMSaleChannel(function(e){y(e),ek(!0)}),h.getMTaxType(function(e){w(e),T(e[0]),p.current.optradio="P"}),h.getPreOrder(t,function(e){ej(e||[])})):window.open((0,m.D)("/etax/form"),"_self")}else window.open((0,m.D)("/"),"_self")},[]),!ew)return null;return(0,P.jsxs)("div",{className:"flex full justify-content-center",style:{marginBottom:"80px"},children:[(0,P.jsx)("style",{children:".content-border {\n position: relative;\n padding: 5px;\n text-align: center;\n background: white; /* Inner background */\n border-radius: 8px; /* Apply border radius */\n z-index: 1; /* Ensure content is above pseudo-element */\n }\n \n .content-border::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 8px; /* Match the parent border radius */\n padding: 1px; /* Border width */\n background: linear-gradient(140deg, #F3EAD0, #826046); /* Gradient */\n -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n z-index: -1; /* Position the gradient behind the content */\n }\n \n .content-inner-border {\n position: relative;\n padding: 14px;\n text-align: center;\n background: white; /* Inner background */\n border-radius: 6px; /* Apply border radius */\n z-index: 1; /* Ensure content is above pseudo-element */\n }\n \n .content-inner-border::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 6px; /* Match the parent border radius */\n padding: 1px; /* Border width */\n background: linear-gradient(140deg, #F3EAD0, #826046); /* Gradient */\n -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n z-index: -1; /* Position the gradient behind the content */\n }"}),(0,P.jsx)("div",{className:"title text-center",style:{minWidth:"300px"},children:(0,P.jsxs)("div",{className:"full left-text",children:[(0,P.jsxs)("div",{className:"full center-text",children:[(0,P.jsxs)("div",{children:["th"===e.local?"à¹à¸¡à¸·à¹à¸à¸¢à¸·à¸à¸¢à¸±à¸à¸à¹à¸à¸¡à¸¹à¸¥à¹à¸£à¸µà¸¢à¸à¸£à¹à¸à¸¢à¹à¸¥à¹à¸§ ระà¸à¸à¸à¸°à¸ªà¹à¸à¹à¸à¸à¸ªà¸²à¸£à¹à¸à¸à¸²à¸":"Once the information has been confirmed The system will send documents to",(0,P.jsx)("span",{className:"fmed",children:"th"===e.local?" à¸à¸µà¹à¸¡à¸¥à¸à¸à¸à¸à¸¸à¸":" your email"})," ","th"===e.local?"à¸à¸µà¹à¸à¸³à¸à¸²à¸£à¸£à¸°à¸à¸¸":""]}),(0,P.jsx)("div",{children:"th"===e.local?"à¸à¸¸à¸à¸à¸°à¹à¸à¹à¸£à¸±à¸à¹à¸à¸à¸ªà¸²à¸£à¸à¸²à¸à¸à¸µà¹à¸¡à¸¥à¸ ายà¹à¸ 15 วัà¸à¸à¸³à¸à¸²à¸£":"You will receive the document via email within 15 business days."}),(0,P.jsxs)("div",{className:"padding-top",children:["th"===e.local?"หมายà¹à¸«à¸à¸¸ : à¸à¸£à¸à¸µà¹à¸à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸¡à¸µà¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸/à¸à¸·à¸à¸ªà¸´à¸à¸à¹à¸²à¸à¸²à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸£à¸¸à¸à¸²":"Note: In case there are changes/returns for certain items in the order, please ",(0,P.jsx)("a",{className:"underline hover",href:"https://www.facebook.com/www.shu.global",target:"_blank",children:"th"===e.local?"à¸à¸´à¸à¸à¹à¸à¹à¸à¸à¸¡à¸´à¸":"contact the admin"})]})]}),(0,P.jsx)("div",{className:"padding-left padding-right",children:(0,P.jsx)(EtaxChangeMail,{initialMail:es||"",onMailChanged:function(e){p.current.email=e},onMailChanging:function(e){$(e)},locale:e.local})}),(0,P.jsx)("br",{}),(0,P.jsx)("div",{className:"center-text desc ",style:{color:"#FF0000"},children:"th"===e.local?"สำหรัà¸à¸à¸²à¸£à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¸à¸à¸à¹à¸¥à¸à¹ สามารà¸à¸à¸à¹à¸à¸à¸³à¸à¸±à¸à¸ าษีà¹à¸à¹à¸ ายà¹à¸à¸§à¸±à¸à¸à¸µà¹à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¹à¸à¹à¸²à¸à¸±à¹à¸":"For online payments, tax invoices can only be requested on the payment date."}),(0,P.jsx)("div",{className:"center-text desc",style:{color:"#FF0000"},children:"th"===e.local?"สำหรัà¸à¸à¸²à¸£à¸à¸³à¸£à¸°à¹à¸à¸´à¸à¸à¸¥à¸²à¸¢à¸à¸²à¸ (COD) สามารà¸à¸à¸à¹à¸à¸à¸³à¸à¸±à¸à¸ าษีà¹à¸à¹à¹à¸à¸à¸²à¸°à¸§à¸±à¸à¸à¸µà¹à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¹à¸à¹à¸²à¸à¸±à¹à¸":"For COD payments, tax invoices can only be requested on the order date."}),(0,P.jsx)("div",{className:"center-text desc",style:{color:"#FF0000"},children:"th"===e.local?"à¸à¸£à¸¸à¸à¸²à¸à¸£à¸§à¸à¸ªà¸à¸à¸à¹à¸à¸¡à¸¹à¸¥à¹à¸«à¹à¸à¸¹à¸à¸à¹à¸à¸à¸à¹à¸à¸à¸¢à¸·à¸à¸¢à¸±à¸à¸à¸³à¹à¸à¸´à¸à¸à¸²à¸£":"Please check your information before confirming."}),(0,P.jsx)("div",{className:"padding-bottom center-text desc",children:(0,P.jsx)("a",{className:"underline-link-blue hover",href:(0,m.D)("/faq/ETAXInvoice"),target:"_blank",children:"th"===e.local?"à¸à¸³à¸à¸²à¸¡à¸à¸µà¹à¸à¸à¸à¹à¸à¸¢":"Frequently asked question"})}),(0,P.jsxs)("div",{className:"full rounded shadow",children:[(0,P.jsx)("div",{className:"full",style:{backgroundColor:"#C4AE8A",color:"#FFFFFF",padding:"4px 12px"},children:"th"===e.local?"à¸à¹à¸à¸¡à¸¹à¸¥à¸ªà¸³à¸«à¸£à¸±à¸à¸à¸²à¸£à¸à¸à¹à¸à¸à¸³à¸à¸±à¸à¸ าษีà¸à¸´à¹à¸¥à¹à¸à¸à¸£à¸à¸à¸´à¸à¸ªà¹":"Information for requesting an electronic e-TAX Invoice"}),(0,P.jsx)("div",{style:{padding:"10px"},children:(0,P.jsx)("div",{className:"full content-border",children:(0,P.jsxs)("div",{className:"full content-inner-border left-text",children:[(0,P.jsxs)("div",{className:"title padding-between fmed left-text",children:["th"===e.local?"à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸":"Purchased information"," :"]}),(0,P.jsxs)("div",{className:"title padding-between left-text",children:["th"===e.local?"à¸à¹à¸à¸à¸à¸²à¸à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸ (à¹à¸à¸¥à¸à¸à¸à¸£à¹à¸¡)":"Purchase Channels (Platform)","\xa0",(0,P.jsx)("span",{style:{color:"#FF0000"},children:"*"}),":"]}
1),(0,P.jsx)("div",{style:{marginBottom:"16px"},children:(0,P.jsx)(J.Z,{sx:eT.saleChannel,size:"small",fullWidth:!0,children:(0,P.jsxs)(ei.Z,{id:"demo-simple-select",className:"hide-legend left-text",value:null!=C&&C.uniqueID?"".concat(null==C?void 0:C.uniqueID):"",displayEmpty:!0,onChange:function(e){if(e.target.value){var t,n,i,o,r=+e.target.value;D(null==b?void 0:b.find(function(e){return e.uniqueID===r})),p.current.saleChannelID=(null==b?void 0:null===(t=b.find(function(e){return e.uniqueID===r}))||void 0===t?void 0:null===(n=t.uniqueID)||void 0===n?void 0:n.toString())||"",p.current.saleChannelKey=null==b?void 0:null===(i=b.find(function(e){return e.uniqueID===r}))||void 0===i?void 0:i.key,p.current.saleChannelName=null==b?void 0:null===(o=b.find(function(e){return e.uniqueID===r}))||void 0===o?void 0:o.name,validateData()}else D(void 0),p.current.saleChannelID=void 0,p.current.saleChannelKey=void 0,p.current.saleChannelName=void 0,validateData()},children:[(0,P.jsx)(eo.Z,{value:"",children:(0,P.jsxs)("span",{className:"fli",style:{color:"#888888"},children:["th"===e.local?"à¹à¸¥à¸·à¸à¸à¸à¹à¸à¸à¸à¸²à¸à¸à¸²à¸£à¸ªà¸±à¹à¸à¸à¸·à¹à¸":"Choose a purchase channel",(0,P.jsx)("span",{style:{color:"#FF0000"},children:"*"})]})}),null==b?void 0:b.map(function(e,t){return(0,P.jsx)(eo.Z,{value:"".concat(e.uniqueID),children:(0,P.jsx)("span",{className:"fli",children:e.name||""})},e.uniqueID)})]})})}),(null==C?void 0:C.key)==="WEB"&&ey&&ey.length>0?(0,P.jsxs)("div",{className:"full left-text rounded shadow-sm",children:[(0,P.jsx)("div",{className:"full",style:{backgroundColor:"#C4AE8A",color:"#FFFFFF",padding:"4px 12px"},children:"th"===e.local?"à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸à¸µà¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸ e-TAX Invoice à¹à¸à¹":"Orders eligible for requesting an e-TAX Invoice"}),(0,P.jsx)(er.Z,{spacing:1,style:{padding:"10px",backgroundColor:"#EAECEF"},children:ey.map(function(e){return(0,P.jsx)("div",{className:"full left-text rounded shadow-sm hover",style:{padding:"4px 12px",backgroundColor:"#FFFFFF"},onClick:function(){eZ(e),p.current.orderNumber=e,validateData()},children:e},e)})})]}):null,(0,P.jsx)(R.Z,{sx:null==eT?void 0:eT.order,inputDataTest:"Order_number",id:"Order_number",rewrite:ef,label:(null==C?void 0:C.key)==="SHOP SHU"?"th"===e.local?"à¹à¸¥à¸à¸à¸µà¹à¹à¸à¹à¸ªà¸£à¹à¸":"Receipt number":"th"===e.local?"à¹à¸¥à¸à¸à¸µà¹à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸":"Order number",isRequiredField:!0,onTextChange:function(e){eZ(e),p.current.orderNumber=e,validateData()}}),(0,P.jsxs)("div",{className:"left-text",children:[(0,P.jsxs)("div",{className:"title padding-between fmed",children:["th"===e.local?"à¸à¸£à¸°à¹à¸ à¸à¸à¸¹à¹à¹à¸ªà¸µà¸¢à¸ าษี":"Tax type information"," :"]}),(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{style:{marginBottom:"16px"},children:(0,P.jsx)(J.Z,{size:"small",fullWidth:!0,children:(0,P.jsx)(ei.Z,{id:"demo-simple-select",className:"hide-legend",value:"".concat(null==N?void 0:N.uniqueID),onChange:function(e){var t=+e.target.value;T(null==S?void 0:S.find(function(e){return e.uniqueID===t})),p.current.taxID=void 0,p.current.passportID=void 0,O.taxTypeID=t,O.number=void 0,E(O),p.current.optradio=3===t?"C":2===t?"T":"P",validateData()},children:null==S?void 0:S.map(function(e,t){return(0,P.jsx)(eo.Z,{value:"".concat(e.uniqueID),children:(0,P.jsx)("span",{className:"fli",children:e.name||""})},e.uniqueID)})})})}),(0,P.jsx)("div",{children:(null==N?void 0:N.uniqueID)===1?(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(R.Z,{sx:eT.taxID,id:"input-cid",style:{marginBottom:"16px",width:"inherit"},label:v.step.review.section.tax.inputCID,isRequiredField:!0,showValidateFailed:!1,validateText:"This field is required",limit:13,isNumber:!0,onTextChange:function(e){e.length<=13&&(O.number=e,E(O),p.current.taxID=e,validateData())}})}):(null==N?void 0:N.uniqueID)===2?(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(R.Z,{sx:eT.passport,id:"input-passport",style:{marginBottom:"16px",width:"inherit"},label:v.step.review.section.tax.inputPassportNo,isRequiredField:!0,showValidateFailed:!1,validateText:"This field is required",onTextChange:function(e){O.number=e,E(O),p.current.passportID=e,validateData()}})}):(null==N?void 0:N.uniqueID)===3?(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(R.Z,{sx:eT.taxID,id:"input-tax",style:{marginBottom:"16
1px",width:"inherit"},label:v.step.review.section.tax.taxNo,isRequiredField:!0,showValidateFailed:!1,limit:13,isNumber:!0,validateText:"This field is required",onTextChange:function(e){O.number=e,E(O),p.current.taxID=e,validateData()}})}):null})]}),(null==N?void 0:N.uniqueID)===3?(0,P.jsx)(P.Fragment,{children:(0,P.jsx)("div",{style:{marginBottom:"16px"},children:(0,P.jsx)("div",{children:(0,P.jsx)(R.Z,{sx:eT.branch,id:"input-branch",style:{width:"inherit"},label:v.step.review.section.tax.branch,isRequiredField:!0,showValidateFailed:!1,validateText:"This field is required",onTextChange:function(e){O.codeBrach=e,E(O),p.current.branch="สำà¸à¸±à¸à¸à¸²à¸à¹à¸«à¸à¹"===e?"":e,validateData()}})})})}):null,(0,P.jsx)("div",{style:{marginBottom:"16px"},children:(0,P.jsx)("div",{children:(0,P.jsx)(R.Z,{id:"input-name",style:{marginBottom:"14px",width:"inherit"},sx:eT.name,label:"th"===e.local?"à¸à¸·à¹à¸-à¸à¸²à¸¡à¸ªà¸à¸¸à¸¥ หรืภà¸à¸·à¹à¸à¸à¸£à¸´à¸©à¸±à¸/à¸à¸´à¸à¸´à¸à¸¸à¸à¸¥":"Full Name or Company/Legal Entity Name",isRequiredField:!0,showValidateFailed:!1,validateText:"This field is required",onTextChange:function(e){O.legalEntityName=e,E(O),p.current.fullName=e,validateData()}})})})]}),(0,P.jsx)(et.Z,{sx:eT.phone,id:"etax-input-phone",label:c.register.phone,isRequiredField:!1,showValidateFailed:!1,thaiOnly:!0,validateText:"This field is required",callback:function(e,t){(0,q.Z)("PHONE",t),t?(10===t.length&&t.startsWith("0")?t.startsWith("0")?p.current.phone=t:p.current.phone="0".concat(t.slice(1)):p.current.phone=void 0,(0,q.Z)("PHONE",p.current),validateData()):p.current.phone=void 0}}),(0,P.jsx)(AddressOnlyEditor,{sxAddr:eT.address,sxProvince:eT.province,sxDistrict:eT.district,sxSubDistrict:eT.subDistrict,sxZipcode:eT.zipcode,initial:{address:Z.address||"",province:{code:(null===(t=Z.province)||void 0===t?void 0:t.code)||"",name:(null===(n=Z.province)||void 0===n?void 0:n.name)||""},district:{code:(null===(i=Z.district)||void 0===i?void 0:i.code)||"",name:(null===(o=Z.district)||void 0===o?void 0:o.name)||""},subDistrict:{code:(null===(r=Z.subDistrict)||void 0===r?void 0:r.code)||"",name:(null===(a=Z.subDistrict)||void 0===a?void 0:a.name)||""},country:{code:(null===(l=Z.country)||void 0===l?void 0:l.code)||"TH",name:(null===(d=Z.country)||void 0===d?void 0:d.name)||"à¸à¸£à¸°à¹à¸à¸¨à¹à¸à¸¢"},zipcode:Z.zipCode||""},locale:e.local,onChange:function(e){(0,q.Z)("TC-ADDRESS-AddressSelector",e),p.current.address=e.address,p.current.provinceID=e.province.code,p.current.districtID=e.district.code,p.current.subDistrictID=e.subDistrict.code,p.current.zipCode=e.zipcode,p.current.area="".concat(e.subDistrict.name," ").concat(e.district.name," ").concat(e.province.name," ").concat(e.zipcode),validateData()}}),(0,P.jsx)(z.Z,{dataTest:"Agreement-checkbox",id:"Sign-up-cb-agreement",isCheck:K,label:(0,P.jsxs)(P.Fragment,{children:[c.register.agree+" ",(0,P.jsx)("a",{"data-test":"Terms-hyperlink",id:"link",className:"underline",href:(0,m.D)("/terms-and-conditions/",e.local),target:"_blank",rel:"noreferrer",children:c.register.condition})," ",c.register.and,(0,P.jsx)("a",{"data-test":"Privacy-policy-hyperlink",id:"link",className:"underline",href:(0,m.D)("/privacy-policy/",e.local),target:"_blank",rel:"noreferrer",children:c.register.privacy})," "+c.register.of]}),onCheck:function(e){X(e)}}),(0,P.jsx)("div",{className:"full padding-top",children:(0,P.jsx)(ea.Z,{variant:"contained",className:B().sendBtn+" full",disabled:Q,onClick:function(){if(validateData(!0)){var t,n,i;t=p.current,n=function(){eI(!0),h.save(p.current,function(){eI(!1)},function(){eI(!1)},function(t){eI(!1),function(t){if(console.log("vObj",t),t){var n=!1;if(t.haveReturnOrChangeOrder&&(n=!t.haveReturnOrChangeOrder.validate),n)(0,_.Z)('<div style="padding: 20px 0;">'.concat("th"===e.local?"à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸à¸¡à¸µà¸à¸²à¸£à¹à¸à¸¥à¸µà¹à¸¢à¸/à¸à¸·à¸à¸ªà¸´à¸à¸à¹à¸²à¸à¸²à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸£à¸¸à¸à¸²à¸à¸´à¸à¸à¹à¸à¹à¸à¸à¸¡à¸´à¸":"Orders include changing/returning some items. Please contact the admin","</div>"),"ยà¸à¹à¸¥à¸´à¸",function(){},"th"===e.local?"à¸à¸´à¸à¸à¹à¸à¹à¸à¸à¸¡à¸´à¸":" Contact the Admin",function(){window.open("https://www.facebook.com/www.shu.global","_blank")},!0);else{var i,o,r,a,l,d,c,u,v,h,f,m,x,Z,g,b,y,j,C,D,I,S,w,k,N,T,M=(0,G.Z)(e.local),O="",P=(0,eh.J)(eT);if(s.Z.setItem("ETagValidateFailedModel",JSON.stringify(t)),t.phone&&(null!==(i=t.phone)&&void 0!==i&&i.validate?P.phone=void 0:(O+="- ".concat((null===(o=t.phone)||void 0===o?void 0:o.message)||"-","<br>"),P.phone=eN)),t.email&&(null!==(r=t.email)&&void 0!==r&&r.validate?P.email=void 0:(O+="- ".concat((null===(a=t.email)||void 0===a?void 0:a.message)||"-","<br>"),P.email=eN)),t.taxID&&(null!==(l=t.taxID)&&void 0!==l&&l.validate?P.taxID=void 0:(O+="- ".concat((null===(d=t.taxID)||void 0===d?void 0:d.message)||"-","<br>"),P.taxID=eN)),t.passportID&&(null!==(c=t.passportID)&&void 0!==c&&c.validate?P.passportID=void 0:(O+="- ".concat((null===(u=t.passportID)||void 0===u?void 0:u.message)||"-","<br>"),P.passportID=eN)),t.fullName&&(null!==(v=t.fullName)&&void 0!==v&&v.validate?P.name=void 0:(O+="- ".concat((null===(h=t.fullName)||void 0===h?void 0:h.message)||"-","<br>"),P.name=eN)),t.address&&(null!==(f=t.address)&&void 0!==f&&f.validate?P.address=void 0:(O+="- ".concat((null===(m=t.address)||void 0===m?void 0:m.message)||"-","<br>"),P.address=eN)),t.provinceID&&(null!==(x=t.provinceID)&&void 0!==x&&x.validate?P.province=void 0:(O+="- ".concat((null===(Z=t.provinceID)||void 0===Z?void 0:Z.message)||"-","<br>"),P.province=eN)),t.districtID&&(null!==(g=t.districtID)&&void 0!==g&&g.validate?P.district=void 0:(O+="- ".concat((null===(b=t.districtID)||void 0===b?void 0:b.message)||"-","<br>"),P.district=eN)),t.subDistrictID&&(null!==(y=t.subDistrictID)&&void 0!==y&&y.validate?P.subDistrict=void 0:(O+="- ".concat((null===(j=t.subDistrictID)||void 0===j?void 0:j.message)||"-","<br>"),P.subDistrict=eN)),t.zipCode&&(null!==(C=t.zipCode)&&void 0!==C&&C.validate?P.zipcode=void 0:(O+="- ".concat((null===(D=t.zipCode)||void 0===D?void 0:D.message)||"-","<br>"),P.zipcode=eN)),t.orderNumber&&(null!==(I=t.orderNumber)&&void 0!==I&&I.validate?P.order=void 0:(O+="- ".concat((null===(S=t.orderNumber)||void 0===S?void 0:S.message)||"-","<br>"),P.order=eN)),t.saleChannel&&(null!==(w=t.saleChannel)&&void 0!==w&&w.validate?P.saleChannel=void 0:(O+="- ".concat((null===(k=t.saleChannel)||void 0===k?void 0:k.message)||"-","<br>"),P.saleChannel=eN)),t.haveReturnOrChangeOrder&&(null!==(N=t.haveReturnOrChangeOrder)&&void 0!==N&&N.val
1idate||(O+="- ".concat((null===(T=t.haveReturnOrChangeOrder)||void 0===T?void 0:T.message)||"-","<br>"))),console.log("VALIDATE",JSON.stringify(p.current)),O.length>0){var E='<div class="header padding-bottom">'+M.pleaseCheck+'</div><div style="text-align:left;">'+O+"</div>";(0,F.Z)(E,function(){},M.title)}eM(P)}}}(t)},e.local)},i=e.local,(0,ex._1)({customUI:function(e){var o=e.onClose;return(0,P.jsx)(ep.Z,{theme:eg,children:(0,P.jsx)(em.Z,{"data-test":"Confirm-dialog",children:(0,P.jsxs)("div",{className:"center",style:{minWidth:"340px",maxWidth:"90vw",width:"400px",padding:"16px 0 16px 0"},children:[(0,P.jsx)(f.ZP,{className:"hover",style:{width:"24px",height:"24px",position:"absolute",right:"10px"},src:(0,m.D)("/img/action/ic-close.svg"),alt:"dismiss",onClick:o}),(0,P.jsxs)("div",{className:"fmed",children:[(0,P.jsx)("div",{style:{fontSize:"24px",textAlign:"center",marginBottom:"16px"},children:"th"===i?"ยืà¸à¸¢à¸±à¸à¸à¹à¸à¸¡à¸¹à¸¥":"Form confirmation"}),(0,P.jsx)("div",{className:"line"})]}),(0,P.jsx)("div",{style:{fontSize:"24px",textAlign:"center",padding:"30px 10px 30px 10px"},children:(0,P.jsx)(ETaxConfirmDialogView,{data:t,local:i})}),(0,P.jsx)("div",{className:"center-text full desc padding-bottom fnormal",style:{color:"#FF0000"},children:"th"===i?"à¹à¸¡à¸·à¹à¸à¸à¸¸à¸à¸à¸à¸à¸¸à¹à¸¡ âยืà¸à¸¢à¸±à¸â à¹à¸¥à¹à¸§ à¸à¸°à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¹à¸à¹à¹à¸à¸à¹à¸à¸¡à¸¹à¸¥à¹à¸à¹à¸à¸µà¸à¸«à¸¥à¸±à¸à¸à¸²à¸à¸à¸µà¹":"Once you click the âConfirmâ button, you will no longer be able to edit the information."}),(0,P.jsx)("div",{className:"line"}),(0,P.jsxs)(er.Z,{direction:"row",spacing:2,style:{justifyContent:"center",paddingTop:"16px"},children:[(0,P.jsx)(ea.Z,{id:"ConfirmDialog-close",variant:"outlined",style:{width:"150px"},onClick:o,children:"th"===i?"ยà¸à¹à¸¥à¸´à¸":"CANCEL"}),(0,P.jsx)(ea.Z,{"data-test":"Confirm-dialog-ok-button",id:"ConfirmDialog-ok",variant:"contained",style:{width:"200px"},onClick:function(){o(),n()},children:"th"===i?"ยืà¸à¸¢à¸±à¸":"CONFIRM"})]})]})})})},closeOnEscape:!1,closeOnClickOutside:!1,overlayClassName:"overlay-custom-zindex"})}},children:Q?"th"===e.local?"ยืà¸à¸¢à¸±à¸ (à¸à¸£à¸¸à¸à¸²à¸¢à¸·à¸à¸¢à¸±à¸à¸à¸µà¹à¸¡à¸¥à¸à¸µà¹à¸à¹à¸à¸à¸à¸²à¸£à¸£à¸±à¸à¸à¹à¸à¸¡à¸¹à¸¥à¹à¸«à¹à¸à¸£à¸à¸à¹à¸§à¸)":"Confirm (Please confirm your email)":"th"===e.local?"ยืà¸à¸¢à¸±à¸":"Confirm"})})]})})})]})]})}),eD?(0,P.jsx)("div",{className:"full center-text",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",paddingTop:"200px",backgroundColor:"rgba(255, 255, 255, 0.3)",zIndex:9999},onClick:function(){},children:(0,P.jsx)(V.Z,{})}):null]});function validateData(t){var n,i=(0,G.Z)(e.local),o="",r=(0,eh.J)(eT);if(t)try{var a,l,d,c,u,v,h,f,m,x,Z,g=JSON.parse(s.Z.getItem("ETagValidateFailedModel")||"{}");null!==(m=g.saleChannel)&&void 0!==m&&m.validate||(null===(x=g.orderInfo)||void 0===x?void 0:x.orderNumber)!==p.current.orderNumber||((null===(Z=g.orderInfo)||void 0===Z?void 0:Z.saleChannel)===p.current.saleChannelKey?r.saleChannel=void 0:(o+="- ".concat("th"===e.local?"à¸à¹à¸à¸à¸à¸²à¸à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸ (à¹à¸à¸¥à¸à¸à¸à¸£à¹à¸¡) à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸":"Invalid purchase channel (Platform)","<br>"),r.saleChannel=eN))}catch(e){}if(0>=((null===(a=p.current.saleChannelID)||void 0===a?void 0:a.length)||0)?(o+="- ".concat("th"===e.local?"à¸à¹à¸à¸à¸à¸²à¸à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸ (à¹à¸à¸¥à¸à¸à¸à¸£à¹à¸¡) à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸":"Invalid purchase channel (Platform)","<br>"),t&&(r.saleChannel=eN)):t&&(r.saleChannel=void 0),0>=((null===(l=p.current.orderNumber)||void 0===l?void 0:l.length)||0)?(o+="- ".concat((null==C?void 0:C.key)==="SHOP SHU"?"th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¹à¸¥à¸à¸à¸µà¹à¹à¸à¹à¸ªà¸£à¹à¸":"Check the Receipt number":"th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¹à¸¥à¸à¸à¸µà¹à¸à¸³à¸ªà¸±à¹à¸à¸à¸·à¹à¸":"Check the Order number","<br>"),t&&(r.order=eN)):t&&(r.order=void 0),0>=((null===(d=p.current.fullName)||void 0===d?void 0:d.length)||0)?(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¸à¸·à¹à¸-à¸à¸²à¸¡à¸ªà¸à¸¸à¸¥ หรืภà¸à¸·à¹à¸à¸à¸£à¸´à¸©à¸±à¸/à¸à¸´à¸à¸´à¸à¸¸à¸à¸¥":"Check first-last name or company/legal entity name","<br>"),t&&(r.name=eN)):t&&(r.name=void 0),0>=((null===(c=p.current.address)||void 0===c?void 0:c.length)||0)?(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¸à¸µà¹à¸à¸¢à¸¹à¹":"Check address","<br>"),t&&(r.address=eN)):t&&(r.address=void 0),0>=((null===(u=p.current.provinceID)||void 0===u?void 0:u.length)||0)?(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¸à¸±à¸à¸«à¸§à¸±à¸":"Check province","<br>"),t&&(r.province=eN)):t&&(r.province=void 0),0>=((null===(v=p.current.districtID)||void 0===v?void 0:v.length)||0)?(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¹à¸à¸/à¸à¸³à¹à¸ à¸":"Check district","<br>"),t&&(r.district=eN)):t&&(r.district=void 0),0>=((null===(h=p.current.subDistrictID)||void 0===h?void 0:h.length)||0)?(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¹à¸à¸§à¸/à¸à¸³à¸à¸¥":"Check sub district","<br>"),t&&(r.subDistrict=eN)):t&&(r.subDistrict=void 0),0>=((null===(f=p.current.zipCode)||void 0===f?void 0:f.length)||0)?(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¹à¸à¸£à¸©à¸à¸µà¸¢à¹":"Check zipcode","<br>"),t&&(r.zipcode=eN)):t&&(r.zipcode=void 0),"C"===p.current.optradio&&(0>=((null===(n=p.current.branch)||void 0===n?void 0:n.length)||0)?(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¸ªà¸²à¸à¸²":"Check branch","<br>"),t&&(r.branch=eN)):t&&(r.branch=void 0)),"P"===p.current.optradio?(0,ec.nk)(p.current.taxID||"")?t&&(r.taxID=void 0):(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¸«à¸¡à¸²à¸¢à¹à¸¥à¸à¸à¸£à¸°à¸à¸³à¸à¸±à¸§à¸à¸£à¸°à¸à¸²à¸à¸":"Check personal ID","<br>"),t&&(r.taxID=eN)):"T"===p.current.optradio?(0,ec.Tv)(p.current.passportID||"")?t&&(r.passport=void 0):(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¸«à¸¡à¸²à¸¢à¹à¸¥à¸à¸«à¸à¸±à¸à¸ªà¸·à¸à¹à¸à¸´à¸à¸à¸²à¸":"Check passport number","<br>"),t&&(r.passport=eN)):"C"===p.current.optradio&&((0,ec.nk)(p.current.taxID||"")?t&&(r.taxID=void 0):(o+="- ".concat("th"===e.local?"à¸à¸£à¸§à¸à¸ªà¸à¸à¸«à¸¡à¸²à¸¢à¹à¸¥à¸à¹à¸ªà¸µà¸¢à¸ าษี":"Check TAX ID","<br>"),t&&(r.taxID=eN))),K||(o+="- ".concat("th"===e.local?"à¸à¸£à¸¸à¸à¸²à¸¢à¸à¸¡à¸£à¸±à¸ à¹à¸à¸·à¹à¸à¸à¹à¸à¹à¸¥à¸°à¸à¹à¸à¸à¸à¸¥à¸ à¹à¸¥à¸° à¸à¹à¸¢à¸à¸²à¸¢à¸à¸§à¸²à¸¡à¹à¸à¹à¸à¸ªà¹à¸§à¸à¸à¸±à¸§ à¸à¸à¸ SHU":"Please agree to TERMS & CONDITIONS AND PRIVACY POLICY OF SHU","<br>")),t&&(console.log("VALIDATE",JSON.stringify(p.current)),o.length>0)){var b='<div class="header padding-bottom">'+i.pleaseCheck+'</div><div style="text-align:left;">'+o+"</div>";(0,F.Z)(b,function(){},i.title)}return eM(r),o.length<=0}}var Form=function(e){var t,n=e.shouldReload,o=e.mPage,g=e.mMenu,b=e.mFooter,y=e.productMaster,j=e.locale,C=e.webConfig,D=(0,c.Z)(["shu-oa"]),I=(0,i.Z)(D,3),S=(I[1],I[2]),w=new A(j),k=(0,c.Z)(["shu-u-cookie"]),N=(0,i.Z)(k,3)[2],F=(0,c.Z)(["shu-u-cus"]),T=(0,i.Z)(F,3)[2],M=(0,c.Z)(["shu-u-data"]),O=(0,i.Z)(M,3)[2],_=(0,u.useState)(!1),E=_[0],R=_[1];return((0,Z.useSearchParams)(),(0,u.useEffect)(function(){S("shu-oa",{path:"/"}),n&&(s.Z.remove("reservedPromotion"),s.Z.remove("prepareForCheckout"),s.Z.remove("promotionRemovedList"),s.Z.remove("promotionItems"),N("shu-u-cookie",{path:"/"}),T("shu-u-cus",{path:"/"}),O("shu-u-data",{path:"/"}),v.ZP.clearCache(),window.location.reload()),R(!0)},[]),E)?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(r(),{children:(0,P.jsx)("title",{children:"e-Tax Invoice"})}),(0,P.jsx)("div",{className:"header-page sticky-top",children:(0,P.jsx)(l.ZP,{webConfig:C,MMenu:g,productMaster:y,locale:j})}),(0,P.jsx)(d.Z,{content:(0,P.jsxs)(h.Z,{children:[(0,P.jsx)(p.Z,{className:"justify-content-center","data-test":"Static-Content-Title",id:"Static-Content-Title",style:{fontSize:"26px",fontFamily:"DBHeavent"},children:"th"===j?"à¸à¸à¹à¸à¸à¸³à¸à¸±à¸à¸ าษีà¸à¸´à¹à¸¥à¹à¸à¸à¸£à¸à¸à¸´à¸à¸ªà¹":"Request e-Tax Invoice"}),(0,P.jsx)(p.Z,{className:"justify-content-center",children:(0,P.jsx)(f.ZP,{src:(0,m.D)("/img/section/line.svg"),alt:"line",style:{width:"800px",maxWidth:"80%",paddingTop:"12px",paddingBottom:"25px"}})}
1),(0,P.jsx)(h.Z,{children:(0,P.jsx)(EtaxInputView,{webConfig:C,local:j||"th"})})]})}),null===(t=o.body)||void 0===t?void 0:t.map(function(e,t){return(0,P.jsx)("div",{children:null==w?void 0:w.getComponent(e,t)},(0,x.Z)())}),(0,P.jsx)(a.Z,{MFooter:b,locale:j})]}):null};Form.displayName="ETax";var eb=!0,ey=Form},62885:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/etax/input",function(){return n(95735)}])},38143:function(e){e.exports={forgotPassword:"RegisterComponent_forgotPassword__tEFge",sendBtn:"RegisterComponent_sendBtn__0Aa9K"}}},function(e){e.O(0,[1130,6994,9349,5415,8826,4583,9424,6074,2585,9774,2888,179],function(){return e(e.s=62885)}),_N_E=e.O()}]);
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.