diff --git a/spa/vue/dist/assets/AboutView-CTufbipe.js b/spa/vue/dist/assets/AboutView-B7yELX4Y.js similarity index 95% rename from spa/vue/dist/assets/AboutView-CTufbipe.js rename to spa/vue/dist/assets/AboutView-B7yELX4Y.js index 0599c55..7cf4e8d 100644 --- a/spa/vue/dist/assets/AboutView-CTufbipe.js +++ b/spa/vue/dist/assets/AboutView-B7yELX4Y.js @@ -1 +1 @@ -import{_ as m,F as g,a as v}from"./footerB-B_sYJCD0.js";import{u as p,o,c as n,b as c,t,r as b,a as l,d as k,F as u,e as f}from"./index-BIfu7HcU.js";const $={setup(){const{t:e}=p();return{t:e}}},x={class:"container"};function F(e,r,_,a,i,d){return o(),n("div",x,[c("h1",null,t(a.t("messages.tripFreedomAdventure.name")),1),c("p",null,t(a.t("messages.tripFreedomAdventure.text")),1)])}const w=m($,[["render",F],["__scopeId","data-v-aa005713"]]),y="/assets/photo_2025-01-25_05-57-24-BwgIchq6.jpg",A={setup(){const{t:e}=p();return{t:e}},methods:{donat(){window.open("https://www.tinkoff.ru/rm/r_fFXNVwPxmH.VMEQXkfWxO/Ho4MN83486","_blank")}},components:{FTA:w}},z={class:"about"};function C(e,r,_,a,i,d){const s=b("FTA");return o(),n("div",z,[l(s),c("p",null,t(a.t("messages.aboutL.donat-request")),1),c("button",{onClick:r[0]||(r[0]=(...h)=>d.donat&&d.donat(...h)),class:"donat-coffee"},t(a.t("messages.aboutL.donat-coffee")),1),r[1]||(r[1]=c("img",{src:y,alt:"Донат QRcod",class:"QRcod"},null,-1))])}const I=m(A,[["render",C],["__scopeId","data-v-6a219422"]]),B={setup(){const{t:e}=p();return{t:e}},data(){return{loading:!0,commits:[],error:null}},mounted(){this.fetchCommits()},methods:{async fetchCommits(){try{const e=await k.get("https://api.github.com/repos/valitovgaziz/spa_/commits",{headers:{Accept:"application/vnd.github.v3+json"}});this.commits=e.data}catch(e){this.error=e.message||"Произошла неизвестная ошибка"}finally{this.loading=!1}}}},L={key:0},V={key:1},N={key:2};function D(e,r,_,a,i,d){return i.loading?(o(),n("div",L,t(a.t("messages.commits.download")),1)):i.error?(o(),n("ul",V,t(a.t("messages.commits.errorOc"))+": "+t(i.error),1)):(o(),n("ul",N,[r[0]||(r[0]=c("h2",null,"Commits",-1)),(o(!0),n(u,null,f(i.commits,s=>(o(),n("li",{key:s.sha},[c("i",null,t(s.author.login)+" "+t(s.commit.author.date.slice(0,10))+" "+t(s.commit.message),1)]))),128))]))}const H=m(B,[["render",D],["__scopeId","data-v-ab2221db"]]),Q={setup(){const{t:e}=p();return{t:e}},name:"DevelopersList",data(){return{developers:[{nickname:"valitovgaziz",name:"Валитов Газиз",profileUrl:"https://github.com/valitovgaziz"}]}}},T={class:"developers"},j={class:"title"},q={class:"developer-list"},E=["href"];function M(e,r,_,a,i,d){return o(),n("div",T,[c("h1",j,t(a.t("messages.aboutL.developers")),1),c("ul",q,[(o(!0),n(u,null,f(i.developers,s=>(o(),n("li",{key:s.name,class:"developer-item"},[c("a",{href:s.profileUrl,target:"_blank",rel:"noopener noreferrer"},t(s.nickname)+" ("+t(s.name)+") ",9,E)]))),128))])])}const O=m(Q,[["render",M],["__scopeId","data-v-948e9ec5"]]),X={__name:"AboutView",setup(e){return(r,_)=>(o(),n(u,null,[l(g),l(I),l(O),l(H),l(v)],64))}};export{X as default}; +import{_ as m,F as g,a as v}from"./footerB-DAi6c01a.js";import{u as p,o,c as n,b as c,t,r as b,a as l,d as k,F as u,e as f}from"./index-DccGIixi.js";const $={setup(){const{t:e}=p();return{t:e}}},x={class:"container"};function F(e,r,_,a,i,d){return o(),n("div",x,[c("h1",null,t(a.t("messages.tripFreedomAdventure.name")),1),c("p",null,t(a.t("messages.tripFreedomAdventure.text")),1)])}const w=m($,[["render",F],["__scopeId","data-v-aa005713"]]),y="/assets/photo_2025-01-25_05-57-24-BwgIchq6.jpg",A={setup(){const{t:e}=p();return{t:e}},methods:{donat(){window.open("https://www.tinkoff.ru/rm/r_fFXNVwPxmH.VMEQXkfWxO/Ho4MN83486","_blank")}},components:{FTA:w}},z={class:"about"};function C(e,r,_,a,i,d){const s=b("FTA");return o(),n("div",z,[l(s),c("p",null,t(a.t("messages.aboutL.donat-request")),1),c("button",{onClick:r[0]||(r[0]=(...h)=>d.donat&&d.donat(...h)),class:"donat-coffee"},t(a.t("messages.aboutL.donat-coffee")),1),r[1]||(r[1]=c("img",{src:y,alt:"Донат QRcod",class:"QRcod"},null,-1))])}const I=m(A,[["render",C],["__scopeId","data-v-6a219422"]]),B={setup(){const{t:e}=p();return{t:e}},data(){return{loading:!0,commits:[],error:null}},mounted(){this.fetchCommits()},methods:{async fetchCommits(){try{const e=await k.get("https://api.github.com/repos/valitovgaziz/spa_/commits",{headers:{Accept:"application/vnd.github.v3+json"}});this.commits=e.data}catch(e){this.error=e.message||"Произошла неизвестная ошибка"}finally{this.loading=!1}}}},L={key:0},V={key:1},N={key:2};function D(e,r,_,a,i,d){return i.loading?(o(),n("div",L,t(a.t("messages.commits.download")),1)):i.error?(o(),n("ul",V,t(a.t("messages.commits.errorOc"))+": "+t(i.error),1)):(o(),n("ul",N,[r[0]||(r[0]=c("h2",null,"Commits",-1)),(o(!0),n(u,null,f(i.commits,s=>(o(),n("li",{key:s.sha},[c("i",null,t(s.author.login)+" "+t(s.commit.author.date.slice(0,10))+" "+t(s.commit.message),1)]))),128))]))}const H=m(B,[["render",D],["__scopeId","data-v-ab2221db"]]),Q={setup(){const{t:e}=p();return{t:e}},name:"DevelopersList",data(){return{developers:[{nickname:"valitovgaziz",name:"Валитов Газиз",profileUrl:"https://github.com/valitovgaziz"}]}}},T={class:"developers"},j={class:"title"},q={class:"developer-list"},E=["href"];function M(e,r,_,a,i,d){return o(),n("div",T,[c("h1",j,t(a.t("messages.aboutL.developers")),1),c("ul",q,[(o(!0),n(u,null,f(i.developers,s=>(o(),n("li",{key:s.name,class:"developer-item"},[c("a",{href:s.profileUrl,target:"_blank",rel:"noopener noreferrer"},t(s.nickname)+" ("+t(s.name)+") ",9,E)]))),128))])])}const O=m(Q,[["render",M],["__scopeId","data-v-948e9ec5"]]),X={__name:"AboutView",setup(e){return(r,_)=>(o(),n(u,null,[l(g),l(I),l(O),l(H),l(v)],64))}};export{X as default}; diff --git a/spa/vue/dist/assets/FeetbackView-B9vw7apk.js b/spa/vue/dist/assets/FeetbackView-CXGcB7N7.js similarity index 93% rename from spa/vue/dist/assets/FeetbackView-B9vw7apk.js rename to spa/vue/dist/assets/FeetbackView-CXGcB7N7.js index 42593ee..b194da8 100644 --- a/spa/vue/dist/assets/FeetbackView-B9vw7apk.js +++ b/spa/vue/dist/assets/FeetbackView-CXGcB7N7.js @@ -1 +1 @@ -import{_ as u,F as m,a as _}from"./footerB-B_sYJCD0.js";import{u as p,d as v,o as n,c as w,b as r,t as l,w as g,v as b,F as h,e as R,a as c}from"./index-BIfu7HcU.js";const f={setup(){const{t:e}=p();return{t:e}},data(){return{reviews:[],newReview:"",showAll:!1}},computed:{displayedReviews(){return this.showAll?this.reviews:this.reviews.slice(0,5)}},mounted(){this.loadReviews()},methods:{async loadReviews(){try{const e=await v.get("https://yalarba.ru/api/reviews/reviews");this.reviews=e.data.sort((s,d)=>new Date(d.created_at)-new Date(s.created_at))}catch(e){console.error("Ошибка при загрузке отзывов:",e)}},async submitReview(){if(this.newReview.trim())try{const e=await v.post("https://yalarba.ru/api/reviews/reviews",{text:this.newReview});this.reviews.unshift(e.data),this.newReview=""}catch(e){console.error("Ошибка при отправке отзыва:",e)}},formatDate(e){return new Date(e).toLocaleString()},toggleShowAll(){this.showAll=!this.showAll}}},x={class:"reviews-container"},y={class:"add-review"},A=["placeholder"],k=["disabled"],D=["disabled"],F={class:"reviews-list"};function S(e,s,d,a,o,i){return n(),w("div",x,[r("h2",null,l(a.t("messages.reviews.h2review")),1),r("h4",null,l(a.t("messages.reviews.h4review")),1),r("div",y,[g(r("textarea",{"onUpdate:modelValue":s[0]||(s[0]=t=>o.newReview=t),placeholder:a.t("messages.reviews.textareaplaceholder"),rows:"4"},null,8,A),[[b,o.newReview]]),r("button",{onClick:s[1]||(s[1]=(...t)=>i.submitReview&&i.submitReview(...t)),disabled:!o.newReview.trim()},l(a.t("messages.reviews.button")),9,k),r("button",{onClick:s[2]||(s[2]=(...t)=>i.toggleShowAll&&i.toggleShowAll(...t)),disabled:o.reviews.length===0},l(o.showAll?a.t("messages.reviews.hide"):a.t("messages.reviews.viewAll")),9,D)]),r("div",F,[(n(!0),w(h,null,R(i.displayedReviews,t=>(n(),w("div",{key:t.id,class:"review-item"},[r("p",null,l(t.text),1),r("small",null,l(i.formatDate(t.created_at)),1)]))),128))])])}const B=u(f,[["render",S],["__scopeId","data-v-d1550644"]]),I={__name:"FeetbackView",setup(e){return(s,d)=>(n(),w(h,null,[c(m),c(B),c(_)],64))}};export{I as default}; +import{_ as u,F as m,a as _}from"./footerB-DAi6c01a.js";import{u as p,d as v,o as n,c as w,b as r,t as l,w as g,v as b,F as h,e as R,a as c}from"./index-DccGIixi.js";const f={setup(){const{t:e}=p();return{t:e}},data(){return{reviews:[],newReview:"",showAll:!1}},computed:{displayedReviews(){return this.showAll?this.reviews:this.reviews.slice(0,5)}},mounted(){this.loadReviews()},methods:{async loadReviews(){try{const e=await v.get("https://yalarba.ru/api/reviews/reviews");this.reviews=e.data.sort((s,d)=>new Date(d.created_at)-new Date(s.created_at))}catch(e){console.error("Ошибка при загрузке отзывов:",e)}},async submitReview(){if(this.newReview.trim())try{const e=await v.post("https://yalarba.ru/api/reviews/reviews",{text:this.newReview});this.reviews.unshift(e.data),this.newReview=""}catch(e){console.error("Ошибка при отправке отзыва:",e)}},formatDate(e){return new Date(e).toLocaleString()},toggleShowAll(){this.showAll=!this.showAll}}},x={class:"reviews-container"},y={class:"add-review"},A=["placeholder"],k=["disabled"],D=["disabled"],F={class:"reviews-list"};function S(e,s,d,a,o,i){return n(),w("div",x,[r("h2",null,l(a.t("messages.reviews.h2review")),1),r("h4",null,l(a.t("messages.reviews.h4review")),1),r("div",y,[g(r("textarea",{"onUpdate:modelValue":s[0]||(s[0]=t=>o.newReview=t),placeholder:a.t("messages.reviews.textareaplaceholder"),rows:"4"},null,8,A),[[b,o.newReview]]),r("button",{onClick:s[1]||(s[1]=(...t)=>i.submitReview&&i.submitReview(...t)),disabled:!o.newReview.trim()},l(a.t("messages.reviews.button")),9,k),r("button",{onClick:s[2]||(s[2]=(...t)=>i.toggleShowAll&&i.toggleShowAll(...t)),disabled:o.reviews.length===0},l(o.showAll?a.t("messages.reviews.hide"):a.t("messages.reviews.viewAll")),9,D)]),r("div",F,[(n(!0),w(h,null,R(i.displayedReviews,t=>(n(),w("div",{key:t.id,class:"review-item"},[r("p",null,l(t.text),1),r("small",null,l(i.formatDate(t.created_at)),1)]))),128))])])}const B=u(f,[["render",S],["__scopeId","data-v-d1550644"]]),I={__name:"FeetbackView",setup(e){return(s,d)=>(n(),w(h,null,[c(m),c(B),c(_)],64))}};export{I as default}; diff --git a/spa/vue/dist/assets/HomeView-D1IUYyPG.js b/spa/vue/dist/assets/HomeView-D1IUYyPG.js deleted file mode 100644 index b426393..0000000 --- a/spa/vue/dist/assets/HomeView-D1IUYyPG.js +++ /dev/null @@ -1 +0,0 @@ -import{F as a,a as r}from"./footerB-B_sYJCD0.js";import{S as o}from"./searchLine-BlO5YIbG.js";import{c as t,a as e,F as s,o as c}from"./index-BIfu7HcU.js";const f={__name:"HomeView",setup(m){return(n,p)=>(c(),t(s,null,[e(a),e(o),e(r)],64))}};export{f as default}; diff --git a/spa/vue/dist/assets/HomeView-zKlroz3N.js b/spa/vue/dist/assets/HomeView-zKlroz3N.js new file mode 100644 index 0000000..0a6c413 --- /dev/null +++ b/spa/vue/dist/assets/HomeView-zKlroz3N.js @@ -0,0 +1 @@ +import{F as a,a as r}from"./footerB-DAi6c01a.js";import{S as o}from"./searchLine-3vDx-8Ye.js";import{c as t,a as e,F as s,o as c}from"./index-DccGIixi.js";const f={__name:"HomeView",setup(m){return(n,p)=>(c(),t(s,null,[e(a),e(o),e(r)],64))}};export{f as default}; diff --git a/spa/vue/dist/assets/LogInView-BJ2czjmX.js b/spa/vue/dist/assets/LogInView-CCzg48Go.js similarity index 93% rename from spa/vue/dist/assets/LogInView-BJ2czjmX.js rename to spa/vue/dist/assets/LogInView-CCzg48Go.js index 49adbdd..39dcdde 100644 --- a/spa/vue/dist/assets/LogInView-BJ2czjmX.js +++ b/spa/vue/dist/assets/LogInView-CCzg48Go.js @@ -1 +1 @@ -import{_ as x,F as V,a as F}from"./footerB-B_sYJCD0.js";import{i as d,u as S,j as B,k as I,l as L,m as s,o as c,c as m,t as n,b as e,w as h,v as g,f as A,a as p,F as M}from"./index-BIfu7HcU.js";const R={key:0},q={key:1,class:"logout"},C={key:2,class:"login-form"},D={class:"form-group"},E={for:"email"},N=["placeholder"],U={class:"form-group"},$={for:"password"},j=["placeholder"],G={type:"submit"},H={__name:"inout",setup(v){const l=d("");d(!0);const a=d("");d(!0);const{t:r}=S(),_=B(),i=I();let t=d(!1);L(async()=>{t=!0,i.checkAuth().catch(o=>console.error("Check auth failed",o)),t=!1});async function w(){if(t=!0,!b(l.value)||!y(a.value)){alert("Пожалуйста, заполните все поля корректно."),t=!1;return}try{await i.login({email:l.value,password:a.value}),t=!1,_.push("/")}catch(o){console.error(o),alert("Неверный email или пароль. Попробуйте снова.")}}function y(o){return!(a.length===0||a.length<6)}function b(o){return!(o.length===0||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o))}function k(){t=!0,i.logout(),t=!1,_.push("/")}return(o,u)=>s(t)?(c(),m("div",R,n(s(r)("messages.load"))+" . . .",1)):s(i).isAuthenticated?(c(),m("div",q,[e("div",null,[e("p",null,"Good by "+n(s(i).user.name)+"!",1),e("button",{onClick:k},"Logout")])])):(c(),m("div",C,[e("h1",null,n(s(r)("messages.inout.login")),1),e("form",{onSubmit:A(w,["prevent"])},[e("div",D,[e("label",E,n(s(r)("messages.inout.email"))+": ",1),h(e("input",{"onUpdate:modelValue":u[0]||(u[0]=f=>l.value=f),type:"email",id:"email",required:"",placeholder:s(r)("messages.inout.email")},null,8,N),[[g,l.value,void 0,{trim:!0}]])]),e("div",U,[e("label",$,n(s(r)("messages.inout.password"))+": ",1),h(e("input",{"onUpdate:modelValue":u[1]||(u[1]=f=>a.value=f),type:"password",id:"password",required:"",placeholder:s(r)("messages.inout.password")},null,8,j),[[g,a.value,void 0,{trim:!0}]])]),e("button",G,n(s(r)("messages.inout.login")),1)],32)]))}},P=x(H,[["__scopeId","data-v-1bd59691"]]),J={__name:"LogInView",setup(v){return(l,a)=>(c(),m(M,null,[p(V),p(P),p(F)],64))}};export{J as default}; +import{_ as x,F as V,a as F}from"./footerB-DAi6c01a.js";import{i as d,u as S,j as B,k as I,l as L,m as s,o as c,c as m,t as n,b as e,w as h,v as g,f as A,a as p,F as M}from"./index-DccGIixi.js";const R={key:0},q={key:1,class:"logout"},C={key:2,class:"login-form"},D={class:"form-group"},E={for:"email"},N=["placeholder"],U={class:"form-group"},$={for:"password"},j=["placeholder"],G={type:"submit"},H={__name:"inout",setup(v){const l=d("");d(!0);const a=d("");d(!0);const{t:r}=S(),_=B(),i=I();let t=d(!1);L(async()=>{t=!0,i.checkAuth().catch(o=>console.error("Check auth failed",o)),t=!1});async function w(){if(t=!0,!b(l.value)||!y(a.value)){alert("Пожалуйста, заполните все поля корректно."),t=!1;return}try{await i.login({email:l.value,password:a.value}),t=!1,_.push("/")}catch(o){console.error(o),alert("Неверный email или пароль. Попробуйте снова.")}}function y(o){return!(a.length===0||a.length<6)}function b(o){return!(o.length===0||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o))}function k(){t=!0,i.logout(),t=!1,_.push("/")}return(o,u)=>s(t)?(c(),m("div",R,n(s(r)("messages.load"))+" . . .",1)):s(i).isAuthenticated?(c(),m("div",q,[e("div",null,[e("p",null,"Good by "+n(s(i).user.name)+"!",1),e("button",{onClick:k},"Logout")])])):(c(),m("div",C,[e("h1",null,n(s(r)("messages.inout.login")),1),e("form",{onSubmit:A(w,["prevent"])},[e("div",D,[e("label",E,n(s(r)("messages.inout.email"))+": ",1),h(e("input",{"onUpdate:modelValue":u[0]||(u[0]=f=>l.value=f),type:"email",id:"email",required:"",placeholder:s(r)("messages.inout.email")},null,8,N),[[g,l.value,void 0,{trim:!0}]])]),e("div",U,[e("label",$,n(s(r)("messages.inout.password"))+": ",1),h(e("input",{"onUpdate:modelValue":u[1]||(u[1]=f=>a.value=f),type:"password",id:"password",required:"",placeholder:s(r)("messages.inout.password")},null,8,j),[[g,a.value,void 0,{trim:!0}]])]),e("button",G,n(s(r)("messages.inout.login")),1)],32)]))}},P=x(H,[["__scopeId","data-v-1bd59691"]]),J={__name:"LogInView",setup(v){return(l,a)=>(c(),m(M,null,[p(V),p(P),p(F)],64))}};export{J as default}; diff --git a/spa/vue/dist/assets/ProfileView-DOfM9Ta9.js b/spa/vue/dist/assets/ProfileView-BuVzjMSP.js similarity index 94% rename from spa/vue/dist/assets/ProfileView-DOfM9Ta9.js rename to spa/vue/dist/assets/ProfileView-BuVzjMSP.js index 32e1cca..8651af8 100644 --- a/spa/vue/dist/assets/ProfileView-DOfM9Ta9.js +++ b/spa/vue/dist/assets/ProfileView-BuVzjMSP.js @@ -1 +1 @@ -import{_ as m,F as p,a as _}from"./footerB-B_sYJCD0.js";import{o as r,c as l,b as e,t as n,w as v,v as y,f as P,F as u,e as d,g as h,a as c}from"./index-BIfu7HcU.js";const k={name:"Profile",data(){return{user:{avatar:"https://via.placeholder.com/150",name:"Иван Иванов",email:"ivan@example.com",places:[{id:1,title:"Место 1",description:"Описание места 1",editUrl:"/edit-place/1"},{id:2,title:"Место 2",description:"Описание места 2",editUrl:"/edit-place/2"}]},searchQuery:""}},computed:{filteredPlaces(){return this.searchQuery?this.user.places.filter(o=>o.title.toLowerCase().includes(this.searchQuery.toLowerCase())):this.user.places}},methods:{editUserInfo(){alert("Редактируем информацию о пользователе...")},searchPlaces(){console.log(`Поиск мест по запросу: ${this.searchQuery}`)}}},g={class:"profile"},x={class:"profile-header"},Q=["src"],U={class:"name"},w={class:"email"},b={class:"search-form"},C={key:0,class:"search-results"},F=["href"],V={key:1,class:"places-list"},B=["href"];function I(o,s,f,N,i,a){return r(),l("div",g,[e("header",x,[e("img",{src:i.user.avatar,alt:"Avatar",class:"avatar"},null,8,Q),e("h1",U,n(i.user.name),1),e("p",w,n(i.user.email),1)]),e("button",{onClick:s[0]||(s[0]=t=>a.editUserInfo()),class:"edit-profile-btn"},"Редактировать профиль"),e("form",b,[v(e("input",{type:"text",placeholder:"Поиск...","onUpdate:modelValue":s[1]||(s[1]=t=>i.searchQuery=t)},null,512),[[y,i.searchQuery,void 0,{trim:!0}]]),e("button",{onClick:s[2]||(s[2]=P(t=>a.searchPlaces(),["prevent"]))},"Найти")]),a.filteredPlaces.length>0&&i.searchQuery!==""?(r(),l("section",C,[s[3]||(s[3]=e("h2",null,"Результаты поиска",-1)),e("ul",null,[(r(!0),l(u,null,d(a.filteredPlaces,t=>(r(),l("li",{key:t.id,class:"place-item"},[e("h3",null,[e("a",{href:t.editUrl},n(t.title),9,F)]),e("p",null,n(t.description),1)]))),128))])])):h("",!0),a.filteredPlaces.length>0?(r(),l("section",V,[s[4]||(s[4]=e("h2",null,"Места",-1)),e("ul",null,[(r(!0),l(u,null,d(a.filteredPlaces,t=>(r(),l("li",{key:t.id,class:"place-item"},[e("h3",null,[e("a",{href:t.editUrl},n(t.title),9,B)]),e("p",null,n(t.description),1)]))),128))])])):h("",!0)])}const L=m(k,[["render",I],["__scopeId","data-v-f0c15aba"]]),A={__name:"ProfileView",setup(o){return(s,f)=>(r(),l(u,null,[c(p),c(L),c(_)],64))}};export{A as default}; +import{_ as m,F as p,a as _}from"./footerB-DAi6c01a.js";import{o as r,c as l,b as e,t as n,w as v,v as y,f as P,F as u,e as d,g as h,a as c}from"./index-DccGIixi.js";const k={name:"Profile",data(){return{user:{avatar:"https://via.placeholder.com/150",name:"Иван Иванов",email:"ivan@example.com",places:[{id:1,title:"Место 1",description:"Описание места 1",editUrl:"/edit-place/1"},{id:2,title:"Место 2",description:"Описание места 2",editUrl:"/edit-place/2"}]},searchQuery:""}},computed:{filteredPlaces(){return this.searchQuery?this.user.places.filter(o=>o.title.toLowerCase().includes(this.searchQuery.toLowerCase())):this.user.places}},methods:{editUserInfo(){alert("Редактируем информацию о пользователе...")},searchPlaces(){console.log(`Поиск мест по запросу: ${this.searchQuery}`)}}},g={class:"profile"},x={class:"profile-header"},Q=["src"],U={class:"name"},w={class:"email"},b={class:"search-form"},C={key:0,class:"search-results"},F=["href"],V={key:1,class:"places-list"},B=["href"];function I(o,s,f,N,i,a){return r(),l("div",g,[e("header",x,[e("img",{src:i.user.avatar,alt:"Avatar",class:"avatar"},null,8,Q),e("h1",U,n(i.user.name),1),e("p",w,n(i.user.email),1)]),e("button",{onClick:s[0]||(s[0]=t=>a.editUserInfo()),class:"edit-profile-btn"},"Редактировать профиль"),e("form",b,[v(e("input",{type:"text",placeholder:"Поиск...","onUpdate:modelValue":s[1]||(s[1]=t=>i.searchQuery=t)},null,512),[[y,i.searchQuery,void 0,{trim:!0}]]),e("button",{onClick:s[2]||(s[2]=P(t=>a.searchPlaces(),["prevent"]))},"Найти")]),a.filteredPlaces.length>0&&i.searchQuery!==""?(r(),l("section",C,[s[3]||(s[3]=e("h2",null,"Результаты поиска",-1)),e("ul",null,[(r(!0),l(u,null,d(a.filteredPlaces,t=>(r(),l("li",{key:t.id,class:"place-item"},[e("h3",null,[e("a",{href:t.editUrl},n(t.title),9,F)]),e("p",null,n(t.description),1)]))),128))])])):h("",!0),a.filteredPlaces.length>0?(r(),l("section",V,[s[4]||(s[4]=e("h2",null,"Места",-1)),e("ul",null,[(r(!0),l(u,null,d(a.filteredPlaces,t=>(r(),l("li",{key:t.id,class:"place-item"},[e("h3",null,[e("a",{href:t.editUrl},n(t.title),9,B)]),e("p",null,n(t.description),1)]))),128))])])):h("",!0)])}const L=m(k,[["render",I],["__scopeId","data-v-f0c15aba"]]),A={__name:"ProfileView",setup(o){return(s,f)=>(r(),l(u,null,[c(p),c(L),c(_)],64))}};export{A as default}; diff --git a/spa/vue/dist/assets/RegistrationView-BgG_0HRE.js b/spa/vue/dist/assets/RegistrationView-C0Di_tAT.js similarity index 99% rename from spa/vue/dist/assets/RegistrationView-BgG_0HRE.js rename to spa/vue/dist/assets/RegistrationView-C0Di_tAT.js index e4efc04..be40a7a 100644 --- a/spa/vue/dist/assets/RegistrationView-BgG_0HRE.js +++ b/spa/vue/dist/assets/RegistrationView-C0Di_tAT.js @@ -1,4 +1,4 @@ -import{_ as Uc,F as qc,a as jc}from"./footerB-B_sYJCD0.js";import{u as $c,o as yo,c as go,b as Re,t as Gt,w as xr,v as Pr,f as Vc,a as wr,F as zc}from"./index-BIfu7HcU.js";/** +import{_ as Uc,F as qc,a as jc}from"./footerB-DAi6c01a.js";import{u as $c,o as yo,c as go,b as Re,t as Gt,w as xr,v as Pr,f as Vc,a as wr,F as zc}from"./index-DccGIixi.js";/** * @vue/compiler-sfc v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT diff --git a/spa/vue/dist/assets/RestObjectView-CgfhSbZM.js b/spa/vue/dist/assets/RestObjectView-CuQAHRrm.js similarity index 92% rename from spa/vue/dist/assets/RestObjectView-CgfhSbZM.js rename to spa/vue/dist/assets/RestObjectView-CuQAHRrm.js index a9cc9ed..407beca 100644 --- a/spa/vue/dist/assets/RestObjectView-CgfhSbZM.js +++ b/spa/vue/dist/assets/RestObjectView-CuQAHRrm.js @@ -1 +1 @@ -import{_,F as m,a as f}from"./footerB-B_sYJCD0.js";import{o as n,c as o,b as e,t as a,F as i,e as p,a as r,n as g,r as b,p as c}from"./index-BIfu7HcU.js";const k="/assets/restObject-CcS1cBol.jpg",h={name:"PlaceDetails",props:{place:Object}},x={class:"place-details"},j={class:"place-header"},v={class:"place-info"},y={class:"place-name"},B={class:"place-type"},F={class:"place-coordinates"},O={class:"place-contacts"},V={class:"place-reviews"},C={class:"place-actions"};function N(d,s,t,D,P,R){const u=b("router-link");return n(),o("div",x,[e("header",j,[s[0]||(s[0]=e("img",{src:k,alt:"Фото места",class:"place-image"},null,-1)),e("div",v,[e("h1",y,a(t.place.name),1),e("span",B,"Тип: "+a(t.place.type),1),e("span",F,"Координаты: "+a(t.place.coordinates),1)])]),e("section",O,[s[1]||(s[1]=e("h2",null,"Контакты",-1)),e("ul",null,[(n(!0),o(i,null,p(t.place.contacts,l=>(n(),o("li",{key:l.id},[e("strong",null,a(l.label)+":",1),c(" "+a(l.value),1)]))),128))])]),e("section",V,[s[4]||(s[4]=e("h2",null,"Отзывы",-1)),e("ul",null,[(n(!0),o(i,null,p(t.place.reviews,l=>(n(),o("li",{key:l.id},[e("p",null,[s[2]||(s[2]=e("strong",null,"Автор:",-1)),c(" "+a(l.author),1)]),e("p",null,[s[3]||(s[3]=e("strong",null,"Отзыв:",-1)),c(" "+a(l.text),1)])]))),128))])]),e("footer",C,[r(u,{to:`/edit/${t.place.id}`,class:"btn-edit"},{default:g(()=>s[5]||(s[5]=[c("Редактировать")])),_:1},8,["to"])])])}const w=_(h,[["render",N],["__scopeId","data-v-4f7fe9ca"]]),H={__name:"RestObjectView",setup(d){return(s,t)=>(n(),o(i,null,[r(m),r(w,{place:s.mockPlace},null,8,["place"]),r(f)],64))}};export{H as default}; +import{_,F as m,a as f}from"./footerB-DAi6c01a.js";import{o as n,c as o,b as e,t as a,F as i,e as p,a as r,n as g,r as b,p as c}from"./index-DccGIixi.js";const k="/assets/restObject-CcS1cBol.jpg",h={name:"PlaceDetails",props:{place:Object}},x={class:"place-details"},j={class:"place-header"},v={class:"place-info"},y={class:"place-name"},B={class:"place-type"},F={class:"place-coordinates"},O={class:"place-contacts"},V={class:"place-reviews"},C={class:"place-actions"};function N(d,s,t,D,P,R){const u=b("router-link");return n(),o("div",x,[e("header",j,[s[0]||(s[0]=e("img",{src:k,alt:"Фото места",class:"place-image"},null,-1)),e("div",v,[e("h1",y,a(t.place.name),1),e("span",B,"Тип: "+a(t.place.type),1),e("span",F,"Координаты: "+a(t.place.coordinates),1)])]),e("section",O,[s[1]||(s[1]=e("h2",null,"Контакты",-1)),e("ul",null,[(n(!0),o(i,null,p(t.place.contacts,l=>(n(),o("li",{key:l.id},[e("strong",null,a(l.label)+":",1),c(" "+a(l.value),1)]))),128))])]),e("section",V,[s[4]||(s[4]=e("h2",null,"Отзывы",-1)),e("ul",null,[(n(!0),o(i,null,p(t.place.reviews,l=>(n(),o("li",{key:l.id},[e("p",null,[s[2]||(s[2]=e("strong",null,"Автор:",-1)),c(" "+a(l.author),1)]),e("p",null,[s[3]||(s[3]=e("strong",null,"Отзыв:",-1)),c(" "+a(l.text),1)])]))),128))])]),e("footer",C,[r(u,{to:`/edit/${t.place.id}`,class:"btn-edit"},{default:g(()=>s[5]||(s[5]=[c("Редактировать")])),_:1},8,["to"])])])}const w=_(h,[["render",N],["__scopeId","data-v-4f7fe9ca"]]),H={__name:"RestObjectView",setup(d){return(s,t)=>(n(),o(i,null,[r(m),r(w,{place:s.mockPlace},null,8,["place"]),r(f)],64))}};export{H as default}; diff --git a/spa/vue/dist/assets/ResultsView-Czz66SUa.js b/spa/vue/dist/assets/ResultsView-C1CSY9zD.js similarity index 54% rename from spa/vue/dist/assets/ResultsView-Czz66SUa.js rename to spa/vue/dist/assets/ResultsView-C1CSY9zD.js index a85888d..a4b9d35 100644 --- a/spa/vue/dist/assets/ResultsView-Czz66SUa.js +++ b/spa/vue/dist/assets/ResultsView-C1CSY9zD.js @@ -1 +1 @@ -import{_ as o,F as n,a as c}from"./footerB-B_sYJCD0.js";import{o as t,c as r,b as _,a as e,F as l}from"./index-BIfu7HcU.js";import{S as u}from"./searchLine-BlO5YIbG.js";const m={},i={class:"results"};function f(a,s){return t(),r("div",i,s[0]||(s[0]=[_("h1",null,"Results",-1)]))}const p=o(m,[["render",f]]),h={__name:"ResultsView",setup(a){return(s,d)=>(t(),r(l,null,[e(n),e(u),e(p),e(c)],64))}};export{h as default}; +import{_ as o,F as n,a as c}from"./footerB-DAi6c01a.js";import{o as t,c as r,b as _,a as e,F as l}from"./index-DccGIixi.js";import{S as u}from"./searchLine-3vDx-8Ye.js";const m={},i={class:"results"};function f(a,s){return t(),r("div",i,s[0]||(s[0]=[_("h1",null,"Results",-1)]))}const p=o(m,[["render",f]]),h={__name:"ResultsView",setup(a){return(s,d)=>(t(),r(l,null,[e(n),e(u),e(p),e(c)],64))}};export{h as default}; diff --git a/spa/vue/dist/assets/SettingsView-C01SJVt6.js b/spa/vue/dist/assets/SettingsView-BlE1G-Ym.js similarity index 67% rename from spa/vue/dist/assets/SettingsView-C01SJVt6.js rename to spa/vue/dist/assets/SettingsView-BlE1G-Ym.js index 3c575c3..8f85c70 100644 --- a/spa/vue/dist/assets/SettingsView-C01SJVt6.js +++ b/spa/vue/dist/assets/SettingsView-BlE1G-Ym.js @@ -1 +1 @@ -import{_ as r,F as c,a as _}from"./footerB-B_sYJCD0.js";import{o as s,c as n,b as i,a as t,F as p}from"./index-BIfu7HcU.js";const m={name:"Settings"},d={class:"settings"};function l(a,e,o,f,g,F){return s(),n("div",d,e[0]||(e[0]=[i("h1",null,"Settings",-1)]))}const u=r(m,[["render",l]]),B={__name:"SettingsView",setup(a){return(e,o)=>(s(),n(p,null,[t(c),t(u),t(_)],64))}};export{B as default}; +import{_ as r,F as c,a as _}from"./footerB-DAi6c01a.js";import{o as s,c as n,b as i,a as t,F as p}from"./index-DccGIixi.js";const m={name:"Settings"},d={class:"settings"};function l(a,e,o,f,g,F){return s(),n("div",d,e[0]||(e[0]=[i("h1",null,"Settings",-1)]))}const u=r(m,[["render",l]]),B={__name:"SettingsView",setup(a){return(e,o)=>(s(),n(p,null,[t(c),t(u),t(_)],64))}};export{B as default}; diff --git a/spa/vue/dist/assets/SupportView-Hwog53I5.js b/spa/vue/dist/assets/SupportView-B_EO3gSX.js similarity index 93% rename from spa/vue/dist/assets/SupportView-Hwog53I5.js rename to spa/vue/dist/assets/SupportView-B_EO3gSX.js index 0c1301c..65d9ce1 100644 --- a/spa/vue/dist/assets/SupportView-Hwog53I5.js +++ b/spa/vue/dist/assets/SupportView-B_EO3gSX.js @@ -1 +1 @@ -import{_ as c,F as g,a as _}from"./footerB-B_sYJCD0.js";import{d as h,o,c as a,b as t,w as u,v as p,t as l,g as d,f as b,a as m,F as M}from"./index-BIfu7HcU.js";const x={data(){return{formData:{email:"",text:""},isLoading:!1,successMessage:"",errorMessage:""}},methods:{async submitForm(){this.isLoading=!0,this.successMessage="",this.errorMessage="";try{console.log(this.formData),(await h.post("https://yalarba.ru/api/support/support",this.formData)).status===201?(this.successMessage="Сообщение успешно отправлено!",this.formData.email="",this.formData.text=""):this.errorMessage="Произошла ошибка при отправке сообщения."}catch{this.errorMessage="Произошла ошибка при отправке сообщения."}finally{this.isLoading=!1}}}},D={class:"support-form"},y={class:"form-group"},v={class:"form-group"},F=["disabled"],V={key:0,class:"success-message"},w={key:1,class:"error-message"};function L(i,s,f,B,e,n){return o(),a("div",D,[s[5]||(s[5]=t("h2",null,"Техническая поддержка",-1)),t("form",{onSubmit:s[2]||(s[2]=b((...r)=>n.submitForm&&n.submitForm(...r),["prevent"]))},[t("div",y,[s[3]||(s[3]=t("label",{for:"email"},"Ваш email:",-1)),u(t("input",{type:"email",id:"email","onUpdate:modelValue":s[0]||(s[0]=r=>e.formData.email=r),required:"",placeholder:"Введите ваш email"},null,512),[[p,e.formData.email]])]),t("div",v,[s[4]||(s[4]=t("label",{for:"message"},"Сообщение:",-1)),u(t("textarea",{id:"message","onUpdate:modelValue":s[1]||(s[1]=r=>e.formData.text=r),required:"",placeholder:"Опишите вашу проблему"},null,512),[[p,e.formData.text]])]),t("button",{type:"submit",disabled:e.isLoading},l(e.isLoading?"Отправка...":"Отправить"),9,F),e.successMessage?(o(),a("p",V,l(e.successMessage),1)):d("",!0),e.errorMessage?(o(),a("p",w,l(e.errorMessage),1)):d("",!0)],32)])}const k=c(x,[["render",L],["__scopeId","data-v-ba31f826"]]),q={__name:"SupportView",setup(i){return(s,f)=>(o(),a(M,null,[m(g),m(k),m(_)],64))}};export{q as default}; +import{_ as c,F as g,a as _}from"./footerB-DAi6c01a.js";import{d as h,o,c as a,b as t,w as u,v as p,t as l,g as d,f as b,a as m,F as M}from"./index-DccGIixi.js";const x={data(){return{formData:{email:"",text:""},isLoading:!1,successMessage:"",errorMessage:""}},methods:{async submitForm(){this.isLoading=!0,this.successMessage="",this.errorMessage="";try{console.log(this.formData),(await h.post("https://yalarba.ru/api/support/support",this.formData)).status===201?(this.successMessage="Сообщение успешно отправлено!",this.formData.email="",this.formData.text=""):this.errorMessage="Произошла ошибка при отправке сообщения."}catch{this.errorMessage="Произошла ошибка при отправке сообщения."}finally{this.isLoading=!1}}}},D={class:"support-form"},y={class:"form-group"},v={class:"form-group"},F=["disabled"],V={key:0,class:"success-message"},w={key:1,class:"error-message"};function L(i,s,f,B,e,n){return o(),a("div",D,[s[5]||(s[5]=t("h2",null,"Техническая поддержка",-1)),t("form",{onSubmit:s[2]||(s[2]=b((...r)=>n.submitForm&&n.submitForm(...r),["prevent"]))},[t("div",y,[s[3]||(s[3]=t("label",{for:"email"},"Ваш email:",-1)),u(t("input",{type:"email",id:"email","onUpdate:modelValue":s[0]||(s[0]=r=>e.formData.email=r),required:"",placeholder:"Введите ваш email"},null,512),[[p,e.formData.email]])]),t("div",v,[s[4]||(s[4]=t("label",{for:"message"},"Сообщение:",-1)),u(t("textarea",{id:"message","onUpdate:modelValue":s[1]||(s[1]=r=>e.formData.text=r),required:"",placeholder:"Опишите вашу проблему"},null,512),[[p,e.formData.text]])]),t("button",{type:"submit",disabled:e.isLoading},l(e.isLoading?"Отправка...":"Отправить"),9,F),e.successMessage?(o(),a("p",V,l(e.successMessage),1)):d("",!0),e.errorMessage?(o(),a("p",w,l(e.errorMessage),1)):d("",!0)],32)])}const k=c(x,[["render",L],["__scopeId","data-v-ba31f826"]]),q={__name:"SupportView",setup(i){return(s,f)=>(o(),a(M,null,[m(g),m(k),m(_)],64))}};export{q as default}; diff --git a/spa/vue/dist/assets/YalArbaLogo300-BGWtRO6S.png b/spa/vue/dist/assets/YalArbaLogo300-BGWtRO6S.png new file mode 100644 index 0000000..979d85d Binary files /dev/null and b/spa/vue/dist/assets/YalArbaLogo300-BGWtRO6S.png differ diff --git a/spa/vue/dist/assets/footerB-B_sYJCD0.js b/spa/vue/dist/assets/footerB-DAi6c01a.js similarity index 99% rename from spa/vue/dist/assets/footerB-B_sYJCD0.js rename to spa/vue/dist/assets/footerB-DAi6c01a.js index dcc3602..aa7c933 100644 --- a/spa/vue/dist/assets/footerB-B_sYJCD0.js +++ b/spa/vue/dist/assets/footerB-DAi6c01a.js @@ -1 +1 @@ -import{o as d,c as g,b as o,q as h,u as w,k as $,r as p,a as c,n as f,p as v,t as m,s as M,F as C,e as H,g as k,i as V,l as D,w as x,x as I,y as T}from"./index-BIfu7HcU.js";const _=(t,e)=>{const n=t.__vccOpts||t;for(const[s,l]of e)n[s]=l;return n},L={name:"HamburgerMenu",props:{isMenuVisible:{type:Boolean,required:!0}}};function B(t,e,n,s,l,a){return d(),g("div",{class:"hamburger",onClick:e[0]||(e[0]=(...i)=>t.toggleMenu&&t.toggleMenu(...i))},[o("div",{class:h(["line",{"line-1":n.isMenuVisible}])},null,2),o("div",{class:h(["line",{"line-2":n.isMenuVisible}])},null,2),o("div",{class:h(["line",{"line-3":n.isMenuVisible}])},null,2)])}const y=_(L,[["render",B],["__scopeId","data-v-e4c072fc"]]),O={setup(){const{t}=w(),e=$();return{t,authStore:e}},name:"menuH",components:{HamburgerMenu:y},data(){return{isMenuVisible:!1}},mounted(){document.addEventListener("click",this.closeMenuIfClickedOutside)},beforeUnmount(){document.removeEventListener("click",this.closeMenuIfClickedOutside)},methods:{toggleMenu(){this.isMenuVisible=!this.isMenuVisible},closeMenuIfClickedOutside(t){this.$el.contains(t.target)||(this.isMenuVisible=!1)}}};function E(t,e,n,s,l,a){const i=p("HamburgerMenu"),r=p("router-link");return d(),g("div",{class:"menuH",onClick:e[7]||(e[7]=(...u)=>a.toggleMenu&&a.toggleMenu(...u))},[c(i,{isMenuVisible:l.isMenuVisible},null,8,["isMenuVisible"]),o("ul",{id:"ul-m",class:h({visible:l.isMenuVisible})},[o("li",{onClick:e[0]||(e[0]=u=>t.$refs.profile.$el.click())},[c(r,{to:"/profile",ref:"profile"},{default:f(()=>[v(m(s.t("messages.profile")),1)]),_:1},512)]),o("li",{onClick:e[1]||(e[1]=u=>t.$refs.settings.$el.click())},[c(r,{to:"/settings",ref:"settings"},{default:f(()=>[v(m(s.t("messages.settings")),1)]),_:1},512)]),o("li",{onClick:e[2]||(e[2]=u=>t.$refs.about.$el.click())},[c(r,{to:"/about",ref:"about"},{default:f(()=>[v(m(s.t("messages.about")),1)]),_:1},512)]),o("li",{onClick:e[3]||(e[3]=u=>t.$refs.support.$el.click())},[c(r,{to:"/support",ref:"support"},{default:f(()=>[v(m(s.t("messages.technicalSupport")),1)]),_:1},512)]),o("li",{onClick:e[4]||(e[4]=u=>t.$refs.feetback.$el.click())},[c(r,{to:"/feetback",ref:"feetback"},{default:f(()=>[v(m(s.t("messages.writeFeedback")),1)]),_:1},512)]),o("li",{onClick:e[5]||(e[5]=u=>t.$refs.registration.$el.click())},[c(r,{to:"/registration",ref:"registration"},{default:f(()=>[v(m(s.t("messages.registration")),1)]),_:1},512)]),o("li",{onClick:e[6]||(e[6]=u=>t.$refs.login.$el.click())},[c(r,{to:"/login",ref:"login"},{default:f(()=>[v(m(s.authStore.isAuthenticated?s.t("messages.logout"):s.t("messages.login")),1)]),_:1},512)])],2)])}const F=_(O,[["render",E],["__scopeId","data-v-d5d87da0"]]),S="/assets/logo150x150-De-v7fGb.png",Z={};function N(t,e){const n=p("router-link");return d(),M(n,{to:"/about",id:"rl-about"},{default:f(()=>e[0]||(e[0]=[o("img",{src:S,alt:"logo"},null,-1)])),_:1})}const z=_(Z,[["render",N],["__scopeId","data-v-da10bb5b"]]),A=[{code:"en",name:"English"},{code:"ru",name:"Русский"},{code:"bak",name:"Башҡорт"},{code:"tat",name:"Татар"}],U={languages:A},q={data(){return{isDropdownOpen:!1,languages:U.languages}},methods:{changeLanguage(t){this.$i18n.locale=t,this.isDropdownOpen=!1},toggleDropdown(){this.isDropdownOpen=!this.isDropdownOpen},closeDropdown(t){this.$el.contains(t.target)||(this.isDropdownOpen=!1)}},mounted(){document.addEventListener("click",this.closeDropdown)},beforeUnmount(){document.removeEventListener("click",this.closeDropdown)}},G={class:"language-selector"},P={key:0,class:"dropdown-menu"},j=["onClick"];function J(t,e,n,s,l,a){return d(),g("div",G,[o("div",{class:"lang-icon",onClick:e[0]||(e[0]=(...i)=>a.toggleDropdown&&a.toggleDropdown(...i))},[o("i",null,m(t.$i18n.locale),1)]),l.isDropdownOpen?(d(),g("div",P,[(d(!0),g(C,null,H(l.languages,i=>(d(),g("div",{key:i.code,class:"dropdown-item",onClick:r=>a.changeLanguage(i.code)},m(i.name),9,j))),128))])):k("",!0)])}const K=_(q,[["render",J],["__scopeId","data-v-f5abd657"]]),Q={name:"ThemeToggle",setup(){const t=V(!1),e=localStorage.getItem("theme");if(e)t.value=e==="dark";else{const l=window.matchMedia("(prefers-color-scheme: dark)").matches;t.value=l}const n=()=>{const l=t.value?"dark":"light";document.documentElement.setAttribute("data-theme",l),localStorage.setItem("theme",l)},s=()=>{n()};return D(()=>{n()}),{isDarkTheme:t,toggleTheme:s}}},R={class:"theme-toggle"},W={class:"theme-toggle__label"};function X(t,e,n,s,l,a){return d(),g("div",R,[o("label",W,[x(o("input",{type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=i=>s.isDarkTheme=i),onChange:e[1]||(e[1]=(...i)=>s.toggleTheme&&s.toggleTheme(...i)),class:"theme-toggle__input"},null,544),[[I,s.isDarkTheme]]),e[2]||(e[2]=o("span",{class:"theme-toggle__slider"},null,-1))])])}const Y=_(Q,[["render",X],["__scopeId","data-v-0d1e5383"]]),ee={components:{MenuH:F,LogoH:z,Lang:K,DarkThemeToggleI:Y},name:"headerM"},te={class:"header"};function ne(t,e,n,s,l,a){const i=p("LogoH"),r=p("DarkThemeToggleI"),u=p("Lang"),b=p("MenuH");return d(),g("div",te,[c(i),c(r),c(u),c(b)])}const ve=_(ee,[["render",ne],["__scopeId","data-v-681057a5"]]),se={name:"MenuIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},oe=["aria-hidden","aria-label"],ie=["fill","width","height"],le={d:"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"},ae={key:0};function re(t,e,n,s,l,a){return d(),g("span",T(t.$attrs,{"aria-hidden":n.title?null:"true","aria-label":n.title,class:"material-design-icon menu-icon",role:"img",onClick:e[0]||(e[0]=i=>t.$emit("click",i))}),[(d(),g("svg",{fill:n.fillColor,class:"material-design-icon__svg",width:n.size,height:n.size,viewBox:"0 0 24 24"},[o("path",le,[n.title?(d(),g("title",ae,m(n.title),1)):k("",!0)])],8,ie))],16,oe)}const ce=_(se,[["render",re]]),de="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23e8eaed'%3e%3cpath%20d='m313-440%20224%20224-57%2056-320-320%20320-320%2057%2056-224%20224h487v80H313Z'/%3e%3c/svg%3e",ge="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23e8eaed'%3e%3cpath%20d='M240-200h120v-240h240v240h120v-360L480-740%20240-560v360Zm-80%2080v-480l320-240%20320%20240v480H520v-240h-80v240H160Zm320-350Z'/%3e%3c/svg%3e",ue="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23e8eaed'%3e%3cpath%20d='M647-440H160v-80h487L423-744l57-56%20320%20320-320%20320-57-56%20224-224Z'/%3e%3c/svg%3e",me={components:{MenuIcon:ce},name:"footerB",methods:{goBack(){this.$router.go(-1)},goForward(){this.$router.go(1)}}},fe={class:"footer"};function pe(t,e,n,s,l,a){const i=p("router-link");return d(),g("div",fe,[o("div",{class:"navigation",onClick:e[0]||(e[0]=(...r)=>a.goBack&&a.goBack(...r))},e[2]||(e[2]=[o("img",{src:de,alt:"back"},null,-1)])),c(i,{to:"/",class:"navigation"},{default:f(()=>e[3]||(e[3]=[o("img",{src:ge,alt:"home"},null,-1)])),_:1}),o("div",{class:"navigation",onClick:e[1]||(e[1]=(...r)=>a.goForward&&a.goForward(...r))},e[4]||(e[4]=[o("img",{src:ue,alt:"forward"},null,-1)]))])}const he=_(me,[["render",pe],["__scopeId","data-v-0fdbac37"]]);export{ve as F,_,he as a}; +import{o as d,c as g,b as o,q as h,u as w,k as $,r as p,a as c,n as f,p as v,t as m,s as M,F as C,e as H,g as k,i as V,l as D,w as x,x as I,y as T}from"./index-DccGIixi.js";const _=(t,e)=>{const n=t.__vccOpts||t;for(const[s,l]of e)n[s]=l;return n},L={name:"HamburgerMenu",props:{isMenuVisible:{type:Boolean,required:!0}}};function B(t,e,n,s,l,a){return d(),g("div",{class:"hamburger",onClick:e[0]||(e[0]=(...i)=>t.toggleMenu&&t.toggleMenu(...i))},[o("div",{class:h(["line",{"line-1":n.isMenuVisible}])},null,2),o("div",{class:h(["line",{"line-2":n.isMenuVisible}])},null,2),o("div",{class:h(["line",{"line-3":n.isMenuVisible}])},null,2)])}const y=_(L,[["render",B],["__scopeId","data-v-e4c072fc"]]),O={setup(){const{t}=w(),e=$();return{t,authStore:e}},name:"menuH",components:{HamburgerMenu:y},data(){return{isMenuVisible:!1}},mounted(){document.addEventListener("click",this.closeMenuIfClickedOutside)},beforeUnmount(){document.removeEventListener("click",this.closeMenuIfClickedOutside)},methods:{toggleMenu(){this.isMenuVisible=!this.isMenuVisible},closeMenuIfClickedOutside(t){this.$el.contains(t.target)||(this.isMenuVisible=!1)}}};function E(t,e,n,s,l,a){const i=p("HamburgerMenu"),r=p("router-link");return d(),g("div",{class:"menuH",onClick:e[7]||(e[7]=(...u)=>a.toggleMenu&&a.toggleMenu(...u))},[c(i,{isMenuVisible:l.isMenuVisible},null,8,["isMenuVisible"]),o("ul",{id:"ul-m",class:h({visible:l.isMenuVisible})},[o("li",{onClick:e[0]||(e[0]=u=>t.$refs.profile.$el.click())},[c(r,{to:"/profile",ref:"profile"},{default:f(()=>[v(m(s.t("messages.profile")),1)]),_:1},512)]),o("li",{onClick:e[1]||(e[1]=u=>t.$refs.settings.$el.click())},[c(r,{to:"/settings",ref:"settings"},{default:f(()=>[v(m(s.t("messages.settings")),1)]),_:1},512)]),o("li",{onClick:e[2]||(e[2]=u=>t.$refs.about.$el.click())},[c(r,{to:"/about",ref:"about"},{default:f(()=>[v(m(s.t("messages.about")),1)]),_:1},512)]),o("li",{onClick:e[3]||(e[3]=u=>t.$refs.support.$el.click())},[c(r,{to:"/support",ref:"support"},{default:f(()=>[v(m(s.t("messages.technicalSupport")),1)]),_:1},512)]),o("li",{onClick:e[4]||(e[4]=u=>t.$refs.feetback.$el.click())},[c(r,{to:"/feetback",ref:"feetback"},{default:f(()=>[v(m(s.t("messages.writeFeedback")),1)]),_:1},512)]),o("li",{onClick:e[5]||(e[5]=u=>t.$refs.registration.$el.click())},[c(r,{to:"/registration",ref:"registration"},{default:f(()=>[v(m(s.t("messages.registration")),1)]),_:1},512)]),o("li",{onClick:e[6]||(e[6]=u=>t.$refs.login.$el.click())},[c(r,{to:"/login",ref:"login"},{default:f(()=>[v(m(s.authStore.isAuthenticated?s.t("messages.logout"):s.t("messages.login")),1)]),_:1},512)])],2)])}const F=_(O,[["render",E],["__scopeId","data-v-d5d87da0"]]),S="/assets/logo150x150-De-v7fGb.png",Z={};function N(t,e){const n=p("router-link");return d(),M(n,{to:"/about",id:"rl-about"},{default:f(()=>e[0]||(e[0]=[o("img",{src:S,alt:"logo"},null,-1)])),_:1})}const z=_(Z,[["render",N],["__scopeId","data-v-da10bb5b"]]),A=[{code:"en",name:"English"},{code:"ru",name:"Русский"},{code:"bak",name:"Башҡорт"},{code:"tat",name:"Татар"}],U={languages:A},q={data(){return{isDropdownOpen:!1,languages:U.languages}},methods:{changeLanguage(t){this.$i18n.locale=t,this.isDropdownOpen=!1},toggleDropdown(){this.isDropdownOpen=!this.isDropdownOpen},closeDropdown(t){this.$el.contains(t.target)||(this.isDropdownOpen=!1)}},mounted(){document.addEventListener("click",this.closeDropdown)},beforeUnmount(){document.removeEventListener("click",this.closeDropdown)}},G={class:"language-selector"},P={key:0,class:"dropdown-menu"},j=["onClick"];function J(t,e,n,s,l,a){return d(),g("div",G,[o("div",{class:"lang-icon",onClick:e[0]||(e[0]=(...i)=>a.toggleDropdown&&a.toggleDropdown(...i))},[o("i",null,m(t.$i18n.locale),1)]),l.isDropdownOpen?(d(),g("div",P,[(d(!0),g(C,null,H(l.languages,i=>(d(),g("div",{key:i.code,class:"dropdown-item",onClick:r=>a.changeLanguage(i.code)},m(i.name),9,j))),128))])):k("",!0)])}const K=_(q,[["render",J],["__scopeId","data-v-f5abd657"]]),Q={name:"ThemeToggle",setup(){const t=V(!1),e=localStorage.getItem("theme");if(e)t.value=e==="dark";else{const l=window.matchMedia("(prefers-color-scheme: dark)").matches;t.value=l}const n=()=>{const l=t.value?"dark":"light";document.documentElement.setAttribute("data-theme",l),localStorage.setItem("theme",l)},s=()=>{n()};return D(()=>{n()}),{isDarkTheme:t,toggleTheme:s}}},R={class:"theme-toggle"},W={class:"theme-toggle__label"};function X(t,e,n,s,l,a){return d(),g("div",R,[o("label",W,[x(o("input",{type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=i=>s.isDarkTheme=i),onChange:e[1]||(e[1]=(...i)=>s.toggleTheme&&s.toggleTheme(...i)),class:"theme-toggle__input"},null,544),[[I,s.isDarkTheme]]),e[2]||(e[2]=o("span",{class:"theme-toggle__slider"},null,-1))])])}const Y=_(Q,[["render",X],["__scopeId","data-v-0d1e5383"]]),ee={components:{MenuH:F,LogoH:z,Lang:K,DarkThemeToggleI:Y},name:"headerM"},te={class:"header"};function ne(t,e,n,s,l,a){const i=p("LogoH"),r=p("DarkThemeToggleI"),u=p("Lang"),b=p("MenuH");return d(),g("div",te,[c(i),c(r),c(u),c(b)])}const ve=_(ee,[["render",ne],["__scopeId","data-v-681057a5"]]),se={name:"MenuIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},oe=["aria-hidden","aria-label"],ie=["fill","width","height"],le={d:"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"},ae={key:0};function re(t,e,n,s,l,a){return d(),g("span",T(t.$attrs,{"aria-hidden":n.title?null:"true","aria-label":n.title,class:"material-design-icon menu-icon",role:"img",onClick:e[0]||(e[0]=i=>t.$emit("click",i))}),[(d(),g("svg",{fill:n.fillColor,class:"material-design-icon__svg",width:n.size,height:n.size,viewBox:"0 0 24 24"},[o("path",le,[n.title?(d(),g("title",ae,m(n.title),1)):k("",!0)])],8,ie))],16,oe)}const ce=_(se,[["render",re]]),de="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23e8eaed'%3e%3cpath%20d='m313-440%20224%20224-57%2056-320-320%20320-320%2057%2056-224%20224h487v80H313Z'/%3e%3c/svg%3e",ge="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23e8eaed'%3e%3cpath%20d='M240-200h120v-240h240v240h120v-360L480-740%20240-560v360Zm-80%2080v-480l320-240%20320%20240v480H520v-240h-80v240H160Zm320-350Z'/%3e%3c/svg%3e",ue="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%20-960%20960%20960'%20width='24px'%20fill='%23e8eaed'%3e%3cpath%20d='M647-440H160v-80h487L423-744l57-56%20320%20320-320%20320-57-56%20224-224Z'/%3e%3c/svg%3e",me={components:{MenuIcon:ce},name:"footerB",methods:{goBack(){this.$router.go(-1)},goForward(){this.$router.go(1)}}},fe={class:"footer"};function pe(t,e,n,s,l,a){const i=p("router-link");return d(),g("div",fe,[o("div",{class:"navigation",onClick:e[0]||(e[0]=(...r)=>a.goBack&&a.goBack(...r))},e[2]||(e[2]=[o("img",{src:de,alt:"back"},null,-1)])),c(i,{to:"/",class:"navigation"},{default:f(()=>e[3]||(e[3]=[o("img",{src:ge,alt:"home"},null,-1)])),_:1}),o("div",{class:"navigation",onClick:e[1]||(e[1]=(...r)=>a.goForward&&a.goForward(...r))},e[4]||(e[4]=[o("img",{src:ue,alt:"forward"},null,-1)]))])}const he=_(me,[["render",pe],["__scopeId","data-v-0fdbac37"]]);export{ve as F,_,he as a}; diff --git a/spa/vue/dist/assets/index-BIfu7HcU.js b/spa/vue/dist/assets/index-DccGIixi.js similarity index 99% rename from spa/vue/dist/assets/index-BIfu7HcU.js rename to spa/vue/dist/assets/index-DccGIixi.js index 515af18..84ac5a2 100644 --- a/spa/vue/dist/assets/index-BIfu7HcU.js +++ b/spa/vue/dist/assets/index-DccGIixi.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-D1IUYyPG.js","assets/footerB-B_sYJCD0.js","assets/footerB-D_GT2umv.css","assets/searchLine-BlO5YIbG.js","assets/searchLine-Bqe_ccJt.css","assets/HomeView-C0JCTEr_.css","assets/AboutView-CTufbipe.js","assets/AboutView-C1FaiPPz.css","assets/ProfileView-DOfM9Ta9.js","assets/ProfileView-COXJamv9.css","assets/SupportView-Hwog53I5.js","assets/SupportView-DF9LsVNx.css","assets/FeetbackView-B9vw7apk.js","assets/FeetbackView-Csl9V8Bc.css","assets/ResultsView-Czz66SUa.js","assets/ResultsView-ijT9kjlC.css","assets/SettingsView-C01SJVt6.js","assets/SettingsView-FlTPuBSa.css","assets/RegistrationView-BgG_0HRE.js","assets/RegistrationView-D_FgJHPY.css","assets/LogInView-BJ2czjmX.js","assets/LogInView-Co-3gSCv.css","assets/RestObjectView-CgfhSbZM.js","assets/RestObjectView-DU_QDLXy.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-zKlroz3N.js","assets/footerB-DAi6c01a.js","assets/footerB-D_GT2umv.css","assets/searchLine-3vDx-8Ye.js","assets/searchLine-Bqe_ccJt.css","assets/HomeView-C0JCTEr_.css","assets/AboutView-B7yELX4Y.js","assets/AboutView-C1FaiPPz.css","assets/ProfileView-BuVzjMSP.js","assets/ProfileView-COXJamv9.css","assets/SupportView-B_EO3gSX.js","assets/SupportView-DF9LsVNx.css","assets/FeetbackView-CXGcB7N7.js","assets/FeetbackView-Csl9V8Bc.css","assets/ResultsView-C1CSY9zD.js","assets/ResultsView-ijT9kjlC.css","assets/SettingsView-BlE1G-Ym.js","assets/SettingsView-FlTPuBSa.css","assets/RegistrationView-C0Di_tAT.js","assets/RegistrationView-D_FgJHPY.css","assets/LogInView-CCzg48Go.js","assets/LogInView-Co-3gSCv.css","assets/RestObjectView-CuQAHRrm.js","assets/RestObjectView-DU_QDLXy.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -28,7 +28,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-D1IUYy `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Ki]=this[Ki]={accessors:{}}).accessors,s=this.prototype;function o(i){const l=Ln(i);r[l]||(Kp(s,i),r[l]=!0)}return P.isArray(t)?t.forEach(o):o(t),this}}Ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(Ve.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});P.freezeMethods(Ve);function Ss(e,t){const n=this||lr,r=t||n,s=Ve.from(r.headers);let o=r.data;return P.forEach(e,function(l){o=l.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function wc(e){return!!(e&&e.__CANCEL__)}function Tn(e,t,n){z.call(this,e??"canceled",z.ERR_CANCELED,t,n),this.name="CanceledError"}P.inherits(Tn,z,{__CANCEL__:!0});function Tc(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new z("Request failed with status code "+n.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function qp(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gp(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(a){const c=Date.now(),u=r[o];i||(i=c),n[s]=a,r[s]=c;let f=o,p=0;for(;f!==s;)p+=n[f++],f=f%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-i{n=u,s=null,o&&(clearTimeout(o),o=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?i(c,u):(s=c,o||(o=setTimeout(()=>{o=null,i(s)},r-f)))},()=>s&&i(s)]}const Ir=(e,t,n=3)=>{let r=0;const s=Gp(50,250);return Yp(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,a=i-r,c=s(a),u=i<=l;r=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:a,rate:c||void 0,estimated:c&&l&&u?(l-i)/c:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},qi=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Gi=e=>(...t)=>P.asap(()=>e(...t)),Jp=xe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,xe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(xe.origin),xe.navigator&&/(msie|trident)/i.test(xe.navigator.userAgent)):()=>!0,Xp=xe.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];P.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),P.isString(r)&&i.push("path="+r),P.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zp(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Rc(e,t){return e&&!zp(t)?Qp(e,t):t}const Yi=e=>e instanceof Ve?{...e}:e;function sn(e,t){t=t||{};const n={};function r(c,u,f,p){return P.isPlainObject(c)&&P.isPlainObject(u)?P.merge.call({caseless:p},c,u):P.isPlainObject(u)?P.merge({},u):P.isArray(u)?u.slice():u}function s(c,u,f,p){if(P.isUndefined(u)){if(!P.isUndefined(c))return r(void 0,c,f,p)}else return r(c,u,f,p)}function o(c,u){if(!P.isUndefined(u))return r(void 0,u)}function i(c,u){if(P.isUndefined(u)){if(!P.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function l(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const a={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(c,u,f)=>s(Yi(c),Yi(u),f,!0)};return P.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=a[u]||s,p=f(e[u],t[u],u);P.isUndefined(p)&&f!==l||(n[u]=p)}),n}const Oc=e=>{const t=sn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=Ve.from(i),t.url=yc(Rc(t.baseURL,t.url),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let a;if(P.isFormData(n)){if(xe.hasStandardBrowserEnv||xe.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((a=i.getContentType())!==!1){const[c,...u]=a?a.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...u].join("; "))}}if(xe.hasStandardBrowserEnv&&(r&&P.isFunction(r)&&(r=r(t)),r||r!==!1&&Jp(t.url))){const c=s&&o&&Xp.read(o);c&&i.set(s,c)}return t},Zp=typeof XMLHttpRequest<"u",em=Zp&&function(e){return new Promise(function(n,r){const s=Oc(e);let o=s.data;const i=Ve.from(s.headers).normalize();let{responseType:l,onUploadProgress:a,onDownloadProgress:c}=s,u,f,p,_,T;function O(){_&&_(),T&&T(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function b(){if(!A)return;const C=Ve.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),N={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:C,config:e,request:A};Tc(function(I){n(I),O()},function(I){r(I),O()},N),A=null}"onloadend"in A?A.onloadend=b:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.indexOf("file:")===0)||setTimeout(b)},A.onabort=function(){A&&(r(new z("Request aborted",z.ECONNABORTED,e,A)),A=null)},A.onerror=function(){r(new z("Network Error",z.ERR_NETWORK,e,A)),A=null},A.ontimeout=function(){let w=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||Ec;s.timeoutErrorMessage&&(w=s.timeoutErrorMessage),r(new z(w,N.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,A)),A=null},o===void 0&&i.setContentType(null),"setRequestHeader"in A&&P.forEach(i.toJSON(),function(w,N){A.setRequestHeader(N,w)}),P.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),c&&([p,T]=Ir(c,!0),A.addEventListener("progress",p)),a&&A.upload&&([f,_]=Ir(a),A.upload.addEventListener("progress",f),A.upload.addEventListener("loadend",_)),(s.cancelToken||s.signal)&&(u=C=>{A&&(r(!C||C.type?new Tn(null,e,A):C),A.abort(),A=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const S=qp(s.url);if(S&&xe.protocols.indexOf(S)===-1){r(new z("Unsupported protocol "+S+":",z.ERR_BAD_REQUEST,e));return}A.send(o||null)})},tm=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(c){if(!s){s=!0,l();const u=c instanceof Error?c:this.reason;r.abort(u instanceof z?u:new Tn(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new z(`timeout ${t} of ms exceeded`,z.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>P.asap(l),a}},nm=function*(e,t){let n=e.byteLength;if(n{const s=rm(e,t);let o=0,i,l=a=>{i||(i=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:c,value:u}=await s.next();if(c){l(),a.close();return}let f=u.byteLength;if(n){let p=o+=f;n(p)}a.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(a){return l(a),s.return()}},{highWaterMark:2})},Zr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ac=Zr&&typeof ReadableStream=="function",om=Zr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Cc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},im=Ac&&Cc(()=>{let e=!1;const t=new Request(xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Xi=64*1024,Ks=Ac&&Cc(()=>P.isReadableStream(new Response("").body)),Nr={stream:Ks&&(e=>e.body)};Zr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Nr[t]&&(Nr[t]=P.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new z(`Response type '${t}' is not supported`,z.ERR_NOT_SUPPORT,r)})})})(new Response);const lm=async e=>{if(e==null)return 0;if(P.isBlob(e))return e.size;if(P.isSpecCompliantForm(e))return(await new Request(xe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(P.isArrayBufferView(e)||P.isArrayBuffer(e))return e.byteLength;if(P.isURLSearchParams(e)&&(e=e+""),P.isString(e))return(await om(e)).byteLength},am=async(e,t)=>{const n=P.toFiniteNumber(e.getContentLength());return n??lm(t)},cm=Zr&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:l,onUploadProgress:a,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:p}=Oc(e);c=c?(c+"").toLowerCase():"text";let _=tm([s,o&&o.toAbortSignal()],i),T;const O=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let A;try{if(a&&im&&n!=="get"&&n!=="head"&&(A=await am(u,r))!==0){let N=new Request(t,{method:"POST",body:r,duplex:"half"}),U;if(P.isFormData(r)&&(U=N.headers.get("content-type"))&&u.setContentType(U),N.body){const[I,V]=qi(A,Ir(Gi(a)));r=Ji(N.body,Xi,I,V)}}P.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;T=new Request(t,{...p,signal:_,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:b?f:void 0});let S=await fetch(T);const C=Ks&&(c==="stream"||c==="response");if(Ks&&(l||C&&O)){const N={};["status","statusText","headers"].forEach(B=>{N[B]=S[B]});const U=P.toFiniteNumber(S.headers.get("content-length")),[I,V]=l&&qi(U,Ir(Gi(l),!0))||[];S=new Response(Ji(S.body,Xi,I,()=>{V&&V(),O&&O()}),N)}c=c||"text";let w=await Nr[P.findKey(Nr,c)||"text"](S,e);return!C&&O&&O(),await new Promise((N,U)=>{Tc(N,U,{data:w,headers:Ve.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:T})})}catch(b){throw O&&O(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new z("Network Error",z.ERR_NETWORK,e,T),{cause:b.cause||b}):z.from(b,b&&b.code,e,T)}}),qs={http:Rp,xhr:em,fetch:cm};P.forEach(qs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zi=e=>`- ${e}`,um=e=>P.isFunction(e)||e===null||e===!1,Lc={getAdapter:e=>{e=P.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o`adapter ${l} `+(a===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : `+o.map(zi).join(` `):" "+zi(o[0]):"as no adapter specified";throw new z("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:qs};function ws(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Tn(null,e)}function Qi(e){return ws(e),e.headers=Ve.from(e.headers),e.data=Ss.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lc.getAdapter(e.adapter||lr.adapter)(e).then(function(r){return ws(e),r.data=Ss.call(e,e.transformResponse,r),r.headers=Ve.from(r.headers),r},function(r){return wc(r)||(ws(e),r&&r.response&&(r.response.data=Ss.call(e,e.transformResponse,r.response),r.response.headers=Ve.from(r.response.headers))),Promise.reject(r)})}const vc="1.7.9",es={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{es[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zi={};es.transitional=function(t,n,r){function s(o,i){return"[Axios v"+vc+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,l)=>{if(t===!1)throw new z(s(i," has been removed"+(n?" in "+n:"")),z.ERR_DEPRECATED);return n&&!Zi[i]&&(Zi[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};es.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function fm(e,t,n){if(typeof e!="object")throw new z("options must be an object",z.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const l=e[o],a=l===void 0||i(l,o,e);if(a!==!0)throw new z("option "+o+" must be "+a,z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new z("Unknown option "+o,z.ERR_BAD_OPTION)}}const Er={assertOptions:fm,validators:es},pt=Er.validators;class tn{constructor(t){this.defaults=t,this.interceptors={request:new Bi,response:new Bi}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=sn(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Er.assertOptions(r,{silentJSONParsing:pt.transitional(pt.boolean),forcedJSONParsing:pt.transitional(pt.boolean),clarifyTimeoutError:pt.transitional(pt.boolean)},!1),s!=null&&(P.isFunction(s)?n.paramsSerializer={serialize:s}:Er.assertOptions(s,{encode:pt.function,serialize:pt.function},!0)),Er.assertOptions(n,{baseUrl:pt.spelling("baseURL"),withXsrfToken:pt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&P.merge(o.common,o[n.method]);o&&P.forEach(["delete","get","head","post","put","patch","common"],T=>{delete o[T]}),n.headers=Ve.concat(i,o);const l=[];let a=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(n)===!1||(a=a&&O.synchronous,l.unshift(O.fulfilled,O.rejected))});const c=[];this.interceptors.response.forEach(function(O){c.push(O.fulfilled,O.rejected)});let u,f=0,p;if(!a){const T=[Qi.bind(this),void 0];for(T.unshift.apply(T,l),T.push.apply(T,c),p=T.length,u=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,l){r.reason||(r.reason=new Tn(o,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Po(function(s){t=s}),cancel:t}}}function dm(e){return function(n){return e.apply(null,n)}}function hm(e){return P.isObject(e)&&e.isAxiosError===!0}const Gs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gs).forEach(([e,t])=>{Gs[t]=e});function Pc(e){const t=new tn(e),n=lc(tn.prototype.request,t);return P.extend(n,tn.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Pc(sn(e,s))},n}const Ee=Pc(lr);Ee.Axios=tn;Ee.CanceledError=Tn;Ee.CancelToken=Po;Ee.isCancel=wc;Ee.VERSION=vc;Ee.toFormData=Qr;Ee.AxiosError=z;Ee.Cancel=Ee.CanceledError;Ee.all=function(t){return Promise.all(t)};Ee.spread=dm;Ee.isAxiosError=hm;Ee.mergeConfig=sn;Ee.AxiosHeaders=Ve;Ee.formToJSON=e=>Sc(P.isHTMLForm(e)?new FormData(e):e);Ee.getAdapter=Lc.getAdapter;Ee.HttpStatusCode=Gs;Ee.default=Ee;const Ic="https://yalarba.ru/api",pm=async e=>(await Ee.post(`${Ic}/auth/login`,e,{"Content-Type":"application/json"})).data,mm=async e=>(await Ee.get(`${Ic}/auth/check`,{headers:{Authorization:`Bearer ${e}`}})).data,el={login:pm,checkAuth:mm};class In extends Error{}In.prototype.name="InvalidTokenError";function gm(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function _m(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return gm(t)}catch{return atob(t)}}function bm(e,t){if(typeof e!="string")throw new In("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new In(`Invalid token specified: missing part #${n+1}`);let s;try{s=_m(r)}catch(o){throw new In(`Invalid token specified: invalid base64 for part #${n+1} (${o.message})`)}try{return JSON.parse(s)}catch(o){throw new In(`Invalid token specified: invalid json for part #${n+1} (${o.message})`)}}const ym=Uh("auth",()=>{const e=Sn({username:"",email:"",id:0,token:""}),t=tr(!1),n=async o=>{try{const i=await el.login(o),l=bm(i.token);e.name=l.user.username,e.id=l.user.id,e.email=l.user.email,t.value=!0,e.token=i.token}catch(i){throw console.error("Login failed",i),i}},r=()=>{t.value=!1,e.name="",e.token="",e.email="",e.id=0};return{user:e,isAuthenticated:t,login:n,logout:r,checkAuth:async()=>{try{const o=e.token;if(o)try{const i=await el.checkAuth(o);e.value=i.user,t.value=!0}catch{r()}}catch(o){throw console.error("Check auth failed",o),o}}}}),Em=[{path:"/",name:"home",component:()=>ht(()=>import("./HomeView-D1IUYyPG.js"),__vite__mapDeps([0,1,2,3,4,5]))},{path:"/about",name:"about",component:()=>ht(()=>import("./AboutView-CTufbipe.js"),__vite__mapDeps([6,1,2,7]))},{path:"/profile",name:"profile",component:()=>ht(()=>import("./ProfileView-DOfM9Ta9.js"),__vite__mapDeps([8,1,2,9])),meta:{requiresAuth:!0}},{path:"/support",name:"support",component:()=>ht(()=>import("./SupportView-Hwog53I5.js"),__vite__mapDeps([10,1,2,11]))},{path:"/feetback",name:"feetback",component:()=>ht(()=>import("./FeetbackView-B9vw7apk.js"),__vite__mapDeps([12,1,2,13]))},{path:"/results",name:"results",component:()=>ht(()=>import("./ResultsView-Czz66SUa.js"),__vite__mapDeps([14,1,2,3,4,15]))},{path:"/settings",name:"settings",component:()=>ht(()=>import("./SettingsView-C01SJVt6.js"),__vite__mapDeps([16,1,2,17])),meta:{requiresAuth:!0}},{path:"/registration",name:"registration",component:()=>ht(()=>import("./RegistrationView-BgG_0HRE.js"),__vite__mapDeps([18,1,2,19]))},{path:"/login",name:"login",component:()=>ht(()=>import("./LogInView-BJ2czjmX.js"),__vite__mapDeps([20,1,2,21]))},{path:"/restObject",name:"restObject",component:()=>ht(()=>import("./RestObjectView-CgfhSbZM.js"),__vite__mapDeps([22,1,2,23])),meta:{requiresAuth:!0}}],Nc=Ah({history:nh("/"),routes:Em});Nc.beforeEach(async(e,t,n)=>{const r=ym();await r.checkAuth(),e.meta.requiresAuth&&!r.isAuthenticated?n("/login"):n()});/*! +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=sn(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Er.assertOptions(r,{silentJSONParsing:pt.transitional(pt.boolean),forcedJSONParsing:pt.transitional(pt.boolean),clarifyTimeoutError:pt.transitional(pt.boolean)},!1),s!=null&&(P.isFunction(s)?n.paramsSerializer={serialize:s}:Er.assertOptions(s,{encode:pt.function,serialize:pt.function},!0)),Er.assertOptions(n,{baseUrl:pt.spelling("baseURL"),withXsrfToken:pt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&P.merge(o.common,o[n.method]);o&&P.forEach(["delete","get","head","post","put","patch","common"],T=>{delete o[T]}),n.headers=Ve.concat(i,o);const l=[];let a=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(n)===!1||(a=a&&O.synchronous,l.unshift(O.fulfilled,O.rejected))});const c=[];this.interceptors.response.forEach(function(O){c.push(O.fulfilled,O.rejected)});let u,f=0,p;if(!a){const T=[Qi.bind(this),void 0];for(T.unshift.apply(T,l),T.push.apply(T,c),p=T.length,u=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,l){r.reason||(r.reason=new Tn(o,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Po(function(s){t=s}),cancel:t}}}function dm(e){return function(n){return e.apply(null,n)}}function hm(e){return P.isObject(e)&&e.isAxiosError===!0}const Gs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gs).forEach(([e,t])=>{Gs[t]=e});function Pc(e){const t=new tn(e),n=lc(tn.prototype.request,t);return P.extend(n,tn.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Pc(sn(e,s))},n}const Ee=Pc(lr);Ee.Axios=tn;Ee.CanceledError=Tn;Ee.CancelToken=Po;Ee.isCancel=wc;Ee.VERSION=vc;Ee.toFormData=Qr;Ee.AxiosError=z;Ee.Cancel=Ee.CanceledError;Ee.all=function(t){return Promise.all(t)};Ee.spread=dm;Ee.isAxiosError=hm;Ee.mergeConfig=sn;Ee.AxiosHeaders=Ve;Ee.formToJSON=e=>Sc(P.isHTMLForm(e)?new FormData(e):e);Ee.getAdapter=Lc.getAdapter;Ee.HttpStatusCode=Gs;Ee.default=Ee;const Ic="https://yalarba.ru/api",pm=async e=>(await Ee.post(`${Ic}/auth/login`,e,{"Content-Type":"application/json"})).data,mm=async e=>(await Ee.get(`${Ic}/auth/check`,{headers:{Authorization:`Bearer ${e}`}})).data,el={login:pm,checkAuth:mm};class In extends Error{}In.prototype.name="InvalidTokenError";function gm(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function _m(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return gm(t)}catch{return atob(t)}}function bm(e,t){if(typeof e!="string")throw new In("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new In(`Invalid token specified: missing part #${n+1}`);let s;try{s=_m(r)}catch(o){throw new In(`Invalid token specified: invalid base64 for part #${n+1} (${o.message})`)}try{return JSON.parse(s)}catch(o){throw new In(`Invalid token specified: invalid json for part #${n+1} (${o.message})`)}}const ym=Uh("auth",()=>{const e=Sn({username:"",email:"",id:0,token:""}),t=tr(!1),n=async o=>{try{const i=await el.login(o),l=bm(i.token);e.name=l.user.username,e.id=l.user.id,e.email=l.user.email,t.value=!0,e.token=i.token}catch(i){throw console.error("Login failed",i),i}},r=()=>{t.value=!1,e.name="",e.token="",e.email="",e.id=0};return{user:e,isAuthenticated:t,login:n,logout:r,checkAuth:async()=>{try{const o=e.token;if(o)try{const i=await el.checkAuth(o);e.value=i.user,t.value=!0}catch{r()}}catch(o){throw console.error("Check auth failed",o),o}}}}),Em=[{path:"/",name:"home",component:()=>ht(()=>import("./HomeView-zKlroz3N.js"),__vite__mapDeps([0,1,2,3,4,5]))},{path:"/about",name:"about",component:()=>ht(()=>import("./AboutView-B7yELX4Y.js"),__vite__mapDeps([6,1,2,7]))},{path:"/profile",name:"profile",component:()=>ht(()=>import("./ProfileView-BuVzjMSP.js"),__vite__mapDeps([8,1,2,9])),meta:{requiresAuth:!0}},{path:"/support",name:"support",component:()=>ht(()=>import("./SupportView-B_EO3gSX.js"),__vite__mapDeps([10,1,2,11]))},{path:"/feetback",name:"feetback",component:()=>ht(()=>import("./FeetbackView-CXGcB7N7.js"),__vite__mapDeps([12,1,2,13]))},{path:"/results",name:"results",component:()=>ht(()=>import("./ResultsView-C1CSY9zD.js"),__vite__mapDeps([14,1,2,3,4,15]))},{path:"/settings",name:"settings",component:()=>ht(()=>import("./SettingsView-BlE1G-Ym.js"),__vite__mapDeps([16,1,2,17])),meta:{requiresAuth:!0}},{path:"/registration",name:"registration",component:()=>ht(()=>import("./RegistrationView-C0Di_tAT.js"),__vite__mapDeps([18,1,2,19]))},{path:"/login",name:"login",component:()=>ht(()=>import("./LogInView-CCzg48Go.js"),__vite__mapDeps([20,1,2,21]))},{path:"/restObject",name:"restObject",component:()=>ht(()=>import("./RestObjectView-CuQAHRrm.js"),__vite__mapDeps([22,1,2,23])),meta:{requiresAuth:!0}}],Nc=Ah({history:nh(),routes:Em});Nc.beforeEach(async(e,t,n)=>{const r=ym();await r.checkAuth(),e.meta.requiresAuth&&!r.isAuthenticated?n("/login"):n()});/*! * shared v11.1.0 * (c) 2025 kazuya kawaguchi * Released under the MIT License. diff --git a/spa/vue/dist/assets/searchLine-BlO5YIbG.js b/spa/vue/dist/assets/searchLine-3vDx-8Ye.js similarity index 92% rename from spa/vue/dist/assets/searchLine-BlO5YIbG.js rename to spa/vue/dist/assets/searchLine-3vDx-8Ye.js index 4536817..a967acd 100644 --- a/spa/vue/dist/assets/searchLine-BlO5YIbG.js +++ b/spa/vue/dist/assets/searchLine-3vDx-8Ye.js @@ -1 +1 @@ -import{u as h,o as a,c as o,b as r,F as u,e as c,t as d,g as m,w as p,v,h as f}from"./index-BIfu7HcU.js";import{_ as g}from"./footerB-B_sYJCD0.js";const y={setup(){const{t:i}=h();return{t:i}},data(){return{searchQuery:"",isMenuVisible:!1,searchOptions:["Пляжи","Горы","Отели","Рестораны"]}},methods:{performSearch(){this.searchQuery.trim()&&this.$router.push({name:"results",query:{q:this.searchQuery}})},toggleMenu(){this.isMenuVisible=!this.isMenuVisible},selectOption(i){this.searchQuery=i,this.isMenuVisible=!1,this.performSearch()}}},M={class:"search-container"},S={class:"search-input-container"},V={key:0,class:"search-menu"},_=["onClick"],b=["placeholder"];function k(i,e,w,l,n,t){return a(),o("div",M,[r("div",S,[r("div",{class:"menu-icon",onClick:e[0]||(e[0]=(...s)=>t.toggleMenu&&t.toggleMenu(...s))},e[4]||(e[4]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24"},[r("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z",fill:"currentColor"})],-1)])),n.isMenuVisible?(a(),o("div",V,[(a(!0),o(u,null,c(n.searchOptions,s=>(a(),o("div",{class:"menu-item",key:s,onClick:C=>t.selectOption(s)},d(s),9,_))),128))])):m("",!0),p(r("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>n.searchQuery=s),onKeyup:e[2]||(e[2]=f((...s)=>t.performSearch&&t.performSearch(...s),["enter"])),class:"search-input",placeholder:l.t("messages.searchPlaceholder")},null,40,b),[[v,n.searchQuery]]),r("button",{onClick:e[3]||(e[3]=(...s)=>t.performSearch&&t.performSearch(...s)),class:"search-button"},e[5]||(e[5]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24"},[r("path",{d:"M10 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm8-8a7.95 7.95 0 0 1-1.757 4.95l4.95 4.95-1.414 1.414-4.95-4.95A7.95 7.95 0 0 1 10 18z",fill:"currentColor"})],-1)]))])])}const z=g(y,[["render",k],["__scopeId","data-v-a8d17828"]]);export{z as S}; +import{u as h,o as a,c as o,b as r,F as u,e as c,t as d,g as m,w as p,v,h as f}from"./index-DccGIixi.js";import{_ as g}from"./footerB-DAi6c01a.js";const y={setup(){const{t:i}=h();return{t:i}},data(){return{searchQuery:"",isMenuVisible:!1,searchOptions:["Пляжи","Горы","Отели","Рестораны"]}},methods:{performSearch(){this.searchQuery.trim()&&this.$router.push({name:"results",query:{q:this.searchQuery}})},toggleMenu(){this.isMenuVisible=!this.isMenuVisible},selectOption(i){this.searchQuery=i,this.isMenuVisible=!1,this.performSearch()}}},M={class:"search-container"},S={class:"search-input-container"},V={key:0,class:"search-menu"},_=["onClick"],b=["placeholder"];function k(i,e,w,l,n,t){return a(),o("div",M,[r("div",S,[r("div",{class:"menu-icon",onClick:e[0]||(e[0]=(...s)=>t.toggleMenu&&t.toggleMenu(...s))},e[4]||(e[4]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24"},[r("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z",fill:"currentColor"})],-1)])),n.isMenuVisible?(a(),o("div",V,[(a(!0),o(u,null,c(n.searchOptions,s=>(a(),o("div",{class:"menu-item",key:s,onClick:C=>t.selectOption(s)},d(s),9,_))),128))])):m("",!0),p(r("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>n.searchQuery=s),onKeyup:e[2]||(e[2]=f((...s)=>t.performSearch&&t.performSearch(...s),["enter"])),class:"search-input",placeholder:l.t("messages.searchPlaceholder")},null,40,b),[[v,n.searchQuery]]),r("button",{onClick:e[3]||(e[3]=(...s)=>t.performSearch&&t.performSearch(...s)),class:"search-button"},e[5]||(e[5]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24"},[r("path",{d:"M10 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm8-8a7.95 7.95 0 0 1-1.757 4.95l4.95 4.95-1.414 1.414-4.95-4.95A7.95 7.95 0 0 1 10 18z",fill:"currentColor"})],-1)]))])])}const z=g(y,[["render",k],["__scopeId","data-v-a8d17828"]]);export{z as S}; diff --git a/spa/vue/dist/index.html b/spa/vue/dist/index.html index 07a3c32..0a1feaa 100644 --- a/spa/vue/dist/index.html +++ b/spa/vue/dist/index.html @@ -2,10 +2,10 @@ - + YalArba - + diff --git a/spa/vue/index.html b/spa/vue/index.html index 397c0e5..fe13100 100644 --- a/spa/vue/index.html +++ b/spa/vue/index.html @@ -2,7 +2,7 @@ - + YalArba diff --git a/spa/vue/src/components/images/YalArbaLogo300.png b/spa/vue/src/components/images/YalArbaLogo300.png new file mode 100644 index 0000000..979d85d Binary files /dev/null and b/spa/vue/src/components/images/YalArbaLogo300.png differ