From fea9fcd064ceb0e08bc73c8643c23d80e5f59c12 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:24:57 +0300 Subject: [PATCH 01/18] refactor!: reorganize project structure for better modularity --- index.html | 10 +- package.json | 4 +- precompiled-templates.js | 702 +++++++ manifest.json => public/manifest.json | 4 +- run.sh | 3 - .../components}/AdCard/AdCard.hbs | 0 .../components}/AdCard/AdCard.scss | 0 .../components}/AdCard/AdCard.ts | 0 .../components}/AuthPopup/AuthPopup.hbs | 0 .../components}/AuthPopup/AuthPopup.scss | 0 .../components}/AuthPopup/AuthPopup.ts | 0 .../components}/Filter/Filter.hbs | 0 .../components}/Filter/Filter.scss | 2 +- .../components}/Filter/Filter.ts | 0 .../components}/Header/Header.scss | 0 .../components}/Header/Header.ts | 0 .../HorizontalAdCard/HorizontalAdCard.hbs | 0 .../HorizontalAdCard/HorizontalAdCard.ts | 0 .../components}/MainPhoto/MainPhoto.scss | 0 .../components}/MainPhoto/MainPhoto.ts | 0 .../components}/PopupAlert/PopupAlert.hbs | 0 .../components}/PopupAlert/PopupAlert.scss | 0 .../components}/PopupAlert/PopupAlert.ts | 0 .../components}/ProfileData/EditForm.hbs | 0 .../ProfileData/NoReviews/NoReviews.hbs | 0 .../ProfileData/NoReviews/NoReviews.sass | 2 +- .../ProfileData/NoReviews/NoReviews.ts | 0 .../components}/ProfileData/ProfileData.sass | 0 .../components}/ProfileData/ProfileData.ts | 0 .../components}/ProfileData/RatingForm.hbs | 0 .../components}/ProfileData/RatingForm.sass | 2 +- .../components}/ProfileInfo/ProfileInfo.hbs | 0 .../components}/ProfileInfo/ProfileInfo.scss | 2 +- .../components}/ProfileInfo/ProfileInfo.ts | 0 .../components}/ProfilePopup/ProfilePopup.hbs | 0 .../ProfilePopup/ProfilePopup.scss | 0 .../components}/ProfilePopup/ProfilePopup.ts | 0 .../ReactiveComponent/ReactiveComponent.ts | 0 .../components}/ReviewCard/ReviewCard.hbs | 0 .../components}/ReviewCard/ReviewCard.sass | 0 .../components}/ReviewCard/ReviewCard.ts | 0 .../ReviewsGraphic/ReviewsGraphic.hbs | 0 .../ReviewsGraphic/ReviewsGraphic.sass | 0 .../ReviewsGraphic/ReviewsGraphic.ts | 0 .../components}/SearchPopup/SearchPopup.hbs | 0 .../components}/SearchPopup/SearchPopup.sass | 0 .../components}/SearchPopup/SearchPopup.ts | 0 .../components}/ShortAdCard/ShortAdCard.hbs | 0 .../components}/ShortAdCard/ShortAdCard.sass | 2 +- .../components}/ShortAdCard/ShortAdCard.ts | 0 .../components}/Spinner/Spinner.scss | 0 .../components}/Spinner/Spinner.ts | 0 src/components/precompiled-templates.js | 702 +++++++ .../include}/handlebars.runtime.js | 1726 ++++++++--------- index.ts => src/index.ts | 14 +- {modules => src/modules}/Ajax.ts | 0 {modules => src/modules}/ApiClient.ts | 0 {modules => src/modules}/Clear.ts | 0 {modules => src/modules}/Router.ts | 0 {modules => src/modules}/Types.ts | 0 {modules => src/modules}/Utils.ts | 0 .../pages}/AdListPage/AdListPage.hbs | 0 .../pages}/AdListPage/AdListPage.sass | 2 +- .../pages}/AdListPage/AdListPage.ts | 4 +- {components => src/pages}/AdPage/AdPage.hbs | 0 {components => src/pages}/AdPage/AdPage.scss | 2 +- {components => src/pages}/AdPage/AdPage.ts | 2 +- .../pages}/CityPage/CityPage.sass | 0 .../pages}/CityPage/CityPage.ts | 4 +- .../pages}/CityPage/CityPhoto.hbs | 0 .../pages}/EditAdvertPage/EditAdvertPage.hbs | 0 .../pages}/EditAdvertPage/EditAdvertPage.scss | 2 +- .../pages}/EditAdvertPage/EditAdvertPage.ts | 2 +- .../pages}/EditAdvertPage/SecondaryImage.hbs | 0 .../pages}/MainPage/MainPage.scss | 0 .../pages}/MainPage/MainPage.ts | 6 +- .../pages}/MapPage/MapPage.sass | 0 {components => src/pages}/MapPage/MapPage.ts | 71 +- .../pages}/ProfilePage/ProfilePage.scss | 0 .../pages}/ProfilePage/ProfilePage.ts | 25 +- mixins.scss => src/styles/mixins.scss | 0 src/styles/styles.sass | 57 + sw.js => src/sw.js | 0 .../vite-plugins/hbs-recompile.js | 4 +- style.sass | 54 - vite.config.ts | 2 +- 86 files changed, 2421 insertions(+), 991 deletions(-) create mode 100644 precompiled-templates.js rename manifest.json => public/manifest.json (93%) delete mode 100644 run.sh rename {components => src/components}/AdCard/AdCard.hbs (100%) rename {components => src/components}/AdCard/AdCard.scss (100%) rename {components => src/components}/AdCard/AdCard.ts (100%) rename {components => src/components}/AuthPopup/AuthPopup.hbs (100%) rename {components => src/components}/AuthPopup/AuthPopup.scss (100%) rename {components => src/components}/AuthPopup/AuthPopup.ts (100%) rename {components => src/components}/Filter/Filter.hbs (100%) rename {components => src/components}/Filter/Filter.scss (98%) rename {components => src/components}/Filter/Filter.ts (100%) rename {components => src/components}/Header/Header.scss (100%) rename {components => src/components}/Header/Header.ts (100%) rename {components => src/components}/HorizontalAdCard/HorizontalAdCard.hbs (100%) rename {components => src/components}/HorizontalAdCard/HorizontalAdCard.ts (100%) rename {components => src/components}/MainPhoto/MainPhoto.scss (100%) rename {components => src/components}/MainPhoto/MainPhoto.ts (100%) rename {components => src/components}/PopupAlert/PopupAlert.hbs (100%) rename {components => src/components}/PopupAlert/PopupAlert.scss (100%) rename {components => src/components}/PopupAlert/PopupAlert.ts (100%) rename {components => src/components}/ProfileData/EditForm.hbs (100%) rename {components => src/components}/ProfileData/NoReviews/NoReviews.hbs (100%) rename {components => src/components}/ProfileData/NoReviews/NoReviews.sass (94%) rename {components => src/components}/ProfileData/NoReviews/NoReviews.ts (100%) rename {components => src/components}/ProfileData/ProfileData.sass (100%) rename {components => src/components}/ProfileData/ProfileData.ts (100%) rename {components => src/components}/ProfileData/RatingForm.hbs (100%) rename {components => src/components}/ProfileData/RatingForm.sass (99%) rename {components => src/components}/ProfileInfo/ProfileInfo.hbs (100%) rename {components => src/components}/ProfileInfo/ProfileInfo.scss (99%) rename {components => src/components}/ProfileInfo/ProfileInfo.ts (100%) rename {components => src/components}/ProfilePopup/ProfilePopup.hbs (100%) rename {components => src/components}/ProfilePopup/ProfilePopup.scss (100%) rename {components => src/components}/ProfilePopup/ProfilePopup.ts (100%) rename {components => src/components}/ReactiveComponent/ReactiveComponent.ts (100%) rename {components => src/components}/ReviewCard/ReviewCard.hbs (100%) rename {components => src/components}/ReviewCard/ReviewCard.sass (100%) rename {components => src/components}/ReviewCard/ReviewCard.ts (100%) rename {components => src/components}/ReviewsGraphic/ReviewsGraphic.hbs (100%) rename {components => src/components}/ReviewsGraphic/ReviewsGraphic.sass (100%) rename {components => src/components}/ReviewsGraphic/ReviewsGraphic.ts (100%) rename {components => src/components}/SearchPopup/SearchPopup.hbs (100%) rename {components => src/components}/SearchPopup/SearchPopup.sass (100%) rename {components => src/components}/SearchPopup/SearchPopup.ts (100%) rename {components => src/components}/ShortAdCard/ShortAdCard.hbs (100%) rename {components => src/components}/ShortAdCard/ShortAdCard.sass (98%) rename {components => src/components}/ShortAdCard/ShortAdCard.ts (100%) rename {components => src/components}/Spinner/Spinner.scss (100%) rename {components => src/components}/Spinner/Spinner.ts (100%) create mode 100644 src/components/precompiled-templates.js rename {include => src/include}/handlebars.runtime.js (57%) rename index.ts => src/index.ts (89%) rename {modules => src/modules}/Ajax.ts (100%) rename {modules => src/modules}/ApiClient.ts (100%) rename {modules => src/modules}/Clear.ts (100%) rename {modules => src/modules}/Router.ts (100%) rename {modules => src/modules}/Types.ts (100%) rename {modules => src/modules}/Utils.ts (100%) rename {components => src/pages}/AdListPage/AdListPage.hbs (100%) rename {components => src/pages}/AdListPage/AdListPage.sass (94%) rename {components => src/pages}/AdListPage/AdListPage.ts (89%) rename {components => src/pages}/AdPage/AdPage.hbs (100%) rename {components => src/pages}/AdPage/AdPage.scss (95%) rename {components => src/pages}/AdPage/AdPage.ts (94%) rename {components => src/pages}/CityPage/CityPage.sass (100%) rename {components => src/pages}/CityPage/CityPage.ts (97%) rename {components => src/pages}/CityPage/CityPhoto.hbs (100%) rename {components => src/pages}/EditAdvertPage/EditAdvertPage.hbs (100%) rename {components => src/pages}/EditAdvertPage/EditAdvertPage.scss (94%) rename {components => src/pages}/EditAdvertPage/EditAdvertPage.ts (96%) rename {components => src/pages}/EditAdvertPage/SecondaryImage.hbs (100%) rename {components => src/pages}/MainPage/MainPage.scss (100%) rename {components => src/pages}/MainPage/MainPage.ts (91%) rename {components => src/pages}/MapPage/MapPage.sass (100%) rename {components => src/pages}/MapPage/MapPage.ts (66%) rename {components => src/pages}/ProfilePage/ProfilePage.scss (100%) rename {components => src/pages}/ProfilePage/ProfilePage.ts (89%) rename mixins.scss => src/styles/mixins.scss (100%) create mode 100644 src/styles/styles.sass rename sw.js => src/sw.js (100%) rename hbs-recompile.js => src/vite-plugins/hbs-recompile.js (92%) delete mode 100644 style.sass diff --git a/index.html b/index.html index a84e46e5..25931938 100644 --- a/index.html +++ b/index.html @@ -4,13 +4,15 @@ Путник — сервис для каучсерфинга - +
- + - + - + diff --git a/package.json b/package.json index 8352cf8f..82034dd4 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "start": "npm run compile:templates && vite", "build": "npm run compile:templates && vite build", "preview": "vite preview", - "prestart": "npm run eslint:fix && npm run compile:templates", - "compile:templates": "node hbs-recompile.js", + "prestart": "npm run compile:templates", + "compile:templates": "node src/vite-plugins/hbs-recompile.js", "eslint:fix": "npx eslint --fix " }, "author": "", diff --git a/precompiled-templates.js b/precompiled-templates.js new file mode 100644 index 00000000..fbdbf9dc --- /dev/null +++ b/precompiled-templates.js @@ -0,0 +1,702 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['AdCard.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + return "
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n \r\n
\r\n \r\n
\r\n \r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"images") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":11,"column":12},"end":{"line":13,"column":21}}})) != null ? stack1 : "") + + " \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n

" + + alias4(((helper = (helper = lookupProperty(helpers,"cityName") || (depth0 != null ? lookupProperty(depth0,"cityName") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"cityName","hash":{},"data":data,"loc":{"start":{"line":80,"column":42},"end":{"line":80,"column":54}}}) : helper))) + + "

\r\n

" + + alias4(((helper = (helper = lookupProperty(helpers,"address") || (depth0 != null ? lookupProperty(depth0,"address") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"address","hash":{},"data":data,"loc":{"start":{"line":81,"column":45},"end":{"line":81,"column":56}}}) : helper))) + + "

\r\n
\r\n \r\n \r\n

" + + alias4(((helper = (helper = lookupProperty(helpers,"viewsCount") || (depth0 != null ? lookupProperty(depth0,"viewsCount") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"viewsCount","hash":{},"data":data,"loc":{"start":{"line":89,"column":53},"end":{"line":89,"column":67}}}) : helper))) + + "

\r\n
\r\n
\r\n
\r\n
\r\n \r\n

" + + alias4(alias5(((stack1 = (depth0 != null ? lookupProperty(depth0,"adAuthor") : depth0)) != null ? lookupProperty(stack1,"name") : stack1), depth0)) + + "

\r\n
\r\n star\r\n " + + alias4(alias5(((stack1 = (depth0 != null ? lookupProperty(depth0,"adAuthor") : depth0)) != null ? lookupProperty(stack1,"rating") : stack1), depth0)) + + "\r\n
\r\n
\r\n
\r\n
"; +},"useData":true}); +templates['AuthPopup.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + var helper, alias1=container.escapeExpression, alias2=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n \n\n \n \n

\n
\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n
\n \n \n \n
\n \n\n
" + + alias4(((helper = (helper = lookupProperty(helpers,"authMessage") || (depth0 != null ? lookupProperty(depth0,"authMessage") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"authMessage","hash":{},"data":data,"loc":{"start":{"line":10,"column":34},"end":{"line":10,"column":49}}}) : helper))) + + "
\n
Неправильный логин или\n пароль!
\n
\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"inputs") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":14,"column":12},"end":{"line":34,"column":21}}})) != null ? stack1 : "") + + "\n
\n \n \n
\n
"; +},"useData":true}); +templates['Filter.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n \r\n \r\n
\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + return "checked"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n \r\n \r\n
\r\n"; +},"6":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n \r\n \r\n
\r\n"; +},"8":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n \r\n \r\n
\r\n"; +},"10":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n \r\n \r\n
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n
\r\n

По геопозиции

\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"geoposition") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":4,"column":4},"end":{"line":9,"column":13}}})) != null ? stack1 : "") + + "
\r\n
\r\n
\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"rating") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":13,"column":4},"end":{"line":18,"column":13}}})) != null ? stack1 : "") + + "
\r\n
\r\n
\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"new") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":22,"column":4},"end":{"line":27,"column":13}}})) != null ? stack1 : "") + + "
\r\n
\r\n
\r\n

Пол хоста

\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"gender") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":32,"column":4},"end":{"line":37,"column":13}}})) != null ? stack1 : "") + + "
\r\n
\r\n
\r\n

Количество гостей

\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"visitors") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":42,"column":4},"end":{"line":47,"column":13}}})) != null ? stack1 : "") + + "
\r\n \r\n \r\n \r\n
\r\n"; +},"useData":true}); +templates['HorizontalAdCard.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=container.escapeExpression, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n \r\n\r\n
\r\n \r\n \r\n \r\n\r\n

" + + alias1(((helper = (helper = lookupProperty(helpers,"cityName") || (depth0 != null ? lookupProperty(depth0,"cityName") : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cityName","hash":{},"data":data,"loc":{"start":{"line":20,"column":44},"end":{"line":20,"column":56}}}) : helper))) + + "

\r\n

" + + alias1(((helper = (helper = lookupProperty(helpers,"address") || (depth0 != null ? lookupProperty(depth0,"address") : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"address","hash":{},"data":data,"loc":{"start":{"line":21,"column":47},"end":{"line":21,"column":58}}}) : helper))) + + "

\r\n
\r\n Открыть\r\n Редактировать\r\n Удалить\r\n
\r\n
\r\n
"; +},"useData":true}); +templates['PopupAlert.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n " + + container.escapeExpression(((helper = (helper = lookupProperty(helpers,"message") || (depth0 != null ? lookupProperty(depth0,"message") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"message","hash":{},"data":data,"loc":{"start":{"line":2,"column":4},"end":{"line":2,"column":15}}}) : helper))) + + "\n
"; +},"useData":true}); +templates['EditForm.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + return "checked"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " value=\"" + + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"birthdate") : stack1), depth0)) + + "\" "; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n \n
\n
\n

Обновление профиля

\n
\n \n
\n
\n
\n

Никнейм:

\n \n \n \"!\"\n \n
\n
\n
\n

Имя:

\n \n \n \"!\"\n \n
\n
\n
\n

Почта:

\n \n \n \"!\"\n \n
\n
\n
\n

Пол:

\n
\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n

День рождения:

\n \n \n \"!\"\n \n
\n
\n
\n

Хост:

\n \n
\n
\n

Адрес:

\n \n \n \"!\"\n \n
\n
\n
\n\n\n
\n
\n \n
\n
\n \n
\n\n
\n \n \n
\n
\n
\n
"; +},"useData":true}); +templates['NoReviews.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + return "

Отзывов пока нет.

\n"; +},"3":function(container,depth0,helpers,partials,data) { + return "

Отзывов пока нет. Станьте первым!

\n
\n \n
\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n \n
\n\n
\n" + + ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"isMyProfile") : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data,"loc":{"start":{"line":7,"column":8},"end":{"line":16,"column":15}}})) != null ? stack1 : "") + + "
\n
"; +},"useData":true}); +templates['RatingForm.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + return "
\n

Ваш отзыв

\n
\n

Общая оценка

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n"; +},"useData":true}); +templates['ProfileInfo.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\n " + + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"age") : stack1), depth0)) + + "\n "; +},"3":function(container,depth0,helpers,partials,data) { + return "Не указано"; +},"5":function(container,depth0,helpers,partials,data) { + return "Да"; +},"7":function(container,depth0,helpers,partials,data) { + return "Нет"; +},"9":function(container,depth0,helpers,partials,data) { + return "Изменить"; +},"11":function(container,depth0,helpers,partials,data) { + return "Оценить"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n
\n \n
\n

" + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"name") : stack1), depth0)) + + "

\n
\n
\n\n
\n
\n
Рейтинг:
\n
\n \n \n " + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"score") : stack1), depth0)) + + "\n \n \n \n \n
\n
\n
\n
Пол:
\n

" + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"sex") : stack1), depth0)) + + "

\n
\n
\n
Возраст:
\n

" + + ((stack1 = lookupProperty(helpers,"if").call(alias3,(depth0 != null ? lookupProperty(depth0,"isCorrectAge") : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data,"loc":{"start":{"line":33,"column":47},"end":{"line":35,"column":41}}})) != null ? stack1 : "") + + "

\n
\n
\n
Хост:
\n

" + + ((stack1 = lookupProperty(helpers,"if").call(alias3,((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"isHost") : stack1),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data,"loc":{"start":{"line":39,"column":47},"end":{"line":41,"column":38}}})) != null ? stack1 : "") + + "

\n
\n
\n
Серферы:
\n

" + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"guestCount") : stack1), depth0)) + + "

\n
\n
\n\n
\n
\n " + + ((stack1 = lookupProperty(helpers,"if").call(alias3,(depth0 != null ? lookupProperty(depth0,"isMyProfile") : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data,"loc":{"start":{"line":54,"column":13},"end":{"line":54,"column":62}}})) != null ? stack1 : "") + + "\n
\n
\n
"; +},"useData":true}); +templates['ProfilePopup.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + var helper, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n \n " + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"title") : depth0), depth0)) + + "\n \n
\n
\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n" + + ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":3,"column":8},"end":{"line":14,"column":17}}})) != null ? stack1 : "") + + "
\n
"; +},"useData":true}); +templates['ReviewCard.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, alias4=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n
\n
\n \n
\n

" + + alias3(alias4((depth0 != null ? lookupProperty(depth0,"userName") : depth0), depth0)) + + "

\n
\n\n
\n

" + + alias3(alias4((depth0 != null ? lookupProperty(depth0,"title") : depth0), depth0)) + + "

\n
\n " + + alias3(alias4((depth0 != null ? lookupProperty(depth0,"text") : depth0), depth0)) + + "\n
\n
\n
\n\n
\n
\n " + + alias3((lookupProperty(helpers,"renderStars")||(depth0 && lookupProperty(depth0,"renderStars"))||alias2).call(alias1,(depth0 != null ? lookupProperty(depth0,"rating") : depth0),{"name":"renderStars","hash":{},"data":data,"loc":{"start":{"line":20,"column":12},"end":{"line":20,"column":39}}})) + + "\n
\n
\n " + + alias3(alias4((depth0 != null ? lookupProperty(depth0,"createdAt") : depth0), depth0)) + + "\n
\n
\n
"; +},"useData":true}); +templates['ReviewsGraphic.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.hooks.helperMissing, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n \n Извините, ваш браузер не поддерживает <canvas> элемент.\n \n\n
\n Изменение рейтинга\n Изменение среднего рейтинга\n
\n\n
\n

Всего оценок: " + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"totalRatings") : depth0), depth0)) + + "

\n

Дата первой оценки: " + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"firstDate") : depth0), depth0)) + + "

\n

Дата последней оценки: " + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"lastDate") : depth0), depth0)) + + "

\n

Наибольшая оценка: " + + alias2((lookupProperty(helpers,"renderStars")||(depth0 && lookupProperty(depth0,"renderStars"))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,"highestRating") : depth0),{"name":"renderStars","hash":{},"data":data,"loc":{"start":{"line":15,"column":30},"end":{"line":15,"column":64}}})) + + "

\n

Наименьшая оценка: " + + alias2((lookupProperty(helpers,"renderStars")||(depth0 && lookupProperty(depth0,"renderStars"))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,"lowestRating") : depth0),{"name":"renderStars","hash":{},"data":data,"loc":{"start":{"line":16,"column":30},"end":{"line":16,"column":63}}})) + + "

\n
\n
\n"; +},"useData":true}); +templates['SearchPopup.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " " + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"title") : depth0), depth0)) + + "\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n " + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"moscow") : depth0)) != null ? lookupProperty(stack1,"title") : stack1), depth0)) + + "\n " + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"spb") : depth0)) != null ? lookupProperty(stack1,"title") : stack1), depth0)) + + "\n
\n\n
\n
\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias3,(depth0 != null ? lookupProperty(depth0,"firstGroup") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":9,"column":12},"end":{"line":11,"column":21}}})) != null ? stack1 : "") + + "
\n
\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias3,(depth0 != null ? lookupProperty(depth0,"secondGroup") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":14,"column":12},"end":{"line":16,"column":21}}})) != null ? stack1 : "") + + "
\n
\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias3,(depth0 != null ? lookupProperty(depth0,"thirdGroup") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":19,"column":12},"end":{"line":21,"column":21}}})) != null ? stack1 : "") + + "
\n
\n
\n\n"; +},"useData":true}); +templates['ShortAdCard.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.hooks.helperMissing, alias5="function", lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n
\n \n
\n
\n

" + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"adAuthor") : stack1)) != null ? lookupProperty(stack1,"name") : stack1), depth0)) + + "

\n \n \n

" + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"adAuthor") : stack1)) != null ? lookupProperty(stack1,"rating") : stack1), depth0)) + + "

\n
\n \n \n

" + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"cityName") : stack1), depth0)) + + "

\n
\n
\n
\n\n \n \n

" + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"address") : stack1), depth0)) + + "

\n
\n\n
\n " + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"description") : stack1), depth0)) + + "\n
\n\n
\n
\n Пол:\n " + + alias2(((helper = (helper = lookupProperty(helpers,"sex") || (depth0 != null ? lookupProperty(depth0,"sex") : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"sex","hash":{},"data":data,"loc":{"start":{"line":31,"column":49},"end":{"line":31,"column":56}}}) : helper))) + + "\n
\n
\n Возраст:\n " + + alias2(((helper = (helper = lookupProperty(helpers,"age") || (depth0 != null ? lookupProperty(depth0,"age") : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"age","hash":{},"data":data,"loc":{"start":{"line":35,"column":49},"end":{"line":35,"column":56}}}) : helper))) + + "\n
\n
\n Всего гостей:\n " + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"adAuthor") : stack1)) != null ? lookupProperty(stack1,"guestCount") : stack1), depth0)) + + "\n
\n
\n\n
\n \n \n
\n
"; +},"useData":true}); +templates['AdListPage.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n

Список объявлений

\n \n
\n
\n" + + ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"empty") : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":9,"column":12},"end":{"line":11,"column":19}}})) != null ? stack1 : "") + + "
\n"; +},"2":function(container,depth0,helpers,partials,data) { + return "

Здесь пока пусто... 🕳️

\n"; +},"4":function(container,depth0,helpers,partials,data) { + return "

🚫Вы не являетесь хостом,\n поэтому не можете создавать объявления.

\n

Если вы хотите стать хостом,\n пожалуйста, измените свой статус в настройках

\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n" + + ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"isHost") : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data,"loc":{"start":{"line":2,"column":4},"end":{"line":18,"column":11}}})) != null ? stack1 : "") + + "
"; +},"useData":true}); +templates['AdPage.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " \r\n"; +},"3":function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " \r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n
\r\n \r\n\r\n \r\n\r\n \r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n"; +},"useData":true}); +templates['CityPhoto.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\n
\n \n

" + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"name") : depth0), depth0)) + + "

