1"use strict";(globalThis["webpackChunkapp_telos_native"]=globalThis["webpackChunkapp_telos_native"]||[]).push([[52],{96052:(e,a,t)=>{t.r(a),t.d(a,{default:()=>C});var s=t(59835);function i(e,a,t,i,l,o){const n=(0,s.up)("sign-up-form");return(0,s.wg)(),(0,s.iD)("main",null,[(0,s.Wm)(n)])}t(40702);var l=t(86970);const o=e=>((0,s.dD)("data-v-2d0e6492"),e=e(),(0,s.Cn)(),e),n={class:"row justify-center items-center"},r={class:"col-xs-11 col-md-8 q-gutter-y-md q-pa-md"},d=o((()=>(0,s._)("img",{class:"self-center title-img",src:"statics/app-icons/back.svg"},null,-1))),u=o((()=>(0,s._)("div",{class:"text-h6 q-pl-md"},"Go back",-1))),m=[d,u],p={class:"text-h4 q-pl-md"},c={class:"column items-center q-gutter-y-md"},h={class:"text-h4 q-pl-md"},g={class:"small-margin"},b={class:"text-weight-thin small-margin"};function f(e,a,t,i,o,d){const u=(0,s.up)("q-uploader"),f=(0,s.up)("q-dialog"),v=(0,s.up)("profile-avatar"),w=(0,s.up)("q-btn"),U=(0,s.up)("q-card-section"),y=(0,s.up)("q-input"),_=(0,s.up)("q-editor"),S=(0,s.up)("q-form");return(0,s.wg)(),(0,s.iD)("div",n,[(0,s._)("div",r,[(0,s.Wm)(f,{modelValue:o.showUpload,"onUpdate:modelValue":a[0]||(a[0]=e=>o.showUpload=e)},{default:(0,s.w5)((()=>[(0,s.Wm)(u,{label:"Upload image to Imgur",url:"https://api.imgur.com/3/image",accept:".jpg, .jpeg, .png, image/*","field-name":"image",headers:[o.authHeader],onUploaded:d.imageUploaded},null,8,["headers","onUploaded"])])),_:1},8,["modelValue"]),(0,s.Wm)(S,{class:"q-gutter-y-md",onSubmit:d.onSubmit,onReset:d.onReset},{default:(0,s.w5)((()=>[(0,s._)("div",{class:"head-nav",onClick:a[1]||(a[1]=(...e)=>d.goBack&&d.goBack(...e))},m),(0,s._)("div",p,(0,l.zw)(d.headerText),1),(0,s.Wm)(U,null,{default:(0,s.w5)((()=>[(0,s._)("div",c,[(0,s.Wm)(v,{size:"200px",avatar:o.avatar,account:e.account},null,8,["avatar","account"]),(0,s._)("div",h,(0,l.zw)(e.account),1),(0,s.Wm)(w,{disable:!e.isAuthenticated,label:"Upload image",color:"primary",onClick:a[2]||(a[2]=e=>o.showUpload=!0)},null,8,["disable"])])])),_:1}),(0,s.Wm)(y,{disable:!e.isAuthenticated,counter:"",maxlength:"128",filled:"",modelValue:o.avatar,"onUpdate:modelValue":a[3]||(a[3]=e=>o.avatar=e),label:e.$t("pages.signUp.form.avatar")},null,8,["disable","modelValue","label"]),(0,s.Wm)(y,{disable:!e.isAuthenticated,counter:"",maxlength:"16",filled:"",modelValue:o.name,"onUpdate:modelValue":a[4]||(a[4]=e=>o.name=e),label:e.$t("pages.signUp.form.name"),"lazy-rules":"",rules:[a=>a&&a.length>0||e.$t("forms.errors.required")]},null,8,["disable","modelValue","label","rules"]),(0,s.Wm)(y,{disable:!e.isAuthenticated,counter:"",maxlength:"16",filled:"",modelValue:o.status,"onUpdate:modelValue":a[5]||(a[5]=e=>o.status=e),label:e.$t("pages.signUp.form.status"),"lazy-rules":"",rules:[a=>a&&a.length>0||e.$t("forms.errors.required")]},null,8,["disable","modelValue","label","rules"]),(0,s._)("div",g,[(0,s._)("p",b,(0,l.zw)(e.$t("pages.signUp.form.presentation")),1),(0,s.Wm)(_,{disable:!e.isAuthenticated,modelValue:o.bio,"onUpdate:modelValue":a[6]||(a[6]=e=>o.bio=e),"min-height":"5rem"},null,8,["disable","modelValue"])]),(0,s.Wm)(w,{disable:!e.isAuthenticated,label:e.$t("pages.signUp.form.btnSave"),type:"submit",color:"primary"},null,8,["disable","label"])])),_:1},8,["onSubmit","onReset"])])])}t(18964);var v=t(33100),w=t(46139);const U={name:"SignUpForm",components:{ProfileAvatar:w.Z},data(){return{identity:"",avatar:"",name:"",status:"",bio:"",url:"",showUpload:!1,authHeader:{name:"Authorization",value:"Client-ID b6f46df9d1da9d9"}}},computed:{...(0,v.Se)("accounts",["isAuthenticated","account"]),headerText(){return this.isAuthenticated?this.myProfile?"Edit your profile":"Setup your profile":"Login to manage your profile"},myProfile(){return this.$store.state.profiles.myProfile},presentationSanitized(){let e=this.bio;return e=e.replace(/script/gi,""),e=e.replace(/<a/gi,""),e=e.replace(/href/gi,""),e}},beforeMount:async function(){this.showIsLoading(!0);const e=await this.getProfile();void 0!==e&&(this.avatar=e.avatar,this.name=e.display_name,this.bio=e.bio,this.status=e.status),this.showIsLoading(!1)},methods:{...(0,v.nv)("profiles",["signUp","searchProfiles","getProfile"]),onSubmit(){this.doSignup()},goBack(){this.$router.go(-1)},async doSignup(){this.showIsLoading(!0);const e={display_name:this.name,bio:this.presentationSanitized,avatar:this.avatar,status:this.status};try{this.showIsLoading(!0),await this.signUp(e),this.showSuccessMsg("Submited"),await this.getProfile(),this.showIsLoading(!1),this.$router.push({name:"myProfile"})}catch(a){this.showIsLoading(!1),this.showErrorMsg(a.message)}},imageUploaded(e){const a=JSON.parse(e.xhr.response);this.avatar=a.data.link,this.showUpload=!1},onReset(){this.avatar=null,this.name=null,this.age=null}}};var y=t(11639),_=t(32074),S=t(97534),q=t(8326),V=t(63190),k=t(68879),x=t(13119),W=t(6
17699),A=t(69984),I=t.n(A);const Z=(0,y.Z)(U,[["render",f],["__scopeId","data-v-2d0e6492"]]),$=Z;I()(U,"components",{QDialog:_.Z,QUploader:S.Z,QForm:q.Z,QCardSection:V.Z,QBtn:k.Z,QInput:x.Z,QEditor:W.Z});const z={name:"SignUp",components:{SignUpForm:$}},P=(0,y.Z)(z,[["render",i]]),C=P}}]);
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.