@ozdao/prometheus-framework 0.2.118 → 0.2.119

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. package/dist/community.server.js +1 -1
  2. package/dist/community.server.mjs +1 -1
  3. package/dist/events.server.js +1 -1
  4. package/dist/events.server.mjs +1 -1
  5. package/dist/gallery.server.js +9 -3
  6. package/dist/gallery.server.mjs +9 -3
  7. package/dist/main-DL3vRQCi.js +92 -0
  8. package/dist/main-Ds3Z5x5d.mjs +14206 -0
  9. package/dist/main.css +1 -1
  10. package/dist/orders.server.js +1 -1
  11. package/dist/orders.server.mjs +1 -1
  12. package/dist/organizations.server.js +1 -1
  13. package/dist/organizations.server.mjs +1 -1
  14. package/dist/products.server.js +1 -1
  15. package/dist/products.server.mjs +1 -1
  16. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  18. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +116 -117
  20. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +58 -1
  22. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -58
  24. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +123 -109
  26. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +32 -26
  28. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
  30. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -1
  32. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
  34. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
  36. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
  38. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -1
  40. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  48. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +16 -17
  50. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  53. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  54. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +44 -69
  64. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.cjs +1 -0
  65. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.js +64 -0
  66. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.cjs +1 -0
  67. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.js +1 -0
  68. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +101 -14
  70. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +165 -102
  72. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +3 -3
  74. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.js +38 -1
  76. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +3 -3
  78. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +21 -21
  80. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +3 -3
  82. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js +5 -5
  86. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  90. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  92. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  94. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  98. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  100. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  120. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  128. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +31 -32
  134. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  136. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  138. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
  140. package/dist/prometheus-framework.cjs.js +1 -1
  141. package/dist/prometheus-framework.es.js +1 -1
  142. package/dist/queryProcessor-g8208K6g.mjs +178 -0
  143. package/dist/queryProcessor-haY_gPGg.js +177 -0
  144. package/dist/style.css +1 -1
  145. package/dist/wallet.server.js +1 -1
  146. package/dist/wallet.server.mjs +1 -1
  147. package/dist/web-B8tq3Fda.mjs +54 -0
  148. package/dist/web-ByJkgGrt.js +1 -0
  149. package/package.json +1 -1
  150. package/src/components/DatePicker/Calendar.vue +82 -55
  151. package/src/components/Feed/Feed.vue +45 -16
  152. package/src/components/FieldTags/BlockTags.vue +30 -23
  153. package/src/components/Popup/Popup.vue +2 -2
  154. package/src/modules/events/components/pages/Events.vue +2 -48
  155. package/src/modules/gallery/components/blocks/PhotoViewer.vue +115 -0
  156. package/src/modules/gallery/components/pages/Gallery.vue +103 -6
  157. package/src/modules/gallery/components/sections/BackofficeGallery.vue +100 -32
  158. package/src/modules/gallery/controllers/gallery.controller.js +45 -38
  159. package/src/modules/globals/components/blocks/CardHeader.vue +1 -1
  160. package/src/modules/globals/components/elements/ButtonDate.vue +37 -43
  161. package/src/modules/globals/components/layouts/Client.vue +1 -1
  162. package/src/modules/globals/components/sections/SectionPageTitle.vue +1 -1
  163. package/src/modules/globals/controllers/utils/queryProcessor.js +21 -2
  164. package/src/modules/globals/services/globals.store.js +13 -17
  165. package/src/modules/icons/skeletons/SkeletonBlogpost.vue +1 -1
  166. package/src/modules/icons/skeletons/SkeletonEvent.vue +1 -1
  167. package/src/modules/icons/skeletons/SkeletonEventShort.vue +1 -1
  168. package/src/modules/icons/skeletons/SkeletonOrganization.vue +1 -1
  169. package/src/modules/products/components/sections/FilterProducts.vue +2 -1
  170. package/src/modules/gallery/components/sections/GalleryWithCategories.vue +0 -176