\n
\n\n
\n " + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"description") : depth0), depth0)) + + "\n
\n
"; +},"useData":true}); +templates['EditAdvertPage.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " \r\n" + + ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"isTextArea") : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data,"loc":{"start":{"line":39,"column":16},"end":{"line":77,"column":23}}})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " " + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"value") : depth0), depth0)) + + "\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"isSelect") : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(9, data, 0),"data":data,"loc":{"start":{"line":47,"column":16},"end":{"line":77,"column":16}}})) != null ? stack1 : ""); +},"5":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " \r\n" + + ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"options") : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":52,"column":24},"end":{"line":59,"column":33}}})) != null ? stack1 : "") + + " \r\n\r\n"; +},"6":function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " " + + alias2(alias1((depth0 != null ? lookupProperty(depth0,"value") : depth0), depth0)) + + "\r\n"; +},"7":function(container,depth0,helpers,partials,data) { + return " selected='selected'\r\n"; +},"9":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " \r\n "; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n
\r\n \r\n
\r\n\r\n
\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"inputs") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":37,"column":12},"end":{"line":78,"column":21}}})) != null ? stack1 : "") + + " \r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n"; +},"useData":true}); +templates['SecondaryImage.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ""; +},"useData":true}); +})(); \ No newline at end of file diff --git a/manifest.json b/public/manifest.json similarity index 93% rename from manifest.json rename to public/manifest.json index f87f4936..e43b9184 100644 --- a/manifest.json +++ b/public/manifest.json @@ -12,13 +12,13 @@ { "src": "/screenshots/wide-1.png", "type": "image/png", - "sizes": "1900x900", + "sizes": "1901x900", "form_factor": "wide" }, { "src": "/screenshots/wide-2.png", "type": "image/png", - "sizes": "1900x900", + "sizes": "1901x900", "form_factor": "wide" } ], diff --git a/run.sh b/run.sh deleted file mode 100644 index 02634e23..00000000 --- a/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -docker build --tag frontend . -docker run -p 80:80 --detach 'frontend' diff --git a/components/AdCard/AdCard.hbs b/src/components/AdCard/AdCard.hbs similarity index 100% rename from components/AdCard/AdCard.hbs rename to src/components/AdCard/AdCard.hbs diff --git a/components/AdCard/AdCard.scss b/src/components/AdCard/AdCard.scss similarity index 100% rename from components/AdCard/AdCard.scss rename to src/components/AdCard/AdCard.scss diff --git a/components/AdCard/AdCard.ts b/src/components/AdCard/AdCard.ts similarity index 100% rename from components/AdCard/AdCard.ts rename to src/components/AdCard/AdCard.ts diff --git a/components/AuthPopup/AuthPopup.hbs b/src/components/AuthPopup/AuthPopup.hbs similarity index 100% rename from components/AuthPopup/AuthPopup.hbs rename to src/components/AuthPopup/AuthPopup.hbs diff --git a/components/AuthPopup/AuthPopup.scss b/src/components/AuthPopup/AuthPopup.scss similarity index 100% rename from components/AuthPopup/AuthPopup.scss rename to src/components/AuthPopup/AuthPopup.scss diff --git a/components/AuthPopup/AuthPopup.ts b/src/components/AuthPopup/AuthPopup.ts similarity index 100% rename from components/AuthPopup/AuthPopup.ts rename to src/components/AuthPopup/AuthPopup.ts diff --git a/components/Filter/Filter.hbs b/src/components/Filter/Filter.hbs similarity index 100% rename from components/Filter/Filter.hbs rename to src/components/Filter/Filter.hbs diff --git a/components/Filter/Filter.scss b/src/components/Filter/Filter.scss similarity index 98% rename from components/Filter/Filter.scss rename to src/components/Filter/Filter.scss index 64d661ad..d1251c5e 100644 --- a/components/Filter/Filter.scss +++ b/src/components/Filter/Filter.scss @@ -1,4 +1,4 @@ -@use '../../mixins'; +@use '../../styles/mixins'; #main-content { width: 93%; diff --git a/components/Filter/Filter.ts b/src/components/Filter/Filter.ts similarity index 100% rename from components/Filter/Filter.ts rename to src/components/Filter/Filter.ts diff --git a/components/Header/Header.scss b/src/components/Header/Header.scss similarity index 100% rename from components/Header/Header.scss rename to src/components/Header/Header.scss diff --git a/components/Header/Header.ts b/src/components/Header/Header.ts similarity index 100% rename from components/Header/Header.ts rename to src/components/Header/Header.ts diff --git a/components/HorizontalAdCard/HorizontalAdCard.hbs b/src/components/HorizontalAdCard/HorizontalAdCard.hbs similarity index 100% rename from components/HorizontalAdCard/HorizontalAdCard.hbs rename to src/components/HorizontalAdCard/HorizontalAdCard.hbs diff --git a/components/HorizontalAdCard/HorizontalAdCard.ts b/src/components/HorizontalAdCard/HorizontalAdCard.ts similarity index 100% rename from components/HorizontalAdCard/HorizontalAdCard.ts rename to src/components/HorizontalAdCard/HorizontalAdCard.ts diff --git a/components/MainPhoto/MainPhoto.scss b/src/components/MainPhoto/MainPhoto.scss similarity index 100% rename from components/MainPhoto/MainPhoto.scss rename to src/components/MainPhoto/MainPhoto.scss diff --git a/components/MainPhoto/MainPhoto.ts b/src/components/MainPhoto/MainPhoto.ts similarity index 100% rename from components/MainPhoto/MainPhoto.ts rename to src/components/MainPhoto/MainPhoto.ts diff --git a/components/PopupAlert/PopupAlert.hbs b/src/components/PopupAlert/PopupAlert.hbs similarity index 100% rename from components/PopupAlert/PopupAlert.hbs rename to src/components/PopupAlert/PopupAlert.hbs diff --git a/components/PopupAlert/PopupAlert.scss b/src/components/PopupAlert/PopupAlert.scss similarity index 100% rename from components/PopupAlert/PopupAlert.scss rename to src/components/PopupAlert/PopupAlert.scss diff --git a/components/PopupAlert/PopupAlert.ts b/src/components/PopupAlert/PopupAlert.ts similarity index 100% rename from components/PopupAlert/PopupAlert.ts rename to src/components/PopupAlert/PopupAlert.ts diff --git a/components/ProfileData/EditForm.hbs b/src/components/ProfileData/EditForm.hbs similarity index 100% rename from components/ProfileData/EditForm.hbs rename to src/components/ProfileData/EditForm.hbs diff --git a/components/ProfileData/NoReviews/NoReviews.hbs b/src/components/ProfileData/NoReviews/NoReviews.hbs similarity index 100% rename from components/ProfileData/NoReviews/NoReviews.hbs rename to src/components/ProfileData/NoReviews/NoReviews.hbs diff --git a/components/ProfileData/NoReviews/NoReviews.sass b/src/components/ProfileData/NoReviews/NoReviews.sass similarity index 94% rename from components/ProfileData/NoReviews/NoReviews.sass rename to src/components/ProfileData/NoReviews/NoReviews.sass index febaeb40..10455ed2 100644 --- a/components/ProfileData/NoReviews/NoReviews.sass +++ b/src/components/ProfileData/NoReviews/NoReviews.sass @@ -1,4 +1,4 @@ -@use '../../../mixins' +@use '../../../styles/mixins' .no-reviews width: 100% diff --git a/components/ProfileData/NoReviews/NoReviews.ts b/src/components/ProfileData/NoReviews/NoReviews.ts similarity index 100% rename from components/ProfileData/NoReviews/NoReviews.ts rename to src/components/ProfileData/NoReviews/NoReviews.ts diff --git a/components/ProfileData/ProfileData.sass b/src/components/ProfileData/ProfileData.sass similarity index 100% rename from components/ProfileData/ProfileData.sass rename to src/components/ProfileData/ProfileData.sass diff --git a/components/ProfileData/ProfileData.ts b/src/components/ProfileData/ProfileData.ts similarity index 100% rename from components/ProfileData/ProfileData.ts rename to src/components/ProfileData/ProfileData.ts diff --git a/components/ProfileData/RatingForm.hbs b/src/components/ProfileData/RatingForm.hbs similarity index 100% rename from components/ProfileData/RatingForm.hbs rename to src/components/ProfileData/RatingForm.hbs diff --git a/components/ProfileData/RatingForm.sass b/src/components/ProfileData/RatingForm.sass similarity index 99% rename from components/ProfileData/RatingForm.sass rename to src/components/ProfileData/RatingForm.sass index 71d8bc5f..25d50b90 100644 --- a/components/ProfileData/RatingForm.sass +++ b/src/components/ProfileData/RatingForm.sass @@ -1,4 +1,4 @@ -@use '../../mixins' +@use '../../styles/mixins' $unchecked-color: #ffffff // Цвет для невыбранных звезд $checked-color: #FFA552 // Цвет для выбранных звезд diff --git a/components/ProfileInfo/ProfileInfo.hbs b/src/components/ProfileInfo/ProfileInfo.hbs similarity index 100% rename from components/ProfileInfo/ProfileInfo.hbs rename to src/components/ProfileInfo/ProfileInfo.hbs diff --git a/components/ProfileInfo/ProfileInfo.scss b/src/components/ProfileInfo/ProfileInfo.scss similarity index 99% rename from components/ProfileInfo/ProfileInfo.scss rename to src/components/ProfileInfo/ProfileInfo.scss index e9fc341c..21148a52 100644 --- a/components/ProfileInfo/ProfileInfo.scss +++ b/src/components/ProfileInfo/ProfileInfo.scss @@ -1,4 +1,4 @@ -@use '../../mixins'; +@use '../../styles/mixins'; .profile-container { margin: 40px 0px 0px 35%; diff --git a/components/ProfileInfo/ProfileInfo.ts b/src/components/ProfileInfo/ProfileInfo.ts similarity index 100% rename from components/ProfileInfo/ProfileInfo.ts rename to src/components/ProfileInfo/ProfileInfo.ts diff --git a/components/ProfilePopup/ProfilePopup.hbs b/src/components/ProfilePopup/ProfilePopup.hbs similarity index 100% rename from components/ProfilePopup/ProfilePopup.hbs rename to src/components/ProfilePopup/ProfilePopup.hbs diff --git a/components/ProfilePopup/ProfilePopup.scss b/src/components/ProfilePopup/ProfilePopup.scss similarity index 100% rename from components/ProfilePopup/ProfilePopup.scss rename to src/components/ProfilePopup/ProfilePopup.scss diff --git a/components/ProfilePopup/ProfilePopup.ts b/src/components/ProfilePopup/ProfilePopup.ts similarity index 100% rename from components/ProfilePopup/ProfilePopup.ts rename to src/components/ProfilePopup/ProfilePopup.ts diff --git a/components/ReactiveComponent/ReactiveComponent.ts b/src/components/ReactiveComponent/ReactiveComponent.ts similarity index 100% rename from components/ReactiveComponent/ReactiveComponent.ts rename to src/components/ReactiveComponent/ReactiveComponent.ts diff --git a/components/ReviewCard/ReviewCard.hbs b/src/components/ReviewCard/ReviewCard.hbs similarity index 100% rename from components/ReviewCard/ReviewCard.hbs rename to src/components/ReviewCard/ReviewCard.hbs diff --git a/components/ReviewCard/ReviewCard.sass b/src/components/ReviewCard/ReviewCard.sass similarity index 100% rename from components/ReviewCard/ReviewCard.sass rename to src/components/ReviewCard/ReviewCard.sass diff --git a/components/ReviewCard/ReviewCard.ts b/src/components/ReviewCard/ReviewCard.ts similarity index 100% rename from components/ReviewCard/ReviewCard.ts rename to src/components/ReviewCard/ReviewCard.ts diff --git a/components/ReviewsGraphic/ReviewsGraphic.hbs b/src/components/ReviewsGraphic/ReviewsGraphic.hbs similarity index 100% rename from components/ReviewsGraphic/ReviewsGraphic.hbs rename to src/components/ReviewsGraphic/ReviewsGraphic.hbs diff --git a/components/ReviewsGraphic/ReviewsGraphic.sass b/src/components/ReviewsGraphic/ReviewsGraphic.sass similarity index 100% rename from components/ReviewsGraphic/ReviewsGraphic.sass rename to src/components/ReviewsGraphic/ReviewsGraphic.sass diff --git a/components/ReviewsGraphic/ReviewsGraphic.ts b/src/components/ReviewsGraphic/ReviewsGraphic.ts similarity index 100% rename from components/ReviewsGraphic/ReviewsGraphic.ts rename to src/components/ReviewsGraphic/ReviewsGraphic.ts diff --git a/components/SearchPopup/SearchPopup.hbs b/src/components/SearchPopup/SearchPopup.hbs similarity index 100% rename from components/SearchPopup/SearchPopup.hbs rename to src/components/SearchPopup/SearchPopup.hbs diff --git a/components/SearchPopup/SearchPopup.sass b/src/components/SearchPopup/SearchPopup.sass similarity index 100% rename from components/SearchPopup/SearchPopup.sass rename to src/components/SearchPopup/SearchPopup.sass diff --git a/components/SearchPopup/SearchPopup.ts b/src/components/SearchPopup/SearchPopup.ts similarity index 100% rename from components/SearchPopup/SearchPopup.ts rename to src/components/SearchPopup/SearchPopup.ts diff --git a/components/ShortAdCard/ShortAdCard.hbs b/src/components/ShortAdCard/ShortAdCard.hbs similarity index 100% rename from components/ShortAdCard/ShortAdCard.hbs rename to src/components/ShortAdCard/ShortAdCard.hbs diff --git a/components/ShortAdCard/ShortAdCard.sass b/src/components/ShortAdCard/ShortAdCard.sass similarity index 98% rename from components/ShortAdCard/ShortAdCard.sass rename to src/components/ShortAdCard/ShortAdCard.sass index f1ee1824..8b9e698d 100644 --- a/components/ShortAdCard/ShortAdCard.sass +++ b/src/components/ShortAdCard/ShortAdCard.sass @@ -1,4 +1,4 @@ -@use '../../mixins' as mixins +@use '../../styles/mixins' as mixins .short-card border: solid diff --git a/components/ShortAdCard/ShortAdCard.ts b/src/components/ShortAdCard/ShortAdCard.ts similarity index 100% rename from components/ShortAdCard/ShortAdCard.ts rename to src/components/ShortAdCard/ShortAdCard.ts diff --git a/components/Spinner/Spinner.scss b/src/components/Spinner/Spinner.scss similarity index 100% rename from components/Spinner/Spinner.scss rename to src/components/Spinner/Spinner.scss diff --git a/components/Spinner/Spinner.ts b/src/components/Spinner/Spinner.ts similarity index 100% rename from components/Spinner/Spinner.ts rename to src/components/Spinner/Spinner.ts diff --git a/src/components/precompiled-templates.js b/src/components/precompiled-templates.js new file mode 100644 index 00000000..44355418 --- /dev/null +++ b/src/components/precompiled-templates.js @@ -0,0 +1,702 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; + templates['AdCard.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + return '
\r\n'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n \r\n
\r\n \r\n
\r\n \r\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias1,(depth0 != null ? lookupProperty(depth0,'images') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':11,'column':12},'end':{'line':13,'column':21}}})) != null ? stack1 : '') + + ' \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n

' + + alias4(((helper = (helper = lookupProperty(helpers,'cityName') || (depth0 != null ? lookupProperty(depth0,'cityName') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'cityName','hash':{},'data':data,'loc':{'start':{'line':80,'column':42},'end':{'line':80,'column':54}}}) : helper))) + + '

\r\n

' + + alias4(((helper = (helper = lookupProperty(helpers,'address') || (depth0 != null ? lookupProperty(depth0,'address') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'address','hash':{},'data':data,'loc':{'start':{'line':81,'column':45},'end':{'line':81,'column':56}}}) : helper))) + + '

\r\n
\r\n \r\n \r\n

' + + alias4(((helper = (helper = lookupProperty(helpers,'viewsCount') || (depth0 != null ? lookupProperty(depth0,'viewsCount') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'viewsCount','hash':{},'data':data,'loc':{'start':{'line':89,'column':53},'end':{'line':89,'column':67}}}) : helper))) + + '

\r\n
\r\n
\r\n
\r\n
\r\n \r\n

' + + alias4(alias5(((stack1 = (depth0 != null ? lookupProperty(depth0,'adAuthor') : depth0)) != null ? lookupProperty(stack1,'name') : stack1), depth0)) + + '

\r\n
\r\n \'star\'\r\n ' + + alias4(alias5(((stack1 = (depth0 != null ? lookupProperty(depth0,'adAuthor') : depth0)) != null ? lookupProperty(stack1,'rating') : stack1), depth0)) + + '\r\n
\r\n
\r\n
\r\n
'; + },'useData':true}); + templates['AdListPage.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n

Список объявлений

\n \n
\n
\n' + + ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'empty') : depth0),{'name':'if','hash':{},'fn':container.program(2, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':9,'column':12},'end':{'line':11,'column':19}}})) != null ? stack1 : '') + + '
\n'; + },'2':function(container,depth0,helpers,partials,data) { + return '

Здесь пока пусто... 🕳️

\n'; + },'4':function(container,depth0,helpers,partials,data) { + return '

🚫Вы не являетесь хостом,\n поэтому не можете создавать объявления.

\n

Если вы хотите стать хостом,\n пожалуйста, измените свой статус в настройках

\n'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n' + + ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'isHost') : depth0),{'name':'if','hash':{},'fn':container.program(1, data, 0),'inverse':container.program(4, data, 0),'data':data,'loc':{'start':{'line':2,'column':4},'end':{'line':18,'column':11}}})) != null ? stack1 : '') + + '
'; + },'useData':true}); + templates['AdPage.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' \r\n'; + },'3':function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' \r\n'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Просмотрено

\r\n

' + + alias4(((helper = (helper = lookupProperty(helpers,'viewsCount') || (depth0 != null ? lookupProperty(depth0,'viewsCount') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'viewsCount','hash':{},'data':data,'loc':{'start':{'line':72,'column':53},'end':{'line':72,'column':67}}}) : helper))) + + ' раз

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Понравилось

\r\n

5 раз

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Посещено

\r\n

3 раз

\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n Город:\r\n ' + + alias4(((helper = (helper = lookupProperty(helpers,'cityName') || (depth0 != null ? lookupProperty(depth0,'cityName') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'cityName','hash':{},'data':data,'loc':{'start':{'line':103,'column':49},'end':{'line':103,'column':61}}}) : helper))) + + '\r\n Адрес:\r\n ' + + alias4(((helper = (helper = lookupProperty(helpers,'address') || (depth0 != null ? lookupProperty(depth0,'address') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'address','hash':{},'data':data,'loc':{'start':{'line':105,'column':49},'end':{'line':105,'column':60}}}) : helper))) + + '\r\n Комнаты:\r\n ' + + alias4(((helper = (helper = lookupProperty(helpers,'roomsNumber') || (depth0 != null ? lookupProperty(depth0,'roomsNumber') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'roomsNumber','hash':{},'data':data,'loc':{'start':{'line':107,'column':49},'end':{'line':107,'column':64}}}) : helper))) + + '\r\n Описание:\r\n ' + + alias4(((helper = (helper = lookupProperty(helpers,'description') || (depth0 != null ? lookupProperty(depth0,'description') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'description','hash':{},'data':data,'loc':{'start':{'line':109,'column':49},'end':{'line':109,'column':64}}}) : helper))) + + '\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n'; + },'useData':true}); + templates['AuthPopup.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + var helper, alias1=container.escapeExpression, alias2=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n \n\n \n \n

\n
\n'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n
\n
\n \n \n \n
\n \n\n
' + + alias4(((helper = (helper = lookupProperty(helpers,'authMessage') || (depth0 != null ? lookupProperty(depth0,'authMessage') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'authMessage','hash':{},'data':data,'loc':{'start':{'line':10,'column':34},'end':{'line':10,'column':49}}}) : helper))) + + '
\n
Неправильный логин или\n пароль!
\n
\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias1,(depth0 != null ? lookupProperty(depth0,'inputs') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':14,'column':12},'end':{'line':34,'column':21}}})) != null ? stack1 : '') + + '\n
\n \n

' + + alias4(((helper = (helper = lookupProperty(helpers,'bottomText') || (depth0 != null ? lookupProperty(depth0,'bottomText') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'bottomText','hash':{},'data':data,'loc':{'start':{'line':38,'column':37},'end':{'line':38,'column':51}}}) : helper))) + + '

\n ' + + alias4(((helper = (helper = lookupProperty(helpers,'bottomAText') || (depth0 != null ? lookupProperty(depth0,'bottomAText') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'bottomAText','hash':{},'data':data,'loc':{'start':{'line':39,'column':42},'end':{'line':39,'column':57}}}) : helper))) + + '\n
\n
\n
'; + },'useData':true}); + templates['CityPhoto.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n
\n \n

' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'name') : depth0), depth0)) + + '

\n
\n\n
\n ' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'description') : depth0), depth0)) + + '\n
\n
'; + },'useData':true}); + templates['EditAdvertPage.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' \r\n' + + ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'isTextArea') : depth0),{'name':'if','hash':{},'fn':container.program(2, data, 0),'inverse':container.program(4, data, 0),'data':data,'loc':{'start':{'line':39,'column':16},'end':{'line':77,'column':23}}})) != null ? stack1 : ''); + },'2':function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' ' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'value') : depth0), depth0)) + + '\r\n'; + },'4':function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'isSelect') : depth0),{'name':'if','hash':{},'fn':container.program(5, data, 0),'inverse':container.program(9, data, 0),'data':data,'loc':{'start':{'line':47,'column':16},'end':{'line':77,'column':16}}})) != null ? stack1 : ''); + },'5':function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' \r\n' + + ((stack1 = lookupProperty(helpers,'each').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'options') : depth0),{'name':'each','hash':{},'fn':container.program(6, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':52,'column':24},'end':{'line':59,'column':33}}})) != null ? stack1 : '') + + ' \r\n\r\n'; + },'6':function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' ' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'value') : depth0), depth0)) + + '\r\n'; + },'7':function(container,depth0,helpers,partials,data) { + return ' selected=\'selected\'\r\n'; + },'9':function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' \r\n '; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias1,(depth0 != null ? lookupProperty(depth0,'inputs') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':37,'column':12},'end':{'line':78,'column':21}}})) != null ? stack1 : '') + + ' \r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n'; + },'useData':true}); + templates['SecondaryImage.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ''; + },'useData':true}); + templates['Filter.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n \r\n \r\n
\r\n'; + },'2':function(container,depth0,helpers,partials,data) { + return 'checked'; + },'4':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n \r\n \r\n
\r\n'; + },'6':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n \r\n \r\n
\r\n'; + },'8':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n \r\n \r\n
\r\n'; + },'10':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n \r\n \r\n
\r\n'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n
\r\n

По геопозиции

\r\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'geoposition') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':4,'column':4},'end':{'line':9,'column':13}}})) != null ? stack1 : '') + + '
\r\n
\r\n
\r\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'rating') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(4, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':13,'column':4},'end':{'line':18,'column':13}}})) != null ? stack1 : '') + + '
\r\n
\r\n
\r\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'new') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(6, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':22,'column':4},'end':{'line':27,'column':13}}})) != null ? stack1 : '') + + '
\r\n
\r\n
\r\n

Пол хоста

\r\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'gender') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(8, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':32,'column':4},'end':{'line':37,'column':13}}})) != null ? stack1 : '') + + '
\r\n
\r\n
\r\n

Количество гостей

\r\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'visitors') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(10, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':42,'column':4},'end':{'line':47,'column':13}}})) != null ? stack1 : '') + + '
\r\n \r\n \r\n \r\n
\r\n'; + },'useData':true}); + templates['HorizontalAdCard.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=container.escapeExpression, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4='function', lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\r\n \r\n\r\n
\r\n \r\n \r\n \r\n\r\n

' + + alias1(((helper = (helper = lookupProperty(helpers,'cityName') || (depth0 != null ? lookupProperty(depth0,'cityName') : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{'name':'cityName','hash':{},'data':data,'loc':{'start':{'line':20,'column':44},'end':{'line':20,'column':56}}}) : helper))) + + '

\r\n

' + + alias1(((helper = (helper = lookupProperty(helpers,'address') || (depth0 != null ? lookupProperty(depth0,'address') : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{'name':'address','hash':{},'data':data,'loc':{'start':{'line':21,'column':47},'end':{'line':21,'column':58}}}) : helper))) + + '

\r\n
\r\n Открыть\r\n Редактировать\r\n Удалить\r\n
\r\n
\r\n
'; + },'useData':true}); + templates['PopupAlert.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n ' + + container.escapeExpression(((helper = (helper = lookupProperty(helpers,'message') || (depth0 != null ? lookupProperty(depth0,'message') : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === 'function' ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{'name':'message','hash':{},'data':data,'loc':{'start':{'line':2,'column':4},'end':{'line':2,'column':15}}}) : helper))) + + '\n
'; + },'useData':true}); + templates['EditForm.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + return 'checked'; + },'3':function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' value="' + + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'birthdate') : stack1), depth0)) + + '" '; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n
\n \n
\n
\n

Обновление профиля

\n
\n \n
\n
\n
\n

Никнейм:

\n \n \n !\n \n
\n
\n
\n

Имя:

\n \n \n !\n \n
\n
\n
\n

Почта:

\n \n \n !\n \n
\n
\n
\n

Пол:

\n
\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n

День рождения:

\n \n \n !\n \n
\n
\n
\n

Хост:

\n \n
\n
\n

Адрес:

\n \n \n !\n \n
\n
\n
\n\n\n
\n
\n \n
\n
\n \n
\n\n
\n \n \n
\n
\n
\n
'; + },'useData':true}); + templates['NoReviews.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + return '

Отзывов пока нет.

\n'; + },'3':function(container,depth0,helpers,partials,data) { + return '

Отзывов пока нет. Станьте первым!

\n
\n \n
\n'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n
\n \n
\n\n
\n' + + ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'isMyProfile') : depth0),{'name':'if','hash':{},'fn':container.program(1, data, 0),'inverse':container.program(3, data, 0),'data':data,'loc':{'start':{'line':7,'column':8},'end':{'line':16,'column':15}}})) != null ? stack1 : '') + + '
\n
'; + },'useData':true}); + templates['RatingForm.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + return '
\n

Ваш отзыв

\n
\n

Общая оценка

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n'; + },'useData':true}); + templates['ProfileInfo.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '\n ' + + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'age') : stack1), depth0)) + + '\n '; + },'3':function(container,depth0,helpers,partials,data) { + return 'Не указано'; + },'5':function(container,depth0,helpers,partials,data) { + return 'Да'; + },'7':function(container,depth0,helpers,partials,data) { + return 'Нет'; + },'9':function(container,depth0,helpers,partials,data) { + return 'Изменить'; + },'11':function(container,depth0,helpers,partials,data) { + return 'Оценить'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n
\n
\n \n
\n

' + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'name') : stack1), depth0)) + + '

\n
\n
\n\n
\n
\n
Рейтинг:
\n
\n \n \n ' + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'score') : stack1), depth0)) + + '\n \n \n \n \n
\n
\n
\n
Пол:
\n

' + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'sex') : stack1), depth0)) + + '

\n
\n
\n
Возраст:
\n

' + + ((stack1 = lookupProperty(helpers,'if').call(alias3,(depth0 != null ? lookupProperty(depth0,'isCorrectAge') : depth0),{'name':'if','hash':{},'fn':container.program(1, data, 0),'inverse':container.program(3, data, 0),'data':data,'loc':{'start':{'line':33,'column':47},'end':{'line':35,'column':41}}})) != null ? stack1 : '') + + '

\n
\n
\n
Хост:
\n

' + + ((stack1 = lookupProperty(helpers,'if').call(alias3,((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'isHost') : stack1),{'name':'if','hash':{},'fn':container.program(5, data, 0),'inverse':container.program(7, data, 0),'data':data,'loc':{'start':{'line':39,'column':47},'end':{'line':41,'column':38}}})) != null ? stack1 : '') + + '

\n
\n
\n
Серферы:
\n

' + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'guestCount') : stack1), depth0)) + + '

\n
\n
\n\n
\n
\n ' + + ((stack1 = lookupProperty(helpers,'if').call(alias3,(depth0 != null ? lookupProperty(depth0,'isMyProfile') : depth0),{'name':'if','hash':{},'fn':container.program(9, data, 0),'inverse':container.program(11, data, 0),'data':data,'loc':{'start':{'line':54,'column':13},'end':{'line':54,'column':62}}})) != null ? stack1 : '') + + '\n
\n
\n
'; + },'useData':true}); + templates['ProfilePopup.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + var helper, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n \n ' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'title') : depth0), depth0)) + + '\n \n
\n
\n'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n
\n' + + ((stack1 = lookupProperty(helpers,'each').call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':3,'column':8},'end':{'line':14,'column':17}}})) != null ? stack1 : '') + + '
\n
'; + },'useData':true}); + templates['ReviewCard.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, alias4=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n
\n
\n
\n \n
\n

' + + alias3(alias4((depth0 != null ? lookupProperty(depth0,'userName') : depth0), depth0)) + + '

\n
\n\n
\n

' + + alias3(alias4((depth0 != null ? lookupProperty(depth0,'title') : depth0), depth0)) + + '

\n
\n ' + + alias3(alias4((depth0 != null ? lookupProperty(depth0,'text') : depth0), depth0)) + + '\n
\n
\n
\n\n
\n
\n ' + + alias3((lookupProperty(helpers,'renderStars')||(depth0 && lookupProperty(depth0,'renderStars'))||alias2).call(alias1,(depth0 != null ? lookupProperty(depth0,'rating') : depth0),{'name':'renderStars','hash':{},'data':data,'loc':{'start':{'line':20,'column':12},'end':{'line':20,'column':39}}})) + + '\n
\n
\n ' + + alias3(alias4((depth0 != null ? lookupProperty(depth0,'createdAt') : depth0), depth0)) + + '\n
\n
\n
'; + },'useData':true}); + templates['ReviewsGraphic.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.hooks.helperMissing, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n \n Извините, ваш браузер не поддерживает <canvas> элемент.\n \n\n
\n Изменение рейтинга\n Изменение среднего рейтинга\n
\n\n
\n

Всего оценок: ' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'totalRatings') : depth0), depth0)) + + '

\n

Дата первой оценки: ' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'firstDate') : depth0), depth0)) + + '

\n

Дата последней оценки: ' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'lastDate') : depth0), depth0)) + + '

\n

Наибольшая оценка: ' + + alias2((lookupProperty(helpers,'renderStars')||(depth0 && lookupProperty(depth0,'renderStars'))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,'highestRating') : depth0),{'name':'renderStars','hash':{},'data':data,'loc':{'start':{'line':15,'column':30},'end':{'line':15,'column':64}}})) + + '

\n

Наименьшая оценка: ' + + alias2((lookupProperty(helpers,'renderStars')||(depth0 && lookupProperty(depth0,'renderStars'))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,'lowestRating') : depth0),{'name':'renderStars','hash':{},'data':data,'loc':{'start':{'line':16,'column':30},'end':{'line':16,'column':63}}})) + + '

\n
\n
\n'; + },'useData':true}); + templates['SearchPopup.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return ' ' + + alias2(alias1((depth0 != null ? lookupProperty(depth0,'title') : depth0), depth0)) + + '\n'; + },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n \n\n
\n
\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias3,(depth0 != null ? lookupProperty(depth0,'firstGroup') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':9,'column':12},'end':{'line':11,'column':21}}})) != null ? stack1 : '') + + '
\n
\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias3,(depth0 != null ? lookupProperty(depth0,'secondGroup') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':14,'column':12},'end':{'line':16,'column':21}}})) != null ? stack1 : '') + + '
\n
\n' + + ((stack1 = lookupProperty(helpers,'each').call(alias3,(depth0 != null ? lookupProperty(depth0,'thirdGroup') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':19,'column':12},'end':{'line':21,'column':21}}})) != null ? stack1 : '') + + '
\n
\n
\n\n'; + },'useData':true}); + templates['ShortAdCard.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.hooks.helperMissing, alias5='function', lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined; + }; + + return '
\n
\n
\n \n
\n
\n

' + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'adAuthor') : stack1)) != null ? lookupProperty(stack1,'name') : stack1), depth0)) + + '

\n \n \n

' + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'adAuthor') : stack1)) != null ? lookupProperty(stack1,'rating') : stack1), depth0)) + + '

\n
\n \n \n

' + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'cityName') : stack1), depth0)) + + '

\n
\n
\n
\n\n \n \n

' + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'address') : stack1), depth0)) + + '

