PageSourceSearch

https://askany.com/_next/static/chunks/pages/campaign/khoa-hoc-tha…/components/FormCourse-2ae52de22a1fdcf7.js

js askany.com collected 2026-10-01 16:36:07 UTC 7,738 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5300],{82724:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/campaign/khoa-hoc-thau-hieu-quang-cao/components/FormCourse",function(){return n(62186)}])},3312:function(e,t,n){"use strict";n.d(t,{X:function(){return s}});var a=n(15311);n(20132);var r=n(96559),l=n.n(r);let s=()=>(0,a.jsx)("div",{className:l().circleLoading})},85356:function(e,t,n){"use strict";var a=n(15311);n(20132),t.Z=e=>{let{children:t,classNameError:n,classNameImage:r=""}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-x-[10px] pt-[10px]",children:[(0,a.jsx)("div",{className:"w-[16px] h-[16px] ".concat(r),children:(0,a.jsx)("img",{src:"/icons/ic_error.png",alt:"error"})}),(0,a.jsx)("p",{className:" font-medium text-[#f43f23] text-[15px] leading-[23px] ".concat(n," "),children:t})]})}},26099:function(e,t,n){"use strict";var a=n(15311);n(20132),t.Z=e=>{let{name:t,placeholder:n,className:r="",registerForm:l={},type:s="text",disable:o=!1,defaultValue:i="",id:c="",...u}=e;return(0,a.jsx)("input",{...l,...u,disabled:o,id:c||"id",type:s,name:t,placeholder:n,defaultValue:i,className:"w-full px-[16px] py-[8px] border outline-none border-gray-200 rounded-[10px] text-16px font-normal focus:border-green-600 ".concat(r)})}},15803:function(e,t,n){"use strict";var a=n(15311);n(20132);var r=n(85356),l=n(26099),s=n(73436);let o=(e,t,n)=>e?n:t+" "+n;t.Z=e=>{let{classNameContainer:t="",overrideClassNameContainer:n=!1,label:i="",classNameLabel:c="",overrideClassNameLabel:u=!1,classNameContainerInput:d="",overrideClassNameContainerInput:p=!1,classNameInput:m="",overrideClassNameInput:h=!1,registerForm:x={},name:f="",placeholder:g="",errorStr:b="",type:y="",defaultValue:v="",requiredField:N=!0,disable:w=!1,onChange:j=()=>{},setValue:k=()=>{},allowNegative:_=!1,id:A}=e;return t=o(n,"mt-[20px]",t),c=o(u,"text-[16px] text-black-100 leading-[24px] font-semibold",c),d=o(p,"mt-[16px] text-[16px] text-black-100 leading-[24px] font-normal",d),m=o(h,"",m),(0,a.jsxs)("div",{className:t,children:[(0,a.jsxs)("span",{className:c,children:[" ",i," ",N&&(0,a.jsx)("p",{className:"inline text-[#f43f23]",children:" *"})]}),(0,a.jsxs)("div",{className:d,children:["number"===y?(0,a.jsx)(s.Z,{registerForm:x,name:f,placeholder:g,onChange:j,disable:w,defaultValue:v,setValue:k,allowNegative:_,id:A,className:m}):(0,a.jsx)(l.Z,{registerForm:x,name:f,placeholder:g,className:m,type:y,defaultValue:v,disable:w,id:A,onChange:j}),""!==b&&(0,a.jsx)(r.Z,{children:b})]})]})}},73436:function(e,t,n){"use strict";var a=n(15311);n(20132),t.Z=e=>{let{name:t,placeholder:n,limit:r=4,className:l="",registerForm:s,disable:o=!1,defaultValue:i="",allowNegative:c=!1,isCheckArrow:u=!1,onChange:d=()=>{},setValue:p=()=>{},id:m=""}=e,h=(e,n)=>{!e&&0>+n.target.value&&p(t,1)},x=e=>{if(u){/^ArrowUp|ArrowDown$/.test(e.key)&&e.preventDefault();return}!/^Backspace|Tab|ArrowLeft|ArrowUp|ArrowRight|ArrowDown|Enter|Home|End$/.test(e.key)&&
1(/([0-9])/.test(e.key)||e.preventDefault())},f=e=>{c||"Minus"!==e.code&&"NumpadSubtract"!==e.code||e.preventDefault()},g=e=>{e.target.value.length+1>r&&e.preventDefault()};return(0,a.jsx)("input",{...s,disabled:o,type:"number",name:t,min:0,max:9999,onKeyDown:e=>{x(e),("."===e.key||","===e.key||"+"===e.key)&&e.preventDefault()},onChange:e=>{h(c,e),d(e),null==s||s.onChange(e)},onKeyPress:e=>{f(e),g(e)},onWheel:e=>e.currentTarget.blur(),placeholder:n,defaultValue:i,id:m,className:"w-full pl-[16px] py-[8px] border outline-none border-gray-200 rounded-[10px] text-16px font-normal focus:border-green-600 ".concat(l," ")})}},59426:function(e,t,n){"use strict";var a=n(15311),r=n(20790),l=n(90245),s=n(98426),o=n(20132);t.Z=e=>{let t="en"===(0,s.Z)()?r:l,{name:n,placeholder:i="",className:c="",registerForm:u,disable:d=!1,defaultValue:p="",setValue:m,clearError:h,setError:x=()=>{}}=e,f=o.useRef(null),g=e=>{!/^Backspace|Tab|ArrowLeft|ArrowUp|ArrowRight|ArrowDown|Enter|Home|End$/.test(e.key)&&f.current&&(f.current.value.length<=9?x(n,{type:n,message:t.notifyAmountGreaterThanAndLessThan}):e.preventDefault())},b=e=>{let a=e.currentTarget.value.replace(/\D+/g,"");a&&(a.length<=9||a.length>10)?x(n,{type:n,message:t.notifyAmountGreaterThanAndLessThan}):h(n),m(n,a,{shouldValidate:!0}),f.current&&(f.current.value=a,h(n))};return(0,a.jsx)("input",{name:n,...u,ref:e=>{f.current=e,null==u||u.ref(e)},disabled:d,defaultValue:p,type:"text",onChange:e=>b(e),onKeyDown:e=>{e.ctrlKey&&/a|v|c|x$/.test(e.key)||g(e)},placeholder:i,autoComplete:"false",className:"w-full pl-[16px] py-[8px] border outline-none border-gray-200 rounded text-16px font-normal focus:border-green-600 ".concat(c)})}},62186:function(e,t,n){"use strict";n.r(t);var a=n(15311),r=n(20132),l=n(38453),s=n(69988),o=n(17723),i=n(56875),c=n.n(i),u=n(3312),d=n(85356),p=n(15803),m=n(59426),h=n(74034),x=n.n(h),f=n(5762);t.default=e=>{var t;let{buttonClass:n=""}=e,i=(0,f.useRouter)(),[h,g]=(0,r.useState)(!1),b=l.Ry().shape({fullname:l.Z_().required("Vui l\xf2ng nhập t\xean"),phone:l.Z_().typeError("Số điện thoại kh\xf4ng hợp lệ").required("Vui l\xf2ng nhập số điện thoại").matches(/^(0[1-9][0-9]|[1-9][0-9])[0-9]{7}$/,"Vui l\xf2ng nhập số điện thoại")}),{register:y,setValue:v,handleSubmit:N,clearErrors:w,setError:j,reset:k,formState:{errors:_,isSubmitting:A}}=(0,o.cI)({resolver:(0,s.X)(b)}),T=async e=>{let t=c()().format("HH:mm:ss"),n=c()().format("DD/MM/YYYY");await fetch("/api/save-to-sheet",{method:"POST",body:JSON.stringify({...e,date:n,time:t,url:"https://askany.com".concat(null==i?void 0:i.asPath),sheetId:"1aXbH_m0qvilWVVZvHoYO2A8kszGFIb276zrP2WJfOIQ",sheetTitle:"khoa-hoc-thau-hieu-quang-cao"})}).then(e=>g(!0)).catch(()=>{}),k(),g(!0)};return(0,a.jsx)("div",{children:h?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center mt-5",children:[(0,a.jsx)("div",{className:"w-[100px] h-[100px]",children:(0,a.jsx)(x(),{src:"/images/buy-course/submit-success.png",width:100,height:50,alt:"icon",className:"object-contain w-full h-full"})}),(0,a.jsx)("p",{className:"mt-5 text-xl font-bold text-primary-2",children:"Gửi th\xe0nh c\xf4ng"})]}):(0,a.jsxs)("form",{onSubmit:N(T),className:"mt-6 space-y-5 text-left ",children:[(0,a.jsx)("div",{className:"",children:(0,a.jsx)(p.Z,{classNameContainerInput:"mt-[5px]",classNameInput:"!border-gray-200 rounded-[8px] focus:!border-green-600 ",classNameContainer:"mt-0",classNameLabel:"font-bold text-grey-2",overrideClassNameLabel:!0,registerForm:y("fullname"),label:"Nhập t\xean của bạn",name:"fullname",placeholder:"Nguyễn Văn A",errorStr:null===(t=_.fullname)||void 0===t?void 0:t.message,onChange:e=>{let t=e.target.value;v("fullname",t),t.trim().length<3?j("fullname",{message:"Tối thiểu 3 k\xfd tự"}):t.length>30?j("fullname",{message:"Kh\xf4ng nhập qu\xe1 30 k\xfd tự"}):w("fullname")}})}),(0,a.jsxs)("div",{className:"text-[16px] text-grey-300 leading-[24px] font-normal w-full",children:[(0,a.jsxs)("span",{className:" text-[16px] text-grey-2 leading-[24px] font-bold",children:["Số điện thoại ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)(m.Z,{name:"phone",className:"w-full border-gray-200 !rounded-lg !mt-[5px]",placeholder:"Số điện thoại",registerForm:y("phone"),clearError:w,setValue:v}),_.phone&&(0,a.jsx)(d.Z,{children:_.phone.message})]}),(0,a.jsx)("button",{id:"Tiktok-Thoa",type:"submit",className:"bg-primary-1 text-white text-base font-semibold w-full py-2 px-5 rounded-lg ".concat(n),disabled:A,children:A?(0,a.jsx)(u.X,{}):"Gửi th\xf4ng tin ngay"})]})})}}
1,96559:function(e){e.exports={circleLoading:"styles_circleLoading__fRVb6"}}},function(e){e.O(0,[7723,9702,4905,2888,9774,179],function(){return e(e.s=82724)}),_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.