PageSourceSearch

https://fastlance.vn/_next/static/chunks/684.7bc766d211796b9b.js

js fastlance.vn collected 2026-09-24 13:08:15 UTC 16,198 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[684],{2650:(e,a,n)=>{n.d(a,{Sh:()=>i,gQ:()=>t});var i=["image/jpeg","image/png","image/webp"],t=function(e){return 1048576*e}},35385:(e,a,n)=>{n.d(a,{JL:()=>i,cG:()=>t});var i=function(e){var a=e.target.value;a.match(/^\d+$/)?e.target.value=a:e.target.value=a.slice(0,-1)},t=function(e){var a=e.target;"string"==typeof a.value&&a.value&&(a.value=a.value.trim())}},65549:(e,a,n)=>{function i(e){for(var a=e.split(",")[1],n=window.atob(a),i=new ArrayBuffer(n.length),t=new Uint8Array(i),s=0;s<n.length;s++)t[s]=n.charCodeAt(s);return i}function t(e){return e.substring(e.indexOf(":")+1,e.indexOf(";"))}n.d(a,{dN:()=>t,vH:()=>s,wi:()=>i});var s=function(e){return new Promise(function(a){var n=new Image;n.addEventListener("load",function(){return a(!1)}),n.addEventListener("error",function(){return a(!0)}),n.setAttribute("crossOrigin","anonymous"),n.src=e})}},67553:(e,a,n)=>{n.d(a,{u:()=>D});var i=n(67684),t=n(62701),s=n(37876),r=n(14678),l=n(10997),c=n(80481),o=n(50075),d=n(85102),m=n(2911),u=n(16927),p=n(20294),f=n(85993),g=n(4902),h=n(13810),v=n(15039),_=n.n(v),y=n(14232),x=n(88992),b=n(4825),j=n(28341),N=n(65549),w=n(35385),k=n(79944),C=n(97744),L=n(25612),F=n(54587),E=n.n(F),S=n(31753),B=n(2650),I=n(84367),V=function(e){var a,n=function(){I.Pw.getInstance().trackViewCompanyDocExample(),r.Fc.success({hideIcon:!0,width:580,title:'<div class="_ffml-secondary _fw-600 _fs-400 _mgbt-24px" style="margin-top: -24px;">'.concat(d("company.form.company-image.example-title"),"</div>"),showConfirmButton:!1,html:'\n                <div class="trb-message is-show-icon _mgbt-12px">\n                    <div class="icon _fs-300">\n                        <i class="fas fa-circle-info"></i>\n                    </div>\n                    <p class="content _tal-l _fs-200">\n                        '.concat(d("company.form.company-image.example-message"),'\n                    </p>\n                </div>\n                <a href="').concat(F,'" target="_blank">\n                    <img src="').concat(F,'" width="100%">\n                </a>\n            ')})},d=(0,p._)((0,o.Bd)(c.yP),1)[0],m=e.setTempImageFile,f=e.tempFile,h=(0,y.useRef)(null),v=(0,x.xW)(),_=v.setValue,b=v.watch,w=v.formState.errors,k=v.setError,C=v.clearErrors,L=b("company_image"),F=j.kU.switch({default:"/static-v4/images/account-setting/company-doc-example-desktop.png",en:"/static-v4/images/account-setting/company-doc-example-desktop-en.png"});return(0,s.jsxs)("div",{className:"company-image",children:[(0,s.jsxs)("div",{className:"head",children:[(0,s.jsx)("div",{className:"title",children:(0,s.jsxs)(S.x6,{t:d,i18nKey:"company.form.company-image.title",children:["เอกสารรับรองบริษัท / ใบทะเบียนภาษีมูลค่าเพิ่ม (ภ.พ.20)",(0,s.jsx)("span",{className:"trb-link _fw-400 _ffml-primary",role:"button",onClick:function(){n()},children:"(ดูตัวอย่าง)"})]})}),(0,s.jsx)("div",{className:"subtitle",children:d("company.form.company-image.sub-title")})]}),(0,s.jsxs)("div",{className:"image-container",children:[L?(0,s.jsxs)(y.Fragment,{children:[(0,s.jsx)(W,{watchedImage:L,tempFile:f}),(0,s.jsx)("div",{role:"button",className:"remove-button",onClick:function(){_("company_image","")},children:(0,s.jsx)(l.hh,{size:24,children:(0,s.jsx)("i",{className:"fal fa-trash-can"})})})]}):(0,s.jsx)("div",{className:"placeholder",children:(0,s.jsx)(E(),{src:"/static-v4/images/account-setting/company-image-placeholder.png",alt:"company image placeholder",width:208,he
1ight:135,quality:100,style:{maxWidth:"100%",height:"auto"}})}),(0,s.jsx)("input",{type:"file",ref:h,accept:[B.Sh,"application/pdf"].join(", "),onChange:function(e){return(0,u._)(function(){var a,n,i,t;return(0,g.YH)(this,function(s){if(i=null==(n=e.currentTarget)||null==(a=n.files)?void 0:a[0]){if(i.size>(0,B.gQ)(10))return[2,k("company_image",{message:d("company.form.company-image.validate-file-size")})];m(i),(t=new FileReader).addEventListener("load",function(e){var a=e.target;return(0,u._)(function(){return(0,g.YH)(this,function(e){switch(e.label){case 0:if(!i.type.startsWith("image"))return[3,2];return[4,(0,N.vH)(a.result)];case 1:if(e.sent())return k("company_image",{message:d("validate.file.format")}),[2,!1];e.label=2;case 2:return _("company_image",a.result,{shouldDirty:!0}),C("company_image"),[2]}})})()},!1),t.readAsDataURL(i)}return[2]})})()}})]}),(0,s.jsx)(r.$n,(0,t._)((0,i._)({type:"button",variant:"secondary",onClick:function(){var e;null==(e=h.current)||e.click()}},!L&&{startIconClass:"far fa-plus-circle"}),{children:L?d("company.form.company-image.button-change"):d("company.form.company-image.button-upload")})),(null==w?void 0:w.company_image)&&(0,s.jsx)("div",{className:"error",children:null==w||null==(a=w.company_image)?void 0:a.message})]})},W=function(e){var a=e.watchedImage,n=e.tempFile,i=(0,p._)((0,o.Bd)(c.yP),1)[0],t=(0,p._)((0,y.useMemo)(function(){return[new URL(a).pathname.endsWith(".pdf")?"pdf":"image"]},[a]),1)[0];return(null==n?void 0:n.type)==="application/pdf"?(0,s.jsxs)("div",{className:"_dp-g",children:[(0,s.jsx)(l.hh,{size:72,className:"_cl-primary-500 _mgh-at",children:(0,s.jsx)("i",{className:"fal fa-file _fs-1200"})}),(0,s.jsx)("div",{className:"file-title",children:n.name})]}):"image"===t?(0,s.jsx)("img",{src:a,alt:"company image",className:"preview-image"}):(0,s.jsxs)("div",{className:"_dp-g",children:[(0,s.jsx)(l.hh,{size:72,className:"_cl-primary-500",children:(0,s.jsx)("i",{className:"fal fa-file _fs-1200"})}),(0,s.jsx)(l.Gr,{href:a,className:"_tal-ct trb-link _fs-200",children:i("company.form.company-image.preview")})]})},z=function(e){var a,n,l,d,v,F,E,S,B,I,W,z,D,P,R,M=e.defaultValue,O=(0,o.Bd)(c.yP).t,H=(0,p._)((0,y.useState)(null),2),T=H[0],Q=H[1],U=(0,p._)((0,y.useState)(!!M),2),J=U[0],$=U[1],K=(0,x.mN)({resolver:(0,h.u)(L.DR),defaultValues:A(M)}),Y=K.register,q=K.handleSubmit,G=K.formState,X=G.errors,Z=G.dirtyFields,ee=G.isDirty,ea=K.watch,en=K.setValue,ei=K.setError,et=(0,k.Q)({select:function(e){var a=e.reduce(function(e,a){return(0,f._)(e).concat((0,f._)(a.types))},[]).filter(function(e){return e.title!==b.N}).sort(function(e,a){return e.title.localeCompare(a.title)});return a.push({title:b.N,icon_class:"",sort_order:99}),a}}),es=et.data,er=et.isLoading,el=(0,m.hz)().data,ec=(null==el?void 0:el.status)==="verified",eo=(0,m.p1)(),ed=eo.mutate,em=eo.isLoading,eu=(0,m.xw)(),ep=eu.mutate,ef=eu.isLoading,eg=(0,m.Mv)(),eh=eg.mutate,ev=eg.isLoading,e_=(0,C.o)(),ey=e_.enableLossDataFormWarning,ex=e_.disableLossDataFormWarning,eb=function(a){eh({data:a},{onError:function(e){var a=e.data,n=a.error.detail,i=a.error.code;"string"!=typeof n&&"SCHEMA_VALIDATION_ERROR"===i&&Object.entries(n).map(function(e){var a=(0,p._)(e,2),n=a[0],i=a[1];ei(n,{message:null==i?void 0:i[0]})})},onSuccess:function(){var a;ex(),null==e||null==(a=e.onSuccess)||a.call(e)}})};(0,y.useEffect)(function(){ee&&ey()},[ee]);var ej=ea("tax_id"),eN=ea("industry");return(0,s.jsx)("form",{onSubmit:q(function(e){return(0,u._)(function(){var a,n;return(0,g.YH)(this,function(i){switch(i.label){case 0:if(!ec)return[3,2];return[4,r.Fc.confirm({title:O("company.form.alert.title"),text:O("company.form.alert.text"),cancelLabel:O("company.form.alert.cancel"),confirmLabel:O("company.form.alert.confirm")})];case 1:if(!i.sent().isConfirmed)return[2,!1];i.label=2;case 2:return a=e.industry===b.N?"".concat(b.N,":").concat(e.custom_industry):e.industry,n={name:e.name,address:e.address,tax_id:e.tax_id,industry:a,branch:e.branch,phone_number:e.phone_number,company_image:e.company_image,company_image_file_id:e.company_image_file_id,website:e.website}
1,Z.company_image&&T?ep({data:(0,N.wi)(e.company_image||""),params:{fileName:T.name},contentType:(0,N.dN)(e.company_image||"")},{onSuccess:function(e){var a=e.id;n.company_image=e.url,n.company_image_file_id=a,eb(n)},onError:function(e){r.y8.error({text:j.gJ.getFirst(e,O("company.form.alert.error-message"))})}}):eb(n),[2]}})})()}),className:"company-info-form",children:(0,s.jsx)(x.Op,(0,t._)((0,i._)({},K),{children:(0,s.jsxs)("div",{className:"_dp-g _gg-24px",children:[(0,s.jsx)("div",{className:"tax-id-look-up",children:(0,s.jsxs)("div",{className:_()("trb-field",{"is-variant-primary":!(null==(a=X.tax_id)?void 0:a.message),"is-variant-negative":null==(n=X.tax_id)?void 0:n.message}),children:[(0,s.jsx)("label",{htmlFor:"tax_id",children:O("company.form.tax-id.label")}),(0,s.jsxs)("div",{className:"inner",children:[(0,s.jsx)("div",{className:"trb-input",children:(0,s.jsx)("input",(0,i._)({id:"tax_id",placeholder:O("company.form.tax-id.placeholder"),inputMode:"numeric"},Y("tax_id",{onChange:w.JL})))}),(0,s.jsx)(r.$n,{isLoading:em,disabled:!ej,type:"button",onClick:function(){ed({data:{tax_id:ej}},{onSuccess:function(e){var a=e.address,n=e.name;en("address",a,{shouldValidate:!0}),en("name",n,{shouldValidate:!0})},onSettled:function(){$(!0)}})},children:O("company.form.tax-id.button-search")})]}),X.tax_id&&(0,s.jsx)("div",{className:"info",children:null==(l=X.tax_id)?void 0:l.message})]})}),(0,s.jsxs)("div",{className:_()("inner-form",{show:J}),children:[(0,s.jsxs)("div",{className:"_dp-g _gg-24px",children:[(0,s.jsx)(r.pd,(0,t._)((0,i._)({},Y("name")),{label:O("company.form.name.label"),placeholder:O("company.form.name.placeholder"),variant:(null==(d=X.name)?void 0:d.message)?"negative":"primary",info:null==(v=X.name)?void 0:v.message})),(0,s.jsx)(r.pd,(0,t._)((0,i._)({},Y("branch")),{label:O("company.form.branch.label"),placeholder:O("company.form.branch.placeholder"),variant:(null==(F=X.branch)?void 0:F.message)?"negative":"primary",info:null==(E=X.branch)?void 0:E.message})),(0,s.jsx)(r.TM,(0,t._)((0,i._)({},Y("address")),{label:O("company.form.address.label"),placeholder:O("company.form.address.placeholder"),variant:(null==(S=X.address)?void 0:S.message)?"negative":"primary",info:null==(B=X.address)?void 0:B.message})),(0,s.jsx)(r.pd,(0,t._)((0,i._)({},Y("phone_number",{onChange:w.JL})),{label:O("company.form.phone_number.label"),placeholder:O("company.form.phone_number.placeholder"),variant:(null==(I=X.phone_number)?void 0:I.message)?"negative":"primary",info:null==(W=X.phone_number)?void 0:W.message,inputMode:"tel"})),(0,s.jsxs)(r.l6,(0,t._)((0,i._)({},Y("industry")),{defaultValue:"",label:O("company.form.industry.label"),variant:(null==(z=X.industry)?void 0:z.message)?"negative":"primary",info:null==(D=X.industry)?void 0:D.message,disabled:er,children:[(0,s.jsx)("option",{value:"",disabled:!0,children:O("company.form.industry.placeholder")}),null==es?void 0:es.map(function(e){return(0,s.jsx)("option",{value:e.title,children:e.title},e.title)})]})),eN===b.N&&(0,s.jsx)(r.pd,(0,t._)((0,i._)({},Y("custom_industry")),{label:O("company.form.custom_industry.label"),placeholder:O("company.form.custom_industry.placeholder"),info:null==(P=X.custom_industry)?void 0:P.message,variant:(null==(R=X.custom_industry)?void 0:R.message)?"negative":"primary"})),(0,s.jsx)(r.pd,(0,t._)((0,i._)({},Y("website")),{label:O("company.form.website.label"),placeholder:O("company.form.website.placeholder")})),(0,s.jsx)(V,{tempFile:T,setTempImageFile:Q})]}),(0,s.jsx)("div",{className:"submit-wrapper",children:(0,s.jsx)(r.$n,{type:"submit",isLoading:ef||ev,children:O("company.form.website.button")})})]})]})}))})},A=function(e){if(!e)return{company_image:"",branch:"สำนักงานใหญ่",industry:"",custom_industry:""};var a,n,i,t,s=null==e?void 0:e.industry,r="";return(null==e?void 0:e.industry.startsWith(b.N))&&(s=b.N,r=null!=(i=null==e||null==(n=e.industry)||null==(a=n.split(b.W))?void 0:a[1])?i:""),{address:null==e?void 0:e.address,branch:null!=(t=null==e?void 0:e.branch)?t:"",company_image:null==e?void 0:e.company_image,company_image_file_id:null==e?void 0:e.company_image_file_id,name:null==e?void 0:e.name,phone_number:null==e?void 0:e.phone_number,tax_id:null==e?void 0:e.tax_id,website:null==e?void 0:e.website,industry:s,custom_industry:r}},D=function(){var e=(0,o.Bd)(c.yP).t,a=(0,m.hz)().data,n=(0,m.BW)("company-profile").data;return(0,s.jsxs)("div",{className:"_dp-g _gg-24px",children:[function(){if((null==a?void 0:a.status)==="pending")return(0,s.jsx)(r.QB,{variant:"warning",iconClass:"fas fa-triangle-exclamation",children:e("company.pending-message")});if((null==a?void 0:a.status)==="disapproved"){var i;return(0,s.jsxs)(r.QB,{variant:"negative",iconClass:"fa-solid fa-circle-xmark",className:"_wsp-pl _tal-l",children:[e("company.disapproved-message"),(0,s.jsx)("br",{}),null==n||null==(i=n.reasons)?void 0:i.map(function(e){return"• ".concat(e)}).join("\n")]})}return null}(),(0,s.jsx)(d.g,(0,t._)((0,i._)({title:e("company.title"),subtitle:e("company.sub-title")},(null==a?void 0:a.status)==="verified"&&{rightElement:(0,s.jsx)(P,{})}
1),{children:(0,s.jsx)(z,{defaultValue:a})}))]})},P=function(){var e=(0,o.Bd)(c.yP).t;return(0,s.jsxs)("div",{className:"verified-badge",children:[(0,s.jsx)(l.hh,{size:16,children:(0,s.jsx)("i",{className:"fas fa-badge-check"})}),e("company.approved-badge")]})}},95346:(e,a,n)=>{n.d(a,{l:()=>u});var i=n(37876),t=n(14678),s=n(54587),r=n.n(s),l=n(31753),c=n(10997),o=n(80481),d=n(28341),m=n(50075),u=function(e){var a=e.isMobile,n=function(){t.Fc.success({hideIcon:!0,width:500,title:'<div class="_ffml-secondary _fw-600 _fs-400 _mgbt-24px" style="margin-top: -24px;">'.concat(s("company.banner.alert.title"),"</div>"),showConfirmButton:!1,html:'\n                <div class="trb-message is-show-icon _mgbt-12px">\n                    <div class="icon _fs-300">\n                        <i class="fas fa-circle-info"></i>\n                    </div>\n                    <p class="content _tal-l _fs-200">\n                      '.concat(s("company.banner.alert.message"),'\n                    </p>\n                </div>\n                <div class="_bdrd-4px _pd-16px _bgcl-neutral-100">\n                    <a href="/static-v4/images/account-setting/tavi50-example.jpg" target="_blank">\n                        <img\n                            src="/static-v4/images/account-setting/tavi50-example-thumbnail.jpg"\n                            width="100%"\n                            style="max-width: 300px;"\n                            class="_bsd-200 _bdrd-8px"\n                            alt="tavi-50 example"\n                        ">\n                    </a>\n                    <div class="_cl-text-default-200 _tal-l _fs-200 _mgt-16px _pdl-12px">').concat(s("company.banner.alert.title"),"</div>\n                </div>\n            ")})},s=(0,m.Bd)(o.yP).t;return(0,d.uN)({th:(0,i.jsxs)("div",{className:"_bdrd-8px _ovf-hd",children:[(0,i.jsx)(c.EI,{className:"_ovf-hd",ratio:a?"343 / 92":"7 / 1",style:{width:"100%",height:"auto"},children:(0,i.jsx)(r(),{src:d.kU.switch({default:a?"/static-v4/images/account-setting/hiring-info-mobile.svg":"/static-v4/images/account-setting/hiring-info-desktop.svg",en:a?"/static-v4/images/account-setting/hiring-info-mobile-en.svg":"/static-v4/images/account-setting/hiring-info-desktop-en.svg"}),alt:"hiring-info",fill:!0,style:{objectFit:"cover"},quality:100})}),(0,i.jsx)("div",{className:"_bgcl-primary-100 _cl-primary-500 _pdh-12px _pdv-8px",children:(0,i.jsxs)("ul",{children:[(0,i.jsx)("li",{children:(0,i.jsxs)("p",{className:"_fs-200",children:["•"," ",(0,i.jsxs)(l.x6,{t:s,i18nKey:"company.banner.1",children:["ผู้ว่าจ้างกรุณาขอสำเนาบัตรประชาชนจาก",(0,i.jsx)("strong",{children:"“ฟรีแลนซ์”"}),"โดยตรง"]})]})}),(0,i.jsx)("li",{children:(0,i.jsxs)("p",{className:"_fs-200",children:["•"," ",(0,i.jsxs)(l.x6,{t:s,i18nKey:"company.banner.2-1",children:["ผู้ว่าจ้างต้องออกหนังสือรับรองการหักภาษี ณ ที่จ่าย (ทวิ 50) เป็น",(0,i.jsx)("strong",{children:"“ชื่อของฟรีแลนซ์”"})]})," ",(0,i.jsxs)("span",{className:"_cs-pt trb-link _tdcrt-udl",onClick:function(){return n()},children:["(",s("company.banner.2-2"),")"]})]})})]})})]})})}}}]);

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.