@ozdao/prometheus-framework 0.2.47 → 0.2.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (492) hide show
  1. package/dist/auth.server.js +27 -25
  2. package/dist/auth.server.mjs +27 -25
  3. package/dist/community.server.js +1 -1
  4. package/dist/community.server.mjs +1 -1
  5. package/dist/events.server.js +1 -1
  6. package/dist/events.server.mjs +1 -1
  7. package/dist/files.server.js +1 -1
  8. package/dist/files.server.mjs +1 -1
  9. package/dist/gallery.server.js +1 -1
  10. package/dist/gallery.server.mjs +1 -1
  11. package/dist/index-3981e903.mjs +217 -0
  12. package/dist/index-4eecfdb9.js +216 -0
  13. package/dist/main-203b36b6.mjs +13628 -0
  14. package/dist/main-610fd21a.mjs +13628 -0
  15. package/dist/main-669fac33.js +91 -0
  16. package/dist/main-_b1_i8mt.mjs +13606 -0
  17. package/dist/main-a7ae4ce5.js +91 -0
  18. package/dist/main-uiQFxEks.js +91 -0
  19. package/dist/main.css +1 -1
  20. package/dist/middlewares.server.js +1 -1
  21. package/dist/middlewares.server.mjs +1 -1
  22. package/dist/node_modules/@noble/hashes/esm/_assert.cjs +1 -1
  23. package/dist/node_modules/@noble/hashes/esm/_assert.js +6 -6
  24. package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
  25. package/dist/node_modules/@noble/hashes/esm/_u64.js +8 -8
  26. package/dist/node_modules/@noble/hashes/esm/sha512.cjs +1 -1
  27. package/dist/node_modules/@noble/hashes/esm/sha512.js +2 -2
  28. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.js +1 -1
  29. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.cjs +1 -1
  30. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.js +2 -2
  31. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.cjs +1 -1
  32. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.js +3 -3
  33. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework.es.cjs +1 -1
  34. package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework.es.js +6 -6
  35. package/dist/node_modules/ethereum-cryptography/esm/utils.cjs +1 -1
  36. package/dist/node_modules/ethereum-cryptography/esm/utils.js +4 -3
  37. package/dist/node_modules/vue-select/dist/vue-select.es.cjs +1 -3
  38. package/dist/node_modules/vue-select/dist/vue-select.es.js +49 -645
  39. package/dist/node_modules/vue3-carousel/dist/carousel.css.cjs +1 -1
  40. package/dist/node_modules/vue3-carousel/dist/carousel.css.js +4 -1
  41. package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -1
  42. package/dist/node_modules/web3/lib/esm/accounts.js +36 -36
  43. package/dist/node_modules/web3-core/lib/esm/web3_batch_request.cjs +1 -1
  44. package/dist/node_modules/web3-core/lib/esm/web3_batch_request.js +27 -27
  45. package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -1
  46. package/dist/node_modules/web3-core/lib/esm/web3_context.js +24 -24
  47. package/dist/node_modules/web3-core/lib/esm/web3_promi_event.cjs +1 -1
  48. package/dist/node_modules/web3-core/lib/esm/web3_promi_event.js +33 -33
  49. package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -1
  50. package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +10 -10
  51. package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.cjs +1 -1
  52. package/dist/node_modules/web3-core/lib/esm/web3_subscription_manager.js +1 -1
  53. package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.cjs +1 -1
  54. package/dist/node_modules/web3-core/lib/esm/web3_subscriptions.js +13 -13
  55. package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -1
  56. package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +110 -110
  57. package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -1
  58. package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +26 -26
  59. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.cjs +1 -1
  60. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js +14 -14
  61. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.cjs +1 -1
  62. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js +36 -36
  63. package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.cjs +1 -1
  64. package/dist/node_modules/web3-eth/lib/esm/utils/prepare_transaction_for_signing.js +20 -20
  65. package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.cjs +1 -1
  66. package/dist/node_modules/web3-eth/lib/esm/utils/reject_if_block_timeout.js +23 -23
  67. package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -1
  68. package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +17 -17
  69. package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs +1 -1
  70. package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.js +11 -11
  71. package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.cjs +1 -1
  72. package/dist/node_modules/web3-eth/lib/esm/utils/try_send_transaction.js +24 -24
  73. package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.cjs +1 -1
  74. package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js +25 -25
  75. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.cjs +1 -1
  76. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.js +19 -19
  77. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -1
  78. package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +39 -39
  79. package/dist/node_modules/web3-eth/lib/esm/web3_eth.cjs +1 -1
  80. package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +7 -7
  81. package/dist/node_modules/web3-eth-accounts/lib/esm/account.cjs +2 -2
  82. package/dist/node_modules/web3-eth-accounts/lib/esm/account.js +28 -28
  83. package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.cjs +1 -1
  84. package/dist/node_modules/web3-eth-accounts/lib/esm/wallet.js +3 -3
  85. package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +1 -1
  86. package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +8 -8
  87. package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
  88. package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +15 -15
  89. package/dist/node_modules/web3-eth-ens/lib/esm/registry.cjs +1 -1
  90. package/dist/node_modules/web3-eth-ens/lib/esm/registry.js +16 -16
  91. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -1
  92. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +26 -26
  93. package/dist/node_modules/web3-eth-iban/lib/esm/iban.cjs +1 -1
  94. package/dist/node_modules/web3-eth-iban/lib/esm/iban.js +2 -2
  95. package/dist/node_modules/web3-eth-personal/lib/esm/personal.cjs +1 -1
  96. package/dist/node_modules/web3-eth-personal/lib/esm/personal.js +19 -19
  97. package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.cjs +1 -1
  98. package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js +35 -35
  99. package/dist/node_modules/web3-net/lib/esm/net.cjs +1 -1
  100. package/dist/node_modules/web3-net/lib/esm/net.js +25 -25
  101. package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.cjs +1 -1
  102. package/dist/node_modules/web3-net/lib/esm/rpc_method_wrappers.js +25 -25
  103. package/dist/node_modules/web3-providers-http/lib/esm/index.cjs +1 -1
  104. package/dist/node_modules/web3-providers-http/lib/esm/index.js +33 -33
  105. package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.cjs +1 -1
  106. package/dist/node_modules/web3-rpc-methods/lib/esm/eth_rpc_methods.js +5 -5
  107. package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.cjs +1 -1
  108. package/dist/node_modules/web3-rpc-methods/lib/esm/net_rpc_methods.js +19 -19
  109. package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.cjs +1 -1
  110. package/dist/node_modules/web3-rpc-methods/lib/esm/personal_rpc_methods.js +27 -27
  111. package/dist/node_modules/web3-types/lib/esm/web3_base_provider.cjs +1 -1
  112. package/dist/node_modules/web3-types/lib/esm/web3_base_provider.js +25 -25
  113. package/dist/node_modules/web3-utils/lib/esm/event_emitter.cjs +1 -1
  114. package/dist/node_modules/web3-utils/lib/esm/event_emitter.js +15 -15
  115. package/dist/node_modules/web3-utils/lib/esm/promise_helpers.cjs +1 -1
  116. package/dist/node_modules/web3-utils/lib/esm/promise_helpers.js +19 -19
  117. package/dist/node_modules/web3-utils/lib/esm/socket_provider.cjs +1 -1
  118. package/dist/node_modules/web3-utils/lib/esm/socket_provider.js +17 -17
  119. package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.cjs +1 -1
  120. package/dist/node_modules/web3-utils/lib/esm/web3_deferred_promise.js +5 -5
  121. package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.cjs +1 -1
  122. package/dist/node_modules/web3-utils/lib/esm/web3_eip1193_provider.js +5 -5
  123. package/dist/organizations.server.js +13 -27
  124. package/dist/organizations.server.mjs +13 -27
  125. package/dist/products.server.js +95 -15
  126. package/dist/products.server.mjs +95 -15
  127. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/components/Address/Address.vue.js +4 -1
  129. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue.js +4 -1
  131. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/components/Button/Button.vue.js +4 -1
  133. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  134. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +4 -1
  135. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -1
  136. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +4 -1
  137. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  138. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +4 -1
  139. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs +1 -1
  140. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js +4 -1
  141. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/components/Field/Field.vue.js +4 -1
  143. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  145. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue2.cjs +1 -1
  146. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue2.js +4 -1
  147. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -1
  149. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -1
  150. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +4 -1
  151. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue2.cjs +1 -1
  152. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue2.js +4 -1
  153. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue.js +4 -1
  155. package/dist/prometheus-framework/src/components/FieldTags/vue-tags-input.scss.cjs +1 -1
  156. package/dist/prometheus-framework/src/components/FieldTags/vue-tags-input.scss.js +4 -1
  157. package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +4 -1
  159. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +4 -1
  161. package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue2.cjs +1 -1
  162. package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue2.js +4 -1
  163. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  164. package/dist/prometheus-framework/src/components/Map/Map.vue.js +4 -1
  165. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  166. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -70
  167. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  168. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -1
  169. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  170. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -95
  171. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  172. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
  173. package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue.cjs +1 -1
  174. package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue.js +6 -6
  175. package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue2.cjs +1 -1
  176. package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue2.js +4 -1
  177. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  178. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +4 -1
  179. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  180. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +4 -1
  181. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  182. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +4 -1
  183. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  184. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +1 -1
  185. package/dist/prometheus-framework/src/components/Upload/Upload.vue2.cjs +1 -1
  186. package/dist/prometheus-framework/src/components/Upload/Upload.vue2.js +4 -1
  187. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  188. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +1 -1
  189. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  190. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  191. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue2.cjs +1 -1
  192. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue2.js +4 -1
  193. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  194. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +42 -30
  195. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue2.cjs +1 -1
  196. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue2.js +4 -1
  197. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue2.cjs +1 -1
  198. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue2.js +4 -1
  199. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue2.cjs +1 -1
  200. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue2.js +4 -1
  201. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue2.cjs +1 -1
  202. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue2.js +4 -1
  203. package/dist/prometheus-framework/src/modules/auth/components/sections/SliderFeatures.vue2.cjs +1 -1
  204. package/dist/prometheus-framework/src/modules/auth/components/sections/SliderFeatures.vue2.js +4 -1
  205. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  206. package/dist/prometheus-framework/src/modules/auth/store/auth.js +47 -46
  207. package/dist/prometheus-framework/src/modules/auth/store/invites.cjs +1 -1
  208. package/dist/prometheus-framework/src/modules/auth/store/invites.js +5 -5
  209. package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
  210. package/dist/prometheus-framework/src/modules/auth/store/twofa.js +1 -1
  211. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue2.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue2.js +4 -1
  213. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  214. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  215. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  216. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  217. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.cjs +1 -1
  218. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.js +4 -1
  219. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  220. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  221. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  222. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +1 -1
  223. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue2.cjs +1 -1
  224. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue2.js +4 -1
  225. package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue2.cjs +1 -1
  226. package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue2.js +4 -1
  227. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  228. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
  229. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
  230. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
  231. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue2.cjs +1 -1
  232. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue2.js +4 -1
  233. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  234. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +1 -1
  235. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  236. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -65
  237. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  238. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  239. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  240. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  241. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue2.cjs +1 -1
  242. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue2.js +4 -1
  243. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  244. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  245. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  246. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +4 -4
  247. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue2.cjs +1 -1
  248. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue2.js +4 -1
  249. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  250. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  251. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.cjs +1 -1
  252. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.js +4 -1
  253. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue2.cjs +1 -1
  254. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue2.js +4 -1
  255. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.cjs +1 -1
  256. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.js +4 -1
  257. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  258. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
  259. package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
  260. package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
  261. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  262. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  263. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue2.cjs +1 -1
  264. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue2.js +4 -1
  265. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  266. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  267. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue2.cjs +1 -1
  268. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue2.js +4 -1
  269. package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
  270. package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
  271. package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
  272. package/dist/prometheus-framework/src/modules/globals/store/globals.js +22 -21
  273. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue2.cjs +1 -1
  274. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue2.js +4 -1
  275. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  276. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  277. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue2.cjs +1 -1
  278. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue2.js +4 -1
  279. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  280. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +1 -1
  281. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  282. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  283. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  284. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  285. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.cjs +1 -1
  286. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.js +4 -1
  287. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue2.cjs +1 -1
  288. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue2.js +4 -1
  289. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  290. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  291. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  292. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
  293. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  294. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +17 -17
  295. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue2.cjs +1 -1
  296. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue2.js +4 -1
  297. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  298. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  299. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  300. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +50 -43
  301. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue2.cjs +1 -1
  302. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue2.js +4 -1
  303. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentSub.vue2.cjs +1 -1
  304. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentSub.vue2.js +4 -1
  305. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue2.cjs +1 -1
  306. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue2.js +4 -1
  307. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
  308. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +47 -15
  309. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue2.cjs +1 -1
  310. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue2.js +4 -1
  311. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  312. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +38 -37
  313. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  314. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +249 -61
  315. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue2.cjs +1 -1
  316. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue2.js +4 -1
  317. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  318. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +78 -45
  319. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  320. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +161 -86
  321. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue2.cjs +1 -1
  322. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue2.js +4 -1
  323. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  324. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  325. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  326. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  327. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue2.cjs +1 -1
  328. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue2.js +4 -1
  329. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  330. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  331. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  332. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +52 -54
  333. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  334. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  335. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  336. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +19 -25
  337. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue2.cjs +1 -1
  338. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue2.js +4 -1
  339. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue2.cjs +1 -1
  340. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue2.js +4 -1
  341. package/dist/prometheus-framework/src/modules/organizations/components/sections/Unit.vue.cjs +1 -1
  342. package/dist/prometheus-framework/src/modules/organizations/components/sections/Unit.vue.js +4 -1
  343. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  344. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -46
  345. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  346. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +35 -31
  347. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  348. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
  349. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  350. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +30 -28
  351. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
  352. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -1
  353. package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue2.cjs +1 -1
  354. package/dist/prometheus-framework/src/modules/payments/components/pages/Payments.vue2.js +4 -1
  355. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue2.cjs +1 -1
  356. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue2.js +4 -1
  357. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  358. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +17 -17
  359. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  360. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +50 -47
  361. package/dist/prometheus-framework/src/modules/products/components/blocks/CategoryCard.vue2.cjs +1 -1
  362. package/dist/prometheus-framework/src/modules/products/components/blocks/CategoryCard.vue2.js +4 -1
  363. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue2.cjs +1 -1
  364. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue2.js +4 -1
  365. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  366. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  367. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue2.cjs +1 -1
  368. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue2.js +4 -1
  369. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue2.cjs +1 -1
  370. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue2.js +4 -1
  371. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue2.cjs +1 -1
  372. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue2.js +4 -1
  373. package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue2.cjs +1 -1
  374. package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue2.js +4 -1
  375. package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue2.cjs +1 -1
  376. package/dist/prometheus-framework/src/modules/products/components/elements/THC.vue2.js +4 -1
  377. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  378. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  379. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue2.cjs +1 -1
  380. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue2.js +4 -1
  381. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue2.cjs +1 -1
  382. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue2.js +4 -1
  383. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  384. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +33 -28
  385. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue2.cjs +1 -1
  386. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue2.js +4 -1
  387. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  388. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +123 -113
  389. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue2.cjs +1 -1
  390. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue2.js +4 -1
  391. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue2.cjs +1 -1
  392. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue2.js +4 -1
  393. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  394. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  395. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue2.cjs +1 -1
  396. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue2.js +4 -1
  397. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue2.cjs +1 -1
  398. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue2.js +4 -1
  399. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue2.cjs +1 -1
  400. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue2.js +4 -1
  401. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  402. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
  403. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  404. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
  405. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  406. package/dist/prometheus-framework/src/modules/products/store/products.js +2 -2
  407. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  408. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  409. package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
  410. package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
  411. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue2.cjs +1 -1
  412. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue2.js +4 -1
  413. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
  414. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
  415. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  416. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  417. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue2.cjs +1 -1
  418. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue2.js +4 -1
  419. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue2.cjs +1 -1
  420. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue2.js +4 -1
  421. package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
  422. package/dist/prometheus-framework/src/modules/users/store/users.js +1 -1
  423. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  424. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  425. package/dist/prometheus-framework/src/modules/wallet/store/wallet.cjs +1 -1
  426. package/dist/prometheus-framework/src/modules/wallet/store/wallet.js +2 -2
  427. package/dist/prometheus-framework.cjs.js +1 -1
  428. package/dist/prometheus-framework.es.js +1 -1
  429. package/dist/reports.server.js +1 -1
  430. package/dist/reports.server.mjs +1 -1
  431. package/dist/style.css +1 -1
  432. package/dist/web-0410cac1.js +1 -0
  433. package/dist/web-7p76PGnO.mjs +55 -0
  434. package/dist/web-c1619455.mjs +55 -0
  435. package/dist/web-c63f0ecc.js +1 -0
  436. package/dist/web-d8173758.mjs +55 -0
  437. package/dist/web-dn8vgptQ.js +1 -0
  438. package/package.json +1 -1
  439. package/src/components/SelectMulti/SelectMulti.vue +1 -1
  440. package/src/modules/auth/components/pages/Invite.vue +17 -6
  441. package/src/modules/auth/controllers/auth.controller.js +24 -16
  442. package/src/modules/auth/controllers/invites.controller.js +17 -8
  443. package/src/modules/auth/store/auth.js +8 -1
  444. package/src/modules/auth/store/invites.js +1 -0
  445. package/src/modules/globals/store/globals.js +5 -1
  446. package/src/modules/landing/components/blocks/MapBlock.vue +37 -0
  447. package/src/modules/landing/components/pages/404.vue +3 -0
  448. package/src/modules/landing/components/pages/Governance.vue +155 -0
  449. package/src/modules/landing/components/pages/Home.vue +52 -0
  450. package/src/modules/landing/components/pages/Hotel.vue +54 -0
  451. package/src/modules/landing/components/pages/Page.vue +184 -0
  452. package/src/modules/landing/components/sections/AboutSection.vue +69 -0
  453. package/src/modules/landing/components/sections/Examples.vue +90 -0
  454. package/src/modules/landing/components/sections/FeatureSection.vue +80 -0
  455. package/src/modules/landing/components/sections/GiftSection.vue +63 -0
  456. package/src/modules/landing/components/sections/HeroSection.vue +74 -0
  457. package/src/modules/landing/components/sections/HowItWorksSection.vue +88 -0
  458. package/src/modules/landing/components/sections/HowToBuyWDR.vue +131 -0
  459. package/src/modules/landing/components/sections/InstagramSection.vue +181 -0
  460. package/src/modules/landing/components/sections/MapSection.vue +91 -0
  461. package/src/modules/landing/components/sections/SectionsSection.vue +69 -0
  462. package/src/modules/landing/components/sections/SliderFeatures.vue +131 -0
  463. package/src/modules/landing/components/sections/WhatIsWDRSection.vue +116 -0
  464. package/src/modules/landing/router/landing.js +34 -0
  465. package/src/modules/middlewares/server/verifySignUp.js +4 -0
  466. package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
  467. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +52 -44
  468. package/src/modules/organizations/components/blocks/User.vue +42 -10
  469. package/src/modules/organizations/components/pages/Department.vue +7 -6
  470. package/src/modules/organizations/components/pages/DepartmentEdit.vue +110 -134
  471. package/src/modules/organizations/components/pages/Members.vue +85 -26
  472. package/src/modules/organizations/components/pages/Organization.vue +60 -4
  473. package/src/modules/organizations/components/sections/MembersAdd.vue +27 -34
  474. package/src/modules/organizations/components/sections/Organizations.vue +0 -1
  475. package/src/modules/organizations/controllers/memberships.controller.js +6 -2
  476. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  477. package/src/modules/organizations/models/department.model.js +0 -19
  478. package/src/modules/organizations/models/membership.model.js +4 -0
  479. package/src/modules/organizations/organizations.client.js +1 -6
  480. package/src/modules/organizations/store/departments.js +48 -44
  481. package/src/modules/organizations/store/memberships.js +11 -3
  482. package/src/modules/products/components/blocks/CardPosition.vue +2 -2
  483. package/src/modules/products/components/blocks/CardProduct.vue +1 -1
  484. package/src/modules/products/components/pages/Product.vue +6 -1
  485. package/src/modules/products/components/pages/ProductEdit.vue +48 -28
  486. package/src/modules/products/controllers/products.controller.js +87 -24
  487. package/src/modules/products/models/product.model.js +16 -1
  488. package/src/modules/products/store/products.js +1 -1
  489. package/src/modules/users/components/pages/ProfileOrganizations.vue +41 -7
  490. package/src/modules/organizations/components/sections/FeedDepartments.vue +0 -64
  491. package/src/modules/organizations/components/sections/MembersList.vue +0 -85
  492. package/src/modules/organizations/store/invites.js +0 -93
