@attocash/cli 0.1.0

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 (400) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +707 -0
  3. package/dist/application/app.d.ts +138 -0
  4. package/dist/application/app.js +654 -0
  5. package/dist/application/operations.d.ts +9 -0
  6. package/dist/application/operations.js +96 -0
  7. package/dist/cli/cli.d.ts +1 -0
  8. package/dist/cli/cli.js +460 -0
  9. package/dist/cli/help.d.ts +4 -0
  10. package/dist/cli/help.js +49 -0
  11. package/dist/cli/main.d.ts +2 -0
  12. package/dist/cli/main.js +13 -0
  13. package/dist/cli/onboarding.d.ts +14 -0
  14. package/dist/cli/onboarding.js +144 -0
  15. package/dist/cli/output.d.ts +2 -0
  16. package/dist/cli/output.js +231 -0
  17. package/dist/cli/terminal.d.ts +6 -0
  18. package/dist/cli/terminal.js +92 -0
  19. package/dist/cli/update-check.d.ts +1 -0
  20. package/dist/cli/update-check.js +12 -0
  21. package/dist/cli/updates.d.ts +2 -0
  22. package/dist/cli/updates.js +98 -0
  23. package/dist/core.d.ts +14 -0
  24. package/dist/core.js +14 -0
  25. package/dist/doctor/credential-probe.d.ts +7 -0
  26. package/dist/doctor/credential-probe.js +49 -0
  27. package/dist/doctor/doctor.d.ts +4 -0
  28. package/dist/doctor/doctor.js +213 -0
  29. package/dist/doctor/keyring.d.ts +7 -0
  30. package/dist/doctor/keyring.js +150 -0
  31. package/dist/doctor/profile.d.ts +19 -0
  32. package/dist/doctor/profile.js +73 -0
  33. package/dist/doctor/types.d.ts +40 -0
  34. package/dist/doctor/types.js +1 -0
  35. package/dist/domain/amount.d.ts +6 -0
  36. package/dist/domain/amount.js +27 -0
  37. package/dist/domain/errors.d.ts +10 -0
  38. package/dist/domain/errors.js +16 -0
  39. package/dist/labels/directory.d.ts +87 -0
  40. package/dist/labels/directory.js +140 -0
  41. package/dist/labels/personal.d.ts +17 -0
  42. package/dist/labels/personal.js +56 -0
  43. package/dist/labels/presentation.d.ts +154 -0
  44. package/dist/labels/presentation.js +90 -0
  45. package/dist/network/reader.d.ts +31 -0
  46. package/dist/network/reader.js +370 -0
  47. package/dist/network/retry.d.ts +7 -0
  48. package/dist/network/retry.js +53 -0
  49. package/dist/network/work.d.ts +3 -0
  50. package/dist/network/work.js +66 -0
  51. package/dist/pricing/market.d.ts +29 -0
  52. package/dist/pricing/market.js +150 -0
  53. package/dist/pricing/terms.d.ts +6 -0
  54. package/dist/pricing/terms.js +12 -0
  55. package/dist/spending/destination.d.ts +16 -0
  56. package/dist/spending/destination.js +42 -0
  57. package/dist/spending/journal.d.ts +28 -0
  58. package/dist/spending/journal.js +69 -0
  59. package/dist/spending/ledger.d.ts +118 -0
  60. package/dist/spending/ledger.js +444 -0
  61. package/dist/spending/payments.d.ts +67 -0
  62. package/dist/spending/payments.js +424 -0
  63. package/dist/spending/pool.d.ts +13 -0
  64. package/dist/spending/pool.js +38 -0
  65. package/dist/spending/reconcile.d.ts +18 -0
  66. package/dist/spending/reconcile.js +64 -0
  67. package/dist/storage/profiles.d.ts +13 -0
  68. package/dist/storage/profiles.js +86 -0
  69. package/dist/storage/secrets.d.ts +16 -0
  70. package/dist/storage/secrets.js +104 -0
  71. package/dist/storage/state.d.ts +32 -0
  72. package/dist/storage/state.js +255 -0
  73. package/dist/wallet/auto-receive.d.ts +57 -0
  74. package/dist/wallet/auto-receive.js +140 -0
  75. package/dist/wallet/defaults.d.ts +3 -0
  76. package/dist/wallet/defaults.js +26 -0
  77. package/dist/wallet/signing.d.ts +17 -0
  78. package/dist/wallet/signing.js +128 -0
  79. package/dist/wallet/types.d.ts +65 -0
  80. package/dist/wallet/types.js +1 -0
  81. package/dist/wallet/work.d.ts +29 -0
  82. package/dist/wallet/work.js +154 -0
  83. package/dist/watches/manager.d.ts +75 -0
  84. package/dist/watches/manager.js +197 -0
  85. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs +6678 -0
  86. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  87. package/node_modules/@attocash/commons-core/LICENSE +28 -0
  88. package/node_modules/@attocash/commons-core/README.md +118 -0
  89. package/node_modules/@attocash/commons-core/commons-commons-core.d.mts +1036 -0
  90. package/node_modules/@attocash/commons-core/commons-commons-core.mjs +7701 -0
  91. package/node_modules/@attocash/commons-core/commons-commons-core.mjs.map +1 -0
  92. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs +17681 -0
  93. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs.map +1 -0
  94. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  95. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
  96. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs +209 -0
  97. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  98. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs +2284 -0
  99. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  100. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs +6042 -0
  101. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  102. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  103. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  104. package/node_modules/@attocash/commons-core/package.json +27 -0
  105. package/node_modules/@attocash/commons-node/LICENSE +28 -0
  106. package/node_modules/@attocash/commons-node/README.md +92 -0
  107. package/node_modules/@attocash/commons-node/commons-commons-node.d.mts +255 -0
  108. package/node_modules/@attocash/commons-node/commons-commons-node.mjs +2977 -0
  109. package/node_modules/@attocash/commons-node/commons-commons-node.mjs.map +1 -0
  110. package/node_modules/@attocash/commons-node/kotlin-logging.mjs +432 -0
  111. package/node_modules/@attocash/commons-node/kotlin-logging.mjs.map +1 -0
  112. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  113. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  114. package/node_modules/@attocash/commons-node/package.json +29 -0
  115. package/node_modules/@attocash/commons-node-remote/LICENSE +28 -0
  116. package/node_modules/@attocash/commons-node-remote/README.md +61 -0
  117. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.d.mts +122 -0
  118. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs +1810 -0
  119. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs.map +1 -0
  120. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs +432 -0
  121. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs.map +1 -0
  122. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs +8 -0
  123. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs.map +1 -0
  124. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  125. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  126. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  127. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  128. package/node_modules/@attocash/commons-node-remote/package.json +31 -0
  129. package/node_modules/@attocash/commons-transport/LICENSE +28 -0
  130. package/node_modules/@attocash/commons-transport/README.md +5 -0
  131. package/node_modules/@attocash/commons-transport/commons-commons-transport.d.mts +64 -0
  132. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs +249 -0
  133. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs.map +1 -0
  134. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs +263 -0
  135. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs.map +1 -0
  136. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs +8 -0
  137. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs.map +1 -0
  138. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs +11604 -0
  139. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs.map +1 -0
  140. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  141. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  142. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  143. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  144. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs +499 -0
  145. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  146. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs +6456 -0
  147. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs.map +1 -0
  148. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs +83 -0
  149. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs.map +1 -0
  150. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs +1714 -0
  151. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs.map +1 -0
  152. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs +3197 -0
  153. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs.map +1 -0
  154. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs +2290 -0
  155. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs.map +1 -0
  156. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
  157. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -0
  158. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs +482 -0
  159. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  160. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs +165 -0
  161. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs.map +1 -0
  162. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs +4 -0
  163. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs.map +1 -0
  164. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs +3222 -0
  165. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs.map +1 -0
  166. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs +4 -0
  167. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs.map +1 -0
  168. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs +1485 -0
  169. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs.map +1 -0
  170. package/node_modules/@attocash/commons-transport/package.json +29 -0
  171. package/node_modules/@attocash/commons-worker/LICENSE +28 -0
  172. package/node_modules/@attocash/commons-worker/README.md +48 -0
  173. package/node_modules/@attocash/commons-worker/commons-commons-worker.d.mts +73 -0
  174. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs +702 -0
  175. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs.map +1 -0
  176. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs +432 -0
  177. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs.map +1 -0
  178. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  179. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  180. package/node_modules/@attocash/commons-worker/package.json +29 -0
  181. package/node_modules/@attocash/commons-worker-remote/LICENSE +28 -0
  182. package/node_modules/@attocash/commons-worker-remote/README.md +60 -0
  183. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.d.mts +93 -0
  184. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs +289 -0
  185. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs.map +1 -0
  186. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs +432 -0
  187. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs.map +1 -0
  188. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs +8 -0
  189. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs.map +1 -0
  190. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  191. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  192. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  193. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  194. package/node_modules/@attocash/commons-worker-remote/package.json +31 -0
  195. package/node_modules/@js-joda/core/CHANGELOG.md +363 -0
  196. package/node_modules/@js-joda/core/CheatSheet.md +947 -0
  197. package/node_modules/@js-joda/core/LICENSE +34 -0
  198. package/node_modules/@js-joda/core/README.md +155 -0
  199. package/node_modules/@js-joda/core/bower.json +21 -0
  200. package/node_modules/@js-joda/core/dist/js-joda.d.ts +2452 -0
  201. package/node_modules/@js-joda/core/dist/js-joda.esm.js +13564 -0
  202. package/node_modules/@js-joda/core/dist/js-joda.flow.js +949 -0
  203. package/node_modules/@js-joda/core/dist/js-joda.js +13630 -0
  204. package/node_modules/@js-joda/core/dist/js-joda.js.map +1 -0
  205. package/node_modules/@js-joda/core/dist/js-joda.min.js +5 -0
  206. package/node_modules/@js-joda/core/package.json +76 -0
  207. package/node_modules/@js-joda/core/src/Clock.js +330 -0
  208. package/node_modules/@js-joda/core/src/DayOfWeek.js +451 -0
  209. package/node_modules/@js-joda/core/src/Duration.js +1205 -0
  210. package/node_modules/@js-joda/core/src/Enum.js +30 -0
  211. package/node_modules/@js-joda/core/src/Instant.js +1012 -0
  212. package/node_modules/@js-joda/core/src/LocalDate.js +1703 -0
  213. package/node_modules/@js-joda/core/src/LocalDateTime.js +1686 -0
  214. package/node_modules/@js-joda/core/src/LocalTime.js +1415 -0
  215. package/node_modules/@js-joda/core/src/MathUtil.js +236 -0
  216. package/node_modules/@js-joda/core/src/Month.js +600 -0
  217. package/node_modules/@js-joda/core/src/MonthDay.js +730 -0
  218. package/node_modules/@js-joda/core/src/OffsetDateTime.js +757 -0
  219. package/node_modules/@js-joda/core/src/OffsetTime.js +621 -0
  220. package/node_modules/@js-joda/core/src/Period.js +933 -0
  221. package/node_modules/@js-joda/core/src/StringUtil.js +43 -0
  222. package/node_modules/@js-joda/core/src/Year.js +1015 -0
  223. package/node_modules/@js-joda/core/src/YearConstants.js +21 -0
  224. package/node_modules/@js-joda/core/src/YearMonth.js +1096 -0
  225. package/node_modules/@js-joda/core/src/ZoneId.js +236 -0
  226. package/node_modules/@js-joda/core/src/ZoneIdFactory.js +201 -0
  227. package/node_modules/@js-joda/core/src/ZoneOffset.js +486 -0
  228. package/node_modules/@js-joda/core/src/ZoneRegion.js +72 -0
  229. package/node_modules/@js-joda/core/src/ZonedDateTime.js +2007 -0
  230. package/node_modules/@js-joda/core/src/_init.js +68 -0
  231. package/node_modules/@js-joda/core/src/assert.js +33 -0
  232. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDate.js +230 -0
  233. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDateTime.js +130 -0
  234. package/node_modules/@js-joda/core/src/chrono/ChronoZonedDateTime.js +194 -0
  235. package/node_modules/@js-joda/core/src/chrono/IsoChronology.js +235 -0
  236. package/node_modules/@js-joda/core/src/convert.js +83 -0
  237. package/node_modules/@js-joda/core/src/errors.js +54 -0
  238. package/node_modules/@js-joda/core/src/format/DateTimeBuilder.js +535 -0
  239. package/node_modules/@js-joda/core/src/format/DateTimeFormatter.js +728 -0
  240. package/node_modules/@js-joda/core/src/format/DateTimeFormatterBuilder.js +1545 -0
  241. package/node_modules/@js-joda/core/src/format/DateTimeParseContext.js +297 -0
  242. package/node_modules/@js-joda/core/src/format/DateTimePrintContext.js +138 -0
  243. package/node_modules/@js-joda/core/src/format/DecimalStyle.js +113 -0
  244. package/node_modules/@js-joda/core/src/format/EnumMap.js +70 -0
  245. package/node_modules/@js-joda/core/src/format/ParsePosition.js +31 -0
  246. package/node_modules/@js-joda/core/src/format/ResolverStyle.js +93 -0
  247. package/node_modules/@js-joda/core/src/format/SignStyle.js +38 -0
  248. package/node_modules/@js-joda/core/src/format/StringBuilder.js +47 -0
  249. package/node_modules/@js-joda/core/src/format/TextStyle.js +114 -0
  250. package/node_modules/@js-joda/core/src/format/parser/CharLiteralPrinterParser.js +46 -0
  251. package/node_modules/@js-joda/core/src/format/parser/CompositePrinterParser.js +89 -0
  252. package/node_modules/@js-joda/core/src/format/parser/FractionPrinterParser.js +162 -0
  253. package/node_modules/@js-joda/core/src/format/parser/NumberPrinterParser.js +367 -0
  254. package/node_modules/@js-joda/core/src/format/parser/OffsetIdPrinterParser.js +177 -0
  255. package/node_modules/@js-joda/core/src/format/parser/PadPrinterParserDecorator.js +81 -0
  256. package/node_modules/@js-joda/core/src/format/parser/SettingsParser.js +44 -0
  257. package/node_modules/@js-joda/core/src/format/parser/StringLiteralPrinterParser.js +39 -0
  258. package/node_modules/@js-joda/core/src/format/parser/ZoneIdPrinterParser.js +218 -0
  259. package/node_modules/@js-joda/core/src/js-joda.js +210 -0
  260. package/node_modules/@js-joda/core/src/license-preamble.js +3 -0
  261. package/node_modules/@js-joda/core/src/temporal/ChronoField.js +470 -0
  262. package/node_modules/@js-joda/core/src/temporal/ChronoUnit.js +310 -0
  263. package/node_modules/@js-joda/core/src/temporal/DefaultInterfaceTemporal.js +118 -0
  264. package/node_modules/@js-joda/core/src/temporal/IsoFields.js +859 -0
  265. package/node_modules/@js-joda/core/src/temporal/NativeJsTemporal.js +105 -0
  266. package/node_modules/@js-joda/core/src/temporal/Temporal.js +346 -0
  267. package/node_modules/@js-joda/core/src/temporal/TemporalAccessor.js +125 -0
  268. package/node_modules/@js-joda/core/src/temporal/TemporalAdjuster.js +92 -0
  269. package/node_modules/@js-joda/core/src/temporal/TemporalAdjusters.js +464 -0
  270. package/node_modules/@js-joda/core/src/temporal/TemporalAmount.js +166 -0
  271. package/node_modules/@js-joda/core/src/temporal/TemporalField.js +248 -0
  272. package/node_modules/@js-joda/core/src/temporal/TemporalQueries.js +223 -0
  273. package/node_modules/@js-joda/core/src/temporal/TemporalQueriesFactory.js +77 -0
  274. package/node_modules/@js-joda/core/src/temporal/TemporalQuery.js +107 -0
  275. package/node_modules/@js-joda/core/src/temporal/TemporalUnit.js +179 -0
  276. package/node_modules/@js-joda/core/src/temporal/ValueRange.js +257 -0
  277. package/node_modules/@js-joda/core/src/use.js +20 -0
  278. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneId.js +31 -0
  279. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneRules.js +162 -0
  280. package/node_modules/@js-joda/core/src/zone/ZoneOffsetTransition.js +289 -0
  281. package/node_modules/@js-joda/core/src/zone/ZoneRules.js +464 -0
  282. package/node_modules/@js-joda/core/src/zone/ZoneRulesProvider.js +36 -0
  283. package/node_modules/@noble/hashes/LICENSE +21 -0
  284. package/node_modules/@noble/hashes/README.md +563 -0
  285. package/node_modules/@noble/hashes/_blake.d.ts +21 -0
  286. package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
  287. package/node_modules/@noble/hashes/_blake.js +52 -0
  288. package/node_modules/@noble/hashes/_blake.js.map +1 -0
  289. package/node_modules/@noble/hashes/_md.d.ts +99 -0
  290. package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
  291. package/node_modules/@noble/hashes/_md.js +202 -0
  292. package/node_modules/@noble/hashes/_md.js.map +1 -0
  293. package/node_modules/@noble/hashes/_u64.d.ts +63 -0
  294. package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
  295. package/node_modules/@noble/hashes/_u64.js +84 -0
  296. package/node_modules/@noble/hashes/_u64.js.map +1 -0
  297. package/node_modules/@noble/hashes/argon2.d.ts +112 -0
  298. package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
  299. package/node_modules/@noble/hashes/argon2.js +517 -0
  300. package/node_modules/@noble/hashes/argon2.js.map +1 -0
  301. package/node_modules/@noble/hashes/blake1.d.ts +156 -0
  302. package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
  303. package/node_modules/@noble/hashes/blake1.js +560 -0
  304. package/node_modules/@noble/hashes/blake1.js.map +1 -0
  305. package/node_modules/@noble/hashes/blake2.d.ts +184 -0
  306. package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
  307. package/node_modules/@noble/hashes/blake2.js +501 -0
  308. package/node_modules/@noble/hashes/blake2.js.map +1 -0
  309. package/node_modules/@noble/hashes/blake3.d.ts +68 -0
  310. package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
  311. package/node_modules/@noble/hashes/blake3.js +284 -0
  312. package/node_modules/@noble/hashes/blake3.js.map +1 -0
  313. package/node_modules/@noble/hashes/eskdf.d.ts +92 -0
  314. package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
  315. package/node_modules/@noble/hashes/eskdf.js +218 -0
  316. package/node_modules/@noble/hashes/eskdf.js.map +1 -0
  317. package/node_modules/@noble/hashes/hkdf.d.ts +64 -0
  318. package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
  319. package/node_modules/@noble/hashes/hkdf.js +120 -0
  320. package/node_modules/@noble/hashes/hkdf.js.map +1 -0
  321. package/node_modules/@noble/hashes/hmac.d.ts +47 -0
  322. package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
  323. package/node_modules/@noble/hashes/hmac.js +93 -0
  324. package/node_modules/@noble/hashes/hmac.js.map +1 -0
  325. package/node_modules/@noble/hashes/index.d.ts +2 -0
  326. package/node_modules/@noble/hashes/index.d.ts.map +1 -0
  327. package/node_modules/@noble/hashes/index.js +35 -0
  328. package/node_modules/@noble/hashes/index.js.map +1 -0
  329. package/node_modules/@noble/hashes/legacy.d.ts +102 -0
  330. package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
  331. package/node_modules/@noble/hashes/legacy.js +327 -0
  332. package/node_modules/@noble/hashes/legacy.js.map +1 -0
  333. package/node_modules/@noble/hashes/package.json +97 -0
  334. package/node_modules/@noble/hashes/pbkdf2.d.ts +56 -0
  335. package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
  336. package/node_modules/@noble/hashes/pbkdf2.js +135 -0
  337. package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
  338. package/node_modules/@noble/hashes/scrypt.d.ts +65 -0
  339. package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
  340. package/node_modules/@noble/hashes/scrypt.js +257 -0
  341. package/node_modules/@noble/hashes/scrypt.js.map +1 -0
  342. package/node_modules/@noble/hashes/sha2.d.ts +249 -0
  343. package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
  344. package/node_modules/@noble/hashes/sha2.js +458 -0
  345. package/node_modules/@noble/hashes/sha2.js.map +1 -0
  346. package/node_modules/@noble/hashes/sha3-addons.d.ts +461 -0
  347. package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
  348. package/node_modules/@noble/hashes/sha3-addons.js +783 -0
  349. package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
  350. package/node_modules/@noble/hashes/sha3.d.ts +199 -0
  351. package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
  352. package/node_modules/@noble/hashes/sha3.js +431 -0
  353. package/node_modules/@noble/hashes/sha3.js.map +1 -0
  354. package/node_modules/@noble/hashes/src/_blake.ts +57 -0
  355. package/node_modules/@noble/hashes/src/_md.ts +222 -0
  356. package/node_modules/@noble/hashes/src/_u64.ts +117 -0
  357. package/node_modules/@noble/hashes/src/argon2.ts +667 -0
  358. package/node_modules/@noble/hashes/src/blake1.ts +614 -0
  359. package/node_modules/@noble/hashes/src/blake2.ts +582 -0
  360. package/node_modules/@noble/hashes/src/blake3.ts +317 -0
  361. package/node_modules/@noble/hashes/src/eskdf.ts +259 -0
  362. package/node_modules/@noble/hashes/src/hkdf.ts +133 -0
  363. package/node_modules/@noble/hashes/src/hmac.ts +126 -0
  364. package/node_modules/@noble/hashes/src/index.ts +33 -0
  365. package/node_modules/@noble/hashes/src/legacy.ts +339 -0
  366. package/node_modules/@noble/hashes/src/pbkdf2.ts +175 -0
  367. package/node_modules/@noble/hashes/src/scrypt.ts +315 -0
  368. package/node_modules/@noble/hashes/src/sha2.ts +530 -0
  369. package/node_modules/@noble/hashes/src/sha3-addons.ts +983 -0
  370. package/node_modules/@noble/hashes/src/sha3.ts +485 -0
  371. package/node_modules/@noble/hashes/src/utils.ts +848 -0
  372. package/node_modules/@noble/hashes/src/webcrypto.ts +239 -0
  373. package/node_modules/@noble/hashes/utils.d.ts +519 -0
  374. package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
  375. package/node_modules/@noble/hashes/utils.js +578 -0
  376. package/node_modules/@noble/hashes/utils.js.map +1 -0
  377. package/node_modules/@noble/hashes/webcrypto.d.ts +120 -0
  378. package/node_modules/@noble/hashes/webcrypto.d.ts.map +1 -0
  379. package/node_modules/@noble/hashes/webcrypto.js +165 -0
  380. package/node_modules/@noble/hashes/webcrypto.js.map +1 -0
  381. package/node_modules/ws/LICENSE +20 -0
  382. package/node_modules/ws/README.md +548 -0
  383. package/node_modules/ws/browser.js +8 -0
  384. package/node_modules/ws/index.js +22 -0
  385. package/node_modules/ws/lib/buffer-util.js +131 -0
  386. package/node_modules/ws/lib/constants.js +19 -0
  387. package/node_modules/ws/lib/event-target.js +292 -0
  388. package/node_modules/ws/lib/extension.js +203 -0
  389. package/node_modules/ws/lib/limiter.js +55 -0
  390. package/node_modules/ws/lib/permessage-deflate.js +530 -0
  391. package/node_modules/ws/lib/receiver.js +743 -0
  392. package/node_modules/ws/lib/sender.js +607 -0
  393. package/node_modules/ws/lib/stream.js +161 -0
  394. package/node_modules/ws/lib/subprotocol.js +62 -0
  395. package/node_modules/ws/lib/validation.js +152 -0
  396. package/node_modules/ws/lib/websocket-server.js +562 -0
  397. package/node_modules/ws/lib/websocket.js +1407 -0
  398. package/node_modules/ws/package.json +74 -0
  399. package/node_modules/ws/wrapper.mjs +21 -0
  400. package/package.json +53 -0
