1(function(){"use strict";var t={9268:function(t,e,s){var o=s(9242),a=s(3396);function r(t,e,s,o,r,i){const n=(0,a.up)("router-view"),l=(0,a.up)("notifications");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a.Wm)(n),(0,a.Wm)(l,{position:"top right"})],64)}s(7658);var i=s(70);const n=i.ZP.create({baseURL:"https://portret.ai/api",timeout:1e4});n.interceptors.request.use((t=>{const e=localStorage.getItem("access-token");return e&&t.headers&&(t.headers["access-token"]=e),t}),(t=>Promise.reject(t))),n.interceptors.response.use((t=>{const e=t.headers["access-token"];return e&&localStorage.setItem("access-token",e),t}),(t=>Promise.reject(t)));var l={list_prompts(){return n.get("/prompts")},new_prompt(t){return n.post("/prompts",{text:t.replace("coolperson","alexanderkozhevin")})},start_train(){return n.post("/users/set-status",{status:"in_progress"})},avatars(t){return n.get("/avatars?page="+t)},photos(){return n.get("/users/photos")},add_photo(t){return n.post("/photos/make_photo",{name:t})},check(){return n.get("/photos")},authenticate(){return n.post("/auth")},login(t,e){return n.post("/auth/login",{email:t,password:e})},register(t,e){return n.post("/auth/register",{email:t,password:e})}},c=(0,a.aZ)({name:"App",async created(){try{const t=await l.authenticate();console.log(t,"resp"),this.$store.commit("set_status",t.data.status),this.$store.commit("set_paid",t.data.paid),this.$store.commit("set_prompts",t.data.prompts),this.$store.commit("set_email",t.data.email),this.$router.push("sources")}catch(t){this.$router.push("login"),console.log(t,"error")}}}),d=s(89);const p=(0,d.Z)(c,[["render",r]]);var m=p,u=s(2483),f=s(7139),g=s.p+"img/rocket.3bcb1fcd.svg",h=s.p+"img/spin.d7e58a0a.svg";const x={class:"grad"},w={class:"pt-10 flex flex-col justify-center py-12 sm:px-6 lg:px-8"},v=(0,a._)("div",{class:"flex-row flex justify-center"},[(0,a._)("img",{class:"h-12 w-12 mylog rounded-2xl",src:g,alt:"Workflow"})],-1),_={class:"flex-row flex justify-center mt-10 text-cool"},y=(0,a._)("div",null,"/",-1),b={class:"mt-2 sm:mx-auto sm:w-full sm:max-w-md"},k={class:"py-8 px-4 shadow sm:rounded-lg sm:px-10"},$=(0,a._)("label",{for:"email",class:"block text-sm font-medium text-cool"}," Email address ",-1),j={class:"mt-1"},C=(0,a._)("label",{for:"password",class:"block text-sm font-medium text-cool"}," Password ",-1),D={class:"mt-1"},q={key:0},S=(0,a._)("label",{for:"password",class:"block text-sm font-medium text-cool"}," Repeat password ",-1),P={class:"mt-1"},O=(0,a.uE)('<div class="flex items-center justify-between"><div class="flex items-center"><input id="remember_me" name="remember_me" type="checkbox" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"><label for="remember_me" class="ml-2 block text-sm text-cool"> Remember me </label></div><div class="text-sm"><a href="#" class="font-medium text-indigo-600 hover:text-indigo-500"> Forgot your password? </a></div></div>',1),Z={key:0,class:"w-5 mr-2.5 animate-spin",src:h,alt:"Workflow"},W=(0,a._)("div",null,"Sign in",-1),U={key:0,class:"w-5 mr-2.5 animate-spin",src:h,alt:"Workflow"};function T(t,e,s,r,i,n){return(0,a.wg)(),(0,a.iD)("div",x,[(0,a._)("div",w,[v,(0,a._)("div",_,[(0,a._)("div",{onClick:e[0]||(e[0]=e=>t.type="login"),class:(0,f.C_)([{underline:"login"==t.type},"px-2 cursor-pointer"])},"Login",2),y,(0,a._)("div",{onClick:e[1]||(e[1]=e=>t.type="register"),class:(0,f.C_)([{underline:"register"==t.type},"px-2 cursor-pointer"])}," Register ",2)]),(0,a._)("div",b,[(0,a._)("div",k,[(0,a._)("form",{onSubmit:e[7]||(e[7]=(0,o.iM)((()=>{}),["prevent"])),class:"space-y-6"},[(0,a._)("div",null,[$,(0,a._)("div",j,[(0,a.wy)((0,a._)("input",{id:"email","onUpdate:modelValue":e[2]||(e[2]=e=>t.email=e),name:"email",type:"email",autocomplete:"email",required:"",class:"bg-transparent text-white appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"},null,512),[[o.nr,t.email]])])]),(0,a._)("div",null,[C,(0,a._)("div",D,[(0,a.wy)((0,a._)("input",{id:"password","onUpdate:modelValue":e[3]||(e[3]=e=>t.pwd=e),name:"password",type:"password",autocomplete:"current-password",required:"",class:"bg-transparent text-white appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"},null,512),[[o.nr,t.pwd]])])]),"register"==t.type?((0,a.wg)(),(0,a.iD)("div",q,[S,(0,a._)("div",P,[(0,a.wy)((0,a._)("input",{id:"password","onUpdate:modelValue":e[4]||(e[4]=e=>t.pwd2=e),name:"password",type:"password",autocomplete:"current-password",required:"",class:"bg-transparent text-white appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"},null,512),[[o.nr,t.pwd2]])])])):(0,a.kq)("",!0),O,(0,a._)("div",null,["login"==t.type?((0,a.wg)(),(0,a.iD)("button",{key:0,onClick:e[5]||(e[5]=(...e)=>t.signin&&t.signin(...e)),type:"submit",class:"w-full flex items-center justify-center py-2 px-4 border border-transparent roun
1ded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},[t.loading?((0,a.wg)(),(0,a.iD)("img",Z)):(0,a.kq)("",!0),W])):(0,a.kq)("",!0),"register"==t.type?((0,a.wg)(),(0,a.iD)("button",{key:1,onClick:e[6]||(e[6]=(...e)=>t.register&&t.register(...e)),type:"submit",class:"w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},[t.loading?((0,a.wg)(),(0,a.iD)("img",U)):(0,a.kq)("",!0),(0,a.Uk)(" Register ")])):(0,a.kq)("",!0)])],32)])])])])}var M=(0,a.aZ)({name:"Login",methods:{async signin(t){if(t.preventDefault(),this.$data.pwd.length<6)alert("too short password");else if(console.log("sing in"),console.log(this.$data.email),console.log(this.$data.pwd),this.$data.email&&this.$data.pwd){this.$data.loading=!0;try{const t=(await l.login(this.$data.email.toLowerCase(),this.$data.pwd)).data;console.log(t,"resp"),this.$data.loading=!1,this.$router.push("sources")}catch(e){console.log(e,"error"),alert(e?.response?.data?.message),this.$data.loading=!1}}else alert("check email or password")},async register(t){t.preventDefault();let e=this;if(console.log("register"),console.log(this.$data.email),console.log(this.$data.pwd),console.log(this.$data.pwd2),this.$data.email&&this.$data.pwd)if(this.$data.pwd==this.$data.pwd2)if(this.$data.pwd.length<6)alert("too short password");else{this.$data.loading=!0;try{const t=await l.register(this.$data.email.toLowerCase(),this.$data.pwd);console.log(t,"resp"),this.$data.loading=!1,setTimeout((()=>{console.log("router push"),e.$router.push("sources")}))}catch(s){console.log(s,"error"),alert(s?.response?.data?.message),this.$data.loading=!1}}else alert("passwords doesnt match");else alert("check email or password")}},data(){return{type:"login",loading:!1,email:"",pwd:"",pwd2:""}},components:{}});const R=(0,d.Z)(M,[["render",T]]);var A=R,L=s.p+"img/upload.3376732b.svg",z=s.p+"img/train.f45e68f9.svg",E=s.p+"img/check.54485c66.svg",F=s.p+"img/no.5c12a2db.svg";const V={class:"home flex flex-row pl-16 md:pl-[200px]"},I={class:"text-white flex-col flex p-5 md:p-10"},N=(0,a._)("div",{class:"text-[26px]"},"Source photos",-1),H={class:"flex-col flex md:flex-row mt-5 justify-start"},G={key:0,class:"max-w-[200px] max-h-[53px] bg-blue-500 my_buy justify-center transition-all flex-row flex font-line font-normal hover:bg-blue-600 text-white py-4 px-8 rounded-xl"},Y=(0,a._)("img",{class:"w-5",src:L},null,-1),K=(0,a._)("div",{class:"ml-2 text-[14px]"},"Add photos",-1),B={key:1,class:"bg-teal-500 justify-center transition-all flex-row flex font-line font-normal hover:bg-teal-600 text-white py-4 px-8 rounded-xl"},J=(0,a._)("img",{class:"w-5 animate-spin",src:h},null,-1),Q=(0,a._)("div",{class:"ml-2 text-[14px]"},"Training in progress",-1),X=[J,Q],tt={key:2,class:"bg-teal-500 justify-center transition-all flex-row flex font-line font-normal hover:bg-teal-600 text-white py-4 px-8 rounded-xl"},et=(0,a._)("img",{class:"w-5 animate-spin",src:h},null,-1),st=(0,a._)("div",{class:"ml-2 text-[14px]"},"Uploading",-1),ot=[et,st],at={key:3,class:"bg-teal-500 justify-center transition-all flex-row flex font-line font-normal hover:bg-teal-600 text-white py-4 px-8 rounded-xl"},rt=(0,a._)("div",{class:"ml-2 text-[14px]"},"Ready",-1),it=[rt],nt={key:4,class:"w-full bg-teal-500 md:ml-10 max-w-[200px] md:mt-0 mt-5 justify-center transition-all flex-row flex font-line font-normal hover:bg-teal-600 text-white py-4 px-8 rounded-xl"},lt=(0,a._)("img",{class:"w-5",src:z},null,-1),ct=["href"],dt=(0,a._)("img",{class:"w-5",src:z},null,-1),pt=(0,a._)("div",{class:"ml-2 text-[14px]"},"Start training",-1),mt=[dt,pt],ut={key:0,class:"mt-5 text-cool"},ft={key:1,class:"flex-col md:flex-row flex mt-2"},gt=(0,a.uE)('<div class="text-[14px] text-cool"><div class="font-bold text-white mb-5 mt-5"> Upload 5 high quality photos real photos containing your face. ð¸ </div><div class="flex-row flex items-center mb-3"><img class="w-5 h-5 mr-5" src="'+E+'"><div> Only one person on photo</div></div><div class="flex-row flex items-center mb-3"><img class="w-5 h-5 mr-5" src="'+E+'"><div> Photos in different places, backgrounds</div></div><div class="flex-row flex items-center mb-3"><img class="w-5 h-5 mr-5" src="'+E+'"><div> Face fit in image (not cut)</div></div><div class="flex-row flex items-center mb-3"><img class="w-5 h-5 mr-5" src="'+F+'"><div> No duplicate photos</div></div><div class="flex-row flex items-center"><img class="w-5 h-5 mr-5" src="'+F+'"><div> No effects on photo</div></div></div>',1),ht=[gt],xt={class:"flex flex-row flex-wrap justify-start mt-10"},wt=["src"];function vt(t,e,s,o,r,i){const n=(0,a.up)("Menu");return(0,a.wg)(),(0,a.iD)("div",V,[(0,a.Wm)(n,{type:"sources"}
1),(0,a._)("div",I,[N,(0,a._)("div",H,["wait_for_photos"==t.status?((0,a.wg)(),(0,a.iD)("button",G,[(0,a._)("input",{type:"file",onChange:e[0]||(e[0]=(...e)=>t.onChange&&t.onChange(...e)),id:"image_file_input",accept:"image/jpeg,image/jpg, image/png, image/heic",multiple:!0},null,32),Y,K])):(0,a.kq)("",!0),"in_progress"==t.status?((0,a.wg)(),(0,a.iD)("button",B,X)):(0,a.kq)("",!0),"uploading"==t.status?((0,a.wg)(),(0,a.iD)("button",tt,ot)):(0,a.kq)("",!0),"ready"==t.status?((0,a.wg)(),(0,a.iD)("button",at,it)):(0,a.kq)("",!0),"wait_for_photos"==t.status&&t.paid?((0,a.wg)(),(0,a.iD)("button",nt,[lt,(0,a._)("div",{onClick:e[1]||(e[1]=e=>t.start_train()),class:"ml-2 text-[14px]"},"Start training")])):(0,a.kq)("",!0),"wait_for_photos"!=t.status||t.paid?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("a",{key:5,href:t.g_link,target:"_blank",class:"max-w-[200px] mt-5 md:mt-0 bg-teal-500 md:ml-10 justify-center transition-all flex-row flex font-line font-normal hover:bg-teal-600 text-white py-4 px-8 rounded-xl"},mt,8,ct))]),"ready"==t.status?((0,a.wg)(),(0,a.iD)("div",ut,"Check avatars")):(0,a.kq)("",!0),"wait_for_photos"==t.status?((0,a.wg)(),(0,a.iD)("div",ft,ht)):(0,a.kq)("",!0),(0,a._)("div",xt,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(t.photos,((t,e)=>((0,a.wg)(),(0,a.iD)("div",{key:e,class:"p-2 my_photo_border rounded-2xl mr-2 mb-2"},[(0,a._)("img",{class:"w-[200px] rounded-2xl",src:t.fullPath},null,8,wt)])))),128))])])])}var _t=s.p+"img/photo.63e75733.svg",yt=s.p+"img/avatars.23a28409.svg",bt=s.p+"img/account.72de08fc.svg",kt=s.p+"img/upscale.3c13d5d3.svg",$t=s.p+"img/logout.a6771574.svg";const jt=t=>((0,a.dD)("data-v-00df25ee"),t=t(),(0,a.Cn)(),t),Ct={class:"text-white flex flex-col h-screen min-w-[64px] fixed left-0 top-0 w-16 md:w-[190px] md:min-w-[190px] my_menu overflow"},Dt=jt((()=>(0,a._)("div",{class:"flex-row flex justify-center pt-5"},[(0,a._)("img",{class:"h-12 w-12 mylog rounded-2xl",src:g,alt:"Workflow"})],-1))),qt=jt((()=>(0,a._)("img",{class:"h-5 w-5 md:mr-6 md:ml-3",src:_t,alt:"Workflow"},null,-1))),St=jt((()=>(0,a._)("div",{class:"font-line text-[14px] hidden md:flex"},"Photos",-1))),Pt=[qt,St],Ot=jt((()=>(0,a._)("img",{class:"h-5 w-5 md:mr-6 md:ml-3",src:yt,alt:"Workflow"},null,-1))),Zt=jt((()=>(0,a._)("div",{class:"font-line text-[14px] hidden md:flex"},"Avatars",-1))),Wt=[Ot,Zt],Ut=jt((()=>(0,a._)("img",{class:"h-5 w-5 md:mr-6 md:ml-3",src:bt,alt:"Workflow"},null,-1))),Tt=jt((()=>(0,a._)("div",{class:"font-line text-[14px] hidden md:flex"},"Account",-1))),Mt=[Ut,Tt],Rt=jt((()=>(0,a._)("img",{class:"h-5 w-5 md:mr-6 md:ml-3",src:kt,alt:"Workflow"},null,-1))),At=jt((()=>(0,a._)("div",{class:"font-line text-[14px] hidden md:flex"},"Upscale",-1))),Lt=[Rt,At],zt=jt((()=>(0,a._)("div",{class:"flex-1"},null,-1))),Et=jt((()=>(0,a._)("img",{class:"h-5 w-5 md:mr-6 md:ml-3",src:$t,alt:"Workflow"},null,-1))),Ft=jt((()=>(0,a._)("div",{class:"font-line text-[14px] hidden md:flex"},"Logout",-1))),Vt=[Et,Ft];function It(t,e,s,o,r,i){return(0,a.wg)(),(0,a.iD)("div",Ct,[Dt,(0,a._)("div",{class:(0,f.C_)(["flex-row flex items-center mt-10 justify-center md:justify-start h-10 text-cool my_active mx-3 rounded cursor-pointer",{myt:"sources"==t.type}]),onClick:e[0]||(e[0]=e=>t.nav("sources"))},Pt,2),(0,a._)("div",{class:(0,f.C_)(["flex-row flex items-center mt-2 justify-center md:justify-start h-10 text-cool my_active mx-3 rounded cursor-pointer",{myt:"avatars"==t.type}]),onClick:e[1]||(e[1]=e=>t.nav("avatars"))},Wt,2),(0,a._)("div",{class:(0,f.C_)(["flex-row flex items-center mt-2 justify-center md:justify-start h-10 text-cool my_active mx-3 rounded cursor-pointer",{myt:"account"==t.type}]),onClick:e[2]||(e[2]=e=>t.nav("account"))},Mt,2),(0,a._)("div",{class:(0,f.C_)(["flex-row flex items-center justify-center md:justify-start mt-8 h-10 opacity-70 text-cool my_active mx-3 rounded cursor-pointer",{myt:"upscale"==t.type}])},Lt,2),zt,(0,a._)("div",{onClick:e[3]||(e[3]=e=>t.logout()),class:(0,f.C_)(["flex-row mb-10 flex justify-center md:justify-start items-center mt-8 h-10 opacity-70 text-cool my_active mx-3 rounded cursor-pointer",{myt:"upscale"==t.type}])},Vt,2)])}var Nt=(0,a.aZ)({name:"menu",props:{type:String},methods:{logout(){localStorage.removeItem("access-token"),setTimeout((()=>{this.$router.push("login")}))},nav(t){this.$router.push(t)}},mounted(){}});const Ht=(0,d.Z)(Nt,[["render",It],["__scopeId","data-v-00df25ee"]]);var Gt=Ht,Yt=s(65);function Kt(t){for(var e="",s="abcdef0123456789",o=s.length,a=0;a<t;a++)e+=s.charAt(Math.floor(Math.random()*o));return e}var Bt=(0,a.aZ)({name:"HomeView",components:{Menu:Gt},data(){return{g_link:"https://buy.stripe.com/fZe3dT5hkdVs8ZqcN4"}},mounted(){let t=localStorage.getItem("location_thing");"Russia"==t&&(this.$data.g_link="https://portret.ai/ru#myprice"),l.photos().then((t=>{this.$store.commit("set_photos",t.data)}))},methods:{play(){},onChange(t){let e=this,s=t.target.files;
1console.log(s.length),[...s].forEach((t=>{console.log(t);let s=["jpg","jpeg","png","heic"],o=t.name.toLowerCase(),a=!1;s.forEach((t=>{-1!=o.indexOf(t)&&(a=!0)})),a||alert("wrong format - JPG or PNG only");var r=o.split(".")[1];let i=Kt(32)+"."+r;Object.defineProperty(t,"name",{writable:!0,value:i}),e.$store.dispatch("proxy_file",t)}))},start_train(){this.photos.length>4?(l.start_train().then((()=>{this.$store.commit("set_status","in_progress")})),console.log("start train")):alert("Upload more photos with your face")}},computed:{...(0,Yt.rn)({email:t=>t.email,status:t=>t.status,paid:t=>t.paid,photos:t=>t.photos})}});const Jt=(0,d.Z)(Bt,[["render",vt]]);var Qt=Jt,Xt=s.p+"img/left.67430985.svg",te=s.p+"img/right.60ad0339.svg",ee=s.p+"img/reload.45ff0c53.svg",se=s.p+"img/copy.ec6d4e13.svg";const oe={class:"home flex flex-row pl-16 md:pl-[200px]"},ae={class:"text-white flex-col flex p-5 md:p-10"},re=(0,a._)("div",{class:"text-[26px]"},"Avatars photos",-1),ie=(0,a._)("div",{class:"flex-col flex md:flex-row justify-start"},null,-1),ne=(0,a._)("div",null,[(0,a.Uk)("Use keyword "),(0,a._)("span",{class:"font-normal"},"coolperson")],-1),le={class:"flex-col md:flex-row flex mt-5 justify-start items-start"},ce={class:"mb-4"},de=["href"],pe=(0,a._)("img",{class:"h-7 w-7",src:Xt,alt:"Workflow"},null,-1),me=[pe],ue={class:"w-10 h-10 text-cool text-sm text-center flex-row flex justify-center items-center"},fe=(0,a._)("img",{class:"h-7 w-7",src:te,alt:"Workflow"},null,-1),ge=[fe],he=(0,a._)("img",{class:"h-7 w-7",src:ee,alt:"Workflow"},null,-1),xe=[he],we={class:"flex flex-row flex-wrap justify-start mt-10 transition-all"},ve=["src"],_e={class:"flex-row flex w-full"},ye=["download","href"],be=["onClick"],ke=(0,a._)("img",{class:"h-5 w-5",src:se,alt:"Workflow"},null,-1),$e=[ke];function je(t,e,s,r,i,n){const l=(0,a.up)("Menu");return(0,a.wg)(),(0,a.iD)("div",oe,[(0,a.Wm)(l,{type:"avatars"}),(0,a._)("div",ae,[re,ie,ne,(0,a._)("div",le,[(0,a.wy)((0,a._)("textarea",{id:"random_text","onUpdate:modelValue":e[0]||(e[0]=e=>t.text=e),placeholder:"portrait of coolperson, knights of zodiac man, white and metalic blue color reflected armor, ...",class:"placeholder:text-slate-400 text-custom_bg_1 md:w-[400px] py-3 md:h-[120px] px-6 rounded-md mr-2",type:"text"},null,512),[[o.nr,t.text]]),(0,a._)("div",null,[(0,a._)("div",ce,(0,f.zw)(t.prompts_list.length)+" prompts in queue",1),t.paid?((0,a.wg)(),(0,a.iD)("button",{key:0,onClick:e[1]||(e[1]=e=>t.training()),type:"button",class:(0,f.C_)([{"opacity-60":t.creating},"inline-flex items-center tarnsition-all px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"])}," Create task ",2)):(0,a.kq)("",!0),t.paid?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("a",{key:1,href:t.g_link,target:"_blank",type:"button",class:"inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"}," Create task ",8,de))])]),(0,a._)("div",{class:(0,f.C_)(["flex-row flex mt-5",{"opacity-50":t.loading}])},[(0,a._)("button",{onClick:e[2]||(e[2]=e=>t.paginate(-1)),class:"w-10 h-10 mr-2 flex-row flex justify-center items-center font-semibold text-sm bg-cyan-500 text-white rounded-full shadow-sm"},me),(0,a._)("div",ue,[(0,a._)("div",null,(0,f.zw)(t.page_index),1)]),(0,a._)("button",{onClick:e[3]||(e[3]=e=>t.paginate(1)),class:"w-10 h-10 ml-2 flex-row flex justify-center items-center font-semibold text-sm bg-cyan-500 text-white rounded-full shadow-sm"},ge),(0,a._)("button",{onClick:e[4]||(e[4]=e=>t.reload(1)),class:"w-10 h-10 ml-20 flex-row flex justify-center items-center font-semibold text-sm bg-teal-500 text-white rounded-full shadow-sm"},xe)],2),(0,a._)("div",we,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(t.avatars,((e,s)=>((0,a.wg)(),(0,a.iD)("div",{key:s,class:"p-2 my_photo_border rounded-2xl mr-2 mb-2"},[(0,a._)("img",{class:"w-[200px] rounded-2xl mb-2",src:e.url},null,8,ve),(0,a._)("div",_e,[(0,a._)("a",{download:e.name,target:"_blank",href:e.url,class:"underline underline-offset-2 text-cool cursor-pointer hover:text-white text-center flex-1"},"Download",8,ye),(0,a._)("div",{class:"w-10 cursor-pointer opacity-70 hover:opacity-100",onClick:s=>t.ping(e)},$e,8,be),(0,a._)("div",null,(0,f.zw)(e.sim)+" %",1)])])))),128))])])])}const Ce=s(4695);var De=(0,a.aZ)({name:"Avatar",components:{Menu:Gt},mounted(){let t=localStorage.getItem("location_thing");"Russia"==t&&(this.$data.g_link="https://portret.ai/ru#myprice"),l.list_prompts().then((t=>{this.$store.commit("set_prompts_list",t.data)})),l.avatars(1).then((t=>{console.log("avatars"),console.log(t),this.$store.commit("set_avatars",t.data)}))},data(){return{g_link:"https://buy.stripe.com/fZe3dT5hkdVs8ZqcN4",loading:!1,creating:!1,text:""}}
1,methods:{ping(t){let e=t.prompt.replace("alexanderkozhevin","coolperson");this.$notify("Prompts copied"),Ce.copyText(e,void 0,((t,e)=>{}))},reload(){this.$store.commit("set_page",1),this.$data.loading=!0,l.avatars(1).then((t=>{this.$store.commit("set_avatars",t.data),this.$data.loading=!1}))},training(){"ready"==this.status?-1!=this.$data.text.indexOf("coolperson")?(this.$data.creating=!0,l.new_prompt(this.$data.text).then((()=>{setTimeout((()=>{l.list_prompts().then((t=>{this.$store.commit("set_prompts_list",t.data)})),this.$data.creating=!1,this.$data.text=""}),2e3)}))):alert("no coolperson keyword found :/"):alert("training not finished")},paginate(t){let e=this.page_index+t;e<1&&(e=1),this.$store.commit("set_page",e),this.$data.loading=!0,l.avatars(e).then((t=>{this.$store.commit("set_avatars",t.data),this.$data.loading=!1}))}},computed:{...(0,Yt.rn)({prompts_list:t=>t.prompts_list,status:t=>t.status,paid:t=>t.paid,photos:t=>t.photos,avatars:t=>t.avatars,page_index:t=>t.page_index})}});const qe=(0,d.Z)(De,[["render",je]]);var Se=qe,Pe=s.p+"img/r2.6b210a44.svg";const Oe={class:"home flex flex-row pl-16 md:pl-[200px]"},Ze={class:"text-white flex-col flex p-5 md:p-10"},We=(0,a._)("div",{class:"text-[26px]"},"Account",-1),Ue=(0,a._)("div",{class:"flex-col flex md:flex-row justify-start"},null,-1),Te={class:"text-cool text-[16px] mt-5"},Me={key:0},Re={key:1},Ae={class:"text-cool text-[16px] mt-1"},Le={class:"text-cool text-[16px] mt-1"},ze=["href"],Ee=(0,a._)("img",{class:"w-5",src:Pe},null,-1),Fe=(0,a._)("div",{class:"ml-2 text-[14px]"},"Buy now",-1),Ve=[Ee,Fe],Ie={key:1,class:"text-[14px] text-cool mt-5"},Ne=(0,a._)("div",{class:"max-w-[500px]"}," At the moment we can't provide free tier, due huge computations costs on top GPU servers. For every user we train dedicated neural network. ",-1),He=(0,a._)("div",{class:"text-[14px] text-cool mt-5 font-medium max-w-[500px]"}," We might consider make it for free for bloggers and influencers in exchange for public link share of our service. ",-1),Ge=[Ne,He],Ye={key:2,class:"max-w-[500px]"};function Ke(t,e,s,o,r,i){const n=(0,a.up)("Menu");return(0,a.wg)(),(0,a.iD)("div",Oe,[(0,a.Wm)(n,{type:"account"}),(0,a._)("div",Ze,[We,Ue,(0,a._)("div",Te,[(0,a.Uk)(" Type : "),t.paid?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("span",Me,"Free user")),t.paid?((0,a.wg)(),(0,a.iD)("span",Re,"Paid user")):(0,a.kq)("",!0)]),(0,a._)("div",Ae," Prompts : "+(0,f.zw)(t.prompts),1),(0,a._)("div",Le," Email : "+(0,f.zw)(t.email),1),t.paid?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("a",{key:0,href:t.g_link,target:"_blank",class:"max-w-[200px] mt-5 max-h-[53px] cursor-pointer bg-blue-500 my_buy justify-center transition-all flex-row flex font-line font-normal hover:bg-blue-600 text-white py-4 px-8 rounded-xl"},Ve,8,ze)),t.paid?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",Ie,Ge)),t.paid?((0,a.wg)(),(0,a.iD)("div",Ye," Training & avatars generation might take up to 14 hours. Contact support if you have any other questions. ")):(0,a.kq)("",!0)])])}var Be=(0,a.aZ)({name:"Avatar",components:{Menu:Gt},data(){return{g_link:"https://buy.stripe.com/fZe3dT5hkdVs8ZqcN4"}},mounted(){let t=localStorage.getItem("location_thing");"Russia"==t&&(this.$data.g_link="https://portret.ai/ru#myprice"),l.avatars(1).then((t=>{console.log("avatars"),console.log(t),this.$store.commit("set_avatars",t.data)}))},methods:{},computed:{...(0,Yt.rn)({email:t=>t.email,prompts:t=>t.prompts,status:t=>t.status,paid:t=>t.paid,photos:t=>t.photos,avatars:t=>t.avatars})}});const Je=(0,d.Z)(Be,[["render",Ke]]);var Qe=Je;
1const Xe=[{path:"/login",name:"login",component:A},{path:"/sources",name:"sources",component:Qt},{path:"/avatars",name:"avatars",component:Se},{path:"/account",name:"account",component:Qe},{path:"/:pathMatch(.*)*",name:"sources",component:Qt}],ts=(0,u.p7)({history:(0,u.r5)(),routes:Xe});var es=ts;const ss="https://portret.ai/api";var os=(0,Yt.MT)({state:{status:"wait_for_photos",paid:!1,email:"",prompts_limit:0,prompts:0,list_of_uploads:[],avatars:[],photos:[],page_index:1,prompts_list:[]},getters:{},mutations:{set_prompts_list(t,e){t.prompts_list=e},set_page(t,e){t.page_index=e},set_paid(t,e){t.paid=e},set_prompts(t,e){t.prompts=e},set_email(t,e){t.email=e},set_avatars(t,e){let s=e;s.forEach((t=>{t.sim=Math.round(100*parseFloat(t.similarity))})),t.avatars=e},set_photos(t,e){t.photos=e},push_file(t,e){let s=Object.assign([],t.list_of_uploads);s.push(e),t.list_of_uploads=s},set_status(t,e){t.status=e},unshift_file(t,e){let s=Object.assign([],t.list_of_uploads.filter((t=>t!=e)));t.list_of_uploads=s,0==s.length&&(t.status="wait_for_photos")}},actions:{proxy_file({commit:t,state:e},s){let o=window.tus;o.canStoreURLs=!1,t("push_file",s.name),t("set_status","uploading");let a=ss+`/photos/uploads?name=${s.name}`,r=new o.Upload(s,{endpoint:a,retryDelays:[0,1e3,3e3,5e3],canStoreURLs:!1,chunkSize:1e6,removeFingerprintOnSuccess:!0,onError:function(t){console.log("error"),alert("Please, reload the page and try another again")},onProgress:function(t,e){let s=(t/e*100).toFixed(2);console.log(s)},onSuccess:function(o){console.log(o),console.log("success"),l.add_photo(s.name).then((()=>{t("unshift_file",s.name),e.list_of_uploads.length<=1&&setTimeout((()=>{l.photos().then((e=>{t("set_photos",e.data)}))}),5e3)}))}});r.start()}},modules:{}}),as=s(1037);const rs=s(4695);window.logsnag=new window.LogSnag({token:"311ed0e8775178932e7bd08793157321",project:"portret"}),(0,o.ri)(m).use(os).use(as.ZP).use(rs).use(es).mount("#app")}},e={};function s(o){var a=e[o];if(void 0!==a)return a.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,s),r.exports}s.m=t,function(){var t=[];s.O=function(e,o,a,r){if(!o){var i=1/0;for(d=0;d<t.length;d++){o=t[d][0],a=t[d][1],r=t[d][2];for(var n=!0,l=0;l<o.length;l++)(!1&r||i>=r)&&Object.keys(s.O).every((function(t){return s.O[t](o[l])}))?o.splice(l--,1):(n=!1,r<i&&(i=r));if(n){t.splice(d--,1);var c=a();void 0!==c&&(e=c)}}return e}r=r||0;for(var d=t.length;d>0&&t[d-1][2]>r;d--)t[d]=t[d-1];t[d]=[o,a,r]}}(),function(){s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,{a:e}),e}}(),function(){s.d=function(t,e){for(var o in e)s.o(e,o)&&!s.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})}}(),function(){s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){s.p="/dashboard/"}(),function(){var t={143:0};s.O.j=function(e){return 0===t[e]};var e=function(e,o){var a,r,i=o[0],n=o[1],l=o[2],c=0;if(i.some((function(e){return 0!==t[e]}))){for(a in n)s.o(n,a)&&(s.m[a]=n[a]);if(l)var d=l(s)}for(e&&e(o);c<i.length;c++)r=i[c],s.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return s.O(d)},o=self["webpackChunkdashboard"]=self["webpackChunkdashboard"]||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))}();var o=s.O(void 0,[998],(function(){return s(9268)}));o=s.O(o)})(); 2//# sourceMappingURL=app.4a1e62a9.js.map
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.