\n
\n\n
\n ' + + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'description') : stack1), depth0)) + + '\n
\n\n
\n
\n Пол:\n ' + + alias2(((helper = (helper = lookupProperty(helpers,'sex') || (depth0 != null ? lookupProperty(depth0,'sex') : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{'name':'sex','hash':{},'data':data,'loc':{'start':{'line':31,'column':49},'end':{'line':31,'column':56}}}) : helper))) + + '\n
\n
\n Возраст:\n ' + + alias2(((helper = (helper = lookupProperty(helpers,'age') || (depth0 != null ? lookupProperty(depth0,'age') : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{'name':'age','hash':{},'data':data,'loc':{'start':{'line':35,'column':49},'end':{'line':35,'column':56}}}) : helper))) + + '\n
\n
\n Всего гостей:\n ' + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'adAuthor') : stack1)) != null ? lookupProperty(stack1,'guestCount') : stack1), depth0)) + + '\n
\n
\n\n
\n \n \n
\n
'; + },'useData':true}); +})(); \ No newline at end of file diff --git a/include/handlebars.runtime.js b/src/include/handlebars.runtime.js similarity index 57% rename from include/handlebars.runtime.js rename to src/include/handlebars.runtime.js index 662b5793..3b74b5f7 100644 --- a/include/handlebars.runtime.js +++ b/src/include/handlebars.runtime.js @@ -25,98 +25,98 @@ THE SOFTWARE. */ (function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["Handlebars"] = factory(); - else - root["Handlebars"] = factory(); + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports['Handlebars'] = factory(); + else + root['Handlebars'] = factory(); })(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; + return /******/ (function(modules) { // webpackBootstrap + /******/ // The module cache + /******/ var installedModules = {}; -/******/ // The require function -/******/ function __webpack_require__(moduleId) { + /******/ // The require function + /******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; + /******/ // Check if module is in cache + /******/ if(installedModules[moduleId]) + /******/ return installedModules[moduleId].exports; -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; + /******/ // Create a new module (and put it into the cache) + /******/ var module = installedModules[moduleId] = { + /******/ exports: {}, + /******/ id: moduleId, + /******/ loaded: false + /******/ }; -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + /******/ // Execute the module function + /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ // Flag the module as loaded -/******/ module.loaded = true; + /******/ // Flag the module as loaded + /******/ module.loaded = true; -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } + /******/ // Return the exports of the module + /******/ return module.exports; + /******/ } -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; + /******/ // expose the modules object (__webpack_modules__) + /******/ __webpack_require__.m = modules; -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; + /******/ // expose the module cache + /******/ __webpack_require__.c = installedModules; -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; + /******/ // __webpack_public_path__ + /******/ __webpack_require__.p = ''; -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { + /******/ // Load entry module and return exports + /******/ return __webpack_require__(0); + /******/ }) + /************************************************************************/ + /******/ ([ + /* 0 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _interopRequireWildcard = __webpack_require__(1)['default']; + var _interopRequireWildcard = __webpack_require__(1)['default']; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; + exports.__esModule = true; - var _handlebarsBase = __webpack_require__(3); + var _handlebarsBase = __webpack_require__(3); - var base = _interopRequireWildcard(_handlebarsBase); + var base = _interopRequireWildcard(_handlebarsBase); - // Each of these augment the Handlebars object. No need to setup here. - // (This is done to easily share code between commonjs and browse envs) + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) - var _handlebarsSafeString = __webpack_require__(76); + var _handlebarsSafeString = __webpack_require__(76); - var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); - var _handlebarsException = __webpack_require__(5); + var _handlebarsException = __webpack_require__(5); - var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); - var _handlebarsUtils = __webpack_require__(4); + var _handlebarsUtils = __webpack_require__(4); - var Utils = _interopRequireWildcard(_handlebarsUtils); + var Utils = _interopRequireWildcard(_handlebarsUtils); - var _handlebarsRuntime = __webpack_require__(77); + var _handlebarsRuntime = __webpack_require__(77); - var runtime = _interopRequireWildcard(_handlebarsRuntime); + var runtime = _interopRequireWildcard(_handlebarsRuntime); - var _handlebarsNoConflict = __webpack_require__(82); + var _handlebarsNoConflict = __webpack_require__(82); - var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); - // For compatibility and usage outside of module systems, make the Handlebars object a namespace - function create() { + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { var hb = new base.HandlebarsEnvironment(); Utils.extend(hb, base); @@ -131,25 +131,25 @@ return /******/ (function(modules) { // webpackBootstrap }; return hb; - } + } - var inst = create(); - inst.create = create; + var inst = create(); + inst.create = create; - _handlebarsNoConflict2['default'](inst); + _handlebarsNoConflict2['default'](inst); - inst['default'] = inst; + inst['default'] = inst; - exports['default'] = inst; - module.exports = exports['default']; + exports['default'] = inst; + module.exports = exports['default']; -/***/ }), -/* 1 */ -/***/ (function(module, exports) { + /***/ }), + /* 1 */ + /***/ (function(module, exports) { - "use strict"; + 'use strict'; - exports["default"] = function (obj) { + exports['default'] = function (obj) { if (obj && obj.__esModule) { return obj; } else { @@ -161,62 +161,62 @@ return /******/ (function(modules) { // webpackBootstrap } } - newObj["default"] = obj; + newObj['default'] = obj; return newObj; } - }; + }; - exports.__esModule = true; + exports.__esModule = true; -/***/ }), -/* 2 */ -/***/ (function(module, exports) { + /***/ }), + /* 2 */ + /***/ (function(module, exports) { - "use strict"; + 'use strict'; - exports["default"] = function (obj) { + exports['default'] = function (obj) { return obj && obj.__esModule ? obj : { - "default": obj + 'default': obj }; - }; + }; - exports.__esModule = true; + exports.__esModule = true; -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 3 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; - exports.HandlebarsEnvironment = HandlebarsEnvironment; + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - var _exception = __webpack_require__(5); + var _exception = __webpack_require__(5); - var _exception2 = _interopRequireDefault(_exception); + var _exception2 = _interopRequireDefault(_exception); - var _helpers = __webpack_require__(9); + var _helpers = __webpack_require__(9); - var _decorators = __webpack_require__(69); + var _decorators = __webpack_require__(69); - var _logger = __webpack_require__(71); + var _logger = __webpack_require__(71); - var _logger2 = _interopRequireDefault(_logger); + var _logger2 = _interopRequireDefault(_logger); - var _internalProtoAccess = __webpack_require__(72); + var _internalProtoAccess = __webpack_require__(72); - var VERSION = '4.7.8'; - exports.VERSION = VERSION; - var COMPILER_REVISION = 8; - exports.COMPILER_REVISION = COMPILER_REVISION; - var LAST_COMPATIBLE_COMPILER_REVISION = 7; + var VERSION = '4.7.8'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 8; + exports.COMPILER_REVISION = COMPILER_REVISION; + var LAST_COMPATIBLE_COMPILER_REVISION = 7; - exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; - var REVISION_CHANGES = { + exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; + var REVISION_CHANGES = { 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it 2: '== 1.0.0-rc.3', 3: '== 1.0.0-rc.4', @@ -225,21 +225,21 @@ return /******/ (function(modules) { // webpackBootstrap 6: '>= 2.0.0-beta.1', 7: '>= 4.0.0 <4.3.0', 8: '>= 4.3.0' - }; + }; - exports.REVISION_CHANGES = REVISION_CHANGES; - var objectType = '[object Object]'; + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; - function HandlebarsEnvironment(helpers, partials, decorators) { + function HandlebarsEnvironment(helpers, partials, decorators) { this.helpers = helpers || {}; this.partials = partials || {}; this.decorators = decorators || {}; _helpers.registerDefaultHelpers(this); _decorators.registerDefaultDecorators(this); - } + } - HandlebarsEnvironment.prototype = { + HandlebarsEnvironment.prototype = { constructor: HandlebarsEnvironment, logger: _logger2['default'], @@ -293,46 +293,46 @@ return /******/ (function(modules) { // webpackBootstrap resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { _internalProtoAccess.resetLoggedProperties(); } - }; + }; - var log = _logger2['default'].log; + var log = _logger2['default'].log; - exports.log = log; - exports.createFrame = _utils.createFrame; - exports.logger = _logger2['default']; + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; -/***/ }), -/* 4 */ -/***/ (function(module, exports) { + /***/ }), + /* 4 */ + /***/ (function(module, exports) { - 'use strict'; + 'use strict'; - exports.__esModule = true; - exports.extend = extend; - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.createFrame = createFrame; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { '&': '&', '<': '<', '>': '>', '"': '"', - "'": ''', + '\'': ''', '`': '`', '=': '=' - }; + }; - var badChars = /[&<>"'`=]/g, + var badChars = /[&<>"'`=]/g, possible = /[&<>"'`=]/; - function escapeChar(chr) { + function escapeChar(chr) { return escape[chr]; - } + } - function extend(obj /* , ...source */) { + function extend(obj /* , ...source */) { for (var i = 1; i < arguments.length; i++) { for (var key in arguments[i]) { if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { @@ -342,46 +342,46 @@ return /******/ (function(modules) { // webpackBootstrap } return obj; - } + } - var toString = Object.prototype.toString; + var toString = Object.prototype.toString; - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /* eslint-disable func-style */ - var isFunction = function isFunction(value) { + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + + var isFunction = function isFunction(value) { return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { exports.isFunction = isFunction = function (value) { return typeof value === 'function' && toString.call(value) === '[object Function]'; }; - } - exports.isFunction = isFunction; + } + exports.isFunction = isFunction; - /* eslint-enable func-style */ + - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - }; + }; - exports.isArray = isArray; - // Older IE versions do not directly support indexOf so we must implement our own, sadly. + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. - function indexOf(array, value) { + function indexOf(array, value) { for (var i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return i; } } return -1; - } + } - function escapeExpression(string) { + function escapeExpression(string) { if (typeof string !== 'string') { // don't escape SafeStrings, since they're already safe if (string && string.toHTML) { @@ -402,9 +402,9 @@ return /******/ (function(modules) { // webpackBootstrap return string; } return string.replace(badChars, escapeChar); - } + } - function isEmpty(value) { + function isEmpty(value) { if (!value && value !== 0) { return true; } else if (isArray(value) && value.length === 0) { @@ -412,35 +412,35 @@ return /******/ (function(modules) { // webpackBootstrap } else { return false; } - } + } - function createFrame(object) { + function createFrame(object) { var frame = extend({}, object); frame._parent = object; return frame; - } + } - function blockParams(params, ids) { + function blockParams(params, ids) { params.path = ids; return params; - } + } - function appendContextPath(contextPath, id) { + function appendContextPath(contextPath, id) { return (contextPath ? contextPath + '.' : '') + id; - } + } -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 5 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _Object$defineProperty = __webpack_require__(6)['default']; + var _Object$defineProperty = __webpack_require__(6)['default']; - exports.__esModule = true; - var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; + exports.__esModule = true; + var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; - function Exception(message, node) { + function Exception(message, node) { var loc = node && node.loc, line = undefined, endLineNumber = undefined, @@ -492,34 +492,34 @@ return /******/ (function(modules) { // webpackBootstrap } catch (nop) { /* Ignore if the browser is very particular */ } - } + } - Exception.prototype = new Error(); + Exception.prototype = new Error(); - exports['default'] = Exception; - module.exports = exports['default']; + exports['default'] = Exception; + module.exports = exports['default']; -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 6 */ + /***/ (function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(7), __esModule: true }; + module.exports = { 'default': __webpack_require__(7), __esModule: true }; -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 7 */ + /***/ (function(module, exports, __webpack_require__) { - var $ = __webpack_require__(8); - module.exports = function defineProperty(it, key, desc){ + var $ = __webpack_require__(8); + module.exports = function defineProperty(it, key, desc){ return $.setDesc(it, key, desc); - }; + }; -/***/ }), -/* 8 */ -/***/ (function(module, exports) { + /***/ }), + /* 8 */ + /***/ (function(module, exports) { - var $Object = Object; - module.exports = { + var $Object = Object; + module.exports = { create: $Object.create, getProto: $Object.getPrototypeOf, isEnum: {}.propertyIsEnumerable, @@ -530,49 +530,49 @@ return /******/ (function(modules) { // webpackBootstrap getNames: $Object.getOwnPropertyNames, getSymbols: $Object.getOwnPropertySymbols, each: [].forEach - }; + }; -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 9 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; - exports.registerDefaultHelpers = registerDefaultHelpers; - exports.moveHelperToHooks = moveHelperToHooks; + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + exports.moveHelperToHooks = moveHelperToHooks; - var _helpersBlockHelperMissing = __webpack_require__(10); + var _helpersBlockHelperMissing = __webpack_require__(10); - var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); - var _helpersEach = __webpack_require__(11); + var _helpersEach = __webpack_require__(11); - var _helpersEach2 = _interopRequireDefault(_helpersEach); + var _helpersEach2 = _interopRequireDefault(_helpersEach); - var _helpersHelperMissing = __webpack_require__(64); + var _helpersHelperMissing = __webpack_require__(64); - var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); - var _helpersIf = __webpack_require__(65); + var _helpersIf = __webpack_require__(65); - var _helpersIf2 = _interopRequireDefault(_helpersIf); + var _helpersIf2 = _interopRequireDefault(_helpersIf); - var _helpersLog = __webpack_require__(66); + var _helpersLog = __webpack_require__(66); - var _helpersLog2 = _interopRequireDefault(_helpersLog); + var _helpersLog2 = _interopRequireDefault(_helpersLog); - var _helpersLookup = __webpack_require__(67); + var _helpersLookup = __webpack_require__(67); - var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); - var _helpersWith = __webpack_require__(68); + var _helpersWith = __webpack_require__(68); - var _helpersWith2 = _interopRequireDefault(_helpersWith); + var _helpersWith2 = _interopRequireDefault(_helpersWith); - function registerDefaultHelpers(instance) { + function registerDefaultHelpers(instance) { _helpersBlockHelperMissing2['default'](instance); _helpersEach2['default'](instance); _helpersHelperMissing2['default'](instance); @@ -580,28 +580,28 @@ return /******/ (function(modules) { // webpackBootstrap _helpersLog2['default'](instance); _helpersLookup2['default'](instance); _helpersWith2['default'](instance); - } + } - function moveHelperToHooks(instance, helperName, keepHelper) { + function moveHelperToHooks(instance, helperName, keepHelper) { if (instance.helpers[helperName]) { instance.hooks[helperName] = instance.helpers[helperName]; if (!keepHelper) { delete instance.helpers[helperName]; } } - } + } -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 10 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - exports.__esModule = true; + exports.__esModule = true; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - exports['default'] = function (instance) { + exports['default'] = function (instance) { instance.registerHelper('blockHelperMissing', function (context, options) { var inverse = options.inverse, fn = options.fn; @@ -630,35 +630,35 @@ return /******/ (function(modules) { // webpackBootstrap return fn(context, options); } }); - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 11 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _Symbol = __webpack_require__(12)['default']; + var _Symbol = __webpack_require__(12)['default']; - var _Symbol$iterator = __webpack_require__(42)['default']; + var _Symbol$iterator = __webpack_require__(42)['default']; - var _getIterator = __webpack_require__(54)['default']; + var _getIterator = __webpack_require__(54)['default']; - var _Object$keys = __webpack_require__(59)['default']; + var _Object$keys = __webpack_require__(59)['default']; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; + exports.__esModule = true; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - var _exception = __webpack_require__(5); + var _exception = __webpack_require__(5); - var _exception2 = _interopRequireDefault(_exception); + var _exception2 = _interopRequireDefault(_exception); - exports['default'] = function (instance) { + exports['default'] = function (instance) { instance.registerHelper('each', function (context, options) { if (!options) { throw new _exception2['default']('Must pass iterator to #each'); @@ -745,31 +745,31 @@ return /******/ (function(modules) { // webpackBootstrap return ret; }); - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 12 */ + /***/ (function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(13), __esModule: true }; + module.exports = { 'default': __webpack_require__(13), __esModule: true }; -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 13 */ + /***/ (function(module, exports, __webpack_require__) { - __webpack_require__(14); - __webpack_require__(41); - module.exports = __webpack_require__(20).Symbol; + __webpack_require__(14); + __webpack_require__(41); + module.exports = __webpack_require__(20).Symbol; -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 14 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; - // ECMAScript 6 symbols shim - var $ = __webpack_require__(8) + 'use strict'; + // ECMAScript 6 symbols shim + var $ = __webpack_require__(8) , global = __webpack_require__(15) , has = __webpack_require__(16) , DESCRIPTORS = __webpack_require__(17) @@ -802,19 +802,19 @@ return /******/ (function(modules) { // webpackBootstrap , useNative = typeof $Symbol == 'function' , ObjectProto = Object.prototype; - // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 - var setSymbolDesc = DESCRIPTORS && $fails(function(){ + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function(){ return _create(setDesc({}, 'a', { get: function(){ return setDesc(this, 'a', {value: 7}).a; } })).a != 7; - }) ? function(it, key, D){ + }) ? function(it, key, D){ var protoDesc = getDesc(ObjectProto, key); if(protoDesc)delete ObjectProto[key]; setDesc(it, key, D); if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc); - } : setDesc; + } : setDesc; - var wrap = function(tag){ + var wrap = function(tag){ var sym = AllSymbols[tag] = _create($Symbol.prototype); sym._k = tag; DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, { @@ -825,13 +825,13 @@ return /******/ (function(modules) { // webpackBootstrap } }); return sym; - }; + }; - var isSymbol = function(it){ + var isSymbol = function(it){ return typeof it == 'symbol'; - }; + }; - var $defineProperty = function defineProperty(it, key, D){ + var $defineProperty = function defineProperty(it, key, D){ if(D && has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {})); @@ -841,8 +841,8 @@ return /******/ (function(modules) { // webpackBootstrap D = _create(D, {enumerable: createDesc(0, false)}); } return setSymbolDesc(it, key, D); } return setDesc(it, key, D); - }; - var $defineProperties = function defineProperties(it, P){ + }; + var $defineProperties = function defineProperties(it, P){ anObject(it); var keys = enumKeys(P = toIObject(P)) , i = 0 @@ -850,37 +850,37 @@ return /******/ (function(modules) { // webpackBootstrap , key; while(l > i)$defineProperty(it, key = keys[i++], P[key]); return it; - }; - var $create = function create(it, P){ + }; + var $create = function create(it, P){ return P === undefined ? _create(it) : $defineProperties(_create(it), P); - }; - var $propertyIsEnumerable = function propertyIsEnumerable(key){ + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key){ var E = isEnum.call(this, key); return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; - }; - var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ var D = getDesc(it = toIObject(it), key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; - }; - var $getOwnPropertyNames = function getOwnPropertyNames(it){ + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it){ var names = getNames(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); return result; - }; - var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ var names = getNames(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); return result; - }; - var $stringify = function stringify(it){ + }; + var $stringify = function stringify(it){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 @@ -895,17 +895,17 @@ return /******/ (function(modules) { // webpackBootstrap }; args[1] = replacer; return _stringify.apply($JSON, args); - }; - var buggyJSON = $fails(function(){ + }; + var buggyJSON = $fails(function(){ var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; - }); + }); - // 19.4.1.1 Symbol([description]) - if(!useNative){ + // 19.4.1.1 Symbol([description]) + if(!useNative){ $Symbol = function Symbol(){ if(isSymbol(this))throw TypeError('Symbol is not a constructor'); return wrap(uid(arguments.length > 0 ? arguments[0] : undefined)); @@ -929,9 +929,9 @@ return /******/ (function(modules) { // webpackBootstrap if(DESCRIPTORS && !__webpack_require__(40)){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } - } + } - var symbolStatics = { + var symbolStatics = { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') @@ -944,33 +944,33 @@ return /******/ (function(modules) { // webpackBootstrap }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } - }; - // 19.4.2.2 Symbol.hasInstance - // 19.4.2.3 Symbol.isConcatSpreadable - // 19.4.2.4 Symbol.iterator - // 19.4.2.6 Symbol.match - // 19.4.2.8 Symbol.replace - // 19.4.2.9 Symbol.search - // 19.4.2.10 Symbol.species - // 19.4.2.11 Symbol.split - // 19.4.2.12 Symbol.toPrimitive - // 19.4.2.13 Symbol.toStringTag - // 19.4.2.14 Symbol.unscopables - $.each.call(( + }; + // 19.4.2.2 Symbol.hasInstance + // 19.4.2.3 Symbol.isConcatSpreadable + // 19.4.2.4 Symbol.iterator + // 19.4.2.6 Symbol.match + // 19.4.2.8 Symbol.replace + // 19.4.2.9 Symbol.search + // 19.4.2.10 Symbol.species + // 19.4.2.11 Symbol.split + // 19.4.2.12 Symbol.toPrimitive + // 19.4.2.13 Symbol.toStringTag + // 19.4.2.14 Symbol.unscopables + $.each.call(( 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + 'species,split,toPrimitive,toStringTag,unscopables' - ).split(','), function(it){ + ).split(','), function(it){ var sym = wks(it); symbolStatics[it] = useNative ? sym : wrap(sym); - }); + }); - setter = true; + setter = true; - $export($export.G + $export.W, {Symbol: $Symbol}); + $export($export.G + $export.W, {Symbol: $Symbol}); - $export($export.S, 'Symbol', symbolStatics); + $export($export.S, 'Symbol', symbolStatics); - $export($export.S + $export.F * !useNative, 'Object', { + $export($export.S + $export.F * !useNative, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) @@ -983,67 +983,67 @@ return /******/ (function(modules) { // webpackBootstrap getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols - }); + }); - // 24.3.2 JSON.stringify(value [, replacer [, space]]) - $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify}); + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify}); - // 19.4.3.5 Symbol.prototype[@@toStringTag] - setToStringTag($Symbol, 'Symbol'); - // 20.2.1.9 Math[@@toStringTag] - setToStringTag(Math, 'Math', true); - // 24.3.3 JSON[@@toStringTag] - setToStringTag(global.JSON, 'JSON', true); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); -/***/ }), -/* 15 */ -/***/ (function(module, exports) { + /***/ }), + /* 15 */ + /***/ (function(module, exports) { - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global = module.exports = typeof window != 'undefined' && window.Math == Math + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); - if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef -/***/ }), -/* 16 */ -/***/ (function(module, exports) { + /***/ }), + /* 16 */ + /***/ (function(module, exports) { - var hasOwnProperty = {}.hasOwnProperty; - module.exports = function(it, key){ + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ return hasOwnProperty.call(it, key); - }; + }; -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 17 */ + /***/ (function(module, exports, __webpack_require__) { - // Thank's IE8 for his funny defineProperty - module.exports = !__webpack_require__(18)(function(){ + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(18)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; - }); + }); -/***/ }), -/* 18 */ -/***/ (function(module, exports) { + /***/ }), + /* 18 */ + /***/ (function(module, exports) { - module.exports = function(exec){ + module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } - }; + }; -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 19 */ + /***/ (function(module, exports, __webpack_require__) { - var global = __webpack_require__(15) + var global = __webpack_require__(15) , core = __webpack_require__(20) , ctx = __webpack_require__(21) , PROTOTYPE = 'prototype'; - var $export = function(type, name, source){ + var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S @@ -1075,30 +1075,30 @@ return /******/ (function(modules) { // webpackBootstrap })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; } - }; - // type bitmap - $export.F = 1; // forced - $export.G = 2; // global - $export.S = 4; // static - $export.P = 8; // proto - $export.B = 16; // bind - $export.W = 32; // wrap - module.exports = $export; - -/***/ }), -/* 20 */ -/***/ (function(module, exports) { - - var core = module.exports = {version: '1.2.6'}; - if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - - // optional / simple context binding - var aFunction = __webpack_require__(22); - module.exports = function(fn, that, length){ + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + module.exports = $export; + + /***/ }), + /* 20 */ + /***/ (function(module, exports) { + + var core = module.exports = {version: '1.2.6'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + + /***/ }), + /* 21 */ + /***/ (function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(22); + module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ @@ -1115,182 +1115,182 @@ return /******/ (function(modules) { // webpackBootstrap return function(/* ...args */){ return fn.apply(that, arguments); }; - }; + }; -/***/ }), -/* 22 */ -/***/ (function(module, exports) { + /***/ }), + /* 22 */ + /***/ (function(module, exports) { - module.exports = function(it){ + module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; - }; + }; -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 23 */ + /***/ (function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(24); + module.exports = __webpack_require__(24); -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 24 */ + /***/ (function(module, exports, __webpack_require__) { - var $ = __webpack_require__(8) + var $ = __webpack_require__(8) , createDesc = __webpack_require__(25); - module.exports = __webpack_require__(17) ? function(object, key, value){ + module.exports = __webpack_require__(17) ? function(object, key, value){ return $.setDesc(object, key, createDesc(1, value)); - } : function(object, key, value){ + } : function(object, key, value){ object[key] = value; return object; - }; + }; -/***/ }), -/* 25 */ -/***/ (function(module, exports) { + /***/ }), + /* 25 */ + /***/ (function(module, exports) { - module.exports = function(bitmap, value){ + module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; - }; + }; -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 26 */ + /***/ (function(module, exports, __webpack_require__) { - var global = __webpack_require__(15) + var global = __webpack_require__(15) , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); - module.exports = function(key){ + module.exports = function(key){ return store[key] || (store[key] = {}); - }; + }; -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 27 */ + /***/ (function(module, exports, __webpack_require__) { - var def = __webpack_require__(8).setDesc + var def = __webpack_require__(8).setDesc , has = __webpack_require__(16) , TAG = __webpack_require__(28)('toStringTag'); - module.exports = function(it, tag, stat){ + module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); - }; + }; -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 28 */ + /***/ (function(module, exports, __webpack_require__) { - var store = __webpack_require__(26)('wks') + var store = __webpack_require__(26)('wks') , uid = __webpack_require__(29) , Symbol = __webpack_require__(15).Symbol; - module.exports = function(name){ + module.exports = function(name){ return store[name] || (store[name] = Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name)); - }; + }; -/***/ }), -/* 29 */ -/***/ (function(module, exports) { + /***/ }), + /* 29 */ + /***/ (function(module, exports) { - var id = 0 + var id = 0 , px = Math.random(); - module.exports = function(key){ + module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); - }; + }; -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 30 */ + /***/ (function(module, exports, __webpack_require__) { - var $ = __webpack_require__(8) + var $ = __webpack_require__(8) , toIObject = __webpack_require__(31); - module.exports = function(object, el){ + module.exports = function(object, el){ var O = toIObject(object) , keys = $.getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; - }; + }; -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 31 */ + /***/ (function(module, exports, __webpack_require__) { - // to indexed object, toObject with fallback for non-array-like ES3 strings - var IObject = __webpack_require__(32) + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(32) , defined = __webpack_require__(34); - module.exports = function(it){ + module.exports = function(it){ return IObject(defined(it)); - }; + }; -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 32 */ + /***/ (function(module, exports, __webpack_require__) { - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var cof = __webpack_require__(33); - module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(33); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); - }; + }; -/***/ }), -/* 33 */ -/***/ (function(module, exports) { + /***/ }), + /* 33 */ + /***/ (function(module, exports) { - var toString = {}.toString; + var toString = {}.toString; - module.exports = function(it){ + module.exports = function(it){ return toString.call(it).slice(8, -1); - }; + }; -/***/ }), -/* 34 */ -/***/ (function(module, exports) { + /***/ }), + /* 34 */ + /***/ (function(module, exports) { - // 7.2.1 RequireObjectCoercible(argument) - module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError('Can\'t call method on ' + it); return it; - }; + }; -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 35 */ + /***/ (function(module, exports, __webpack_require__) { - // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window - var toIObject = __webpack_require__(31) + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(31) , getNames = __webpack_require__(8).getNames , toString = {}.toString; - var windowNames = typeof window == 'object' && Object.getOwnPropertyNames + var windowNames = typeof window == 'object' && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; - var getWindowNames = function(it){ + var getWindowNames = function(it){ try { return getNames(it); } catch(e){ return windowNames.slice(); } - }; + }; - module.exports.get = function getOwnPropertyNames(it){ + module.exports.get = function getOwnPropertyNames(it){ if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); return getNames(toIObject(it)); - }; + }; -/***/ }), -/* 36 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 36 */ + /***/ (function(module, exports, __webpack_require__) { - // all enumerable object keys, includes symbols - var $ = __webpack_require__(8); - module.exports = function(it){ + // all enumerable object keys, includes symbols + var $ = __webpack_require__(8); + module.exports = function(it){ var keys = $.getKeys(it) , getSymbols = $.getSymbols; if(getSymbols){ @@ -1301,75 +1301,75 @@ return /******/ (function(modules) { // webpackBootstrap while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); } return keys; - }; + }; -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 37 */ + /***/ (function(module, exports, __webpack_require__) { - // 7.2.2 IsArray(argument) - var cof = __webpack_require__(33); - module.exports = Array.isArray || function(arg){ + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(33); + module.exports = Array.isArray || function(arg){ return cof(arg) == 'Array'; - }; + }; -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 38 */ + /***/ (function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(39); - module.exports = function(it){ + var isObject = __webpack_require__(39); + module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; - }; + }; -/***/ }), -/* 39 */ -/***/ (function(module, exports) { + /***/ }), + /* 39 */ + /***/ (function(module, exports) { - module.exports = function(it){ + module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; + }; -/***/ }), -/* 40 */ -/***/ (function(module, exports) { + /***/ }), + /* 40 */ + /***/ (function(module, exports) { - module.exports = true; + module.exports = true; -/***/ }), -/* 41 */ -/***/ (function(module, exports) { + /***/ }), + /* 41 */ + /***/ (function(module, exports) { -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 42 */ + /***/ (function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(43), __esModule: true }; + module.exports = { 'default': __webpack_require__(43), __esModule: true }; -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 43 */ + /***/ (function(module, exports, __webpack_require__) { - __webpack_require__(44); - __webpack_require__(50); - module.exports = __webpack_require__(28)('iterator'); + __webpack_require__(44); + __webpack_require__(50); + module.exports = __webpack_require__(28)('iterator'); -/***/ }), -/* 44 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 44 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; - var $at = __webpack_require__(45)(true); + 'use strict'; + var $at = __webpack_require__(45)(true); - // 21.1.3.27 String.prototype[@@iterator]() - __webpack_require__(47)(String, 'String', function(iterated){ + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(47)(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index - // 21.1.5.2.1 %StringIteratorPrototype%.next() - }, function(){ + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function(){ var O = this._t , index = this._i , point; @@ -1377,17 +1377,17 @@ return /******/ (function(modules) { // webpackBootstrap point = $at(O, index); this._i += point.length; return {value: point, done: false}; - }); + }); -/***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 45 */ + /***/ (function(module, exports, __webpack_require__) { - var toInteger = __webpack_require__(46) + var toInteger = __webpack_require__(46) , defined = __webpack_require__(34); - // true -> String#at - // false -> String#codePointAt - module.exports = function(TO_STRING){ + // true -> String#at + // false -> String#codePointAt + module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) @@ -1399,25 +1399,25 @@ return /******/ (function(modules) { // webpackBootstrap ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; - }; + }; -/***/ }), -/* 46 */ -/***/ (function(module, exports) { + /***/ }), + /* 46 */ + /***/ (function(module, exports) { - // 7.1.4 ToInteger - var ceil = Math.ceil + // 7.1.4 ToInteger + var ceil = Math.ceil , floor = Math.floor; - module.exports = function(it){ + module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); - }; + }; -/***/ }), -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 47 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; - var LIBRARY = __webpack_require__(40) + 'use strict'; + var LIBRARY = __webpack_require__(40) , $export = __webpack_require__(19) , redefine = __webpack_require__(23) , hide = __webpack_require__(24) @@ -1432,9 +1432,9 @@ return /******/ (function(modules) { // webpackBootstrap , KEYS = 'keys' , VALUES = 'values'; - var returnThis = function(){ return this; }; + var returnThis = function(){ return this; }; - module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); var getMethod = function(kind){ if(!BUGGY && kind in proto)return proto[kind]; @@ -1481,60 +1481,60 @@ return /******/ (function(modules) { // webpackBootstrap } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; - }; + }; -/***/ }), -/* 48 */ -/***/ (function(module, exports) { + /***/ }), + /* 48 */ + /***/ (function(module, exports) { - module.exports = {}; + module.exports = {}; -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 49 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(8) + 'use strict'; + var $ = __webpack_require__(8) , descriptor = __webpack_require__(25) , setToStringTag = __webpack_require__(27) , IteratorPrototype = {}; - // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() - __webpack_require__(24)(IteratorPrototype, __webpack_require__(28)('iterator'), function(){ return this; }); + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(24)(IteratorPrototype, __webpack_require__(28)('iterator'), function(){ return this; }); - module.exports = function(Constructor, NAME, next){ + module.exports = function(Constructor, NAME, next){ Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); - }; + }; -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 50 */ + /***/ (function(module, exports, __webpack_require__) { - __webpack_require__(51); - var Iterators = __webpack_require__(48); - Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; + __webpack_require__(51); + var Iterators = __webpack_require__(48); + Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 51 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; - var addToUnscopables = __webpack_require__(52) + 'use strict'; + var addToUnscopables = __webpack_require__(52) , step = __webpack_require__(53) , Iterators = __webpack_require__(48) , toIObject = __webpack_require__(31); - // 22.1.3.4 Array.prototype.entries() - // 22.1.3.13 Array.prototype.keys() - // 22.1.3.29 Array.prototype.values() - // 22.1.3.30 Array.prototype[@@iterator]() - module.exports = __webpack_require__(47)(Array, 'Array', function(iterated, kind){ + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(47)(Array, 'Array', function(iterated, kind){ this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind - // 22.1.5.2.1 %ArrayIteratorPrototype%.next() - }, function(){ + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ var O = this._t , kind = this._k , index = this._i++; @@ -1545,79 +1545,79 @@ return /******/ (function(modules) { // webpackBootstrap if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); - }, 'values'); + }, 'values'); - // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) - Iterators.Arguments = Iterators.Array; + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; - addToUnscopables('keys'); - addToUnscopables('values'); - addToUnscopables('entries'); + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); -/***/ }), -/* 52 */ -/***/ (function(module, exports) { + /***/ }), + /* 52 */ + /***/ (function(module, exports) { - module.exports = function(){ /* empty */ }; + module.exports = function(){ /* empty */ }; -/***/ }), -/* 53 */ -/***/ (function(module, exports) { + /***/ }), + /* 53 */ + /***/ (function(module, exports) { - module.exports = function(done, value){ + module.exports = function(done, value){ return {value: value, done: !!done}; - }; + }; -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 54 */ + /***/ (function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(55), __esModule: true }; + module.exports = { 'default': __webpack_require__(55), __esModule: true }; -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 55 */ + /***/ (function(module, exports, __webpack_require__) { - __webpack_require__(50); - __webpack_require__(44); - module.exports = __webpack_require__(56); + __webpack_require__(50); + __webpack_require__(44); + module.exports = __webpack_require__(56); -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 56 */ + /***/ (function(module, exports, __webpack_require__) { - var anObject = __webpack_require__(38) + var anObject = __webpack_require__(38) , get = __webpack_require__(57); - module.exports = __webpack_require__(20).getIterator = function(it){ + module.exports = __webpack_require__(20).getIterator = function(it){ var iterFn = get(it); if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); - }; + }; -/***/ }), -/* 57 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 57 */ + /***/ (function(module, exports, __webpack_require__) { - var classof = __webpack_require__(58) + var classof = __webpack_require__(58) , ITERATOR = __webpack_require__(28)('iterator') , Iterators = __webpack_require__(48); - module.exports = __webpack_require__(20).getIteratorMethod = function(it){ + module.exports = __webpack_require__(20).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; - }; + }; -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 58 */ + /***/ (function(module, exports, __webpack_require__) { - // getting tag from 19.1.3.6 Object.prototype.toString() - var cof = __webpack_require__(33) + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(33) , TAG = __webpack_require__(28)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; - module.exports = function(it){ + module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case @@ -1626,74 +1626,74 @@ return /******/ (function(modules) { // webpackBootstrap : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; - }; + }; -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 59 */ + /***/ (function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(60), __esModule: true }; + module.exports = { 'default': __webpack_require__(60), __esModule: true }; -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 60 */ + /***/ (function(module, exports, __webpack_require__) { - __webpack_require__(61); - module.exports = __webpack_require__(20).Object.keys; + __webpack_require__(61); + module.exports = __webpack_require__(20).Object.keys; -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 61 */ + /***/ (function(module, exports, __webpack_require__) { - // 19.1.2.14 Object.keys(O) - var toObject = __webpack_require__(62); + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(62); - __webpack_require__(63)('keys', function($keys){ + __webpack_require__(63)('keys', function($keys){ return function keys(it){ return $keys(toObject(it)); }; - }); + }); -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 62 */ + /***/ (function(module, exports, __webpack_require__) { - // 7.1.13 ToObject(argument) - var defined = __webpack_require__(34); - module.exports = function(it){ + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(34); + module.exports = function(it){ return Object(defined(it)); - }; + }; -/***/ }), -/* 63 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 63 */ + /***/ (function(module, exports, __webpack_require__) { - // most Object methods by ES6 should accept primitives - var $export = __webpack_require__(19) + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(19) , core = __webpack_require__(20) , fails = __webpack_require__(18); - module.exports = function(KEY, exec){ + module.exports = function(KEY, exec){ var fn = (core.Object || {})[KEY] || Object[KEY] , exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); - }; + }; -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 64 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; + exports.__esModule = true; - var _exception = __webpack_require__(5); + var _exception = __webpack_require__(5); - var _exception2 = _interopRequireDefault(_exception); + var _exception2 = _interopRequireDefault(_exception); - exports['default'] = function (instance) { + exports['default'] = function (instance) { instance.registerHelper('helperMissing', function () /* [args, ]options */{ if (arguments.length === 1) { // A missing field in a {{foo}} construct. @@ -1703,27 +1703,27 @@ return /******/ (function(modules) { // webpackBootstrap throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); } }); - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }), -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 65 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; + exports.__esModule = true; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - var _exception = __webpack_require__(5); + var _exception = __webpack_require__(5); - var _exception2 = _interopRequireDefault(_exception); + var _exception2 = _interopRequireDefault(_exception); - exports['default'] = function (instance) { + exports['default'] = function (instance) { instance.registerHelper('if', function (conditional, options) { if (arguments.length != 2) { throw new _exception2['default']('#if requires exactly one argument'); @@ -1752,19 +1752,19 @@ return /******/ (function(modules) { // webpackBootstrap hash: options.hash }); }); - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }), -/* 66 */ -/***/ (function(module, exports) { + /***/ }), + /* 66 */ + /***/ (function(module, exports) { - 'use strict'; + 'use strict'; - exports.__esModule = true; + exports.__esModule = true; - exports['default'] = function (instance) { + exports['default'] = function (instance) { instance.registerHelper('log', function () /* message, options */{ var args = [undefined], options = arguments[arguments.length - 1]; @@ -1782,19 +1782,19 @@ return /******/ (function(modules) { // webpackBootstrap instance.log.apply(instance, args); }); - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }), -/* 67 */ -/***/ (function(module, exports) { + /***/ }), + /* 67 */ + /***/ (function(module, exports) { - 'use strict'; + 'use strict'; - exports.__esModule = true; + exports.__esModule = true; - exports['default'] = function (instance) { + exports['default'] = function (instance) { instance.registerHelper('lookup', function (obj, field, options) { if (!obj) { // Note for 5.0: Change to "obj == null" in 5.0 @@ -1802,27 +1802,27 @@ return /******/ (function(modules) { // webpackBootstrap } return options.lookupProperty(obj, field); }); - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 68 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; + exports.__esModule = true; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - var _exception = __webpack_require__(5); + var _exception = __webpack_require__(5); - var _exception2 = _interopRequireDefault(_exception); + var _exception2 = _interopRequireDefault(_exception); - exports['default'] = function (instance) { + exports['default'] = function (instance) { instance.registerHelper('with', function (context, options) { if (arguments.length != 2) { throw new _exception2['default']('#with requires exactly one argument'); @@ -1848,40 +1848,40 @@ return /******/ (function(modules) { // webpackBootstrap return options.inverse(this); } }); - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }), -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 69 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; - exports.registerDefaultDecorators = registerDefaultDecorators; + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; - var _decoratorsInline = __webpack_require__(70); + var _decoratorsInline = __webpack_require__(70); - var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); - function registerDefaultDecorators(instance) { + function registerDefaultDecorators(instance) { _decoratorsInline2['default'](instance); - } + } -/***/ }), -/* 70 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 70 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - exports.__esModule = true; + exports.__esModule = true; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - exports['default'] = function (instance) { + exports['default'] = function (instance) { instance.registerDecorator('inline', function (fn, props, container, options) { var ret = fn; if (!props.partials) { @@ -1900,21 +1900,21 @@ return /******/ (function(modules) { // webpackBootstrap return ret; }); - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }), -/* 71 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 71 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - exports.__esModule = true; + exports.__esModule = true; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - var logger = { + var logger = { methodMap: ['debug', 'info', 'warn', 'error'], level: 'info', @@ -1938,7 +1938,7 @@ return /******/ (function(modules) { // webpackBootstrap if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { var method = logger.methodMap[level]; - // eslint-disable-next-line no-console + if (!console[method]) { method = 'log'; } @@ -1947,40 +1947,40 @@ return /******/ (function(modules) { // webpackBootstrap message[_key - 1] = arguments[_key]; } - console[method].apply(console, message); // eslint-disable-line no-console + console[method].apply(console, message); } } - }; + }; - exports['default'] = logger; - module.exports = exports['default']; + exports['default'] = logger; + module.exports = exports['default']; -/***/ }), -/* 72 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 72 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _Object$create = __webpack_require__(73)['default']; + var _Object$create = __webpack_require__(73)['default']; - var _Object$keys = __webpack_require__(59)['default']; + var _Object$keys = __webpack_require__(59)['default']; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; - exports.createProtoAccessControl = createProtoAccessControl; - exports.resultIsAllowed = resultIsAllowed; - exports.resetLoggedProperties = resetLoggedProperties; + exports.__esModule = true; + exports.createProtoAccessControl = createProtoAccessControl; + exports.resultIsAllowed = resultIsAllowed; + exports.resetLoggedProperties = resetLoggedProperties; - var _createNewLookupObject = __webpack_require__(75); + var _createNewLookupObject = __webpack_require__(75); - var _logger = __webpack_require__(71); + var _logger = __webpack_require__(71); - var _logger2 = _interopRequireDefault(_logger); + var _logger2 = _interopRequireDefault(_logger); - var loggedProperties = _Object$create(null); + var loggedProperties = _Object$create(null); - function createProtoAccessControl(runtimeOptions) { + function createProtoAccessControl(runtimeOptions) { var defaultMethodWhiteList = _Object$create(null); defaultMethodWhiteList['constructor'] = false; defaultMethodWhiteList['__defineGetter__'] = false; @@ -1988,7 +1988,7 @@ return /******/ (function(modules) { // webpackBootstrap defaultMethodWhiteList['__lookupGetter__'] = false; var defaultPropertyWhiteList = _Object$create(null); - // eslint-disable-next-line no-proto + defaultPropertyWhiteList['__proto__'] = false; return { @@ -2001,17 +2001,17 @@ return /******/ (function(modules) { // webpackBootstrap defaultValue: runtimeOptions.allowProtoMethodsByDefault } }; - } + } - function resultIsAllowed(result, protoAccessControl, propertyName) { + function resultIsAllowed(result, protoAccessControl, propertyName) { if (typeof result === 'function') { return checkWhiteList(protoAccessControl.methods, propertyName); } else { return checkWhiteList(protoAccessControl.properties, propertyName); } - } + } - function checkWhiteList(protoAccessControlForType, propertyName) { + function checkWhiteList(protoAccessControlForType, propertyName) { if (protoAccessControlForType.whitelist[propertyName] !== undefined) { return protoAccessControlForType.whitelist[propertyName] === true; } @@ -2020,122 +2020,122 @@ return /******/ (function(modules) { // webpackBootstrap } logUnexpecedPropertyAccessOnce(propertyName); return false; - } + } - function logUnexpecedPropertyAccessOnce(propertyName) { + function logUnexpecedPropertyAccessOnce(propertyName) { if (loggedProperties[propertyName] !== true) { loggedProperties[propertyName] = true; _logger2['default'].log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); } - } + } - function resetLoggedProperties() { + function resetLoggedProperties() { _Object$keys(loggedProperties).forEach(function (propertyName) { delete loggedProperties[propertyName]; }); - } + } -/***/ }), -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 73 */ + /***/ (function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(74), __esModule: true }; + module.exports = { 'default': __webpack_require__(74), __esModule: true }; -/***/ }), -/* 74 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 74 */ + /***/ (function(module, exports, __webpack_require__) { - var $ = __webpack_require__(8); - module.exports = function create(P, D){ + var $ = __webpack_require__(8); + module.exports = function create(P, D){ return $.create(P, D); - }; + }; -/***/ }), -/* 75 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 75 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _Object$create = __webpack_require__(73)['default']; + var _Object$create = __webpack_require__(73)['default']; - exports.__esModule = true; - exports.createNewLookupObject = createNewLookupObject; + exports.__esModule = true; + exports.createNewLookupObject = createNewLookupObject; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - /** + /** * Create a new object with "null"-prototype to avoid truthy results on prototype properties. * The resulting object can be used with "object[property]" to check if a property exists * @param {...object} sources a varargs parameter of source objects that will be merged * @returns {object} */ - function createNewLookupObject() { + function createNewLookupObject() { for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { sources[_key] = arguments[_key]; } return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources)); - } + } -/***/ }), -/* 76 */ -/***/ (function(module, exports) { + /***/ }), + /* 76 */ + /***/ (function(module, exports) { - // Build out our basic SafeString type - 'use strict'; + // Build out our basic SafeString type + 'use strict'; - exports.__esModule = true; - function SafeString(string) { + exports.__esModule = true; + function SafeString(string) { this.string = string; - } + } - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { return '' + this.string; - }; + }; - exports['default'] = SafeString; - module.exports = exports['default']; + exports['default'] = SafeString; + module.exports = exports['default']; -/***/ }), -/* 77 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 77 */ + /***/ (function(module, exports, __webpack_require__) { - 'use strict'; + 'use strict'; - var _Object$seal = __webpack_require__(78)['default']; + var _Object$seal = __webpack_require__(78)['default']; - var _Object$keys = __webpack_require__(59)['default']; + var _Object$keys = __webpack_require__(59)['default']; - var _interopRequireWildcard = __webpack_require__(1)['default']; + var _interopRequireWildcard = __webpack_require__(1)['default']; - var _interopRequireDefault = __webpack_require__(2)['default']; + var _interopRequireDefault = __webpack_require__(2)['default']; - exports.__esModule = true; - exports.checkRevision = checkRevision; - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; - var _utils = __webpack_require__(4); + var _utils = __webpack_require__(4); - var Utils = _interopRequireWildcard(_utils); + var Utils = _interopRequireWildcard(_utils); - var _exception = __webpack_require__(5); + var _exception = __webpack_require__(5); - var _exception2 = _interopRequireDefault(_exception); + var _exception2 = _interopRequireDefault(_exception); - var _base = __webpack_require__(3); + var _base = __webpack_require__(3); - var _helpers = __webpack_require__(9); + var _helpers = __webpack_require__(9); - var _internalWrapHelper = __webpack_require__(81); + var _internalWrapHelper = __webpack_require__(81); - var _internalProtoAccess = __webpack_require__(72); + var _internalProtoAccess = __webpack_require__(72); - function checkRevision(compilerInfo) { + function checkRevision(compilerInfo) { var compilerRevision = compilerInfo && compilerInfo[0] || 1, currentRevision = _base.COMPILER_REVISION; @@ -2151,9 +2151,9 @@ return /******/ (function(modules) { // webpackBootstrap // Use the embedded version info since the runtime doesn't know about this revision yet throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); } - } + } - function template(templateSpec, env) { + function template(templateSpec, env) { /* istanbul ignore next */ if (!env) { throw new _exception2['default']('No environment passed to template'); @@ -2358,9 +2358,9 @@ return /******/ (function(modules) { // webpackBootstrap return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); }; return ret; - } + } - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { function prog(context) { var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; @@ -2378,13 +2378,13 @@ return /******/ (function(modules) { // webpackBootstrap prog.depth = depths ? depths.length : 0; prog.blockParams = declaredBlockParams || 0; return prog; - } + } - /** + /** * This is currently part of the official API, therefore implementation details should not be changed. */ - function resolvePartial(partial, context, options) { + function resolvePartial(partial, context, options) { if (!partial) { if (options.name === '@partial-block') { partial = options.data['partial-block']; @@ -2397,9 +2397,9 @@ return /******/ (function(modules) { // webpackBootstrap partial = options.partials[partial]; } return partial; - } + } - function invokePartial(partial, context, options) { + function invokePartial(partial, context, options) { // Use the current closure context to save the partial-block if this partial var currentPartialBlock = options.data && options.data['partial-block']; options.partial = true; @@ -2437,79 +2437,79 @@ return /******/ (function(modules) { // webpackBootstrap } else if (partial instanceof Function) { return partial(context, options); } - } + } - function noop() { + function noop() { return ''; - } + } - function initData(context, data) { + function initData(context, data) { if (!data || !('root' in data)) { data = data ? _base.createFrame(data) : {}; data.root = context; } return data; - } + } - function executeDecorators(fn, prog, container, depths, data, blockParams) { + function executeDecorators(fn, prog, container, depths, data, blockParams) { if (fn.decorator) { var props = {}; prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); Utils.extend(prog, props); } return prog; - } + } - function wrapHelpersToPassLookupProperty(mergedHelpers, container) { + function wrapHelpersToPassLookupProperty(mergedHelpers, container) { _Object$keys(mergedHelpers).forEach(function (helperName) { var helper = mergedHelpers[helperName]; mergedHelpers[helperName] = passLookupPropertyOption(helper, container); }); - } + } - function passLookupPropertyOption(helper, container) { + function passLookupPropertyOption(helper, container) { var lookupProperty = container.lookupProperty; return _internalWrapHelper.wrapHelper(helper, function (options) { return Utils.extend({ lookupProperty: lookupProperty }, options); }); - } + } -/***/ }), -/* 78 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 78 */ + /***/ (function(module, exports, __webpack_require__) { - module.exports = { "default": __webpack_require__(79), __esModule: true }; + module.exports = { 'default': __webpack_require__(79), __esModule: true }; -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 79 */ + /***/ (function(module, exports, __webpack_require__) { - __webpack_require__(80); - module.exports = __webpack_require__(20).Object.seal; + __webpack_require__(80); + module.exports = __webpack_require__(20).Object.seal; -/***/ }), -/* 80 */ -/***/ (function(module, exports, __webpack_require__) { + /***/ }), + /* 80 */ + /***/ (function(module, exports, __webpack_require__) { - // 19.1.2.17 Object.seal(O) - var isObject = __webpack_require__(39); + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(39); - __webpack_require__(63)('seal', function($seal){ + __webpack_require__(63)('seal', function($seal){ return function seal(it){ return $seal && isObject(it) ? $seal(it) : it; }; - }); + }); -/***/ }), -/* 81 */ -/***/ (function(module, exports) { + /***/ }), + /* 81 */ + /***/ (function(module, exports) { - 'use strict'; + 'use strict'; - exports.__esModule = true; - exports.wrapHelper = wrapHelper; + exports.__esModule = true; + exports.wrapHelper = wrapHelper; - function wrapHelper(helper, transformOptionsFn) { + function wrapHelper(helper, transformOptionsFn) { if (typeof helper !== 'function') { // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. @@ -2521,18 +2521,18 @@ return /******/ (function(modules) { // webpackBootstrap return helper.apply(this, arguments); }; return wrapper; - } + } -/***/ }), -/* 82 */ -/***/ (function(module, exports) { + /***/ }), + /* 82 */ + /***/ (function(module, exports) { - /* global globalThis */ - 'use strict'; + /* global globalThis */ + 'use strict'; - exports.__esModule = true; + exports.__esModule = true; - exports['default'] = function (Handlebars) { + exports['default'] = function (Handlebars) { /* istanbul ignore next */ // https://mathiasbynens.be/notes/globalthis (function () { @@ -2553,11 +2553,11 @@ return /******/ (function(modules) { // webpackBootstrap } return Handlebars; }; - }; + }; - module.exports = exports['default']; + module.exports = exports['default']; -/***/ }) -/******/ ]) + /***/ }) + /******/ ]); }); ; \ No newline at end of file diff --git a/index.ts b/src/index.ts similarity index 89% rename from index.ts rename to src/index.ts index 9963eeea..330fe2de 100644 --- a/index.ts +++ b/src/index.ts @@ -4,19 +4,19 @@ import Header from './components/Header/Header'; import AuthPopup from './components/AuthPopup/AuthPopup'; import ProfilePopup from './components/ProfilePopup/ProfilePopup'; -import MainPage from './components/MainPage/MainPage'; -import ProfilePage from './components/ProfilePage/ProfilePage'; -import CityPage from './components/CityPage/CityPage'; -import MapPage from './components/MapPage/MapPage'; +import MainPage from './pages/MainPage/MainPage'; +import ProfilePage from './pages/ProfilePage/ProfilePage'; +import CityPage from './pages/CityPage/CityPage'; +import MapPage from './pages/MapPage/MapPage'; import { clearPage } from './modules/Clear'; import './components/precompiled-templates'; import APIService from './modules/ApiClient'; -import AdPage from './components/AdPage/AdPage'; +import AdPage from './pages/AdPage/AdPage'; import ApiClient from './modules/ApiClient'; -import EditAdvertPage from './components/EditAdvertPage/EditAdvertPage'; -import AdListPage from './components/AdListPage/AdListPage'; +import EditAdvertPage from './pages/EditAdvertPage/EditAdvertPage'; +import AdListPage from './pages/AdListPage/AdListPage'; const root = document.getElementById('root')!; const pageContainer = document.createElement('div'); diff --git a/modules/Ajax.ts b/src/modules/Ajax.ts similarity index 100% rename from modules/Ajax.ts rename to src/modules/Ajax.ts diff --git a/modules/ApiClient.ts b/src/modules/ApiClient.ts similarity index 100% rename from modules/ApiClient.ts rename to src/modules/ApiClient.ts diff --git a/modules/Clear.ts b/src/modules/Clear.ts similarity index 100% rename from modules/Clear.ts rename to src/modules/Clear.ts diff --git a/modules/Router.ts b/src/modules/Router.ts similarity index 100% rename from modules/Router.ts rename to src/modules/Router.ts diff --git a/modules/Types.ts b/src/modules/Types.ts similarity index 100% rename from modules/Types.ts rename to src/modules/Types.ts diff --git a/modules/Utils.ts b/src/modules/Utils.ts similarity index 100% rename from modules/Utils.ts rename to src/modules/Utils.ts diff --git a/components/AdListPage/AdListPage.hbs b/src/pages/AdListPage/AdListPage.hbs similarity index 100% rename from components/AdListPage/AdListPage.hbs rename to src/pages/AdListPage/AdListPage.hbs diff --git a/components/AdListPage/AdListPage.sass b/src/pages/AdListPage/AdListPage.sass similarity index 94% rename from components/AdListPage/AdListPage.sass rename to src/pages/AdListPage/AdListPage.sass index 3ca93e08..4e9266c3 100644 --- a/components/AdListPage/AdListPage.sass +++ b/src/pages/AdListPage/AdListPage.sass @@ -1,4 +1,4 @@ -@use '../../mixins' +@use '../../styles/mixins' .ad-list-page margin-top: 40px diff --git a/components/AdListPage/AdListPage.ts b/src/pages/AdListPage/AdListPage.ts similarity index 89% rename from components/AdListPage/AdListPage.ts rename to src/pages/AdListPage/AdListPage.ts index 974af73b..c2cc827a 100644 --- a/components/AdListPage/AdListPage.ts +++ b/src/pages/AdListPage/AdListPage.ts @@ -2,9 +2,9 @@ import ApiClient from '../../modules/ApiClient'; import router from '../../modules/Router'; -import HorizontalAdCard from '../HorizontalAdCard/HorizontalAdCard'; +import HorizontalAdCard from '../../components/HorizontalAdCard/HorizontalAdCard'; -import { HorizontalAdCardData } from '../HorizontalAdCard/HorizontalAdCard'; +import { HorizontalAdCardData } from '../../components/HorizontalAdCard/HorizontalAdCard'; function AdListPage(data: HorizontalAdCardData[], isHost: boolean) { const pageContainer = document.createElement('div'); diff --git a/components/AdPage/AdPage.hbs b/src/pages/AdPage/AdPage.hbs similarity index 100% rename from components/AdPage/AdPage.hbs rename to src/pages/AdPage/AdPage.hbs diff --git a/components/AdPage/AdPage.scss b/src/pages/AdPage/AdPage.scss similarity index 95% rename from components/AdPage/AdPage.scss rename to src/pages/AdPage/AdPage.scss index afef0ad9..5a9b6533 100644 --- a/components/AdPage/AdPage.scss +++ b/src/pages/AdPage/AdPage.scss @@ -1,4 +1,4 @@ -@use '../../mixins'; +@use '../../styles/mixins'; $secondary-card-size: 64px; diff --git a/components/AdPage/AdPage.ts b/src/pages/AdPage/AdPage.ts similarity index 94% rename from components/AdPage/AdPage.ts rename to src/pages/AdPage/AdPage.ts index 5d93d19f..d10434af 100644 --- a/components/AdPage/AdPage.ts +++ b/src/pages/AdPage/AdPage.ts @@ -2,7 +2,7 @@ import { AdvertData, ProfileInfo } from '../../modules/Types'; import { calculateAge } from '../../modules/Utils'; -import ReactiveComponent from '../ReactiveComponent/ReactiveComponent'; +import ReactiveComponent from '../../components/ReactiveComponent/ReactiveComponent'; const SECONDARY_IMG_SELECTOR = '.js-carousel-img'; const FULLSCREEN_OVERLAY_SELECTOR = '.js-fullscreen-overlay'; diff --git a/components/CityPage/CityPage.sass b/src/pages/CityPage/CityPage.sass similarity index 100% rename from components/CityPage/CityPage.sass rename to src/pages/CityPage/CityPage.sass diff --git a/components/CityPage/CityPage.ts b/src/pages/CityPage/CityPage.ts similarity index 97% rename from components/CityPage/CityPage.ts rename to src/pages/CityPage/CityPage.ts index f584788b..12b5b8c3 100644 --- a/components/CityPage/CityPage.ts +++ b/src/pages/CityPage/CityPage.ts @@ -1,7 +1,7 @@ 'use strict'; -import Filter from '../Filter/Filter'; -import AdCard from '../AdCard/AdCard'; +import Filter from '../../components/Filter/Filter'; +import AdCard from '../../components/AdCard/AdCard'; import ApiClient from '../../modules/ApiClient'; import { AdvertData } from '../../modules/Types'; diff --git a/components/CityPage/CityPhoto.hbs b/src/pages/CityPage/CityPhoto.hbs similarity index 100% rename from components/CityPage/CityPhoto.hbs rename to src/pages/CityPage/CityPhoto.hbs diff --git a/components/EditAdvertPage/EditAdvertPage.hbs b/src/pages/EditAdvertPage/EditAdvertPage.hbs similarity index 100% rename from components/EditAdvertPage/EditAdvertPage.hbs rename to src/pages/EditAdvertPage/EditAdvertPage.hbs diff --git a/components/EditAdvertPage/EditAdvertPage.scss b/src/pages/EditAdvertPage/EditAdvertPage.scss similarity index 94% rename from components/EditAdvertPage/EditAdvertPage.scss rename to src/pages/EditAdvertPage/EditAdvertPage.scss index d58de543..091c45d2 100644 --- a/components/EditAdvertPage/EditAdvertPage.scss +++ b/src/pages/EditAdvertPage/EditAdvertPage.scss @@ -1,4 +1,4 @@ -@use '../../mixins'; +@use '../../styles/mixins'; $secondary-card-size: 64px; diff --git a/components/EditAdvertPage/EditAdvertPage.ts b/src/pages/EditAdvertPage/EditAdvertPage.ts similarity index 96% rename from components/EditAdvertPage/EditAdvertPage.ts rename to src/pages/EditAdvertPage/EditAdvertPage.ts index 2e374e8b..37d5d40b 100644 --- a/components/EditAdvertPage/EditAdvertPage.ts +++ b/src/pages/EditAdvertPage/EditAdvertPage.ts @@ -6,7 +6,7 @@ import router from '../../modules/Router'; import { City, AdvertData } from '../../modules/Types'; import { validateImage } from '../../modules/Utils'; -import PopupAlert from '../PopupAlert/PopupAlert'; +import PopupAlert from '../../components/PopupAlert/PopupAlert'; const MAIN_IMG_DIV_SELECTOR = '.js-main-img-div'; const MAIN_IMG_SELECTOR = '.edit-advert-images-carousel__main-img'; diff --git a/components/EditAdvertPage/SecondaryImage.hbs b/src/pages/EditAdvertPage/SecondaryImage.hbs similarity index 100% rename from components/EditAdvertPage/SecondaryImage.hbs rename to src/pages/EditAdvertPage/SecondaryImage.hbs diff --git a/components/MainPage/MainPage.scss b/src/pages/MainPage/MainPage.scss similarity index 100% rename from components/MainPage/MainPage.scss rename to src/pages/MainPage/MainPage.scss diff --git a/components/MainPage/MainPage.ts b/src/pages/MainPage/MainPage.ts similarity index 91% rename from components/MainPage/MainPage.ts rename to src/pages/MainPage/MainPage.ts index 06c3f767..c2be47bc 100644 --- a/components/MainPage/MainPage.ts +++ b/src/pages/MainPage/MainPage.ts @@ -1,9 +1,9 @@ 'use strict'; -import Filter from '../Filter/Filter'; -import AdCard from '../AdCard/AdCard'; +import Filter from '../../components/Filter/Filter'; +import AdCard from '../../components/AdCard/AdCard'; import { AdvertData } from '../../modules/Types'; -import MainPhoto from '../MainPhoto/MainPhoto'; +import MainPhoto from '../../components/MainPhoto/MainPhoto'; import ApiClient from '../../modules/ApiClient'; /** Главная страница с витриной объявлений, поиском и фильтрами */ diff --git a/components/MapPage/MapPage.sass b/src/pages/MapPage/MapPage.sass similarity index 100% rename from components/MapPage/MapPage.sass rename to src/pages/MapPage/MapPage.sass diff --git a/components/MapPage/MapPage.ts b/src/pages/MapPage/MapPage.ts similarity index 66% rename from components/MapPage/MapPage.ts rename to src/pages/MapPage/MapPage.ts index 6e641fd8..1a21fcd3 100644 --- a/components/MapPage/MapPage.ts +++ b/src/pages/MapPage/MapPage.ts @@ -2,8 +2,8 @@ import ApiClient from '../../modules/ApiClient'; import { City } from '../../modules/Types'; -import PopupAlert from '../PopupAlert/PopupAlert'; -import ShortHousing from '../ShortAdCard/ShortAdCard'; +import PopupAlert from '../../components/PopupAlert/PopupAlert'; +import ShortHousing from '../../components/ShortAdCard/ShortAdCard'; interface Limit { limit: number; @@ -17,7 +17,7 @@ class MapPage { #CITY_ZOOM: number; #PLACE_ZOOM: number; - constructor(){ + constructor() { this.#TOTAL_ZOOM = 4; this.#CITY_ZOOM = 11; this.#PLACE_ZOOM = 13; @@ -25,9 +25,9 @@ class MapPage { // this.#placemarks = new Map(); } - #getLocation(){ - if (navigator.geolocation){ - navigator.geolocation.getCurrentPosition((position)=>{ + #getLocation() { + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition((position) => { this.#map.setCenter( [position.coords.latitude, position.coords.longitude], this.#CITY_ZOOM, @@ -36,35 +36,40 @@ class MapPage { const myGeo = new ymaps.Placemark( [position.coords.latitude, position.coords.longitude], {}, - {preset: 'islands#redIcon'} + { preset: 'islands#redIcon' } ); this.#map.geoObjects.add(myGeo); }); } } - goToPlace(city: string, address: string){ + goToPlace(city: string, address: string) { const query = city + ', ' + address; const placeOnMap = ymaps.geocode(query); placeOnMap.then( - (res)=>{ + (res) => { const place = res.geoObjects.get(0); - this.#map.setCenter(place.geometry._coordinates, this.#PLACE_ZOOM); - }, - (err)=>{ + this.#map.setCenter( + place.geometry._coordinates, + this.#PLACE_ZOOM + ); + }, + (err) => { const errorPopup = PopupAlert('Место не найдено'); - document.querySelector('.page-container')!.appendChild(errorPopup); + document + .querySelector('.page-container')! + .appendChild(errorPopup); } ); } - async #renderMap(mapContainer: HTMLDivElement){ + async #renderMap(mapContainer: HTMLDivElement) { this.#map = new ymaps.Map('map', { - center: [55.755808716436846,37.61771300861586], - zoom: this.#TOTAL_ZOOM + center: [55.755808716436846, 37.61771300861586], + zoom: this.#TOTAL_ZOOM, }); - const cities = await ApiClient.getCities() as City[]; + const cities = (await ApiClient.getCities()) as City[]; const myClasters = new Map(); for (const city of cities) { myClasters.set(city.title, []); @@ -75,7 +80,9 @@ class MapPage { const query = d.cityName + ', ' + d.address; return ymaps.geocode(query).then( (res) => { - const coordinates = res.geoObjects.get(0).geometry.getCoordinates(); + const coordinates = res.geoObjects + .get(0) + .geometry.getCoordinates(); const placemark = new ymaps.GeoObject({ geometry: { type: 'Point', @@ -87,14 +94,16 @@ class MapPage { }, (err) => { const errorPopup = PopupAlert('Место не найдено'); - document.querySelector('.page-container')!.appendChild(errorPopup); + document + .querySelector('.page-container')! + .appendChild(errorPopup); } ); }); await Promise.all(geocodePromises); - - for (const adsInCity of myClasters.values()){ + + for (const adsInCity of myClasters.values()) { if (adsInCity.length != 0) { const cluster = new ymaps.Clusterer(); cluster.add(adsInCity); @@ -103,17 +112,21 @@ class MapPage { } } - async #renderAds(adsContainer: HTMLDivElement){ - try{ + async #renderAds(adsContainer: HTMLDivElement) { + try { const limit: Limit = { limit: 10, offset: 0, }; const data = await ApiClient.getAds({}, limit); - for (const [ind, d] of data.entries()){ - const housing = new ShortHousing(d, ind, (city: string, address: string)=>{ - this.goToPlace(city, address); - }); + for (const [ind, d] of data.entries()) { + const housing = new ShortHousing( + d, + ind, + (city: string, address: string) => { + this.goToPlace(city, address); + } + ); housing.render(adsContainer); } } catch { @@ -124,7 +137,7 @@ class MapPage { async render(parent: HTMLElement) { parent.replaceChildren(); - const mapPage = document.createElement('div'); + const mapPage = document.createElement('div'); mapPage.classList.add('map-page'); const peopleList = document.createElement('div'); @@ -145,4 +158,4 @@ class MapPage { } } -export default MapPage; \ No newline at end of file +export default MapPage; diff --git a/components/ProfilePage/ProfilePage.scss b/src/pages/ProfilePage/ProfilePage.scss similarity index 100% rename from components/ProfilePage/ProfilePage.scss rename to src/pages/ProfilePage/ProfilePage.scss diff --git a/components/ProfilePage/ProfilePage.ts b/src/pages/ProfilePage/ProfilePage.ts similarity index 89% rename from components/ProfilePage/ProfilePage.ts rename to src/pages/ProfilePage/ProfilePage.ts index 91206312..ba01f360 100644 --- a/components/ProfilePage/ProfilePage.ts +++ b/src/pages/ProfilePage/ProfilePage.ts @@ -1,7 +1,7 @@ 'use strict'; -import ProfileInfo from '../ProfileInfo/ProfileInfo'; -import ProfileData from '../ProfileData/ProfileData'; +import ProfileInfo from '../../components/ProfileInfo/ProfileInfo'; +import ProfileData from '../../components/ProfileData/ProfileData'; import APIClient from '../../modules/ApiClient'; class ProfilePage { @@ -22,13 +22,13 @@ class ProfilePage { #renderProfileInfoCallback; constructor(userId?: string) { - if (userId){ + if (userId) { this.#isMyProfile = false; this.#otherUserId = userId; } else { this.#isMyProfile = true; } - + //Колбэк для повторного рендера левого столбца после обновления формы this.#renderProfileInfoCallback = async () => { const profileInfoContainer = @@ -132,7 +132,11 @@ class ProfilePage { age: this.#age, avatar: this.#avatar, }; - const profileInfo = new ProfileInfo(profileData, this.#showAge, this.#isMyProfile); + const profileInfo = new ProfileInfo( + profileData, + this.#showAge, + this.#isMyProfile + ); profileInfo.render(parent); } @@ -144,9 +148,16 @@ class ProfilePage { #renderProfileData(parent: HTMLElement) { let profileData; if (this.#isMyProfile) { - profileData = new ProfileData(this.#renderProfileInfoCallback, this.#isMyProfile); + profileData = new ProfileData( + this.#renderProfileInfoCallback, + this.#isMyProfile + ); } else { - profileData = new ProfileData(this.#renderProfileInfoCallback, this.#isMyProfile, this.#otherUserId); + profileData = new ProfileData( + this.#renderProfileInfoCallback, + this.#isMyProfile, + this.#otherUserId + ); } profileData.render(parent); } diff --git a/mixins.scss b/src/styles/mixins.scss similarity index 100% rename from mixins.scss rename to src/styles/mixins.scss diff --git a/src/styles/styles.sass b/src/styles/styles.sass new file mode 100644 index 00000000..5c5239cb --- /dev/null +++ b/src/styles/styles.sass @@ -0,0 +1,57 @@ +@use '../src/components/Header/Header' +@use '../src/components/AdCard/AdCard' +@use '../src/components/ShortAdCard/ShortAdCard' +@use '../src/components/Filter/Filter' +@use '../src/components/AuthPopup/AuthPopup' +@use '../src/components/MainPhoto/MainPhoto' +@use '../src/components/ProfilePopup/ProfilePopup' +@use "../src/components/ReviewCard/ReviewCard" +@use "../src/components/ProfileData/ProfileData" +@use "../src/components/ProfileData/RatingForm" +@use "../src/components/ReviewsGraphic/ReviewsGraphic" +@use "../src/components/ProfileInfo/ProfileInfo" +@use "../src/components/SearchPopup/SearchPopup" +@use "../src/components/PopupAlert/PopupAlert" +@use "../src/components/ProfileData/NoReviews/NoReviews" +@use "../src/components/Spinner/Spinner" + +/* pages */ +@use '../src/pages/MainPage/MainPage' +@use '../src/pages/EditAdvertPage/EditAdvertPage' +@use '../src/pages/AdListPage/AdListPage' +@use "../src/pages/ProfilePage/ProfilePage" +@use "../src/pages/MapPage/MapPage" +@use "../src/pages/CityPage/CityPage" +@use '../src/pages/AdPage/AdPage' + + +@font-face + font-family: Inter + src: url('/fonts/Inter.ttf') + + + +* + margin: 0 + padding: 0 + + +body + font-optical-sizing: auto + font-style: normal + font-family: Inter, Arial, 'sans-serif' + background-color: #f6f6f6 + + +@font-face + font-family: MarckScript-Regular + src: url("/fonts/MarckScript-Regular.ttf") + +@font-face + font-family: Dimkin-Light + src: url("/fonts/Dimkin-Light.ttf") + +@font-face + font-family: Dimkin-Regular + src: url("/fonts/Dimkin-Regular.ttf") + diff --git a/sw.js b/src/sw.js similarity index 100% rename from sw.js rename to src/sw.js diff --git a/hbs-recompile.js b/src/vite-plugins/hbs-recompile.js similarity index 92% rename from hbs-recompile.js rename to src/vite-plugins/hbs-recompile.js index a6bd2d30..614ee2bb 100644 --- a/hbs-recompile.js +++ b/src/vite-plugins/hbs-recompile.js @@ -29,10 +29,10 @@ const getAllHbsFiles = (dirPath) => { }; const recompileTemplates = () => { - const hbsFiles = getAllHbsFiles(path.resolve(__dirname, 'components')); + const hbsFiles = getAllHbsFiles(path.resolve(__dirname, '../')); // Формируем команду для компиляции всех найденных файлов const hbsFilesCommand = hbsFiles.join(' '); // Собираем все файлы в строку для команды - const command = `handlebars ${hbsFilesCommand} -f components/precompiled-templates.js`; + const command = `handlebars ${hbsFilesCommand} -f precompiled-templates.js`; // Выполняем команду для компиляции exec(command, (err, stdout, stderr) => { diff --git a/style.sass b/style.sass deleted file mode 100644 index a9aacda8..00000000 --- a/style.sass +++ /dev/null @@ -1,54 +0,0 @@ -@use 'components/Header/Header' -@use 'components/AdCard/AdCard' -@use 'components/ShortAdCard/ShortAdCard' -@use 'components/Filter/Filter' -@use 'components/AuthPopup/AuthPopup' -@use 'components/MainPhoto/MainPhoto' -@use 'components/MainPage/MainPage' -@use 'components/ProfilePopup/ProfilePopup' -@use 'components/EditAdvertPage/EditAdvertPage' -@use "components/ReviewCard/ReviewCard" -@use 'components/AdPage/AdPage' -@use 'components/AdListPage/AdListPage' -@use "components/ProfilePage/ProfilePage" -@use "components/ProfileData/ProfileData" -@use "components/ProfileData/RatingForm" -@use "components/ReviewsGraphic/ReviewsGraphic" -@use "components/ProfileInfo/ProfileInfo" -@use "components/CityPage/CityPage" -@use "components/SearchPopup/SearchPopup" -@use "components/PopupAlert/PopupAlert" -@use "components/ProfileData/NoReviews/NoReviews" -@use "components/MapPage/MapPage" -@use "components/Spinner/Spinner" - -@font-face - font-family: Inter - src: url('/fonts/Inter.ttf') - - - -* - margin: 0 - padding: 0 - - -body - font-optical-sizing: auto - font-style: normal - font-family: Inter, Arial, 'sans-serif' - background-color: #f6f6f6 - - -@font-face - font-family: MarckScript-Regular - src: url("/fonts/MarckScript-Regular.ttf") - -@font-face - font-family: Dimkin-Light - src: url("/fonts/Dimkin-Light.ttf") - -@font-face - font-family: Dimkin-Regular - src: url("/fonts/Dimkin-Regular.ttf") - diff --git a/vite.config.ts b/vite.config.ts index e50a72a3..03134c4b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,5 @@ import { defineConfig } from 'vite'; -import handlebarsCompilePlugin from './hbs-recompile.js'; +import handlebarsCompilePlugin from './src/vite-plugins/hbs-recompile.js'; /** @type {import('vite').UserConfig} */ export default defineConfig({ From 7fc9a8f82c366bbf51ab83ae64126b59aaec2db3 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:36:53 +0300 Subject: [PATCH 02/18] fix: update path to precompiled templates --- .gitignore | 2 +- precompiled-templates.js | 702 ------------------------ src/components/precompiled-templates.js | 702 ------------------------ src/index.ts | 2 +- 4 files changed, 2 insertions(+), 1406 deletions(-) delete mode 100644 precompiled-templates.js delete mode 100644 src/components/precompiled-templates.js diff --git a/.gitignore b/.gitignore index 05216bec..39227882 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ node_modules/ .idea/ -/components/precompiled-templates.js +precompiled-templates.js /images/ /nginx/ssl/ \ No newline at end of file diff --git a/precompiled-templates.js b/precompiled-templates.js deleted file mode 100644 index fbdbf9dc..00000000 --- a/precompiled-templates.js +++ /dev/null @@ -1,702 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['AdCard.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - return "
\r\n"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n \r\n
\r\n \r\n
\r\n \r\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"images") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":11,"column":12},"end":{"line":13,"column":21}}})) != null ? stack1 : "") - + " \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n

" - + alias4(((helper = (helper = lookupProperty(helpers,"cityName") || (depth0 != null ? lookupProperty(depth0,"cityName") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"cityName","hash":{},"data":data,"loc":{"start":{"line":80,"column":42},"end":{"line":80,"column":54}}}) : helper))) - + "

\r\n

" - + alias4(((helper = (helper = lookupProperty(helpers,"address") || (depth0 != null ? lookupProperty(depth0,"address") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"address","hash":{},"data":data,"loc":{"start":{"line":81,"column":45},"end":{"line":81,"column":56}}}) : helper))) - + "

\r\n
\r\n \r\n \r\n

" - + alias4(((helper = (helper = lookupProperty(helpers,"viewsCount") || (depth0 != null ? lookupProperty(depth0,"viewsCount") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"viewsCount","hash":{},"data":data,"loc":{"start":{"line":89,"column":53},"end":{"line":89,"column":67}}}) : helper))) - + "

\r\n
\r\n
\r\n
\r\n
\r\n \r\n

" - + alias4(alias5(((stack1 = (depth0 != null ? lookupProperty(depth0,"adAuthor") : depth0)) != null ? lookupProperty(stack1,"name") : stack1), depth0)) - + "

\r\n
\r\n star\r\n " - + alias4(alias5(((stack1 = (depth0 != null ? lookupProperty(depth0,"adAuthor") : depth0)) != null ? lookupProperty(stack1,"rating") : stack1), depth0)) - + "\r\n
\r\n
\r\n
\r\n
"; -},"useData":true}); -templates['AuthPopup.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - var helper, alias1=container.escapeExpression, alias2=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n \n\n \n \n

\n
\n"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n
\n
\n \n \n \n
\n \n\n
" - + alias4(((helper = (helper = lookupProperty(helpers,"authMessage") || (depth0 != null ? lookupProperty(depth0,"authMessage") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"authMessage","hash":{},"data":data,"loc":{"start":{"line":10,"column":34},"end":{"line":10,"column":49}}}) : helper))) - + "
\n
Неправильный логин или\n пароль!
\n
\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"inputs") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":14,"column":12},"end":{"line":34,"column":21}}})) != null ? stack1 : "") - + "\n
\n \n \n
\n
"; -},"useData":true}); -templates['Filter.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n \r\n \r\n
\r\n"; -},"2":function(container,depth0,helpers,partials,data) { - return "checked"; -},"4":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n \r\n \r\n
\r\n"; -},"6":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n \r\n \r\n
\r\n"; -},"8":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n \r\n \r\n
\r\n"; -},"10":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n \r\n \r\n
\r\n"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n
\r\n

По геопозиции

\r\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"geoposition") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":4,"column":4},"end":{"line":9,"column":13}}})) != null ? stack1 : "") - + "
\r\n
\r\n
\r\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"rating") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":13,"column":4},"end":{"line":18,"column":13}}})) != null ? stack1 : "") - + "
\r\n
\r\n
\r\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"new") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":22,"column":4},"end":{"line":27,"column":13}}})) != null ? stack1 : "") - + "
\r\n
\r\n
\r\n

Пол хоста

\r\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"gender") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":32,"column":4},"end":{"line":37,"column":13}}})) != null ? stack1 : "") - + "
\r\n
\r\n
\r\n

Количество гостей

\r\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"visitors") : depth0)) != null ? lookupProperty(stack1,"variations") : stack1),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":42,"column":4},"end":{"line":47,"column":13}}})) != null ? stack1 : "") - + "
\r\n \r\n \r\n \r\n
\r\n"; -},"useData":true}); -templates['HorizontalAdCard.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=container.escapeExpression, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n \r\n\r\n
\r\n \r\n \r\n \r\n\r\n

