@ozdao/martyrs 0.2.585 → 0.2.587

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/dist/auth.server.js +175 -97
  2. package/dist/{authJwt-J1csaMWA.js → authJwt-DKbMMjw0.js} +33 -0
  3. package/dist/chats.server.js +3 -3
  4. package/dist/community.server.js +2 -2
  5. package/dist/core.server.js +201 -13
  6. package/dist/{core.websocket-C2FxNmZ1.js → core.websocket-Cl76z2wT.js} +41 -5
  7. package/dist/{crud-q1ye5IhV.js → crud-DpOXTZep.js} +1 -1
  8. package/dist/events.server.js +3 -3
  9. package/dist/files.server.js +2 -2
  10. package/dist/gallery.server.js +2 -2
  11. package/dist/index-kvBwwb0w.js +427 -0
  12. package/dist/inventory.server.js +3 -3
  13. package/dist/{mailing-DuEFRsa3.js → mailing-DT7nbNjZ.js} +16 -3
  14. package/dist/{main-xL-jtBkT.js → main-BIf-WirR.js} +863 -865
  15. package/dist/marketplace.server.js +2 -2
  16. package/dist/martyrs/dist/{main-xL-jtBkT.js → main-BIf-WirR.js} +192 -38
  17. package/dist/martyrs/dist/main-BIf-WirR.js.map +1 -0
  18. package/dist/martyrs/dist/{web-BA6h6Z8P.js → web-O7lXcjg0.js} +2 -2
  19. package/dist/martyrs/dist/{web-BA6h6Z8P.js.map → web-O7lXcjg0.js.map} +1 -1
  20. package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +8 -7
  21. package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
  22. package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
  23. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  24. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
  25. package/dist/martyrs/src/components/Loader/{Loader.vue.js → Loader.vue2.js} +3 -3
  26. package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +1 -0
  27. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
  28. package/dist/martyrs/src/components/Media/Media.vue.js +1 -1
  29. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  30. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  31. package/dist/martyrs/src/components/Select/{Select.vue.js → Select.vue2.js} +2 -2
  32. package/dist/martyrs/src/components/Select/Select.vue2.js.map +1 -0
  33. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js +17 -22
  34. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +1 -1
  35. package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +1 -1
  36. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  37. package/dist/martyrs/src/modules/auth/auth.client.js +18 -24
  38. package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
  39. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js +178 -0
  40. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js.map +1 -0
  41. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +53 -45
  43. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
  45. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +198 -14
  46. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
  47. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  48. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +70 -29
  49. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
  50. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  51. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  52. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +86 -30
  53. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
  54. package/dist/martyrs/src/modules/auth/views/plugins/otp.plugin.js +100 -0
  55. package/dist/martyrs/src/modules/auth/views/plugins/otp.plugin.js.map +1 -0
  56. package/dist/martyrs/src/modules/auth/views/router/auth.router.js +2 -31
  57. package/dist/martyrs/src/modules/auth/views/router/auth.router.js.map +1 -1
  58. package/dist/martyrs/src/modules/auth/views/router/users.router.js +0 -14
  59. package/dist/martyrs/src/modules/auth/views/router/users.router.js.map +1 -1
  60. package/dist/martyrs/src/modules/auth/views/store/auth.js +1 -56
  61. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  62. package/dist/martyrs/src/modules/auth/views/store/users.js +5 -1
  63. package/dist/martyrs/src/modules/auth/views/store/users.js.map +1 -1
  64. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
  65. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
  66. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  67. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +0 -1
  68. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
  69. package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
  70. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +2 -2
  71. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +74 -0
  72. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js.map +1 -0
  73. package/dist/martyrs/src/modules/core/views/components/layouts/App.vue.js.map +1 -1
  74. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +64 -48
  75. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
  76. package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js +10 -33
  77. package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js.map +1 -1
  78. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +2 -2
  79. package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
  80. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  81. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  82. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  83. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  84. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  85. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
  86. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
  87. package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
  88. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  89. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
  90. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
  91. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  92. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +2 -2
  93. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
  94. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
  95. package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +1 -1
  96. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  97. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  98. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  99. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  100. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
  101. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +3 -3
  102. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  103. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  104. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
  105. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
  106. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +2 -2
  107. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  108. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
  109. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +2 -2
  110. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
  111. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +0 -1
  112. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js.map +1 -1
  113. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +1 -1
  114. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  115. package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +1 -1
  116. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +1 -1
  117. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +2 -2
  118. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +2 -2
  119. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +2 -2
  120. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -2
  121. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -1
  122. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  123. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  124. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  125. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
  126. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
  127. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  128. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  129. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  130. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
  131. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +1 -1
  132. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
  133. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  134. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  135. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  136. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -2
  137. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
  138. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  139. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -2
  140. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
  141. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +0 -1
  142. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js.map +1 -1
  143. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  144. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  145. package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
  146. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +0 -1
  147. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  148. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  149. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +0 -1
  150. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  151. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  152. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
  153. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  154. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  155. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  156. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
  157. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  158. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  159. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  160. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  161. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
  162. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  163. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  164. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  165. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  166. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
  167. package/dist/martyrs.css +1 -1
  168. package/dist/martyrs.es.js +1 -1
  169. package/dist/music.server.js +1 -1
  170. package/dist/notifications.server.js +2 -2
  171. package/dist/orders.server.js +8 -7
  172. package/dist/organizations.server.js +3 -3
  173. package/dist/pages.server.js +1 -1
  174. package/dist/products.server.js +3 -3
  175. package/dist/profile.schema-C31Lynn3.js +21 -0
  176. package/dist/rents.server.js +2 -2
  177. package/dist/reports.server.js +1 -1
  178. package/dist/sessions.service-COcwjd0f.js +86 -0
  179. package/dist/spots.server.js +1 -1
  180. package/dist/style.css +180 -110
  181. package/dist/{tickets.controller-B7r0mK-5.js → tickets.controller-DdF85W-i.js} +1 -1
  182. package/dist/visitors.service-B1dhhuSo.js +83 -0
  183. package/dist/wallet.server.js +3 -3
  184. package/dist/{web-BA6h6Z8P.js → web-O7lXcjg0.js} +1 -1
  185. package/package.json +3 -1
  186. package/src/components/Button/Button.vue +61 -15
  187. package/src/components/Loader/Loader.vue +1 -1
  188. package/src/components/Tooltip/Tooltip.vue +31 -23
  189. package/src/modules/TASKS.MD +30 -1
  190. package/src/modules/auth/CLAUDE.md +381 -0
  191. package/src/modules/auth/FIXES.md +0 -38
  192. package/src/modules/auth/auth.client.js +4 -6
  193. package/src/modules/auth/auth.server.js +19 -16
  194. package/src/modules/auth/controllers/middlewares/authJwt.js +59 -17
  195. package/src/modules/auth/controllers/middlewares/index.js +4 -1
  196. package/src/modules/auth/controllers/middlewares/otp.middleware.js +166 -0
  197. package/src/modules/auth/controllers/middlewares/verifySignUp.js +0 -1
  198. package/src/modules/auth/controllers/middlewares/verifyUser.js +58 -11
  199. package/src/modules/auth/controllers/routes/auth.routes.js +48 -6
  200. package/src/modules/auth/controllers/routes/users.routes.js +29 -8
  201. package/src/modules/auth/controllers/services/auth.service.js +62 -12
  202. package/src/modules/auth/controllers/services/otp.service.js +109 -0
  203. package/src/modules/auth/controllers/services/users.service.js +46 -6
  204. package/src/modules/auth/models/otp.model.js +20 -0
  205. package/src/modules/auth/views/components/blocks/OtpDialog.vue +168 -0
  206. package/src/modules/auth/views/components/pages/Profile.vue +18 -13
  207. package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +199 -45
  208. package/src/modules/auth/views/components/pages/ResetPassword.vue +170 -132
  209. package/src/modules/auth/views/components/pages/SignIn.vue +2 -1
  210. package/src/modules/auth/views/components/pages/SignUp.vue +203 -147
  211. package/src/modules/auth/views/plugins/otp.plugin.js +104 -0
  212. package/src/modules/auth/views/router/auth.router.js +1 -24
  213. package/src/modules/auth/views/router/users.router.js +1 -12
  214. package/src/modules/auth/views/store/auth.js +0 -68
  215. package/src/modules/auth/views/store/users.js +6 -2
  216. package/src/modules/chats/chats.server.js +1 -1
  217. package/src/modules/community/community.server.js +1 -1
  218. package/src/modules/core/controllers/classes/core.websocket.js +57 -6
  219. package/src/modules/core/controllers/middlewares/visitor.logger.js +49 -0
  220. package/src/modules/core/controllers/services/requests.service.js +53 -0
  221. package/src/modules/core/controllers/services/sessions.service.js +98 -0
  222. package/src/modules/core/controllers/services/visitors.service.js +102 -0
  223. package/src/modules/core/controllers/utils/mailing.js +16 -3
  224. package/src/modules/core/core.server.js +31 -16
  225. package/src/modules/core/models/log.model.js +24 -0
  226. package/src/modules/core/models/request.model.js +30 -0
  227. package/src/modules/core/models/session.model.js +43 -0
  228. package/src/modules/core/models/visitor.model.js +28 -0
  229. package/src/modules/core/views/components/elements/OnlineIndicator.vue +115 -0
  230. package/src/modules/core/views/components/layouts/App.vue +2 -2
  231. package/src/modules/core/views/components/layouts/Client.vue +443 -477
  232. package/src/modules/core/views/components/pages/404.vue +2 -3
  233. package/src/modules/events/events.server.js +1 -1
  234. package/src/modules/files/files.server.js +1 -1
  235. package/src/modules/gallery/gallery.server.js +1 -1
  236. package/src/modules/governance/governance.server.js +1 -1
  237. package/src/modules/icons/icons.server.js +1 -1
  238. package/src/modules/inventory/inventory.server.js +1 -1
  239. package/src/modules/marketplace/marketplace.server.js +1 -1
  240. package/src/modules/notifications/notifications.server.js +1 -1
  241. package/src/modules/orders/controllers/orders.controller.js +3 -3
  242. package/src/modules/orders/orders.server.js +1 -1
  243. package/src/modules/organizations/organizations.server.js +1 -1
  244. package/src/modules/pages/pages.server.js +1 -1
  245. package/src/modules/products/components/pages/Products.vue +1 -1
  246. package/src/modules/products/products.server.js +1 -1
  247. package/src/modules/rents/rents.server.js +1 -1
  248. package/src/modules/reports/reports.server.js +1 -1
  249. package/src/modules/spots/spots.server.js +1 -1
  250. package/src/modules/wallet/wallet.server.js +1 -1
  251. package/dist/_virtual/alignment-pattern.js +0 -5
  252. package/dist/_virtual/alignment-pattern.js.map +0 -1
  253. package/dist/_virtual/browser.js +0 -8
  254. package/dist/_virtual/browser.js.map +0 -1
  255. package/dist/_virtual/browser2.js +0 -5
  256. package/dist/_virtual/browser2.js.map +0 -1
  257. package/dist/_virtual/canvas.js +0 -5
  258. package/dist/_virtual/canvas.js.map +0 -1
  259. package/dist/_virtual/dijkstra.js +0 -5
  260. package/dist/_virtual/dijkstra.js.map +0 -1
  261. package/dist/_virtual/error-correction-code.js +0 -5
  262. package/dist/_virtual/error-correction-code.js.map +0 -1
  263. package/dist/_virtual/error-correction-level.js +0 -5
  264. package/dist/_virtual/error-correction-level.js.map +0 -1
  265. package/dist/_virtual/finder-pattern.js +0 -5
  266. package/dist/_virtual/finder-pattern.js.map +0 -1
  267. package/dist/_virtual/format-info.js +0 -5
  268. package/dist/_virtual/format-info.js.map +0 -1
  269. package/dist/_virtual/galois-field.js +0 -5
  270. package/dist/_virtual/galois-field.js.map +0 -1
  271. package/dist/_virtual/mask-pattern.js +0 -5
  272. package/dist/_virtual/mask-pattern.js.map +0 -1
  273. package/dist/_virtual/mode.js +0 -5
  274. package/dist/_virtual/mode.js.map +0 -1
  275. package/dist/_virtual/polynomial.js +0 -5
  276. package/dist/_virtual/polynomial.js.map +0 -1
  277. package/dist/_virtual/qrcode.js +0 -5
  278. package/dist/_virtual/qrcode.js.map +0 -1
  279. package/dist/_virtual/regex.js +0 -5
  280. package/dist/_virtual/regex.js.map +0 -1
  281. package/dist/_virtual/segments.js +0 -5
  282. package/dist/_virtual/segments.js.map +0 -1
  283. package/dist/_virtual/svg-tag.js +0 -5
  284. package/dist/_virtual/svg-tag.js.map +0 -1
  285. package/dist/_virtual/utils.js +0 -5
  286. package/dist/_virtual/utils.js.map +0 -1
  287. package/dist/_virtual/utils2.js +0 -5
  288. package/dist/_virtual/utils2.js.map +0 -1
  289. package/dist/_virtual/version-check.js +0 -5
  290. package/dist/_virtual/version-check.js.map +0 -1
  291. package/dist/_virtual/version.js +0 -5
  292. package/dist/_virtual/version.js.map +0 -1
  293. package/dist/index-_Edcmck_.js +0 -170
  294. package/dist/martyrs/dist/main-xL-jtBkT.js.map +0 -1
  295. package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js +0 -1336
  296. package/dist/martyrs/node_modules/.pnpm/bignumber.js@9.1.2/node_modules/bignumber.js/bignumber.js.map +0 -1
  297. package/dist/martyrs/src/components/Button/Button.vue2.js.map +0 -1
  298. package/dist/martyrs/src/components/Loader/Loader.vue.js.map +0 -1
  299. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
  300. package/dist/martyrs/src/components/Select/Select.vue.js.map +0 -1
  301. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +0 -166
  302. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +0 -1
  303. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +0 -118
  304. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js.map +0 -1
  305. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +0 -360
  306. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js.map +0 -1
  307. package/dist/martyrs/src/modules/auth/views/store/twofa.js +0 -40
  308. package/dist/martyrs/src/modules/auth/views/store/twofa.js.map +0 -1
  309. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +0 -43
  310. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js.map +0 -1
  311. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +0 -47
  312. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js.map +0 -1
  313. package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +0 -29
  314. package/dist/martyrs/src/modules/wallet/views/components/blocks/CashDeposit.vue.js.map +0 -1
  315. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +0 -89
  316. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js.map +0 -1
  317. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +0 -136
  318. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js.map +0 -1
  319. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +0 -238
  320. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js.map +0 -1
  321. package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js +0 -9
  322. package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.js.map +0 -1
  323. package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js +0 -134
  324. package/dist/martyrs/src/modules/wallet/views/store/wallet.store.js.map +0 -1
  325. package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +0 -106
  326. package/dist/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js.map +0 -1
  327. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +0 -79
  328. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js.map +0 -1
  329. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +0 -14
  330. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js.map +0 -1
  331. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +0 -43
  332. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js.map +0 -1
  333. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -85
  334. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js.map +0 -1
  335. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +0 -40
  336. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js.map +0 -1
  337. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +0 -34
  338. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js.map +0 -1
  339. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +0 -36
  340. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js.map +0 -1
  341. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +0 -367
  342. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js.map +0 -1
  343. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +0 -52
  344. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js.map +0 -1
  345. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +0 -25
  346. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js.map +0 -1
  347. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +0 -24
  348. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js.map +0 -1
  349. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +0 -38
  350. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js.map +0 -1
  351. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +0 -46
  352. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js.map +0 -1
  353. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +0 -149
  354. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js.map +0 -1
  355. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +0 -90
  356. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js.map +0 -1
  357. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +0 -41
  358. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js.map +0 -1
  359. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +0 -44
  360. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js.map +0 -1
  361. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +0 -279
  362. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js.map +0 -1
  363. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -38
  364. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js.map +0 -1
  365. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +0 -33
  366. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js.map +0 -1
  367. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +0 -201
  368. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js.map +0 -1
  369. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +0 -84
  370. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js.map +0 -1
  371. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +0 -14
  372. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js.map +0 -1
  373. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +0 -107
  374. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js.map +0 -1
  375. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +0 -61
  376. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js.map +0 -1
  377. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +0 -64
  378. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js.map +0 -1
  379. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +0 -87
  380. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js.map +0 -1
  381. package/dist/profile.schema-CjLOfG7b.js +0 -92
  382. package/src/modules/auth/controllers/middlewares/visitor.logger.js +0 -75
  383. package/src/modules/auth/controllers/routes/twofa.routes.js +0 -8
  384. package/src/modules/auth/controllers/services/twofa.service.js +0 -30
  385. package/src/modules/auth/models/request.model.js +0 -14
  386. package/src/modules/auth/models/visitor.model.js +0 -11
  387. package/src/modules/auth/views/components/pages/EnterCode.vue +0 -204
  388. package/src/modules/auth/views/components/pages/EnterPassword.vue +0 -123
  389. package/src/modules/auth/views/components/sections/ProfileEditCredentials.vue +0 -329
  390. package/src/modules/auth/views/store/twofa.js +0 -70
  391. package/src/modules/auth//320/220/320/240/320/245/320/230/320/242/320/225/320/232/320/242/320/243/320/240/320/220.md +0 -445
