1var B=Object.defineProperty,I=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var k=(l,o,t)=>o in l?B(l,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[o]=t,S=(l,o)=>{for(var t in o||(o={}))U.call(o,t)&&k(l,t,o[t]);if(V)for(var t of V(o))P.call(o,t)&&k(l,t,o[t]);return l},F=(l,o)=>I(l,L(o));import{_ as T,F as A,A as D,ar as M,B as j,C as O,S as R,E as n,G,H as g,a7 as H,r as z,ac as J,c as v,I as e,a as u,N as p,o as x,Q as b,L as m,J as C,K,O as E}from"./vendor.ca933e86.js";const Q={name:"Invite",components:{VeeForm:A,Field:D},directives:{maska:M.maska},props:{logo:{default:"",type:String}},setup(){const l=j(),o=O(),t=R(),s=n(""),i=n(!1),w=n(""),d=n(""),h=n(t.query.email),y=n(""),_=n(""),a=n(""),r=G({first:g().required().label("First Name"),last:g().required().label("Surname"),password:g().required().label("Password")});H(()=>{(!t.query.email||!t.query.token)&&o.push("/register")});function N(q){i.value=!0,s.value="",l.dispatch("ACCEPT_INVITE",F(S({},q),{email:h.value,token:t.query.token})).then(c=>{var f;if(c.data.success){o.push("artists");return}i.value=!1,s.value=(f=c.data)!=null&&f.message?c.data.message:"There was an issue with your registration, please try again later."}).catch(c=>{var f;i.value=!1,s.value=(f=c.data)!=null&&f.message?c.data.message:"There was an issue with your registration, please try again later."}).finally(()=>i.value=!1)}return{thisErrorMessage:s,loading:i,first:w,last:d,email:h,mobile:y,company:_,password:a,validationSchema:r,submit:N}}},Y={class:"bg-gray-100 min-h-screen"},W={class:"max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8"},X={class:"max-w-2xl mx-auto"},Z={class:"bg-white overflow-hidden shadow rounded-lg"},$=["onSubmit"],ee=e("div",{class:"border-b border-gray-200 px-4 py-3 sm:px-6"},[e("h2",{class:"text-2xl text-default-500"}," You've been invited to join a Estimaster ")],-1),ae={class:"px-4 py-4 sm:p-6"},oe={class:"grid grid-cols-2 gap-y-3 gap-x-3"},se={class:"text-red-500"},te={class:"text-red-500"},le=["value"],re={class:"text-red-500"},ne={class:"col-span-2"},de={class:"text-red-500"},ie={class:"col-span-2"},ce={class:"text-red-500"},ue={class:"border-t border-gray-200 px-4 py-4 sm:px-6"},pe={class:"bg-red-200 p-4 mb-4"},me={class:"flex"},fe=e("div",{class:"shrink-0"},[e("svg",{class:"h-5 w-5 text-red-400",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})])],-1),be={class:"ml-3"},he={class:"leading-5 text-red-800"},ye=["disabled"],_e={key:0,"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"spinner",class:"w-5 h-5 animate-spin mr-2",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},ge=e("path",{fill:"currentColor",d:"M296 48c0 22.091-17.909 40-40 40s-40-17.909-40-40 17.909-40 40-40 40 17.909 40 40zm-40 376c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm248-168c0-22.091-17.909-40-40-40s-40 17.909-40 40 17.909 40 40 40 40-17.909 40-40zm-416 0c0-22.091-17.909-40-40-40S8 233.909 8 256s17.909 40 40 40 40-17.909 40-40zm20.922-187.078c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40c0-22.092-17.909-40-40-40zm294.156 294.156c-22.091 0-40 17.909-40 40s17.909 40 40 40c22.092 0 40-17.909 40-40s-17.908-40-40-40zm-294.156 0c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40z"},null,-1),ve=[ge],xe={key:1};function we(l,o,t,s,i,w){const d=z("Field"),h=z("VeeForm"),y=J("maska");return x(),v("div",Y,[e("div",W,[e("div",X,[e("div",Z,[u(h,{"validation-schema":s.validationSchema,as:"div"},{default:p(({handleSubmit:_})=>[e("form",{autocomplete:"off",onSubmit:a=>_(a,s.submit)},[ee,e("div",ae,[e("div",oe,[u(d,{modelValue:s.first,"onUpdate:modelValue":o[0]||(o[0]=a=>s.first=a),type:"first",name:"first"},{default:p(({errorMessage:a,field:r})=>[e("div",null,[e("input",b(r,{type:"text",class:[[a?"border-red-500 focus:border-red-500":"border-gray-400 focus:border-gray-800"],"appearance-none block w-full px-3 py-2 border placeholder-gray-500 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-in-out leading-5"],placeholder:"First Name *"}),null,16),e("span",se,m(a),1)])]),_:1},8,["modelValue"]),u(d,{modelValue:s.last,"onUpdate:modelValue":o[1]||(o[1]=a=>s.last=a),type:"last",name:"last"},{default:p(({errorMessage:a,field:r})=>[e("div",null,[e("input",b(r,{type:"text",class:[[a?"border-red-500 focus:border-red-500":"border-gray-400 focus:border-gray-800"],"appearance-none block w-full px-3 py-2 border placeholder-gray-500 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-in-out leading-5"],placeholder:"Surname *"}),null,16),e("span",te,m(a),1)])]),_:1},8,["modelValue"]),e("input",{type:"text",class:"appearance-none block w-full px-3 py-2 border placeholder-gray-500 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-in-out leading-5 border-gray-400 focus:border-gray-800 text-gray-600",disabled:"",value:s.email},null,8,le),u(d,{modelValue:s.mobile,"onUpdate:modelValue":o[2]||(o[2]=a=>s.mobile=a),type:"mobile",name:"mobile"},{default:p(({errorMessage:a,field:r})=>[e("div",null,[C(e("input",b(r,{type:"text",class:[[a?"border-red-500 focus:border-red-500":"border-gray-400 focus:border-gray-800"],"appearance-none block w-full px-3 py-2 border placeholder-gray-500 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-in-out leading-5"],placeholder:"Mobile"}),null,16),[[y,"#### ### ###"]]),e("span",re,m(a),1)])]),_:1},8,["modelValue"]),u(d,{modelValue:s.company,"onUpdate:modelValue":o[3]||(o[3]=a=>s.company=a),type:"company",name:"company"},{default:p(({errorMessage:a,field:r})=>[e("div",ne,[e("input",b(r,{type:"text",class:[[a?"border-red-500 focus:border-red-500":"border-gray-400 focus:border-gray-800"],"appearance-none block w-full px-3 py-2 border placeholder-gray-500 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-in-out leading-5"],placeholder:"Company/Organisation Name"}),null,16),e("span",de,m(a),1)])]),_:1},8,["modelValue"]),u(d,{modelValue:s.password,"onUpdate:modelValue":o[4]||(o[4]=a=>s.password=a),type:"password",name:"password"},{default:p(({errorMessage:a,field:r})=>[e("div",ie,[e("input",b(r,{type:"password",class:[[a?"border-red-500 focus:border-red-500":"border-gray-400 focus:border-gray-800"],"appearance-none block w-full px-3 py-2 border placeholder-gray-500 focus:outline-none focus:shadow-outline-blue transition duration-150 ease-in-out leading-5"],placeholder:"Password *"}),null,16),e("span",ce,m(a),1)])]),_:1},8,["modelValue"])])]),e("div",ue,[C(e("div",pe,[e("div",me,[fe,e("div",be,[e("h3",he,m(s.thisErrorMessage),1)])])],512),[[K,s.thisErrorMessage]]),e("button",{type:"submit",class:"bg-default-500 text-white py-2 w-full hover:bg-default-600 flex items-center justify-center",disabled:s.loading},[s.loading?(x(),v("svg",_e,ve)):E("",!0),s.loading?E("",!0):(x(),v("span",xe,"Accept Invite"))],8,ye)])],40,$)]),_:1},8,["validation-schema"])])])])])}var Se=T(Q,[["render",we]]);export{Se as default};
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.