@@ -2,7 +2,7 @@ import { openBlock as u, createElementBlock as a, Fragment as o, createVNode as
2
2
  import "../../../../components/Loader/Loader.vue.js";
3
3
  import "../../../../components/Button/Button.vue.js";
4
4
  import i from "../../../../components/Field/Field.vue2.js";
5
- import r from "../../../../components/Select/Select.vue.js";
5
+ import r from "../../../../components/Select/Select.vue2.js";
6
6
  const w = {
7
7
  __name: "EditProductInfo",
8
8
  props: {
@@ -1 +1 @@
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"),q=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const x={class:"pd-medium bg-white-transp-50 radius-big"},F={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small t-transp"},null,-1),B={class:"cursor-pointer mn-r-auto t-medium p-big"},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();let _={status:"published"};[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 k=h,w=()=>{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}=q.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",F,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}),E,e.createVNode(f.default,{class:"radius-small o-hidden mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",B,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:w,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"),m=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),p=require("../../../../components/Checkbox/Checkbox.vue.cjs"),w=require("vue-i18n"),f=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const _={class:"pd-medium bg-white-transp-50 radius-big"},q={class:"cursor-pointer mn-r-auto t-medium p-big"},x=e.createElementVNode("hr",{class:"mn-b-small t-transp"},null,-1),F={class:"cursor-pointer mn-r-auto t-medium p-big"},E={__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"],setup(b,{emit:g}){const n=f.useRoute(),y=f.useRouter();let h={status:"published"};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),y.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(await u.actions.fetchCategories(h),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 v=g,k=()=>{v("resetFilters")},d={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=>{d.messages[r.locale].categories.push(r.text)})});const{t:c}=w.useI18n(d);return(t,r)=>(e.openBlock(),e.createElementBlock("div",_,[e.createVNode(m.default,{class:"radius-small o-hidden 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(p.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}),x,e.createVNode(m.default,{class:"radius-small o-hidden 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(b.prices,(l,i)=>(e.openBlock(),e.createBlock(p.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=E;
@@ -1,12 +1,12 @@
1
- import { withAsyncContext as P, ref as T, watch as V, onMounted as $, openBlock as a, createElementBlock as p, createVNode as h, withCtx as n, createElementVNode as c, toDisplayString as d, unref as f, Fragment as _, renderList as v, createBlock as w } from "vue";
2
- import F from "../../../../components/Spoiler/Spoiler.vue2.js";
3
- import x from "../../../../components/Checkbox/Checkbox.vue.js";
4
- import { useI18n as B } from "vue-i18n";
5
- import { useRoute as R, useRouter as U } from "vue-router";
6
- import { actions as N, state as k } from "../../store/categories.js";
1
+ import { ref as C, watch as A, onMounted as P, openBlock as a, createElementBlock as p, createVNode as g, withCtx as n, createElementVNode as c, toDisplayString as d, unref as f, Fragment as y, renderList as h, createBlock as v } from "vue";
2
+ import _ from "../../../../components/Spoiler/Spoiler.vue2.js";
3
+ import w from "../../../../components/Checkbox/Checkbox.vue.js";
4
+ import { useI18n as T } from "vue-i18n";
5
+ import { useRoute as V, useRouter as $ } from "vue-router";
6
+ import { actions as B, state as F } from "../../store/categories.js";
7
7
  import { state as l } from "../../../marketplace/store/marketplace.js";
8
8
  import "./FilterProducts.vue2.js";
9
- const D = { class: "pd-medium bg-white-transp-50 radius-big" }, I = { class: "cursor-pointer mn-r-auto t-medium p-big" }, L = /* @__PURE__ */ c("hr", { class: "mn-b-small t-transp" }, null, -1), M = { class: "cursor-pointer mn-r-auto t-medium p-big" }, X = {
9
+ const R = { class: "pd-medium bg-white-transp-50 radius-big" }, U = { class: "cursor-pointer mn-r-auto t-medium p-big" }, N = /* @__PURE__ */ c("hr", { class: "mn-b-small t-transp" }, null, -1), D = { class: "cursor-pointer mn-r-auto t-medium p-big" }, J = {
10
10
  __name: "FilterProducts",
11
11
  props: {
12
12
  selectedFilters: Object,
@@ -29,18 +29,17 @@ const D = { class: "pd-medium bg-white-transp-50 radius-big" }, I = { class: "cu
29
29
  }
30
30
  },
31
31
  emits: ["updateFilters", "resetFilters"],
32
- async setup(j, { emit: C }) {
33
- let b, g;
34
- const u = R(), E = U();
35
- let O = {
32
+ setup(x, { emit: k }) {
33
+ const u = V(), j = $();
34
+ let E = {
36
35
  status: "published"
37
36
  };
38
- [b, g] = P(() => N.fetchCategories(O)), await b, g(), T({
37
+ C({
39
38
  categories: [],
40
39
  prices: [],
41
40
  delivery: [],
42
41
  extra: []
43
- }), V(() => l.filter, (e, t) => {
42
+ }), A(() => l.filter, (e, t) => {
44
43
  const r = { ...u.query };
45
44
  Object.keys(t).forEach((s) => {
46
45
  r[s] && delete r[s];
@@ -48,9 +47,9 @@ const D = { class: "pd-medium bg-white-transp-50 radius-big" }, I = { class: "cu
48
47
  const i = Object.fromEntries(
49
48
  Object.entries(e).filter(([s, o]) => Array.isArray(o) && o.length > 0).map(([s, o]) => [s, o.join(",")])
50
49
  );
51
- Object.assign(r, i), E.push({ query: r });
52
- }, { deep: !0 }), $(async () => {
53
- if (u.query) {
50
+ Object.assign(r, i), j.push({ query: r });
51
+ }, { deep: !0 }), P(async () => {
52
+ if (await B.fetchCategories(E), u.query) {
54
53
  const e = u.query, t = {
55
54
  categories: e.categories ? e.categories.split(",") : [],
56
55
  prices: e.prices ? e.prices.split(",") : [],
@@ -60,9 +59,9 @@ const D = { class: "pd-medium bg-white-transp-50 radius-big" }, I = { class: "cu
60
59
  l.filter = t;
61
60
  }
62
61
  });
63
- const q = C, A = () => {
64
- q("resetFilters");
65
- }, y = {
62
+ const O = k, q = () => {
63
+ O("resetFilters");
64
+ }, b = {
66
65
  locale: "en",
67
66
  messages: {
68
67
  en: {
@@ -95,22 +94,22 @@ const D = { class: "pd-medium bg-white-transp-50 radius-big" }, I = { class: "cu
95
94
  }
96
95
  }
97
96
  };
98
- k.all.forEach((e) => {
97
+ F.all.forEach((e) => {
99
98
  e.localization.forEach((t) => {
100
- y.messages[t.locale].categories.push(t.text);
99
+ b.messages[t.locale].categories.push(t.text);
101
100
  });
102
101
  });
103
- const { t: m } = B(y);
104
- return (e, t) => (a(), p("div", D, [
105
- h(F, {
102
+ const { t: m } = T(b);
103
+ return (e, t) => (a(), p("div", R, [
104
+ g(_, {
106
105
  class: "radius-small o-hidden mn-b-small",
107
106
  status: !0
108
107
  }, {
109
108
  header: n(() => [
110
- c("p", I, d(f(m)("categoriesTitle")), 1)
109
+ c("p", U, d(f(m)("categoriesTitle")), 1)
111
110
  ]),
112
111
  content: n(() => [
113
- (a(!0), p(_, null, v(k.all, (r, i) => (a(), w(x, {
112
+ (a(!0), p(y, null, h(F.all, (r, i) => (a(), v(w, {
114
113
  key: i,
115
114
  label: r.name,
116
115
  value: r.url,
@@ -121,16 +120,16 @@ const D = { class: "pd-medium bg-white-transp-50 radius-big" }, I = { class: "cu
121
120
  ]),
122
121
  _: 1
123
122
  }),
124
- L,
125
- h(F, {
123
+ N,
124
+ g(_, {
126
125
  class: "radius-small o-hidden mn-b-small",
127
126
  status: !1
128
127
  }, {
129
128
  header: n(() => [
130
- c("p", M, d(f(m)("filters.price.title")), 1)
129
+ c("p", D, d(f(m)("filters.price.title")), 1)
131
130
  ]),
132
131
  content: n(() => [
133
- (a(!0), p(_, null, v(j.prices, (r, i) => (a(), w(x, {
132
+ (a(!0), p(y, null, h(x.prices, (r, i) => (a(), v(w, {
134
133
  key: i,
135
134
  label: r.label,
136
135
  value: r.value,
@@ -142,12 +141,12 @@ const D = { class: "pd-medium bg-white-transp-50 radius-big" }, I = { class: "cu
142
141
  _: 1
143
142
  }),
144
143
  c("button", {
145
- onClick: A,
144
+ onClick: q,
146
145
  class: "bg-main w-100 button"
147
146
  }, d(f(m)("filters.reset")), 1)
148
147
  ]));
149
148
  }
150
149
  };
151
150
  export {
152
- X as default
151
+ J as default
153
152
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/Popup/Popup.vue.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),m=require("../../../../components/Select/Select.vue.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(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){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("div",{onClick:o[1]||(o[1]=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[0]||(o[0]=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:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};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.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(i){const t=i,r=e.reactive({user:t.user,type:t.type,reason:t.reason,target:t.target,status:t.status});function l(){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("div",{onClick:o[1]||(o[1]=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[0]||(o[0]=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:l,callback:a,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])]))}};exports.default=h;
@@ -1,7 +1,7 @@
1
1
  import { reactive as d, ref as f, openBlock as b, createElementBlock as g, renderSlot as h, createVNode as s, withCtx as l, createTextVNode as y, createElementVNode as a } from "vue";
2
- import _ from "../../../../components/Popup/Popup.vue.js";
2
+ import _ from "../../../../components/Popup/Popup.vue2.js";
3
3
  import v from "../../../../components/Button/Button.vue2.js";
4
- import w from "../../../../components/Select/Select.vue.js";
4
+ import w from "../../../../components/Select/Select.vue2.js";
5
5
  import { actions as S } from "../../store/reports.js";
6
6
  const k = /* @__PURE__ */ a("h3", { class: "mn-b-small" }, " Report Content ", -1), P = /* @__PURE__ */ a("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), R = /* @__PURE__ */ a("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), O = {
7
7
  __name: "FormReport",
@@ -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/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const h=require("../../../../components/Dropdown/Dropdown.vue2.cjs"),g=require("../../../../components/Completion/Completion.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"),B=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=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"),v=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const x={key:0,class:"for-transition w-100"},y={key:0,class:"flex-center flex pd-medium radius-big bg-light 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-light"},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"},$={key:4,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"},O={key:6,class:"mn-t-small mn-b-thin"},L=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",{class:"t-red"}," Logout ",-1),T={__name:"Profile",setup(H){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)=>{v.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",x,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",y," 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(g.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0,text_cta:"Fill Profile",text:"Profile completed at",class:"mn-b-medium"},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(h.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(B.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})):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&&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:"Anonymous"),1),t.state.current.username?(e.openBlock(),e.createElementBlock("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1)):e.createCommentVNode("",!0),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Bio 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:5,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",O," 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-light"},{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(V.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),L]),_: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-light"},{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-light"},{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,{class:"cursor-pointer",onClick:r[8]||(r[8]=s=>b())},{default:e.withCtx(()=>[G]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=T;
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/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const h=require("../../../../components/Dropdown/Dropdown.vue.cjs"),g=require("../../../../components/Completion/Completion.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"),B=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../organizations/components/blocks/Socials.vue.cjs"),V=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"),v=require("../../../organizations/store/memberships.cjs");require("./Profile.vue2.cjs");const x={key:0,class:"for-transition w-100"},y={key:0,class:"flex-center flex pd-medium radius-big bg-light 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-light"},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"},$={key:4,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"},O={key:6,class:"mn-t-small mn-b-thin"},L=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",{class:"t-red"}," Logout ",-1),T={__name:"Profile",setup(H){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)=>{v.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",x,[t.state.current.status==="removed"?(e.openBlock(),e.createElementBlock("div",y," 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(g.default,{key:0,user:o.state.user._id,target:t.state.current,cta:!0,text_cta:"Fill Profile",text:"Profile completed at",class:"mn-b-medium"},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(h.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(B.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})):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&&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:"Anonymous"),1),t.state.current.username?(e.openBlock(),e.createElementBlock("p",$," @"+e.toDisplayString(t.state.current.username?t.state.current.username:"Not specified"),1)):e.createCommentVNode("",!0),e.createElementVNode("p",D,e.toDisplayString(t.state.current.profile.description?t.state.current.profile.description:"Bio 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:5,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",O," 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-light"},{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(V.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),L]),_: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-light"},{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-light"},{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,{class:"cursor-pointer",onClick:r[8]||(r[8]=s=>b())},{default:e.withCtx(()=>[G]),_:1})]),_:1})):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)}};exports.default=T;
@@ -2,9 +2,9 @@ import { ref as U, onMounted as C, openBlock as i, createElementBlock as c, unre
2
2
  import "../../../../components/Field/Field.vue.js";
3
3
  import "../../../../components/Loader/Loader.vue.js";
4
4
  import "../../../../components/Button/Button.vue.js";
5
- import B from "../../../../components/Dropdown/Dropdown.vue2.js";
5
+ import B from "../../../../components/Dropdown/Dropdown.vue.js";
6
6
  import M from "../../../../components/Completion/Completion.vue.js";
7
- import k from "../../../mobile/components/Menu/Menu.vue2.js";
7
+ import k from "../../../mobile/components/Menu/Menu.vue.js";
8
8
  import f from "../../../mobile/components/Menu/MenuItem.vue.js";
9
9
  import w from "../../../organizations/components/elements/ButtonToggleMembership.vue.js";
10
10
  import R 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"),t=require("../../store/wallet.store.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/lib/esm/utils/wait_for_transaction_receipt.cjs");require("../../../../../../../node_modules/web3-eth/lib/esm/utils/try_send_transaction.cjs");require("../../../../../../../node_modules/web3-eth/lib/esm/utils/send_tx_helper.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/lib/esm/web3_eip6963.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.vue2.cjs");require("../../../../../components/Loader/Loader.vue.cjs");require("../../../../../components/Button/Button.vue.cjs");require("../../../../../components/Select/Select.vue2.cjs");require("../../../../reports/store/reports.cjs");require("../../../../../components/Tooltip/Tooltip.vue2.cjs");require("../../../../../components/Dropdown/Dropdown.vue.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"},i=e.createElementVNode("h1",{class:"mn-b-medium"},"Your Wallet",-1),c=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-light"},[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),q={class:"w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light"},h={key:0,class:"mn-b-small"},_={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"},B={class:"cols-3 gap-thin"},y={class:"radius-medium bg-light"},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,[i,c,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",q,[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",_,[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",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,r=>(e.openBlock(),e.createElementBlock("div",y,[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.store.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/lib/esm/utils/wait_for_transaction_receipt.cjs");require("../../../../../../../node_modules/web3-eth/lib/esm/utils/try_send_transaction.cjs");require("../../../../../../../node_modules/web3-eth/lib/esm/utils/send_tx_helper.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/lib/esm/web3_eip6963.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/Loader/Loader.vue.cjs");require("../../../../../components/Button/Button.vue.cjs");require("../../../../../components/Select/Select.vue.cjs");require("../../../../reports/store/reports.cjs");require("../../../../../components/Tooltip/Tooltip.vue.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"},i=e.createElementVNode("h1",{class:"mn-b-medium"},"Your Wallet",-1),c=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-light"},[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),q={class:"w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light"},h={key:0,class:"mn-b-small"},_={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"},B={class:"cols-3 gap-thin"},y={class:"radius-medium bg-light"},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,[i,c,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",q,[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",_,[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",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t.state).rewards,r=>(e.openBlock(),e.createElementBlock("div",y,[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;
@@ -49,13 +49,13 @@ import "../../../../../../../node_modules/web3-rpc-methods/lib/esm/net_rpc_metho
49
49
  import "../../../../../../../node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.js";
50
50
  import "vue-router";
51
51
  import "vue-i18n";
52
- import "../../../../../components/Popup/Popup.vue2.js";
52
+ import "../../../../../components/Popup/Popup.vue.js";
53
53
  import "../../../../../components/Loader/Loader.vue.js";
54
54
  import "../../../../../components/Button/Button.vue.js";
55
- import "../../../../../components/Select/Select.vue2.js";
55
+ import "../../../../../components/Select/Select.vue.js";
56
56
  import "../../../../reports/store/reports.js";
57
- import "../../../../../components/Tooltip/Tooltip.vue2.js";
58
- import "../../../../../components/Dropdown/Dropdown.vue.js";
57
+ import "../../../../../components/Tooltip/Tooltip.vue.js";
58
+ import "../../../../../components/Dropdown/Dropdown.vue2.js";
59
59
  import "../../../../auth/store/auth.js";
60
60
  import "../../../../organizations/store/memberships.js";
61
61
  import "../../../../community/store/reactions.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./main-VcxO-jAt.js");exports.Address=e.Address;exports.Breadcrumbs=e._sfc_main$10;exports.Button=e._sfc_main;exports.Checkbox=e._sfc_main$1;exports.Chips=e.Chips;exports.Countdown=e._sfc_main$11;exports.DatePicker=e._sfc_main$12;exports.Dropdown=e.Dropdown;exports.EmptyState=e._sfc_main$13;exports.Error=e._sfc_main$2;exports.Feed=e._sfc_main$14;exports.Field=e.Field;exports.FieldBig=e._sfc_main$15;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.Marquee=e._sfc_main$19;exports.Popup=e._sfc_main$3;exports.Radio=e._sfc_main$4;exports.Select=e.Select;exports.SelectMulti=e.SelectMulti;exports.Shader=e.Shader;exports.Sidebar=e._sfc_main$16;exports.Slider=e._sfc_main$17;exports.Spoiler=e._sfc_main$5;exports.Status=e._sfc_main$18;exports.Tab=e._sfc_main$6;exports.Text=e._sfc_main$7;exports.Tooltip=e.Tooltip;exports.Upload=e.Upload;exports.UploadImage=e._sfc_main$8;exports.UploadImageMultiple=e._sfc_main$9;exports.default=e.main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./main-DL3vRQCi.js");exports.Address=e.Address;exports.Breadcrumbs=e._sfc_main$10;exports.Button=e._sfc_main;exports.Checkbox=e._sfc_main$1;exports.Chips=e.Chips;exports.Countdown=e._sfc_main$11;exports.DatePicker=e._sfc_main$12;exports.Dropdown=e.Dropdown;exports.EmptyState=e._sfc_main$13;exports.Error=e._sfc_main$2;exports.Feed=e._sfc_main$14;exports.Field=e.Field;exports.FieldBig=e._sfc_main$15;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.Marquee=e._sfc_main$19;exports.Popup=e._sfc_main$3;exports.Radio=e._sfc_main$4;exports.Select=e.Select;exports.SelectMulti=e.SelectMulti;exports.Shader=e.Shader;exports.Sidebar=e._sfc_main$16;exports.Slider=e._sfc_main$17;exports.Spoiler=e._sfc_main$5;exports.Status=e._sfc_main$18;exports.Tab=e._sfc_main$6;exports.Text=e._sfc_main$7;exports.Tooltip=e.Tooltip;exports.Upload=e.Upload;exports.UploadImage=e._sfc_main$8;exports.UploadImageMultiple=e._sfc_main$9;exports.default=e.main;
@@ -1,4 +1,4 @@
1
- import { A as e, l as o, _ as d, a as r, C as t, n as i, o as l, D as p, p as u, b as S, q as n, F as c, r as M, c as g, s as m, t as F, L as b, u as h, M as T, z as f, d as k, e as x, S as C, f as U, v as w, w as B, x as D, g as L, y as P, h as q, i as y, T as A, U as E, j as I, k as j, m as v } from "./main-8APITHuW.mjs";
1
+ import { A as e, l as o, _ as d, a as r, C as t, n as i, o as l, D as p, p as u, b as S, q as n, F as c, r as M, c as g, s as m, t as F, L as b, u as h, M as T, z as f, d as k, e as x, S as C, f as U, v as w, w as B, x as D, g as L, y as P, h as q, i as y, T as A, U as E, j as I, k as j, m as v } from "./main-Ds3Z5x5d.mjs";
2
2
  export {
3
3
  e as Address,
4
4
  o as Breadcrumbs,
@@ -0,0 +1,178 @@
1
+ import require$$0 from "mongoose";
2
+ const ObjectId = require$$0.Types.ObjectId;
3
+ function getBasicOptions(query) {
4
+ const { _id, url, status, type, owner, creator } = query;
5
+ const conditions = [];
6
+ if (_id) {
7
+ conditions.push({ _id: new ObjectId(_id) });
8
+ }
9
+ if (url) {
10
+ conditions.push({ url });
11
+ }
12
+ if (status) {
13
+ conditions.push({ status });
14
+ }
15
+ if (type) {
16
+ conditions.push({ type });
17
+ }
18
+ if (owner) {
19
+ conditions.push({ "owner.target": new ObjectId(owner) });
20
+ }
21
+ if (creator) {
22
+ conditions.push({ "creator.target": new ObjectId(creator) });
23
+ }
24
+ if (conditions.length > 0) {
25
+ return [{ $match: { $and: conditions } }];
26
+ } else {
27
+ return [];
28
+ }
29
+ }
30
+ function getFilterDate(start, end) {
31
+ let filter = {};
32
+ if (start !== null) {
33
+ filter.$gte = new Date(start);
34
+ }
35
+ if (end !== null) {
36
+ filter.$lte = new Date(end);
37
+ }
38
+ if (start === "null" && end === "null") {
39
+ return [];
40
+ } else {
41
+ return [{ $match: { createdAt: filter } }];
42
+ }
43
+ }
44
+ function getTagsOptions(tags) {
45
+ if (tags) {
46
+ const tagsArray = Array.isArray(tags) ? tags : [tags];
47
+ return [{ $match: { tags: { $in: tagsArray } } }];
48
+ } else {
49
+ return [];
50
+ }
51
+ }
52
+ function getSortingOptions(param = "createdAt", order = "desc") {
53
+ let sort = {
54
+ [param]: order === "desc" ? -1 : 1,
55
+ "_id": 1
56
+ };
57
+ return [{ $sort: sort }];
58
+ }
59
+ function getPaginationOptions(skip, limit) {
60
+ let pagination = {
61
+ skip: parseInt(skip) || 0,
62
+ limit: parseInt(limit) || 20
63
+ };
64
+ return [{ $skip: pagination.skip }, { $limit: pagination.limit }];
65
+ }
66
+ function getCreatorUserLookupStage() {
67
+ return {
68
+ $lookup: {
69
+ from: "users",
70
+ localField: "creator.target",
71
+ foreignField: "_id",
72
+ as: "creatorUser"
73
+ }
74
+ };
75
+ }
76
+ function getCreatorOrganizationLookupStage() {
77
+ return {
78
+ $lookup: {
79
+ from: "organizations",
80
+ localField: "creator.target",
81
+ foreignField: "_id",
82
+ as: "creatorOrganization"
83
+ }
84
+ };
85
+ }
86
+ function getCreatorCustomerLookupStage() {
87
+ return {
88
+ $lookup: {
89
+ from: "customers",
90
+ localField: "creator.target",
91
+ foreignField: "_id",
92
+ as: "creatorCustomer"
93
+ }
94
+ };
95
+ }
96
+ function getOwnerUserLookupStage() {
97
+ return {
98
+ $lookup: {
99
+ from: "users",
100
+ localField: "owner.target",
101
+ foreignField: "_id",
102
+ as: "ownerUser"
103
+ }
104
+ };
105
+ }
106
+ function getOwnerOrganizationLookupStage() {
107
+ return {
108
+ $lookup: {
109
+ from: "organizations",
110
+ localField: "owner.target",
111
+ foreignField: "_id",
112
+ as: "ownerOrganization"
113
+ }
114
+ };
115
+ }
116
+ function getAddFieldsCreatorOwnerStage() {
117
+ return {
118
+ $addFields: {
119
+ "creator.target": {
120
+ $switch: {
121
+ branches: [
122
+ {
123
+ case: { $eq: [{ $toLower: "$creator.type" }, "user"] },
124
+ then: { $arrayElemAt: ["$creatorUser", 0] }
125
+ },
126
+ {
127
+ case: { $eq: [{ $toLower: "$creator.type" }, "organization"] },
128
+ then: { $arrayElemAt: ["$creatorOrganization", 0] }
129
+ },
130
+ {
131
+ case: { $eq: [{ $toLower: "$creator.type" }, "customer"] },
132
+ then: { $arrayElemAt: ["$creatorCustomer", 0] }
133
+ }
134
+ ],
135
+ default: "Unknown type"
136
+ // или любое другое значение по умолчанию, которое вы хотите использовать
137
+ }
138
+ },
139
+ "owner.target": {
140
+ $cond: [
141
+ { $eq: ["$owner.type", "user"] },
142
+ { $arrayElemAt: ["$ownerUser", 0] },
143
+ { $arrayElemAt: ["$ownerOrganization", 0] }
144
+ ]
145
+ }
146
+ }
147
+ };
148
+ }
149
+ function removeTempPropeties() {
150
+ return {
151
+ $project: {
152
+ creatorOrganization: 0,
153
+ creatorUser: 0,
154
+ ownerOrganization: 0,
155
+ ownerUser: 0,
156
+ creatorCustomer: 0,
157
+ ownerCustomer: 0
158
+ }
159
+ };
160
+ }
161
+ var queryProcessor = {
162
+ getBasicOptions,
163
+ getSortingOptions,
164
+ getPaginationOptions,
165
+ getTagsOptions,
166
+ getFilterDate,
167
+ // Creator and Owner
168
+ getCreatorUserLookupStage,
169
+ getCreatorOrganizationLookupStage,
170
+ getCreatorCustomerLookupStage,
171
+ getOwnerUserLookupStage,
172
+ getOwnerOrganizationLookupStage,
173
+ getAddFieldsCreatorOwnerStage,
174
+ removeTempPropeties
175
+ };
176
+ export {
177
+ queryProcessor as q
178
+ };