" - + alias1(((helper = (helper = lookupProperty(helpers,"cityName") || (depth0 != null ? lookupProperty(depth0,"cityName") : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cityName","hash":{},"data":data,"loc":{"start":{"line":20,"column":44},"end":{"line":20,"column":56}}}) : helper))) - + "

\r\n

" - + alias1(((helper = (helper = lookupProperty(helpers,"address") || (depth0 != null ? lookupProperty(depth0,"address") : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"address","hash":{},"data":data,"loc":{"start":{"line":21,"column":47},"end":{"line":21,"column":58}}}) : helper))) - + "

\r\n
\r\n Открыть\r\n Редактировать\r\n Удалить\r\n
\r\n
\r\n
"; -},"useData":true}); -templates['PopupAlert.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n " - + container.escapeExpression(((helper = (helper = lookupProperty(helpers,"message") || (depth0 != null ? lookupProperty(depth0,"message") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"message","hash":{},"data":data,"loc":{"start":{"line":2,"column":4},"end":{"line":2,"column":15}}}) : helper))) - + "\n
"; -},"useData":true}); -templates['EditForm.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - return "checked"; -},"3":function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " value=\"" - + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"birthdate") : stack1), depth0)) - + "\" "; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n
\n \n
\n
\n

Обновление профиля