@@ -1,29 +1,29 @@
1
1
  import { e as f } from "../../../events/events.js";
2
- var E = function(o, e, t, s) {
2
+ var E = globalThis && globalThis.__awaiter || function(o, e, t, s) {
3
3
  function n(i) {
4
4
  return i instanceof t ? i : new t(function(c) {
5
5
  c(i);
6
6
  });
7
7
  }
8
8
  return new (t || (t = Promise))(function(i, c) {
9
- function l(r) {
9
+ function a(r) {
10
10
  try {
11
- u(s.next(r));
12
- } catch (h) {
13
- c(h);
11
+ h(s.next(r));
12
+ } catch (l) {
13
+ c(l);
14
14
  }
15
15
  }
16
- function a(r) {
16
+ function d(r) {
17
17
  try {
18
- u(s.throw(r));
19
- } catch (h) {
20
- c(h);
18
+ h(s.throw(r));
19
+ } catch (l) {
20
+ c(l);
21
21
  }
22
22
  }
23
- function u(r) {
24
- r.done ? i(r.value) : n(r.value).then(l, a);
23
+ function h(r) {
24
+ r.done ? i(r.value) : n(r.value).then(a, d);
25
25
  }
26
- u((s = s.apply(o, e || [])).next());
26
+ h((s = s.apply(o, e || [])).next());
27
27
  });
28
28
  };
29
29
  const p = (o) => (e) => o(e.detail);
@@ -82,9 +82,9 @@ class v extends EventTarget {
82
82
  }
83
83
  }
84
84
  }
85
- let d;
86
- typeof window > "u" ? d = f.EventEmitter : d = v;
87
- class m extends d {
85
+ let u;
86
+ typeof window > "u" ? u = f.EventEmitter : u = v;
87
+ class m extends u {
88
88
  }
89
89
  export {
90
90
  m as EventEmitter
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const I=require("../../../web3-validator/lib/esm/validation/object.cjs");var f=function(t,r,e,n){function u(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function l(c){try{d(n.next(c))}catch(s){o(s)}}function m(c){try{d(n.throw(c))}catch(s){o(s)}}function d(c){c.done?i(c.value):u(c.value).then(l,m)}d((n=n.apply(t,r||[])).next())})};function h(t){return(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function a(t,r,e){return f(this,void 0,void 0,function*(){let n;const u=yield Promise.race([t instanceof Promise?t:t(),new Promise((i,o)=>{n=setTimeout(()=>e?o(e):i(void 0),r)})]);if(n&&clearTimeout(n),u instanceof Error)throw u;return u})}function v(t,r){let e;return[new Promise((u,i)=>{e=setInterval(function o(){return f(this,void 0,void 0,function*(){try{const l=yield a(t,r);I.isNullish(l)||(clearInterval(e),u(l))}catch(l){clearInterval(e),i(l)}}),o}(),r)}),e]}function p(t,r){return f(this,void 0,void 0,function*(){return v(t,r)[0]})}function T(t,r){let e;const n=new Promise((u,i)=>{e=setTimeout(()=>{i(r)},t)});return[e,n]}function y(t,r){let e;const n=new Promise((u,i)=>{e=setInterval(()=>{f(this,void 0,void 0,function*(){const o=yield t();o&&(clearInterval(e),i(o))})},r)});return[e,n]}exports.isPromise=h;exports.pollTillDefined=p;exports.pollTillDefinedAndReturnIntervalId=v;exports.rejectIfConditionAtInterval=y;exports.rejectIfTimeout=T;exports.waitWithTimeout=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");require("../../../web3-validator/lib/esm/formats.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");const I=require("../../../web3-validator/lib/esm/validation/object.cjs");var f=globalThis&&globalThis.__awaiter||function(t,o,e,n){function u(i){return i instanceof e?i:new e(function(r){r(i)})}return new(e||(e=Promise))(function(i,r){function c(l){try{s(n.next(l))}catch(d){r(d)}}function m(l){try{s(n.throw(l))}catch(d){r(d)}}function s(l){l.done?i(l.value):u(l.value).then(c,m)}s((n=n.apply(t,o||[])).next())})};function h(t){return(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function a(t,o,e){return f(this,void 0,void 0,function*(){let n;const u=yield Promise.race([t instanceof Promise?t:t(),new Promise((i,r)=>{n=setTimeout(()=>e?r(e):i(void 0),o)})]);if(n&&clearTimeout(n),u instanceof Error)throw u;return u})}function v(t,o){let e;return[new Promise((u,i)=>{e=setInterval(function r(){return f(this,void 0,void 0,function*(){try{const c=yield a(t,o);I.isNullish(c)||(clearInterval(e),u(c))}catch(c){clearInterval(e),i(c)}}),r}(),o)}),e]}function T(t,o){return f(this,void 0,void 0,function*(){return v(t,o)[0]})}function p(t,o){let e;const n=new Promise((u,i)=>{e=setTimeout(()=>{i(o)},t)});return[e,n]}function y(t,o){let e;const n=new Promise((u,i)=>{e=setInterval(()=>{f(this,void 0,void 0,function*(){const r=yield t();r&&(clearInterval(e),i(r))})},o)});return[e,n]}exports.isPromise=h;exports.pollTillDefined=T;exports.pollTillDefinedAndReturnIntervalId=v;exports.rejectIfConditionAtInterval=y;exports.rejectIfTimeout=p;exports.waitWithTimeout=a;
@@ -5,31 +5,31 @@ import "../../../web3-types/lib/esm/data_format_types.js";
5
5
  import "../../../web3-types/lib/esm/eth_types.js";
6
6
  import "../../../web3-types/lib/esm/web3_base_provider.js";
7
7
  import { isNullish as a } from "../../../web3-validator/lib/esm/validation/object.js";
8
- var l = function(n, o, t, e) {
8
+ var f = globalThis && globalThis.__awaiter || function(n, o, t, e) {
9
9
  function c(i) {
10
10
  return i instanceof t ? i : new t(function(r) {
11
11
  r(i);
12
12
  });
13
13
  }
14
14
  return new (t || (t = Promise))(function(i, r) {
15
- function f(u) {
15
+ function l(u) {
16
16
  try {
17
- d(e.next(u));
18
- } catch (s) {
19
- r(s);
17
+ s(e.next(u));
18
+ } catch (d) {
19
+ r(d);
20
20
  }
21
21
  }
22
22
  function m(u) {
23
23
  try {
24
- d(e.throw(u));
25
- } catch (s) {
26
- r(s);
24
+ s(e.throw(u));
25
+ } catch (d) {
26
+ r(d);
27
27
  }
28
28
  }
29
- function d(u) {
30
- u.done ? i(u.value) : c(u.value).then(f, m);
29
+ function s(u) {
30
+ u.done ? i(u.value) : c(u.value).then(l, m);
31
31
  }
32
- d((e = e.apply(n, o || [])).next());
32
+ s((e = e.apply(n, o || [])).next());
33
33
  });
34
34
  };
35
35
  function j(n) {
@@ -37,7 +37,7 @@ function j(n) {
37
37
  typeof n.then == "function";
38
38
  }
39
39
  function p(n, o, t) {
40
- return l(this, void 0, void 0, function* () {
40
+ return f(this, void 0, void 0, function* () {
41
41
  let e;
42
42
  const c = yield Promise.race([
43
43
  n instanceof Promise ? n : n(),
@@ -55,12 +55,12 @@ function v(n, o) {
55
55
  return [new Promise((c, i) => {
56
56
  t = setInterval(
57
57
  function r() {
58
- return l(this, void 0, void 0, function* () {
58
+ return f(this, void 0, void 0, function* () {
59
59
  try {
60
- const f = yield p(n, o);
61
- a(f) || (clearInterval(t), c(f));
62
- } catch (f) {
63
- clearInterval(t), i(f);
60
+ const l = yield p(n, o);
61
+ a(l) || (clearInterval(t), c(l));
62
+ } catch (l) {
63
+ clearInterval(t), i(l);
64
64
  }
65
65
  }), r;
66
66
  }(),
@@ -69,7 +69,7 @@ function v(n, o) {
69
69
  }), t];
70
70
  }
71
71
  function x(n, o) {
72
- return l(this, void 0, void 0, function* () {
72
+ return f(this, void 0, void 0, function* () {
73
73
  return v(n, o)[0];
74
74
  });
75
75
  }
@@ -86,7 +86,7 @@ function R(n, o) {
86
86
  let t;
87
87
  const e = new Promise((c, i) => {
88
88
  t = setInterval(() => {
89
- l(this, void 0, void 0, function* () {
89
+ f(this, void 0, void 0, function* () {
90
90
  const r = yield n();
91
91
  r && (clearInterval(t), i(r));
92
92
  });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../web3-errors/lib/esm/errors/connection_errors.cjs"),l=require("../../../web3-errors/lib/esm/errors/provider_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const R=require("./web3_eip1193_provider.cjs"),v=require("./chunk_response_parser.cjs"),m=require("./validation.cjs"),g=require("./web3_deferred_promise.cjs"),c=require("./json_rpc.cjs");var p=function(f,e,t,s){function i(n){return n instanceof t?n:new t(function(u){u(n)})}return new(t||(t=Promise))(function(n,u){function h(r){try{_(s.next(r))}catch(a){u(a)}}function d(r){try{_(s.throw(r))}catch(a){u(a)}}function _(r){r.done?n(r.value):i(r.value).then(h,d)}_((s=s.apply(f,e||[])).next())})};const q={autoReconnect:!0,delay:5e3,maxAttempts:5},E=1e3;class Q extends R.Eip1193Provider{constructor(e,t,s){if(super(),this._connectionStatus="connecting",this._onMessageHandler=this._onMessage.bind(this),this._onOpenHandler=this._onConnect.bind(this),this._onCloseHandler=this._onCloseEvent.bind(this),this._onErrorHandler=this._onError.bind(this),!this._validateProviderPath(e))throw new l.InvalidClientError(e);this._socketPath=e,this._socketOptions=t,this._reconnectOptions=Object.assign(Object.assign({},q),s??{}),this._pendingRequestsQueue=new Map,this._sentRequestsQueue=new Map,this._init(),this.connect(),this.chunkResponseParser=new v.ChunkResponseParser(this._eventEmitter,this._reconnectOptions.autoReconnect),this.chunkResponseParser.onError(()=>{this._clearQueues()}),this.isReconnecting=!1}get SocketConnection(){return this._socketConnection}_init(){this._reconnectAttempts=0}connect(){try{this._openSocketConnection(),this._connectionStatus="connecting",this._addSocketListeners()}catch(e){if(this.isReconnecting)setImmediate(()=>{this._reconnect()});else throw this._connectionStatus="disconnected",e&&e.message?new o.ConnectionError(`Error while connecting to ${this._socketPath}. Reason: ${e.message}`):new l.InvalidClientError(this._socketPath)}}_validateProviderPath(e){return!!e}getPendingRequestQueueSize(){return this._pendingRequestsQueue.size}getSentRequestsQueueSize(){return this._sentRequestsQueue.size}supportsSubscriptions(){return!0}on(e,t){this._eventEmitter.on(e,t)}once(e,t){this._eventEmitter.once(e,t)}removeListener(e,t){this._eventEmitter.removeListener(e,t)}_onDisconnect(e,t){this._connectionStatus="disconnected",super._onDisconnect(e,t)}disconnect(e,t){const s=e??E;this._removeSocketListeners(),this.getStatus()!=="disconnected"&&this._closeSocketConnection(s,t),this._onDisconnect(s,t)}safeDisconnect(e,t,s=!1,i=1e3){return p(this,void 0,void 0,function*(){let n=0;yield p(this,void 0,void 0,function*(){return new Promise(h=>{const d=setInterval(()=>{s&&n===5&&this.clearQueues(),this.getPendingRequestQueueSize()===0&&this.getSentRequestsQueueSize()===0&&(clearInterval(d),h(!0)),n+=1},i)})}),this.disconnect(e,t)})}removeAllListeners(e){this._eventEmitter.removeAllListeners(e)}_onError(e){this.isReconnecting?this._reconnect():this._eventEmitter.emit("error",e)}reset(){this._sentRequestsQueue.clear(),this._pendingRequestsQueue.clear(),this._init(),this._removeSocketListeners(),this._addSocketListeners()}_reconnect(){this.isReconnecting||(this.isReconnecting=!0,this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach((e,t)=>{e.deferredPromise.reject(new o.PendingRequestsOnReconnectingError),this._sentRequestsQueue.delete(t)}),this._reconnectAttempts<this._reconnectOptions.maxAttempts?(this._reconnectAttempts+=1,setTimeout(()=>{this._removeSocketListeners(),this.connect(),this.isReconnecting=!1},this._reconnectOptions.delay)):(this.isReconnecting=!1,this._clearQueues(),this._removeSocketListeners(),this._eventEmitter.emit("error",new o.MaxAttemptsReachedOnReconnectingError(this._reconnectOptions.maxAttempts))))}request(e){return p(this,void 0,void 0,function*(){if(m.isNullish(this._socketConnection))throw new Error("Connection is undefined");this.getStatus()==="disconnected"&&this.connect();const t=c.isBatchRequest(e)?e[0].id:e.id;if(!t)throw new l.Web3WSProviderError("Request Id not defined");if(this._sentRequestsQueue.has(t))throw new o.RequestAlreadySentError(t);const s=new g.Web3DeferredPromise;s.catch(n=>{this._eventEmitter.emit("error",n)});const i={payload:e,deferredPromise:s};if(this.getStatus()==="connecting")return this._pendingRequestsQueue.set(t,i),i.deferredPromise;this._sentRequestsQueue.set(t,i);try{this._sendToSocket(i.payload)}catch(n){this._sentRequestsQueue.delete(t),this._eventEmitter.emit("error",n)}return s})}_onConnect(){this._connectionStatus="connected",this._reconnectAttempts=0,super._onConnect(),this._sendPendingRequests()}_sendPendingRequests(){for(const[e,t]of this._pendingRequestsQueue.entries())this._sendToSocket(t.payload),this._pendingRequestsQueue.delete(e),this._sentRequestsQueue.set(e,t)}_onMessage(e){const t=this._parseResponses(e);if(!(m.isNullish(t)||t.length===0))for(const s of t){if(c.isResponseWithNotification(s)&&s.method.endsWith("_subscription")){this._eventEmitter.emit("message",s);return}const i=c.isBatchResponse(s)?s[0].id:s.id,n=this._sentRequestsQueue.get(i);if(!n)return;(c.isBatchResponse(s)||c.isResponseWithResult(s)||c.isResponseWithError(s))&&(this._eventEmitter.emit("message",s),n.deferredPromise.resolve(s)),this._sentRequestsQueue.delete(i)}}clearQueues(e){this._clearQueues(e)}_clearQueues(e){this._pendingRequestsQueue.size>0&&this._pendingRequestsQueue.forEach((t,s)=>{t.deferredPromise.reject(new o.ConnectionNotOpenError(e)),this._pendingRequestsQueue.delete(s)}),this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach((t,s)=>{t.deferredPromise.reject(new o.ConnectionNotOpenError(e)),this._sentRequestsQueue.delete(s)}),this._removeSocketListeners()}}exports.SocketProvider=Q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../web3-errors/lib/esm/errors/connection_errors.cjs"),l=require("../../../web3-errors/lib/esm/errors/provider_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const f=require("./web3_eip1193_provider.cjs"),v=require("./chunk_response_parser.cjs"),R=require("./validation.cjs"),g=require("./web3_deferred_promise.cjs"),c=require("./json_rpc.cjs");var p=globalThis&&globalThis.__awaiter||function(m,e,t,s){function i(n){return n instanceof t?n:new t(function(u){u(n)})}return new(t||(t=Promise))(function(n,u){function h(r){try{d(s.next(r))}catch(a){u(a)}}function _(r){try{d(s.throw(r))}catch(a){u(a)}}function d(r){r.done?n(r.value):i(r.value).then(h,_)}d((s=s.apply(m,e||[])).next())})};const q={autoReconnect:!0,delay:5e3,maxAttempts:5},E=1e3;class Q extends f.Eip1193Provider{constructor(e,t,s){if(super(),this._connectionStatus="connecting",this._onMessageHandler=this._onMessage.bind(this),this._onOpenHandler=this._onConnect.bind(this),this._onCloseHandler=this._onCloseEvent.bind(this),this._onErrorHandler=this._onError.bind(this),!this._validateProviderPath(e))throw new l.InvalidClientError(e);this._socketPath=e,this._socketOptions=t,this._reconnectOptions=Object.assign(Object.assign({},q),s??{}),this._pendingRequestsQueue=new Map,this._sentRequestsQueue=new Map,this._init(),this.connect(),this.chunkResponseParser=new v.ChunkResponseParser(this._eventEmitter,this._reconnectOptions.autoReconnect),this.chunkResponseParser.onError(()=>{this._clearQueues()}),this.isReconnecting=!1}get SocketConnection(){return this._socketConnection}_init(){this._reconnectAttempts=0}connect(){try{this._openSocketConnection(),this._connectionStatus="connecting",this._addSocketListeners()}catch(e){if(this.isReconnecting)setImmediate(()=>{this._reconnect()});else throw this._connectionStatus="disconnected",e&&e.message?new o.ConnectionError(`Error while connecting to ${this._socketPath}. Reason: ${e.message}`):new l.InvalidClientError(this._socketPath)}}_validateProviderPath(e){return!!e}getPendingRequestQueueSize(){return this._pendingRequestsQueue.size}getSentRequestsQueueSize(){return this._sentRequestsQueue.size}supportsSubscriptions(){return!0}on(e,t){this._eventEmitter.on(e,t)}once(e,t){this._eventEmitter.once(e,t)}removeListener(e,t){this._eventEmitter.removeListener(e,t)}_onDisconnect(e,t){this._connectionStatus="disconnected",super._onDisconnect(e,t)}disconnect(e,t){const s=e??E;this._removeSocketListeners(),this.getStatus()!=="disconnected"&&this._closeSocketConnection(s,t),this._onDisconnect(s,t)}safeDisconnect(e,t,s=!1,i=1e3){return p(this,void 0,void 0,function*(){let n=0;yield(()=>p(this,void 0,void 0,function*(){return new Promise(h=>{const _=setInterval(()=>{s&&n===5&&this.clearQueues(),this.getPendingRequestQueueSize()===0&&this.getSentRequestsQueueSize()===0&&(clearInterval(_),h(!0)),n+=1},i)})}))(),this.disconnect(e,t)})}removeAllListeners(e){this._eventEmitter.removeAllListeners(e)}_onError(e){this.isReconnecting?this._reconnect():this._eventEmitter.emit("error",e)}reset(){this._sentRequestsQueue.clear(),this._pendingRequestsQueue.clear(),this._init(),this._removeSocketListeners(),this._addSocketListeners()}_reconnect(){this.isReconnecting||(this.isReconnecting=!0,this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach((e,t)=>{e.deferredPromise.reject(new o.PendingRequestsOnReconnectingError),this._sentRequestsQueue.delete(t)}),this._reconnectAttempts<this._reconnectOptions.maxAttempts?(this._reconnectAttempts+=1,setTimeout(()=>{this._removeSocketListeners(),this.connect(),this.isReconnecting=!1},this._reconnectOptions.delay)):(this.isReconnecting=!1,this._clearQueues(),this._removeSocketListeners(),this._eventEmitter.emit("error",new o.MaxAttemptsReachedOnReconnectingError(this._reconnectOptions.maxAttempts))))}request(e){return p(this,void 0,void 0,function*(){if(R.isNullish(this._socketConnection))throw new Error("Connection is undefined");this.getStatus()==="disconnected"&&this.connect();const t=c.isBatchRequest(e)?e[0].id:e.id;if(!t)throw new l.Web3WSProviderError("Request Id not defined");if(this._sentRequestsQueue.has(t))throw new o.RequestAlreadySentError(t);const s=new g.Web3DeferredPromise;s.catch(n=>{this._eventEmitter.emit("error",n)});const i={payload:e,deferredPromise:s};if(this.getStatus()==="connecting")return this._pendingRequestsQueue.set(t,i),i.deferredPromise;this._sentRequestsQueue.set(t,i);try{this._sendToSocket(i.payload)}catch(n){this._sentRequestsQueue.delete(t),this._eventEmitter.emit("error",n)}return s})}_onConnect(){this._connectionStatus="connected",this._reconnectAttempts=0,super._onConnect(),this._sendPendingRequests()}_sendPendingRequests(){for(const[e,t]of this._pendingRequestsQueue.entries())this._sendToSocket(t.payload),this._pendingRequestsQueue.delete(e),this._sentRequestsQueue.set(e,t)}_onMessage(e){const t=this._parseResponses(e);if(!(R.isNullish(t)||t.length===0))for(const s of t){if(c.isResponseWithNotification(s)&&s.method.endsWith("_subscription")){this._eventEmitter.emit("message",s);return}const i=c.isBatchResponse(s)?s[0].id:s.id,n=this._sentRequestsQueue.get(i);if(!n)return;(c.isBatchResponse(s)||c.isResponseWithResult(s)||c.isResponseWithError(s))&&(this._eventEmitter.emit("message",s),n.deferredPromise.resolve(s)),this._sentRequestsQueue.delete(i)}}clearQueues(e){this._clearQueues(e)}_clearQueues(e){this._pendingRequestsQueue.size>0&&this._pendingRequestsQueue.forEach((t,s)=>{t.deferredPromise.reject(new o.ConnectionNotOpenError(e)),this._pendingRequestsQueue.delete(s)}),this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach((t,s)=>{t.deferredPromise.reject(new o.ConnectionNotOpenError(e)),this._sentRequestsQueue.delete(s)}),this._removeSocketListeners()}}exports.SocketProvider=Q;
@@ -1,12 +1,12 @@
1
1
  import { ConnectionError as R, PendingRequestsOnReconnectingError as g, MaxAttemptsReachedOnReconnectingError as v, RequestAlreadySentError as q, ConnectionNotOpenError as m } from "../../../web3-errors/lib/esm/errors/connection_errors.js";
2
- import { InvalidClientError as f, Web3WSProviderError as Q } from "../../../web3-errors/lib/esm/errors/provider_errors.js";
2
+ import { InvalidClientError as l, Web3WSProviderError as Q } from "../../../web3-errors/lib/esm/errors/provider_errors.js";
3
3
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
4
4
  import { Eip1193Provider as E } from "./web3_eip1193_provider.js";
5
5
  import { ChunkResponseParser as S } from "./chunk_response_parser.js";
6
- import { isNullish as l } from "./validation.js";
6
+ import { isNullish as f } from "./validation.js";
7
7
  import { Web3DeferredPromise as w } from "./web3_deferred_promise.js";
8
8
  import { isBatchRequest as P, isResponseWithNotification as k, isBatchResponse as p, isResponseWithResult as C, isResponseWithError as O } from "./json_rpc.js";
9
- var _ = function(a, e, t, s) {
9
+ var d = globalThis && globalThis.__awaiter || function(a, e, t, s) {
10
10
  function i(n) {
11
11
  return n instanceof t ? n : new t(function(r) {
12
12
  r(n);
@@ -16,15 +16,15 @@ var _ = function(a, e, t, s) {
16
16
  function c(o) {
17
17
  try {
18
18
  h(s.next(o));
19
- } catch (d) {
20
- r(d);
19
+ } catch (_) {
20
+ r(_);
21
21
  }
22
22
  }
23
23
  function u(o) {
24
24
  try {
25
25
  h(s.throw(o));
26
- } catch (d) {
27
- r(d);
26
+ } catch (_) {
27
+ r(_);
28
28
  }
29
29
  }
30
30
  function h(o) {
@@ -38,7 +38,7 @@ const A = {
38
38
  delay: 5e3,
39
39
  maxAttempts: 5
40
40
  }, L = 1e3;
41
- class W extends E {
41
+ class M extends E {
42
42
  /**
43
43
  * This is an abstract class for implementing a socket provider (e.g. WebSocket, IPC). It extends the EIP-1193 provider {@link EIP1193Provider}.
44
44
  * @param socketPath - The path to the socket (e.g. /ipc/path or ws://localhost:8546)
@@ -47,7 +47,7 @@ class W extends E {
47
47
  */
48
48
  constructor(e, t, s) {
49
49
  if (super(), this._connectionStatus = "connecting", this._onMessageHandler = this._onMessage.bind(this), this._onOpenHandler = this._onConnect.bind(this), this._onCloseHandler = this._onCloseEvent.bind(this), this._onErrorHandler = this._onError.bind(this), !this._validateProviderPath(e))
50
- throw new f(e);
50
+ throw new l(e);
51
51
  this._socketPath = e, this._socketOptions = t, this._reconnectOptions = Object.assign(Object.assign({}, A), s ?? {}), this._pendingRequestsQueue = /* @__PURE__ */ new Map(), this._sentRequestsQueue = /* @__PURE__ */ new Map(), this._init(), this.connect(), this.chunkResponseParser = new S(this._eventEmitter, this._reconnectOptions.autoReconnect), this.chunkResponseParser.onError(() => {
52
52
  this._clearQueues();
53
53
  }), this.isReconnecting = !1;
@@ -70,7 +70,7 @@ class W extends E {
70
70
  this._reconnect();
71
71
  });
72
72
  else
73
- throw this._connectionStatus = "disconnected", e && e.message ? new R(`Error while connecting to ${this._socketPath}. Reason: ${e.message}`) : new f(this._socketPath);
73
+ throw this._connectionStatus = "disconnected", e && e.message ? new R(`Error while connecting to ${this._socketPath}. Reason: ${e.message}`) : new l(this._socketPath);
74
74
  }
75
75
  }
76
76
  // eslint-disable-next-line class-methods-use-this
@@ -130,15 +130,15 @@ class W extends E {
130
130
  * @param data - The data to be sent to the server
131
131
  */
132
132
  safeDisconnect(e, t, s = !1, i = 1e3) {
133
- return _(this, void 0, void 0, function* () {
133
+ return d(this, void 0, void 0, function* () {
134
134
  let n = 0;
135
- yield _(this, void 0, void 0, function* () {
135
+ yield (() => d(this, void 0, void 0, function* () {
136
136
  return new Promise((c) => {
137
137
  const u = setInterval(() => {
138
138
  s && n === 5 && this.clearQueues(), this.getPendingRequestQueueSize() === 0 && this.getSentRequestsQueueSize() === 0 && (clearInterval(u), c(!0)), n += 1;
139
139
  }, i);
140
140
  });
141
- }), this.disconnect(e, t);
141
+ }))(), this.disconnect(e, t);
142
142
  });
143
143
  }
144
144
  /**
@@ -168,8 +168,8 @@ class W extends E {
168
168
  * Creates a request object to be sent to the server
169
169
  */
170
170
  request(e) {
171
- return _(this, void 0, void 0, function* () {
172
- if (l(this._socketConnection))
171
+ return d(this, void 0, void 0, function* () {
172
+ if (f(this._socketConnection))
173
173
  throw new Error("Connection is undefined");
174
174
  this.getStatus() === "disconnected" && this.connect();
175
175
  const t = P(e) ? e[0].id : e.id;
@@ -205,7 +205,7 @@ class W extends E {
205
205
  }
206
206
  _onMessage(e) {
207
207
  const t = this._parseResponses(e);
208
- if (!(l(t) || t.length === 0))
208
+ if (!(f(t) || t.length === 0))
209
209
  for (const s of t) {
210
210
  if (k(s) && s.method.endsWith("_subscription")) {
211
211
  this._eventEmitter.emit("message", s);
@@ -229,5 +229,5 @@ class W extends E {
229
229
  }
230
230
  }
231
231
  export {
232
- W as SocketProvider
232
+ M as SocketProvider
233
233
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../web3-errors/lib/esm/errors/generic_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");var a=function(c,t,e,s){function n(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function _(r){try{u(s.next(r))}catch(h){o(h)}}function d(r){try{u(s.throw(r))}catch(h){o(h)}}function u(r){r.done?i(r.value):n(r.value).then(_,d)}u((s=s.apply(c,t||[])).next())})},m;class l{constructor({timeout:t,eagerStart:e,timeoutMessage:s}={timeout:0,eagerStart:!1,timeoutMessage:"DeferredPromise timed out"}){this[m]="Promise",this._state="pending",this._promise=new Promise((n,i)=>{this._resolve=n,this._reject=i}),this._timeoutMessage=s,this._timeoutInterval=t,e&&this.startTimer()}get state(){return this._state}then(t,e){return a(this,void 0,void 0,function*(){return this._promise.then(t,e)})}catch(t){return a(this,void 0,void 0,function*(){return this._promise.catch(t)})}finally(t){return a(this,void 0,void 0,function*(){return this._promise.finally(t)})}resolve(t){this._resolve(t),this._state="fulfilled",this._clearTimeout()}reject(t){this._reject(t),this._state="rejected",this._clearTimeout()}startTimer(){this._timeoutInterval&&this._timeoutInterval>0&&(this._timeoutId=setTimeout(this._checkTimeout.bind(this),this._timeoutInterval))}_checkTimeout(){this._state==="pending"&&this._timeoutId&&this.reject(new f.OperationTimeoutError(this._timeoutMessage))}_clearTimeout(){this._timeoutId&&clearTimeout(this._timeoutId)}}m=Symbol.toStringTag;exports.Web3DeferredPromise=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../web3-errors/lib/esm/errors/generic_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");var a=globalThis&&globalThis.__awaiter||function(c,t,e,s){function n(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function _(r){try{u(s.next(r))}catch(h){o(h)}}function l(r){try{u(s.throw(r))}catch(h){o(h)}}function u(r){r.done?i(r.value):n(r.value).then(_,l)}u((s=s.apply(c,t||[])).next())})},m;class d{constructor({timeout:t,eagerStart:e,timeoutMessage:s}={timeout:0,eagerStart:!1,timeoutMessage:"DeferredPromise timed out"}){this[m]="Promise",this._state="pending",this._promise=new Promise((n,i)=>{this._resolve=n,this._reject=i}),this._timeoutMessage=s,this._timeoutInterval=t,e&&this.startTimer()}get state(){return this._state}then(t,e){return a(this,void 0,void 0,function*(){return this._promise.then(t,e)})}catch(t){return a(this,void 0,void 0,function*(){return this._promise.catch(t)})}finally(t){return a(this,void 0,void 0,function*(){return this._promise.finally(t)})}resolve(t){this._resolve(t),this._state="fulfilled",this._clearTimeout()}reject(t){this._reject(t),this._state="rejected",this._clearTimeout()}startTimer(){this._timeoutInterval&&this._timeoutInterval>0&&(this._timeoutId=setTimeout(this._checkTimeout.bind(this),this._timeoutInterval))}_checkTimeout(){this._state==="pending"&&this._timeoutId&&this.reject(new f.OperationTimeoutError(this._timeoutMessage))}_clearTimeout(){this._timeoutId&&clearTimeout(this._timeoutId)}}m=Symbol.toStringTag;exports.Web3DeferredPromise=d;
@@ -1,6 +1,6 @@
1
- import { OperationTimeoutError as d } from "../../../web3-errors/lib/esm/errors/generic_errors.js";
1
+ import { OperationTimeoutError as f } from "../../../web3-errors/lib/esm/errors/generic_errors.js";
2
2
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
3
- var a = function(m, t, e, r) {
3
+ var a = globalThis && globalThis.__awaiter || function(m, t, e, r) {
4
4
  function n(i) {
5
5
  return i instanceof e ? i : new e(function(o) {
6
6
  o(i);
@@ -14,7 +14,7 @@ var a = function(m, t, e, r) {
14
14
  o(u);
15
15
  }
16
16
  }
17
- function f(s) {
17
+ function l(s) {
18
18
  try {
19
19
  h(r.throw(s));
20
20
  } catch (u) {
@@ -22,7 +22,7 @@ var a = function(m, t, e, r) {
22
22
  }
23
23
  }
24
24
  function h(s) {
25
- s.done ? i(s.value) : n(s.value).then(_, f);
25
+ s.done ? i(s.value) : n(s.value).then(_, l);
26
26
  }
27
27
  h((r = r.apply(m, t || [])).next());
28
28
  });
@@ -102,7 +102,7 @@ class p {
102
102
  this._timeoutInterval && this._timeoutInterval > 0 && (this._timeoutId = setTimeout(this._checkTimeout.bind(this), this._timeoutInterval));
103
103
  }
104
104
  _checkTimeout() {
105
- this._state === "pending" && this._timeoutId && this.reject(new d(this._timeoutMessage));
105
+ this._state === "pending" && this._timeoutId && this.reject(new f(this._timeoutMessage));
106
106
  }
107
107
  _clearTimeout() {
108
108
  this._timeoutId && clearTimeout(this._timeoutId);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");const v=require("../../../web3-types/lib/esm/web3_base_provider.cjs"),m=require("../../../events/events.cjs"),f=require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs"),a=require("./json_rpc.cjs");var d=function(h,t,e,r){function u(i){return i instanceof e?i:new e(function(o){o(i)})}return new(e||(e=Promise))(function(i,o){function _(n){try{c(r.next(n))}catch(s){o(s)}}function l(n){try{c(r.throw(n))}catch(s){o(s)}}function c(n){n.done?i(n.value):u(n.value).then(_,l)}c((r=r.apply(h,t||[])).next())})};class p extends v.Web3BaseProvider{constructor(){super(...arguments),this._eventEmitter=new m.eventsExports.EventEmitter,this._chainId="",this._accounts=[]}_getChainId(){var t;return d(this,void 0,void 0,function*(){const e=yield this.request(a.toPayload({method:"eth_chainId",params:[]}));return(t=e==null?void 0:e.result)!==null&&t!==void 0?t:""})}_getAccounts(){var t;return d(this,void 0,void 0,function*(){const e=yield this.request(a.toPayload({method:"eth_accounts",params:[]}));return(t=e==null?void 0:e.result)!==null&&t!==void 0?t:[]})}_onConnect(){Promise.all([this._getChainId().then(t=>{t!==this._chainId&&(this._chainId=t,this._eventEmitter.emit("chainChanged",this._chainId))}).catch(t=>{console.error(t)}),this._getAccounts().then(t=>{this._accounts.length===t.length&&t.every(e=>t.includes(e))||(this._accounts=t,this._onAccountsChanged())}).catch(t=>{console.error(t)})]).then(()=>this._eventEmitter.emit("connect",{chainId:this._chainId})).catch(t=>{console.error(t)})}_onDisconnect(t,e){this._eventEmitter.emit("disconnect",new f.EIP1193ProviderRpcError(t,e))}_onAccountsChanged(){this._eventEmitter.emit("accountsChanged",this._accounts)}}exports.Eip1193Provider=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");const v=require("../../../web3-types/lib/esm/web3_base_provider.cjs"),m=require("../../../events/events.cjs"),f=require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs"),a=require("./json_rpc.cjs");var d=globalThis&&globalThis.__awaiter||function(h,t,e,o){function u(i){return i instanceof e?i:new e(function(r){r(i)})}return new(e||(e=Promise))(function(i,r){function _(n){try{c(o.next(n))}catch(s){r(s)}}function l(n){try{c(o.throw(n))}catch(s){r(s)}}function c(n){n.done?i(n.value):u(n.value).then(_,l)}c((o=o.apply(h,t||[])).next())})};class p extends v.Web3BaseProvider{constructor(){super(...arguments),this._eventEmitter=new m.eventsExports.EventEmitter,this._chainId="",this._accounts=[]}_getChainId(){var t;return d(this,void 0,void 0,function*(){const e=yield this.request(a.toPayload({method:"eth_chainId",params:[]}));return(t=e==null?void 0:e.result)!==null&&t!==void 0?t:""})}_getAccounts(){var t;return d(this,void 0,void 0,function*(){const e=yield this.request(a.toPayload({method:"eth_accounts",params:[]}));return(t=e==null?void 0:e.result)!==null&&t!==void 0?t:[]})}_onConnect(){Promise.all([this._getChainId().then(t=>{t!==this._chainId&&(this._chainId=t,this._eventEmitter.emit("chainChanged",this._chainId))}).catch(t=>{console.error(t)}),this._getAccounts().then(t=>{this._accounts.length===t.length&&t.every(e=>t.includes(e))||(this._accounts=t,this._onAccountsChanged())}).catch(t=>{console.error(t)})]).then(()=>this._eventEmitter.emit("connect",{chainId:this._chainId})).catch(t=>{console.error(t)})}_onDisconnect(t,e){this._eventEmitter.emit("disconnect",new f.EIP1193ProviderRpcError(t,e))}_onAccountsChanged(){this._eventEmitter.emit("accountsChanged",this._accounts)}}exports.Eip1193Provider=p;
@@ -1,10 +1,10 @@
1
1
  import "../../../web3-types/lib/esm/data_format_types.js";
2
2
  import "../../../web3-types/lib/esm/eth_types.js";
3
- import { Web3BaseProvider as l } from "../../../web3-types/lib/esm/web3_base_provider.js";
3
+ import { Web3BaseProvider as m } from "../../../web3-types/lib/esm/web3_base_provider.js";
4
4
  import { e as v } from "../../../events/events.js";
5
5
  import { EIP1193ProviderRpcError as f } from "../../../web3-errors/lib/esm/errors/rpc_errors.js";
6
6
  import { toPayload as a } from "./json_rpc.js";
7
- var d = function(h, t, e, o) {
7
+ var d = globalThis && globalThis.__awaiter || function(h, t, e, o) {
8
8
  function u(i) {
9
9
  return i instanceof e ? i : new e(function(r) {
10
10
  r(i);
@@ -18,7 +18,7 @@ var d = function(h, t, e, o) {
18
18
  r(s);
19
19
  }
20
20
  }
21
- function m(n) {
21
+ function l(n) {
22
22
  try {
23
23
  c(o.throw(n));
24
24
  } catch (s) {
@@ -26,12 +26,12 @@ var d = function(h, t, e, o) {
26
26
  }
27
27
  }
28
28
  function c(n) {
29
- n.done ? i(n.value) : u(n.value).then(_, m);
29
+ n.done ? i(n.value) : u(n.value).then(_, l);
30
30
  }
31
31
  c((o = o.apply(h, t || [])).next());
32
32
  });
33
33
  };
34
- class C extends l {
34
+ class C extends m {
35
35
  constructor() {
36
36
  super(...arguments), this._eventEmitter = new v.EventEmitter(), this._chainId = "", this._accounts = [];
37
37
  }
@@ -72,7 +72,7 @@ const controllerFactory$5 = (db) => {
72
72
  };
73
73
  var departments_controller = controllerFactory$5;
74
74
  const jwt = require$$0$1;
75
- const ObjectId$1 = require$$0.Types.ObjectId;
75
+ const ObjectId$2 = require$$0.Types.ObjectId;
76
76
  const { Client } = require$$5;
77
77
  const client = new Client({});
78
78
  const addUserStatusFields = addMembersQuantity$1.addUserStatusFields_1;
@@ -116,15 +116,15 @@ const controllerFactory$4 = (db) => {
116
116
  }));
117
117
  }
118
118
  const matchConditions = [
119
- ...req.query._id ? [{ _id: new ObjectId$1(req.query._id) }] : [],
120
- ...req.query.owner ? [{ owner: new ObjectId$1(req.query.owner) }] : [],
121
- ...req.query.member ? [{ "memberships.user": new ObjectId$1(req.query.member), "memberships.role": { $nin: ["subscriber", "owner"] } }] : [],
122
- ...req.query.subscriber ? [{ "memberships.user": new ObjectId$1(req.query.subscriber), "memberships.role": "subscriber" }] : [],
123
- ...req.query.postable ? [{ $or: [{ $and: [{ types: { $elemMatch: { $eq: "public" } } }, { "memberships.user": new ObjectId$1(req.query.postable) }] }, { $and: [{ types: { $elemMatch: { $in: ["exclusive", "hidden"] } } }, { "memberships.user": new ObjectId$1(req.query.postable) }, { "memberships.role": { $ne: "subscriber" } }] }] }] : [],
119
+ ...req.query._id ? [{ _id: new ObjectId$2(req.query._id) }] : [],
120
+ ...req.query.owner ? [{ owner: new ObjectId$2(req.query.owner) }] : [],
121
+ ...req.query.member ? [{ "memberships.user": new ObjectId$2(req.query.member), "memberships.role": "member" }] : [],
122
+ ...req.query.subscriber ? [{ "memberships.user": new ObjectId$2(req.query.subscriber), "memberships.role": "subscriber" }] : [],
123
+ ...req.query.postable ? [{ $or: [{ $and: [{ types: { $elemMatch: { $eq: "public" } } }, { "memberships.user": new ObjectId$2(req.query.postable) }] }, { $and: [{ types: { $elemMatch: { $in: ["exclusive", "hidden"] } } }, { "memberships.user": new ObjectId$2(req.query.postable) }, { "memberships.role": { $ne: "subscriber" } }] }] }] : [],
124
124
  ...req.query.types ? [{ types: { $in: req.query.types } }] : [],
125
125
  // Если req.query.types - строка
126
126
  // to remove
127
- ...req.query.onlyuser ? [{ "memberships.user": new ObjectId$1(req.query.onlyuser) }] : [],
127
+ ...req.query.onlyuser ? [{ "memberships.user": new ObjectId$2(req.query.onlyuser) }] : [],
128
128
  ...categories.length > 0 ? [{ "products.category": { $in: categories } }] : [],
129
129
  ...delivery.length > 0 ? [{ "spots.delivery": { $all: delivery } }] : [],
130
130
  ...priceConditions.length > 0 ? [{ $or: priceConditions }] : [],
@@ -425,6 +425,7 @@ const controllerFactory$4 = (db) => {
425
425
  };
426
426
  };
427
427
  var organizations_controller = controllerFactory$4;
428
+ const ObjectId$1 = require$$0.Types.ObjectId;
428
429
  const controllerFactory$3 = (db) => {
429
430
  const Membership = db.membership;
430
431
  const read = async (req, res) => {
@@ -480,10 +481,9 @@ const controllerFactory$3 = (db) => {
480
481
  }
481
482
  };
482
483
  const deleteMembership = async (req, res) => {
483
- const { type, target, user: user2, role } = req.body;
484
484
  console.log(req.body);
485
485
  try {
486
- const membership = await Membership.findOne({ type, target, user: user2, role });
486
+ const membership = await Membership.findOneAndDelete({ _id: new ObjectId$1(req.body._id) });
487
487
  if (!membership) {
488
488
  return res.status(404).send({ errorCode: "MEMBERSHIP_NOT_FOUND" });
489
489
  } else {
@@ -592,23 +592,6 @@ var department_model = (mongoose) => {
592
592
  description: { type: String },
593
593
  categories: [String]
594
594
  },
595
- // Working hours
596
- address: String,
597
- // Position on map
598
- location: {
599
- lat: Number,
600
- lng: Number,
601
- type: {
602
- type: String,
603
- enum: ["Point"],
604
- // 'location.type' must be 'Point'
605
- required: true
606
- },
607
- coordinates: {
608
- type: [Number],
609
- required: true
610
- }
611
- },
612
595
  worktime: [{
613
596
  day: String,
614
597
  time: {
@@ -639,7 +622,6 @@ var department_model = (mongoose) => {
639
622
  ]
640
623
  });
641
624
  departmentSchema.index({ organization: 1 });
642
- departmentSchema.index({ location: "2dsphere" });
643
625
  const Department = mongoose.model("Department", departmentSchema);
644
626
  return Department;
645
627
  };
@@ -727,6 +709,10 @@ var membership_model = (mongoose) => {
727
709
  type: String,
728
710
  default: "subscriber"
729
711
  },
712
+ label: {
713
+ type: String,
714
+ default: "subscriber"
715
+ },
730
716
  target: {
731
717
  // заменяем 'organization' на 'target', так как это может быть или User, или Organization
732
718
  type: mongoose.Schema.Types.ObjectId,
@@ -71,7 +71,7 @@ const controllerFactory$5 = (db) => {
71
71
  };
72
72
  var departments_controller = controllerFactory$5;
73
73
  const jwt = require$$0$1;
74
- const ObjectId$1 = require$$0.Types.ObjectId;
74
+ const ObjectId$2 = require$$0.Types.ObjectId;
75
75
  const { Client } = require$$5;
76
76
  const client = new Client({});
77
77
  const addUserStatusFields = addUserStatusFields_1;
@@ -115,15 +115,15 @@ const controllerFactory$4 = (db) => {
115
115
  }));
116
116
  }
117
117
  const matchConditions = [
118
- ...req.query._id ? [{ _id: new ObjectId$1(req.query._id) }] : [],
119
- ...req.query.owner ? [{ owner: new ObjectId$1(req.query.owner) }] : [],
120
- ...req.query.member ? [{ "memberships.user": new ObjectId$1(req.query.member), "memberships.role": { $nin: ["subscriber", "owner"] } }] : [],
121
- ...req.query.subscriber ? [{ "memberships.user": new ObjectId$1(req.query.subscriber), "memberships.role": "subscriber" }] : [],
122
- ...req.query.postable ? [{ $or: [{ $and: [{ types: { $elemMatch: { $eq: "public" } } }, { "memberships.user": new ObjectId$1(req.query.postable) }] }, { $and: [{ types: { $elemMatch: { $in: ["exclusive", "hidden"] } } }, { "memberships.user": new ObjectId$1(req.query.postable) }, { "memberships.role": { $ne: "subscriber" } }] }] }] : [],
118
+ ...req.query._id ? [{ _id: new ObjectId$2(req.query._id) }] : [],
119
+ ...req.query.owner ? [{ owner: new ObjectId$2(req.query.owner) }] : [],
120
+ ...req.query.member ? [{ "memberships.user": new ObjectId$2(req.query.member), "memberships.role": "member" }] : [],
121
+ ...req.query.subscriber ? [{ "memberships.user": new ObjectId$2(req.query.subscriber), "memberships.role": "subscriber" }] : [],
122
+ ...req.query.postable ? [{ $or: [{ $and: [{ types: { $elemMatch: { $eq: "public" } } }, { "memberships.user": new ObjectId$2(req.query.postable) }] }, { $and: [{ types: { $elemMatch: { $in: ["exclusive", "hidden"] } } }, { "memberships.user": new ObjectId$2(req.query.postable) }, { "memberships.role": { $ne: "subscriber" } }] }] }] : [],
123
123
  ...req.query.types ? [{ types: { $in: req.query.types } }] : [],
124
124
  // Если req.query.types - строка
125
125
  // to remove
126
- ...req.query.onlyuser ? [{ "memberships.user": new ObjectId$1(req.query.onlyuser) }] : [],
126
+ ...req.query.onlyuser ? [{ "memberships.user": new ObjectId$2(req.query.onlyuser) }] : [],
127
127
  ...categories.length > 0 ? [{ "products.category": { $in: categories } }] : [],
128
128
  ...delivery.length > 0 ? [{ "spots.delivery": { $all: delivery } }] : [],
129
129
  ...priceConditions.length > 0 ? [{ $or: priceConditions }] : [],
@@ -424,6 +424,7 @@ const controllerFactory$4 = (db) => {
424
424
  };
425
425
  };
426
426
  var organizations_controller = controllerFactory$4;
427
+ const ObjectId$1 = require$$0.Types.ObjectId;
427
428
  const controllerFactory$3 = (db) => {
428
429
  const Membership = db.membership;
429
430
  const read = async (req, res) => {
@@ -479,10 +480,9 @@ const controllerFactory$3 = (db) => {
479
480
  }
480
481
  };
481
482
  const deleteMembership = async (req, res) => {
482
- const { type, target, user: user2, role } = req.body;
483
483
  console.log(req.body);
484
484
  try {
485
- const membership = await Membership.findOne({ type, target, user: user2, role });
485
+ const membership = await Membership.findOneAndDelete({ _id: new ObjectId$1(req.body._id) });
486
486
  if (!membership) {
487
487
  return res.status(404).send({ errorCode: "MEMBERSHIP_NOT_FOUND" });
488
488
  } else {
@@ -591,23 +591,6 @@ var department_model = (mongoose) => {
591
591
  description: { type: String },
592
592
  categories: [String]
593
593
  },
594
- // Working hours
595
- address: String,
596
- // Position on map
597
- location: {
598
- lat: Number,
599
- lng: Number,
600
- type: {
601
- type: String,
602
- enum: ["Point"],
603
- // 'location.type' must be 'Point'
604
- required: true
605
- },
606
- coordinates: {
607
- type: [Number],
608
- required: true
609
- }
610
- },
611
594
  worktime: [{
612
595
  day: String,
613
596
  time: {
@@ -638,7 +621,6 @@ var department_model = (mongoose) => {
638
621
  ]
639
622
  });
640
623
  departmentSchema.index({ organization: 1 });
641
- departmentSchema.index({ location: "2dsphere" });
642
624
  const Department = mongoose.model("Department", departmentSchema);
643
625
  return Department;
644
626
  };
@@ -726,6 +708,10 @@ var membership_model = (mongoose) => {
726
708
  type: String,
727
709
  default: "subscriber"
728
710
  },
711
+ label: {
712
+ type: String,
713
+ default: "subscriber"
714
+ },
729
715
  target: {
730
716
  // заменяем 'organization' на 'target', так как это может быть или User, или Organization
731
717
  type: mongoose.Schema.Types.ObjectId,