1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[156],{80156:function(e,t,n){n.r(t),n.d(t,{default:function(){return A}});var r=n(52322),o=n(92941),i=n(96554),a=n(83104),c=n(92021),s=n.n(c),l=n(9754),u=n(62120),f=n(45626),m=n(2784),d=n(3379),v=n(62762),p=n(59188);function h(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,o)}var b,x=(b=s().mark((function e(t){var n,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=p.Registry.getInstance().registry("PROXY_DEFAULT_URL_KEY")+"/customers-verification",e.next=4,(0,v.v)(n,{email:t},["token"]);case 4:return r=e.sent,e.abrupt("return",r.json());case 8:e.prev=8,e.t0=e.catch(0),console.error("customers-verification ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})),function(){var e=this,t=arguments;return new Promise((function(n,r){var o=b.apply(e,t);function i(e){h(o,n,r,i,a,"next",e)}function a(e){h(o,n,r,i,a,"throw",e)}i(void 0)}))}),y=n(73507);function g(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,o)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){j(e,t,n[t])}))}return e}var P=function(){var e=(0,d.I0)(),t=(0,d.v9)(y.PL),n=(0,m.useCallback)(function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){g(i,r,o,a,c,"next",e)}function c(e){g(i,r,o,a,c,"throw",e)}a(void 0)}))}}(s().mark((function n(r,o){var i;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,x(r);case 2:(i=n.sent).error?e((0,l._y)({error:i.error})):(e((0,l.jP)({data:w({},null===t||void 0===t?void 0:t.profile,{email:r})})),f.AccountPersistent.saveItem(u.k.ACCOUNT_AUTH_KEY,{profile:w({},null===t||void 0===t?void 0:t.profile,{email:r}),authentication:w({},null===t||void 0===t?void 0:t.authentication,{authentication:o})}),e((0,l.Xv)(2)));case 4:case"end":return n.stop()}}),n)}))),[]);return{actions:{setStateClosePopup:(0,m.useCallback)((function(){e((0,l.Ux)())}),[]),customersVerificationAction:n}}},O=(0,a.createUiHOC)((function(){return P()}),"withUpdateEmailActions"),N=n(78133),S=n(6277),k=n(94106);function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){C(e,t,n[t])}))}return e}var A=(0,a.combineHOC)(o.l,O,i.U)((function(e){var t,n,o=(0,m.useState)(!1),i=o[0],a=o[1],c=(0,d.v9)(y.A$),s=(0,k.cI)(),l=s.register,u=s.handleSubmit,f=s.watch,v=s.trigger,p=s.formState.errors,h=f("email");(0,m.useEffect)((function(){v()}),[h]);var b=(0,m.useRef)();return(0,N.l)(b,(function(){e.actions.setStateClosePopup()})),(0,r.jsx)(r.Fragment,{children:1===c&&!1===(null===e||void 0===e||null===(t=e.state)||void 0===t||null===(n=t.account)||void 0===n?void 0:n.closePopup)&&(0,r.jsxs)("div",{className:"modal-popup _show",children:[(0,r.jsx)("div",{className:"modal-overlay"}),(0,r.jsxs)("div",{className:"modal-content max-w-472 p-5",ref:b,children:[(0,r.jsxs)("div",{className:"relative mb-2.5 text-center",children:[(0,r.jsx)("h2",{className:"modal-title font-bold mb-2",style:{fontSize:"20px"},children:"\u0110\u0103ng k\xfd th\xf4ng tin c\xe1 nh\xe2n"}),(0,r.jsx)("p",{className:"text-gray-600 mb-5",style:{fontSize:"16px"},children:"Ch\xfang t\xf4i cam k\u1ebft b\u1ea3o m\u1eadt th\xf4ng tin c\xe1 nh\xe2n c\u1ee7a b\u1ea1n."}),(0,r.jsx)("button",{className:"absolute top-0 right-0 mt-1 mr-1 text-gray-500",onClick:function(){return e.actions.setStateClosePopup()},children:(0,r.jsx)("i",{className:"fal fa-times"})})]}),(0,r.jsx)("div",{className:"form",children:(0,r.jsxs)("form",{onSubmit:u((function(t){var n,r,o;"string"===typeof t.email&&"function"===typeof(null===e||void 0===e||null===(n=e.actions)||void 0===n?void 0:n.customersVerificationAction)&&(a(!0),e.actions.customersVerificationAction(t.email,null===e||void 0===e||null===(r=e.state)||void 0===r||null===(o=r.account)||void 0===o?void 0:o.authentication),e.actions.setStateClosePopup())})),children:[(0,r.jsx)("div",{className:"pb-2.5 flex justify-center",children:(0,r.jsx)("input",E({type:"text",placeholder:"VD: [email protected]",autoFocus:!0,className:"w-full text-center border-b-2 border-gray-300 focus:border-red-500 outline-none",style:{fontSize:"16px"}},l("email",{required:"Vui l\xf2ng nh\u1eadp email.",pattern:{value:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:"Email kh\xf4ng \u0111\xfang \u0111\u1ecbnh d\u1ea1ng."}})))}),(0,r.jsx)("div",{className:"mb-1.5",children:p.email&&(0,r.jsx)("p",{className:"text-red-500 text-center",style:{fontSize:"16px"},children:p.email.message})}),(0,r.jsx)("div",{className:"mt-10",children:(0,r.jsx)("button",{className:(0,S.Z)("btn-primary w-full py-2.5 font-semibold",(i||p.hasOwnProperty("email")||!h)&&"btn-disable"),style:{fontSize:"20px"},children:"X\xe1c nh\u1eadn"})})]})})]})]})})}))},78133:function(e,t,n){t.l=void 0;const r=n(2784);t.l=(e,t)=>
1{(0,r.useEffect)((()=>{function n(n){e.current&&!e.current.contains(n.target)&&t()}return document.addEventListener("mousedown",n,{passive:!0}),()=>{document.removeEventListener("mousedown",n)}}),[e])}}}]);
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.