\n
\n \n
\n
\n
\n

Никнейм:

\n \n \n \"!\"\n \n
\n
\n
\n

Имя:

\n \n \n \"!\"\n \n
\n
\n
\n

Почта:

\n \n \n \"!\"\n \n
\n
\n
\n

Пол:

\n
\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n

День рождения:

\n \n \n \"!\"\n \n
\n
\n
\n

Хост:

\n \n
\n
\n

Адрес:

\n \n \n \"!\"\n \n
\n
\n
\n\n\n
\n
\n \n
\n
\n \n
\n\n
\n \n \n
\n
\n
\n
"; -},"useData":true}); -templates['NoReviews.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - return "

Отзывов пока нет.

\n"; -},"3":function(container,depth0,helpers,partials,data) { - return "

Отзывов пока нет. Станьте первым!

\n
\n \n
\n"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n
\n \n
\n\n
\n" - + ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"isMyProfile") : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data,"loc":{"start":{"line":7,"column":8},"end":{"line":16,"column":15}}})) != null ? stack1 : "") - + "
\n
"; -},"useData":true}); -templates['RatingForm.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n

Ваш отзыв

\n
\n

Общая оценка

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n"; -},"useData":true}); -templates['ProfileInfo.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "\n " - + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"age") : stack1), depth0)) - + "\n "; -},"3":function(container,depth0,helpers,partials,data) { - return "Не указано"; -},"5":function(container,depth0,helpers,partials,data) { - return "Да"; -},"7":function(container,depth0,helpers,partials,data) { - return "Нет"; -},"9":function(container,depth0,helpers,partials,data) { - return "Изменить"; -},"11":function(container,depth0,helpers,partials,data) { - return "Оценить"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n
\n
\n \n
\n

" - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"name") : stack1), depth0)) - + "

\n
\n
\n\n
\n
\n
Рейтинг:
\n
\n \n \n " - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"score") : stack1), depth0)) - + "\n \n \n \n \n
\n
\n
\n
Пол:
\n

" - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"sex") : stack1), depth0)) - + "

\n
\n
\n
Возраст:
\n

" - + ((stack1 = lookupProperty(helpers,"if").call(alias3,(depth0 != null ? lookupProperty(depth0,"isCorrectAge") : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data,"loc":{"start":{"line":33,"column":47},"end":{"line":35,"column":41}}})) != null ? stack1 : "") - + "

\n
\n
\n
Хост:
\n

" - + ((stack1 = lookupProperty(helpers,"if").call(alias3,((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"isHost") : stack1),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data,"loc":{"start":{"line":39,"column":47},"end":{"line":41,"column":38}}})) != null ? stack1 : "") - + "

\n
\n
\n
Серферы:
\n

" - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"guestCount") : stack1), depth0)) - + "

\n
\n
\n\n
\n
\n " - + ((stack1 = lookupProperty(helpers,"if").call(alias3,(depth0 != null ? lookupProperty(depth0,"isMyProfile") : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data,"loc":{"start":{"line":54,"column":13},"end":{"line":54,"column":62}}})) != null ? stack1 : "") - + "\n
\n
\n
"; -},"useData":true}); -templates['ProfilePopup.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - var helper, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n \n " - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"title") : depth0), depth0)) - + "\n \n
\n
\n"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n
\n" - + ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":3,"column":8},"end":{"line":14,"column":17}}})) != null ? stack1 : "") - + "
\n
"; -},"useData":true}); -templates['ReviewCard.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, alias4=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n
\n
\n
\n \n
\n

" - + alias3(alias4((depth0 != null ? lookupProperty(depth0,"userName") : depth0), depth0)) - + "

\n
\n\n
\n

" - + alias3(alias4((depth0 != null ? lookupProperty(depth0,"title") : depth0), depth0)) - + "

\n
\n " - + alias3(alias4((depth0 != null ? lookupProperty(depth0,"text") : depth0), depth0)) - + "\n
\n
\n
\n\n
\n
\n " - + alias3((lookupProperty(helpers,"renderStars")||(depth0 && lookupProperty(depth0,"renderStars"))||alias2).call(alias1,(depth0 != null ? lookupProperty(depth0,"rating") : depth0),{"name":"renderStars","hash":{},"data":data,"loc":{"start":{"line":20,"column":12},"end":{"line":20,"column":39}}})) - + "\n
\n
\n " - + alias3(alias4((depth0 != null ? lookupProperty(depth0,"createdAt") : depth0), depth0)) - + "\n
\n
\n
"; -},"useData":true}); -templates['ReviewsGraphic.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.hooks.helperMissing, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n \n Извините, ваш браузер не поддерживает <canvas> элемент.\n \n\n
\n Изменение рейтинга\n Изменение среднего рейтинга\n
\n\n
\n

Всего оценок: " - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"totalRatings") : depth0), depth0)) - + "

\n

Дата первой оценки: " - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"firstDate") : depth0), depth0)) - + "

\n

Дата последней оценки: " - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"lastDate") : depth0), depth0)) - + "

\n

Наибольшая оценка: " - + alias2((lookupProperty(helpers,"renderStars")||(depth0 && lookupProperty(depth0,"renderStars"))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,"highestRating") : depth0),{"name":"renderStars","hash":{},"data":data,"loc":{"start":{"line":15,"column":30},"end":{"line":15,"column":64}}})) - + "

\n

Наименьшая оценка: " - + alias2((lookupProperty(helpers,"renderStars")||(depth0 && lookupProperty(depth0,"renderStars"))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,"lowestRating") : depth0),{"name":"renderStars","hash":{},"data":data,"loc":{"start":{"line":16,"column":30},"end":{"line":16,"column":63}}})) - + "

\n
\n
\n"; -},"useData":true}); -templates['SearchPopup.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " " - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"title") : depth0), depth0)) - + "\n"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n \n\n
\n
\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias3,(depth0 != null ? lookupProperty(depth0,"firstGroup") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":9,"column":12},"end":{"line":11,"column":21}}})) != null ? stack1 : "") - + "
\n
\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias3,(depth0 != null ? lookupProperty(depth0,"secondGroup") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":14,"column":12},"end":{"line":16,"column":21}}})) != null ? stack1 : "") - + "
\n
\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias3,(depth0 != null ? lookupProperty(depth0,"thirdGroup") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":19,"column":12},"end":{"line":21,"column":21}}})) != null ? stack1 : "") - + "
\n
\n
\n\n"; -},"useData":true}); -templates['ShortAdCard.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.hooks.helperMissing, alias5="function", lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n
\n
\n \n
\n
\n

" - + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"adAuthor") : stack1)) != null ? lookupProperty(stack1,"name") : stack1), depth0)) - + "

\n \n \n

" - + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"adAuthor") : stack1)) != null ? lookupProperty(stack1,"rating") : stack1), depth0)) - + "

\n
\n \n \n

" - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"cityName") : stack1), depth0)) - + "

\n
\n
\n
\n\n \n \n

" - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"address") : stack1), depth0)) - + "

\n
\n\n
\n " - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"description") : stack1), depth0)) - + "\n
\n\n
\n
\n Пол:\n " - + alias2(((helper = (helper = lookupProperty(helpers,"sex") || (depth0 != null ? lookupProperty(depth0,"sex") : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"sex","hash":{},"data":data,"loc":{"start":{"line":31,"column":49},"end":{"line":31,"column":56}}}) : helper))) - + "\n
\n
\n Возраст:\n " - + alias2(((helper = (helper = lookupProperty(helpers,"age") || (depth0 != null ? lookupProperty(depth0,"age") : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"age","hash":{},"data":data,"loc":{"start":{"line":35,"column":49},"end":{"line":35,"column":56}}}) : helper))) - + "\n
\n
\n Всего гостей:\n " - + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,"data") : depth0)) != null ? lookupProperty(stack1,"adAuthor") : stack1)) != null ? lookupProperty(stack1,"guestCount") : stack1), depth0)) - + "\n
\n
\n\n
\n \n \n
\n
"; -},"useData":true}); -templates['AdListPage.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n

Список объявлений

\n \n
\n
\n" - + ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"empty") : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":9,"column":12},"end":{"line":11,"column":19}}})) != null ? stack1 : "") - + "
\n"; -},"2":function(container,depth0,helpers,partials,data) { - return "

Здесь пока пусто... 🕳️

\n"; -},"4":function(container,depth0,helpers,partials,data) { - return "

🚫Вы не являетесь хостом,\n поэтому не можете создавать объявления.

\n

Если вы хотите стать хостом,\n пожалуйста, измените свой статус в настройках

\n"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n" - + ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"isHost") : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data,"loc":{"start":{"line":2,"column":4},"end":{"line":18,"column":11}}})) != null ? stack1 : "") - + "
"; -},"useData":true}); -templates['AdPage.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " \r\n"; -},"3":function(container,depth0,helpers,partials,data) { - var lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " \r\n"; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n
\r\n \r\n\r\n \r\n\r\n \r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n"; -},"useData":true}); -templates['CityPhoto.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\n
\n \n

" - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"name") : depth0), depth0)) - + "

\n
\n\n
\n " - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"description") : depth0), depth0)) - + "\n
\n
"; -},"useData":true}); -templates['EditAdvertPage.hbs'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " \r\n" - + ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"isTextArea") : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data,"loc":{"start":{"line":39,"column":16},"end":{"line":77,"column":23}}})) != null ? stack1 : ""); -},"2":function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " " - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"value") : depth0), depth0)) - + "\r\n"; -},"4":function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return ((stack1 = lookupProperty(helpers,"if").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"isSelect") : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(9, data, 0),"data":data,"loc":{"start":{"line":47,"column":16},"end":{"line":77,"column":16}}})) != null ? stack1 : ""); -},"5":function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " \r\n" - + ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"options") : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":52,"column":24},"end":{"line":59,"column":33}}})) != null ? stack1 : "") - + " \r\n\r\n"; -},"6":function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " " - + alias2(alias1((depth0 != null ? lookupProperty(depth0,"value") : depth0), depth0)) - + "\r\n"; -},"7":function(container,depth0,helpers,partials,data) { - return " selected='selected'\r\n"; -},"9":function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return " \r\n "; -},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return "
\r\n
\r\n \r\n
\r\n\r\n
\r\n" - + ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"inputs") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":37,"column":12},"end":{"line":78,"column":21}}})) != null ? stack1 : "") - + " \r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n"; -},"useData":true}); -templates['SecondaryImage.hbs'] = template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined - }; - - return ""; -},"useData":true}); -})(); \ No newline at end of file diff --git a/src/components/precompiled-templates.js b/src/components/precompiled-templates.js deleted file mode 100644 index 44355418..00000000 --- a/src/components/precompiled-templates.js +++ /dev/null @@ -1,702 +0,0 @@ -(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; - templates['AdCard.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - return '
\r\n'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n \r\n
\r\n \r\n
\r\n \r\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias1,(depth0 != null ? lookupProperty(depth0,'images') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':11,'column':12},'end':{'line':13,'column':21}}})) != null ? stack1 : '') - + ' \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n

' - + alias4(((helper = (helper = lookupProperty(helpers,'cityName') || (depth0 != null ? lookupProperty(depth0,'cityName') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'cityName','hash':{},'data':data,'loc':{'start':{'line':80,'column':42},'end':{'line':80,'column':54}}}) : helper))) - + '

\r\n

' - + alias4(((helper = (helper = lookupProperty(helpers,'address') || (depth0 != null ? lookupProperty(depth0,'address') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'address','hash':{},'data':data,'loc':{'start':{'line':81,'column':45},'end':{'line':81,'column':56}}}) : helper))) - + '

\r\n
\r\n \r\n \r\n

' - + alias4(((helper = (helper = lookupProperty(helpers,'viewsCount') || (depth0 != null ? lookupProperty(depth0,'viewsCount') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'viewsCount','hash':{},'data':data,'loc':{'start':{'line':89,'column':53},'end':{'line':89,'column':67}}}) : helper))) - + '

\r\n
\r\n
\r\n
\r\n
\r\n \r\n

' - + alias4(alias5(((stack1 = (depth0 != null ? lookupProperty(depth0,'adAuthor') : depth0)) != null ? lookupProperty(stack1,'name') : stack1), depth0)) - + '

\r\n
\r\n \'star\'\r\n ' - + alias4(alias5(((stack1 = (depth0 != null ? lookupProperty(depth0,'adAuthor') : depth0)) != null ? lookupProperty(stack1,'rating') : stack1), depth0)) - + '\r\n
\r\n
\r\n
\r\n
'; - },'useData':true}); - templates['AdListPage.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n

Список объявлений

\n \n
\n
\n' - + ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'empty') : depth0),{'name':'if','hash':{},'fn':container.program(2, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':9,'column':12},'end':{'line':11,'column':19}}})) != null ? stack1 : '') - + '
\n'; - },'2':function(container,depth0,helpers,partials,data) { - return '

Здесь пока пусто... 🕳️

\n'; - },'4':function(container,depth0,helpers,partials,data) { - return '

🚫Вы не являетесь хостом,\n поэтому не можете создавать объявления.

\n

Если вы хотите стать хостом,\n пожалуйста, измените свой статус в настройках

\n'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n' - + ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'isHost') : depth0),{'name':'if','hash':{},'fn':container.program(1, data, 0),'inverse':container.program(4, data, 0),'data':data,'loc':{'start':{'line':2,'column':4},'end':{'line':18,'column':11}}})) != null ? stack1 : '') - + '
'; - },'useData':true}); - templates['AdPage.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' \r\n'; - },'3':function(container,depth0,helpers,partials,data) { - var lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' \r\n'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n
\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Просмотрено

\r\n

' - + alias4(((helper = (helper = lookupProperty(helpers,'viewsCount') || (depth0 != null ? lookupProperty(depth0,'viewsCount') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'viewsCount','hash':{},'data':data,'loc':{'start':{'line':72,'column':53},'end':{'line':72,'column':67}}}) : helper))) - + ' раз

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Понравилось

\r\n

5 раз

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Посещено

\r\n

3 раз

\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n Город:\r\n ' - + alias4(((helper = (helper = lookupProperty(helpers,'cityName') || (depth0 != null ? lookupProperty(depth0,'cityName') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'cityName','hash':{},'data':data,'loc':{'start':{'line':103,'column':49},'end':{'line':103,'column':61}}}) : helper))) - + '\r\n Адрес:\r\n ' - + alias4(((helper = (helper = lookupProperty(helpers,'address') || (depth0 != null ? lookupProperty(depth0,'address') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'address','hash':{},'data':data,'loc':{'start':{'line':105,'column':49},'end':{'line':105,'column':60}}}) : helper))) - + '\r\n Комнаты:\r\n ' - + alias4(((helper = (helper = lookupProperty(helpers,'roomsNumber') || (depth0 != null ? lookupProperty(depth0,'roomsNumber') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'roomsNumber','hash':{},'data':data,'loc':{'start':{'line':107,'column':49},'end':{'line':107,'column':64}}}) : helper))) - + '\r\n Описание:\r\n ' - + alias4(((helper = (helper = lookupProperty(helpers,'description') || (depth0 != null ? lookupProperty(depth0,'description') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'description','hash':{},'data':data,'loc':{'start':{'line':109,'column':49},'end':{'line':109,'column':64}}}) : helper))) - + '\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n \r\n'; - },'useData':true}); - templates['AuthPopup.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - var helper, alias1=container.escapeExpression, alias2=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n \n\n \n \n

\n
\n'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n
\n
\n \n \n \n
\n \n\n
' - + alias4(((helper = (helper = lookupProperty(helpers,'authMessage') || (depth0 != null ? lookupProperty(depth0,'authMessage') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'authMessage','hash':{},'data':data,'loc':{'start':{'line':10,'column':34},'end':{'line':10,'column':49}}}) : helper))) - + '
\n
Неправильный логин или\n пароль!
\n
\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias1,(depth0 != null ? lookupProperty(depth0,'inputs') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':14,'column':12},'end':{'line':34,'column':21}}})) != null ? stack1 : '') - + '\n
\n \n

' - + alias4(((helper = (helper = lookupProperty(helpers,'bottomText') || (depth0 != null ? lookupProperty(depth0,'bottomText') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'bottomText','hash':{},'data':data,'loc':{'start':{'line':38,'column':37},'end':{'line':38,'column':51}}}) : helper))) - + '

\n ' - + alias4(((helper = (helper = lookupProperty(helpers,'bottomAText') || (depth0 != null ? lookupProperty(depth0,'bottomAText') : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{'name':'bottomAText','hash':{},'data':data,'loc':{'start':{'line':39,'column':42},'end':{'line':39,'column':57}}}) : helper))) - + '\n
\n
\n
'; - },'useData':true}); - templates['CityPhoto.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n
\n \n

' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'name') : depth0), depth0)) - + '

\n
\n\n
\n ' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'description') : depth0), depth0)) - + '\n
\n
'; - },'useData':true}); - templates['EditAdvertPage.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' \r\n' - + ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'isTextArea') : depth0),{'name':'if','hash':{},'fn':container.program(2, data, 0),'inverse':container.program(4, data, 0),'data':data,'loc':{'start':{'line':39,'column':16},'end':{'line':77,'column':23}}})) != null ? stack1 : ''); - },'2':function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' ' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'value') : depth0), depth0)) - + '\r\n'; - },'4':function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'isSelect') : depth0),{'name':'if','hash':{},'fn':container.program(5, data, 0),'inverse':container.program(9, data, 0),'data':data,'loc':{'start':{'line':47,'column':16},'end':{'line':77,'column':16}}})) != null ? stack1 : ''); - },'5':function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' \r\n' - + ((stack1 = lookupProperty(helpers,'each').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'options') : depth0),{'name':'each','hash':{},'fn':container.program(6, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':52,'column':24},'end':{'line':59,'column':33}}})) != null ? stack1 : '') - + ' \r\n\r\n'; - },'6':function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' ' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'value') : depth0), depth0)) - + '\r\n'; - },'7':function(container,depth0,helpers,partials,data) { - return ' selected=\'selected\'\r\n'; - },'9':function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' \r\n '; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias1,(depth0 != null ? lookupProperty(depth0,'inputs') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':37,'column':12},'end':{'line':78,'column':21}}})) != null ? stack1 : '') - + ' \r\n
\r\n \r\n\r\n \r\n \r\n \r\n\r\n'; - },'useData':true}); - templates['SecondaryImage.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ''; - },'useData':true}); - templates['Filter.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n \r\n \r\n
\r\n'; - },'2':function(container,depth0,helpers,partials,data) { - return 'checked'; - },'4':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n \r\n \r\n
\r\n'; - },'6':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n \r\n \r\n
\r\n'; - },'8':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n \r\n \r\n
\r\n'; - },'10':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3='function', alias4=container.escapeExpression, alias5=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n \r\n \r\n
\r\n'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n
\r\n

По геопозиции

\r\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'geoposition') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':4,'column':4},'end':{'line':9,'column':13}}})) != null ? stack1 : '') - + '
\r\n
\r\n
\r\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'rating') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(4, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':13,'column':4},'end':{'line':18,'column':13}}})) != null ? stack1 : '') - + '
\r\n
\r\n
\r\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'new') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(6, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':22,'column':4},'end':{'line':27,'column':13}}})) != null ? stack1 : '') - + '
\r\n
\r\n
\r\n

Пол хоста

\r\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'gender') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(8, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':32,'column':4},'end':{'line':37,'column':13}}})) != null ? stack1 : '') - + '
\r\n
\r\n
\r\n

Количество гостей

\r\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,'visitors') : depth0)) != null ? lookupProperty(stack1,'variations') : stack1),{'name':'each','hash':{},'fn':container.program(10, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':42,'column':4},'end':{'line':47,'column':13}}})) != null ? stack1 : '') - + '
\r\n \r\n \r\n \r\n
\r\n'; - },'useData':true}); - templates['HorizontalAdCard.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=container.escapeExpression, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4='function', lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\r\n \r\n\r\n
\r\n \r\n \r\n \r\n\r\n

' - + alias1(((helper = (helper = lookupProperty(helpers,'cityName') || (depth0 != null ? lookupProperty(depth0,'cityName') : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{'name':'cityName','hash':{},'data':data,'loc':{'start':{'line':20,'column':44},'end':{'line':20,'column':56}}}) : helper))) - + '

\r\n

' - + alias1(((helper = (helper = lookupProperty(helpers,'address') || (depth0 != null ? lookupProperty(depth0,'address') : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{'name':'address','hash':{},'data':data,'loc':{'start':{'line':21,'column':47},'end':{'line':21,'column':58}}}) : helper))) - + '

\r\n
\r\n Открыть\r\n Редактировать\r\n Удалить\r\n
\r\n
\r\n
'; - },'useData':true}); - templates['PopupAlert.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n ' - + container.escapeExpression(((helper = (helper = lookupProperty(helpers,'message') || (depth0 != null ? lookupProperty(depth0,'message') : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === 'function' ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{'name':'message','hash':{},'data':data,'loc':{'start':{'line':2,'column':4},'end':{'line':2,'column':15}}}) : helper))) - + '\n
'; - },'useData':true}); - templates['EditForm.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - return 'checked'; - },'3':function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' value="' - + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'birthdate') : stack1), depth0)) - + '" '; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n
\n \n
\n
\n

