@ozdao/prometheus-framework 0.2.50 → 0.2.52

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. package/dist/main-482dc398.mjs +13626 -0
  2. package/dist/main-b2JI9sFg.js +91 -0
  3. package/dist/main-c56d4c09.js +91 -0
  4. package/dist/main-x-9D8zvb.mjs +13604 -0
  5. package/dist/main.css +1 -1
  6. package/dist/organizations.server.js +22 -16
  7. package/dist/organizations.server.mjs +22 -16
  8. package/dist/products.server.js +32 -16
  9. package/dist/products.server.mjs +32 -16
  10. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Button/Button.vue.js +223 -2
  12. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
  14. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +19 -19
  16. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
  20. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  22. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +2 -2
  24. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Map/Map.vue.js +35 -2
  26. package/dist/prometheus-framework/src/components/Map/Map.vue2.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Map/Map.vue2.js +2 -35
  28. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
  30. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
  32. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  44. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  46. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  56. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  60. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  62. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -0
  63. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +37 -0
  64. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -14
  68. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.cjs +1 -0
  69. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.js +24 -0
  70. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  72. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  74. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +49 -101
  84. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +25 -25
  85. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +68 -39
  87. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +38 -47
  89. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +69 -62
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +134 -129
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +128 -158
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +13 -13
  107. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +44 -44
  119. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  123. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +64 -51
  125. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +22 -23
  133. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/store/products.js +23 -23
  137. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  139. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  143. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  147. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +1 -1
  151. package/dist/prometheus-framework.cjs.js +1 -1
  152. package/dist/prometheus-framework.es.js +1 -1
  153. package/dist/style.css +1 -1
  154. package/dist/web-6dcbb74b.mjs +55 -0
  155. package/dist/web-caJAdsxy.js +1 -0
  156. package/dist/web-ee302c1d.js +1 -0
  157. package/dist/web-i08OVMw9.mjs +55 -0
  158. package/package.json +1 -1
  159. package/src/components/Button/Button.vue +3 -3
  160. package/src/components/Feed/Feed.vue +2 -1
  161. package/src/components/LocationMarker/LocationMarker.vue +1 -0
  162. package/src/modules/applications/applications.client.js +0 -1
  163. package/src/modules/globals/components/blocks/BlockSearch.vue +42 -0
  164. package/src/modules/icons/entities/IconProfile.vue +10 -1
  165. package/src/modules/icons/entities/IconShopcart.vue +12 -2
  166. package/src/modules/marketplace/components/layouts/Marketplace.vue +7 -14
  167. package/src/modules/mobile/components/BottomNavigation/BottomNavigation.vue +86 -0
  168. package/src/modules/mobile/components/BottomSheet/BottomSheet.vue +86 -0
  169. package/src/modules/mobile/components/NavigationBar/NavigationBar.vue +152 -0
  170. package/src/modules/mobile/components/Walkthrough/Walkthrough.vue +195 -0
  171. package/src/modules/orders/components/partials/ShopCart.vue +4 -1
  172. package/src/modules/organizations/components/blocks/CardDepartment.vue +34 -66
  173. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +50 -13
  174. package/src/modules/organizations/components/blocks/User.vue +19 -10
  175. package/src/modules/organizations/components/pages/Department.vue +19 -3
  176. package/src/modules/organizations/components/pages/DepartmentEdit.vue +14 -10
  177. package/src/modules/organizations/components/pages/Organization.vue +38 -72
  178. package/src/modules/organizations/components/sections/Feed.vue +1 -1
  179. package/src/modules/organizations/controllers/memberships.controller.js +27 -24
  180. package/src/modules/organizations/controllers/organizations.controller.js +0 -1
  181. package/src/modules/products/components/pages/EditLeftover.vue +6 -4
  182. package/src/modules/products/components/pages/Products.vue +58 -38
  183. package/src/modules/products/components/sections/FilterProducts.vue +5 -5
  184. package/src/modules/products/controllers/leftovers.controller.js +12 -5
  185. package/src/modules/products/controllers/products.controller.js +30 -9
  186. package/src/modules/products/store/products.js +4 -0
  187. package/src/styles/layout.scss +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),f=require("../../../../components/Checkbox/Checkbox.vue.cjs"),x=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const w={class:"pd-medium bg-grey radius-big"},q={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),F={class:"cursor-pointer mn-r-auto t-medium p-big"},B=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),C={__name:"FilterProducts",props:{selectedFilters:Object,prices:{type:Array,default:()=>[{label:"Under 300฿",value:"<300"},{label:"300฿ to 600฿",value:"300-600"},{label:"600฿ to 1200฿",value:"600-1200"},{label:"$1200 and above",value:">1200"}]},deliveryOptions:{type:Array,default:()=>[{label:"Pickup",value:{min:0,max:25}},{label:"Courier",value:{min:25,max:50}},{label:"Post",value:{min:50,max:100}}]}},emits:["updateFilters","resetFilters"],async setup(y,{emit:h}){let d,m;const n=g.useRoute(),v=g.useRouter();[d,m]=e.withAsyncContext(()=>u.actions.fetchCategories()),await d,m(),e.ref({categories:[],prices:[],delivery:[],extra:[]}),e.watch(()=>a.state.filter,(t,r)=>{const l={...n.query};Object.keys(r).forEach(s=>{l[s]&&delete l[s]});const i=Object.fromEntries(Object.entries(t).filter(([s,o])=>Array.isArray(o)&&o.length>0).map(([s,o])=>[s,o.join(",")]));Object.assign(l,i),v.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(n.query){const t=n.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};a.state.filter=r}});const _=h,k=()=>{_("resetFilters")},p={locale:"en",messages:{en:{categoriesTitle:"Category",categories:[],filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{categoriesTitle:"Категория",categories:[],filters:{title:"Фильтры",price:{title:"Цена",from:"От",to:"До"},filters:[],reset:"Сбросить фильтры"}}}};u.state.all.forEach(t=>{t.localization.forEach(r=>{p.messages[r.locale].categories.push(r.text)})});const{t:c}=x.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",q,e.toDisplayString(e.unref(c)("categoriesTitle")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.state.all,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.name,value:l.url,class:"w-100 mn-t-small mn-b-small bg-white radius-small pd-small",radio:a.state.filter.categories,"onUpdate:radio":r[0]||(r[0]=s=>a.state.filter.categories=s)},null,8,["label","value","radio"]))),128))]),_:1}),E,e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",F,e.toDisplayString(e.unref(c)("filters.price.title")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.prices,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.prices,"onUpdate:radio":r[1]||(r[1]=s=>a.state.filter.prices=s)},null,8,["label","value","radio"]))),128))]),_:1}),B,e.createElementVNode("button",{onClick:k,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),b=require("../../../../components/Checkbox/Checkbox.vue.cjs"),w=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const q={class:"pd-medium bg-white-transp-50 radius-big"},x={class:"cursor-pointer mn-r-auto t-medium p-big"},F=e.createElementVNode("hr",{class:"mn-b-small t-transp"},null,-1),E={class:"cursor-pointer mn-r-auto t-medium p-big"},B={__name:"FilterProducts",props:{selectedFilters:Object,prices:{type:Array,default:()=>[{label:"Under 300฿",value:"<300"},{label:"300฿ to 600฿",value:"300-600"},{label:"600฿ to 1200฿",value:"600-1200"},{label:"$1200 and above",value:">1200"}]},deliveryOptions:{type:Array,default:()=>[{label:"Pickup",value:{min:0,max:25}},{label:"Courier",value:{min:25,max:50}},{label:"Post",value:{min:50,max:100}}]}},emits:["updateFilters","resetFilters"],async setup(y,{emit:h}){let d,m;const n=g.useRoute(),v=g.useRouter();[d,m]=e.withAsyncContext(()=>u.actions.fetchCategories()),await d,m(),e.ref({categories:[],prices:[],delivery:[],extra:[]}),e.watch(()=>a.state.filter,(t,r)=>{const l={...n.query};Object.keys(r).forEach(s=>{l[s]&&delete l[s]});const i=Object.fromEntries(Object.entries(t).filter(([s,o])=>Array.isArray(o)&&o.length>0).map(([s,o])=>[s,o.join(",")]));Object.assign(l,i),v.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(n.query){const t=n.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};a.state.filter=r}});const _=h,k=()=>{_("resetFilters")},p={locale:"en",messages:{en:{categoriesTitle:"Category",categories:[],filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{categoriesTitle:"Категория",categories:[],filters:{title:"Фильтры",price:{title:"Цена",from:"От",to:"До"},filters:[],reset:"Сбросить фильтры"}}}};u.state.all.forEach(t=>{t.localization.forEach(r=>{p.messages[r.locale].categories.push(r.text)})});const{t:c}=w.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",x,e.toDisplayString(e.unref(c)("categoriesTitle")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.state.all,(l,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,label:l.name,value:l.url,class:"w-100 mn-t-small mn-b-small bg-white radius-small pd-small",radio:a.state.filter.categories,"onUpdate:radio":r[0]||(r[0]=s=>a.state.filter.categories=s)},null,8,["label","value","radio"]))),128))]),_:1}),F,e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",E,e.toDisplayString(e.unref(c)("filters.price.title")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.prices,(l,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.prices,"onUpdate:radio":r[1]||(r[1]=s=>a.state.filter.prices=s)},null,8,["label","value","radio"]))),128))]),_:1}),e.createElementVNode("button",{onClick:k,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=B;
@@ -1,12 +1,12 @@
1
- import { withAsyncContext as A, ref as P, watch as T, onMounted as V, openBlock as a, createElementBlock as d, createVNode as h, withCtx as c, createElementVNode as o, toDisplayString as p, unref as b, Fragment as _, renderList as v, createBlock as x } from "vue";
2
- import w from "../../../../components/Spoiler/Spoiler.vue2.js";
1
+ import { withAsyncContext as A, ref as P, watch as T, onMounted as V, openBlock as a, createElementBlock as p, createVNode as h, withCtx as n, createElementVNode as c, toDisplayString as d, unref as f, Fragment as v, renderList as _, createBlock as w } from "vue";
2
+ import x from "../../../../components/Spoiler/Spoiler.vue2.js";
3
3
  import F from "../../../../components/Checkbox/Checkbox.vue.js";
4
4
  import { useI18n as B } from "vue-i18n";
5
5
  import { useRoute as R, useRouter as U } from "vue-router";
6
6
  import { actions as $, state as k } from "../../store/categories.js";
7
7
  import { state as l } from "../../../marketplace/store/marketplace.js";
8
8
  import "./FilterProducts.vue2.js";
9
- const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointer mn-r-auto t-medium p-big" }, I = /* @__PURE__ */ o("hr", { class: "mn-b-small" }, null, -1), L = { class: "cursor-pointer mn-r-auto t-medium p-big" }, M = /* @__PURE__ */ o("hr", { class: "mn-b-small" }, null, -1), X = {
9
+ const N = { class: "pd-medium bg-white-transp-50 radius-big" }, D = { class: "cursor-pointer mn-r-auto t-medium p-big" }, I = /* @__PURE__ */ c("hr", { class: "mn-b-small t-transp" }, null, -1), L = { class: "cursor-pointer mn-r-auto t-medium p-big" }, W = {
10
10
  __name: "FilterProducts",
11
11
  props: {
12
12
  selectedFilters: Object,
@@ -30,9 +30,9 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
30
30
  },
31
31
  emits: ["updateFilters", "resetFilters"],
32
32
  async setup(C, { emit: j }) {
33
- let f, g;
33
+ let b, g;
34
34
  const u = R(), E = U();
35
- [f, g] = A(() => $.fetchCategories()), await f, g(), P({
35
+ [b, g] = A(() => $.fetchCategories()), await b, g(), P({
36
36
  categories: [],
37
37
  prices: [],
38
38
  delivery: [],
@@ -43,7 +43,7 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
43
43
  r[s] && delete r[s];
44
44
  });
45
45
  const i = Object.fromEntries(
46
- Object.entries(e).filter(([s, n]) => Array.isArray(n) && n.length > 0).map(([s, n]) => [s, n.join(",")])
46
+ Object.entries(e).filter(([s, o]) => Array.isArray(o) && o.length > 0).map(([s, o]) => [s, o.join(",")])
47
47
  );
48
48
  Object.assign(r, i), E.push({ query: r });
49
49
  }, { deep: !0 }), V(async () => {
@@ -98,16 +98,16 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
98
98
  });
99
99
  });
100
100
  const { t: m } = B(y);
101
- return (e, t) => (a(), d("div", N, [
102
- h(w, {
103
- class: "radius-small o-hidden br-1px br-solid br-grey mn-b-small",
101
+ return (e, t) => (a(), p("div", N, [
102
+ h(x, {
103
+ class: "radius-small o-hidden mn-b-small",
104
104
  status: !0
105
105
  }, {
106
- header: c(() => [
107
- o("p", D, p(b(m)("categoriesTitle")), 1)
106
+ header: n(() => [
107
+ c("p", D, d(f(m)("categoriesTitle")), 1)
108
108
  ]),
109
- content: c(() => [
110
- (a(!0), d(_, null, v(k.all, (r, i) => (a(), x(F, {
109
+ content: n(() => [
110
+ (a(!0), p(v, null, _(k.all, (r, i) => (a(), w(F, {
111
111
  key: i,
112
112
  label: r.name,
113
113
  value: r.url,
@@ -119,15 +119,15 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
119
119
  _: 1
120
120
  }),
121
121
  I,
122
- h(w, {
123
- class: "radius-small o-hidden br-1px br-solid br-grey mn-b-small",
122
+ h(x, {
123
+ class: "radius-small o-hidden mn-b-small",
124
124
  status: !1
125
125
  }, {
126
- header: c(() => [
127
- o("p", L, p(b(m)("filters.price.title")), 1)
126
+ header: n(() => [
127
+ c("p", L, d(f(m)("filters.price.title")), 1)
128
128
  ]),
129
- content: c(() => [
130
- (a(!0), d(_, null, v(C.prices, (r, i) => (a(), x(F, {
129
+ content: n(() => [
130
+ (a(!0), p(v, null, _(C.prices, (r, i) => (a(), w(F, {
131
131
  key: i,
132
132
  label: r.label,
133
133
  value: r.value,
@@ -138,14 +138,13 @@ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointe
138
138
  ]),
139
139
  _: 1
140
140
  }),
141
- M,
142
- o("button", {
141
+ c("button", {
143
142
  onClick: q,
144
143
  class: "bg-main w-100 button"
145
- }, p(b(m)("filters.reset")), 1)
144
+ }, d(f(m)("filters.reset")), 1)
146
145
  ]));
147
146
  }
148
147
  };
149
148
  export {
150
- X as default
149
+ W as default
151
150
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs"),u=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),g=require("../blocks/Images360.vue.cjs"),h=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const k=require("../elements/Price.vue.cjs"),f=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),p={class:"cols-2-1_2 w-100 gap-big"},y={class:"flex-nowrap flex-column flex pos-relative"},b={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},B=["src"],v={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},V={key:0,class:"t-main t-semi p-big"},N={class:"w-100 h1-product mn-b-thin"},E={key:1,class:"mn-b-semi"},w={key:2,class:"w-100 mn-b-medium t-transp"},C={key:3,class:"w-100 mn-b-medium t-transp"},S={class:"cols-2 w-100 gap-small mn-b-semi"},x={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},q={class:"t-demi"},z={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},D={__name:"SectionProduct",props:{product:{type:Object,required:!0},user:{type:String},recommendation:{type:String}},setup(t){const i=t,a=e.computed(()=>i.product.images),s={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI Рекомендует вам",description:"",addtoorder:"Добавить в корзину",fastorder:"Быстрый заказ"}}},{t:c}=f.useI18n(s);function l(o){return!(o.quantity>0)}function d(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,I)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",y,[e.createElementVNode("div",b,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(g.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,B)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(u.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(h.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v,[t.recommendation?(e.openBlock(),e.createElementBlock("h2",V,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",N,e.toDisplayString(t.product.name),1),e.createVNode(k.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",E,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",w,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",S,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("p",q,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",z,[e.createVNode(m.default,{submit:r=>d(t.product),disabled:l(t.product),text:{success:" ✔ Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=D;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../../../../components/Button/Button.vue.cjs"),u=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),g=require("../blocks/Images360.vue.cjs"),h=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const k=require("../elements/Price.vue.cjs"),f=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),p={class:"cols-2-1_2 w-100 gap-big"},y={class:"flex-nowrap flex-column flex pos-relative"},b={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},B=["src"],v={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},V={key:0,class:"t-main t-semi p-big"},N={class:"w-100 h1-product mn-b-thin"},E={key:1,class:"mn-b-semi"},w={key:2,class:"w-100 mn-b-medium t-transp"},C={key:3,class:"w-100 mn-b-medium t-transp"},S={class:"cols-2 w-100 gap-small mn-b-semi"},x={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},q={class:"t-demi"},z={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},D={__name:"SectionProduct",props:{product:{type:Object,required:!0},user:{type:String},recommendation:{type:String}},setup(t){const i=t,a=e.computed(()=>i.product.images),s={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI Рекомендует вам",description:"",addtoorder:"Добавить в корзину",fastorder:"Быстрый заказ"}}},{t:c}=f.useI18n(s);function l(o){return!(o.quantity>0)}function d(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,I)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",y,[e.createElementVNode("div",b,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(g.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,B)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(u.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(h.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v,[t.recommendation?(e.openBlock(),e.createElementBlock("h2",V,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",N,e.toDisplayString(t.product.name),1),e.createVNode(k.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",E,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",w,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",S,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("p",q,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",z,[e.createVNode(m.default,{submit:r=>d(t.product),disabled:l(t.product),text:{success:" ✔ Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=D;
@@ -1,5 +1,5 @@
1
1
  import { computed as y, openBlock as t, createElementBlock as a, createElementVNode as r, createBlock as m, createCommentVNode as o, toDisplayString as s, unref as l, createVNode as g, Fragment as v, renderList as w, withCtx as x, createTextVNode as k } from "vue";
2
- import z from "../../../../components/Button/Button.vue2.js";
2
+ import z from "../../../../components/Button/Button.vue.js";
3
3
  import I from "../../../icons/placeholders/PlaceholderImage.vue.js";
4
4
  import C from "../blocks/Images360.vue.js";
5
5
  import E from "../blocks/ImagesThumbnails.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),i=o.default.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await i.post("/api/products/create",a).then(c=>(d(c.data,"current"),Promise.resolve(c.data)),c=>(s.setError(c),Promise.reject(c)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),r.sort="createdAt",r.skip=e.skip||0,r.limit=e.limit||10,console.log(r);try{const a=await i.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await i.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await i.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return console.log(e),i.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(console.log(r),s.setError(r),Promise.reject(r)))},async fetchProducts(){return await i.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await i.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await i.get("/api/products").then(e=>{let r=e.data.filter(function(a,c){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,c){return a[t.sort.current]>c[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<c[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await i.get("/api/products/"+e);return console.log(r),t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await i.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}};function d(e,r){t[r]=e}const l={};n.watch(t,(e,r)=>{});exports.actions=u;exports.getters=l;exports.state=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),c=o.default.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await c.post("/api/products/create",a).then(i=>(d(i.data,"current"),Promise.resolve(i.data)),i=>(s.setError(i),Promise.reject(i)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),e.search&&(r.search=e.search),r.sort="createdAt",r.skip=e.skip||0,r.limit=e.limit||10,console.log(r);try{const a=await c.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await c.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await c.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return console.log(e),c.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(console.log(r),s.setError(r),Promise.reject(r)))},async fetchProducts(){return await c.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await c.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await c.get("/api/products").then(e=>{let r=e.data.filter(function(a,i){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,i){return a[t.sort.current]>i[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<i[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await c.get("/api/products/"+e);return console.log(r),t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await c.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}};function d(e,r){t[r]=e}const l={};n.watch(t,(e,r)=>{});exports.actions=u;exports.getters=l;exports.state=t;
@@ -1,7 +1,7 @@
1
1
  import { reactive as n, watch as o } from "vue";
2
2
  import u from "../../../../node_modules/axios/lib/axios.js";
3
- import { setError as i } from "../../globals/store/globals.js";
4
- const c = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n({
3
+ import { setError as c } from "../../globals/store/globals.js";
4
+ const i = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n({
5
5
  all: [],
6
6
  current: {
7
7
  recommendation: !1,
@@ -26,53 +26,53 @@ const c = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n
26
26
  ...t,
27
27
  organization: e
28
28
  };
29
- return await c.post("/api/products/create", a).then(
29
+ return await i.post("/api/products/create", a).then(
30
30
  (s) => (d(s.data, "current"), Promise.resolve(s.data)),
31
- (s) => (i(s), Promise.reject(s))
31
+ (s) => (c(s), Promise.reject(s))
32
32
  );
33
33
  },
34
34
  async read(e = {}) {
35
35
  let t = {};
36
- e._id && (t._id = e._id), e.category && (t.category = e.category), e.organization && (t.organization = e.organization), e.count && (t.count = e.count), e.categories && (t.categories = e.categories), e.prices && (t.prices = e.prices), e.delivery && (t.delivery = e.delivery), e.status && (t.status = e.status), t.sort = "createdAt", t.skip = e.skip || 0, t.limit = e.limit || 10, console.log(t);
36
+ e._id && (t._id = e._id), e.category && (t.category = e.category), e.organization && (t.organization = e.organization), e.count && (t.count = e.count), e.categories && (t.categories = e.categories), e.prices && (t.prices = e.prices), e.delivery && (t.delivery = e.delivery), e.status && (t.status = e.status), e.search && (t.search = e.search), t.sort = "createdAt", t.skip = e.skip || 0, t.limit = e.limit || 10, console.log(t);
37
37
  try {
38
- const a = await c.get("/api/products/read", { params: t });
38
+ const a = await i.get("/api/products/read", { params: t });
39
39
  return e._id ? (r.current = { ...a.data[0] }, Promise.resolve(a.data[0])) : Promise.resolve(a.data);
40
40
  } catch (a) {
41
- return i(a), Promise.reject(a);
41
+ return c(a), Promise.reject(a);
42
42
  }
43
43
  },
44
44
  async update(e, t) {
45
- return await c.post("/api/products/" + e, t).then(
45
+ return await i.post("/api/products/" + e, t).then(
46
46
  (a) => Promise.resolve(a.data),
47
- (a) => (i(a), Promise.reject(a))
47
+ (a) => (c(a), Promise.reject(a))
48
48
  );
49
49
  },
50
50
  async deleteProduct(e) {
51
- return await c.delete("/api/products/" + e).then(
51
+ return await i.delete("/api/products/" + e).then(
52
52
  (t) => Promise.resolve(t.data),
53
- (t) => (i(t), Promise.reject(t))
53
+ (t) => (c(t), Promise.reject(t))
54
54
  );
55
55
  },
56
56
  async submitMood(e = null) {
57
- return console.log(e), c.post("/api/product/recommended", { mood: e }).then(
57
+ return console.log(e), i.post("/api/product/recommended", { mood: e }).then(
58
58
  (t) => (r.current = t.data.product, r.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
59
- (t) => (console.log(t), i(t), Promise.reject(t))
59
+ (t) => (console.log(t), c(t), Promise.reject(t))
60
60
  );
61
61
  },
62
62
  async fetchProducts() {
63
- return await c.get("/api/products/read").then(
63
+ return await i.get("/api/products/read").then(
64
64
  (e) => (r.all = e.data, Promise.resolve(e.data)),
65
- (e) => (i(e), Promise.reject(e))
65
+ (e) => (c(e), Promise.reject(e))
66
66
  );
67
67
  },
68
68
  async fetchProductsPopular() {
69
- return await c.get("/api/products/popular").then(
69
+ return await i.get("/api/products/popular").then(
70
70
  (e) => (r.popular = e.data, Promise.resolve(e.data)),
71
- (e) => (i(e), Promise.reject(e))
71
+ (e) => (c(e), Promise.reject(e))
72
72
  );
73
73
  },
74
74
  async fetchProductsPublished() {
75
- return await c.get("/api/products").then(
75
+ return await i.get("/api/products").then(
76
76
  (e) => {
77
77
  let t = e.data.filter(function(a, s) {
78
78
  return a.status !== "unpublished";
@@ -81,21 +81,21 @@ const c = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n
81
81
  return a[r.sort.current] > s[r.sort.current] ? r.sort.ascending ? 1 : -1 : a[r.sort.current] < s[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
82
82
  }), Promise.resolve(e.data);
83
83
  },
84
- (e) => (i(e), Promise.reject(e))
84
+ (e) => (c(e), Promise.reject(e))
85
85
  );
86
86
  },
87
87
  async fetchProduct(e) {
88
88
  try {
89
- const t = await c.get("/api/products/" + e);
89
+ const t = await i.get("/api/products/" + e);
90
90
  return console.log(t), r.current = t.data[0], Promise.resolve(t.data[0]);
91
91
  } catch (t) {
92
- return i(t), Promise.reject(t);
92
+ return c(t), Promise.reject(t);
93
93
  }
94
94
  },
95
95
  async fetchProductPopular() {
96
- return await c.get("/api/products").then(
96
+ return await i.get("/api/products").then(
97
97
  (e) => (r.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
98
- (e) => (i(e), Promise.reject(e))
98
+ (e) => (c(e), Promise.reject(e))
99
99
  );
100
100
  }
101
101
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),m=require("../../../../components/Select/Select.vue2.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(l){const t=l,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function i(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:o[0]||(o[0]=n=>u())},[e.renderSlot(p.$slots,"default")]),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[1]||(o[1]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:i,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])],64))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue2.cjs"),d=require("../../../../components/Button/Button.vue.cjs"),m=require("../../../../components/Select/Select.vue2.cjs"),f=require("../../store/reports.cjs"),b=e.createElementVNode("h3",{class:"mn-b-small"}," Report Content ",-1),g=e.createElementVNode("p",{class:"p-medium mn-b-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),v=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(l){const t=l,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function i(){r.user===null&&delete r.user,f.actions.create(r)}const s=e.ref(!1);function u(){s.value=!0}function a(){s.value=!1}return(p,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:o[0]||(o[0]=n=>u())},[e.renderSlot(p.$slots,"default")]),e.createVNode(c.default,{onClosePopup:a,isPopupOpen:s.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[b,g,e.createVNode(m.default,{select:r.reason,"onUpdate:select":o[1]||(o[1]=n=>r.reason=n),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-b-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),v,e.createVNode(d.default,{submit:i,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])],64))}};exports.default=h;
@@ -1,6 +1,6 @@
1
1
  import { reactive as d, ref as f, openBlock as b, createElementBlock as g, Fragment as h, createElementVNode as o, renderSlot as y, createVNode as a, withCtx as l, createTextVNode as _ } from "vue";
2
2
  import v from "../../../../components/Popup/Popup.vue2.js";
3
- import w from "../../../../components/Button/Button.vue2.js";
3
+ import w from "../../../../components/Button/Button.vue.js";
4
4
  import S from "../../../../components/Select/Select.vue2.js";
5
5
  import { actions as k } from "../../store/reports.js";
6
6
  const P = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, " Report Content ", -1), R = /* @__PURE__ */ o("p", { class: "p-medium mn-b-small" }, " We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ", -1), x = /* @__PURE__ */ o("p", { class: "p-medium mn-b-small" }, "Our moderators will review your report within 24 hours and take action if it violates our policies.", -1), V = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../icons/navigation/IconEdit.vue.cjs"),a=require("../../../../components/Chips/Chips.vue.cjs"),d=require("../../../../components/Map/Map.vue2.cjs");require("./CardSpot.vue2.cjs");const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=t=>(e.pushScopeId("data-v-5d50688e"),t=t(),e.popScopeId(),t),p={class:"radius-big o-hidden cols-2-1_3"},u={class:"pd-medium w-100"},m=["innerHTML"],h={class:"d-block p-big mn-b-semi"},g=l(()=>e.createElementVNode("h4",null,"Delivery:",-1)),v=l(()=>e.createElementVNode("h4",null,"Accepted Payment:",-1)),y={__name:"CardSpot",props:{spot:Object,organization:Object},setup(t){const i=t;return(n,o)=>(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(d.default,{location:{lat:t.spot.location.coordinates[1],lng:t.spot.location.coordinates[0]},class:""},null,8,["location"]),e.createElementVNode("div",u,[e.createVNode(r.default,{onClick:o[0]||(o[0]=s=>n.$router.push({name:"Spot Edit",params:{_id:i.organization._id,spot:t.spot._id}})),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),e.createElementVNode("p",{onClick:o[1]||(o[1]=s=>n.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"pd-thin bg-white radius-small mn-b-thin p-small w-max"},e.toDisplayString(t.spot.address),1),e.createElementVNode("h3",{onClick:o[2]||(o[2]=s=>n.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"mn-b-thin w-100",innerHTML:t.spot.profile.name},null,8,m),e.createElementVNode("p",h,e.toDisplayString(t.spot.profile.description),1),g,n.type!=="short"&&t.spot.delivery.length>0?(e.openBlock(),e.createBlock(a.default,{key:0,chips:t.spot.delivery},null,8,["chips"])):e.createCommentVNode("",!0),v,n.type!=="short"&&t.spot.payment.length>0?(e.openBlock(),e.createBlock(a.default,{key:1,chips:t.spot.payment},null,8,["chips"])):e.createCommentVNode("",!0)])]))}},b=c.default(y,[["__scopeId","data-v-5d50688e"]]);exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../icons/navigation/IconEdit.vue.cjs"),a=require("../../../../components/Chips/Chips.vue.cjs"),d=require("../../../../components/Map/Map.vue.cjs");require("./CardSpot.vue2.cjs");const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),l=t=>(e.pushScopeId("data-v-5d50688e"),t=t(),e.popScopeId(),t),p={class:"radius-big o-hidden cols-2-1_3"},u={class:"pd-medium w-100"},m=["innerHTML"],h={class:"d-block p-big mn-b-semi"},g=l(()=>e.createElementVNode("h4",null,"Delivery:",-1)),v=l(()=>e.createElementVNode("h4",null,"Accepted Payment:",-1)),y={__name:"CardSpot",props:{spot:Object,organization:Object},setup(t){const i=t;return(n,o)=>(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(d.default,{location:{lat:t.spot.location.coordinates[1],lng:t.spot.location.coordinates[0]},class:""},null,8,["location"]),e.createElementVNode("div",u,[e.createVNode(r.default,{onClick:o[0]||(o[0]=s=>n.$router.push({name:"Spot Edit",params:{_id:i.organization._id,spot:t.spot._id}})),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),e.createElementVNode("p",{onClick:o[1]||(o[1]=s=>n.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"pd-thin bg-white radius-small mn-b-thin p-small w-max"},e.toDisplayString(t.spot.address),1),e.createElementVNode("h3",{onClick:o[2]||(o[2]=s=>n.$router.push(`/app/organization/${i.organization._id}/spots/${t.spot._id}`)),class:"mn-b-thin w-100",innerHTML:t.spot.profile.name},null,8,m),e.createElementVNode("p",h,e.toDisplayString(t.spot.profile.description),1),g,n.type!=="short"&&t.spot.delivery.length>0?(e.openBlock(),e.createBlock(a.default,{key:0,chips:t.spot.delivery},null,8,["chips"])):e.createCommentVNode("",!0),v,n.type!=="short"&&t.spot.payment.length>0?(e.openBlock(),e.createBlock(a.default,{key:1,chips:t.spot.payment},null,8,["chips"])):e.createCommentVNode("",!0)])]))}},b=c.default(y,[["__scopeId","data-v-5d50688e"]]);exports.default=b;
@@ -1,7 +1,7 @@
1
1
  import { openBlock as n, createElementBlock as u, createVNode as r, createElementVNode as e, toDisplayString as l, createBlock as p, createCommentVNode as d, pushScopeId as h, popScopeId as g } from "vue";
2
2
  import f from "../../../icons/navigation/IconEdit.vue.js";
3
3
  import c from "../../../../components/Chips/Chips.vue.js";
4
- import y from "../../../../components/Map/Map.vue2.js";
4
+ import y from "../../../../components/Map/Map.vue.js";
5
5
  import "./CardSpot.vue2.js";
6
6
  import $ from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
7
  const m = (t) => (h("data-v-5d50688e"), t = t(), g(), t), b = { class: "radius-big o-hidden cols-2-1_3" }, v = { class: "pd-medium w-100" }, k = ["innerHTML"], z = { class: "d-block p-big mn-b-semi" }, C = /* @__PURE__ */ m(() => /* @__PURE__ */ e("h4", null, "Delivery:", -1)), S = /* @__PURE__ */ m(() => /* @__PURE__ */ e("h4", null, "Accepted Payment:", -1)), w = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const g=require("../../../../components/Dropdown/Dropdown.vue.cjs"),d=require("../../../mobile/components/Menu/Menu.vue.cjs"),l=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),h=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=require("../sections/ProfileCompletion.vue.cjs"),B=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),C=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),y=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const v={key:0,class:"for-transition w-100"},x={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},L={key:5,class:"mn-t-small mn-b-thin"},O=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),A=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",null," About ",-1),T=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),H={__name:"Profile",setup(J){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{y.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",v,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",x," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(V.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(g.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(h.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(C.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(E.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Not specified"),1),e.createElementVNode("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," 👨‍👨‍👧‍👧 "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:4,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",L," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(N.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"i-semi",icon:!0}),O]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),j]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),A]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{onClick:r[8]||(r[8]=s=>e.unref(n).push({name:"Legal",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[G]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[9]||(r[9]=s=>b())},{default:e.withCtx(()=>[T]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=H;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");const g=require("../../../../components/Dropdown/Dropdown.vue.cjs"),d=require("../../../mobile/components/Menu/Menu.vue2.cjs"),l=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),p=require("../../../organizations/components/elements/ButtonToggleMembership.vue.cjs"),h=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=require("../sections/ProfileCompletion.vue.cjs"),B=require("../../../icons/entities/IconEvents.vue.cjs"),f=require("../../../icons/entities/IconGroups.vue.cjs"),w=require("../../../icons/entities/IconCommunity.vue.cjs"),C=require("../../../icons/navigation/IconEdit.vue.cjs"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),_=require("vue-router"),o=require("../../../auth/store/auth.cjs"),t=require("../../store/users.cjs"),y=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const v={key:0,class:"for-transition w-100"},x={key:0,class:"flex-center flex pd-medium radius-big bg-grey uppercase t-semi w-100 h-100"},q={key:1,_id:"dash",class:"pd-b-extra pd-thin w-100"},S={class:"flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"},U={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),P=["src"],R={class:"mn-b-thin"},$={class:"mn-b-thin t-main t-semi"},D={class:"mn-b-small p-medium"},I={class:"mn-b-medium flex-center flex-nowrap flex"},F={class:"t-semi mn-b-small"},L={key:5,class:"mn-t-small mn-b-thin"},O=e.createElementVNode("span",null,"Events",-1),j=e.createElementVNode("span",null,"Groups",-1),A=e.createElementVNode("span",null,"Posts",-1),W=e.createElementVNode("span",null,"Wallet",-1),z=e.createElementVNode("span",null," Settings ",-1),G=e.createElementVNode("span",null," About ",-1),T=e.createElementVNode("span",{class:"t-red"}," Logout ",-1),H={__name:"Profile",setup(J){const a=_.useRoute(),n=_.useRouter(),u=e.ref(!1);e.onMounted(async()=>{await t.actions.read({_id:a.params._id,user:o.state.user._id}),u.value=!0});const m=({membership:i,status:r,target:s},c,k)=>{y.mutations.handleMembershipUpdate(t.state.current,i,r,s,c,k)};function b(){o.actions.logout(),n.push({name:"Sign In"})}return(i,r)=>u.value?(e.openBlock(),e.createElementBlock("div",v,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",x," Sorry, user has been removed. ")):(e.openBlock(),e.createElementBlock("div",q,[e.unref(a).params._id===o.state.user._id&&u.value?(e.openBlock(),e.createBlock(V.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0},null,8,["user","target"])):e.createCommentVNode("",!0),e.createElementVNode("section",S,[e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(g.default,{key:0,label:"...",align:"right",class:"cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",U,[e.createVNode(h.default,{user:o.state.user._id,type:"user",target:t.state.current._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","target"]),o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:o.state.user._id,type:"user",role:"blocked",target:t.state.current._id,status:t.state.current.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:r[0]||(r[0]=s=>m(s,"isBlocked")),class:"t-white mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.unref(a).params._id===o.state.user._id?(e.openBlock(),e.createBlock(C.default,{key:1,onClick:r[1]||(r[1]=s=>i.$router.push({name:"User Edit Profile",params:{_id:o.state.user._id}})),class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),t.state.current.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:2,src:(i.FILE_SERVER_URL||"")+t.state.current.profile.photo,class:"radius-extra bg-white mn-b-small object-fit-cover i-extra"},null,8,P)):(e.openBlock(),e.createBlock(E.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h3",R,e.toDisplayString(t.state.current.profile.name?t.state.current.profile.name:"Not specified"),1),e.createElementVNode("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Not specified"),1),e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.roles,(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-white",{"mn-r-thin":c!==t.state.current.roles.length-1}])},e.toDisplayString(s.icon)+" "+e.toDisplayString(s.name),3))),256))]),e.createElementVNode("p",F," 👨‍👨‍👧‍👧 "+e.toDisplayString(t.state.current.numberOfSubscribers)+" followers ",1),o.state.user._id&&e.unref(a).params._id&&e.unref(a).params._id!==o.state.user._id?(e.openBlock(),e.createBlock(p.default,{key:4,user:o.state.user._id,type:"user",role:"subscriber",target:t.state.current._id,status:t.state.current.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[2]||(r[2]=s=>m(s,"isSubscriber","numberOfSubscribers")),class:"w-min mn-b-medium mn-r-auto mn-l-auto"},null,8,["user","target","status"])):e.createCommentVNode("",!0),Object.values(t.state.current.socials).some(s=>s)?(e.openBlock(),e.createElementBlock("h4",L," Find Me in Socials ")):e.createCommentVNode("",!0),e.createVNode(N.default,{telegram:t.state.current.socials.telegram,facebook:t.state.current.socials.facebook,instagram:t.state.current.socials.instagram,twitter:t.state.current.socials.twitter,class:"mn-r-auto mn-l-auto"},null,8,["telegram","facebook","instagram","twitter"])]),e.createVNode(d.default,{class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[3]||(r[3]=s=>e.unref(n).push({name:"User Events",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(B.default,{class:"i-semi",icon:!0}),O]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=s=>e.unref(n).push({name:"User Organizations",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),j]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=s=>e.unref(n).push({name:"User Blogposts",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(w.default,{class:"i-semi",icon:!0}),A]),_:1})]),_:1}),i.APP_NAME==="Weeder"?(e.openBlock(),e.createBlock(d.default,{key:1,class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[6]||(r[6]=s=>e.unref(n).push({name:"User Wallet",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0}),W]),_:1})]),_:1})):e.createCommentVNode("",!0),o.state.user._id===e.unref(a).params._id?(e.openBlock(),e.createBlock(d.default,{key:2,class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[7]||(r[7]=s=>e.unref(n).push({name:"User Edit Profile",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[z]),_:1}),e.createVNode(l.default,{onClick:r[8]||(r[8]=s=>e.unref(n).push({name:"Legal",params:{_id:e.unref(a).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[G]),_:1}),e.createVNode(l.default,{class:"cursor-pointer",onClick:r[9]||(r[9]=s=>b())},{default:e.withCtx(()=>[T]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=H;
@@ -1,8 +1,8 @@
1
1
  import { ref as U, onMounted as C, openBlock as o, createElementBlock as p, unref as r, createBlock as c, createCommentVNode as m, createElementVNode as i, withCtx as u, createVNode as n, toDisplayString as f, Fragment as E, renderList as S, normalizeClass as B } from "vue";
2
- import "../../../../components/Field/Field.vue.js";
3
- import "../../../../components/Button/Button.vue.js";
2
+ import "../../../../components/Field/Field.vue2.js";
3
+ import "../../../../components/Button/Button.vue2.js";
4
4
  import M from "../../../../components/Dropdown/Dropdown.vue.js";
5
- import k from "../../../mobile/components/Menu/Menu.vue.js";
5
+ import k from "../../../mobile/components/Menu/Menu.vue2.js";
6
6
  import _ from "../../../mobile/components/Menu/MenuItem.vue.js";
7
7
  import y from "../../../organizations/components/elements/ButtonToggleMembership.vue.js";
8
8
  import N from "../../../reports/components/sections/FormReport.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),u=require("../../../community/components/sections/Feed.vue.cjs"),o=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(k){const t=n.useRoute(),c=n.useRouter();let d=t.query.tab?t.query.tab:"posts";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,a=>{c.replace({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[f,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=l=>a.$router.push({name:"Create BlogPost"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(i.default,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=l=>r.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u.default,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u.default,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u.default,{key:3,user:o.state.user._id,following:e.unref(t).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),i=require("../../../../components/Tab/Tab.vue.cjs"),u=require("../../../community/components/sections/Feed.vue.cjs"),o=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(k){const t=n.useRoute(),c=n.useRouter();let d=t.query.tab?t.query.tab:"posts";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,a=>{c.replace({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[f,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=l=>a.$router.push({name:"Create BlogPost"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(i.default,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=l=>r.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u.default,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u.default,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u.default,{key:3,user:o.state.user._id,following:e.unref(t).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as _, watch as b, openBlock as t, createElementBlock as d, createElementVNode as c, unref as s, createCommentVNode as o, createBlock as l } from "vue";
2
2
  import { useRoute as g, useRouter as v } from "vue-router";
3
- import y from "../../../../components/Tab/Tab.vue2.js";
3
+ import y from "../../../../components/Tab/Tab.vue.js";
4
4
  import i from "../../../community/components/sections/Feed.vue.js";
5
5
  import { state as a } from "../../../auth/store/auth.js";
6
6
  const h = { class: "pd-thin" }, k = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ c("h2", { class: "mn-r-medium" }, "Posts", -1), E = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");const i=require("../../../../components/Field/Field.vue2.cjs"),m=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),h=require("../sections/ProfileCompletion.vue.cjs"),c=require("vue-router"),r=require("../../../auth/store/auth.cjs"),s=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const N={class:"pd-medium for-transition w-100"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),w={class:"mn-b-semi"},y=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),U={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},_=e.createElementVNode("h4",null,"Upload userpic",-1),k=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),q=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),E=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),P={__name:"ProfileEdit",async setup(S){let n,d;e.ref(null);const f=c.useRoute(),u=c.useRouter();[n,d]=e.withAsyncContext(()=>s.actions.read({_id:r.state.user._id})),await n,d();const l=e.ref(s.state.current);async function p(){await s.actions.update(s.state.current)}async function b(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.state.current.status="removed",await s.actions.update(s.state.current),r.actions.logout())}function v(){u.replace({name:"User Profile",params:{_id:s.state.current._id}})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",N,[e.unref(f).params._id===r.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,user:r.state.user._id,target:l.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),V,e.createVNode(i.default,{field:l.value.username,"onUpdate:field":a[0]||(a[0]=t=>l.value.username=t),label:"@",placeholder:"Not specified",class:"mn-b-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createElementVNode("p",w,"Your username will be used for URL of profile like "+e.toDisplayString(o.API_URL)+"/users/username",1),y,e.createElementVNode("div",U,[e.createVNode(g.default,{photo:l.value.profile.photo,"onUpdate:photo":a[1]||(a[1]=t=>l.value.profile.photo=t),uploadPath:"users/"+l.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),_]),e.createVNode(i.default,{field:l.value.profile.name,"onUpdate:field":a[2]||(a[2]=t=>l.value.profile.name=t),label:"Name",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium radius-small",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.profile.description,"onUpdate:field":a[3]||(a[3]=t=>l.value.profile.description=t),label:"Description",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),k,q,e.createVNode(i.default,{field:l.value.socials.instagram,"onUpdate:field":a[4]||(a[4]=t=>l.value.socials.instagram=t),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.twitter,"onUpdate:field":a[5]||(a[5]=t=>l.value.socials.twitter=t),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.facebook,"onUpdate:field":a[6]||(a[6]=t=>l.value.socials.facebook=t),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.telegram,"onUpdate:field":a[7]||(a[7]=t=>l.value.socials.telegram=t),label:"Telegram",placeholder:"",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["field"]),E,e.createVNode(i.default,{field:l.value.phone,"onUpdate:field":a[8]||(a[8]=t=>l.value.phone=t),label:"Phone",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium mn-b-thin radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.email,"onUpdate:field":a[9]||(a[9]=t=>l.value.email=t),label:"Email",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:!0,validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{submit:p,callback:v,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(m.default,{submit:b,callback:o.a=()=>{e.unref(u).push({name:"Sign In"})},class:"mn-b-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const i=require("../../../../components/Field/Field.vue.cjs"),m=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),h=require("../sections/ProfileCompletion.vue.cjs"),c=require("vue-router"),r=require("../../../auth/store/auth.cjs"),s=require("../../store/users.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./ProfileEdit.vue2.cjs");const N={class:"pd-medium for-transition w-100"},V=e.createElementVNode("h3",{class:"mn-b-small"},"Username",-1),w={class:"mn-b-semi"},y=e.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),U={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},_=e.createElementVNode("h4",null,"Upload userpic",-1),k=e.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),q=e.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),E=e.createElementVNode("h3",{class:"mn-b-small"},"Account",-1),P={__name:"ProfileEdit",async setup(S){let n,d;e.ref(null);const f=c.useRoute(),u=c.useRouter();[n,d]=e.withAsyncContext(()=>s.actions.read({_id:r.state.user._id})),await n,d();const l=e.ref(s.state.current);async function p(){await s.actions.update(s.state.current)}async function b(){window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.")&&(s.state.current.status="removed",await s.actions.update(s.state.current),r.actions.logout())}function v(){u.replace({name:"User Profile",params:{_id:s.state.current._id}})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",N,[e.unref(f).params._id===r.state.user._id?(e.openBlock(),e.createBlock(h.default,{key:0,user:r.state.user._id,target:l.value,cta:!1},null,8,["user","target"])):e.createCommentVNode("",!0),V,e.createVNode(i.default,{field:l.value.username,"onUpdate:field":a[0]||(a[0]=t=>l.value.username=t),label:"@",placeholder:"Not specified",class:"mn-b-thin w-100 bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createElementVNode("p",w,"Your username will be used for URL of profile like "+e.toDisplayString(o.API_URL)+"/users/username",1),y,e.createElementVNode("div",U,[e.createVNode(g.default,{photo:l.value.profile.photo,"onUpdate:photo":a[1]||(a[1]=t=>l.value.profile.photo=t),uploadPath:"users/"+l.value._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden bg-white mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),_]),e.createVNode(i.default,{field:l.value.profile.name,"onUpdate:field":a[2]||(a[2]=t=>l.value.profile.name=t),label:"Name",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium radius-small",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.profile.description,"onUpdate:field":a[3]||(a[3]=t=>l.value.profile.description=t),label:"Description",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),k,q,e.createVNode(i.default,{field:l.value.socials.instagram,"onUpdate:field":a[4]||(a[4]=t=>l.value.socials.instagram=t),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.twitter,"onUpdate:field":a[5]||(a[5]=t=>l.value.socials.twitter=t),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.facebook,"onUpdate:field":a[6]||(a[6]=t=>l.value.socials.facebook=t),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:l.value.socials.telegram,"onUpdate:field":a[7]||(a[7]=t=>l.value.socials.telegram=t),label:"Telegram",placeholder:"",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["field"]),E,e.createVNode(i.default,{field:l.value.phone,"onUpdate:field":a[8]||(a[8]=t=>l.value.phone=t),label:"Phone",placeholder:"Not specified",class:"mn-b-thin bg-grey pd-medium mn-b-thin radius-small",disabled:"true",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(i.default,{field:l.value.email,"onUpdate:field":a[9]||(a[9]=t=>l.value.email=t),label:"Email",placeholder:"Not specified",class:"mn-b-semi bg-grey pd-medium radius-small",disabled:!0,validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{submit:p,callback:v,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1}),e.createVNode(m.default,{submit:b,callback:o.a=()=>{e.unref(u).push({name:"Sign In"})},class:"mn-b-thin bg-red t-white"},{default:e.withCtx(()=>[e.createTextVNode("Delete Account")]),_:1},8,["callback"])]))}};exports.default=P;
@@ -1,8 +1,8 @@
1
1
  import { ref as f, withAsyncContext as U, openBlock as c, createElementBlock as k, unref as b, createBlock as P, createCommentVNode as S, createVNode as i, createElementVNode as s, toDisplayString as z, withCtx as h, createTextVNode as g } from "vue";
2
2
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
- import "../../../../components/Tab/Tab.vue.js";
4
- import t from "../../../../components/Field/Field.vue2.js";
5
- import v from "../../../../components/Button/Button.vue2.js";
3
+ import "../../../../components/Tab/Tab.vue2.js";
4
+ import t from "../../../../components/Field/Field.vue.js";
5
+ import v from "../../../../components/Button/Button.vue.js";
6
6
  import A from "../../../../components/UploadImage/UploadImage.vue.js";
7
7
  import R from "../sections/ProfileCompletion.vue.js";
8
8
  import { useRoute as $, useRouter as D } from "vue-router";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),l=require("../../../events/components/sections/Feed.vue.cjs"),n=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},v=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),_={__name:"ProfileEvents",setup(b){const t=c.useRoute(),o=c.useRouter();let i=t.query.tab?t.query.tab:"owner";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,s=>{o.replace({query:{...t.query,tab:s}})}),(s,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[v,n.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=u=>e.unref(o).push({name:"Create Event"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=u=>r.value=u),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),r.value==="owner"?(e.openBlock(),e.createBlock(l.default,{key:0,user:n.state.user._id,creator:e.unref(t).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="participant"?(e.openBlock(),e.createBlock(l.default,{key:1,user:n.state.user._id,participant:e.unref(t).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../../components/Tab/Tab.vue.cjs"),l=require("../../../events/components/sections/Feed.vue.cjs"),n=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},v=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),_={__name:"ProfileEvents",setup(b){const t=c.useRoute(),o=c.useRouter();let i=t.query.tab?t.query.tab:"owner";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,s=>{o.replace({query:{...t.query,tab:s}})}),(s,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[v,n.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=u=>e.unref(o).push({name:"Create Event"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=u=>r.value=u),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),r.value==="owner"?(e.openBlock(),e.createBlock(l.default,{key:0,user:n.state.user._id,creator:e.unref(t).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="participant"?(e.openBlock(),e.createBlock(l.default,{key:1,user:n.state.user._id,participant:e.unref(t).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as f, watch as b, openBlock as a, createElementBlock as l, createElementVNode as p, unref as s, createCommentVNode as o, createVNode as v, createBlock as m } from "vue";
2
2
  import { useRoute as y, useRouter as h } from "vue-router";
3
- import k from "../../../../components/Tab/Tab.vue2.js";
3
+ import k from "../../../../components/Tab/Tab.vue.js";
4
4
  import d from "../../../events/components/sections/Feed.vue.js";
5
5
  import { state as n } from "../../../auth/store/auth.js";
6
6
  const g = { class: "pd-thin" }, w = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ p("h2", { class: "mn-r-medium" }, " Events ", -1), V = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../store/wallet.cjs"),s=require("../../../../../../node_modules/web3/lib/esm/web3.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_config.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_request_manager.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_subscriptions.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_context.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_batch_request.cjs");require("../../../../../../node_modules/web3-types/lib/esm/data_format_types.cjs");require("../../../../../../node_modules/web3-types/lib/esm/eth_types.cjs");require("../../../../../../node_modules/web3-types/lib/esm/web3_base_provider.cjs");require("../../../../../../node_modules/web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../../../../node_modules/web3-eth-iban/lib/esm/iban.cjs");require("../../../../../../node_modules/web3-validator/lib/esm/formats.cjs");require("../../../../../../node_modules/web3-validator/lib/esm/default_validator.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_promi_event.cjs");require("../../../../../../node_modules/setimmediate/setImmediate.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/web3_eth.cjs");require("../../../../../../node_modules/web3-eth-abi/lib/esm/coders/base/number.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/schemas.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/constants.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs");require("../../../../../../node_modules/web3-eth-contract/lib/esm/contract.cjs");require("../../../../../../node_modules/web3-eth-personal/lib/esm/personal.cjs");require("../../../../../../node_modules/web3-net/lib/esm/net.cjs");require("../../../../../../node_modules/web3-net/lib/esm/rpc_method_wrappers.cjs");require("../../../../../../node_modules/web3-providers-http/lib/esm/index.cjs");require("../../../../../../node_modules/isomorphic-ws/browser.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/wallet.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/account.cjs");require("../../../../../../node_modules/crc-32/crc32.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/common/types.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/tx/constants.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/common/enums.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.cjs");require("../../../../../../node_modules/@ethereumjs/rlp/dist/index.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/tx/types.cjs");require("../../../../../../node_modules/web3-eth-ens/lib/esm/ens.cjs");require("../../../../../../node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.cjs");require("../../../../../../node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.cjs");require("../../../../../../node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.cjs");require("vue-router");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");require("../../../../components/Chips/Chips.vue2.cjs");const a={class:"pd-thin"},l={class:"bg-black t-white mn-b-thin radius-big pd-big"},c=e.createElementVNode("h1",{class:"mn-b-medium"},"Your Wallet",-1),i=e.createElementVNode("p",{class:"mn-b-semi t-transp p-big"}," Earn Weeder Tokens by purchasing our weed or contributing to the community. ",-1),u={key:0,class:"gap-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"},d={class:"flex-v-center flex-nowrap flex mn-r-auto"},m=e.createElementVNode("button",{class:"w-max bg-main t-medium button"},"Get More",-1),p={key:0,class:"mn-b-semi cols-2 gap-thin"},b=e.createElementVNode("div",{class:"w-100 pd-medium radius-medium t-center bg-grey"},[e.createElementVNode("h3",{class:"mn-b-small"},"Make first order and start earning Weeder Token"),e.createElementVNode("button",{class:"mn-l-auto mn-r-auto bg-main button"},"Explore marketplace")],-1),_={class:"w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-grey"},h={key:0,class:"mn-b-small"},q={key:1,class:"w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"},k=e.createElementVNode("p",{class:"t-transp t-medium mn-b-thin"},"You own:",-1),f={class:"h1 mn-b-small"},g=e.createElementVNode("p",{class:"t-white p-big t-medium mn-b-semi"},"of all shares",-1),E={class:"flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra"},w={key:0,class:"t-transp t-medium"},N=e.createElementVNode("span",{class:"uppercase p-small t-medium t-transp"},"Connected Metamask",-1),V=e.createElementVNode("br",null,null,-1),x={key:2,class:"mn-b-small"},y={class:"cols-3 gap-thin"},B={class:"radius-medium bg-grey"},v={class:"flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium"},C={class:"t-semi mn-r-auto"},W={class:"pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small"},D={class:"pd-medium"},S={class:"t-regular mn-b-thin"},M={__name:"Wallet",setup(R){return window.ethereum.on("accountsChanged",o=>{o.length<1&&(t.state.account=null)}),t.state.web3=new s.Web3(window.ethereum||"http://localhost:8080"),e.onMounted(()=>{t.actions.listRewards(),t.actions.tryReconnectWallet()}),(o,n)=>(e.openBlock(),e.createElementBlock("section",a,[e.createElementVNode("section",l,[c,i,e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",u,[e.createElementVNode("div",d,[e.createElementVNode("h2",null,e.toDisplayString(e.unref(t.state).tokenBalance)+" WDT",1)]),m,e.createElementVNode("button",{class:"w-max bg-white t-black t-medium button",onClick:n[0]||(n[0]=(...r)=>e.unref(t.actions).collectRewards&&e.unref(t.actions).collectRewards(...r))},"Withdraw")])):e.createCommentVNode("",!0)]),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[b,e.createElementVNode("div",_,[e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h3",h," Connect Metamask to withdrawal your earnings. ")),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:n[1]||(n[1]=(...r)=>e.unref(t.actions).connectWallet&&e.unref(t.actions).connectWallet(...r)),class:"br-solid br-2px br-black-transp-10 t-black button"}," Connect Wallet "))])])),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",q,[k,e.createElementVNode("p",f,e.toDisplayString(e.unref(t.state).share)+"%",1),g,e.createElementVNode("div",E,[e.unref(t.state).account?(e.openBlock(),e.createElementBlock("p",w,[N,V,e.createElementVNode("span",null,e.toDisplayString(e.unref(t.state).account),1)])):e.createCommentVNode("",!0),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:n[2]||(n[2]=(...r)=>e.unref(t.actions).disconnectWallet&&e.unref(t.actions).disconnectWallet(...r)),class:"mn-l-auto bg-red button"}," Disconnect Wallet ")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.unref(t.state).rewards.length>0?(e.openBlock(),e.createElementBlock("h2",x,"Latest Rewards ")):e.createCommentVNode("",!0),e.createElementVNode("section",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,r=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",v,[e.createElementVNode("p",C,e.toDisplayString(r.amount)+" WDT",1),e.createElementVNode("span",W,e.toDisplayString(r.type==="blogpost"?"Community Reward":r.type),1)]),e.createElementVNode("div",D,[e.createElementVNode("h4",S,e.toDisplayString(r.name),1)])]))),256))])]))}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../store/wallet.cjs"),s=require("../../../../../../node_modules/web3/lib/esm/web3.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_config.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_request_manager.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_subscription_manager.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_subscriptions.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_context.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_batch_request.cjs");require("../../../../../../node_modules/web3-types/lib/esm/data_format_types.cjs");require("../../../../../../node_modules/web3-types/lib/esm/eth_types.cjs");require("../../../../../../node_modules/web3-types/lib/esm/web3_base_provider.cjs");require("../../../../../../node_modules/web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../../../../node_modules/web3-eth-iban/lib/esm/iban.cjs");require("../../../../../../node_modules/web3-validator/lib/esm/formats.cjs");require("../../../../../../node_modules/web3-validator/lib/esm/default_validator.cjs");require("../../../../../../node_modules/web3-core/lib/esm/web3_promi_event.cjs");require("../../../../../../node_modules/setimmediate/setImmediate.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/web3_eth.cjs");require("../../../../../../node_modules/web3-eth-abi/lib/esm/coders/base/number.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/schemas.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/constants.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs");require("../../../../../../node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs");require("../../../../../../node_modules/web3-eth-contract/lib/esm/contract.cjs");require("../../../../../../node_modules/web3-eth-personal/lib/esm/personal.cjs");require("../../../../../../node_modules/web3-net/lib/esm/net.cjs");require("../../../../../../node_modules/web3-net/lib/esm/rpc_method_wrappers.cjs");require("../../../../../../node_modules/web3-providers-http/lib/esm/index.cjs");require("../../../../../../node_modules/isomorphic-ws/browser.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/wallet.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/account.cjs");require("../../../../../../node_modules/crc-32/crc32.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/common/types.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/tx/constants.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/common/enums.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/tx/eip1559Transaction.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/tx/eip2930Transaction.cjs");require("../../../../../../node_modules/@ethereumjs/rlp/dist/index.cjs");require("../../../../../../node_modules/web3-eth-accounts/lib/esm/tx/types.cjs");require("../../../../../../node_modules/web3-eth-ens/lib/esm/ens.cjs");require("../../../../../../node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.cjs");require("../../../../../../node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.cjs");require("../../../../../../node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.cjs");require("vue-router");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");require("../../../../components/Chips/Chips.vue2.cjs");const a={class:"pd-thin"},l={class:"bg-black t-white mn-b-thin radius-big pd-big"},c=e.createElementVNode("h1",{class:"mn-b-medium"},"Your Wallet",-1),i=e.createElementVNode("p",{class:"mn-b-semi t-transp p-big"}," Earn Weeder Tokens by purchasing our weed or contributing to the community. ",-1),u={key:0,class:"gap-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"},d={class:"flex-v-center flex-nowrap flex mn-r-auto"},m=e.createElementVNode("button",{class:"w-max bg-main t-medium button"},"Get More",-1),p={key:0,class:"mn-b-semi cols-2 gap-thin"},b=e.createElementVNode("div",{class:"w-100 pd-medium radius-medium t-center bg-grey"},[e.createElementVNode("h3",{class:"mn-b-small"},"Make first order and start earning Weeder Token"),e.createElementVNode("button",{class:"mn-l-auto mn-r-auto bg-main button"},"Explore marketplace")],-1),_={class:"w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-grey"},h={key:0,class:"mn-b-small"},q={key:1,class:"w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"},k=e.createElementVNode("p",{class:"t-transp t-medium mn-b-thin"},"You own:",-1),f={class:"h1 mn-b-small"},g=e.createElementVNode("p",{class:"t-white p-big t-medium mn-b-semi"},"of all shares",-1),E={class:"flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra"},w={key:0,class:"t-transp t-medium"},N=e.createElementVNode("span",{class:"uppercase p-small t-medium t-transp"},"Connected Metamask",-1),V=e.createElementVNode("br",null,null,-1),x={key:2,class:"mn-b-small"},y={class:"cols-3 gap-thin"},B={class:"radius-medium bg-grey"},v={class:"flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium"},C={class:"t-semi mn-r-auto"},W={class:"pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small"},D={class:"pd-medium"},S={class:"t-regular mn-b-thin"},M={__name:"Wallet",setup(R){return window.ethereum.on("accountsChanged",o=>{o.length<1&&(t.state.account=null)}),t.state.web3=new s.Web3(window.ethereum||"http://localhost:8080"),e.onMounted(()=>{t.actions.listRewards(),t.actions.tryReconnectWallet()}),(o,n)=>(e.openBlock(),e.createElementBlock("section",a,[e.createElementVNode("section",l,[c,i,e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",u,[e.createElementVNode("div",d,[e.createElementVNode("h2",null,e.toDisplayString(e.unref(t.state).tokenBalance)+" WDT",1)]),m,e.createElementVNode("button",{class:"w-max bg-white t-black t-medium button",onClick:n[0]||(n[0]=(...r)=>e.unref(t.actions).collectRewards&&e.unref(t.actions).collectRewards(...r))},"Withdraw")])):e.createCommentVNode("",!0)]),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",p,[b,e.createElementVNode("div",_,[e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h3",h," Connect Metamask to withdrawal your earnings. ")),e.unref(t.state).account?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:n[1]||(n[1]=(...r)=>e.unref(t.actions).connectWallet&&e.unref(t.actions).connectWallet(...r)),class:"br-solid br-2px br-black-transp-10 t-black button"}," Connect Wallet "))])])),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("div",q,[k,e.createElementVNode("p",f,e.toDisplayString(e.unref(t.state).share)+"%",1),g,e.createElementVNode("div",E,[e.unref(t.state).account?(e.openBlock(),e.createElementBlock("p",w,[N,V,e.createElementVNode("span",null,e.toDisplayString(e.unref(t.state).account),1)])):e.createCommentVNode("",!0),e.unref(t.state).account?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:n[2]||(n[2]=(...r)=>e.unref(t.actions).disconnectWallet&&e.unref(t.actions).disconnectWallet(...r)),class:"mn-l-auto bg-red button"}," Disconnect Wallet ")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.unref(t.state).rewards.length>0?(e.openBlock(),e.createElementBlock("h2",x,"Latest Rewards ")):e.createCommentVNode("",!0),e.createElementVNode("section",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,r=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",v,[e.createElementVNode("p",C,e.toDisplayString(r.amount)+" WDT",1),e.createElementVNode("span",W,e.toDisplayString(r.type==="blogpost"?"Community Reward":r.type),1)]),e.createElementVNode("div",D,[e.createElementVNode("h4",S,e.toDisplayString(r.name),1)])]))),256))])]))}};exports.default=M;
@@ -46,7 +46,7 @@ import "../../../../../../node_modules/web3-rpc-methods/lib/esm/personal_rpc_met
46
46
  import "vue-router";
47
47
  import "vue-i18n";
48
48
  import "../../../../components/Popup/Popup.vue.js";
49
- import "../../../../components/Button/Button.vue.js";
49
+ import "../../../../components/Button/Button.vue2.js";
50
50
  import "../../../../components/Select/Select.vue.js";
51
51
  import "../../../reports/store/reports.js";
52
52
  import "../../../../components/Dropdown/Dropdown.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./main-a7ae4ce5.js");require("vue");exports.Address=e.Address;exports.Breadcrumbs=e._sfc_main$9;exports.Button=e._sfc_main;exports.Checkbox=e.Checkbox;exports.Chips=e.Chips;exports.Countdown=e._sfc_main$10;exports.DatePicker=e._sfc_main$11;exports.Dropdown=e.Dropdown;exports.EmptyState=e._sfc_main$12;exports.Error=e._sfc_main$1;exports.Feed=e._sfc_main$13;exports.Field=e.Field;exports.FieldBig=e._sfc_main$14;exports.FieldPhone=e.FieldPhone;exports.FieldTags=e.FieldTags;exports.Loader=e.Loader;exports.LocationMarker=e.LocationMarker;exports.Magnifier=e.Magnifier;exports.Map=e.Map;exports.Popup=e._sfc_main$2;exports.Radio=e._sfc_main$3;exports.Select=e.Select;exports.SelectMulti=e.SelectMulti;exports.Shader=e.Shader;exports.Sidebar=e._sfc_main$15;exports.Slider=e._sfc_main$16;exports.Spoiler=e._sfc_main$4;exports.Status=e._sfc_main$17;exports.Tab=e._sfc_main$5;exports.Text=e._sfc_main$6;exports.Tooltip=e.Tooltip;exports.Upload=e.Upload;exports.UploadImage=e._sfc_main$7;exports.UploadImageMultiple=e._sfc_main$8;exports.default=e.main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./main-c56d4c09.js");require("vue");exports.Address=e.Address;exports.Breadcrumbs=e._sfc_main$9;exports.Button=e._sfc_main;exports.Checkbox=e.Checkbox;exports.Chips=e.Chips;exports.Countdown=e._sfc_main$10;exports.DatePicker=e._sfc_main$11;exports.Dropdown=e.Dropdown;exports.EmptyState=e._sfc_main$12;exports.Error=e._sfc_main$1;exports.Feed=e._sfc_main$13;exports.Field=e.Field;exports.FieldBig=e._sfc_main$14;exports.FieldPhone=e.FieldPhone;exports.FieldTags=e.FieldTags;exports.Loader=e.Loader;exports.LocationMarker=e.LocationMarker;exports.Magnifier=e.Magnifier;exports.Map=e.Map;exports.Popup=e._sfc_main$2;exports.Radio=e._sfc_main$3;exports.Select=e.Select;exports.SelectMulti=e.SelectMulti;exports.Shader=e.Shader;exports.Sidebar=e._sfc_main$15;exports.Slider=e._sfc_main$16;exports.Spoiler=e._sfc_main$4;exports.Status=e._sfc_main$17;exports.Tab=e._sfc_main$5;exports.Text=e._sfc_main$6;exports.Tooltip=e.Tooltip;exports.Upload=e.Upload;exports.UploadImage=e._sfc_main$7;exports.UploadImageMultiple=e._sfc_main$8;exports.default=e.main;
@@ -1,4 +1,4 @@
1
- import { A as o, k as d, _ as r, C as t, l as i, n as l, o as p, D as u, p as S, a as n, q as c, F as m, r as g, b as F, s as M, t as b, L as h, u as T, M as f, c as k, d as x, S as C, e as U, v as w, w as B, x as D, f as L, y as P, g as y, h as A, T as E, U as I, i as j, j as q, m as v } from "./main-203b36b6.mjs";
1
+ import { A as o, k as d, _ as r, C as t, l as i, n as l, o as p, D as u, p as S, a as n, q as c, F as m, r as g, b as F, s as M, t as b, L as h, u as T, M as f, c as k, d as x, S as C, e as U, v as w, w as B, x as D, f as L, y as P, g as y, h as A, T as E, U as I, i as j, j as q, m as v } from "./main-482dc398.mjs";
2
2
  import "vue";
3
3
  export {
4
4
  o as Address,