@@ -1,1336 +0,0 @@
1
- var isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
2
- function clone(configObject) {
3
- var div, convertBase, parseNumeric, P = BigNumber2.prototype = { constructor: BigNumber2, toString: null, valueOf: null }, ONE = new BigNumber2(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
4
- prefix: "",
5
- groupSize: 3,
6
- secondaryGroupSize: 0,
7
- groupSeparator: ",",
8
- decimalSeparator: ".",
9
- fractionGroupSize: 0,
10
- fractionGroupSeparator: " ",
11
- // non-breaking space
12
- suffix: ""
13
- }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true;
14
- function BigNumber2(v, b) {
15
- var alphabet, c, caseChanged, e, i, isNum, len, str, x = this;
16
- if (!(x instanceof BigNumber2)) return new BigNumber2(v, b);
17
- if (b == null) {
18
- if (v && v._isBigNumber === true) {
19
- x.s = v.s;
20
- if (!v.c || v.e > MAX_EXP) {
21
- x.c = x.e = null;
22
- } else if (v.e < MIN_EXP) {
23
- x.c = [x.e = 0];
24
- } else {
25
- x.e = v.e;
26
- x.c = v.c.slice();
27
- }
28
- return;
29
- }
30
- if ((isNum = typeof v == "number") && v * 0 == 0) {
31
- x.s = 1 / v < 0 ? (v = -v, -1) : 1;
32
- if (v === ~~v) {
33
- for (e = 0, i = v; i >= 10; i /= 10, e++) ;
34
- if (e > MAX_EXP) {
35
- x.c = x.e = null;
36
- } else {
37
- x.e = e;
38
- x.c = [v];
39
- }
40
- return;
41
- }
42
- str = String(v);
43
- } else {
44
- if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);
45
- x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;
46
- }
47
- if ((e = str.indexOf(".")) > -1) str = str.replace(".", "");
48
- if ((i = str.search(/e/i)) > 0) {
49
- if (e < 0) e = i;
50
- e += +str.slice(i + 1);
51
- str = str.substring(0, i);
52
- } else if (e < 0) {
53
- e = str.length;
54
- }
55
- } else {
56
- intCheck(b, 2, ALPHABET.length, "Base");
57
- if (b == 10 && alphabetHasNormalDecimalDigits) {
58
- x = new BigNumber2(v);
59
- return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
60
- }
61
- str = String(v);
62
- if (isNum = typeof v == "number") {
63
- if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
64
- x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
65
- if (BigNumber2.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
66
- throw Error(tooManyDigits + v);
67
- }
68
- } else {
69
- x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
70
- }
71
- alphabet = ALPHABET.slice(0, b);
72
- e = i = 0;
73
- for (len = str.length; i < len; i++) {
74
- if (alphabet.indexOf(c = str.charAt(i)) < 0) {
75
- if (c == ".") {
76
- if (i > e) {
77
- e = len;
78
- continue;
79
- }
80
- } else if (!caseChanged) {
81
- if (str == str.toUpperCase() && (str = str.toLowerCase()) || str == str.toLowerCase() && (str = str.toUpperCase())) {
82
- caseChanged = true;
83
- i = -1;
84
- e = 0;
85
- continue;
86
- }
87
- }
88
- return parseNumeric(x, String(v), isNum, b);
89
- }
90
- }
91
- isNum = false;
92
- str = convertBase(str, b, 10, x.s);
93
- if ((e = str.indexOf(".")) > -1) str = str.replace(".", "");
94
- else e = str.length;
95
- }
96
- for (i = 0; str.charCodeAt(i) === 48; i++) ;
97
- for (len = str.length; str.charCodeAt(--len) === 48; ) ;
98
- if (str = str.slice(i, ++len)) {
99
- len -= i;
100
- if (isNum && BigNumber2.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
101
- throw Error(tooManyDigits + x.s * v);
102
- }
103
- if ((e = e - i - 1) > MAX_EXP) {
104
- x.c = x.e = null;
105
- } else if (e < MIN_EXP) {
106
- x.c = [x.e = 0];
107
- } else {
108
- x.e = e;
109
- x.c = [];
110
- i = (e + 1) % LOG_BASE;
111
- if (e < 0) i += LOG_BASE;
112
- if (i < len) {
113
- if (i) x.c.push(+str.slice(0, i));
114
- for (len -= LOG_BASE; i < len; ) {
115
- x.c.push(+str.slice(i, i += LOG_BASE));
116
- }
117
- i = LOG_BASE - (str = str.slice(i)).length;
118
- } else {
119
- i -= len;
120
- }
121
- for (; i--; str += "0") ;
122
- x.c.push(+str);
123
- }
124
- } else {
125
- x.c = [x.e = 0];
126
- }
127
- }
128
- BigNumber2.clone = clone;
129
- BigNumber2.ROUND_UP = 0;
130
- BigNumber2.ROUND_DOWN = 1;
131
- BigNumber2.ROUND_CEIL = 2;
132
- BigNumber2.ROUND_FLOOR = 3;
133
- BigNumber2.ROUND_HALF_UP = 4;
134
- BigNumber2.ROUND_HALF_DOWN = 5;
135
- BigNumber2.ROUND_HALF_EVEN = 6;
136
- BigNumber2.ROUND_HALF_CEIL = 7;
137
- BigNumber2.ROUND_HALF_FLOOR = 8;
138
- BigNumber2.EUCLID = 9;
139
- BigNumber2.config = BigNumber2.set = function(obj) {
140
- var p, v;
141
- if (obj != null) {
142
- if (typeof obj == "object") {
143
- if (obj.hasOwnProperty(p = "DECIMAL_PLACES")) {
144
- v = obj[p];
145
- intCheck(v, 0, MAX, p);
146
- DECIMAL_PLACES = v;
147
- }
148
- if (obj.hasOwnProperty(p = "ROUNDING_MODE")) {
149
- v = obj[p];
150
- intCheck(v, 0, 8, p);
151
- ROUNDING_MODE = v;
152
- }
153
- if (obj.hasOwnProperty(p = "EXPONENTIAL_AT")) {
154
- v = obj[p];
155
- if (v && v.pop) {
156
- intCheck(v[0], -MAX, 0, p);
157
- intCheck(v[1], 0, MAX, p);
158
- TO_EXP_NEG = v[0];
159
- TO_EXP_POS = v[1];
160
- } else {
161
- intCheck(v, -MAX, MAX, p);
162
- TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);
163
- }
164
- }
165
- if (obj.hasOwnProperty(p = "RANGE")) {
166
- v = obj[p];
167
- if (v && v.pop) {
168
- intCheck(v[0], -MAX, -1, p);
169
- intCheck(v[1], 1, MAX, p);
170
- MIN_EXP = v[0];
171
- MAX_EXP = v[1];
172
- } else {
173
- intCheck(v, -MAX, MAX, p);
174
- if (v) {
175
- MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);
176
- } else {
177
- throw Error(bignumberError + p + " cannot be zero: " + v);
178
- }
179
- }
180
- }
181
- if (obj.hasOwnProperty(p = "CRYPTO")) {
182
- v = obj[p];
183
- if (v === !!v) {
184
- if (v) {
185
- if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) {
186
- CRYPTO = v;
187
- } else {
188
- CRYPTO = !v;
189
- throw Error(bignumberError + "crypto unavailable");
190
- }
191
- } else {
192
- CRYPTO = v;
193
- }
194
- } else {
195
- throw Error(bignumberError + p + " not true or false: " + v);
196
- }
197
- }
198
- if (obj.hasOwnProperty(p = "MODULO_MODE")) {
199
- v = obj[p];
200
- intCheck(v, 0, 9, p);
201
- MODULO_MODE = v;
202
- }
203
- if (obj.hasOwnProperty(p = "POW_PRECISION")) {
204
- v = obj[p];
205
- intCheck(v, 0, MAX, p);
206
- POW_PRECISION = v;
207
- }
208
- if (obj.hasOwnProperty(p = "FORMAT")) {
209
- v = obj[p];
210
- if (typeof v == "object") FORMAT = v;
211
- else throw Error(bignumberError + p + " not an object: " + v);
212
- }
213
- if (obj.hasOwnProperty(p = "ALPHABET")) {
214
- v = obj[p];
215
- if (typeof v == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) {
216
- alphabetHasNormalDecimalDigits = v.slice(0, 10) == "0123456789";
217
- ALPHABET = v;
218
- } else {
219
- throw Error(bignumberError + p + " invalid: " + v);
220
- }
221
- }
222
- } else {
223
- throw Error(bignumberError + "Object expected: " + obj);
224
- }
225
- }
226
- return {
227
- DECIMAL_PLACES,
228
- ROUNDING_MODE,
229
- EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],
230
- RANGE: [MIN_EXP, MAX_EXP],
231
- CRYPTO,
232
- MODULO_MODE,
233
- POW_PRECISION,
234
- FORMAT,
235
- ALPHABET
236
- };
237
- };
238
- BigNumber2.isBigNumber = function(v) {
239
- if (!v || v._isBigNumber !== true) return false;
240
- if (!BigNumber2.DEBUG) return true;
241
- var i, n, c = v.c, e = v.e, s = v.s;
242
- out: if ({}.toString.call(c) == "[object Array]") {
243
- if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {
244
- if (c[0] === 0) {
245
- if (e === 0 && c.length === 1) return true;
246
- break out;
247
- }
248
- i = (e + 1) % LOG_BASE;
249
- if (i < 1) i += LOG_BASE;
250
- if (String(c[0]).length == i) {
251
- for (i = 0; i < c.length; i++) {
252
- n = c[i];
253
- if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;
254
- }
255
- if (n !== 0) return true;
256
- }
257
- }
258
- } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {
259
- return true;
260
- }
261
- throw Error(bignumberError + "Invalid BigNumber: " + v);
262
- };
263
- BigNumber2.maximum = BigNumber2.max = function() {
264
- return maxOrMin(arguments, -1);
265
- };
266
- BigNumber2.minimum = BigNumber2.min = function() {
267
- return maxOrMin(arguments, 1);
268
- };
269
- BigNumber2.random = (function() {
270
- var pow2_53 = 9007199254740992;
271
- var random53bitInt = Math.random() * pow2_53 & 2097151 ? function() {
272
- return mathfloor(Math.random() * pow2_53);
273
- } : function() {
274
- return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
275
- };
276
- return function(dp) {
277
- var a, b, e, k, v, i = 0, c = [], rand = new BigNumber2(ONE);
278
- if (dp == null) dp = DECIMAL_PLACES;
279
- else intCheck(dp, 0, MAX);
280
- k = mathceil(dp / LOG_BASE);
281
- if (CRYPTO) {
282
- if (crypto.getRandomValues) {
283
- a = crypto.getRandomValues(new Uint32Array(k *= 2));
284
- for (; i < k; ) {
285
- v = a[i] * 131072 + (a[i + 1] >>> 11);
286
- if (v >= 9e15) {
287
- b = crypto.getRandomValues(new Uint32Array(2));
288
- a[i] = b[0];
289
- a[i + 1] = b[1];
290
- } else {
291
- c.push(v % 1e14);
292
- i += 2;
293
- }
294
- }
295
- i = k / 2;
296
- } else if (crypto.randomBytes) {
297
- a = crypto.randomBytes(k *= 7);
298
- for (; i < k; ) {
299
- v = (a[i] & 31) * 281474976710656 + a[i + 1] * 1099511627776 + a[i + 2] * 4294967296 + a[i + 3] * 16777216 + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];
300
- if (v >= 9e15) {
301
- crypto.randomBytes(7).copy(a, i);
302
- } else {
303
- c.push(v % 1e14);
304
- i += 7;
305
- }
306
- }
307
- i = k / 7;
308
- } else {
309
- CRYPTO = false;
310
- throw Error(bignumberError + "crypto unavailable");
311
- }
312
- }
313
- if (!CRYPTO) {
314
- for (; i < k; ) {
315
- v = random53bitInt();
316
- if (v < 9e15) c[i++] = v % 1e14;
317
- }
318
- }
319
- k = c[--i];
320
- dp %= LOG_BASE;
321
- if (k && dp) {
322
- v = POWS_TEN[LOG_BASE - dp];
323
- c[i] = mathfloor(k / v) * v;
324
- }
325
- for (; c[i] === 0; c.pop(), i--) ;
326
- if (i < 0) {
327
- c = [e = 0];
328
- } else {
329
- for (e = -1; c[0] === 0; c.splice(0, 1), e -= LOG_BASE) ;
330
- for (i = 1, v = c[0]; v >= 10; v /= 10, i++) ;
331
- if (i < LOG_BASE) e -= LOG_BASE - i;
332
- }
333
- rand.e = e;
334
- rand.c = c;
335
- return rand;
336
- };
337
- })();
338
- BigNumber2.sum = function() {
339
- var i = 1, args = arguments, sum = new BigNumber2(args[0]);
340
- for (; i < args.length; ) sum = sum.plus(args[i++]);
341
- return sum;
342
- };
343
- convertBase = /* @__PURE__ */ (function() {
344
- var decimal = "0123456789";
345
- function toBaseOut(str, baseIn, baseOut, alphabet) {
346
- var j, arr = [0], arrL, i = 0, len = str.length;
347
- for (; i < len; ) {
348
- for (arrL = arr.length; arrL--; arr[arrL] *= baseIn) ;
349
- arr[0] += alphabet.indexOf(str.charAt(i++));
350
- for (j = 0; j < arr.length; j++) {
351
- if (arr[j] > baseOut - 1) {
352
- if (arr[j + 1] == null) arr[j + 1] = 0;
353
- arr[j + 1] += arr[j] / baseOut | 0;
354
- arr[j] %= baseOut;
355
- }
356
- }
357
- }
358
- return arr.reverse();
359
- }
360
- return function(str, baseIn, baseOut, sign, callerIsToString) {
361
- var alphabet, d, e, k, r, x, xc, y, i = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
362
- if (i >= 0) {
363
- k = POW_PRECISION;
364
- POW_PRECISION = 0;
365
- str = str.replace(".", "");
366
- y = new BigNumber2(baseIn);
367
- x = y.pow(str.length - i);
368
- POW_PRECISION = k;
369
- y.c = toBaseOut(
370
- toFixedPoint(coeffToString(x.c), x.e, "0"),
371
- 10,
372
- baseOut,
373
- decimal
374
- );
375
- y.e = y.c.length;
376
- }
377
- xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet = ALPHABET, decimal) : (alphabet = decimal, ALPHABET));
378
- e = k = xc.length;
379
- for (; xc[--k] == 0; xc.pop()) ;
380
- if (!xc[0]) return alphabet.charAt(0);
381
- if (i < 0) {
382
- --e;
383
- } else {
384
- x.c = xc;
385
- x.e = e;
386
- x.s = sign;
387
- x = div(x, y, dp, rm, baseOut);
388
- xc = x.c;
389
- r = x.r;
390
- e = x.e;
391
- }
392
- d = e + dp + 1;
393
- i = xc[d];
394
- k = baseOut / 2;
395
- r = r || d < 0 || xc[d + 1] != null;
396
- r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : i > k || i == k && (rm == 4 || r || rm == 6 && xc[d - 1] & 1 || rm == (x.s < 0 ? 8 : 7));
397
- if (d < 1 || !xc[0]) {
398
- str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
399
- } else {
400
- xc.length = d;
401
- if (r) {
402
- for (--baseOut; ++xc[--d] > baseOut; ) {
403
- xc[d] = 0;
404
- if (!d) {
405
- ++e;
406
- xc = [1].concat(xc);
407
- }
408
- }
409
- }
410
- for (k = xc.length; !xc[--k]; ) ;
411
- for (i = 0, str = ""; i <= k; str += alphabet.charAt(xc[i++])) ;
412
- str = toFixedPoint(str, e, alphabet.charAt(0));
413
- }
414
- return str;
415
- };
416
- })();
417
- div = /* @__PURE__ */ (function() {
418
- function multiply(x, k, base) {
419
- var m, temp, xlo, xhi, carry = 0, i = x.length, klo = k % SQRT_BASE, khi = k / SQRT_BASE | 0;
420
- for (x = x.slice(); i--; ) {
421
- xlo = x[i] % SQRT_BASE;
422
- xhi = x[i] / SQRT_BASE | 0;
423
- m = khi * xlo + xhi * klo;
424
- temp = klo * xlo + m % SQRT_BASE * SQRT_BASE + carry;
425
- carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;
426
- x[i] = temp % base;
427
- }
428
- if (carry) x = [carry].concat(x);
429
- return x;
430
- }
431
- function compare2(a, b, aL, bL) {
432
- var i, cmp;
433
- if (aL != bL) {
434
- cmp = aL > bL ? 1 : -1;
435
- } else {
436
- for (i = cmp = 0; i < aL; i++) {
437
- if (a[i] != b[i]) {
438
- cmp = a[i] > b[i] ? 1 : -1;
439
- break;
440
- }
441
- }
442
- }
443
- return cmp;
444
- }
445
- function subtract(a, b, aL, base) {
446
- var i = 0;
447
- for (; aL--; ) {
448
- a[aL] -= i;
449
- i = a[aL] < b[aL] ? 1 : 0;
450
- a[aL] = i * base + a[aL] - b[aL];
451
- }
452
- for (; !a[0] && a.length > 1; a.splice(0, 1)) ;
453
- }
454
- return function(x, y, dp, rm, base) {
455
- var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s = x.s == y.s ? 1 : -1, xc = x.c, yc = y.c;
456
- if (!xc || !xc[0] || !yc || !yc[0]) {
457
- return new BigNumber2(
458
- // Return NaN if either NaN, or both Infinity or 0.
459
- !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : (
460
- // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
461
- xc && xc[0] == 0 || !yc ? s * 0 : s / 0
462
- )
463
- );
464
- }
465
- q = new BigNumber2(s);
466
- qc = q.c = [];
467
- e = x.e - y.e;
468
- s = dp + e + 1;
469
- if (!base) {
470
- base = BASE;
471
- e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);
472
- s = s / LOG_BASE | 0;
473
- }
474
- for (i = 0; yc[i] == (xc[i] || 0); i++) ;
475
- if (yc[i] > (xc[i] || 0)) e--;
476
- if (s < 0) {
477
- qc.push(1);
478
- more = true;
479
- } else {
480
- xL = xc.length;
481
- yL = yc.length;
482
- i = 0;
483
- s += 2;
484
- n = mathfloor(base / (yc[0] + 1));
485
- if (n > 1) {
486
- yc = multiply(yc, n, base);
487
- xc = multiply(xc, n, base);
488
- yL = yc.length;
489
- xL = xc.length;
490
- }
491
- xi = yL;
492
- rem = xc.slice(0, yL);
493
- remL = rem.length;
494
- for (; remL < yL; rem[remL++] = 0) ;
495
- yz = yc.slice();
496
- yz = [0].concat(yz);
497
- yc0 = yc[0];
498
- if (yc[1] >= base / 2) yc0++;
499
- do {
500
- n = 0;
501
- cmp = compare2(yc, rem, yL, remL);
502
- if (cmp < 0) {
503
- rem0 = rem[0];
504
- if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);
505
- n = mathfloor(rem0 / yc0);
506
- if (n > 1) {
507
- if (n >= base) n = base - 1;
508
- prod = multiply(yc, n, base);
509
- prodL = prod.length;
510
- remL = rem.length;
511
- while (compare2(prod, rem, prodL, remL) == 1) {
512
- n--;
513
- subtract(prod, yL < prodL ? yz : yc, prodL, base);
514
- prodL = prod.length;
515
- cmp = 1;
516
- }
517
- } else {
518
- if (n == 0) {
519
- cmp = n = 1;
520
- }
521
- prod = yc.slice();
522
- prodL = prod.length;
523
- }
524
- if (prodL < remL) prod = [0].concat(prod);
525
- subtract(rem, prod, remL, base);
526
- remL = rem.length;
527
- if (cmp == -1) {
528
- while (compare2(yc, rem, yL, remL) < 1) {
529
- n++;
530
- subtract(rem, yL < remL ? yz : yc, remL, base);
531
- remL = rem.length;
532
- }
533
- }
534
- } else if (cmp === 0) {
535
- n++;
536
- rem = [0];
537
- }
538
- qc[i++] = n;
539
- if (rem[0]) {
540
- rem[remL++] = xc[xi] || 0;
541
- } else {
542
- rem = [xc[xi]];
543
- remL = 1;
544
- }
545
- } while ((xi++ < xL || rem[0] != null) && s--);
546
- more = rem[0] != null;
547
- if (!qc[0]) qc.splice(0, 1);
548
- }
549
- if (base == BASE) {
550
- for (i = 1, s = qc[0]; s >= 10; s /= 10, i++) ;
551
- round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);
552
- } else {
553
- q.e = e;
554
- q.r = +more;
555
- }
556
- return q;
557
- };
558
- })();
559
- function format(n, i, rm, id) {
560
- var c0, e, ne, len, str;
561
- if (rm == null) rm = ROUNDING_MODE;
562
- else intCheck(rm, 0, 8);
563
- if (!n.c) return n.toString();
564
- c0 = n.c[0];
565
- ne = n.e;
566
- if (i == null) {
567
- str = coeffToString(n.c);
568
- str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) ? toExponential(str, ne) : toFixedPoint(str, ne, "0");
569
- } else {
570
- n = round(new BigNumber2(n), i, rm);
571
- e = n.e;
572
- str = coeffToString(n.c);
573
- len = str.length;
574
- if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {
575
- for (; len < i; str += "0", len++) ;
576
- str = toExponential(str, e);
577
- } else {
578
- i -= ne;
579
- str = toFixedPoint(str, e, "0");
580
- if (e + 1 > len) {
581
- if (--i > 0) for (str += "."; i--; str += "0") ;
582
- } else {
583
- i += e - len;
584
- if (i > 0) {
585
- if (e + 1 == len) str += ".";
586
- for (; i--; str += "0") ;
587
- }
588
- }
589
- }
590
- }
591
- return n.s < 0 && c0 ? "-" + str : str;
592
- }
593
- function maxOrMin(args, n) {
594
- var k, y, i = 1, x = new BigNumber2(args[0]);
595
- for (; i < args.length; i++) {
596
- y = new BigNumber2(args[i]);
597
- if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {
598
- x = y;
599
- }
600
- }
601
- return x;
602
- }
603
- function normalise(n, c, e) {
604
- var i = 1, j = c.length;
605
- for (; !c[--j]; c.pop()) ;
606
- for (j = c[0]; j >= 10; j /= 10, i++) ;
607
- if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {
608
- n.c = n.e = null;
609
- } else if (e < MIN_EXP) {
610
- n.c = [n.e = 0];
611
- } else {
612
- n.e = e;
613
- n.c = c;
614
- }
615
- return n;
616
- }
617
- parseNumeric = /* @__PURE__ */ (function() {
618
- var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
619
- return function(x, str, isNum, b) {
620
- var base, s = isNum ? str : str.replace(whitespaceOrPlus, "");
621
- if (isInfinityOrNaN.test(s)) {
622
- x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
623
- } else {
624
- if (!isNum) {
625
- s = s.replace(basePrefix, function(m, p1, p2) {
626
- base = (p2 = p2.toLowerCase()) == "x" ? 16 : p2 == "b" ? 2 : 8;
627
- return !b || b == base ? p1 : m;
628
- });
629
- if (b) {
630
- base = b;
631
- s = s.replace(dotAfter, "$1").replace(dotBefore, "0.$1");
632
- }
633
- if (str != s) return new BigNumber2(s, base);
634
- }
635
- if (BigNumber2.DEBUG) {
636
- throw Error(bignumberError + "Not a" + (b ? " base " + b : "") + " number: " + str);
637
- }
638
- x.s = null;
639
- }
640
- x.c = x.e = null;
641
- };
642
- })();
643
- function round(x, sd, rm, r) {
644
- var d, i, j, k, n, ni, rd, xc = x.c, pows10 = POWS_TEN;
645
- if (xc) {
646
- out: {
647
- for (d = 1, k = xc[0]; k >= 10; k /= 10, d++) ;
648
- i = sd - d;
649
- if (i < 0) {
650
- i += LOG_BASE;
651
- j = sd;
652
- n = xc[ni = 0];
653
- rd = mathfloor(n / pows10[d - j - 1] % 10);
654
- } else {
655
- ni = mathceil((i + 1) / LOG_BASE);
656
- if (ni >= xc.length) {
657
- if (r) {
658
- for (; xc.length <= ni; xc.push(0)) ;
659
- n = rd = 0;
660
- d = 1;
661
- i %= LOG_BASE;
662
- j = i - LOG_BASE + 1;
663
- } else {
664
- break out;
665
- }
666
- } else {
667
- n = k = xc[ni];
668
- for (d = 1; k >= 10; k /= 10, d++) ;
669
- i %= LOG_BASE;
670
- j = i - LOG_BASE + d;
671
- rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);
672
- }
673
- }
674
- r = r || sd < 0 || // Are there any non-zero digits after the rounding digit?
675
- // The expression n % pows10[d - j - 1] returns all digits of n to the right
676
- // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
677
- xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);
678
- r = rm < 4 ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 && // Check whether the digit to the left of the rounding digit is odd.
679
- (i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10 & 1 || rm == (x.s < 0 ? 8 : 7));
680
- if (sd < 1 || !xc[0]) {
681
- xc.length = 0;
682
- if (r) {
683
- sd -= x.e + 1;
684
- xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];
685
- x.e = -sd || 0;
686
- } else {
687
- xc[0] = x.e = 0;
688
- }
689
- return x;
690
- }
691
- if (i == 0) {
692
- xc.length = ni;
693
- k = 1;
694
- ni--;
695
- } else {
696
- xc.length = ni + 1;
697
- k = pows10[LOG_BASE - i];
698
- xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;
699
- }
700
- if (r) {
701
- for (; ; ) {
702
- if (ni == 0) {
703
- for (i = 1, j = xc[0]; j >= 10; j /= 10, i++) ;
704
- j = xc[0] += k;
705
- for (k = 1; j >= 10; j /= 10, k++) ;
706
- if (i != k) {
707
- x.e++;
708
- if (xc[0] == BASE) xc[0] = 1;
709
- }
710
- break;
711
- } else {
712
- xc[ni] += k;
713
- if (xc[ni] != BASE) break;
714
- xc[ni--] = 0;
715
- k = 1;
716
- }
717
- }
718
- }
719
- for (i = xc.length; xc[--i] === 0; xc.pop()) ;
720
- }
721
- if (x.e > MAX_EXP) {
722
- x.c = x.e = null;
723
- } else if (x.e < MIN_EXP) {
724
- x.c = [x.e = 0];
725
- }
726
- }
727
- return x;
728
- }
729
- function valueOf(n) {
730
- var str, e = n.e;
731
- if (e === null) return n.toString();
732
- str = coeffToString(n.c);
733
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(str, e) : toFixedPoint(str, e, "0");
734
- return n.s < 0 ? "-" + str : str;
735
- }
736
- P.absoluteValue = P.abs = function() {
737
- var x = new BigNumber2(this);
738
- if (x.s < 0) x.s = 1;
739
- return x;
740
- };
741
- P.comparedTo = function(y, b) {
742
- return compare(this, new BigNumber2(y, b));
743
- };
744
- P.decimalPlaces = P.dp = function(dp, rm) {
745
- var c, n, v, x = this;
746
- if (dp != null) {
747
- intCheck(dp, 0, MAX);
748
- if (rm == null) rm = ROUNDING_MODE;
749
- else intCheck(rm, 0, 8);
750
- return round(new BigNumber2(x), dp + x.e + 1, rm);
751
- }
752
- if (!(c = x.c)) return null;
753
- n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
754
- if (v = c[v]) for (; v % 10 == 0; v /= 10, n--) ;
755
- if (n < 0) n = 0;
756
- return n;
757
- };
758
- P.dividedBy = P.div = function(y, b) {
759
- return div(this, new BigNumber2(y, b), DECIMAL_PLACES, ROUNDING_MODE);
760
- };
761
- P.dividedToIntegerBy = P.idiv = function(y, b) {
762
- return div(this, new BigNumber2(y, b), 0, 1);
763
- };
764
- P.exponentiatedBy = P.pow = function(n, m) {
765
- var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this;
766
- n = new BigNumber2(n);
767
- if (n.c && !n.isInteger()) {
768
- throw Error(bignumberError + "Exponent not an integer: " + valueOf(n));
769
- }
770
- if (m != null) m = new BigNumber2(m);
771
- nIsBig = n.e > 14;
772
- if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
773
- y = new BigNumber2(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));
774
- return m ? y.mod(m) : y;
775
- }
776
- nIsNeg = n.s < 0;
777
- if (m) {
778
- if (m.c ? !m.c[0] : !m.s) return new BigNumber2(NaN);
779
- isModExp = !nIsNeg && x.isInteger() && m.isInteger();
780
- if (isModExp) x = x.mod(m);
781
- } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {
782
- k = x.s < 0 && isOdd(n) ? -0 : 0;
783
- if (x.e > -1) k = 1 / k;
784
- return new BigNumber2(nIsNeg ? 1 / k : k);
785
- } else if (POW_PRECISION) {
786
- k = mathceil(POW_PRECISION / LOG_BASE + 2);
787
- }
788
- if (nIsBig) {
789
- half = new BigNumber2(0.5);
790
- if (nIsNeg) n.s = 1;
791
- nIsOdd = isOdd(n);
792
- } else {
793
- i = Math.abs(+valueOf(n));
794
- nIsOdd = i % 2;
795
- }
796
- y = new BigNumber2(ONE);
797
- for (; ; ) {
798
- if (nIsOdd) {
799
- y = y.times(x);
800
- if (!y.c) break;
801
- if (k) {
802
- if (y.c.length > k) y.c.length = k;
803
- } else if (isModExp) {
804
- y = y.mod(m);
805
- }
806
- }
807
- if (i) {
808
- i = mathfloor(i / 2);
809
- if (i === 0) break;
810
- nIsOdd = i % 2;
811
- } else {
812
- n = n.times(half);
813
- round(n, n.e + 1, 1);
814
- if (n.e > 14) {
815
- nIsOdd = isOdd(n);
816
- } else {
817
- i = +valueOf(n);
818
- if (i === 0) break;
819
- nIsOdd = i % 2;
820
- }
821
- }
822
- x = x.times(x);
823
- if (k) {
824
- if (x.c && x.c.length > k) x.c.length = k;
825
- } else if (isModExp) {
826
- x = x.mod(m);
827
- }
828
- }
829
- if (isModExp) return y;
830
- if (nIsNeg) y = ONE.div(y);
831
- return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
832
- };
833
- P.integerValue = function(rm) {
834
- var n = new BigNumber2(this);
835
- if (rm == null) rm = ROUNDING_MODE;
836
- else intCheck(rm, 0, 8);
837
- return round(n, n.e + 1, rm);
838
- };
839
- P.isEqualTo = P.eq = function(y, b) {
840
- return compare(this, new BigNumber2(y, b)) === 0;
841
- };
842
- P.isFinite = function() {
843
- return !!this.c;
844
- };
845
- P.isGreaterThan = P.gt = function(y, b) {
846
- return compare(this, new BigNumber2(y, b)) > 0;
847
- };
848
- P.isGreaterThanOrEqualTo = P.gte = function(y, b) {
849
- return (b = compare(this, new BigNumber2(y, b))) === 1 || b === 0;
850
- };
851
- P.isInteger = function() {
852
- return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
853
- };
854
- P.isLessThan = P.lt = function(y, b) {
855
- return compare(this, new BigNumber2(y, b)) < 0;
856
- };
857
- P.isLessThanOrEqualTo = P.lte = function(y, b) {
858
- return (b = compare(this, new BigNumber2(y, b))) === -1 || b === 0;
859
- };
860
- P.isNaN = function() {
861
- return !this.s;
862
- };
863
- P.isNegative = function() {
864
- return this.s < 0;
865
- };
866
- P.isPositive = function() {
867
- return this.s > 0;
868
- };
869
- P.isZero = function() {
870
- return !!this.c && this.c[0] == 0;
871
- };
872
- P.minus = function(y, b) {
873
- var i, j, t, xLTy, x = this, a = x.s;
874
- y = new BigNumber2(y, b);
875
- b = y.s;
876
- if (!a || !b) return new BigNumber2(NaN);
877
- if (a != b) {
878
- y.s = -b;
879
- return x.plus(y);
880
- }
881
- var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
882
- if (!xe || !ye) {
883
- if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber2(yc ? x : NaN);
884
- if (!xc[0] || !yc[0]) {
885
- return yc[0] ? (y.s = -b, y) : new BigNumber2(xc[0] ? x : (
886
- // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
887
- ROUNDING_MODE == 3 ? -0 : 0
888
- ));
889
- }
890
- }
891
- xe = bitFloor(xe);
892
- ye = bitFloor(ye);
893
- xc = xc.slice();
894
- if (a = xe - ye) {
895
- if (xLTy = a < 0) {
896
- a = -a;
897
- t = xc;
898
- } else {
899
- ye = xe;
900
- t = yc;
901
- }
902
- t.reverse();
903
- for (b = a; b--; t.push(0)) ;
904
- t.reverse();
905
- } else {
906
- j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;
907
- for (a = b = 0; b < j; b++) {
908
- if (xc[b] != yc[b]) {
909
- xLTy = xc[b] < yc[b];
910
- break;
911
- }
912
- }
913
- }
914
- if (xLTy) {
915
- t = xc;
916
- xc = yc;
917
- yc = t;
918
- y.s = -y.s;
919
- }
920
- b = (j = yc.length) - (i = xc.length);
921
- if (b > 0) for (; b--; xc[i++] = 0) ;
922
- b = BASE - 1;
923
- for (; j > a; ) {
924
- if (xc[--j] < yc[j]) {
925
- for (i = j; i && !xc[--i]; xc[i] = b) ;
926
- --xc[i];
927
- xc[j] += BASE;
928
- }
929
- xc[j] -= yc[j];
930
- }
931
- for (; xc[0] == 0; xc.splice(0, 1), --ye) ;
932
- if (!xc[0]) {
933
- y.s = ROUNDING_MODE == 3 ? -1 : 1;
934
- y.c = [y.e = 0];
935
- return y;
936
- }
937
- return normalise(y, xc, ye);
938
- };
939
- P.modulo = P.mod = function(y, b) {
940
- var q, s, x = this;
941
- y = new BigNumber2(y, b);
942
- if (!x.c || !y.s || y.c && !y.c[0]) {
943
- return new BigNumber2(NaN);
944
- } else if (!y.c || x.c && !x.c[0]) {
945
- return new BigNumber2(x);
946
- }
947
- if (MODULO_MODE == 9) {
948
- s = y.s;
949
- y.s = 1;
950
- q = div(x, y, 0, 3);
951
- y.s = s;
952
- q.s *= s;
953
- } else {
954
- q = div(x, y, 0, MODULO_MODE);
955
- }
956
- y = x.minus(q.times(y));
957
- if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;
958
- return y;
959
- };
960
- P.multipliedBy = P.times = function(y, b) {
961
- var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber2(y, b)).c;
962
- if (!xc || !yc || !xc[0] || !yc[0]) {
963
- if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
964
- y.c = y.e = y.s = null;
965
- } else {
966
- y.s *= x.s;
967
- if (!xc || !yc) {
968
- y.c = y.e = null;
969
- } else {
970
- y.c = [0];
971
- y.e = 0;
972
- }
973
- }
974
- return y;
975
- }
976
- e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);
977
- y.s *= x.s;
978
- xcL = xc.length;
979
- ycL = yc.length;
980
- if (xcL < ycL) {
981
- zc = xc;
982
- xc = yc;
983
- yc = zc;
984
- i = xcL;
985
- xcL = ycL;
986
- ycL = i;
987
- }
988
- for (i = xcL + ycL, zc = []; i--; zc.push(0)) ;
989
- base = BASE;
990
- sqrtBase = SQRT_BASE;
991
- for (i = ycL; --i >= 0; ) {
992
- c = 0;
993
- ylo = yc[i] % sqrtBase;
994
- yhi = yc[i] / sqrtBase | 0;
995
- for (k = xcL, j = i + k; j > i; ) {
996
- xlo = xc[--k] % sqrtBase;
997
- xhi = xc[k] / sqrtBase | 0;
998
- m = yhi * xlo + xhi * ylo;
999
- xlo = ylo * xlo + m % sqrtBase * sqrtBase + zc[j] + c;
1000
- c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;
1001
- zc[j--] = xlo % base;
1002
- }
1003
- zc[j] = c;
1004
- }
1005
- if (c) {
1006
- ++e;
1007
- } else {
1008
- zc.splice(0, 1);
1009
- }
1010
- return normalise(y, zc, e);
1011
- };
1012
- P.negated = function() {
1013
- var x = new BigNumber2(this);
1014
- x.s = -x.s || null;
1015
- return x;
1016
- };
1017
- P.plus = function(y, b) {
1018
- var t, x = this, a = x.s;
1019
- y = new BigNumber2(y, b);
1020
- b = y.s;
1021
- if (!a || !b) return new BigNumber2(NaN);
1022
- if (a != b) {
1023
- y.s = -b;
1024
- return x.minus(y);
1025
- }
1026
- var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
1027
- if (!xe || !ye) {
1028
- if (!xc || !yc) return new BigNumber2(a / 0);
1029
- if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber2(xc[0] ? x : a * 0);
1030
- }
1031
- xe = bitFloor(xe);
1032
- ye = bitFloor(ye);
1033
- xc = xc.slice();
1034
- if (a = xe - ye) {
1035
- if (a > 0) {
1036
- ye = xe;
1037
- t = yc;
1038
- } else {
1039
- a = -a;
1040
- t = xc;
1041
- }
1042
- t.reverse();
1043
- for (; a--; t.push(0)) ;
1044
- t.reverse();
1045
- }
1046
- a = xc.length;
1047
- b = yc.length;
1048
- if (a - b < 0) {
1049
- t = yc;
1050
- yc = xc;
1051
- xc = t;
1052
- b = a;
1053
- }
1054
- for (a = 0; b; ) {
1055
- a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;
1056
- xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;
1057
- }
1058
- if (a) {
1059
- xc = [a].concat(xc);
1060
- ++ye;
1061
- }
1062
- return normalise(y, xc, ye);
1063
- };
1064
- P.precision = P.sd = function(sd, rm) {
1065
- var c, n, v, x = this;
1066
- if (sd != null && sd !== !!sd) {
1067
- intCheck(sd, 1, MAX);
1068
- if (rm == null) rm = ROUNDING_MODE;
1069
- else intCheck(rm, 0, 8);
1070
- return round(new BigNumber2(x), sd, rm);
1071
- }
1072
- if (!(c = x.c)) return null;
1073
- v = c.length - 1;
1074
- n = v * LOG_BASE + 1;
1075
- if (v = c[v]) {
1076
- for (; v % 10 == 0; v /= 10, n--) ;
1077
- for (v = c[0]; v >= 10; v /= 10, n++) ;
1078
- }
1079
- if (sd && x.e + 1 > n) n = x.e + 1;
1080
- return n;
1081
- };
1082
- P.shiftedBy = function(k) {
1083
- intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
1084
- return this.times("1e" + k);
1085
- };
1086
- P.squareRoot = P.sqrt = function() {
1087
- var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber2("0.5");
1088
- if (s !== 1 || !c || !c[0]) {
1089
- return new BigNumber2(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
1090
- }
1091
- s = Math.sqrt(+valueOf(x));
1092
- if (s == 0 || s == 1 / 0) {
1093
- n = coeffToString(c);
1094
- if ((n.length + e) % 2 == 0) n += "0";
1095
- s = Math.sqrt(+n);
1096
- e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
1097
- if (s == 1 / 0) {
1098
- n = "5e" + e;
1099
- } else {
1100
- n = s.toExponential();
1101
- n = n.slice(0, n.indexOf("e") + 1) + e;
1102
- }
1103
- r = new BigNumber2(n);
1104
- } else {
1105
- r = new BigNumber2(s + "");
1106
- }
1107
- if (r.c[0]) {
1108
- e = r.e;
1109
- s = e + dp;
1110
- if (s < 3) s = 0;
1111
- for (; ; ) {
1112
- t = r;
1113
- r = half.times(t.plus(div(x, t, dp, 1)));
1114
- if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {
1115
- if (r.e < e) --s;
1116
- n = n.slice(s - 3, s + 1);
1117
- if (n == "9999" || !rep && n == "4999") {
1118
- if (!rep) {
1119
- round(t, t.e + DECIMAL_PLACES + 2, 0);
1120
- if (t.times(t).eq(x)) {
1121
- r = t;
1122
- break;
1123
- }
1124
- }
1125
- dp += 4;
1126
- s += 4;
1127
- rep = 1;
1128
- } else {
1129
- if (!+n || !+n.slice(1) && n.charAt(0) == "5") {
1130
- round(r, r.e + DECIMAL_PLACES + 2, 1);
1131
- m = !r.times(r).eq(x);
1132
- }
1133
- break;
1134
- }
1135
- }
1136
- }
1137
- }
1138
- return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);
1139
- };
1140
- P.toExponential = function(dp, rm) {
1141
- if (dp != null) {
1142
- intCheck(dp, 0, MAX);
1143
- dp++;
1144
- }
1145
- return format(this, dp, rm, 1);
1146
- };
1147
- P.toFixed = function(dp, rm) {
1148
- if (dp != null) {
1149
- intCheck(dp, 0, MAX);
1150
- dp = dp + this.e + 1;
1151
- }
1152
- return format(this, dp, rm);
1153
- };
1154
- P.toFormat = function(dp, rm, format2) {
1155
- var str, x = this;
1156
- if (format2 == null) {
1157
- if (dp != null && rm && typeof rm == "object") {
1158
- format2 = rm;
1159
- rm = null;
1160
- } else if (dp && typeof dp == "object") {
1161
- format2 = dp;
1162
- dp = rm = null;
1163
- } else {
1164
- format2 = FORMAT;
1165
- }
1166
- } else if (typeof format2 != "object") {
1167
- throw Error(bignumberError + "Argument not an object: " + format2);
1168
- }
1169
- str = x.toFixed(dp, rm);
1170
- if (x.c) {
1171
- var i, arr = str.split("."), g1 = +format2.groupSize, g2 = +format2.secondaryGroupSize, groupSeparator = format2.groupSeparator || "", intPart = arr[0], fractionPart = arr[1], isNeg = x.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length;
1172
- if (g2) {
1173
- i = g1;
1174
- g1 = g2;
1175
- g2 = i;
1176
- len -= i;
1177
- }
1178
- if (g1 > 0 && len > 0) {
1179
- i = len % g1 || g1;
1180
- intPart = intDigits.substr(0, i);
1181
- for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);
1182
- if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);
1183
- if (isNeg) intPart = "-" + intPart;
1184
- }
1185
- str = fractionPart ? intPart + (format2.decimalSeparator || "") + ((g2 = +format2.fractionGroupSize) ? fractionPart.replace(
1186
- new RegExp("\\d{" + g2 + "}\\B", "g"),
1187
- "$&" + (format2.fractionGroupSeparator || "")
1188
- ) : fractionPart) : intPart;
1189
- }
1190
- return (format2.prefix || "") + str + (format2.suffix || "");
1191
- };
1192
- P.toFraction = function(md) {
1193
- var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c;
1194
- if (md != null) {
1195
- n = new BigNumber2(md);
1196
- if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
1197
- throw Error(bignumberError + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n));
1198
- }
1199
- }
1200
- if (!xc) return new BigNumber2(x);
1201
- d = new BigNumber2(ONE);
1202
- n1 = d0 = new BigNumber2(ONE);
1203
- d1 = n0 = new BigNumber2(ONE);
1204
- s = coeffToString(xc);
1205
- e = d.e = s.length - x.e - 1;
1206
- d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
1207
- md = !md || n.comparedTo(d) > 0 ? e > 0 ? d : n1 : n;
1208
- exp = MAX_EXP;
1209
- MAX_EXP = 1 / 0;
1210
- n = new BigNumber2(s);
1211
- n0.c[0] = 0;
1212
- for (; ; ) {
1213
- q = div(n, d, 0, 1);
1214
- d2 = d0.plus(q.times(d1));
1215
- if (d2.comparedTo(md) == 1) break;
1216
- d0 = d1;
1217
- d1 = d2;
1218
- n1 = n0.plus(q.times(d2 = n1));
1219
- n0 = d2;
1220
- d = n.minus(q.times(d2 = d));
1221
- n = d2;
1222
- }
1223
- d2 = div(md.minus(d0), d1, 0, 1);
1224
- n0 = n0.plus(d2.times(n1));
1225
- d0 = d0.plus(d2.times(d1));
1226
- n0.s = n1.s = x.s;
1227
- e = e * 2;
1228
- r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(
1229
- div(n0, d0, e, ROUNDING_MODE).minus(x).abs()
1230
- ) < 1 ? [n1, d1] : [n0, d0];
1231
- MAX_EXP = exp;
1232
- return r;
1233
- };
1234
- P.toNumber = function() {
1235
- return +valueOf(this);
1236
- };
1237
- P.toPrecision = function(sd, rm) {
1238
- if (sd != null) intCheck(sd, 1, MAX);
1239
- return format(this, sd, rm, 2);
1240
- };
1241
- P.toString = function(b) {
1242
- var str, n = this, s = n.s, e = n.e;
1243
- if (e === null) {
1244
- if (s) {
1245
- str = "Infinity";
1246
- if (s < 0) str = "-" + str;
1247
- } else {
1248
- str = "NaN";
1249
- }
1250
- } else {
1251
- if (b == null) {
1252
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, "0");
1253
- } else if (b === 10 && alphabetHasNormalDecimalDigits) {
1254
- n = round(new BigNumber2(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
1255
- str = toFixedPoint(coeffToString(n.c), n.e, "0");
1256
- } else {
1257
- intCheck(b, 2, ALPHABET.length, "Base");
1258
- str = convertBase(toFixedPoint(coeffToString(n.c), e, "0"), 10, b, s, true);
1259
- }
1260
- if (s < 0 && n.c[0]) str = "-" + str;
1261
- }
1262
- return str;
1263
- };
1264
- P.valueOf = P.toJSON = function() {
1265
- return valueOf(this);
1266
- };
1267
- P._isBigNumber = true;
1268
- P[Symbol.toStringTag] = "BigNumber";
1269
- P[Symbol.for("nodejs.util.inspect.custom")] = P.valueOf;
1270
- if (configObject != null) BigNumber2.set(configObject);
1271
- return BigNumber2;
1272
- }
1273
- function bitFloor(n) {
1274
- var i = n | 0;
1275
- return n > 0 || n === i ? i : i - 1;
1276
- }
1277
- function coeffToString(a) {
1278
- var s, z, i = 1, j = a.length, r = a[0] + "";
1279
- for (; i < j; ) {
1280
- s = a[i++] + "";
1281
- z = LOG_BASE - s.length;
1282
- for (; z--; s = "0" + s) ;
1283
- r += s;
1284
- }
1285
- for (j = r.length; r.charCodeAt(--j) === 48; ) ;
1286
- return r.slice(0, j + 1 || 1);
1287
- }
1288
- function compare(x, y) {
1289
- var a, b, xc = x.c, yc = y.c, i = x.s, j = y.s, k = x.e, l = y.e;
1290
- if (!i || !j) return null;
1291
- a = xc && !xc[0];
1292
- b = yc && !yc[0];
1293
- if (a || b) return a ? b ? 0 : -j : i;
1294
- if (i != j) return i;
1295
- a = i < 0;
1296
- b = k == l;
1297
- if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;
1298
- if (!b) return k > l ^ a ? 1 : -1;
1299
- j = (k = xc.length) < (l = yc.length) ? k : l;
1300
- for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;
1301
- return k == l ? 0 : k > l ^ a ? 1 : -1;
1302
- }
1303
- function intCheck(n, min, max, name) {
1304
- if (n < min || n > max || n !== mathfloor(n)) {
1305
- throw Error(bignumberError + (name || "Argument") + (typeof n == "number" ? n < min || n > max ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(n));
1306
- }
1307
- }
1308
- function isOdd(n) {
1309
- var k = n.c.length - 1;
1310
- return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;
1311
- }
1312
- function toExponential(str, e) {
1313
- return (str.length > 1 ? str.charAt(0) + "." + str.slice(1) : str) + (e < 0 ? "e" : "e+") + e;
1314
- }
1315
- function toFixedPoint(str, e, z) {
1316
- var len, zs;
1317
- if (e < 0) {
1318
- for (zs = z + "."; ++e; zs += z) ;
1319
- str = zs + str;
1320
- } else {
1321
- len = str.length;
1322
- if (++e > len) {
1323
- for (zs = z, e -= len; --e; zs += z) ;
1324
- str += zs;
1325
- } else if (e < len) {
1326
- str = str.slice(0, e) + "." + str.slice(e);
1327
- }
1328
- }
1329
- return str;
1330
- }
1331
- var BigNumber = clone();
1332
- export {
1333
- BigNumber,
1334
- BigNumber as default
1335
- };
1336
- //# sourceMappingURL=bignumber.js.map