PageSourceSearch

https://theright.fit/7750.05890271b5532894.js

js theright.fit collected 2026-09-24 11:54:20 UTC 69,184 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktrf_frontend=self.webpackChunktrf_frontend||[]).push([[7750],{96297(e,t,a){function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}a.d(t,{A:()=>s})},94656(e,t,a){a.d(t,{A:()=>i});a(96540);var s=a(3433),n=a(74848);const i=({myJobDetail:e,classes:t})=>{const a=(0,s.Zp)(),i=!e.private&&(0,n.jsx)("button",{type:"button",title:"Go To Search",className:null!=t?t:"btn btn-trf-outline-black btn-rounded mr-2",onClick:()=>{(()=>{let t="Any",s="Any",n="Any",i="Any",l="Any",r="Any",o="Any";t=e.profession.name,e.tags&&e.tags.length>0&&(s=e.tags.map(e=>e.name).join(", "));n=e.attributes.filter(e=>"gender"===e.name&&"Any"!==e.value).map(e=>e.value).join(", ");const[c,d]=e.age.split("-").map(Number),m=e.platform_requirements.map(e=>e.platform).join(", "),h=e.platform_requirements.reduce((e,t)=>t.minimum_followers<e?t.minimum_followers:e,1/0);e.open_to_applicants&&(o=e.open_to_applicants.includes("Global")?"Any":e.open_to_applicants.includes("Singapore")?"Singapore":e.open_to_applicants.includes("New Zealand")?"New Zealand":e.open_to_applicants.includes("United States")?"United States":"Australia"),i=e.attributes.filter(e=>"ethnicity"===e.name&&"Any"!==e.value).map(e=>e.value).join(", "),l=e.attributes.filter(e=>"hair_color"===e.name&&"Any"!==e.value).map(e=>e.value).join(", ");const u=e.attributes.filter(e=>"height"===e.name&&null!==e.value).map(e=>null!==e.value?parseInt(e.value):null).filter(e=>null!==e).sort((e,t)=>null!==e&&null!==t?e-t:0),p=u.length>0?u[0]:"Any",_=u.length>0?u[u.length-1]:"Any";r=e.attributes.filter(e=>"build"===e.name&&"Any"!==e.value).map(e=>e.value).join(", "),a(`/search/talent/?professions=${t}&subcategory=${s}&country=${o}&gender=${n}&minimum_age=${c}&maximum_age=${d}&plateform=${m}&minimum_follwowers=${h}&counry=${o}&ethnicity=${i}&hair_color=${l}&minimum_height=${p}&maximum_height=${_}&build=${r}`)})()},children:"Go To Search"});return(0,n.jsx)(n.Fragment,{children:i})}},21606(e,t,a){a.d(t,{A:()=>s});const s=()=>null},97438(e,t,a){a.r(t),a.d(t,{default:()=>U});var s=a(3433),n=a(96540),i=a(57546),l=a(94829),r=a(86984),o=a(27254),c=a(55868),d=a(71468),m=a(74848);const h=()=>{const{page:e}=(0,s.g)(),t=(0,s.Zp)(),a=(0,d.d4)(e=>e.JobStepsDetailsReducer.stepsCompleted),n=a=>{t((0,c.sM)(e,a))};return(0,m.jsx)("div",{className:"cast-talent-form",children:(0,m.jsx)("div",{className:"cast-talent-form__wrapp",children:(0,m.jsxs)("ul",{className:"cast-talent-steps",children:[(0,m.jsxs)("li",{className:`${(0,c.QX)(["details",e])?"active-page":""}\n           ${(0,c.cr)(["details",a],e)?"active-step":""}`,children:[(0,m.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>(0,c.cr)(["details",a],e)?n("details"):"",children:[(0,m.jsx)("span",{className:"cast-talent-steps__circle",children:"1"}),(0,m.jsx)("span",{className:"cast-talent-steps__name",children:"Job details"})]}),(0,m.jsx)("div",{className:"cast-talent-steps__divider"})]}),(0,m.jsxs)("li",{className:`${(0,c.QX)(["who",e])?"active-page":""}\n           ${(0,c.cr)(["who",a],e)?"active-step":""}`,children:[(0,m.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>(0,c.cr)(["who",a],e)?n("who"):"",children:[(0,m.jsx)("span",{className:"cast-talent-steps__circle",children:"2"}),(0,m.jsx)("span",{className:"cast-talent-steps__name",children:"Who"})]}),(0,m.jsx)("div",{className:"cast-talent-steps__divider"})]}),(0,m.jsxs)("li",{className:`${(0,c.QX)(["usage",e])?"active-page":""}\n            ${(0,c.cr)(["usage",a],e)?"active-step":""}`,children:[(0,m.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>(0,c.cr)(["usage",a],e)?n("usage"):"",children:[(0,m.jsx)("span",{className:"cast-talent-steps__circle",children:"3"}),(0,m.jsx)("span",{className:"cast-talent-steps__name",children:"Usage"})]}),(0,m.jsx)("div",{className:"cast-talent-steps__divider"})]}),(0,m.jsxs)("li",{className:`${(0,c.QX)(["budget",e])?"active-page":""}\n            ${(0,c.cr)(["budget",a],e)?"active-step":""}`,children:[(0,m.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>
1(0,c.cr)(["budget",a],e)?n("budget"):"",children:[(0,m.jsx)("span",{className:"cast-talent-steps__circle",children:"4"}),(0,m.jsx)("span",{className:"cast-talent-steps__name",children:"Budget"})]}),(0,m.jsx)("div",{className:"cast-talent-steps__divider"})]}),(0,m.jsx)("li",{className:`${(0,c.QX)(["preview",e])?"active-page":""}\n            ${(0,c.cr)(["preview",a],e)?"active-step":""}`,children:(0,m.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>(0,c.cr)(["preview",a],e)?n("preview"):"",children:[(0,m.jsx)("span",{className:"cast-talent-steps__circle",children:"5"}),(0,m.jsx)("span",{className:"cast-talent-steps__name",children:"Preview & Submit"})]})})]})})})},u=({loading:e,saveAndExit:t,exitOnly:a})=>{const{page:n}=(0,s.g)(),i="preview"===n||"submitted"===n;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("header",{className:"cast-talent-header  flex-row",children:[(0,m.jsx)(s.N_,{to:"/dashboard",className:"cast-talent-header__logo",children:(0,m.jsx)("img",{src:o.A,alt:"The Right Fit"})}),(0,m.jsxs)("div",{className:"cast-talent-header__box",children:[(0,m.jsx)("h1",{children:"Cast Talent"}),(0,m.jsx)("button",{className:"cast-talent-header__save",type:"button",onClick:()=>{i&&a?a():t&&t()},disabled:e,children:e?"SAVING...":i?"EXIT":"SAVE AND EXIT"})]})]}),(0,m.jsx)(h,{})]})};var p=a(2543),_=a(59186),x=a(64864),g=a(8773),j=a(71929),b=a(85383),v=a(49785),f=a(25814),N=a(63545),y=a(49376),w=a(12476);const A=["gender","hair_color","ethnicity","height","build","dress_size","hair_length","eye_color","shirt_size","shoe_size","pant_size","bra_size","covid_vaccination"],k=()=>{var e,t,a;const{handleSubmit:r,register:o,setValue:h,trigger:k,watch:$,getValues:C,setError:S,formState:{errors:O}}=(0,v.mN)({mode:"onChange"}),[E,F]=(0,n.useState)(!1),[P,D]=(0,n.useState)(),[T,q]=(0,n.use
1State)(!1),{id:z}=(0,s.g)(),J=(0,s.Zp)(),U=(0,d.d4)(e=>e.userDetail.data),Z=(0,d.d4)(e=>e.postJobAttributesList.data),[M,R]=(0,n.useState)({minimum_age:null,maximum_age:null,ideal_candidate:"",attributes:{gender:[],height:[],hair_color:[],ethnicity:[],hair_length:[],eye_color:[],shirt_size:[],shoe_size:[],pant_size:[],bra_size:[],build:[],dress_size:[],covid_vaccination:[]},step:void 0,profession_id:"",id:""}),{fetchData:L}=(0,j.A)(),B=(0,d.wA)(),I=async e=>{const{name:t,value:a}=e.target;R(e=>Object.assign({},e,{[t]:a})),h(t,a),await k(e.target.name)},[G,W]=(0,n.useState)({positionApproved:!1,loading:!1});(0,n.useEffect)(()=>{(0,w.eG)();(async()=>{q(!0);try{const e=await L((0,l.EA)(z));R(t=>Object.assign({},t,{minimum_age:e.data.data.minimum_age,maximum_age:e.data.data.maximum_age,ideal_candidate:e.data.data.ideal_candidate})),Object.keys(e.data.data).forEach(t=>{if("attributes"===t){const t=e.data.data.attributes;A.forEach(e=>{const a=t.filter(t=>t.name===e);if(a.length>0){const t=a.map(e=>e.id.toString());h(`attributes.${e}`,t)}})}else h(t,e.data.data[t],{shouldDirty:!0})});const{data:t}=e.data;if(t){const e=await L((0,l.cf)(z));W(Object.assign({},G,{loading:T,positionApproved:null!==e.data.data.approved_at})),B((0,y.Zv)({stepsCompleted:e.data.data[0]})),q(!1)}}catch(e){q(!1)}})()},[]);const{mutate:V,isPending:H}=(0,i.U)(l.dE,{onSuccess:async e=>{(0,N.s)("client","position.job-who.set",U,z),J((0,c.sM)("/who","/usage"))},onError(e){D(e)}},z),{mutate:X,isPending:Q}=(0,i.U)(e=>(0,l.df)(z,e),{onSuccess:e=>{J("/projects")},onError:e=>{console.error("[DEBUG] FormWho save error:",e)}}),Y=e=>{const t=Object.values(Z).find(t=>t.name===e);if(t&&t.values){const a=$(`attributes.${e}`)||[];if(Array.isArray(a)&&a.length>0){return t.values.filter(e=>a.includes(null==e?void 0:e.value))}if(null!==a){return t.values.filter(e=>a===(null==e?void 0:e.value))}}return[]},K=(e,t=null,a=!1)=>{const s=Object.values(Z).find(t=>t.name===e);if(s&&s.values){var n;t=null!==t?t:s.displayName;const i=Object.keys({}).indexOf(e),l=a?{required:`This ${s.displayName} is required`}:{};return(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{children:t}),(0,m.jsx)(g.Ay,Object.assign({},o(`attributes.${e}`,l),{className:"trf-react-select-container trf-react-select-show-clear-container trf-react-select-rounded",classNamePrefix:"trf-react-select",options:s.values,onChange:(t,a)=>ee(t,e),isMulti:!0,placeholder:`Filter By ${s.displayName}`,value:Y(e),isOptionDisabled:t=>((e,t)=>{const a=Object.values(Z).find(t=>t.name===e),s=["Any","Rather not say"],n=a.values.filter(e=>s.includes(e.label)).map(e=>e.value),i=$(`attributes.${e}`)||[];if(Array.isArray(i)&&i.length>0){const e=n[0];if(i.includes(e)&&t.value!==e)return!0}else{const e=n[0];if(i===e&&t.value!==e)return!0}return!1})(e,t),isClearable:!1})),O.attributes&&O.attributes[e]&&(0,m.jsx)("div",{className:"error-message",children:null==(n=O.attributes[e])?void 0:n.message})]},`${e}-${i}`)}return null},ee=(e,t)=>
1{S(`attributes.${t}`,{});const a=e.some(e=>"Any"===e.label),s=e.some(e=>"Rather not say"===e.label);if(a){const a=e.filter(e=>"Any"===e.label).map(e=>e.value);h(`attributes.${t}`,a)}else if(s){const a=e.filter(e=>"Rather not say"===e.label).map(e=>e.value);h(`attributes.${t}`,a)}else h(`attributes.${t}`,(0,p.map)(e,"value"))},te=(e,t=null)=>{const a=Object.values(Z).find(t=>t.name===e);if(a&&a.values){var s;t=null!==t?t:a.displayName;const n=Object.keys({}).indexOf(e);return(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{children:t}),(0,m.jsx)(g.Ay,Object.assign({},o(`attributes.${e}`),{className:"trf-react-select-container trf-react-select-single-container trf-react-select-rounded",classNamePrefix:"trf-react-select",options:a.values,onChange:(t,a)=>ae(t,a,e,n),isMulti:!1,placeholder:`Filter By ${a.displayName}`,isClearable:!0,value:Y(e)})),O.attributes&&O.attributes[e]&&(0,m.jsx)("div",{className:"error-message",children:null==(s=O.attributes[e])?void 0:s.message})]},`${e}-${n}`)}},ae=(e,t,a,s)=>{h(`attributes.${a}`,e?[e.value]:[])},se=()=>{const e=C("attributes.gender");if(e&&1===e.length){const t=e[0],a=Object.values(Z).find(e=>"gender"===e.name);if(a&&a.values)return a.values.some(e=>e.value===t&&"Male"===e.label)}return!1};se();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,Object.assign({},G,{saveAndExit:()=>{const e=Object.assign({},C(),{step:2});X(e)}})),(0,m.jsx)("div",{className:"cast-talent-content cast-talent-who",children:(0,m.jsx)("div",{className:"cast-talent-form-content",children:(0,m.jsx)("form",{onSubmit:r(e=>{V(Object.assign({},e,{step:2}))}),className:"trf-job-post-form",children:(0,m.jsxs)(b.A,{loading:T||Q||H,children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__container",children:[(0,m.jsx)(_.A,{level:2,children:"Add more details",classNames:"step_heading"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box box_desctiption",children:[(0,m.jsx)("label",{children:"Describe the type of influencers you want to work with"}),(0,m.jsx)("textarea",Object.assign({value:M.ideal_candidate,onFocus:()=>{return e="ideal_candidate",void D(t=>{const a=Object.assign({},t);return delete a[e],a});var e}},o("ideal_candidate",{required:"Please enter a headline for your job",pattern:{value:c.UB,message:"Please avoid entering personal information."}}),{placeholder:"E.g. We are looking to cast a Mum role, who is brunette and in her mid to late 30s. We need this talent to be able to surf and is confident in the water.",onChange:I})),O.ideal_candidate&&(0,m.jsx)("div",{className:"error-message ",children:null==(e=O.ideal_candidate)?void 0:e.message}),P&&(0,m.jsx)(f.A,{errorField:"ideal_candidate",errors:P})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__items-container",children:[(0,m.jsx)("label",{children:"Age range"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__items",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)(x.p,Object.assign({id:"minimum_age"},o("minimum_age",{required:"Min Age is required.",min:{value:16,message:"Minimum age should be at least 16 years old."}}),{value:M.minimum_age,onChange:I,type:"number"})),O.minimum_age&&(0,m.jsx)("div",{className:"error-message ",children:null==(t=O.minimum_age)?void 0:t.message}),P&&(0,m.jsx)(f.A,{errorField:"minimum_age",errors:P})]}),(0,m.jsx)("div",{children:(0,m.jsx)("span",{children:"To"})}),(0,m.jsxs)("div",{children:[(0,m.jsx)(x.p,Object.assign({id:"maximum_age"},o("maximum_age",{required:"Max Age is required.",max:{value:100,message:"Maximum age should be less than or equal to 100."},validate:e=>{const t=parseInt(C("minimum_age"),10);if(null===e)return!0;const a="number"==typeof e?e:parseFloat(e);return!(!isNaN(t)&&!isNaN(a)&&Number.isInteger(a))||(a>=t||"Maximum age should be greater than or equal to the minimum age.")}}),{onChange:I,type:"number"})),O.maximum_age&&(0,m.jsx)("div",{className:"error-message ",children:null==(a=O.maximum_age)?void 0:a.message}),P&&(0,m.jsx)(f.A,{errorField:"maximum_age",errors:P})]})]})]}),(0,m.jsx)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:K("gender",null,!0)})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,m.jsx)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:K("hair_color")}),(0,m.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:K("ethnicity")})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,m.jsx)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:te("height","Min Height (cm)")}),(0,m.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:K("build")})]}),E&&(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,m.jsx)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:te("hair_length")}),(0,m.jsx)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:K("eye_color")})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,m.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:te("shirt_size","T-Shirt Size")}),(0,m.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:te("shoe_size","Shoe Size (inch)")})]}),!se()&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,m.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:te("pant_size","Pant Size (inch)")}),(0,m.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:te("bra_size")})]}),(0,m.jsx)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:(0,m.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:te("dress_size")})})]}),(0,m.jsx)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:(0,m.jsx)("div",{className:" cast-talent-form-content__box cast-talent-form-content__box_width cast-talent-form-content__box_row ",children:(0,m.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:te("covid_vaccination","Does the talent need to be vaccinated?")})})})]}),(0,m.jsxs)("button",{className:"cast-talent-form-content__btn-toggle",type:"button",onClick:()=>F(!E),children:[E?"Hide attributes":"Advanced attributes"," "]})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[(0,m.jsx)("button",{className:"cast-talent-form-content__back",type:"button",onClick:()=>
1J((0,c.sM)("/who","/details")),children:"back"}),(0,m.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:T||Q||H,children:"save & continue"})]})]})})})})]})};var $=a(40364),C=a(59118),S=a(21606);const O=$.c.CDN_PATH,E=[{label:"Global",value:"1"},{label:"Australia wide",value:"2"},{label:"Singapore",value:"3"},{label:"New South Wales",value:"4"},{label:"South Australia",value:"5"},{label:"Victoria",value:"6"},{label:"Western Australia",value:"7"},{label:"Queensland",value:"8"},{label:"Australian Capital Territory",value:"9"},{label:"Tasmania",value:"10"},{label:"Northern Territory",value:"11"},{label:"New Zealand",value:"12"},{label:"United States",value:"13"}],F=(0,n.forwardRef)(({saveAndExit:e},t)=>{var a,r,o,h,u,A,k;const{handleSubmit:$,register:F,setValue:P,trigger:D,setError:T,getValues:q,formState:{errors:z}}=(0,v.mN)({mode:"onChange"}),J=(0,d.d4)(e=>e.userDetail.data),U=(0,n.useRef)(null),[Z,M]=(0,n.useState)([]),[R,L]=(0,n.useState)([]),[B,I]=(0,n.useState)(),[G,W]=(0,n.useState)({id:"",profession_id:"",is_real_person:0,title:"",brief:"",open_to_applicants:[],is_image_needed:!1,image_requirement:"",production_dates:"",hours_per_day:"",payment_type:"",payment_term:"",files:[]}),[V,H]=(0,n.useState)(!1),[X,Q]=(0,n.useState)(G.is_image_needed),{fetchData:Y}=(0,j.A)(),K=(0,s.Zp)(),{id:ee}=(0,s.g)();let te="";const ae=(0,d.d4)(e=>e.postJobSelection.professionid),se=(0,d.d4)(e=>e.postJobSelection.isrealperson),ne=e=>new Promise((t,a)=>{const s=new FileReader;s.onload=e=>{var a;t(null==(a=e.target)?void 0:a.result)},s.onerror=t=>{console.error(`FileReader failed on file ${e.name}.`),a(null)},e||(console.error("No file to read."),a(null)),s.readAsDataURL(e)}),ie=async e=>{const{name:t,value:a,type:s}=e.target;"file"===s&&(e=>{if(e.target.files){const t=0,a=e.target.files[t];if(a.size<=1073741824){a.inQueue=!0,ne(a).then(e=>{a.view=e,M(e=>[...e,a])}).catch(e=>{console.error(`FileReader failed on file ${a.name}.`)});const e=Z.length-1;he({index:e,file:a})}}})(e),W(e=>Object.assign({},e,{[t]:a})),P(t,a),await D(e.target.name)}
1,le=(0,d.wA)(),re=async e=>{I(t=>{const a=Object.assign({},t);return delete a[e],a})};(0,n.useEffect)(()=>{(0,w.eG)();(async()=>{H(!0);try{const e=await Y((0,l.uB)(ee)),{data:t}=e.data;if(W(Object.assign({},e.data.data)),L(e.data.data.files),Q(0!==e.data.data.image_needed&&null!==e.data.data.image_needed),Object.keys(e.data.data).forEach(t=>{P(t,e.data.data[t],{shouldDirty:!0})}),le((0,y._W)({jobSelected:t.profession,isrealperson:t.is_real_person,professionid:t.profession_id,pageActive:[]})),t){const e=await Y((0,l.cf)(ee));le((0,y.Zv)({stepsCompleted:e.data.data[0]})),H(!1)}}catch(e){console.error(e),H(!1)}})()},[]);const{mutate:oe,isPending:ce}=(0,i.U)(l.X6,{onSuccess:async e=>{(0,N.s)("client","position.job-details.set",J,ee),K((0,c.sM)("/details","/who"))},onError(e){console.error(e),I(e)}},ee),{mutate:de,isPending:me}=(0,i.U)(l.X6,{onSuccess:async e=>{(0,N.s)("client","position.job-details.set",J,ee),K("/projects")},onError(e){console.error(e),I(e)}},ee),{mutate:he}=(0,i.U)(l.Kj,{onSuccess:async e=>{(0,N.s)("client","position.job_details.attachment.set",J,ee),M([]),L(e.data.data)},catch(e){console.error(e)}},ee),{mutate:ue}=(0,i.U)(l.eA,{onSuccess:()=>{const e=[...R],t=e.findIndex(e=>e.id===te);-1!==t&&(e.splice(t,1),L(e))}}),pe=async()=>{var e;if(!(await D()))return void(0,w.eG)();const t=q(),a={payment_type:"credit_card",payment_term:null,profession_id:ae,id:ee,is_real_person:se,open_to_applicants:null!=(e=G.open_to_applicants)?e:[],is_image_needed:!1===X?0:1,image_requirement:X?t.image_requirement:"",files:null!=R?R:[]};de(Object.assign({},t,a))};return(0,n.useImperativeHandle)(t,()=>({handleSaveAndExit:pe,isLoading:me})),(0,m.jsxs)("div",{className:"cast-talent-content cast-talent-details",children:[(0,m.jsx)("div",{className:"cast-talent-form-content",children:(0,m.jsx)("div",{className:"preloader-wrapper",children:(0,m.jsxs)("form",{onSubmit:$(e=>{var t;const a={payment_type:"credit_card",payment_term:null,profession_id:ae,id:ee,is_real_person:se,open_to_applicants:null!=(t=G.open_to_applicants)?t:[],is_image_needed:!1===X?0:1,image_requirement:X?e.image_requirement:"",files:null!=R?R:[]};oe(Object.assign({},e,a))}),className:"trf-job-post-form",children:[(0,m.jsxs)(b.A,{loading:V||ce||me,children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__block-about",children:[(0,m.jsx)(_.A,{level:2,children:"Tell us about the job"}),(0,m.jsx)("p",{className:"description",children:"Describe what the job entails. The more details, the better applicants you'll receive!"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box box_title",children:[(0,m.jsx)("label",{children:"What's the headline of your job?"}),(0,m.jsx)(x.p,Object.assign({},F("title",{required:"Please enter a headline for your job",pattern:{value:c.UB,message:"Please avoid entering personal information."}}),{name:"title",value:G.title,id:"title",onFocus:()=>re("title"),onChange:ie,placeholder:"E.g. Couple needed for Tourism Campaign TV Commercial Shoot",className:""})),z.title&&(0,m.jsx)("div",{className:"error-message ",children:null==(a=z.title)?void 0:a.message}),B&&(0,m.jsx)(f.A,{errorField:"title",errors:B})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box box_desctiption",children:[(0,m.jsx)("label",{children:"Tell us about the campaign, or let the influencer know what you'd like them to do?"}),(0,m.jsx)("textarea",Object.assign({value:G.brief,placeholder:"Tell us a little bit about the brand, the project or shoot, and background information that might help the talent write a good application for the job"},F("brief",{required:"Please enter a description about the job",pattern:{value:c.UB,message:"Please avoid entering personal information."}}),{onFocus:()=>re("brief"),onChange:ie})),z.brief&&(0,m.jsx)("div",{className:"error-message ",children:null==(r=z.brief)?void 0:r.message}),B&&(0,m.jsx)(f.A,{errorField:"brief",errors:B})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__img-add",children:[(0,m.jsx)(_.A,{level:3,children:"Add a photo or reference media to help you get the right applicants!"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__img-box",children:[Z.length>0&&Z.map((e,t)=>(0,m.jsxs)("div",{className:"cast-talent-form-content__img-add-box",children:[(0,c.wu)(e)&&(0,m.jsx)("img",{src:e.view?String(e.view):"",alt:"img"}),!(0,c.wu)(e)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"file-block",children:[e.name.substring(0,10),"..."]}),(0,m.jsxs)("div",{className:"file-title",children:[e.name.substring(0,10),"..."]})]})]})),R.length>0&&R.map((e,t)=>(0,m.jsxs)("div",{className:"cast-talent-form-content__img-add-box",children:[(0,m.jsx)("button",{type:"button",onClick:()=>(e=>{te=e.id,ue({id:ee,file:e})})(e),children:"x"}),(0,c.wu)(e)&&(0,m.jsx)("img",{src:e.url?String(e.url):"",alt:"img"}),!(0,c.wu)(e)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"file-block",children:[e.name.substring(0,10),"..."]}),(0,m.jsxs)("div",{className:"file-title",children:[e.name.substring(0,10),"..."]})]})]})),R.length<5&&(0,m.jsx)("div",{className:"cast-talent-form-content__label-wrapp",children:(0,m.jsx)("label",{onClick:()=>{U.current&&U.current.click()},children:(0,m.jsx)("i",{className:"fa fa-paperclip"})})}),(0,m.jsx)("input",Object.assign({id:"photoUser"},F("files",{required:!1}),{type:"file",ref:U,accept:".xlsx, .xls, image/x-png,image/jpeg, .doc, .docx, .txt, .pdf, .csv",onChange:ie}))]})]}),(0,m.jsx)("p",{className:"max-file-size-msg",children:"Max file size 1GB, for each item, jobs with photos, mood boards or scripts tend to get higher applications"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row ",children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__items-container",children:[(0,m.jsx)("label",{children:"When is your approximate shoot date?"}),(0,m.jsx)(x.p,Object.assign({value:"To be confirmed"===G.production_dates?"":G.production_dates,id:"productiondatesstart"},F("production_dates",{required:"When is your approximate shoot date?",pattern:{value:c.UB,message:"Please avoid entering personal information."}}),{placeholder:"E.g. 31st October 2021",className:"",onChange:ie})),z.production_dates&&(0,m.jsx)("div",{className:"error-message ",children:null==(o=z.production_dates)?void 0:o.message}),B&&(0,m.jsx)(f.A,{errorField:"production_dates",errors:B})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__items-container",children:[(0,m.jsx)("label",{children:"How many days and hours will be required?"}),(0,m.jsx)(x.p,Object.assign({id:"hours_per_day",value:"To be confirmed"===G.hours_per_day?"":G.hours_per_day},F("hours_per_day",{required:"Please enter days and hours.",pattern:{value:c.UB,message:"Please avoid entering personal information."}}),{placeholder:"E.g. 2 day and 3 hours per day",className:"",onChange:ie})),z.hours_per_day&&(0,m.jsx)("div",{className:"error-message ",children:null==(h=z.hours_per_day)?void 0:h.message}),B&&(0,m.jsx)(f.A,{errorField:"hours_per_day",errors:B})]})]})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__block-where",children:[(0,m.jsx)(_.A,{level:2,children:"Where would you like to receive applications from?"}),(0,m.jsx)("p",{children:"Choose from what parts of the world candidates can apply from to the job posting"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_select",children:[(0,m.jsx)("label",{children:"Location(s)"}),(0,m.jsx)(g.Ay,Object.assign({},F("open_to_applicants",{required:"Please select location"}),{options:E,className:"trf-react-select-container trf-react-select-single-container trf-react-select-rounded",classNamePrefix:"trf-react-select",isMulti:!0,placeholder:"Select location",menuPlacement:"auto",value:(()=>{var e;const t=null!=(e=G.open_to_applicants)?e:[];return(0,p.filter)(E,e=>(0,p.includes)(t,e.label))})(),isOptionDisabled:e=>G.open_to_applicants.includes("Global")&&"Global"!==e.label,onChange:e=>{(e=>{T("open_to_applicants",{}),e.some(e=>"Global"===e.label)?(W(e=>Object.assign({},e,{open_to_applicants:["Global"]})),P("open_to_applicants",["Global"])):(W(t=>Object.assign({},t,{open_to_applicants:(0,p.map)(e,"label")})),P("open_to_applicants",(0,p.map)(e,"label")))})(e)}})),(0,m.jsx)("p",{children:"You can select multiple locations if needed"}),(null==(u=z.open_to_applicants)?void 0:u.message)&&(0,m.jsx)("div",{className:"error-message",children:null==(A=z.open_to_applicants)?void 0:A.message})]})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__block-additional",children:[(0,m.jsx)(_.A,{level:2,children:"Should applicants attach additional media?"}),(0,m.jsx)("p",{children:"All talent have a range of photos available on their profile, as well as links to view their instagram images."}),(0,m.jsx)("label",{children:"Should talent provide additional materials on application ?"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,m.jsx)("div",{className:"cast-talent-form-content__checkbox-wrapp",children:(0,m.jsxs)("label",{children:[(0,m.jsx)("input",{type:"radio",onChange:()=>Q(!1),value:"0",checked:!X,id:"checkNo",name:"portfolioOption"}),(0,m.jsx)("span",{children:(0,m.jsx)("img",{src:`${O}/images/cast-talent-form/check-1.svg`,alt:"User"})}),"No, their portfolio on theright.fit is enough for now"]})}),(0,m.jsx)("div",{className:"cast-talent-form-content__checkbox-wrapp",children:(0,m.jsxs)("label",{children:[(0,m.jsx)("input",{type:"radio",onChange:()=>Q(!0),value:"1",checked:X,id:"checkYes",name:"portfolioOption"}),(0,m.jsx)("span",{children:(0,m.jsx)("img",{src:`${O}/images/cast-talent-form/check-1.svg`,alt:"User"})}),"Yes"]})})]}),X&&(0,m.jsxs)("div",{className:"cast-talent-form-content__box",children:[(0,m.jsx)("label",{children:"Describe the specific photo or video casting you need from each applicant"}),(0,m.jsx)("textarea",Object.assign({placeholder:"E.g. Please upload a photo of you with your dog, clearly showing the dogs current size"},F("image_requirement",{required:"Please fill this field.",pattern:{value:c.UB,message:"Please avoid entering personal information."}}))),z.image_requirement&&(0,m.jsx)("div",{className:"error-message ",children:null==(k=z.image_requirement)?void 0:k.message}),B&&(0,m.jsx)(f.A,{errorField:"hours_per_day",errors:B})]})]})]}),(0,m.jsx)("div",{className:"cast-talent-form-content__box-btn d-flex justify-content-end",children:(0,m.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:V||ce||me,children:"save & continue"})})]})})}),(0,m.jsxs)("div",{className:"cast-talent-content__wrapper",children:[(0,m.jsx)(C.A,{}),(0,m.jsx)(S.A,{})]})]})});F.displayName="FormDetails";const P=F;var D=a(28454);const T=["Online","Billboard / Out of home","Social Media","In store / Out of home","Magazine / Catalogue / Print","In store / Point of Sale","Cinema","TV","Other"],q=()=>{var e,t,a,i;
1const[r,o]=(0,n.useState)(),h=$.c.CDN_PATH,{handleSubmit:p,register:_,watch:g,setValue:A,getValues:k,formState:{errors:O}}=(0,v.mN)(),{fetchData:E}=(0,j.A)(),F=(0,d.d4)(e=>e.userDetail.data),[P,q]=(0,n.useState)(!1),z=(0,s.Zp)(),{id:J}=(0,s.g)(),U=(0,d.wA)(),[Z,M]=(0,n.useState)({positionApproved:!1,loading:!1});(0,n.useEffect)(()=>{(0,w.eG)();(async()=>{q(!0);try{const e=await(0,l.zC)(J);(e=>{Object.keys(e).forEach(t=>{A(t,e[t])}),e.usage.forEach((e,t)=>{A(`usage[${t}]`,e)})})(e.data)}catch(e){console.error("Error fetching data:",e)}finally{q(!1)}})(),(async()=>{const e=await E((0,l.cf)(J));M(Object.assign({},Z,{loading:P,positionApproved:null!==e.data.data.approved_at})),U((0,y.Zv)({stepsCompleted:e.data.data[0]}))})()},[]);const R=g(),{mutate:L,isPending:B}=(0,D.n)({mutationFn:e=>(0,l.ku)(J,e),onError:e=>{o(e)},onSuccess:()=>{(0,N.s)("client","position.job-usage.set",F,J);const e=window.location.pathname.replace("/usage","/budget");z(e)}}),{mutate:I,isPending:G}=(0,D.n)({mutationFn:e=>(0,l.df)(J,e),onError:e=>{o(e)},onSuccess:()=>{z("/projects")}}),W=e=>{o(t=>{const a=Object.assign({},t);return delete a[e],a})},V=e=>!!O[e];return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,Object.assign({},Z,{saveAndExit:()=>{I(Object.assign({},k(),{step:3}))}})),(0,m.jsxs)("div",{className:"cast-talent-content talent-usage-form",children:[(0,m.jsx)("div",{className:"cast-talent-form-content",children:(0,m.jsx)("div",{className:"preloader-wrapper",children:(0,m.jsxs)("form",{onSubmit:p(e=>{0===Object.keys(O).length&&L(e)}),children:[(0,m.jsx)(b.A,{loading:P||B||G,children:(0,m.jsxs)("div",{className:"cast-talent-form-content__block-about",children:[(0,m.jsxs)("div",{className:"mt-4",children:[(0,m.jsx)("h3",{children:"Which media types will be used? Select all that apply"}),(0,m.jsx)("div",{className:"cast-talent-form-content__box",children:T.map((e,t)=>(0,m.jsx)("div",{className:"cast-talent-form-content__checkbox-wrapp mr-0",children:(0,m.jsxs)("label",{htmlFor:"usage-item-"+t,children:[(0,m.jsx)("input",Object.assign({},_("usage",{required:"Please choose atleast one option"}),{type:"checkbox",id:"usage-item-"+t,value:e})),(0,m.jsx)("span",{children:(0,m.jsx)("img",{src:`${h}/images/cast-talent-form/check-1.svg`,alt:e})}),e]})},t))}),O.usage&&(0,m.jsx)("div",{className:"error-message mb-4",children:null==(e=O.usage)?void 0:e.message})]}),R&&R.usage&&R.usage.length>0&&R.usage.includes("Other")&&(0,m.jsx)("div",{className:"cast-talent-form-content__box box_title mb-0",children:(0,m.jsxs)("div",{className:"cast-talent-form-content__items-container "+(V("usage_other")?"error":""),children:[(0,m.jsx)("label",{children:"Other?"}),(0,m.jsx)(x.p,Object.assign({id:"usage_other"},_("usage_other",{required:"This field is required",pattern:{value:c.UB,message:"Please avoid entering personal information."}}),{onFocus:()=>W("usage_other"),placeholder:"Other",className:""})),O.usage_other&&(0,m.jsx)("div",{className:"error-message mt-2",children:null==(t=O.usage_other)?void 0:t.message}),r&&(0,m.jsx)(f.A,{errorField:"usage_other",errors:r})]})}),(0,m.jsx)("div",{className:"cast-talent-form-content__box box_title mb-0",children:(0,m.jsxs)("div",{className:"cast-talent-form-content__items-container "+(V("usage_timeframe")?"error":""),children:[(0,m.jsx)("label",{children:"How long will the content be used for?"}),(0,m.jsx)(x.p,Object.assign({id:"usage_timeframe"},_("usage_timeframe",{required:"This field is required",pattern:{value:c.UB,message:"Please avoid entering personal information."}}),{onFocus:()=>W("usage_timeframe"),placeholder:"ie 12 months, or leave blank if not sure",className:""})),O.usage_timeframe&&(0,m.jsx)("div",{className:"error-message mt-2",children:null==(a=O.usage_timeframe)?void 0:a.message}),r&&(0,m.jsx)(f.A,{errorField:"usage_timeframe",errors:r})]})}),(0,m.jsx)("div",{className:"cast-talent-form-content__box box_desctiption mb-0",children:(0,m.jsxs)("div",{className:"cast-talent-form-content__items-container "+(V("usage_location")?"error":""),children:[(0,m.jsx)("label",{children:"Which countries will content be used in?"}),(0,m.jsx)(x.p,Object.assign({id:"usage_location"},_("usage_location",{required:"This field is required",pattern:{value:c.UB,message:"Please avoid entering personal information."}}),{onFocus:()=>W("usage_location"),placeholder:"",className:""})),O.usage_location&&(0,m.jsx)("div",{className:"error-message mt-2",children:null==(i=O.usage_location)?void 0:i.message}),r&&(0,m.jsx)(f.A,{errorField:"usage_location",errors:r})]})})]})}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[(0,m.jsx)("button",{className:"cast-talent-form-content__back",onClick:()=>{const e=window.location.pathname.replace("/usage","/who");z(e)},type:"button",children:"back"}),(0,m.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:P||B||G,children:"save & continue"})]})]})})}),(0,m.jsxs)("div",{className:"cast-talent-content__wrapper",children:[(0,m.jsx)(C.A,{}),(0,m.jsx)(S.A,{})]})]})]})},z=()=>{var e,t,a,i;const r=$.c.CDN_PATH,o=(0,d.d4)(e=>e.userDetail.data),{handleSubmit:h,register:p,watch:x,setValue:f,formState:{errors:A},setError:k,trigger:O,getValues:E}=(0,v.mN)({mode:"onChange"}),{fetchData:F}
1=(0,j.A)(),[P,T]=(0,n.useState)(!1),q=(0,s.Zp)(),{id:z}=(0,s.g)(),J=(0,d.wA)(),[U,Z]=(0,n.useState)({positionApproved:!1,loading:!1});(0,n.useEffect)(()=>{(0,w.eG)();(async()=>{T(!0);try{const e=await(0,l.NO)(z);if((e=>{Object.keys(e).forEach(t=>{if("budget_type"===t){let a=e[t].toString();a=a||"3",f(t,a)}else if("is_receiving_quote"===t){let a=e[t]?e[t]:"0";a=a.toString(),f(t,a)}else f(t,e[t])})})(e.data),e){const e=await F((0,l.cf)(z));Z(Object.assign({},U,{loading:P,positionApproved:null!==e.data.data.approved_at})),J((0,y.Zv)({stepsCompleted:e.data.data[0]})),T(!1)}}catch(e){console.error("Error fetching data:",e)}finally{T(!1)}})()},[]);const M=x(),{mutate:R,isPending:L}=(0,D.n)({mutationFn:e=>(0,l.NT)(z,e),onSuccess:()=>{(0,N.s)("client","position.job-budget.set",o,z);const e=window.location.pathname.replace("/budget","/preview");q(e)}}),{mutate:B,isPending:I}=(0,D.n)({mutationFn:e=>(0,l.df)(z,e),onSuccess:()=>{q("/projects")}});return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,Object.assign({},U,{saveAndExit:()=>{B(Object.assign({},E(),{step:4}))}})),(0,m.jsxs)("div",{className:"cast-talent-content talent-budget-form",children:[(0,m.jsx)("div",{className:"cast-talent-form-content",children:(0,m.jsx)("div",{className:"preloader-wrapper",children:(0,m.jsxs)("form",{onSubmit:h(e=>{0===Object.keys(A).length&&R(e)}),className:"trf-job-post-form",children:[(0,m.jsx)(b.A,{loading:P||L||I,children:(0,m.jsxs)("div",{className:"cast-talent-form-content__block-about",children:[(0,m.jsx)(_.A,{level:2,children:"What is the budget for this role?"}),(0,m.jsx)("p",{className:"description",children:"Please enter the price you're comfortable to pay for the job. The higher the rate you offer, the better quality and broader range of applicants you will receive."}),(0,m.jsx)("h3",{children:"My budget is based on"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__checkbox",children:[(0,m.jsxs)("label",{htmlFor:"radioHour",children:[(0,m.jsx)("input",Object.assign({type:"radio",id:"radioHour",value:"3"},p("budget_type",{required:"Please choose atleast one option"}))),(0,m.jsx)("span",{children:(0,m.jsx)("i",{className:"fas fa-circle"})}),"Per Hour"]}),(0,m.jsxs)("label",{htmlFor:"radioDay",children:[(0,m.jsx)("input",Object.assign({type:"radio",id:"radioDay",value:"2"},p("budget_type",{required:"Please choose atleast one option"}))),(0,m.jsx)("span",{children:(0,m.jsx)("i",{className:"fas fa-circle"})}),"Per Day"]})]}),A.budget_type&&(0,m.jsx)("div",{className:"error-message mb-4",children:null==(e=A.budget_type)?void 0:e.message}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box",children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__items-container",children:[(0,m.jsx)("label",{children:"Budget"}),(0,m.jsx)("input",Object.assign({type:"number",className:"budget",placeholder:"0"},p("budget",{required:"Budget is required.",min:{value:95,message:"Minimum budget is 95"},pattern:{value:/^[0-9]+$/,message:"Please enter a valid number"}}))),(0,m.jsx)("p",{className:"hint",children:"Budget starts at $95 / hour "}),A.budget&&(0,m.jsx)("div",{className:"error-message mb-2",children:null==(t=A.budget)?void 0:t.message})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__text-wrapp",children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__text",children:[(0,m.jsxs)("span",{children:["$",(()=>{if(M.budget&&o){const e=(0,c.aU)("trf",parseFloat(M.budget),o);return new Intl.NumberFormat("en-AU",{minimumFractionDigits:2,maximumFractionDigits:2}).format(parseFloat(e))}return"0.00"})()]}),(0,m.jsx)("span",{children:"theright.fit charges a 20% fee on all bookings including credit card fees"})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__text",children:[(0,m.jsxs)("span",{children:["$",(()=>{if(M.budget&&o){const e=(0,c.aU)("gst",parseFloat(M.budget),o);return new Intl.NumberFormat("en-AU",{minimumFractionDigits:2,maximumFractionDigits:2}).format(parseFloat(e))}return"0.00"})()]}),(0,m.jsx)("span",{children:"GST"})]})]}),(0,m.jsxs)("div",{className:"cast-talent-form-content__text cast-talent-form-content__text_bold",children:[(0,m.jsxs)("span",{children:["$",(()=>{if(M.budget&&o){const e=(0,c.aU)("total",parseFloat(M.budget),o);return new Intl.NumberFormat("en-AU",{minimumFractionDigits:2,maximumFractionDigits:2}).format(parseFloat(e))}return"0.00"})()]}),(0,m.jsx)("span",{children:"Total fee"})]}),(0,m.jsx)("div",{className:"cast-talent-form-content__checkbox-wrapp",children:(0,m.jsxs)("label",{htmlFor:"checkAccept",children:[(0,m.jsx)("input",Object.assign({type:"checkbox",id:"checkAccept",value:"1"},p("is_receiving_quote"),{checked:"1"===M.is_receiving_quote,onChange:e=>{const t=e.target.checked?"1":"0";f("is_receiving_quote",t)}})),(0,m.jsx)("span",{children:(0,m.jsx)("img",{src:`${r}/images/cast-talent-form/check-1.svg`,alt:"User"})}),"This price is open to negotiation by applicants"]})})]}),o.is_invoice_allowed&&(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__payment",children:[(0,m.jsx)("h3",{children:"Payment Type"}),(0,m.jsxs)("div",{className:"cast-talent-form-content__checkbox mb-0",children:[(0,m.jsxs)("label",{htmlFor:"payment-credit-card",children:[(0,m.jsx)("input",Object.assign({},p("payment_type",{required:"Payment Type is required"}),{name:"payment_type",type:"radio",id:"payment-credit-card",value:"credit_card"})),(0,m.jsx)("span",{children:(0,m.jsx)("i",{className:"fas fa-circle"})}),"Credit card"]}),(0,m.jsxs)("label",{htmlFor:"payment-invoice",children:[(0,m.jsx)("input",Object.assign({},p("payment_type",{required:"Payment Type is required"}),{name:"payment_type",type:"radio",id:"payment-invoice",value:"invoice"})),(0,m.jsx)("span",{children:(0,m.jsx)("i",{className:"fas fa-circle"})})," ","Invoice"]})]}),A.payment_type&&(0,m.jsx)("div",{className:"error-message mt-2",children:null==(a=A.payment_type)?void 0:a.message})]}),M&&"invoice"===M.payment_type&&(0,m.jsxs)("div",{className:"cast-talent-form-content__payment mt-4",children:[(0,m.jsxs)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:[(0,m.jsx)("label",{children:"Payment Term"}),(0,m.jsxs)("div",{className:"form-group",children:[(0,m.jsx)(g.Ay,Object.assign({},p("payment_term",{required:"Payment Term is required"}),{options:c.t$,isMulti:!1,className:"trf-react-select-container trf-react-select-single-container trf-react-select-rounded",classNamePrefix:"trf-react-select",onChange:(e,t)=>
1{k("payment_term",{});const a=null!=e&&e.value?e.value:"";f("payment_term",a),O("payment_term")},value:c.t$.find(e=>{var t;return e.value===(null==(t=M.payment_term)?void 0:t.toString())})})),(0,m.jsx)("p",{className:"mb-0",children:"Let talent know the payment terms for this job, e.g. 30 days"}),A.payment_term&&(0,m.jsx)("div",{className:"error-message mt-2",children:null==(i=A.payment_term)?void 0:i.message})]})]}),(0,m.jsx)("p",{className:"error-message error"})]})]})]})}),(0,m.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[(0,m.jsx)("button",{className:"cast-talent-form-content__back",onClick:()=>{const e=window.location.pathname.replace("/budget","/usage");q(e)},type:"button",children:"back"}),(0,m.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:P||L||I,children:"save & continue"})]})]})})}),(0,m.jsxs)("div",{className:"cast-talent-content__wrapper",children:[(0,m.jsx)(C.A,{}),(0,m.jsx)(S.A,{})]})]})]})},J=()=>{const e=(0,d.d4)(e=>e.userDetail.data),[t,a]=(0,n.useState)(!1),[i,r]=(0,n.useState)(),[o,h]=(0,n.useState)(),u=(0,d.wA)(),_=(0,s.Zp)(),{id:x}=(0,s.g)(),{fetchData:g}=(0,j.A)();(0,n.useEffect)(()=>{(async()=>{a(!0);try{const t=await(0,l.YT)(x);(0,N.s)("client","position.job-preview.shown",e,x);const a=t.data;r(a)}catch(t){console.error("Error fetching data:",t)}finally{a(!1)}})(),(async()=>{const e=await g((0,l.cf)(x));u((0,y.Zv)({stepsCompleted:e.data.data[0]}))})()},[]);const{mutate:v,isPending:f}=(0,D.n)({mutationFn:()=>(0,l.Dc)(x),onError:e=>{h(e),console.log(o)},onSuccess:()=>{(0,N.s)("client","position.submitted-for-approval",e,x,null==i?void 0:i.raw_budget);const t=window.location.pathname.replace("/preview","/submitted");_(t)}}),w=()=>{v()},A=()=>{const e=window.location.pathname.replace("/preview","/details");_(e)},k=i&&i.attributes.reduce((e,t)=>(e[t.display_name]||(e[t.display_name]=[]),e[t.display_name].push(t.value),e),{}),$=()=>{_("/projects")};return(0,m.jsx)("div",{className:"cast-talent-content talent-preview-form",children:(0,m.jsx)("div",{className:"cast-talent-form-content",children:(0,m.jsxs)("div",{className:"preloader-wrapper",children:[i&&(0,m.jsxs)("div",{className:"cast-talent-form-content__box-btn top",children:[(0,m.jsx)("button",{className:"cast-talent-form-content__back",onClick:A,type:"button",children:"Edit Job"}),i&&!i.submitted_at||i&&!(0,p.isEmpty)(i.declined_at)&&(0,m.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:t||f,onClick:w,children:"Submit for approval"}),i&&i.submitted_at&&(0,p.isEmpty)(i.declined_at)&&(0,m.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",onClick:$,children:"Done"})]}),(0,m.jsx)(b.A,{loading:t||f,children:i&&(0,m.jsxs)("div",{className:"cast-talent-form-content__container",children:[(0,m.jsx)("h2",{children:"Preview"}),(0,m.jsx)("p",{children:"You can still go back and fine tune anything you\u2019ve missed. Once you\u2019re happy with everything, hit the \u2018Submit\u2019 button!"}),(0,m.jsx)("h3",{children:null==i?void 0:i.title}),(0,m.jsxs)("div",{className:"cast-talent-form-content__details",children:[(0,m.jsx)("label",{children:"Job Details"}),(()=>{const e=i&&i.brief?i.brief.split("\n"):null;return e?(0,m.jsx)("div",{children:e.map((e,t)=>(0,m.jsxs)(n.Fragment,{children:[e,(0,m.jsx)("br",{})]},t))}):null})(),(0,m.jsx)("label",{children:"Ideal Candidate"}),(0,m.jsx)("p",{children:null==i?void 0:i.ideal_candidate}),i.image_requirement&&(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{children:"Additional Materials"}),(0,m.jsx)("p",{children:i.image_requirement})]}),(0,m.jsxs)("div",{className:"mb-4",children:[(0,m.jsxs)("div",{className:"row",children:[(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("label",{children:"Age"})}),(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("label",{children:"Gender"})})]}),(0,m.jsxs)("div",{className:"row",children:[(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("span",{children:i.age})}),(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("span",{children:(0,c.VI)(i,"gender").join(", ")})})]})]}),(0,m.jsxs)("div",{className:"mb-4",children:[(0,m.jsxs)("div",{className:"row",children:[(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("label",{children:"Date"})}),(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("label",{children:"Location"})})]}),(0,m.jsxs)("div",{className:"row",children:[(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("span",{children:i.production_dates})}),(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("span",{children:i.open_to_applicants&&i.open_to_applicants.join(", ")})})]})]}),(0,m.jsxs)("div",{className:"mb-4",children:[(0,m.jsxs)("div",{className:"row",children:[(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("label",{children:"Budget"})}),(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("label",{children:"Duration"})})]}),(0,m.jsxs)("div",{className:"row",children:[(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("span",{children:i.display_rate})}),(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("span",{children:i.hours_per_day})})]})]}),"invoice"===(null==i?void 0:i.payment_type)&&(0,m.jsxs)("div",{className:"mb-4",children:[(0,m.jsx)("div",{className:"row",children:(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("label",{children:"Payment Type"})})}),(0,m.jsx)("div",{className:"row",children:(0,m.jsx)("div",{className:"col-6",children:(0,m.jsx)("span",{children:0===(null==i?void 0:i.payment_term)?(0,m.jsx)("span",{children:"Invoiced - Payable on Receipt"}):(0,m.jsxs)("span",{children:["Invoiced - Payment in ",null==i?void 0:i.payment_term," days"]})})})})]}),i.attributes.length>0&&(0,m.jsxs)("div",{className:"mb-4",children:[(0,m.jsx)("div",{className:"row",children:(0,m.jsx)("div",{className:"col-12",children:(0,m.jsx)("label",{children:"Attributes"})})}),Object.entries(k).map(([e,t])=>(0,m.jsxs)("div",{className:"row",children:[(0,m.jsxs)("div",{className:"col-6",children:[(0,m.jsx)("span",{children:e})," "]}),(0,m.jsxs)("div",{className:"col-6",children:[(0,m.jsx)("span",{children:t.join(", ")})," "]})]},e))]}),i.usage.usage.length>0&&(0,m.jsx)("label",{children:"Usage Type"}),(0,m.jsx)("ul",{className:"cast-talent-form-content__tags",children:i.usage.usage.map(e=>(0,m.jsx)("li",{children:e},e))}),(0,m.jsxs)("div",{className:"cast-talent-form-content__answers",children:[i.usage.usage_timeframe&&(0,m.jsxs)("div",{className:"cast-talent-form-content__answers-box",children:[(0,m.jsx)("label",{children:"How long will the content be used for?"}),(0,m.jsx)("p",{children:i.usage.usage_timeframe})]}),i.usage.usage_location&&(0,m.jsxs)("div",{className:"cast-talent-form-content__answers-box cast-talent-form-content__answers-box_right",children:[(0,m.jsx)("label",{children:"Which countries will content be used in?"}),(0,m.jsx)("p",{children:i.usage.usage_location})]})]}),(0,m.jsx)("div",{className:"cast-talent-form-content__img-box row",children:i.files.map(e=>(0,m.jsxs)("div",{className:"file-container",children:[(0,m.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",children:[(0,c.wu)(e)&&(0,m.jsx)("img",{src:e.url,alt:""}),!(0,c.wu)(e)&&(0,m.jsxs)("div",{className:"file-block",children:[e.name.substring(0,10),"..."]})]}),(0,m.jsx)("div",{className:"file-title",children:e.name})]},e.url))}),i.image_requirement&&(0,m.jsxs)("div",{children:[(0,m.jsx)("label",{children:"Describe the specific photo or video casting you need from each applicant"}),(0,m.jsx)("p",{children:i.image_requirement})]})]})]})}),i&&(0,m.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[(0,m.jsx)("button",{className:"cast-talent-form-content__back",onClick:A,type:"button",children:"Edit Job"}),i&&!i.submitted_at&&(0,m.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:t||f,onClick:w,children:"Submit for approval"}),i&&i.submitted_at&&(0,m.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",onClick:$,children:"Done"})]})]})})})},U=()=>{const e=(0,s.Zp)(),{page:t,id:a}=(0,s.g)(),o=(0,n.useRef)(null),{mutate:c,isPending:d}=(0,i.U)(e=>(0,l.df)(a,e),{onSuccess:t=>{e("/projects")},onError:e=>{console.error("Error saving draft position:",e)}},a),h=()=>
1{if("details"===t&&o.current)return void o.current.handleSaveAndExit();let e={};switch(t){case"who":e={step:2};break;case"usage":e={step:3};break;case"budget":e={step:4};break;case"preview":e={step:5};break;default:e={step:1}}c(e)},p=()=>{e("/projects")},_=()=>"details"===t&&o.current?{positionApproved:!0,loading:o.current.isLoading||d,saveAndExit:h,exitOnly:p}:{positionApproved:!0,loading:d,saveAndExit:h,exitOnly:p};return(0,m.jsxs)("div",{className:"cast-talent-form_container",children:["details"===t&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,Object.assign({},_())),(0,m.jsx)(P,{ref:o})]}),"who"===t&&(0,m.jsx)(k,{}),"usage"===t&&(0,m.jsx)(q,{}),"budget"===t&&(0,m.jsx)(z,{}),"preview"===t&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,Object.assign({},_())),(0,m.jsx)(J,{})]}),"submitted"===t&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,Object.assign({},_())),(0,m.jsx)(r.A,{})]})]})}},86984(e,t,a){a.d(t,{A:()=>N});var s=a(96540),n=a(3433),i=a(71468),l=a(2543),r=a(40364),o=a(4589),c=a(35241),d=a(74848);const m=({talents:e,position_id:t})=>{const a=(0,s.useRef)(null),n={position_id:t,details:"",invite_from:"talent-recommendations"},i=()=>{a.current&&a.current.slickNext()},l=()=>{a.current&&a.current.slickPrev()},r=({onClick:e})=>(0,d.jsx)("div",{className:"prev-arrow slick-arrow ",onClick:l,children:(0,d.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.469 10.6434C32.2182 11.4551 32.1676 12.7204 31.356 13.4696L19.9481 24L31.356 34.5304C32.1676 35.2796 32.2182 36.5449 31.469 37.3566C30.7198 38.1682 29.4545 38.2188 28.6429 37.4696L14.0508 24L28.6429 10.5304C29.4545 9.7812 30.7198 9.83181 31.469 10.6434Z",fill:"#222222"})})}),m=({onClick:e})=>(0,d.jsx)("div",{className:"next-arrow slick-arrow ",onClick:i,children:(0,d.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5304 10.6434C16.2796 9.83181 17.5449 9.7812 18.3566 10.5304L32.9486 24L18.3566 37.4696C17.5449 38.2188 16.2796 38.1682 15.5304 37.3566C14.7812 36.5449 14.8318 35.2796 15.6434 34.5304L27.0514 24L15.6435 13.4696C14.8318 12.7204 14.7812 11.4551 15.5304 10.6434Z",fill:"#222222"})})}),h={mobileFirst:!0,slidesToShow:3,slidesToScroll:1,infinite:!1,dots:!0,adaptiveHeight:!0,arrows:!0,accessibility:!0,centerMode:!0,variableWidth:!1,initialSlide:1,appendDots:e=>(0,d.jsxs)("div",{className:"cast-talent-slider__control",children:[(0,d.jsx)(r,{}),(0,d.jsx)(m,{}),(0,d.jsx)("ul",{className:"dots",children:e})]}),responsive:[{breakpoint:576,settings:{centerMode:!0,centerPadding:"70px",slidesToShow:3,slidesToScroll:1,initialSlide:1}},{breakpoint:320,settings:{slidesToShow:1,slidesToScroll:1,initialSlide:1}}]};return(0,d.jsxs)("div",{className:"cast-talent-slider",children:[(0,d.jsxs)("h2",{className:"cast-talent-slider__heading my-4 text-center",children:["Top ",e.length," talent that match your parameters"]}),(0,d.jsx)(o.A,Object.assign({ref:a},h,{children:e.map((e,t)=>(0,d.jsx)("div",{className:"cast-talent-slider__list-wrapper",children:(0,d.jsx)(c.A,{talent:e,inviteData:n,isJobRecommendation:!0})},t))}))]})};var h=a(71929),u=a(34174),p=a(85383);const _=({id:e,classPrefix:t,description:a})=>{const i=t||"trf-dashboard",l=a||"Collaborate together on new projects",[r,o]=(0,s.use
1State)([]),c=(0,n.Zp)(),{isLoading:m,fetchData:_}=(0,h.A)();(0,s.useEffect)(()=>{(async()=>{const e=await _((0,u.e6)());e&&e.data&&o(e.data.data)})()},[]);const x=()=>{c("/manage-team")};return(0,d.jsxs)("div",{className:`trf-actions__item ${i}__item`,children:[(0,d.jsxs)("div",{className:`trf-actions__head ${i}__head`,children:[(0,d.jsx)("h3",{onClick:x,className:"trf-actions__title",children:"Invite your team"}),(0,d.jsx)("span",{className:`trf-dashboard__badge trf-dashboard__badge--blue ${i}__badge  `,children:r&&r.length>0?r.length+" member":"unlimited members"})]}),(0,d.jsx)(p.A,{loading:m,children:(0,d.jsxs)("div",{className:`trf-actions__body ${i}__body`,children:[(0,d.jsx)("p",{className:`trf-actions__desc ${i}__desc`,children:l}),(0,d.jsxs)("div",{className:`trf-actions__person ${i}__person`,children:[r.length>0&&r.map(e=>(0,d.jsx)("div",{className:`trf-actions__person-item trf-actions__person-item--team ${i}__person-item ${i}__person-item--team`,children:(0,d.jsx)("div",{className:"trf-actions__person-img ${getclassPrefix}__person-img",children:e.initials})})),(0,d.jsx)("button",{onClick:x,className:`trf-actions__person-add ${i}__person-add`,children:(0,d.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{d:"M9 1C9 0.447715 8.55228 0 8 0C7.44771 0 7 0.447715 7 1V6.99991L1 6.99991C0.447715 6.99991 0 7.44762 0 7.99991C0 8.55219 0.447715 8.99991 1 8.99991L7 8.99991V15C7 15.5523 7.44771 16 8 16C8.55228 16 9 15.5523 9 15V8.99991L15 8.99991C15.5523 8.99991 16 8.55219 16 7.99991C16 7.44762 15.5523 6.99991 15 6.99991L9 6.99991V1Z",fill:"#0C0C0C"})})})]}),(0,d.jsx)("div",{className:`trf-actions__bot ${i}__bot`,children:(0,d.jsxs)("button",{onClick:x,className:`trf-dashboard__main-cta trf-dashboard__main-cta--filled trf-dashboard__main-cta--chevron-r ${i}__main-cta ${i}__main-cta--filled ${i}__main-cta--chevron-r`,children:["manage team",(0,d.jsx)("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.528596 0.195262C0.788945 -0.0650874 1.21106 -0.0650874 1.4714 0.195262L6.80474 5.5286C7.06509 5.78895 7.06509 6.21106 6.80474 6.4714L1.4714 11.8047C1.21106 12.0651 0.788945 12.0651 0.528596 11.8047C0.268246 11.5444 0.268246 11.1223 0.528596 10.8619L5.39052 6L0.528596 1.13807C0.268246 0.877722 0.268246 0.455612 0.528596 0.195262Z",fill:"white"})})]})})]})})]})};var x=a(94829),g=a(49376),j=a(12476),b=a(10431),v=a(94656);const f=[{img:"/images/cast-talent-form/1-logo.svg",text:"Your job will be approved shortly once our team reviews it."},{img:"/images/cast-talent-form/2-logo.svg",text:"Talent matching your job brief will get notified. With over 15,000 talent, we're sure we've got what you need!"},{img:"/images/cast-talent-form/3-logo.svg",text:"Once you have applicants, view your options, shortlist, chat and book the talent you want"},{img:"/images/cast-talent-form/4-logo.svg",text:"Only pay when the job is done! Funds are held in escrow 72 hours before the job starts"}],N=()=>{const[e,t]=(0,s.useState)(!0),a=(0,s.useRef)(null),o=r.c.CDN_PATH,[c,u]=(0,s.useState)(),p=(0,n.Zp)(),N=(0,i.d4)(e=>e.userDetail.data),{id:y}=(0,n.g)(),{fetchData:w}=(0,h.A)(),A=(0,i.wA)(),[k,$]=(0,s.useState)();(0,s.useEffect)(()=>{(async()=>{t(!0);try{const e=await(0,b.f7)(y);$(e.data),t(!1)}catch(e){t(!1),console.error("Error fetching data:",e)}})()},[]),(0,s.useEffect)(()=>{(0,j.eG)();(async()=>{const e=await w((0,x.cf)(y));A((0,g.Zv)({stepsCompleted:e.data.data[0]}))})(),(async()=>{try{const e=await(0,x.h3)(y);u(e.talentList)}catch(e){console.error("Error fetching data:",e)}})()},[]);return(0,d.jsx)("div",{className:"cast-talent-content talent-submitted-form",ref:a,children:(0,d.jsxs)("div",{className:"cast-talent-form-content",children:[(0,d.jsxs)("div",{className:"job-submitted",children:[(0,d.jsx)("h2",{children:"Job submitted! What happens next?"}),(0,d.jsx)("ul",{children:f.map(e=>(0,d.jsxs)("li",{children:[(0,d.jsx)("div",{className:"job-submitted__img-wrap",children:(0,d.jsx)("img",{src:o+e.img})}),(0,d.jsx)("span",{children:e.text})]},e.img))})]}),c&&c.length>0&&(0,d.jsx)(m,{talents:c,position_id:y}),!(0,l.isEmpty)(N)&&(0,d.jsx)(_,{id:N.id,classPrefix:"trf-job-team-invite",description:"Collaborate with other team members to help you find the right candidate, allowing them to review applicants, communicate and shortlist talent."}),(0,d.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[!e&&k&&(0,d.jsx)(v.A,{myJobDetail:k,classes:"cast-talent-form-content__back"}),(0,d.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",onClick:()=>{p("/projects")},children:"go to my jobs"})]})]})})}},59118(e,t,a){a.d(t,{A:()=>i});var s=a(40364),n=a(74848);const i=()=>{const e=s.c.CDN_PATH;return(0,n.jsxs)("div",{className:"cast-talent-tips",children:[(0,n.jsxs)("div",{className:"cast-talent-tips__title",children:[(0,n.jsx)("h3",{children:"Tips"}),(0,n.jsx)("div",{className:"cast-talent-tips__img-wrapp",children:(0,n.jsx)("img",{src:`${e}/images/cast-talent-form/lamp.svg`,alt:"lamp"})})]}),(0,n.jsx)("h4",{children:"What works?"}),(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{children:[(0,n.jsx)("i",{className:"fa fa-check"}),(0,n.jsx)("span",{children:"Clear wording, your headline will be the job title, the very first thing a talent sees!"})]}),(0,n.jsxs)("li",{children:[(0,n.jsx)("i",{className:"fa fa-check"}),(0,n.jsx)("span",{children:"Being specific about what talent will do in your job"})]})]}),(0,n.jsx)("h4",{children:"What doesn't work?"}),(0,n.jsx)("ul",{children:(0,n.jsxs)("li",{children:[(0,n.jsx)("i",{className:"fas fa-times"}),(0,n.jsx)("span",{children:"Generic wording leaves talent unsure what they\u2019re applying for"})]})}),(0,n.jsx)("h4",{children:"Example"}),(0,n.jsx)("span",{children:"\u201cMummy influencer with kids under 5 for Instagram promotion\u201d"})]})}},35241(e,t,a){a.d(t,{A:()=>
1o});var s=a(96540),n=a(40364),i=a(10431),l=a(95352),r=a(74848);const o=({talent:e,inviteData:t,isJobRecommendation:a})=>{var o;const[c,d]=(0,s.useState)(!1),[m,h]=(0,s.useState)(!1),u=n.c.CDN_PATH;return(0,r.jsx)("div",{className:"talent-recommendation__talent "+(a?"talent-recommendation__isJobRecommendation":""),children:(0,r.jsxs)("div",{className:"talent-recommendation__talent__inner w-100",children:[(0,r.jsxs)("div",{className:"talent-recommendation__talent__image d-flex justify-content-center align-items-start",children:[(0,r.jsx)("a",{href:`/talent/${null==e?void 0:e.slug}`,target:"_blank",children:(0,r.jsx)("img",{src:null==e||null==(o=e.avatar_image)?void 0:o.replace("-local",""),alt:null==e?void 0:e.display_name,title:null==e?void 0:e.display_name})}),(0,r.jsx)(l.A,{talent_id:e.id})]}),(0,r.jsxs)("div",{className:"talent-recommendation__talent__details__space",children:[(0,r.jsx)("div",{className:"talent-recommendation__talent__name",children:(0,r.jsx)("a",{href:`/talent/${null==e?void 0:e.slug}`,target:"_blank",children:null!=e&&e.display_name?null==e?void 0:e.display_name:"Talent"})}),null!=e&&e.avg_rating||null!=e&&e.no_of_job_booked?(0,r.jsxs)("div",{className:"talent-recommendation__talent__rating",children:[(0,r.jsx)("img",{src:`${u}/images/icons/talent-profile/star.svg`,width:"16",height:"16",className:"talent-recommendation__talent__icon"}),(0,r.jsxs)("span",{children:[e.avg_rating.toFixed(1)," (",null==e?void 0:e.no_of_job_booked," jobs completed)"]})]}):null,(0,r.jsxs)("div",{className:"talent-recommendation__talent__location",children:[(0,r.jsx)("img",{src:`${u}/images/icons/talent-profile/location.svg`,width:"16",height:"16",className:"talent-recommendation__talent__icon"}),e.state&&e.country?(0,r.jsx)("span",{children:e.state+", "+e.country}):(0,r.jsx)("span",{children:"None Selected"})]}),e&&e.professions&&e.professions.length?(0,r.jsxs)("div",{className:"talent-recommendation__talent__profession",children:[(0,r.jsx)("img",{src:`${u}/images/icons/talent-profile/profile.svg`,width:"16",height:"16",className:"talent-recommendation__talent__icon"}),(0,r.jsx)("span",{children:e.professions.join(", ")})]}):null,null!=e&&e.total_followers?(0,r.jsxs)("div",{className:"talent-recommendation__talent__followers",children:[(0,r.jsx)("img",{src:`${u}/images/icons/talent-profile/instagram.svg`,width:"16",height:"16",className:"talent-recommendation__talent__icon"}),(0,r.jsxs)("span",{children:[null==e?void 0:e.total_followers," Followers"]})]}):null]}),!e.is_applied&&(0,r.jsxs)("div",{className:"talent-recommendation__talent__cta d-flex justify-content-center align-items-center "+(null!=e&&e.is_invited||m?"invited":""),onClick:()=>{if(!e.is_invited&&!m){d(!0);(async()=>{try{await(0,i.Ug)(e.id,t),h(!0)}catch(a){console.error("Error fetching data:",a)}finally{d(!1)}})()}},children:[(0,r.jsx)("span",{className:"tick mr-1 d-inline-block",children:c?(0,r.jsx)("i",{className:"fa fa-spinner fa-pulse"}):(0,r.jsx)("img",{src:`${u}/images/icons/icon-tick1.png`,alt:"tick"})}),(0,r.jsx)("span",{className:"text ml-1 d-inline-block font-weight-bold mr-0",children:"Invite"}),null!=e&&e.is_invited||m?(0,r.jsx)("span",{className:"text d-inline-block font-weight-bold m-0",children:"d"}):null]})]})})}},95352(e,t,a){a.d(t,{A:()=>c});var s=a(71468),n=a(61409),i=a(96093),l=a(49376),r=a(13838),o=a(74848);const c=({talent_id:e,onToggle:t,variant:a,btnClass:c})=>{const d=(0,s.d4)(e=>e.userDetail.data),m=(0,s.wA)(),h=()=>!(!d.favourites||!d.favourites.includes(e)),u=()=>{try{const t=h();(0,i.Mb)(e);let a=[...d.favourites];t?a=a.filter(t=>t!==e):a.push(e),m((0,l.yS)({data:Object.assign({},d,{favourites:a})})),localStorage.removeItem("authMe"),n.oR.success(t?"Removed from favourites":"Added to favourites")}catch(t){console.error(t)}};return"button"===a?(0,o.jsx)(r.$n,{className:c,onClick:u,children:(h()?"Remove from":"Add to")+" Favourites"}):(0,o.jsx)("div",{className:"add-favourite",children:(0,o.jsx)("span",{className:"add-favourite__icon d-block "+(h()?"active":""),onClick:u,title:(h()?"Remove from":"Add to")+" Favourites"})})}},80888(e,t,a){a.d(t,{A:()=>l});var s=a(40644),n=(a(96540),a(74848));const i=["level","children"],l=e=>{let{level:t,children:a}=e,l=(0,s.A)(e,i);const r=`h${t}`;return(0,n.jsx)(r,Object.assign({},l,{children:a}))}},59186(e,t,a){a.d(t,{A:()=>s.A});var s=a(80888)},64864(e,t,a){a.d(t,{p:()=>c});var s=a(40644),n=a(96540),i=a(32485),l=a.n(i),r=a(74848);const o=["id","name","label","type","size","className","placeholder"],c=(0,n.forwardRef)((e,t)=>{let{id:a,name:n,label:i,type:c="text",size:d="medium",className:m="",placeholder:h}=e,u=(0,s.A)(e,o);return(0,r.jsx)("input",Object.assign({id:a,ref:t,name:n,type:c,"aria-label":i,placeholder:h,autoComplete:"off",className:l()(m)},u))})},25814(e,t,a){a.d(t,{A:()=>n});a(96540);var s=a(74848);const n=({errorField:e,errors:t})=>{const a=t[e];return a&&a&&Array.isArray(a)?(0,s.jsx)("div",{className:"error-message mt-2",children:a.map((e,t)=>(0,s.jsx)("p",{className:"m-0",children:e},t))}):null}},10431(e,t,a){a.d(t,{Ao:()=>c,Do:()=>D,E9:()=>x,GS:()=>$,Kb:()=>P,NT:()=>p,OH:()=>A,On:()=>d,P0:()=>w,PJ:()=>m,Px:()=>b,SF:()=>E,TE:()=>g,Ug:()=>f,ZK:()=>j,Zu:()=>F,f7:()=>l,fJ:()=>i,fn:()=>u,gj:()=>_,hR:()=>v,kN:()=>h,kY:()=>y,mh:()=>o,oD:()=>r,qP:()=>O,tk:()=>N,uo:()=>C,x4:()=>S,xo:()=>k}
1);var s=a(55029),n=a(55278);const i=(e,t,a,n=5)=>(0,s.Jt)("/position/list?page="+a+"&filter="+e+"&keyword="+t+"&limit="+n),l=e=>(0,s.Jt)(`/position/${e}/job-detail`),r=(e,t)=>e?(0,s.Jt)(`/position-details/user/${e}/${t}`):(0,s.Jt)(`/job/${t}`),o=(e,t,a)=>(0,s.bE)(`/position/${e}/cancel-job`,{reason:t,feedback:a}),c=e=>(0,s.bE)(`/position/${e}/close-job`,{}),d=e=>(0,s.bE)(`/position/${e}/unlock-applications`,{}),m=e=>(0,s.bE)(`/position/${e}/lock-applications`,{}),h=e=>(0,s.bE)(`/position/${e}/notify-pending-applicants`,{}),u=e=>{const t=(new Date).getTime();return(0,s.yJ)(`/positions/${e}/purchase-order/?${t}`,{},{responseType:"blob"})},p=(e,t)=>(0,s.Wv)(`/positions/${e}/attachments/${t}`),_=(e,t,a,n,i=12)=>(0,s.Jt)(`position/${e}/application?page=`+n+"&type="+t+"&keyword="+a+"&limit="+i),x=(e,t,a,n,i=12)=>(0,s.Jt)(`position/${e}/invitations?page=`+n+"&type="+t+"&keyword="+a+"&limit="+i),g=(e,t)=>(0,s.Jt)(`position/${e}/application-count?type=count&keyword=`+t),j=(e,t)=>(0,s.bE)(`/position/${e}/application/${t}/shortlist`,{}),b=(e,t)=>(0,s.bE)(`/position/${e}/application/${t}/decline`,{}),v=(e,t,a,n=12)=>(0,s.bE)(`position/${e}/application/export?type=`+t+"&keyword="+a+"&limit="+n,{},{responseType:"blob"}),f=(e,t)=>(0,s.bE)(`/talent/${e}/invite`,t),N=e=>(0,s.bE)("/position/"+e+"/repost",{}),y=e=>(0,s.bE)("/position/search",e),w=e=>(0,s.bE)("/campaign/search",e),A=()=>(0,s.Jt)("positions/available"),k=()=>(0,s.Jt)("campaign-invitation/list-campaign"),$=(e,t)=>(0,s.bE)(`/positions/${e}/bulk-invite`,t),C=(e,t)=>(0,s.bE)(`/campaign-invitation/campaign/${e}/bulk-invite`,t),S=(e,t,a)=>(0,s.Jt)(`/position/${e}/applicant-images?type=${t}&includeAll=${a}`),O=(e,t)=>(0,s.bE)("/talent/"+e+"/payment",t),E=(e,t)=>n.A.post("/campaign/"+e+"/favourite",t),F=(e,t)=>n.A.post("/campaign/"+e+"/unfavourite",t),P=(e,t)=>n.A.post("/campaign/"+e+"/hide",t),D=e=>{const t=new FormData;return Object.keys(e).forEach(a=>{t.append(a,e[a])}),n.A.post("/pitches/send",t,{headers:{"Content-Type":"multipart/form-data"}})}},94829(e,t,a){a.d(t,{Dc:()=>d,Dt:()=>h,EA:()=>b,Fi:()=>u,Kj:()=>g,NO:()=>r,NT:()=>o,Pz:()=>f,X6:()=>x,YT:()=>c,cf:()=>_,dE:()=>N,df:()=>A,e0:()=>y,eA:()=>j,h3:()=>m,ku:()=>l,u9:()=>w,uB:()=>p,z$:()=>v,zC:()=>i});var s=a(55029),n=a(58755);const i=e=>(0,s.Jt)(`/positions/${e}/usage`),l=(e,t)=>(0,s.yJ)(`/positions/${e}/usage`,Object.assign({},t,{usage_skipped:0})),r=e=>(0,s.Jt)(`/positions/${e}/budget`),o=(e,t)=>(0,s.yJ)(`/positions/${e}/budget`,t),c=e=>(0,s.Jt)(`/positions/${e}/preview`),d=e=>(0,s.bE)(`/positions/${e}/submit-for-approval`,{}),m=e=>(0,s.Jt)(`/positions/${e}/talent-recommendations`),h=e=>(0,n.T3)("/positions",e),u=e=>e?`/profession?profession_name=${e}`:"/profession",p=e=>`/positions/details/${e}`,_=e=>`/positions/${e}/steps`,x=(e,t)=>(0,n.cL)(`/positions/details/${t}`,e),g=(e,t)=>{const a=new FormData;return a.append("images[]",e.file,e.file.name),(0,n.T3)(`/positions/${t}/attachments`,a)},j=e=>(0,n.Wv)(`/positions/${e.id}/attachments/${e.file.id}`),b=e=>`/positions/${e}/who`,v=e=>`/positions/${e}/content-creator/who`,f=e=>`/positions/${e}/influencer/who`,N=(e,t)=>(0,n.cL)(`/positions/${t}/who`,e),y=(e,t)=>(0,n.cL)(`/positions/${t}/influencer/who`,e),w=(e,t)=>(0,n.cL)(`/positions/${t}/content-creator/who`,e),A=(e,t)=>(0,s.yJ)(`/positions/${e}/save-as-draft`,t)},96093(e,t,a){a.d(t,{$P:()=>l,Fq:()=>r,Mb:()=>i,NO:()=>n,eI:()=>c,s6:()=>o});var s=a(55029);const n=(e,t,a=12)=>(0,s.Jt)("user/favourites?page="+t+"&keyword="+e+"&limit="+a),i=e=>(0,s.bE)("/user/toggle-favourite",{profile_id:e}),l=(e,t)=>(0,s.jT)("/search",{filters:e,page:t}),r=()=>(0,s.Jt)("facets"),o=e=>(0,s.Jt)("/country/state/list?country_name="+e),c=e=>(0,s.Jt)("/creator/"+e)},12476(e,t,a){a.d(t,{Yq:()=>i,eG:()=>n,x3:()=>s});const s=e=>!(!e||!e.id),n=()=>{window.scrollTo({top:0,behavior:"smooth"})},i=e=>{if(!e)return;return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}},55868(e,t,a){a.d(t,{QX:()=>r,UB:()=>s,VI:()=>h,X9:()=>m,aU:()=>i,cr:()=>o,sM:()=>l,t$:()=>n,vQ:()=>d,wu:()=>c});const s=/^(?!.*\b(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b|[A-Za-z0-9+-]{1,}\.[A-Za-z]{1,}\b|instagram\.com\/[A-Za-z0-9_]+\b|skype:[A-Za-z0-9.?&=+-]+\b|[A-Za-z0-9.-]+\.[A-Za-z]{2,}\/[A-Za-z0-9_-]+\b|\+?[0-9\s-]{6,}\b))[\s\S]+$/,n=[{value:"0",label:"Payable on Receipt"},{value:"7",label:"7 Days"},{value:"14",label:"14 Days"},{value:"30",label:"30 Days"}],i=(e,t,a=!1)=>{let s=0,n=.2;switch(n=a&&(a.isPostAnalyzerEnabled||a.isFreeAccessEnabled||a.isAdminDiscount)?.15:.2,e){case"trf":s=t*n;break;case"gst":s=t*(n/10);break;case"total":s=t+t*n+t*(n/10)}return s.toFixed(2)},l=(e,t)=>
1window.location.pathname.replace(e,t),r=e=>e[0]===e[1],o=(e,t)=>!r([e[0],t])&&-1!==e[1].indexOf(e[0]),c=e=>{const t=e&&e.mime?e.mime:e&&e.type?e.type:null;return!(!t||!t.includes("image"))},d=e=>{const t=e.profession;return"model"===t||"actor"===t||"presenter"===t?"/cast-talent/"+e.id+"/details":"influencer"===t?"/work-with-influencer/"+e.id+"/details":"content-creator"===t?"/work-with-content-creator/"+e.id+"/details":"/creative-production/"+e.id+"/details"},m=e=>(e=Number(e))>=1e3?e>=1e6?(e/1e6).toFixed(0)+"M":(e/1e3).toFixed(0)+"K":e,h=(e,t)=>e.attributes.filter(e=>e.name===t).map(e=>e.value)}}]);

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.