1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5810],{55810:function(e,i,l){l.d(i,{Z:function(){return X}});var t=l(85893),n=l(50319),s=l(82013),o=l(81668),a=l(97196),r=l(1954),d=l(76786),c=l(90642),u=l(93043),v=l(21485),m=l(33034),h=l(7727),x=l(89755),p=l.n(x),f=l(41664),j=l.n(f),g=l(11163),k=l.n(g),b=l(50841),Z=l(67294),_=l(33546),y=l(39234),w=l(26338),N=l(27171),C=l(66817),R=l(8506),S=l(80044),I=l(76976),F=l(50805),P=l(38314),D=l(64154),T=l(73254),z=l(74231);let B=z.Ry({firstName:z.Z_().notRequired().default(""),lastName:z.Z_().notRequired().default(""),company:z.Z_().notRequired().default(""),position:z.Z_().notRequired().default(""),description:z.Z_().notRequired().default("").nullable(),links:z.Ry({linkedin:z.Z_().notRequired(),facebook:z.Z_().notRequired(),instagram:z.Z_().notRequired()}),image:z.Ry().required().nullable()}),E=B.cast(),q={"& label.Mui-focused":{color:"#00AB55"},"& label":{color:"#637381"},"& .MuiInput-underline:after":{borderBottomColor:"#00AB55"},"& .MuiOutlinedInput-root":{color:"white",borderRadius:"8px","& input":{color:"white"}
1,"& input:-webkit-autofill":{color:"transparent"},"& fieldset":{borderColor:"#637381"},"&:hover fieldset":{borderColor:"white",color:"#00AB55"},"&.Mui-focused fieldset":{borderColor:"#00AB55"}},"& .MuiSvgIcon-root":{color:"#637381"}};var A=(0,S.j0)({mapPropsToValues:()=>({...E}),validationSchema:B})(e=>{var i,l;let{eventId:n,speakerData:s,setIsEdit:o,...a}=e,{enqueueSnackbar:r}=(0,b.Ds)(),{user:v}=(0,N.Z)(),m=(null===(l=a.values)||void 0===l?void 0:null===(i=l.image)||void 0===i?void 0:i.url)||null,[h,x]=(0,Z.useState)(!1),[p,f]=(0,Z.useState)(!1),j=async(e,i)=>{x(!0);let l=await (0,P.c)(i.fileInfo.name,i.base64,null==v?void 0:v.jwt,i.crop).catch(e=>{x(!1),console.error(e),r("Size logo is too large, he must be less than 5Mo",{variant:"error"})});a.setFieldValue(e,l),x(!1)},g=async e=>{h||a.setFieldValue(e,null)},_=async()=>{var e,i;f(!0),await I.Z.mutate({mutation:F.Dx,variables:{eventId:n,firstName:a.values.firstName,lastName:a.values.lastName,image:null==a?void 0:null===(i=a.values)||void 0===i?void 0:null===(e=i.image)||void 0===e?void 0:e.id,description:a.values.description,company:a.values.company,position:a.values.position,facebook:a.values.facebook,linkedin:a.values.linkedin,instagram:a.values.instagram},context:{headers:{authorization:"Bearer ".concat(v.jwt)}}}).then(()=>{r("Speaker profile updated with success",{variant:"success"}),f(!1),k().push(k().asPath),o(!1)}).catch(e=>{r("You can't update your profile",{variant:"error"}),f(!0)})};return(0,Z.useEffect)(()=>{s&&a.setValues(s)},[s]),(0,t.jsx)("div",{className:"EditSpeaker",children:(0,t.jsxs)(D.GK,{children:[(0,t.jsx)(c.Z,{sx:{my:5,display:"flex",justifyContent:"flex-end","& .ball-loader":{"&-ball":{backgroundColor:"#fff"}}},children:(0,t.jsx)(u.Z,{type:"submit",variant:"contained",startIcon:(0,t.jsx)(d.Z,{}),onClick:_,style:{height:"44px",minWidth:"171px",background:"#00AB55",borderRadius:"12px",fontFamily:"Poppins",fontSize:"14px",fontWeight:500,color:"#F0F0F0"},children:(0,t.jsx)("span",{children:p?(0,t.jsx)(T.Z,{}):"Save details"})})}),(0,t.jsxs)(R.ZP,{container:!0,spacing:3,alignItems:"center",justifyContent:"center",children:[(0,t.jsx)(R.ZP,{item:!0,xs:12,md:4,children:(0,t.jsxs)(R.ZP,{container:!0,spacing:2.2,children:[(0,t.jsx)(R.ZP,{item:!0,xs:12,md:12,sx:{display:"flex",justifyContent:"center"},children:(0,t.jsx)(D.Ws,{name:"image",src:m,required:!0,htmlFor:"speakerr-card",isLoading:h,isRounded:!0,placeholder:"Upload logo",onReset:g,onUpload:j,meta:{width:400,height:400,helper:"Speaker logo 300 x 300 px"},style:{background:"transparent",width:"150px",height:"150px",margin:"0 0 20px 0"}})}),(0,t.jsx)(D.lX,{sx:q,label:"Linkedin",name:"linkedin",xs:12,md:12}),(0,t.jsx)(D.lX,{sx:q,label:"Facebook",name:"facebook",xs:12,md:12}),(0,t.jsx)(D.lX,{sx:q,label:"Instagram",name:"instagram",xs:12,md:12})]})}),(0,t.jsx)(R.ZP,{item:!0,xs:0,md:1.5}),(0,t.jsx)(R.ZP,{item:!0,xs:12,md:6.5,sx:{mt:{md:6.2,xs:0}},children:(0,t.jsxs)(R.ZP,{container:!0,rowSpacing:{xs:3,md:6},columnSpacing:5,children:[(0,t.jsx)(D.lX,{sx:q,label:"Firstname",name:"firstName",xs:12,md:6}),(0,t.jsx)(D.lX,{sx:q,label:"Last name",name:"lastName",xs:12,md:6}),(0,t.jsx)(D.lX,{sx:q,label:"Position",name:"position",xs:12,md:6}),(0,t.jsx)(D.lX,{sx:q,label:"Company",name:"company",xs:12,md:6}),(0,t.jsx)(D.lX,{sx:q,label:"About",name:"description",multiline:!0,minRows:3,maxRows:3,md:12})]})})]})]})})}),X=e=>{let{speakerData:i,event:l,isCustomOrg:x}=e,{query:f}=(0,g.useRouter)(),{user:k}=(0,N.Z)(),R=(0,g.useRouter)(),[S,I]=(0,Z.useState)(!1),[F]=(0,n.D)(w.vj),{enqueueSnackbar:P}=(0,b.Ds)();var D,T,z,B,E,q,X,O,M,J,K,L,V,W=x?null==i?void 0:null===(T=i.events)||void 0===T?void 0:T.filter(function(e){var i;return e.slug!=f.event&&(null===(i=e.organization)||void 0===i?void 0:i.slug)==f.organization}):null==i?void 0:null===(D=i.events)||void 0===D?void 0:D.filter(function(e){var i;return e.slug!=f.event||(null===(i=e.organization)||void 0===i?void 0:i.slug)!=f.organization});let U=(null==i?void 0:i.facebook)||(null==i?void 0:null===(B=i.user)||void 0===B?void 0:null===(z=B.links)||void 0===z?void 0:z.facebook),G=(null==i?void 0:i.instagram)||(null==i?void 0:null===(q=i.user)||void 0===q?void 0:null===(E=q.links)||void 0===E?void 0:E.instagram),Y=(null==i?void 0:i.linkedin)||(null==i?void 0:null===(O=i.user)||void 0===O?void 0:null===(X=O.links)||void 0===X?void 0:X.linkedin)||(null==i?void 0:null===(J=i.user)||void 0===J?void 0:null===(M=J.links)||void 0===M?void 0:M.linkedIn);return(0,t.jsxs)(c.Z,{className:"SpeakerProfile",children:[S?(0,t.jsx)(A,{eventId:null==l?void 0:l.id,speakerData:i,setIsEdit:I}):(0,t.jsxs)(t.Fragment,{children:[(null==k?void 0:k.id)===(null==i?void 0:null===(K=i.user)||void 0===K?void 0:K.id)&&(0,t.jsx)(c.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,t.jsx)(u.Z,{className:"__editbtn custom-text-selector custom-edit-my-profil-selector",startIcon:(0,t.jsx)(d.Z,{}),onClick:()=>{I(!0)},children:"Edit my details"})}),(0,t.jsxs)(c.Z,{className:"__speakerDetails",children:[(0,t.jsxs)(c.Z,{className:"__speakerDetails__preview",children:[(0,t.jsx)(c.Z,{className:"__speakerDetails__preview__image",children:(null==i?void 0:i.image)&&(0,t.jsx)(p(),{src:null==i?void 0:null===(L=i.image)||void 0===L?void 0:L.url,alt:null==i?void 0:i.firstName,width:500,height:500})}),(U||G||Y)&&(0,t.jsx)(v.Z,{className:"custom-text-selector __speakerDetails__preview__social",children:"Social links"}),(0,t.jsxs)(c.Z,{sx:{textAlign:"justify","& > *":{mx:1}},children:[U&&(0,t.jsx)(j(),{legacyBehavior:!0,href:U,children:(0,t.jsx)("a",{target:"_blank",children:(0,t.jsx)(m.Z,{title:"Facebook",children:(0,t.jsx)(h.Z,{children:(0,t.jsx)(r.JO,{icon:o.Z,width:24,height:24,color:"#1877F2"})})})})}),G&&(0,t.jsx)(j(),{legacyBehavior:!0,href:G,children:(0,t.jsx)("a",{target:"_blank",children:(0,t.jsx)(m.Z,{title:"Instagram",children:(0,t.jsx)(h.Z,{children:(0,t.jsx)(r.JO,{icon:s.Z,width:24,height:24,color:"#E02D69"})})})})}),Y&&(0,t.jsx)(j(),{legacyBehavior:!0,href:Y,children:(0,t.jsx)("a",{target:"_blank",children:(0,t.jsx)(m.Z,{title:"LinkedIn",children:(0,t.jsx)(h.Z,{children:(0,t.jsx)(r.JO,{icon:a.Z,width:24,height:24,color:"#1877F2"})})})})})]})]}),(0,t.jsxs)(c.Z,{className:"__speakerDetails__info",children:[(0,t.jsxs)(v.Z,{className:"fullname custom-text-selector custom-speaker-fullname-selector",children:[null==i?void 0:i.firstName," ",null==i?void 0:i.lastName]}),(0,t.jsxs)(v.Z,{className:"position custom-text-selector custom-speaker-detail-position-selector",children:[null==i?void 0:i.position," ",(null==i?void 0:i.company)&&"@ ".concat(null==i?void 0:i.company)]}),(0,t.jsxs)(v.Z,{component:"div",className:"about custom-text-selector custom-speaker-detail-about-selector",children:[(null==i?void 0:i.description)||(null==i?void 0:null===(V=i.user)||void 0===V?void 0:V.about),(0,t.jsx)(_.D,{rehypePlugins:[y.Z],children:(null==i?void 0:i.embedCode)||""})]}),(null==f?void 0:f.hash)&&(0,t.jsx)(u.Z,{variant:"register",sx:{width:"295px",height:"53px",borderRadius:"7px"},onClick:()=>{F({variables:{speakerId:null==f?void 0:f.id,hash:null==f?void 0:f.hash}}),R.push("/".concat(x?"c":"events","/").concat(null==f?void 0:f.organization,"/").concat(null==f?void 0:f.event,"/s
1peakers/").concat(null==f?void 0:f.id),void 0,{shallow:!0}),P("Thank you for your confirmation as a speaker",{variant:"success"})},children:"Confirm participation"})]})]})]}),(0,t.jsxs)(c.Z,{className:"__speakerTalks",children:[(0,t.jsxs)(v.Z,{className:"__speakerTalks__title",children:[i.firstName," ",i.lastName,"âs talks"]}),(null==W?void 0:W.length)>0?(0,t.jsx)(C.Z,{isDark:!0,data:W,isCustomOrg:x}):(0,t.jsxs)(c.Z,{sx:{textAlign:"center",justifyContent:"space-between"},children:[(0,t.jsx)(p(),{src:"/empty_overview_dark.png",width:200,height:150,alt:"events"}),(0,t.jsx)(v.Z,{variant:"title",component:"h2",color:"#637381",sx:{mt:2},className:"custom-text-selector custom-speaker-detail-no-events-selector",children:"No more events for this speaker"})]})]})]})}},38314:function(e,i,l){l.d(i,{c:function(){return n}});var t=l(1932);async function n(e,i,l,n){let o=await fetch("".concat(t.T5,"/organizations/events/null/uploadFile"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(l)},body:JSON.stringify({fileInfo:{alternativeText:e,caption:e,name:e},crop:n,base64:i})}),a=await o.json();if(o.ok)return a[0];throw new s({message:o.statusText,response:o,data:a})}class s extends Error{constructor({response:e,data:i}){super(null==i?void 0:i.message),Error.captureStackTrace&&Error.captureStackTrace(this,s),this.name="FetchError",this.response=e,this.data=null!=i?i:{message:message}}}},1932:function(e,i,l){l.d(i,{FT:function(){return o},Jo:function(){return n},KK:function(){return a},Kl:function(){return s},T5:function(){return t}});let t="https://api.evey.live",n=(e,i)=>{var l;return"".concat("https://venue.evey.live","/events/").concat(null==e?void 0:null===(l=e.organization)||void 0===l?void 0:l.slug,"/").concat(null==e?void 0:e.slug,"?token=").concat(null==i?void 0:i.jwt)},s=(e,i)=>{var l;let t=null==e?void 0:e.id;null==i||null===(l=i.organization)||void 0===l||l.id;let n=null==i?void 0:i.jwt;return"".concat("https://backstage.evey.live","?token=").concat(n,"&eventId=").concat(t)},o=(e,i)=>{let l=null==e?void 0:e.id,t=null==i?void 0:i.jwt;return"".concat("https://setup.evey.live","/?token=").concat(t,"&eventId=").concat(l)},a=e=>{let i=null==e?void 0:e.jwt;return"".concat("https://setup.evey.live","/?token=").concat(i,"&eventNew=true")}}}]);
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.