@@ -0,0 +1,757 @@
1
+ /**
2
+ * @copyright (c) 2016-present, Philipp Thürwächter & Pattrick Hüper & js-joda contributors
3
+ * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4
+ * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
5
+ */
6
+
7
+ import {ChronoField} from './temporal/ChronoField';
8
+ import {ChronoUnit} from './temporal/ChronoUnit';
9
+ import {Clock} from './Clock';
10
+ import {DateTimeFormatter} from './format/DateTimeFormatter';
11
+ import {DefaultInterfaceTemporal} from './temporal/DefaultInterfaceTemporal';
12
+ import {Instant} from './Instant';
13
+ import {IsoChronology} from './chrono/IsoChronology';
14
+ import {LocalDateTime} from './LocalDateTime';
15
+ import {LocalDate} from './LocalDate';
16
+ import {LocalTime} from './LocalTime';
17
+ import {MathUtil} from './MathUtil';
18
+ import {OffsetTime} from './OffsetTime';
19
+ import {TemporalQueries} from './temporal/TemporalQueries';
20
+ import {ZonedDateTime} from './ZonedDateTime';
21
+ import {ZoneId} from './ZoneId';
22
+ import {ZoneOffset} from './ZoneOffset';
23
+ import {DateTimeException, IllegalArgumentException} from './errors';
24
+
25
+ import {createTemporalQuery} from './temporal/TemporalQuery';
26
+ import {requireInstance, requireNonNull} from './assert';
27
+
28
+ /**
29
+ * A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system,
30
+ * such as 2007-12-23T10:15:30+01:00.
31
+ */
32
+ export class OffsetDateTime extends DefaultInterfaceTemporal {
33
+ /**
34
+ * @param {TemporaroAccessor} temporal
35
+ * @return {OffsetDateTime}
36
+ */
37
+ static from(temporal) {
38
+ requireNonNull(temporal, 'temporal');
39
+ if (temporal instanceof OffsetDateTime) {
40
+ return temporal;
41
+ }
42
+ try {
43
+ const offset = ZoneOffset.from(temporal);
44
+ try {
45
+ const ldt = LocalDateTime.from(temporal);
46
+ return OffsetDateTime.of(ldt, offset);
47
+ } catch (_) {
48
+ const instant = Instant.from(temporal);
49
+ return OffsetDateTime.ofInstant(instant, offset);
50
+ }
51
+ } catch (ex) {
52
+ throw new DateTimeException(`Unable to obtain OffsetDateTime TemporalAccessor: ${temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);
53
+ }
54
+ }
55
+
56
+ /**
57
+ * @param {Clock|ZoneId|null} clockOrZone
58
+ * @return {OffsetDateTime}
59
+ */
60
+ static now(clockOrZone) {
61
+ if (arguments.length === 0) {
62
+ return OffsetDateTime.now(Clock.systemDefaultZone());
63
+ } else {
64
+ requireNonNull(clockOrZone, 'clockOrZone');
65
+ if (clockOrZone instanceof ZoneId) {
66
+ return OffsetDateTime.now(Clock.system(clockOrZone));
67
+ } else if (clockOrZone instanceof Clock) {
68
+ const now = clockOrZone.instant(); // called once
69
+ return OffsetDateTime.ofInstant(now, clockOrZone.zone().rules().offset(now));
70
+ } else {
71
+ throw new IllegalArgumentException('clockOrZone must be an instance of ZoneId or Clock');
72
+ }
73
+ }
74
+ }
75
+
76
+ /**
77
+ * @return {OffsetDateTime}
78
+ */
79
+ static of() {
80
+ if (arguments.length <= 2) {
81
+ return OffsetDateTime.ofDateTime.apply(this, arguments);
82
+ } else if (arguments.length === 3) {
83
+ return OffsetDateTime.ofDateAndTime.apply(this, arguments);
84
+ } else {
85
+ return OffsetDateTime.ofNumbers.apply(this, arguments);
86
+ }
87
+ }
88
+
89
+ static ofDateTime(dateTime, offset) {
90
+ return new OffsetDateTime(dateTime, offset);
91
+ }
92
+
93
+ static ofDateAndTime(date, time, offset) {
94
+ const dt = LocalDateTime.of(date, time);
95
+ return new OffsetDateTime(dt, offset);
96
+ }
97
+
98
+ static ofNumbers(year, month, dayOfMonth, hour=0, minute=0, second=0, nanoOfSecond=0, offset) {
99
+ const dt = LocalDateTime.of(year, month, dayOfMonth, hour, minute, second, nanoOfSecond);
100
+ return new OffsetDateTime(dt, offset);
101
+ }
102
+
103
+ /**
104
+ * @param {Instant} instant
105
+ * @param {ZoneId} zone
106
+ * @return {OffsetDateTime}
107
+ */
108
+ static ofInstant(instant, zone){
109
+ requireNonNull(instant, 'instant');
110
+ requireNonNull(zone, 'zone');
111
+ const rules = zone.rules();
112
+ const offset = rules.offset(instant);
113
+ const ldt = LocalDateTime.ofEpochSecond(instant.epochSecond(), instant.nano(), offset);
114
+ return new OffsetDateTime(ldt, offset);
115
+ }
116
+
117
+ /**
118
+ * @param {string} text
119
+ * @param {DateTimeFormatter|undefined} formatter
120
+ * @return {OffsetTime}
121
+ */
122
+ static parse(text, formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME){
123
+ requireNonNull(formatter, 'formatter');
124
+ return formatter.parse(text, OffsetDateTime.FROM);
125
+ }
126
+
127
+ // TODO: Need java.util.Comparater interface.
128
+ // static timeLineOrder() {
129
+ //
130
+ // }
131
+
132
+ //-----------------------------------------------------------------------
133
+
134
+
135
+ /**
136
+ * @param {LocalDateTime} dateTime
137
+ * @param {ZoneOffset} offset
138
+ * @private
139
+ */
140
+ constructor(dateTime, offset) {
141
+ super();
142
+ requireNonNull(dateTime, 'dateTime');
143
+ requireInstance(dateTime, LocalDateTime, 'dateTime');
144
+ requireNonNull(offset, 'offset');
145
+ requireInstance(offset, ZoneOffset, 'offset');
146
+ this._dateTime = dateTime;
147
+ this._offset = offset;
148
+ }
149
+
150
+ /**
151
+ *
152
+ * @param {Temporal} temporal
153
+ * @return {Temporal}
154
+ */
155
+ adjustInto(temporal) {
156
+ return temporal
157
+ .with(ChronoField.EPOCH_DAY, this.toLocalDate().toEpochDay())
158
+ .with(ChronoField.NANO_OF_DAY, this.toLocalTime().toNanoOfDay())
159
+ .with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());
160
+ }
161
+
162
+ until(endExclusive, unit) {
163
+ let end = OffsetDateTime.from(endExclusive);
164
+ if (unit instanceof ChronoUnit) {
165
+ end = end.withOffsetSameInstant(this._offset);
166
+ return this._dateTime.until(end._dateTime, unit);
167
+ }
168
+ return unit.between(this, end);
169
+ }
170
+
171
+ /**
172
+ * @param {ZoneId}zone
173
+ * @return {ZonedDateTime}
174
+ */
175
+ atZoneSameInstant(zone) {
176
+ return ZonedDateTime.ofInstant(this._dateTime, this._offset, zone);
177
+ }
178
+
179
+ /**
180
+ * @param {ZoneId} zone
181
+ * @return {ZonedDateTime}
182
+ */
183
+ atZoneSimilarLocal(zone) {
184
+ return ZonedDateTime.ofLocal(this._dateTime, zone, this._offset);
185
+ }
186
+
187
+ query(query) {
188
+ requireNonNull(query, 'query');
189
+ if (query === TemporalQueries.chronology()) {
190
+ return IsoChronology.INSTANCE;
191
+ } else if (query === TemporalQueries.precision()) {
192
+ return ChronoUnit.NANOS;
193
+ } else if (query === TemporalQueries.offset() || query === TemporalQueries.zone()) {
194
+ return this.offset();
195
+ } else if (query === TemporalQueries.localDate()) {
196
+ return this.toLocalDate();
197
+ } else if (query === TemporalQueries.localTime()) {
198
+ return this.toLocalTime();
199
+ } else if (query === TemporalQueries.zoneId()) {
200
+ return null;
201
+ }
202
+ return super.query(query);
203
+ }
204
+
205
+ get(field) {
206
+ if (field instanceof ChronoField) {
207
+ switch (field) {
208
+ case ChronoField.INSTANT_SECONDS: throw new DateTimeException('Field too large for an int: ' + field);
209
+ case ChronoField.OFFSET_SECONDS: return this.offset().totalSeconds();
210
+ }
211
+ return this._dateTime.get(field);
212
+ }
213
+ return super.get(field);
214
+ }
215
+
216
+ getLong(field) {
217
+ if (field instanceof ChronoField) {
218
+ switch (field) {
219
+ case ChronoField.INSTANT_SECONDS: return this.toEpochSecond();
220
+ case ChronoField.OFFSET_SECONDS: return this.offset().totalSeconds();
221
+ }
222
+ return this._dateTime.getLong(field);
223
+ }
224
+ return field.getFrom(this);
225
+ }
226
+
227
+ /**
228
+ * @return {ZoneOffset}
229
+ */
230
+ offset() {
231
+ return this._offset;
232
+ }
233
+
234
+ /**
235
+ * @return {number} the year, from MIN_YEAR to MAX_YEAR
236
+ */
237
+ year() {
238
+ return this._dateTime.year();
239
+ }
240
+
241
+ /**
242
+ * @return {number} the month-of-year, from 1 to 12
243
+ * @see #month()
244
+ */
245
+ monthValue() {
246
+ return this._dateTime.monthValue();
247
+ }
248
+
249
+ /**
250
+ * @return {{number} }the month-of-year, not null
251
+ * @see #monthValue()
252
+ */
253
+ month() {
254
+ return this._dateTime.month();
255
+ }
256
+
257
+ /**
258
+ * @return {number} the day-of-month, from 1 to 31
259
+ */
260
+ dayOfMonth() {
261
+ return this._dateTime.dayOfMonth();
262
+ }
263
+
264
+ /**
265
+ * @return {number} the day-of-year, from 1 to 365, or 366 in a leap year
266
+ */
267
+ dayOfYear() {
268
+ return this._dateTime.dayOfYear();
269
+ }
270
+
271
+ /**
272
+ * @return {number} the day-of-week, not null
273
+ */
274
+ dayOfWeek() {
275
+ return this._dateTime.dayOfWeek();
276
+ }
277
+
278
+ /**
279
+ * @return {number} the hour-of-day, from 0 to 23
280
+ */
281
+ hour() {
282
+ return this._dateTime.hour();
283
+ }
284
+
285
+ /**
286
+ * @return {number} the minute-of-hour, from 0 to 59
287
+ */
288
+ minute() {
289
+ return this._dateTime.minute();
290
+ }
291
+
292
+ /**
293
+ * @return {number} the second-of-minute, from 0 to 59
294
+ */
295
+ second() {
296
+ return this._dateTime.second();
297
+ }
298
+
299
+ /**
300
+ * @return {number} the nano-of-second, from 0 to 999,999,999
301
+ */
302
+ nano() {
303
+ return this._dateTime.nano();
304
+ }
305
+
306
+ //-----------------------------------------------------------------------
307
+ /**
308
+ * @return {LocalDateTime}the local date-time part of this date-time, not null
309
+ */
310
+ toLocalDateTime() {
311
+ return this._dateTime;
312
+ }
313
+
314
+ /**
315
+ * @return {LocalDate} the date part of this date-time, not null
316
+ */
317
+ toLocalDate() {
318
+ return this._dateTime.toLocalDate();
319
+ }
320
+
321
+ /**
322
+ * @return {LocalTime} the time part of this date-time, not null
323
+ */
324
+ toLocalTime() {
325
+ return this._dateTime.toLocalTime();
326
+ }
327
+
328
+ /**
329
+ * @return {OffsetTime} an OffsetTime representing the time and offset, not null
330
+ */
331
+ toOffsetTime() {
332
+ return OffsetTime.of(this._dateTime.toLocalTime(), this._offset);
333
+ }
334
+
335
+ /**
336
+ * @return {ZonedDateTime}a zoned date-time representing the same local date-time and offset, not null
337
+ */
338
+ toZonedDateTime() {
339
+ return ZonedDateTime.of(this._dateTime, this._offset);
340
+ }
341
+
342
+ /**
343
+ * @return {Instant} an {@code Instant} representing the same instant, not null
344
+ */
345
+ toInstant() {
346
+ return this._dateTime.toInstant(this._offset);
347
+ }
348
+
349
+ /**
350
+ * @return {number} the number of seconds from the epoch of 1970-01-01T00:00:00Z
351
+ */
352
+ toEpochSecond() {
353
+ return this._dateTime.toEpochSecond(this._offset);
354
+ }
355
+
356
+ isSupported(fieldOrUnit) {
357
+ if (fieldOrUnit instanceof ChronoField) {
358
+ return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();
359
+ }
360
+ if (fieldOrUnit instanceof ChronoUnit) {
361
+ return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();
362
+ }
363
+ return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);
364
+ }
365
+
366
+ range(field) {
367
+ if (field instanceof ChronoField) {
368
+ if (field === ChronoField.INSTANT_SECONDS || field === ChronoField.OFFSET_SECONDS) {
369
+ return field.range();
370
+ }
371
+ return this._dateTime.range(field);
372
+ }
373
+ return field.rangeRefinedBy(this);
374
+ }
375
+
376
+ withAdjuster(adjuster) {
377
+ requireNonNull(adjuster);
378
+ // optimizations
379
+ if (adjuster instanceof LocalDate || adjuster instanceof LocalTime || adjuster instanceof LocalDateTime) {
380
+ return this._withDateTimeOffset(this._dateTime.with(adjuster), this._offset);
381
+ } else if (adjuster instanceof Instant) {
382
+ return OffsetDateTime.ofInstant(adjuster, this._offset);
383
+ } else if (adjuster instanceof ZoneOffset) {
384
+ return this._withDateTimeOffset(this._dateTime, adjuster);
385
+ } else if (adjuster instanceof OffsetDateTime) {
386
+ return adjuster;
387
+ }
388
+ return adjuster.adjustInto(this);
389
+ }
390
+
391
+ withFieldValue(field, newValue) {
392
+ requireNonNull(field);
393
+ if (field instanceof ChronoField) {
394
+ const f = field;
395
+ switch (f) {
396
+ case ChronoField.INSTANT_SECONDS: return OffsetDateTime.ofInstant(Instant.ofEpochSecond(newValue, this.nano()), this._offset);
397
+ case ChronoField.OFFSET_SECONDS: {
398
+ return this._withDateTimeOffset(this._dateTime, ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue)));
399
+ }
400
+ }
401
+ return this._withDateTimeOffset(this._dateTime.with(field, newValue), this._offset);
402
+ }
403
+ return field.adjustInto(this, newValue);
404
+ }
405
+
406
+ _withDateTimeOffset(dateTime, offset) {
407
+ if (this._dateTime === dateTime && this._offset.equals(offset)) {
408
+ return this;
409
+ }
410
+ return new OffsetDateTime(dateTime, offset);
411
+ }
412
+
413
+ /**
414
+ * @param {int} year
415
+ * @return {OffsetDateTime}
416
+ */
417
+ withYear(year) {
418
+ return this._withDateTimeOffset(this._dateTime.withYear(year), this._offset);
419
+ }
420
+
421
+ /**
422
+ * @param {int} month
423
+ * @return {OffsetDateTime}
424
+ */
425
+ withMonth(month) {
426
+ return this._withDateTimeOffset(this._dateTime.withMonth(month), this._offset);
427
+ }
428
+
429
+ /**
430
+ * @param {int} dayOfMonth
431
+ * @return {OffsetDateTime}
432
+ */
433
+ withDayOfMonth(dayOfMonth) {
434
+ return this._withDateTimeOffset(this._dateTime.withDayOfMonth(dayOfMonth), this._offset);
435
+ }
436
+
437
+ /**
438
+ * @param {int} dayOfYear
439
+ * @return {OffsetDateTime}
440
+ */
441
+ withDayOfYear(dayOfYear) {
442
+ return this._withDateTimeOffset(this._dateTime.withDayOfYear(dayOfYear), this._offset);
443
+ }
444
+
445
+ /**
446
+ * @param {int} hour
447
+ * @return {OffsetDateTime}
448
+ */
449
+ withHour(hour) {
450
+ return this._withDateTimeOffset(this._dateTime.withHour(hour), this._offset);
451
+ }
452
+
453
+ /**
454
+ * @param {int} minute
455
+ * @return {OffsetDateTime}
456
+ */
457
+ withMinute(minute) {
458
+ return this._withDateTimeOffset(this._dateTime.withMinute(minute), this._offset);
459
+ }
460
+
461
+ /**
462
+ * @param {int} second
463
+ * @return {OffsetDateTime}
464
+ */
465
+ withSecond(second) {
466
+ return this._withDateTimeOffset(this._dateTime.withSecond(second), this._offset);
467
+ }
468
+
469
+ /**
470
+ * @param {int} nanoOfSecond
471
+ * @return {OffsetDateTime}
472
+ */
473
+ withNano(nanoOfSecond) {
474
+ return this._withDateTimeOffset(this._dateTime.withNano(nanoOfSecond), this._offset);
475
+ }
476
+
477
+ /**
478
+ * @param {ZoneOffset} offset
479
+ * @return {OffsetDateTime}
480
+ */
481
+ withOffsetSameLocal(offset) {
482
+ requireNonNull(offset, 'offset');
483
+ return this._withDateTimeOffset(this._dateTime, offset);
484
+ }
485
+
486
+ /**
487
+ * @param {ZoneOffset} offset
488
+ * @return {OffsetDateTime}
489
+ */
490
+ withOffsetSameInstant(offset) {
491
+ requireNonNull(offset, 'offset');
492
+ if (offset.equals(this._offset)) {
493
+ return this;
494
+ }
495
+ const difference = offset.totalSeconds() - this._offset.totalSeconds();
496
+ const adjusted = this._dateTime.plusSeconds(difference);
497
+ return new OffsetDateTime(adjusted, offset);
498
+ }
499
+
500
+ /**
501
+ * @param {TemporalUnit} unit
502
+ * @return {OffsetDateTime}
503
+ */
504
+ truncatedTo(unit) {
505
+ return this._withDateTimeOffset(this._dateTime.truncatedTo(unit), this._offset);
506
+ }
507
+
508
+ plusAmount(amount) {
509
+ requireNonNull(amount, 'amount');
510
+ return amount.addTo(this);
511
+ }
512
+
513
+ plusAmountUnit(amountToAdd, unit) {
514
+ if (unit instanceof ChronoUnit) {
515
+ return this._withDateTimeOffset(this._dateTime.plus(amountToAdd, unit), this._offset);
516
+ }
517
+ return unit.addTo(this, amountToAdd);
518
+ }
519
+
520
+ /**
521
+ * @param {int} years
522
+ * @return {OffsetTime}
523
+ */
524
+ plusYears(years) {
525
+ return this._withDateTimeOffset(this._dateTime.plusYears(years), this._offset);
526
+ }
527
+
528
+ /**
529
+ * @param {int} months
530
+ * @return {OffsetTime}
531
+ */
532
+ plusMonths(months) {
533
+ return this._withDateTimeOffset(this._dateTime.plusMonths(months), this._offset);
534
+ }
535
+
536
+ /**
537
+ * @param {int} weeks
538
+ * @return {OffsetTime}
539
+ */
540
+ plusWeeks(weeks) {
541
+ return this._withDateTimeOffset(this._dateTime.plusWeeks(weeks), this._offset);
542
+ }
543
+
544
+ /**
545
+ * @param {int} days
546
+ * @return {OffsetTime}
547
+ */
548
+ plusDays(days) {
549
+ return this._withDateTimeOffset(this._dateTime.plusDays(days), this._offset);
550
+ }
551
+
552
+ /**
553
+ * @param {int} hours
554
+ * @return {OffsetTime}
555
+ */
556
+ plusHours(hours) {
557
+ return this._withDateTimeOffset(this._dateTime.plusHours(hours), this._offset);
558
+ }
559
+
560
+ /**
561
+ * @param {int} minutes
562
+ * @return {OffsetTime}
563
+ */
564
+ plusMinutes(minutes) {
565
+ return this._withDateTimeOffset(this._dateTime.plusMinutes(minutes), this._offset);
566
+ }
567
+
568
+ /**
569
+ * @param {int} seconds
570
+ * @return {OffsetTime}
571
+ */
572
+ plusSeconds(seconds) {
573
+ return this._withDateTimeOffset(this._dateTime.plusSeconds(seconds), this._offset);
574
+ }
575
+
576
+ /**
577
+ * @param {int} nanos
578
+ * @return {OffsetTime}
579
+ */
580
+ plusNanos(nanos) {
581
+ return this._withDateTimeOffset(this._dateTime.plusNanos(nanos), this._offset);
582
+ }
583
+
584
+ minusAmount(amount) {
585
+ requireNonNull(amount);
586
+ return amount.subtractFrom(this);
587
+ }
588
+
589
+ minusAmountUnit(amountToSubtract, unit) {
590
+ return this.plus(-1 * amountToSubtract, unit);
591
+ }
592
+
593
+ /**
594
+ * @param {int} years
595
+ * @return {OffsetTime}
596
+ */
597
+ minusYears(years) {
598
+ return this._withDateTimeOffset(this._dateTime.minusYears(years), this._offset);
599
+ }
600
+
601
+ /**
602
+ * @param {int} months
603
+ * @return {OffsetTime}
604
+ */
605
+ minusMonths(months) {
606
+ return this._withDateTimeOffset(this._dateTime.minusMonths(months), this._offset);
607
+ }
608
+
609
+ /**
610
+ * @param {int} weeks
611
+ * @return {OffsetTime}
612
+ */
613
+ minusWeeks(weeks) {
614
+ return this._withDateTimeOffset(this._dateTime.minusWeeks(weeks), this._offset);
615
+ }
616
+
617
+ /**
618
+ * @param {int} days
619
+ * @return {OffsetTime}
620
+ */
621
+ minusDays(days) {
622
+ return this._withDateTimeOffset(this._dateTime.minusDays(days), this._offset);
623
+ }
624
+
625
+ /**
626
+ * @param {int} hours
627
+ * @return {OffsetTime}
628
+ */
629
+ minusHours(hours) {
630
+ return this._withDateTimeOffset(this._dateTime.minusHours(hours), this._offset);
631
+ }
632
+
633
+ /**
634
+ * @param {int} minutes
635
+ * @return {OffsetTime}
636
+ */
637
+ minusMinutes(minutes) {
638
+ return this._withDateTimeOffset(this._dateTime.minusMinutes(minutes), this._offset);
639
+ }
640
+
641
+ /**
642
+ * @param {int} seconds
643
+ * @return {OffsetTime}
644
+ */
645
+ minusSeconds(seconds) {
646
+ return this._withDateTimeOffset(this._dateTime.minusSeconds(seconds), this._offset);
647
+ }
648
+
649
+ /**
650
+ * @param {int} nanos
651
+ * @return {OffsetTime}
652
+ */
653
+ minusNanos(nanos) {
654
+ return this._withDateTimeOffset(this._dateTime.minusNanos(nanos), this._offset);
655
+ }
656
+
657
+ compareTo(other) {
658
+ requireNonNull(other, 'other');
659
+ requireInstance(other, OffsetDateTime, 'other');
660
+ if (this.offset().equals(other.offset())) {
661
+ return this.toLocalDateTime().compareTo(other.toLocalDateTime());
662
+ }
663
+ let cmp = MathUtil.compareNumbers(this.toEpochSecond(), other.toEpochSecond());
664
+ if (cmp === 0) {
665
+ cmp = this.toLocalTime().nano() - other.toLocalTime().nano();
666
+ if (cmp === 0) {
667
+ cmp = this.toLocalDateTime().compareTo(other.toLocalDateTime());
668
+ }
669
+ }
670
+ return cmp;
671
+ }
672
+
673
+ /**
674
+ * @param {OffsetDateTime} other
675
+ * @return {boolean}
676
+ */
677
+ isAfter(other) {
678
+ requireNonNull(other, 'other');
679
+ const thisEpochSec = this.toEpochSecond();
680
+ const otherEpochSec = other.toEpochSecond();
681
+ return thisEpochSec > otherEpochSec || (thisEpochSec === otherEpochSec && this.toLocalTime().nano() > other.toLocalTime().nano());
682
+ }
683
+
684
+ /**
685
+ * @param {OffsetDateTime} other
686
+ * @return {boolean}
687
+ */
688
+ isBefore(other) {
689
+ requireNonNull(other, 'other');
690
+ const thisEpochSec = this.toEpochSecond();
691
+ const otherEpochSec = other.toEpochSecond();
692
+ return thisEpochSec < otherEpochSec || (thisEpochSec === otherEpochSec && this.toLocalTime().nano() < other.toLocalTime().nano());
693
+ }
694
+
695
+ /**
696
+ * @param {OffsetDateTime} other
697
+ * @return {boolean}
698
+ */
699
+ isEqual(other) {
700
+ requireNonNull(other, 'other');
701
+ return this.toEpochSecond() === other.toEpochSecond() && this.toLocalTime().nano() === other.toLocalTime().nano();
702
+ }
703
+
704
+ //-----------------------------------------------------------------------
705
+ /**
706
+ * @param other
707
+ * @return {boolean}
708
+ */
709
+ equals(other) {
710
+ if (this === other) {
711
+ return true;
712
+ }
713
+ if (other instanceof OffsetDateTime) {
714
+ return this._dateTime.equals(other._dateTime) && this._offset.equals(other._offset);
715
+ }
716
+ return false;
717
+ }
718
+
719
+ /**
720
+ * @return {number}
721
+ */
722
+ hashCode() {
723
+ return this._dateTime.hashCode() ^ this._offset.hashCode();
724
+ }
725
+
726
+ toString() {
727
+ return this._dateTime.toString() + this._offset.toString();
728
+ }
729
+
730
+ /**
731
+ *
732
+ * @return {string} same as {@link LocalDateTime.toString}
733
+ */
734
+ toJSON() {
735
+ return this.toString();
736
+ }
737
+
738
+ /**
739
+ * @param {DateTimeFormatter} formatter
740
+ * @return {string}
741
+ */
742
+ format(formatter) {
743
+ requireNonNull(formatter, 'formatter');
744
+ return formatter.format(this);
745
+ }
746
+ }
747
+
748
+
749
+ export function _init() {
750
+ OffsetDateTime.MIN = LocalDateTime.MIN.atOffset(ZoneOffset.MAX);
751
+
752
+ OffsetDateTime.MAX = LocalDateTime.MAX.atOffset(ZoneOffset.MIN);
753
+
754
+ OffsetDateTime.FROM = createTemporalQuery('OffsetDateTime.FROM', (temporal) => {
755
+ return OffsetDateTime.from(temporal);
756
+ });
757
+ }