Обновление профиля

\n
\n \n
\n
\n
\n

Никнейм:

\n \n \n !\n \n
\n
\n
\n

Имя:

\n \n \n !\n \n
\n
\n
\n

Почта:

\n \n \n !\n \n
\n
\n
\n

Пол:

\n
\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n

День рождения:

\n \n \n !\n \n
\n
\n
\n

Хост:

\n \n
\n
\n

Адрес:

\n \n \n !\n \n
\n
\n
\n\n\n
\n
\n \n
\n
\n \n
\n\n
\n \n \n
\n
\n
\n
'; - },'useData':true}); - templates['NoReviews.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - return '

Отзывов пока нет.

\n'; - },'3':function(container,depth0,helpers,partials,data) { - return '

Отзывов пока нет. Станьте первым!

\n
\n \n
\n'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n
\n \n
\n\n
\n' - + ((stack1 = lookupProperty(helpers,'if').call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,'isMyProfile') : depth0),{'name':'if','hash':{},'fn':container.program(1, data, 0),'inverse':container.program(3, data, 0),'data':data,'loc':{'start':{'line':7,'column':8},'end':{'line':16,'column':15}}})) != null ? stack1 : '') - + '
\n
'; - },'useData':true}); - templates['RatingForm.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - return '
\n

Ваш отзыв

\n
\n

Общая оценка

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n'; - },'useData':true}); - templates['ProfileInfo.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '\n ' - + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'age') : stack1), depth0)) - + '\n '; - },'3':function(container,depth0,helpers,partials,data) { - return 'Не указано'; - },'5':function(container,depth0,helpers,partials,data) { - return 'Да'; - },'7':function(container,depth0,helpers,partials,data) { - return 'Нет'; - },'9':function(container,depth0,helpers,partials,data) { - return 'Изменить'; - },'11':function(container,depth0,helpers,partials,data) { - return 'Оценить'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n
\n
\n \n
\n

' - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'name') : stack1), depth0)) - + '

\n
\n
\n\n
\n
\n
Рейтинг:
\n
\n \n \n ' - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'score') : stack1), depth0)) - + '\n \n \n \n \n
\n
\n
\n
Пол:
\n

' - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'sex') : stack1), depth0)) - + '

\n
\n
\n
Возраст:
\n

' - + ((stack1 = lookupProperty(helpers,'if').call(alias3,(depth0 != null ? lookupProperty(depth0,'isCorrectAge') : depth0),{'name':'if','hash':{},'fn':container.program(1, data, 0),'inverse':container.program(3, data, 0),'data':data,'loc':{'start':{'line':33,'column':47},'end':{'line':35,'column':41}}})) != null ? stack1 : '') - + '

\n
\n
\n
Хост:
\n

' - + ((stack1 = lookupProperty(helpers,'if').call(alias3,((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'isHost') : stack1),{'name':'if','hash':{},'fn':container.program(5, data, 0),'inverse':container.program(7, data, 0),'data':data,'loc':{'start':{'line':39,'column':47},'end':{'line':41,'column':38}}})) != null ? stack1 : '') - + '

\n
\n
\n
Серферы:
\n

' - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'guestCount') : stack1), depth0)) - + '

\n
\n
\n\n
\n
\n ' - + ((stack1 = lookupProperty(helpers,'if').call(alias3,(depth0 != null ? lookupProperty(depth0,'isMyProfile') : depth0),{'name':'if','hash':{},'fn':container.program(9, data, 0),'inverse':container.program(11, data, 0),'data':data,'loc':{'start':{'line':54,'column':13},'end':{'line':54,'column':62}}})) != null ? stack1 : '') - + '\n
\n
\n
'; - },'useData':true}); - templates['ProfilePopup.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - var helper, alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n \n ' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'title') : depth0), depth0)) - + '\n \n
\n
\n'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n
\n' - + ((stack1 = lookupProperty(helpers,'each').call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':3,'column':8},'end':{'line':14,'column':17}}})) != null ? stack1 : '') - + '
\n
'; - },'useData':true}); - templates['ReviewCard.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, alias4=container.lambda, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n
\n
\n
\n \n
\n

' - + alias3(alias4((depth0 != null ? lookupProperty(depth0,'userName') : depth0), depth0)) - + '

\n
\n\n
\n

' - + alias3(alias4((depth0 != null ? lookupProperty(depth0,'title') : depth0), depth0)) - + '

\n
\n ' - + alias3(alias4((depth0 != null ? lookupProperty(depth0,'text') : depth0), depth0)) - + '\n
\n
\n
\n\n
\n
\n ' - + alias3((lookupProperty(helpers,'renderStars')||(depth0 && lookupProperty(depth0,'renderStars'))||alias2).call(alias1,(depth0 != null ? lookupProperty(depth0,'rating') : depth0),{'name':'renderStars','hash':{},'data':data,'loc':{'start':{'line':20,'column':12},'end':{'line':20,'column':39}}})) - + '\n
\n
\n ' - + alias3(alias4((depth0 != null ? lookupProperty(depth0,'createdAt') : depth0), depth0)) - + '\n
\n
\n
'; - },'useData':true}); - templates['ReviewsGraphic.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.hooks.helperMissing, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n \n Извините, ваш браузер не поддерживает <canvas> элемент.\n \n\n
\n Изменение рейтинга\n Изменение среднего рейтинга\n
\n\n
\n

Всего оценок: ' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'totalRatings') : depth0), depth0)) - + '

\n

Дата первой оценки: ' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'firstDate') : depth0), depth0)) - + '

\n

Дата последней оценки: ' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'lastDate') : depth0), depth0)) - + '

\n

Наибольшая оценка: ' - + alias2((lookupProperty(helpers,'renderStars')||(depth0 && lookupProperty(depth0,'renderStars'))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,'highestRating') : depth0),{'name':'renderStars','hash':{},'data':data,'loc':{'start':{'line':15,'column':30},'end':{'line':15,'column':64}}})) - + '

\n

Наименьшая оценка: ' - + alias2((lookupProperty(helpers,'renderStars')||(depth0 && lookupProperty(depth0,'renderStars'))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,'lowestRating') : depth0),{'name':'renderStars','hash':{},'data':data,'loc':{'start':{'line':16,'column':30},'end':{'line':16,'column':63}}})) - + '

\n
\n
\n'; - },'useData':true}); - templates['SearchPopup.hbs'] = template({'1':function(container,depth0,helpers,partials,data) { - var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return ' ' - + alias2(alias1((depth0 != null ? lookupProperty(depth0,'title') : depth0), depth0)) - + '\n'; - },'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n \n\n
\n
\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias3,(depth0 != null ? lookupProperty(depth0,'firstGroup') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':9,'column':12},'end':{'line':11,'column':21}}})) != null ? stack1 : '') - + '
\n
\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias3,(depth0 != null ? lookupProperty(depth0,'secondGroup') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':14,'column':12},'end':{'line':16,'column':21}}})) != null ? stack1 : '') - + '
\n
\n' - + ((stack1 = lookupProperty(helpers,'each').call(alias3,(depth0 != null ? lookupProperty(depth0,'thirdGroup') : depth0),{'name':'each','hash':{},'fn':container.program(1, data, 0),'inverse':container.noop,'data':data,'loc':{'start':{'line':19,'column':12},'end':{'line':21,'column':21}}})) != null ? stack1 : '') - + '
\n
\n
\n\n'; - },'useData':true}); - templates['ShortAdCard.hbs'] = template({'compiler':[8,'>= 4.3.0'],'main':function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.hooks.helperMissing, alias5='function', lookupProperty = container.lookupProperty || function(parent, propertyName) { - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { - return parent[propertyName]; - } - return undefined; - }; - - return '
\n
\n
\n \n
\n
\n

' - + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'adAuthor') : stack1)) != null ? lookupProperty(stack1,'name') : stack1), depth0)) - + '

\n \n \n

' - + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'adAuthor') : stack1)) != null ? lookupProperty(stack1,'rating') : stack1), depth0)) - + '

\n
\n \n \n

' - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'cityName') : stack1), depth0)) - + '

\n
\n
\n
\n\n \n \n

' - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'address') : stack1), depth0)) - + '

\n
\n\n
\n ' - + alias2(alias1(((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'description') : stack1), depth0)) - + '\n
\n\n
\n
\n Пол:\n ' - + alias2(((helper = (helper = lookupProperty(helpers,'sex') || (depth0 != null ? lookupProperty(depth0,'sex') : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{'name':'sex','hash':{},'data':data,'loc':{'start':{'line':31,'column':49},'end':{'line':31,'column':56}}}) : helper))) - + '\n
\n
\n Возраст:\n ' - + alias2(((helper = (helper = lookupProperty(helpers,'age') || (depth0 != null ? lookupProperty(depth0,'age') : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{'name':'age','hash':{},'data':data,'loc':{'start':{'line':35,'column':49},'end':{'line':35,'column':56}}}) : helper))) - + '\n
\n
\n Всего гостей:\n ' - + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? lookupProperty(depth0,'data') : depth0)) != null ? lookupProperty(stack1,'adAuthor') : stack1)) != null ? lookupProperty(stack1,'guestCount') : stack1), depth0)) - + '\n
\n
\n\n
\n \n \n
\n
'; - },'useData':true}); -})(); \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 330fe2de..03acef4b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ import MapPage from './pages/MapPage/MapPage'; import { clearPage } from './modules/Clear'; -import './components/precompiled-templates'; +import '../precompiled-templates.js'; import APIService from './modules/ApiClient'; import AdPage from './pages/AdPage/AdPage'; import ApiClient from './modules/ApiClient'; From a5941e873f801ee47bfe827cce74f41d436e0a07 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:55:58 +0300 Subject: [PATCH 03/18] styles: update layout and styles for AdPage --- src/pages/AdPage/AdPage.hbs | 27 +++++++++++------ src/pages/AdPage/AdPage.scss | 59 +++++++++++++++++++++++++----------- 2 files changed, 58 insertions(+), 28 deletions(-) diff --git a/src/pages/AdPage/AdPage.hbs b/src/pages/AdPage/AdPage.hbs index 8e67288f..b25bf7ee 100644 --- a/src/pages/AdPage/AdPage.hbs +++ b/src/pages/AdPage/AdPage.hbs @@ -97,16 +97,23 @@ - \ No newline at end of file diff --git a/src/pages/AdPage/AdPage.scss b/src/pages/AdPage/AdPage.scss index 2f15d199..505fd93f 100644 --- a/src/pages/AdPage/AdPage.scss +++ b/src/pages/AdPage/AdPage.scss @@ -120,6 +120,7 @@ $secondary-card-size: 64px; &__desc { margin: 30px 0; font-size: 17px; + line-height: 1.5; } &__info-table { @@ -128,12 +129,12 @@ $secondary-card-size: 64px; display: flex; flex-direction: column; - font-size: 20px; + font-size: 17px; &__title { margin: 20px 0; font-weight: 500; - font-size: 30px; + font-size: 27px; } &__row { @@ -156,32 +157,122 @@ $secondary-card-size: 64px; text-align: right; } } -} - -.ad-page__fullscreen-overlay { - top: 0; - left: 0; - width: 100vw; - height: 100vh; - position: fixed; - z-index: 3; - display: flex; - justify-content: center; - align-items: center; - background: #00000063; - &__image { - top: 50%; - left: 50%; - width: auto; - height: 85vh; + &__fullscreen-overlay { + top: 0; + left: 0; + width: 100vw; + height: 100vh; + position: fixed; z-index: 3; - cursor: zoom-out; + display: flex; + justify-content: center; + align-items: center; + background: #00000063; + + &__image { + top: 50%; + left: 50%; + width: auto; + height: 85vh; + z-index: 3; + cursor: zoom-out; + } + &_hidden { + display: none; + } } - &_hidden { - display: none; + + &__author-info { + position: sticky; + top: 30px; + display: flex; + flex-direction: column; + width: 350px; + height: 400px; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); + background-color: #fff; + align-items: center; + border-radius: 5px; + + &::before { + content: ''; + width: 100%; + height: 190px; + background: #e5f0ff; + top: 0; + } + + &__avatar { + width: 90px; + height: auto; + margin-top: -40px; + border: 5px solid #fff; + border-radius: 50%; + } + + &__hoster-text { + padding: 10px 0; + color: #737a8e; + font-weight: 500; + font-size: 13px; + } + + &__name { + font-size: 20px; + font-weight: 500; + text-decoration: none; + color: #000; + + &:hover { + text-decoration: underline; + } + } + + &__inner-content { + margin-top: 30px; + width: 100%; + height: 100%; + padding: 0 20px; + box-sizing: border-box; + display: flex; + flex-direction: column; + gap: 20px; + } + + &__desc { + background: #f1f2f4; + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-between; + padding: 10px 10px; + box-sizing: border-box; + border-radius: 4px; + + &__item { + display: flex; + flex-direction: column; + } + + &__term { + color: #737a8e; + font-size: 12px; + } + + &__definition { + font-size: 14px; + font-weight: 500; + } + } + + &__write-msg-button { + @include mixins.button; + width: 100%; + } } } + .advert-apps { display: flex; flex-direction: row; @@ -213,105 +304,6 @@ $secondary-card-size: 64px; } } -// PROFILE -.ad-page-profile-container { - border: solid; - border-width: 1px; - border-radius: 10px; - display: flex; - flex-direction: column; - height: min-content; - max-width: 280px; - padding: 10px 20px; - background-color: white; - gap: 10px; - &__center { - color: #000; - text-align: center; - text-decoration: none; - - &:visited { - text-decoration: none; - } - - &:hover { - text-decoration: underline; - } - } - - &_photo { - border: solid; - border-radius: 50%; - border-width: 1px; - width: 200px; - height: 200px; - margin-top: 10%; - } - &__photo__img1 { - border-radius: 50%; - object-fit: cover; - width: 200px; - height: 200px; - } - &__p1 { - margin-top: 5%; - font-size: 28px; - font-weight: 500; - } - &__p2 { - margin-top: 5%; - font-size: 20px; - } - &__hr { - width: 100%; - } - &__raiting { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - padding-left: 10px; - width: 100%; - margin-top: 5%; - } - &__score-container { - display: flex; - align-items: center; - } - &_img2 { - width: fit-content; - padding-right: 10px; - } - &__score { - font-size: 20px; - font-weight: 300; - } - &__div { - gap: 10px; - display: flex; - width: 100%; - flex-direction: row; - align-items: center; - margin-top: 5%; - justify-content: space-between; - width: fit-content; - } - &__p { - font-size: 20px; - } - &__info { - font-size: 20px; - } - &__write-msg-button { - @include mixins.button; - } - &__show-on-map-button { - color: #808080; - text-align: center; - margin-bottom: 10px; - cursor: pointer; - } -} @media screen and (max-width: 900px) { .ad-page { display: flex; diff --git a/src/styles/mixins.scss b/src/styles/mixins.scss index 720e633c..19f5bf9b 100644 --- a/src/styles/mixins.scss +++ b/src/styles/mixins.scss @@ -7,7 +7,7 @@ min-height: 35px; height: fit-content; font-style: normal; - border-radius: 10px; + border-radius: 4px; border: none; font-size: 16px; font-weight: 600; From def0f313fc5236ae63230de50bdb7444c2332078 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:49:04 +0300 Subject: [PATCH 06/18] styles: update background color --- src/components/Header/Header.scss | 1 + src/styles/styles.sass | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss index 200d1f6b..94dde71f 100644 --- a/src/components/Header/Header.scss +++ b/src/components/Header/Header.scss @@ -3,6 +3,7 @@ height: 80px; display: flex; align-items: center; + border-bottom: 1px #e8e9ec solid; } .header__hrefs { diff --git a/src/styles/styles.sass b/src/styles/styles.sass index 5c5239cb..3c5f2d61 100644 --- a/src/styles/styles.sass +++ b/src/styles/styles.sass @@ -40,7 +40,7 @@ body font-optical-sizing: auto font-style: normal font-family: Inter, Arial, 'sans-serif' - background-color: #f6f6f6 + background-color: #fff @font-face From b753b321215ca8a88e872d4f3863a646af7960c2 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 22:15:27 +0300 Subject: [PATCH 07/18] fix: proxy default img not to minio but to frontend static asset --- nginx/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index b31af7d7..f17ad2b0 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -25,6 +25,10 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } + location /images/default.png { + proxy_pass http://frontend:5173/default.png; + } + location /images/ { proxy_pass http://host.docker.internal:9000; # Minio proxy_set_header Host $host; From b5b263746c79176c17b55c65a70c4910980aab90 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:28:13 +0000 Subject: [PATCH 08/18] fix: correct variable name --- src/pages/ProfilePage/ProfilePage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ProfilePage/ProfilePage.ts b/src/pages/ProfilePage/ProfilePage.ts index ba01f360..f362e887 100644 --- a/src/pages/ProfilePage/ProfilePage.ts +++ b/src/pages/ProfilePage/ProfilePage.ts @@ -67,7 +67,7 @@ class ProfilePage { this.#birthdate = data.birthDate; this.#avatar = data.avatar; this.#sex = this.#calculateSex(data.sex); - this.#age = this.#calculateAge(data.birthDate); + this.#age = this.#calculateAge(data.birthdate); } else if (response.status !== 401) { console.error('Wrong response from server', response); } From 129df917a1d4dc090477915fe9f60cd06a489de0 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 22:41:50 +0300 Subject: [PATCH 09/18] fix: rename birthDate to birthdate because backenders did --- src/components/ProfileData/ProfileData.ts | 2 +- src/components/ShortAdCard/ShortAdCard.ts | 27 ++++++++++++----------- src/modules/ApiClient.ts | 18 ++++++++++----- src/modules/Types.ts | 2 +- src/pages/AdPage/AdPage.ts | 2 +- src/pages/ProfilePage/ProfilePage.ts | 2 +- 6 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/components/ProfileData/ProfileData.ts b/src/components/ProfileData/ProfileData.ts index ff6e1dd2..d13d98ae 100644 --- a/src/components/ProfileData/ProfileData.ts +++ b/src/components/ProfileData/ProfileData.ts @@ -150,7 +150,7 @@ class ProfileData { this.#profileData.email = data.email; this.#profileData.isHost = data.isHost; this.#profileData.avatar = data.avatar; - this.#profileData.birthdate = data.birthDate.slice(0, 10); + this.#profileData.birthdate = data.birthdate.slice(0, 10); if (this.#profileData.birthdate != '0001-01-01') this.#showBirthdate = true; this.#profileData.sex = this.#calculateSex(data.sex); diff --git a/src/components/ShortAdCard/ShortAdCard.ts b/src/components/ShortAdCard/ShortAdCard.ts index 2b2c0192..dff7c47e 100644 --- a/src/components/ShortAdCard/ShortAdCard.ts +++ b/src/components/ShortAdCard/ShortAdCard.ts @@ -4,12 +4,12 @@ import { AdvertData } from '../../modules/Types'; import { calculateAge } from '../../modules/Utils'; import router from '../../modules/Router'; -class ShortHousing{ +class ShortHousing { #data: AdvertData; #index: number; #age: number; #sex: string; - #clickCallback: (arg0: string, arg1: string)=> void; + #clickCallback: (arg0: string, arg1: string) => void; constructor( data: AdvertData, @@ -18,7 +18,7 @@ class ShortHousing{ ) { this.#data = data; this.#index = index; - this.#age = calculateAge(this.#data.adAuthor.birthDate); + this.#age = calculateAge(this.#data.adAuthor.birthdate); this.#sex = this.#calculateSex(this.#data.adAuthor.sex); this.#clickCallback = callback; } @@ -36,20 +36,21 @@ class ShortHousing{ async #addEventListeners(wrapper: HTMLDivElement): Promise { //При клике на карточку меняется центр карты на это объявление - wrapper.addEventListener('click', ()=>{ + wrapper.addEventListener('click', () => { this.#clickCallback(this.#data.cityName, this.#data.address); }); //При клике на кнопку "Подробнее" переход на страницу объявления - document - .querySelector('.js-more-ads[data-index="'+ this.#index +'"]')!.onclick = ()=>{ - router.navigateTo(`/ads/?id=${this.#data.id}`); - }; + document.querySelector( + '.js-more-ads[data-index="' + this.#index + '"]' + )!.onclick = () => { + router.navigateTo(`/ads/?id=${this.#data.id}`); + }; //При клике на кнопку "Напиши мне" БУДЕТ переход на страницу чата document - .querySelector('.js-new-chat[data-index="'+ this.#index +'"]') - ?.addEventListener('click', ()=>{ + .querySelector('.js-new-chat[data-index="' + this.#index + '"]') + ?.addEventListener('click', () => { console.log(this.#index); }); } @@ -59,13 +60,13 @@ class ShortHousing{ const shortCardWrapper = document.createElement('div'); shortCardWrapper.innerHTML = template({ data: this.#data, - sex: this.#sex, + sex: this.#sex, age: this.#age, - index: this.#index + index: this.#index, }); parent.appendChild(shortCardWrapper); await this.#addEventListeners(shortCardWrapper); } } -export default ShortHousing; \ No newline at end of file +export default ShortHousing; diff --git a/src/modules/ApiClient.ts b/src/modules/ApiClient.ts index 3f35937a..87a33649 100644 --- a/src/modules/ApiClient.ts +++ b/src/modules/ApiClient.ts @@ -1,7 +1,13 @@ 'use strict'; import Ajax from './Ajax'; -import { RegisterParams, AdsFilters, LoginParams, EditParams, ReviewData } from './Types'; +import { + RegisterParams, + AdsFilters, + LoginParams, + EditParams, + ReviewData, +} from './Types'; interface Limit { limit: number; @@ -16,7 +22,7 @@ class APIClient { * @public * @description Получает список объявлений */ - async getAds(filters?: AdsFilters, limit?:Limit) { + async getAds(filters?: AdsFilters, limit?: Limit) { try { let url = '/housing?'; @@ -188,7 +194,7 @@ class APIClient { name: name, email: email, sex: sex, - birthDate: birthdate, + birthdate: birthdate, isHost: isHost, }; @@ -200,16 +206,16 @@ class APIClient { return Ajax.put({ url, body: formData }); } - async leaveReview({hostId, title, text, rating}: ReviewData) { + async leaveReview({ hostId, title, text, rating }: ReviewData) { const url = this.BASE_URL + '/reviews'; const body = { hostId: hostId, title: title, text: text, - rating: rating + rating: rating, }; - return Ajax.post({url, body}); + return Ajax.post({ url, body }); } async getReviewsByUser(uuid: string) { diff --git a/src/modules/Types.ts b/src/modules/Types.ts index 70ba8cad..951da672 100644 --- a/src/modules/Types.ts +++ b/src/modules/Types.ts @@ -54,7 +54,7 @@ export interface City { export interface ProfileInfo { avatar: string; - birthDate: string; + birthdate: string; email: string; guestCount: number; id: string; diff --git a/src/pages/AdPage/AdPage.ts b/src/pages/AdPage/AdPage.ts index d10434af..7fd9224a 100644 --- a/src/pages/AdPage/AdPage.ts +++ b/src/pages/AdPage/AdPage.ts @@ -32,7 +32,7 @@ export default class AdPage extends ReactiveComponent { templateData: { ...data, ...authorInfo, - age: calculateAge(authorInfo.birthDate), + age: calculateAge(authorInfo.birthdate), sex: authorInfo.sex === 'M' ? 'Мужской' : 'Женский', }, }); diff --git a/src/pages/ProfilePage/ProfilePage.ts b/src/pages/ProfilePage/ProfilePage.ts index f362e887..4cd10d27 100644 --- a/src/pages/ProfilePage/ProfilePage.ts +++ b/src/pages/ProfilePage/ProfilePage.ts @@ -64,7 +64,7 @@ class ProfilePage { this.#guestCount = data.guestCount; this.#score = data.score; this.#isHost = data.isHost; - this.#birthdate = data.birthDate; + this.#birthdate = data.birthdate; this.#avatar = data.avatar; this.#sex = this.#calculateSex(data.sex); this.#age = this.#calculateAge(data.birthdate); From 2f707c262750813237b0718e04c7d026ff1e1bee Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:25:47 +0000 Subject: [PATCH 10/18] fix: delete address from profile --- src/components/ProfileData/EditForm.hbs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/components/ProfileData/EditForm.hbs b/src/components/ProfileData/EditForm.hbs index 41db8186..f29c305b 100644 --- a/src/components/ProfileData/EditForm.hbs +++ b/src/components/ProfileData/EditForm.hbs @@ -100,21 +100,6 @@ -
-

Адрес:

- - - ! - -
-
{{!--

Пароль:

From 0bdb0304546ed3d13e32983702ac986f435510bf Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Thu, 28 Nov 2024 22:59:50 +0000 Subject: [PATCH 11/18] feat(adpage): add smooth transition effect --- src/components/AdCard/AdCard.hbs | 12 +- src/components/AdCard/AdCard.scss | 5 + src/components/AdCard/AdCard.ts | 206 +++++++++++++++++++++++------- 3 files changed, 176 insertions(+), 47 deletions(-) diff --git a/src/components/AdCard/AdCard.hbs b/src/components/AdCard/AdCard.hbs index 1233ea0f..e399a1ad 100644 --- a/src/components/AdCard/AdCard.hbs +++ b/src/components/AdCard/AdCard.hbs @@ -1,11 +1,17 @@
-
+
Housing card image + Housing card image
{{#each images}} diff --git a/src/components/AdCard/AdCard.scss b/src/components/AdCard/AdCard.scss index 4017b8f1..6be6116e 100644 --- a/src/components/AdCard/AdCard.scss +++ b/src/components/AdCard/AdCard.scss @@ -30,13 +30,18 @@ height: 290px; min-height: 0; max-height: 290px; + z-index: 2; } &__main-img { + position: absolute; + top: 0; + width: 100%; height: 100%; object-fit: cover; object-position: center; + transition: 0.3s opacity ease-in-out; } &__image-pagination-div { diff --git a/src/components/AdCard/AdCard.ts b/src/components/AdCard/AdCard.ts index 5c877e6c..5d262608 100644 --- a/src/components/AdCard/AdCard.ts +++ b/src/components/AdCard/AdCard.ts @@ -6,107 +6,225 @@ import router from '../../modules/Router'; import { AdvertData } from '../../modules/Types'; import ReactiveComponent from '../ReactiveComponent/ReactiveComponent'; -interface AdCardState { - toShowIndex: number; -} - /** Карточка объявления на главной странице */ export default class AdCard extends ReactiveComponent { - #data; - currentImagePath: string; + private data; + private pendingImageIndex: number | null; // Пикчу, которую будем показывать после того, как пользователь закончил мотать в процессе уже работающей анимации + private plannedImageIndex: number | null; // Пикча, которую анимация хотела показать + private currentImageIndex; - /** - * @param {object} data - информация о карточке - @param {HTMLDivElement} parent - родитель, в чьем списке детей будет карточка */ + private oldImage: HTMLImageElement | null; + private newImage: HTMLImageElement | null; + private imgScrollTimeouts; + private inAnimation: boolean; + private circles: HTMLCollectionOf; + + /** + * @param data - информация о карточке + * @param parent - родитель, в чьем списке детей будет карточка + */ constructor(parent: HTMLDivElement, data: AdvertData) { super({ parent: parent, id: '' + data.id, - initialState: { - toShowIndex: 0, - }, + initialState: {}, computedValues: { - currentImagePath: (state) => { - return data.images[state.toShowIndex as number].path; - }, + // currentImagePath: (state) => { + // return data.images[state.toShowIndex as number].path; + // }, }, templateData: data, }); - this.currentImagePath = ''; - this.#data = data; + this.pendingImageIndex = null; + this.plannedImageIndex = null; + this.currentImageIndex = 0; + this.data = data; + this.oldImage = this.newImage = null; + this.imgScrollTimeouts = []; + this.inAnimation = false; } addEventListeners() { this.thisElement.onclick = () => { - router.navigateTo(`/ads/?id=${this.#data.id}`); + router.navigateTo(`/ads/?id=${this.data.id}`); }; ( this.thisElement.querySelector( '.js-like-button' ) as HTMLButtonElement - ).onclick = this.#addToFavorite; + ).onclick = this.addToFavorite; setTimeout(() => { - this.#addImageScrolling(); + this.addImageScrolling(); }, 0); // setTimeout ensures the code will be called AFTER browser finished rendering innerHTML new content } /** - * Функция, которая добавляет возможность скроллинга изображений карточки как в Ozonе + * @description Функция, которая добавляет возможность скроллинга изображений карточки как в Ozonе */ - #addImageScrolling() { - const imgElem: HTMLImageElement = - this.thisElement.querySelector('.js-main-img')!; + addImageScrolling() { + const imgContainer = this.thisElement.querySelector( + '.js-image-container' + ) as HTMLDivElement; - const imagesAmount = Math.min(this.#data.images.length, 7); // We must only show max amount of 7! + const imagesAmount = Math.min(this.data.images.length, 7); // We must only show max amount of 7! const areaFraction = - imgElem.getBoundingClientRect().width / imagesAmount; + imgContainer.getBoundingClientRect().width / imagesAmount; - const circles = this.thisElement.getElementsByClassName( + this.circles = this.thisElement.getElementsByClassName( 'housing-card__circle' ); - imgElem.onmousemove = (e) => this.#onMouseMove(e, areaFraction); - imgElem.onmouseout = () => this.#onMouseOut(); + this.oldImage = this.thisElement.querySelector( + '.js-old-img' + ) as HTMLImageElement; + this.newImage = this.thisElement.querySelector( + '.js-new-img' + ) as HTMLImageElement; - circles[this.state.toShowIndex as number].classList.add( + imgContainer.onmousemove = (e) => this.onMouseMove(e, areaFraction); + imgContainer.onmouseleave = () => this.onMouseOut(); + + this.circles[this.currentImageIndex as number].classList.add( 'housing-card__circle--fill' ); } /** - * Функция, которая показывает нужную фотографию в зависимости от позиции курсора + * @description Функция, которая показывает нужную фотографию в зависимости от позиции курсора */ - #onMouseMove(e: MouseEvent, areaFraction: number) { + onMouseMove(e: MouseEvent, areaFraction: number) { const rect = (e.target as HTMLElement).getBoundingClientRect(); const x = e.clientX - rect.left; if (x < 0) return; const toShowIndex = Math.floor(x / areaFraction); - if (toShowIndex === this.state.toShowIndex) { + + this.showImage(toShowIndex); + } + + /** + * + * @param index индекс кружка, который нужно выделить + */ + private markCircleSelected(index: number) { + [...this.circles].map((x) => + x.classList.remove('housing-card__circle--fill') + ); + + this.circles[index as number].classList.add( + 'housing-card__circle--fill' + ); + } + + /** + * @description Показывает изображение с индексом {toShowIndex} с плавной анимацией затухания. + */ + private showImage(toShowIndex: number) { + // Проверяем что images не null + if (!this.oldImage || !this.newImage) { + throw new Error('oldImage & newImage = nulls!'); + } + + if ( + (!this.inAnimation && toShowIndex === this.currentImageIndex) || + (this.inAnimation && toShowIndex === this.plannedImageIndex) + ) { return; } - // todo: fix this - setTimeout(() => { - this.state.toShowIndex = toShowIndex; - }, SCROLL_DELAY); + this.markCircleSelected(toShowIndex); + + // Если были в процессе анимации, но пользователь помотал мышкой и выбрал другой индекс + // То запоминаем его выбор + if (this.inAnimation) { + if (this.inAnimation && toShowIndex === this.pendingImageIndex) { + return; + } + + console.log( + 'this.pendingImageIndex = toShowIndex;', + this.pendingImageIndex, + toShowIndex + ); + + this.pendingImageIndex = toShowIndex; + + return; + } + + // Animation begin + this.inAnimation = true; + this.plannedImageIndex = toShowIndex; + + // Новая фотка на задний план, а старая на переднем + this.newImage.style.zIndex = '-1'; + this.oldImage.style.zIndex = '0'; + + // Меняем src у новой фотки + this.newImage.src = this.data.images[toShowIndex].path; + + // Теперь просто меняем непрозрачность у старой, чтобы было видно новую + this.oldImage.style.opacity = '0'; + + // После завершения анимации СВАПАЕМ местами старую и новую фотку + // и выполняем переключение изображения, если юзер успел в процессе анимации переместить курсор на область фото + // сдругим индексом + const timeout = setTimeout(() => { + if (!this.oldImage || !this.newImage) + throw new Error('oldImage & newImage = nulls!'); + + // И возвращаем newImage к исходному состоянию + this.oldImage.style.zIndex = '-1'; + this.newImage.style.zIndex = '0'; + + this.oldImage.style.opacity = '1'; + + // Просто делаем swap переменных, потому по сути newImage теперь oldImage и vice versa + const tmp = this.oldImage; + this.oldImage = this.newImage; + this.newImage = tmp; + + this.imgScrollTimeouts = []; + this.currentImageIndex = this.plannedImageIndex!; + + // Если юзер переместил курсор, то показывает ту фотку, которую он хотел + if (this.pendingImageIndex) { + console.log( + 'I need to set my index to:', + this.pendingImageIndex + ); + this.inAnimation = false; + this.showImage(this.pendingImageIndex); + this.pendingImageIndex = null; + } + + // We've finished the animation + this.inAnimation = false; + this.plannedImageIndex = null; + console.log('finished'); + }, 300); // here should be ANIMATION_TIME defined in CSS + + // Clear all old setTimeouts + this.imgScrollTimeouts.map((timeoutToClear) => + clearTimeout(timeoutToClear) + ); + this.imgScrollTimeouts = [timeout]; } /** - * Функция, которая показывает первую фотографию, когда курсор вне карточки + * @description Функция, которая показывает первую фотографию, когда курсор вне карточки */ - #onMouseOut() { - setTimeout(() => { - if (this.state.toShowIndex !== 0) this.state.toShowIndex = 0; - }, SCROLL_DELAY); + onMouseOut() { + console.log('??wtf'); + this.showImage(0); } /** - * Вызывается при нажатии на кнопку добавить в избранное + * @description Вызывается при нажатии на кнопку добавить в избранное */ - #addToFavorite() { + addToFavorite() { console.log('fav btn was clicked!'); } } From 4590b14e87ae2d71250a4d2375bba1645eac415e Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Thu, 28 Nov 2024 23:16:53 +0000 Subject: [PATCH 12/18] refactor: remove unnecessary code --- src/components/AdCard/AdCard.hbs | 1 - src/components/AdCard/AdCard.scss | 3 +- src/components/AdCard/AdCard.ts | 56 ++++++------------------------- 3 files changed, 12 insertions(+), 48 deletions(-) diff --git a/src/components/AdCard/AdCard.hbs b/src/components/AdCard/AdCard.hbs index e399a1ad..750726a2 100644 --- a/src/components/AdCard/AdCard.hbs +++ b/src/components/AdCard/AdCard.hbs @@ -10,7 +10,6 @@ class='housing-card__main-img js-new-img' src='{{images.[0].path}}' alt='Housing card image' - style='opacity: 0' />
diff --git a/src/components/AdCard/AdCard.scss b/src/components/AdCard/AdCard.scss index 6be6116e..bcde45f9 100644 --- a/src/components/AdCard/AdCard.scss +++ b/src/components/AdCard/AdCard.scss @@ -30,7 +30,6 @@ height: 290px; min-height: 0; max-height: 290px; - z-index: 2; } &__main-img { @@ -41,7 +40,7 @@ height: 100%; object-fit: cover; object-position: center; - transition: 0.3s opacity ease-in-out; + transition: 0.2s opacity ease-in-out; } &__image-pagination-div { diff --git a/src/components/AdCard/AdCard.ts b/src/components/AdCard/AdCard.ts index 5d262608..cf064079 100644 --- a/src/components/AdCard/AdCard.ts +++ b/src/components/AdCard/AdCard.ts @@ -9,15 +9,13 @@ import ReactiveComponent from '../ReactiveComponent/ReactiveComponent'; /** Карточка объявления на главной странице */ export default class AdCard extends ReactiveComponent { private data; - private pendingImageIndex: number | null; // Пикчу, которую будем показывать после того, как пользователь закончил мотать в процессе уже работающей анимации private plannedImageIndex: number | null; // Пикча, которую анимация хотела показать private currentImageIndex; private oldImage: HTMLImageElement | null; private newImage: HTMLImageElement | null; - private imgScrollTimeouts; - private inAnimation: boolean; - private circles: HTMLCollectionOf; + private imgScrollTimeouts: NodeJS.Timeout[]; + private circles!: HTMLCollectionOf; /** * @param data - информация о карточке @@ -35,13 +33,11 @@ export default class AdCard extends ReactiveComponent { }, templateData: data, }); - this.pendingImageIndex = null; this.plannedImageIndex = null; this.currentImageIndex = 0; this.data = data; this.oldImage = this.newImage = null; this.imgScrollTimeouts = []; - this.inAnimation = false; } addEventListeners() { @@ -128,34 +124,17 @@ export default class AdCard extends ReactiveComponent { } if ( - (!this.inAnimation && toShowIndex === this.currentImageIndex) || - (this.inAnimation && toShowIndex === this.plannedImageIndex) + (!this.imgScrollTimeouts.length && + toShowIndex === this.currentImageIndex) || + (this.imgScrollTimeouts.length !== 0 && + toShowIndex === this.plannedImageIndex) ) { return; } this.markCircleSelected(toShowIndex); - // Если были в процессе анимации, но пользователь помотал мышкой и выбрал другой индекс - // То запоминаем его выбор - if (this.inAnimation) { - if (this.inAnimation && toShowIndex === this.pendingImageIndex) { - return; - } - - console.log( - 'this.pendingImageIndex = toShowIndex;', - this.pendingImageIndex, - toShowIndex - ); - - this.pendingImageIndex = toShowIndex; - - return; - } - // Animation begin - this.inAnimation = true; this.plannedImageIndex = toShowIndex; // Новая фотка на задний план, а старая на переднем @@ -164,9 +143,10 @@ export default class AdCard extends ReactiveComponent { // Меняем src у новой фотки this.newImage.src = this.data.images[toShowIndex].path; - - // Теперь просто меняем непрозрачность у старой, чтобы было видно новую - this.oldImage.style.opacity = '0'; + this.newImage.onload = () => { + // Теперь просто меняем непрозрачность у старой, чтобы было видно новую + this.oldImage!.style.opacity = '0'; + }; // После завершения анимации СВАПАЕМ местами старую и новую фотку // и выполняем переключение изображения, если юзер успел в процессе анимации переместить курсор на область фото @@ -189,22 +169,9 @@ export default class AdCard extends ReactiveComponent { this.imgScrollTimeouts = []; this.currentImageIndex = this.plannedImageIndex!; - // Если юзер переместил курсор, то показывает ту фотку, которую он хотел - if (this.pendingImageIndex) { - console.log( - 'I need to set my index to:', - this.pendingImageIndex - ); - this.inAnimation = false; - this.showImage(this.pendingImageIndex); - this.pendingImageIndex = null; - } - // We've finished the animation - this.inAnimation = false; this.plannedImageIndex = null; - console.log('finished'); - }, 300); // here should be ANIMATION_TIME defined in CSS + }, 200); // here should be ANIMATION_TIME defined in CSS // Clear all old setTimeouts this.imgScrollTimeouts.map((timeoutToClear) => @@ -217,7 +184,6 @@ export default class AdCard extends ReactiveComponent { * @description Функция, которая показывает первую фотографию, когда курсор вне карточки */ onMouseOut() { - console.log('??wtf'); this.showImage(0); } From e38e8ce79bc686b55536de19618b20dc63ede54b Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Fri, 29 Nov 2024 23:11:30 +0300 Subject: [PATCH 13/18] fix(AdPage): always display avatar as a circle --- src/pages/AdPage/AdPage.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/AdPage/AdPage.scss b/src/pages/AdPage/AdPage.scss index 505fd93f..fdb35b62 100644 --- a/src/pages/AdPage/AdPage.scss +++ b/src/pages/AdPage/AdPage.scss @@ -205,7 +205,8 @@ $secondary-card-size: 64px; &__avatar { width: 90px; - height: auto; + aspect-ratio: 1/1; + object-fit: cover; margin-top: -40px; border: 5px solid #fff; border-radius: 50%; From 379f880a7267104bdf38715e38166d503454730f Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:44:48 +0300 Subject: [PATCH 14/18] New ad list (#34) * feat: move EditAdvertPage into AdListPage * feat: add new ad list page * feat: 2nd iteration of better ad list * styles: update profile popup * fix: check linter only on push (not both push & pull request) * ci: build project only on 1 node js version * fix: update eslint config --- .github/workflows/lint.yml | 2 - .github/workflows/nodejs-build.yml | 2 +- eslint.config.mjs | 2 +- .../HorizontalAdCard/HorizontalAdCard.hbs | 53 ++++-- .../HorizontalAdCard/HorizontalAdCard.scss | 78 +++++++++ .../HorizontalAdCard/HorizontalAdCard.ts | 24 +-- src/components/ProfileData/ProfileData.ts | 93 ++++++----- src/components/ProfilePopup/ProfilePopup.hbs | 1 - src/components/ProfilePopup/ProfilePopup.scss | 31 ++-- src/components/ProfilePopup/ProfilePopup.ts | 4 - src/index.ts | 4 +- src/modules/ApiClient.ts | 2 +- src/modules/Types.ts | 2 +- src/pages/AdListPage/AdListPage.hbs | 38 ++++- src/pages/AdListPage/AdListPage.sass | 129 -------------- src/pages/AdListPage/AdListPage.scss | 117 +++++++++++++ src/pages/AdListPage/AdListPage.ts | 87 +++++++--- src/pages/AdPage/AdPage.scss | 2 +- src/pages/EditAdvertPage/EditAdvertPage.hbs | 157 +++++++++--------- src/pages/EditAdvertPage/EditAdvertPage.scss | 26 +-- src/pages/EditAdvertPage/EditAdvertPage.ts | 37 ++++- src/styles/mixins.scss | 18 ++ src/styles/styles.sass | 1 + 23 files changed, 563 insertions(+), 347 deletions(-) create mode 100644 src/components/HorizontalAdCard/HorizontalAdCard.scss delete mode 100644 src/pages/AdListPage/AdListPage.sass create mode 100644 src/pages/AdListPage/AdListPage.scss diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c2421de0..44e7838f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,8 +3,6 @@ name: Lint on: push: branches: ['*'] - pull_request: - branches: ['*'] jobs: run-linters: diff --git a/.github/workflows/nodejs-build.yml b/.github/workflows/nodejs-build.yml index 4335e7e3..741a00e6 100644 --- a/.github/workflows/nodejs-build.yml +++ b/.github/workflows/nodejs-build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [20.x, 22.x] + node-version: [20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/eslint.config.mjs b/eslint.config.mjs index 0a92e8a7..69eb2414 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -12,7 +12,7 @@ export default [ }, }, { - ignores: ['dist/*', 'components/precompiled-templates.js', 'include/*'], + ignores: ['dist/*', 'precompiled-templates.js', 'src/include/*'], }, { languageOptions: { diff --git a/src/components/HorizontalAdCard/HorizontalAdCard.hbs b/src/components/HorizontalAdCard/HorizontalAdCard.hbs index ad16ba4b..6039323c 100644 --- a/src/components/HorizontalAdCard/HorizontalAdCard.hbs +++ b/src/components/HorizontalAdCard/HorizontalAdCard.hbs @@ -2,7 +2,7 @@
- - + }}

{{cityName}}

{{address}}

- - - + + +
\ No newline at end of file diff --git a/src/components/HorizontalAdCard/HorizontalAdCard.scss b/src/components/HorizontalAdCard/HorizontalAdCard.scss new file mode 100644 index 00000000..e71ead90 --- /dev/null +++ b/src/components/HorizontalAdCard/HorizontalAdCard.scss @@ -0,0 +1,78 @@ +@use '../../styles/mixins'; + +.horizontal-ad-card { + display: flex; + flex-direction: row; + gap: 40px; + padding: 15px; + transition: 0.3s all; + border: 2px #e4e4e4 solid; + border-bottom: none; + + &:last-child { + border-bottom: 2px #e4e4e4 solid; + } + + &:hover { + background-color: #cecece; + } + &__img { + min-width: 270px; + width: 270px; + height: 150px; + object-fit: cover; + border-radius: 2px; + } + &__info { + display: flex; + width: 100%; + flex-direction: column; + justify-content: space-between; + position: relative; + } + &__notification-bell { + position: absolute; + width: 32px; + top: 0px; + right: 0px; + cursor: pointer; + } + &__city { + font-size: 32px; + } + &__address { + font-size: 20px; + color: #7a7a7a; + } + &__buttons-container { + display: flex; + gap: 30px; + } + &__open-btn { + @include mixins.small-button; + background-color: #e6f0ff; + color: #0661ec; + + &:hover { + background-color: #d9e8ff; + } + } + &__edit-btn { + @include mixins.small-button; + background-color: #e6f0ff; + color: #0661ec; + + &:hover { + background-color: #d9e8ff; + } + } + &__del-btn { + @include mixins.small-button; + background-color: #e6f0ff; + color: #0661ec; + + &:hover { + background-color: #d9e8ff; + } + } +} diff --git a/src/components/HorizontalAdCard/HorizontalAdCard.ts b/src/components/HorizontalAdCard/HorizontalAdCard.ts index 07265b03..53861693 100644 --- a/src/components/HorizontalAdCard/HorizontalAdCard.ts +++ b/src/components/HorizontalAdCard/HorizontalAdCard.ts @@ -20,21 +20,23 @@ export default function HorizontalAdCard( pageContainer.innerHTML = template(cardData); - pageContainer - .querySelector('.js-open-btn') - ?.addEventListener('click', () => callbacks.onOpen(cardData.id)); + (pageContainer.querySelector('.js-open-btn') as HTMLButtonElement).onclick = + (e) => { + e.stopPropagation(); + callbacks.onOpen(cardData.id); + }; - pageContainer - .querySelector('.js-edit-btn') - ?.addEventListener('click', () => { + (pageContainer.querySelector('.js-edit-btn') as HTMLButtonElement).onclick = + (pageContainer.firstChild as HTMLElement).onclick = (e) => { + e.stopPropagation(); callbacks.onEdit(cardData.id); - }); + }; - pageContainer - .querySelector('.js-del-btn') - ?.addEventListener('click', () => { + (pageContainer.querySelector('.js-del-btn') as HTMLButtonElement).onclick = + (e) => { + e.stopPropagation(); callbacks.onDel(cardData.id); - }); + }; return pageContainer.firstChild as HTMLDivElement; } diff --git a/src/components/ProfileData/ProfileData.ts b/src/components/ProfileData/ProfileData.ts index d13d98ae..7206fa4d 100644 --- a/src/components/ProfileData/ProfileData.ts +++ b/src/components/ProfileData/ProfileData.ts @@ -46,7 +46,11 @@ class ProfileData { #uploadAvatarImage?: File; #renderProfileInfo; - constructor(renderProfileInfoCallback: () => void, isMyProfile: boolean, otherUserId?: string) { + constructor( + renderProfileInfoCallback: () => void, + isMyProfile: boolean, + otherUserId?: string + ) { this.#isMyProfile = isMyProfile; if (otherUserId) { this.#otherUserId = otherUserId; @@ -122,16 +126,25 @@ class ProfileData { */ #dataToString(data: string): string { const monthNames = [ - 'января', 'февраля', 'марта', 'апреля', - 'мая', 'июня', 'июля', 'августа', - 'сентября', 'октября', 'ноября', 'декабря' + 'января', + 'февраля', + 'марта', + 'апреля', + 'мая', + 'июня', + 'июля', + 'августа', + 'сентября', + 'октября', + 'ноября', + 'декабря', ]; - + const date = new Date(data); const day = date.getDate(); const month = monthNames[date.getMonth()]; const year = date.getFullYear(); - + return `${day} ${month} ${year}г.`; } @@ -204,11 +217,16 @@ class ProfileData { async #leaveReview(): Promise { const data: ReviewData = { hostId: this.#otherUserId as string, - title: (document.querySelector('#review-title') as HTMLInputElement).value, - text: (document.querySelector('#review-text') as HTMLTextAreaElement).value, - rating: Number((document - .querySelector('input[name="rating"]:checked') as HTMLInputElement)! - .value) + title: (document.querySelector('#review-title') as HTMLInputElement) + .value, + text: ( + document.querySelector('#review-text') as HTMLTextAreaElement + ).value, + rating: Number( + (document.querySelector( + 'input[name="rating"]:checked' + ) as HTMLInputElement)!.value + ), }; const response = await ApiClient.leaveReview(data); @@ -218,9 +236,7 @@ class ProfileData { dataContainer?.appendChild(this.#content); } else { clearPage('profile'); - const errorMessage = PopupAlert( - 'Неверный формат отзыва' - ); + const errorMessage = PopupAlert('Неверный формат отзыва'); document .querySelector('#profile-content') ?.appendChild(errorMessage); @@ -241,9 +257,7 @@ class ProfileData { return data; } else { clearPage('profile'); - const errorMessage = PopupAlert( - 'Ошибка получения отзывов' - ); + const errorMessage = PopupAlert('Ошибка получения отзывов'); document .querySelector('#profile-content') ?.appendChild(errorMessage); @@ -375,12 +389,12 @@ class ProfileData { #addButtonEventListener(): void { const editButton = document.getElementById('edit-button'); if (this.#isMyProfile) { - editButton!.addEventListener('click', (e)=>{ + editButton!.addEventListener('click', (e) => { e.preventDefault(); this.#renderForm(); }); } else { - editButton!.addEventListener('click', (e)=>{ + editButton!.addEventListener('click', (e) => { e.preventDefault(); clearPage('form'); this.#content.replaceChildren(); @@ -496,9 +510,9 @@ class ProfileData { }); } - #submitReviewEventListener(){ + #submitReviewEventListener() { const leaveReviewButton = document.querySelector('.js-leave-review'); - leaveReviewButton!.addEventListener('click', async (e)=>{ + leaveReviewButton!.addEventListener('click', async (e) => { e.preventDefault(); await this.#leaveReview(); await this.#renderProfileInfo(); @@ -511,7 +525,7 @@ class ProfileData { #renderGraphicEventListener(): void { document .querySelector('.js-graphic-href') - ?.addEventListener('click', (e)=>{ + ?.addEventListener('click', (e) => { e.preventDefault(); this.#renderGraphic(); }); @@ -560,7 +574,9 @@ class ProfileData { #renderMap() { this.#content.replaceChildren(); this.#content.classList.remove('y-scroll'); - this.#content.parentElement?.classList.remove('fix-bottom-right-border'); + this.#content.parentElement?.classList.remove( + 'fix-bottom-right-border' + ); const wrapper = document.createElement('div'); wrapper.id = 'wrapper'; wrapper.classList.add('data-container__wrapper'); @@ -578,16 +594,18 @@ class ProfileData { const reviews = await this.#getReviews(); if (reviews.length != 0) { this.#content.classList.add('y-scroll'); - this.#content.parentElement?.classList.add('fix-bottom-right-border'); + this.#content.parentElement?.classList.add( + 'fix-bottom-right-border' + ); reviews.forEach((reviewData) => { console.log(reviewData); - reviewData.createdAt = this.#dataToString(reviewData.createdAt); + reviewData.createdAt = this.#dataToString(reviewData.createdAt); const review = new ReviewCard(reviewData); review.render(this.#content); }); } else { - const noReviews = new NoReviews(this.#isMyProfile, ()=>{ + const noReviews = new NoReviews(this.#isMyProfile, () => { console.log('there'); clearPage('form'); this.#content.replaceChildren(); @@ -599,18 +617,20 @@ class ProfileData { #renderAchievments() {} - async #renderGraphic(){ + async #renderGraphic() { this.#content.replaceChildren(); const reviews = await this.#getReviews(); if (reviews.length != 0) { this.#content.classList.remove('y-scroll'); - this.#content.parentElement?.classList.remove('fix-bottom-right-border'); + this.#content.parentElement?.classList.remove( + 'fix-bottom-right-border' + ); const graphicData = new Array(); - for (const {createdAt, rating} of reviews){ + for (const { createdAt, rating } of reviews) { const point: GraphicPoint = { - date: (new Date(createdAt)).toLocaleDateString('ru-RU'), - rating: rating + date: new Date(createdAt).toLocaleDateString('ru-RU'), + rating: rating, }; graphicData.push(point); } @@ -618,7 +638,7 @@ class ProfileData { const reviewsGraphic = new ReviewsGraphic(graphicData); reviewsGraphic.render(this.#content); } else { - const noReviews = new NoReviews(this.#isMyProfile, ()=>{ + const noReviews = new NoReviews(this.#isMyProfile, () => { console.log('there'); clearPage('form'); this.#content.replaceChildren(); @@ -659,14 +679,11 @@ class ProfileData { * @private * @description Рендер окна оценивния */ - #renderReviewForm(): void{ + #renderReviewForm(): void { this.#content.replaceChildren(); const template = Handlebars.templates['RatingForm.hbs']; - this.#content.insertAdjacentHTML( - 'beforeend', - template({}) - ); - + this.#content.insertAdjacentHTML('beforeend', template({})); + this.#submitReviewEventListener(); } diff --git a/src/components/ProfilePopup/ProfilePopup.hbs b/src/components/ProfilePopup/ProfilePopup.hbs index 4a90c79f..82b133dc 100644 --- a/src/components/ProfilePopup/ProfilePopup.hbs +++ b/src/components/ProfilePopup/ProfilePopup.hbs @@ -10,7 +10,6 @@ {{this.title}}
-
{{/each}}
\ No newline at end of file diff --git a/src/components/ProfilePopup/ProfilePopup.scss b/src/components/ProfilePopup/ProfilePopup.scss index c5d4ab6a..e2e61efb 100644 --- a/src/components/ProfilePopup/ProfilePopup.scss +++ b/src/components/ProfilePopup/ProfilePopup.scss @@ -11,30 +11,33 @@ } .profile-list { + display: flex; + flex-direction: column; + gap: 20px; + z-index: 10; position: relative; top: 70px; - left: 88%; - min-width: min-content; - max-width: 120px; - padding: 20px 20px 0px 20px; - border: solid; - border-radius: 10px; - border-width: 2px; - border-color: #635b5b; + left: 100%; + transform: translateX(-140%); + width: 150px; + padding: 18px 16px 20px; + border-radius: 4px; + box-shadow: 0 8px 16px #0006; background-color: #ffffff; margin-right: 10px; } .profile-list__href { - font-size: 20px; - font-weight: 600; + font-size: 15px; + font-weight: 500; text-decoration: none; - color: #635b5b; + color: #152242; cursor: pointer; -} - -.profile-list__underline { margin-bottom: 20px; + + &:hover { + color: #0661ec; + } } @media screen and (max-width: 900px) { diff --git a/src/components/ProfilePopup/ProfilePopup.ts b/src/components/ProfilePopup/ProfilePopup.ts index 860c41a0..d6fd0126 100644 --- a/src/components/ProfilePopup/ProfilePopup.ts +++ b/src/components/ProfilePopup/ProfilePopup.ts @@ -31,10 +31,6 @@ class ProfilePopup { title: 'Профиль', href: '/profile', }, - donate: { - title: 'Донаты', - href: '/donate', - }, myAdvertisements: { title: 'Мои объявления', href: '/ads/?author=me', diff --git a/src/index.ts b/src/index.ts index 03acef4b..8d6c4d0a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,7 +45,7 @@ const renderFavoritesPage = () => {}; const renderNotificationsPage = () => {}; const renderAdvertPage = async (id: string) => { - const info = (await ApiClient.getAd(id))['place']; + const info = await ApiClient.getAd(id); const authorInfo = await ApiClient.getUser(info.authorUUID); const page = new AdPage(pageContainer, info, authorInfo); @@ -53,7 +53,7 @@ const renderAdvertPage = async (id: string) => { }; const renderEditAdvertPage = async (uuid: string) => { - const info = (await ApiClient.getAd(uuid))['place']; + const info = await ApiClient.getAd(uuid); const page = new EditAdvertPage('edit', info); pageContainer.appendChild(page.getElement()); diff --git a/src/modules/ApiClient.ts b/src/modules/ApiClient.ts index 87a33649..1d3b8f0d 100644 --- a/src/modules/ApiClient.ts +++ b/src/modules/ApiClient.ts @@ -72,7 +72,7 @@ class APIClient { async getAd(uuid: string) { const response = await Ajax.get(this.BASE_URL + `/housing/${uuid}`); const adInfo = await response.json(); - return adInfo; + return adInfo['place']; } async deleteAd(uuid: string) { diff --git a/src/modules/Types.ts b/src/modules/Types.ts index 951da672..35d155e3 100644 --- a/src/modules/Types.ts +++ b/src/modules/Types.ts @@ -25,7 +25,7 @@ export interface AdvertData { id: number; path: string; }[]; - city: string; + cityName: string; address: string; description: string; publicationDate: string; diff --git a/src/pages/AdListPage/AdListPage.hbs b/src/pages/AdListPage/AdListPage.hbs index 649b4db0..06fe7c8c 100644 --- a/src/pages/AdListPage/AdListPage.hbs +++ b/src/pages/AdListPage/AdListPage.hbs @@ -1,19 +1,39 @@
{{#if isHost}} -
-

Список объявлений

- -
-
- {{#if empty}} -

Здесь пока пусто... 🕳️

- {{/if}} + +
+
+
+

Список объявлений

+ +
+
+ {{#if empty}} +

Здесь пока + пусто... 🕳️

+ {{/if}} +
+
+ +
+ +
+

Подсказка

+

Кликните по объявлению, + чтобы отредактировать его.

+

Чтобы добавить новое + объявление, нажмите на кнопку "Добавить объявление".

+
+
+ {{else}} +

🚫Вы не являетесь хостом, поэтому не можете создавать объявления.

Если вы хотите стать хостом, пожалуйста, измените свой статус в настройках

+ {{/if}}
\ No newline at end of file diff --git a/src/pages/AdListPage/AdListPage.sass b/src/pages/AdListPage/AdListPage.sass deleted file mode 100644 index 4e9266c3..00000000 --- a/src/pages/AdListPage/AdListPage.sass +++ /dev/null @@ -1,129 +0,0 @@ -@use '../../styles/mixins' - -.ad-list-page - margin-top: 40px - width: 80% - margin: 0 auto - - &__title - font-weight: 500 - - &__upper-container - display: flex - justify-content: space-between - align-items: end - margin: 20px 0 - &__add-button - @include mixins.button - background-color: #FF5255 - - &__adverts-container - display: flex - flex-direction: column - gap: 10px - - &__no-adverts-text - margin-top: 50px - text-align: center - font-size: 26px - - &__not-host-message - margin-top: 90px - font-size: 40px - text-align: center - - -.horizontal-ad-card - border: 1px solid black - border-radius: 10px - display: flex - flex-direction: row - gap: 40px - padding: 15px - transition: 0.3s all - - &:hover - background-color: #cecece - border: 1px solid #4b4b4b - - &__img - width: 250px - border-radius: 10px - - &__info - display: flex - width: 100% - flex-direction: column - justify-content: space-between - position: relative - - &__notification-bell - position: absolute - width: 32px - top: 0px - right: 0px - cursor: pointer - - &__city - font-size: 32px - - &__address - font-size: 20px - - &__buttons-container - display: flex - gap: 30px - - &__open-btn - @include mixins.button - width: 200px - height: 38px - background-color: #5289FF - - &__edit-btn - @include mixins.button - height: 38px - - &__del-btn - @include mixins.button - background-color: #FF5900 - height: 38px - - -@media screen and (max-width: 900px) - $button-height: 20px - .ad-list-page - &__upper-container - display: flex - text-align: center - flex-direction: column - justify-content: center - align-items: center - - .horizontal-ad-card - border: 1px solid black - border-radius: 10px - width: 100% - display: flex - flex-direction: column - gap: 40px - padding: 10px - transition: 0.3s all - - &__buttons-container - flex-wrap: wrap - - &__open-btn - @include mixins.button - width: fit-content - height: $button-height - background-color: #5289FF - - &__edit-btn - @include mixins.button - height: $button-height - - &__del-btn - @include mixins.button - background-color: #FF5900 - height: $button-height \ No newline at end of file diff --git a/src/pages/AdListPage/AdListPage.scss b/src/pages/AdListPage/AdListPage.scss new file mode 100644 index 00000000..c370aa19 --- /dev/null +++ b/src/pages/AdListPage/AdListPage.scss @@ -0,0 +1,117 @@ +@use '../../styles/mixins'; + +.ad-list-page { + margin-top: 40px; + width: 90%; + margin: 0 auto; + + &__left-content { + min-width: 50%; + } + + &__content-container { + display: flex; + flex-direction: row; + gap: 40px; + } + + &__title { + font-weight: 500; + } + &__upper-container { + display: flex; + justify-content: space-between; + align-items: end; + margin: 20px 0; + } + &__add-button { + @include mixins.button; + background-color: #ff5255; + } + &__adverts-container { + display: flex; + flex-direction: column; + gap: 0; + min-width: 50%; + } + &__no-adverts-text { + margin-top: 50px; + text-align: center; + font-size: 26px; + } + &__not-host-message { + margin-top: 90px; + font-size: 40px; + text-align: center; + } + + &__right { + display: flex; + margin-top: 80px; + border: 2px solid #e4e4e4; + border-radius: 4px; + padding: 20px; + } + + &__hint { + display: flex; + flex-direction: column; + gap: 20px; + padding: 30px; + + &--hidden { + display: none; + } + + &__header { + font-size: 32px; + font-weight: 500; + } + + &__text { + font-size: 20px; + } + } +} + +@media screen and (max-width: 900px) { + $button-height: 20px; + .ad-list-page { + &__upper-container { + display: flex; + text-align: center; + flex-direction: column; + justify-content: center; + align-items: center; + } + } + .horizontal-ad-card { + border: 1px solid black; + border-radius: 10px; + width: 100%; + display: flex; + flex-direction: column; + gap: 40px; + padding: 10px; + transition: 0.3s all; + + &__buttons-container { + flex-wrap: wrap; + } + &__open-btn { + @include mixins.button; + width: fit-content; + height: $button-height; + background-color: #5289ff; + } + &__edit-btn { + @include mixins.button; + height: $button-height; + } + &__del-btn { + @include mixins.button; + background-color: #ff5900; + height: $button-height; + } + } +} diff --git a/src/pages/AdListPage/AdListPage.ts b/src/pages/AdListPage/AdListPage.ts index c2cc827a..6b6ab3bf 100644 --- a/src/pages/AdListPage/AdListPage.ts +++ b/src/pages/AdListPage/AdListPage.ts @@ -5,6 +5,7 @@ import router from '../../modules/Router'; import HorizontalAdCard from '../../components/HorizontalAdCard/HorizontalAdCard'; import { HorizontalAdCardData } from '../../components/HorizontalAdCard/HorizontalAdCard'; +import EditAdvertPage from '../EditAdvertPage/EditAdvertPage'; function AdListPage(data: HorizontalAdCardData[], isHost: boolean) { const pageContainer = document.createElement('div'); @@ -20,33 +21,67 @@ function AdListPage(data: HorizontalAdCardData[], isHost: boolean) { return pageContainer; } - const advertListElement = pageContainer.querySelector('.js-advert-list'); - const createAdvertElement = pageContainer.querySelector( - '.js-add-btn' - ) as HTMLButtonElement; - createAdvertElement.onclick = () => - router.navigateTo('/ads/?action=create'); - - for (const d of data) { - const card = HorizontalAdCard( - { - id: d.id, - cityName: d.cityName, - address: d.address, - image: d.image, - }, - { - onOpen: (uuid: string) => router.navigateTo(`/ads/?id=${uuid}`), - onEdit: (uuid: string) => - router.navigateTo(`/ads/?id=${uuid}&action=edit`), - onDel: async (uuid: string) => { - await ApiClient.deleteAd(uuid); - router.navigateTo(location.href); + requestAnimationFrame(() => { + const advertListElement = + pageContainer.querySelector('.js-advert-list'); + const createAdvertElement = pageContainer.querySelector( + '.js-add-btn' + ) as HTMLButtonElement; + + const root = document.getElementById( + 'js-ad-edit-container' + ) as HTMLDivElement; + const hint = root.querySelector('.ad-list-page__hint') as HTMLElement; + + const onCloseButtonClick = () => { + root.replaceChildren(hint); + hint.classList.remove('ad-list-page__hint--hidden'); + }; + + createAdvertElement.onclick = () => { + const page = new EditAdvertPage({ + action: 'create', + onCloseButtonClick: onCloseButtonClick, + }); + + hint.classList.add('ad-list-page__hint--hidden'); + + root.replaceChildren(hint, page.getElement()); + }; + + for (const d of data) { + const card = HorizontalAdCard( + { + id: d.id, + cityName: d.cityName, + address: d.address, + image: d.image, }, - } - ); - advertListElement?.appendChild(card); - } + { + onOpen: (uuid: string) => + router.navigateTo(`/ads/?id=${uuid}`), + onEdit: async (uuid: string) => { + const data = await ApiClient.getAd(uuid); + console.log(data); + const page = new EditAdvertPage({ + action: 'edit', + data, + onCloseButtonClick, + }); + const root = document.getElementById( + 'js-ad-edit-container' + ) as HTMLDivElement; + root.replaceChildren(page.getElement()); + }, + onDel: async (uuid: string) => { + await ApiClient.deleteAd(uuid); + router.navigateTo(location.href); + }, + } + ); + advertListElement?.appendChild(card); + } + }); return pageContainer; } diff --git a/src/pages/AdPage/AdPage.scss b/src/pages/AdPage/AdPage.scss index fdb35b62..67280d6d 100644 --- a/src/pages/AdPage/AdPage.scss +++ b/src/pages/AdPage/AdPage.scss @@ -60,7 +60,7 @@ $secondary-card-size: 64px; position: relative; overflow: hidden; width: 100%; - height: 500px; + height: 450px; border-radius: 5px; border: none; scroll-snap-align: start; diff --git a/src/pages/EditAdvertPage/EditAdvertPage.hbs b/src/pages/EditAdvertPage/EditAdvertPage.hbs index af839684..6ab3955b 100644 --- a/src/pages/EditAdvertPage/EditAdvertPage.hbs +++ b/src/pages/EditAdvertPage/EditAdvertPage.hbs @@ -1,84 +1,89 @@
-
-
+ {{else}} + }} + /> + {{/if}} + {{/each}} + +
; + #mainImg!: HTMLImageElement; + #carouselImages!: NodeListOf; #currentIndex: number; - #backgroundImg: HTMLImageElement; - #fullscreenImage: HTMLImageElement; - #overlay: HTMLDivElement; + #backgroundImg!: HTMLImageElement; + #fullscreenImage!: HTMLImageElement; + #overlay!: HTMLDivElement; #images: { id: number; path: string; @@ -60,7 +60,17 @@ export default class EditAdvertPage { #id: string | undefined; #secondaryImageTemplate: HandlebarsTemplateDelegate; - constructor(action: 'create' | 'edit', data?: AdvertData) { + private onCloseButtonClick; + + constructor({ + action, + data, + onCloseButtonClick, + }: { + action: 'create' | 'edit'; + data?: AdvertData; + onCloseButtonClick?: () => void; + }) { this.#action = action; this.#id = data?.id; this.#images = data?.images ? data.images : []; @@ -73,6 +83,7 @@ export default class EditAdvertPage { const template = Handlebars.templates['EditAdvertPage.hbs']; this.#templateContainer = document.createElement('div'); + this.onCloseButtonClick = onCloseButtonClick; ApiClient.getCities().then((cities: City[]) => { const selectOptions: SelectOption[] = []; @@ -81,7 +92,7 @@ export default class EditAdvertPage { selectOptions.push({ name: city.title, value: city.title, - selected: data?.city === city.title, + selected: data?.cityName === city.title, }); } @@ -92,7 +103,7 @@ export default class EditAdvertPage { type: 'text', isSelect: true, options: selectOptions, - value: data?.city, + value: data?.cityName, }, { label: 'Адрес', @@ -285,8 +296,16 @@ export default class EditAdvertPage { .querySelector('.js-form') ?.addEventListener('submit', this.#submitData); + if (this.onCloseButtonClick) { + ( + document.getElementById( + 'js-edit-ad-page-close-cross' + ) as HTMLImageElement + ).onclick = () => this.onCloseButtonClick!(); + } + for (const button of document.querySelectorAll('.js-del-img-button')) { - button.onclick = this.#onDeleteImage; + (button as HTMLButtonElement).onclick = this.#onDeleteImage; } } diff --git a/src/styles/mixins.scss b/src/styles/mixins.scss index 19f5bf9b..6aaaab86 100644 --- a/src/styles/mixins.scss +++ b/src/styles/mixins.scss @@ -26,6 +26,24 @@ } } +@mixin small-button { + @include button; + min-height: 0; + min-width: 0; + box-sizing: border-box; + width: min-content; + height: 24px; + padding: 3px 11px; + + &:hover { + box-shadow: none; + } + + &:active { + box-shadow: none; + } +} + @mixin prev-next-image-button-mixin { display: flex; justify-content: center; diff --git a/src/styles/styles.sass b/src/styles/styles.sass index 3c5f2d61..491c7686 100644 --- a/src/styles/styles.sass +++ b/src/styles/styles.sass @@ -14,6 +14,7 @@ @use "../src/components/PopupAlert/PopupAlert" @use "../src/components/ProfileData/NoReviews/NoReviews" @use "../src/components/Spinner/Spinner" +@use '../src/components/HorizontalAdCard/HorizontalAdCard' /* pages */ @use '../src/pages/MainPage/MainPage' From 3502b9dc9358f6899f0d39f6a7a5ec5aaf3a3322 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:38:16 +0300 Subject: [PATCH 15/18] feat: add edit button for ads created by user --- .../HorizontalAdCard/HorizontalAdCard.hbs | 2 +- src/index.ts | 15 +++++++++++++-- src/modules/GlobalStore.ts | 8 ++++++++ src/pages/AdPage/AdPage.hbs | 17 +++++++++++++---- src/pages/AdPage/AdPage.scss | 12 ++++++++++++ src/pages/AdPage/AdPage.ts | 11 +++++++++++ 6 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 src/modules/GlobalStore.ts diff --git a/src/components/HorizontalAdCard/HorizontalAdCard.hbs b/src/components/HorizontalAdCard/HorizontalAdCard.hbs index 6039323c..436dfecd 100644 --- a/src/components/HorizontalAdCard/HorizontalAdCard.hbs +++ b/src/components/HorizontalAdCard/HorizontalAdCard.hbs @@ -1,4 +1,4 @@ -
+
diff --git a/src/index.ts b/src/index.ts index 8d6c4d0a..9bd5c2ce 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,6 +24,7 @@ const pageContainer = document.createElement('div'); import router from './modules/Router'; import { HorizontalAdCardData } from './components/HorizontalAdCard/HorizontalAdCard'; import { getCookie } from './modules/Utils'; +import globalStore from './modules/GlobalStore'; const renderMainPage = async () => { const data = await ApiClient.getAds(); @@ -80,7 +81,7 @@ const renderProfilePage = async () => { await profilePage.render(pageContainer); }; -const renderAdListPage = async () => { +const renderAdListPage = async (action: 'edit' | undefined, adId: string) => { const sessionData = await APIService.getSessionData(); const userId = sessionData['id']; const isHost = (await ApiClient.getUser(userId))['isHost']; @@ -109,6 +110,12 @@ const renderAdListPage = async () => { } const page = AdListPage(horizontalAdCardData, isHost); pageContainer.appendChild(page); + + if (action === 'edit') { + requestAnimationFrame(() => { + document.getElementById(`housing-card-${adId}`)?.click(); + }); + } }; /** Объект с коллбеками для header`а */ @@ -132,6 +139,9 @@ const renderHeader = async () => { if (getCookie('session_id')) { try { sessionData = await APIService.getSessionData(); + + globalStore.auth.isAuthorized = true; + globalStore.auth.userId = sessionData.id; } catch { // } @@ -160,7 +170,8 @@ router.addRoute('/ads/', async (params: URLSearchParams) => { const author = params.get('author'); if (author === 'me') { - await renderAdListPage(); + const action = params.get('action'); + await renderAdListPage(action, adId); } else if (!action && adId) { await renderAdvertPage(adId); } else if (action === 'edit' && adId) { diff --git a/src/modules/GlobalStore.ts b/src/modules/GlobalStore.ts new file mode 100644 index 00000000..97d1e193 --- /dev/null +++ b/src/modules/GlobalStore.ts @@ -0,0 +1,8 @@ +const globalStore = { + auth: { + isAuthorized: false as boolean, + userId: null as string | null, + }, +}; + +export default globalStore; diff --git a/src/pages/AdPage/AdPage.hbs b/src/pages/AdPage/AdPage.hbs index 8a1b20e4..eaa5f499 100644 --- a/src/pages/AdPage/AdPage.hbs +++ b/src/pages/AdPage/AdPage.hbs @@ -157,10 +157,19 @@
- +
+ + {{#if isAuthor}} + + {{/if}} +
diff --git a/src/pages/AdPage/AdPage.scss b/src/pages/AdPage/AdPage.scss index 67280d6d..d0bba3ac 100644 --- a/src/pages/AdPage/AdPage.scss +++ b/src/pages/AdPage/AdPage.scss @@ -267,10 +267,22 @@ $secondary-card-size: 64px; } } + &__buttons { + display: flex; + flex-direction: column; + gap: 10px; + } + &__write-msg-button { @include mixins.button; width: 100%; } + + &__edit-button { + @include mixins.button; + width: 100%; + background-color: #0077cc; + } } } diff --git a/src/pages/AdPage/AdPage.ts b/src/pages/AdPage/AdPage.ts index 7fd9224a..483a43e0 100644 --- a/src/pages/AdPage/AdPage.ts +++ b/src/pages/AdPage/AdPage.ts @@ -3,6 +3,8 @@ import { AdvertData, ProfileInfo } from '../../modules/Types'; import { calculateAge } from '../../modules/Utils'; import ReactiveComponent from '../../components/ReactiveComponent/ReactiveComponent'; +import globalStore from '../../modules/GlobalStore'; +import router from '../../modules/Router'; const SECONDARY_IMG_SELECTOR = '.js-carousel-img'; const FULLSCREEN_OVERLAY_SELECTOR = '.js-fullscreen-overlay'; @@ -34,6 +36,7 @@ export default class AdPage extends ReactiveComponent { ...authorInfo, age: calculateAge(authorInfo.birthdate), sex: authorInfo.sex === 'M' ? 'Мужской' : 'Женский', + isAuthor: data.authorUUID === globalStore.auth.userId, }, }); } @@ -98,6 +101,14 @@ export default class AdPage extends ReactiveComponent { ); }; + document + .getElementById('edit-button') + ?.addEventListener('click', () => { + router.navigateTo( + `/ads/?author=me&action=edit&id=${this.templateData.id}` + ); + }); + carouselImages.forEach((el: HTMLImageElement, index) => { el.onclick = () => { this.showImage(carousel, carouselImages, index); From d21d7b974152700b74031e4db602f6e9ff2ad2ad Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:02:54 +0300 Subject: [PATCH 16/18] New ad card ui+ux (#36) * ui+ux: update card * styles: replace heart svg with cian's one * feat(adcard): add handsome kebab menu --- src/components/AdCard/AdCard.hbs | 130 +++++++++++---------- src/components/AdCard/AdCard.scss | 181 +++++++++++++++++++----------- src/components/AdCard/AdCard.ts | 21 +++- 3 files changed, 199 insertions(+), 133 deletions(-) diff --git a/src/components/AdCard/AdCard.hbs b/src/components/AdCard/AdCard.hbs index 750726a2..c80a9bff 100644 --- a/src/components/AdCard/AdCard.hbs +++ b/src/components/AdCard/AdCard.hbs @@ -20,88 +20,86 @@
- -
-
-

{{cityName}}

-

{{address}}

-
- - + + +
+ + +
+ +
+ +
+

1-комн. кв. · 43 м · 1/2 этаж

+

{{address}}, {{cityName}}

+
- User avatar

{{adAuthor.name}}

+
·
star {{adAuthor.rating}} diff --git a/src/components/AdCard/AdCard.scss b/src/components/AdCard/AdCard.scss index bcde45f9..0937dd7b 100644 --- a/src/components/AdCard/AdCard.scss +++ b/src/components/AdCard/AdCard.scss @@ -27,9 +27,8 @@ &__main-img-container { position: relative; width: 100%; - height: 290px; + height: 100%; min-height: 0; - max-height: 290px; } &__main-img { @@ -57,43 +56,18 @@ &__info { background-color: white; - min-height: 40px; - height: 110px; - display: flex; - justify-content: space-between; - padding: 0 13px; - } - - &__like-button { - cursor: pointer; - position: absolute; - top: 5px; - right: 5px; - border-radius: 50%; - background-color: unset; - border: none; - width: 60px; + min-height: 80px; height: 60px; - display: flex; - justify-content: center; - align-items: center; - } - - &__star { - max-width: 16px; - max-height: 16px; - } - - &__location { display: flex; flex-direction: column; - justify-content: center; - gap: 5px; + justify-content: space-between; + padding: 10px 13px; } - &__city { + &__apartment-info { + color: #152242; font-size: 20px; - margin: 0; + font-weight: 600; } &__address { @@ -107,50 +81,134 @@ line-clamp: 2; -webkit-box-orient: vertical; /* Указание направления текста */ overflow: hidden; /* Скрытие лишнего текста */ + + color: #152242; + font-size: 16px; + font-weight: 500; } &__author-info { display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - align-content: center; - text-align: center; + flex-direction: row; + gap: 5px; + color: #152242; + font-size: 15px; } - &__avatar { - width: 50px; - height: 50px; - border-radius: 50%; - object-fit: cover; + &__rating { + font-size: 14px; } - &__href { - color: #808080; - font-size: 14px; + &__kebab { + position: absolute; + top: 10px; + right: 10px; + width: 40px; + height: 40px; + + border-radius: 50%; + background-color: #00000079; + + display: flex; + justify-content: center; + align-items: center; + + &__icon { + position: absolute; + right: 50%; + transform: translateX(50%); + fill: #fff; + } + + &__actions { + display: flex; + overflow: hidden; + flex-direction: row; + justify-content: space-between; + + visibility: hidden; + width: 0; + height: 40px; + border-radius: 20px; + background: #a7a7a7; + position: absolute; + top: 0px; + right: 0px; + transition: all 0.4s; + } + + &:hover { + visibility: none; + + .housing-card__kebab__icon { + visibility: hidden; + } + + .housing-card__kebab__actions { + width: 90px; + visibility: visible; + } + } } - &__view-row { + &__like-button { + cursor: pointer; + border-radius: 50%; + background-color: #00000066; + color: #fff; + border: none; + width: 40px; + height: 40px; display: flex; - flex-direction: row; - justify-content: space-between; + justify-content: center; align-items: center; - position: relative; - bottom: -10px; - width: 170px; + + &__heart { + color: #fff; + transition: color 0.3s ease; + } + + &:hover { + .housing-card__like-button__heart { + color: #e43030; + } + } } - &__view { + &__show-on-map-button { + cursor: pointer; + border-radius: 50%; + background-color: #00000066; + color: #fff; + border: none; + width: 40px; + height: 40px; display: flex; - flex-direction: row; - justify-content: space-between; - width: 30px; + justify-content: center; + align-items: center; + + &__location-icon { + fill: #ffffff; + transition: fill 0.3s ease; + } - &__p { - color: #808080; + &:hover { + .housing-card__show-on-map-button__location-icon { + fill: #ffa552; + } } } + &__star { + max-width: 16px; + max-height: 16px; + } + + &__href { + color: #808080; + font-size: 14px; + } + &__circle { border-radius: 50%; width: 7px; @@ -173,13 +231,6 @@ font-size: 13px; } - &__location { - gap: 0; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } - &__href { display: none; } diff --git a/src/components/AdCard/AdCard.ts b/src/components/AdCard/AdCard.ts index cf064079..96f9ba0a 100644 --- a/src/components/AdCard/AdCard.ts +++ b/src/components/AdCard/AdCard.ts @@ -49,7 +49,13 @@ export default class AdCard extends ReactiveComponent { this.thisElement.querySelector( '.js-like-button' ) as HTMLButtonElement - ).onclick = this.addToFavorite; + ).onclick = (e) => this.addToFavorite(e); + + ( + this.thisElement.querySelector( + '.js-show-on-map-button' + ) as HTMLButtonElement + ).onclick = (e) => this.showOnMap(e); setTimeout(() => { this.addImageScrolling(); @@ -190,7 +196,18 @@ export default class AdCard extends ReactiveComponent { /** * @description Вызывается при нажатии на кнопку добавить в избранное */ - addToFavorite() { + addToFavorite(e: Event) { + e.stopPropagation(); + console.log('fav btn was clicked!'); } + + /** + * @description + */ + showOnMap(e: Event) { + e.stopPropagation(); + + console.log('show on map!'); + } } From 70d8e3ac66c28ae4a4697c97327a36ed48113611 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:49:26 +0300 Subject: [PATCH 17/18] refactor: remove logging --- src/components/AuthPopup/AuthPopup.ts | 1 - src/components/ProfileData/ProfileData.ts | 3 - .../ReviewsGraphic/ReviewsGraphic.ts | 55 +++++++++++-------- src/pages/AdListPage/AdListPage.ts | 1 - src/pages/CityPage/CityPage.ts | 2 - 5 files changed, 33 insertions(+), 29 deletions(-) diff --git a/src/components/AuthPopup/AuthPopup.ts b/src/components/AuthPopup/AuthPopup.ts index 9f5c4579..e8537163 100644 --- a/src/components/AuthPopup/AuthPopup.ts +++ b/src/components/AuthPopup/AuthPopup.ts @@ -213,7 +213,6 @@ class AuthPopup { } #setFailureMessage(message: string): void { - console.log('???'); const failureMessageElem = document.querySelector( '.auth-modal__failure-message' ); diff --git a/src/components/ProfileData/ProfileData.ts b/src/components/ProfileData/ProfileData.ts index 7206fa4d..dc255f4b 100644 --- a/src/components/ProfileData/ProfileData.ts +++ b/src/components/ProfileData/ProfileData.ts @@ -599,14 +599,12 @@ class ProfileData { ); reviews.forEach((reviewData) => { - console.log(reviewData); reviewData.createdAt = this.#dataToString(reviewData.createdAt); const review = new ReviewCard(reviewData); review.render(this.#content); }); } else { const noReviews = new NoReviews(this.#isMyProfile, () => { - console.log('there'); clearPage('form'); this.#content.replaceChildren(); this.#renderReviewForm(); @@ -639,7 +637,6 @@ class ProfileData { reviewsGraphic.render(this.#content); } else { const noReviews = new NoReviews(this.#isMyProfile, () => { - console.log('there'); clearPage('form'); this.#content.replaceChildren(); this.#renderReviewForm(); diff --git a/src/components/ReviewsGraphic/ReviewsGraphic.ts b/src/components/ReviewsGraphic/ReviewsGraphic.ts index ce2515e1..41934f0b 100644 --- a/src/components/ReviewsGraphic/ReviewsGraphic.ts +++ b/src/components/ReviewsGraphic/ReviewsGraphic.ts @@ -13,9 +13,8 @@ interface AdditionalInfo { class ReviewsGraphic { #data: Array; - constructor(data: Array){ + constructor(data: Array) { this.#data = data; - console.log(this.#data); this.#registerHelper(); } @@ -32,14 +31,22 @@ class ReviewsGraphic { } #getAdditionalInfo(): AdditionalInfo { - const sortedData = [...this.#data].sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()); + const sortedData = [...this.#data].sort( + (a, b) => new Date(a.date).getTime() - new Date(b.date).getTime() + ); const addInfo: AdditionalInfo = { totalRatings: this.#data.length, firstDate: sortedData[0]?.date || 'Нет данных', lastDate: sortedData[sortedData.length - 1]?.date || 'Нет данных', - highestRating: Math.max(...this.#data.map(point => point.rating), 0), - lowestRating: Math.min(...this.#data.map(point => point.rating), 5) + highestRating: Math.max( + ...this.#data.map((point) => point.rating), + 0 + ), + lowestRating: Math.min( + ...this.#data.map((point) => point.rating), + 5 + ), }; return addInfo; @@ -52,28 +59,29 @@ class ReviewsGraphic { console.error('Canvas context not available'); return; } - + // Размеры графика const padding = 50; // Отступы от краёв - const canvasWidth = canvas.width = 700; // Ширина холста - const canvasHeight = canvas.height = 400; // Высота холста - + const canvasWidth = (canvas.width = 700); // Ширина холста + const canvasHeight = (canvas.height = 400); // Высота холста + const graphWidth = canvasWidth - padding * 2; const graphHeight = canvasHeight - padding * 2; - + // Шаг по X зависит от общего количества точек const totalPoints = this.#data.length; const xStep = graphWidth / (totalPoints - 1); - + // Границы по Y const minRating = 1; const maxRating = 5; const yStep = graphHeight / (maxRating - minRating); - + // Функции для преобразования координат const toXCoord = (index: number) => padding + index * xStep; - const toYCoord = (rating: number) => canvasHeight - padding - (rating - minRating) * yStep; - + const toYCoord = (rating: number) => + canvasHeight - padding - (rating - minRating) * yStep; + // Сетка ctx.strokeStyle = '#e0e0e0'; ctx.lineWidth = 1; @@ -84,7 +92,7 @@ class ReviewsGraphic { ctx.lineTo(canvasWidth - padding, y); ctx.stroke(); } - + for (let i = 0; i < totalPoints; i++) { const x = toXCoord(i); ctx.beginPath(); @@ -92,7 +100,7 @@ class ReviewsGraphic { ctx.lineTo(x, canvasHeight - padding); ctx.stroke(); } - + // Оси ctx.strokeStyle = '#000'; ctx.lineWidth = 2; @@ -101,7 +109,7 @@ class ReviewsGraphic { ctx.lineTo(padding, canvasHeight - padding); // Ось Y ctx.lineTo(canvasWidth - padding, canvasHeight - padding); // Ось X ctx.stroke(); - + // Метки по оси Y ctx.fillStyle = '#000'; ctx.font = '12px Arial'; @@ -109,14 +117,18 @@ class ReviewsGraphic { const y = toYCoord(i + minRating); ctx.fillText((i + minRating).toString(), padding - 30, y + 5); } - + // Метки по оси X ctx.font = '10px Arial'; for (let i = 0; i < totalPoints; i++) { const x = toXCoord(i); - ctx.fillText(this.#data[i].date, x - 20, canvasHeight - padding + 20); + ctx.fillText( + this.#data[i].date, + x - 20, + canvasHeight - padding + 20 + ); } - + // Рисуем линии, соединяющие точки ctx.strokeStyle = '#ffa552'; ctx.lineWidth = 2; @@ -165,7 +177,6 @@ class ReviewsGraphic { } ctx.stroke(); // Рисуем соединяющую линию среднего значения } - async render(parent: HTMLDivElement) { const addInfo = this.#getAdditionalInfo(); @@ -175,4 +186,4 @@ class ReviewsGraphic { } } -export default ReviewsGraphic; \ No newline at end of file +export default ReviewsGraphic; diff --git a/src/pages/AdListPage/AdListPage.ts b/src/pages/AdListPage/AdListPage.ts index 6b6ab3bf..506960b0 100644 --- a/src/pages/AdListPage/AdListPage.ts +++ b/src/pages/AdListPage/AdListPage.ts @@ -62,7 +62,6 @@ function AdListPage(data: HorizontalAdCardData[], isHost: boolean) { router.navigateTo(`/ads/?id=${uuid}`), onEdit: async (uuid: string) => { const data = await ApiClient.getAd(uuid); - console.log(data); const page = new EditAdvertPage({ action: 'edit', data, diff --git a/src/pages/CityPage/CityPage.ts b/src/pages/CityPage/CityPage.ts index 12b5b8c3..286177aa 100644 --- a/src/pages/CityPage/CityPage.ts +++ b/src/pages/CityPage/CityPage.ts @@ -29,7 +29,6 @@ class CityPage { const infoResponse = await ApiClient.getCity(name); if (infoResponse.ok) { const data = await infoResponse.json(); - console.log(data); this.#name = data.city['title']; this.#description = data.city['description']; this.#photo = data.city['image']; @@ -69,7 +68,6 @@ class CityPage { #renderFilter(pageContent: HTMLDivElement): void { const filter = new Filter(async (filters) => { filters.location = this.#queryName; - console.log(filters); const data = await ApiClient.getAds(filters); this.#places = data; document.querySelector('.advert')!.remove(); From bd3d79405962c18212e8d32508ebdeff579b7b97 Mon Sep 17 00:00:00 2001 From: rasulov1337 <117843890+rasulov1337@users.noreply.github.com> Date: Fri, 6 Dec 2024 20:02:54 +0300 Subject: [PATCH 18/18] refactor(AuthPopup): update styles --- src/components/AuthPopup/AuthPopup.scss | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/components/AuthPopup/AuthPopup.scss b/src/components/AuthPopup/AuthPopup.scss index 692bbbd7..b5d5f272 100644 --- a/src/components/AuthPopup/AuthPopup.scss +++ b/src/components/AuthPopup/AuthPopup.scss @@ -1,22 +1,22 @@ .auth-modal { position: fixed; - width: 400px; + width: 380px; min-height: 520px; height: fit-content; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); background-color: #ffffff; - border-radius: 10px; + border-radius: 6px; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; - padding: 30px 10px 0; + box-sizing: border-box; + padding: 30px 50px 10px; &__field-container { - width: 80%; - margin: 0 auto; + width: 100%; } &__input { @@ -69,7 +69,6 @@ background-color: #ffa552; color: #ffffff; cursor: pointer; - margin: 0 20% 5%; border: none; border-radius: 10px; height: 40px; @@ -90,21 +89,16 @@ } .auth-message { - padding-top: 5px; - padding-bottom: 5px; font-size: 20px; font-weight: bold; text-align: center; } .have-account { - padding-bottom: 5%; display: flex; flex-direction: row; justify-content: space-between; - width: 55%; - margin-left: 20%; - margin-right: 20%; + width: 100%; } .have-account a { @@ -114,8 +108,8 @@ .close-cross { position: absolute; - top: 5%; - right: 5%; + top: 10px; + right: 10px; cursor: pointer; }