@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,2284 @@
1
+ import {
2
+ IndexOutOfBoundsException1qfr429iumro0 as IndexOutOfBoundsException,
3
+ IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
4
+ subtract2orl8z9upxd9l as subtract,
5
+ _Char___init__impl__6a9atx2yltdocdrxs4d as _Char___init__impl__6a9atx,
6
+ charArrayOf27f4r3dozbrk1 as charArrayOf,
7
+ toString1pkumu07cwy4m as toString,
8
+ Unit_instance3vdlo4e4f5ggx as Unit_instance,
9
+ toShort36kaw0zjdq3ex as toShort,
10
+ fromInt2ii0rejb1w62w as fromInt,
11
+ shiftLeft3tsh2sstjchzn as shiftLeft,
12
+ add2suhfggl4zvkk as add,
13
+ ensureNotNull1e947j3ixpazm as ensureNotNull,
14
+ convertToInty04h231mmjoh as convertToInt,
15
+ protoOf180f3jzyo7rfj as protoOf,
16
+ StringBuildermazzzhj6kkai as StringBuilder,
17
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
18
+ VOID3gxj6tk5isa35 as VOID,
19
+ IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
20
+ AutoCloseable1l5p57f9lp7kv as AutoCloseable,
21
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
22
+ createThis2j2avj17cvnv2 as createThis,
23
+ arrayCopytctsywo3h7gj as arrayCopy,
24
+ toByte4i43936u611k as toByte,
25
+ shiftRightUnsigned1ga7wnvbv2qur as shiftRightUnsigned,
26
+ convertToByte2t4hntblnhq2k as convertToByte,
27
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
28
+ initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
29
+ _UByte___get_data__impl__jof9qryxuf3cmdpzyk as _UByte___get_data__impl__jof9qr,
30
+ _UShort___get_data__impl__g02451joe1vsk2vach as _UShort___get_data__impl__g0245,
31
+ _ULong___get_data__impl__fggpzb35t7vg7og3i8u as _ULong___get_data__impl__fggpzb,
32
+ Char__toInt_impl_vasixd1ka89vowck9tn as Char__toInt_impl_vasixd,
33
+ _UByte___init__impl__g9hnc430zp6cgd9f0jq as _UByte___init__impl__g9hnc4,
34
+ _UShort___init__impl__jigrne1zu56ujvuii2n as _UShort___init__impl__jigrne,
35
+ _ULong___init__impl__c78o9k3fkiaf1q5xsf7 as _ULong___init__impl__c78o9k,
36
+ multiply2k9eolhnz1bjv as multiply,
37
+ charCodeAt1yspne1d8erbm as charCodeAt,
38
+ charArray2ujmm1qusno00 as charArray,
39
+ numberToChar93r9buh19yek as numberToChar,
40
+ concatToString3cxf0c1gqonpo as concatToString,
41
+ captureStack1fzi4aczwc4hg as captureStack,
42
+ Exceptiondt2hlxn7j7vw as Exception,
43
+ } from './kotlin-kotlin-stdlib.mjs';
44
+ import { UnsafeByteStringOperations_instance32go50d8u0bll as UnsafeByteStringOperations_instance } from './kotlinx-io-kotlinx-io-bytestring.mjs';
45
+ //region block: imports
46
+ var imul = Math.imul;
47
+ //endregion
48
+ //region block: pre-declaration
49
+ class Source {}
50
+ class Sink {}
51
+ function write$default(source, startIndex, endIndex, $super) {
52
+ startIndex = startIndex === VOID ? 0 : startIndex;
53
+ endIndex = endIndex === VOID ? source.length : endIndex;
54
+ var tmp;
55
+ if ($super === VOID) {
56
+ this.a1u(source, startIndex, endIndex);
57
+ tmp = Unit_instance;
58
+ } else {
59
+ tmp = $super.a1u.call(this, source, startIndex, endIndex);
60
+ }
61
+ return tmp;
62
+ }
63
+ class Buffer {
64
+ constructor() {
65
+ this.f1s_1 = null;
66
+ this.g1s_1 = null;
67
+ this.h1s_1 = 0n;
68
+ }
69
+ p2() {
70
+ return this.h1s_1;
71
+ }
72
+ m1s() {
73
+ return this;
74
+ }
75
+ n1s() {
76
+ return this.p2() === 0n;
77
+ }
78
+ o1s(byteCount) {
79
+ // Inline function 'kotlin.require' call
80
+ if (!(byteCount >= 0n)) {
81
+ var message = 'byteCount: ' + byteCount.toString();
82
+ throw IllegalArgumentException.n2(toString(message));
83
+ }
84
+ if (this.p2() < byteCount) {
85
+ throw EOFException.l1s("Buffer doesn't contain required number of bytes (size: " + this.p2().toString() + ', required: ' + byteCount.toString() + ')');
86
+ }
87
+ }
88
+ p1s(byteCount) {
89
+ // Inline function 'kotlin.require' call
90
+ if (!(byteCount >= 0n)) {
91
+ var message = 'byteCount: ' + byteCount.toString() + ' < 0';
92
+ throw IllegalArgumentException.n2(toString(message));
93
+ }
94
+ return this.p2() >= byteCount;
95
+ }
96
+ q1s() {
97
+ var tmp0_elvis_lhs = this.f1s_1;
98
+ var tmp;
99
+ if (tmp0_elvis_lhs == null) {
100
+ throwEof(this, 1n);
101
+ } else {
102
+ tmp = tmp0_elvis_lhs;
103
+ }
104
+ var segment = tmp;
105
+ var segmentSize = segment.p2();
106
+ if (segmentSize === 0) {
107
+ this.y1s();
108
+ return this.q1s();
109
+ }
110
+ var v = segment.z1s();
111
+ this.h1s_1 = subtract(this.h1s_1, 1n);
112
+ if (segmentSize === 1) {
113
+ this.y1s();
114
+ }
115
+ return v;
116
+ }
117
+ a1t() {
118
+ var tmp0_elvis_lhs = this.f1s_1;
119
+ var tmp;
120
+ if (tmp0_elvis_lhs == null) {
121
+ throwEof(this, 2n);
122
+ } else {
123
+ tmp = tmp0_elvis_lhs;
124
+ }
125
+ var segment = tmp;
126
+ var segmentSize = segment.p2();
127
+ if (segmentSize < 2) {
128
+ this.o1s(2n);
129
+ if (segmentSize === 0) {
130
+ this.y1s();
131
+ return this.a1t();
132
+ }
133
+ // Inline function 'kotlinx.io.and' call
134
+ var tmp_0 = (this.q1s() & 255) << 8;
135
+ // Inline function 'kotlinx.io.and' call
136
+ var tmp$ret$1 = this.q1s() & 255;
137
+ return toShort(tmp_0 | tmp$ret$1);
138
+ }
139
+ var v = segment.b1t();
140
+ this.h1s_1 = subtract(this.h1s_1, 2n);
141
+ if (segmentSize === 2) {
142
+ this.y1s();
143
+ }
144
+ return v;
145
+ }
146
+ c1t() {
147
+ var tmp0_elvis_lhs = this.f1s_1;
148
+ var tmp;
149
+ if (tmp0_elvis_lhs == null) {
150
+ throwEof(this, 4n);
151
+ } else {
152
+ tmp = tmp0_elvis_lhs;
153
+ }
154
+ var segment = tmp;
155
+ var segmentSize = segment.p2();
156
+ if (segmentSize < 4) {
157
+ this.o1s(4n);
158
+ if (segmentSize === 0) {
159
+ this.y1s();
160
+ return this.c1t();
161
+ }
162
+ return this.a1t() << 16 | this.a1t() & 65535;
163
+ }
164
+ var v = segment.d1t();
165
+ this.h1s_1 = subtract(this.h1s_1, 4n);
166
+ if (segmentSize === 4) {
167
+ this.y1s();
168
+ }
169
+ return v;
170
+ }
171
+ e1t() {
172
+ var tmp0_elvis_lhs = this.f1s_1;
173
+ var tmp;
174
+ if (tmp0_elvis_lhs == null) {
175
+ throwEof(this, 8n);
176
+ } else {
177
+ tmp = tmp0_elvis_lhs;
178
+ }
179
+ var segment = tmp;
180
+ var segmentSize = segment.p2();
181
+ if (segmentSize < 8) {
182
+ this.o1s(8n);
183
+ if (segmentSize === 0) {
184
+ this.y1s();
185
+ return this.e1t();
186
+ }
187
+ return shiftLeft(fromInt(this.c1t()), 32) | fromInt(this.c1t()) & 4294967295n;
188
+ }
189
+ var v = segment.f1t();
190
+ this.h1s_1 = subtract(this.h1s_1, 8n);
191
+ if (segmentSize === 8) {
192
+ this.y1s();
193
+ }
194
+ return v;
195
+ }
196
+ g1t() {
197
+ return Unit_instance;
198
+ }
199
+ h1t(out, startIndex, endIndex) {
200
+ checkBounds(this.p2(), startIndex, endIndex);
201
+ if (startIndex === endIndex)
202
+ return Unit_instance;
203
+ var currentOffset = startIndex;
204
+ var remainingByteCount = subtract(endIndex, startIndex);
205
+ out.h1s_1 = add(out.h1s_1, remainingByteCount);
206
+ var s = this.f1s_1;
207
+ while (currentOffset >= fromInt(ensureNotNull(s).t1s_1 - s.s1s_1 | 0)) {
208
+ currentOffset = subtract(currentOffset, fromInt(s.t1s_1 - s.s1s_1 | 0));
209
+ s = s.w1s_1;
210
+ }
211
+ while (remainingByteCount > 0n) {
212
+ var copy = ensureNotNull(s).i1t();
213
+ copy.s1s_1 = copy.s1s_1 + convertToInt(currentOffset) | 0;
214
+ var tmp = copy;
215
+ var tmp0 = copy.s1s_1 + convertToInt(remainingByteCount) | 0;
216
+ // Inline function 'kotlin.comparisons.minOf' call
217
+ var b = copy.t1s_1;
218
+ tmp.t1s_1 = Math.min(tmp0, b);
219
+ // Inline function 'kotlinx.io.Buffer.pushSegment' call
220
+ if (out.f1s_1 == null) {
221
+ out.f1s_1 = copy;
222
+ out.g1s_1 = copy;
223
+ } else if (false) {
224
+ out.g1s_1 = ensureNotNull(out.g1s_1).j1t(copy).k1t();
225
+ if (ensureNotNull(out.g1s_1).x1s_1 == null) {
226
+ out.f1s_1 = out.g1s_1;
227
+ }
228
+ } else {
229
+ out.g1s_1 = ensureNotNull(out.g1s_1).j1t(copy);
230
+ }
231
+ remainingByteCount = subtract(remainingByteCount, fromInt(copy.t1s_1 - copy.s1s_1 | 0));
232
+ currentOffset = 0n;
233
+ s = s.w1s_1;
234
+ }
235
+ }
236
+ l1t() {
237
+ var result = this.p2();
238
+ if (result === 0n)
239
+ return 0n;
240
+ var tail = ensureNotNull(this.g1s_1);
241
+ if (tail.t1s_1 < 8192 && tail.v1s_1) {
242
+ result = subtract(result, fromInt(tail.t1s_1 - tail.s1s_1 | 0));
243
+ }
244
+ return result;
245
+ }
246
+ m1t(position) {
247
+ if (position < 0n || position >= this.p2()) {
248
+ throw IndexOutOfBoundsException.ie('position (' + position.toString() + ') is not within the range [0..size(' + this.p2().toString() + '))');
249
+ }
250
+ if (position === 0n) {
251
+ return ensureNotNull(this.f1s_1).n1t(0);
252
+ }
253
+ $l$block_1: {
254
+ // Inline function 'kotlinx.io.seek' call
255
+ if (this.f1s_1 == null) {
256
+ return ensureNotNull(null).n1t(convertToInt(subtract(position, -1n)));
257
+ }
258
+ if (subtract(this.p2(), position) < position) {
259
+ var s = this.g1s_1;
260
+ var offset = this.p2();
261
+ $l$loop: while (!(s == null) && offset > position) {
262
+ offset = subtract(offset, fromInt(s.t1s_1 - s.s1s_1 | 0));
263
+ if (offset <= position)
264
+ break $l$loop;
265
+ s = s.x1s_1;
266
+ }
267
+ var tmp0 = s;
268
+ var offset_0 = offset;
269
+ return ensureNotNull(tmp0).n1t(convertToInt(subtract(position, offset_0)));
270
+ } else {
271
+ var s_0 = this.f1s_1;
272
+ var offset_1 = 0n;
273
+ $l$loop_0: while (!(s_0 == null)) {
274
+ var tmp0_0 = offset_1;
275
+ // Inline function 'kotlin.Long.plus' call
276
+ var other = s_0.t1s_1 - s_0.s1s_1 | 0;
277
+ var nextOffset = add(tmp0_0, fromInt(other));
278
+ if (nextOffset > position)
279
+ break $l$loop_0;
280
+ s_0 = s_0.w1s_1;
281
+ offset_1 = nextOffset;
282
+ }
283
+ var tmp0_1 = s_0;
284
+ var offset_2 = offset_1;
285
+ return ensureNotNull(tmp0_1).n1t(convertToInt(subtract(position, offset_2)));
286
+ }
287
+ }
288
+ }
289
+ j4() {
290
+ return this.o1t(this.p2());
291
+ }
292
+ o1t(byteCount) {
293
+ // Inline function 'kotlinx.io.checkByteCount' call
294
+ // Inline function 'kotlin.require' call
295
+ if (!(byteCount >= 0n)) {
296
+ var message = 'byteCount (' + byteCount.toString() + ') < 0';
297
+ throw IllegalArgumentException.n2(toString(message));
298
+ }
299
+ var remainingByteCount = byteCount;
300
+ while (remainingByteCount > 0n) {
301
+ var tmp0_elvis_lhs = this.f1s_1;
302
+ var tmp;
303
+ if (tmp0_elvis_lhs == null) {
304
+ throw EOFException.l1s('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
305
+ } else {
306
+ tmp = tmp0_elvis_lhs;
307
+ }
308
+ var head = tmp;
309
+ var tmp0 = remainingByteCount;
310
+ // Inline function 'kotlinx.io.minOf' call
311
+ var b = head.t1s_1 - head.s1s_1 | 0;
312
+ // Inline function 'kotlin.comparisons.minOf' call
313
+ var b_0 = fromInt(b);
314
+ var tmp$ret$3 = tmp0 <= b_0 ? tmp0 : b_0;
315
+ var toSkip = convertToInt(tmp$ret$3);
316
+ this.h1s_1 = subtract(this.h1s_1, fromInt(toSkip));
317
+ remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
318
+ head.s1s_1 = head.s1s_1 + toSkip | 0;
319
+ if (head.s1s_1 === head.t1s_1) {
320
+ this.y1s();
321
+ }
322
+ }
323
+ }
324
+ p1t(sink, startIndex, endIndex) {
325
+ // Inline function 'kotlinx.io.checkBounds' call
326
+ var size = sink.length;
327
+ checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
328
+ var tmp0_elvis_lhs = this.f1s_1;
329
+ var tmp;
330
+ if (tmp0_elvis_lhs == null) {
331
+ return -1;
332
+ } else {
333
+ tmp = tmp0_elvis_lhs;
334
+ }
335
+ var s = tmp;
336
+ var tmp0 = endIndex - startIndex | 0;
337
+ // Inline function 'kotlin.comparisons.minOf' call
338
+ var b = s.p2();
339
+ var toCopy = Math.min(tmp0, b);
340
+ s.q1t(sink, startIndex, startIndex + toCopy | 0);
341
+ this.h1s_1 = subtract(this.h1s_1, fromInt(toCopy));
342
+ if (isEmpty(s)) {
343
+ this.y1s();
344
+ }
345
+ return toCopy;
346
+ }
347
+ r1t(sink, byteCount) {
348
+ // Inline function 'kotlinx.io.checkByteCount' call
349
+ // Inline function 'kotlin.require' call
350
+ if (!(byteCount >= 0n)) {
351
+ var message = 'byteCount (' + byteCount.toString() + ') < 0';
352
+ throw IllegalArgumentException.n2(toString(message));
353
+ }
354
+ if (this.p2() === 0n)
355
+ return -1n;
356
+ var bytesWritten = byteCount > this.p2() ? this.p2() : byteCount;
357
+ sink.s1t(this, bytesWritten);
358
+ return bytesWritten;
359
+ }
360
+ t1t(sink, byteCount) {
361
+ // Inline function 'kotlinx.io.checkByteCount' call
362
+ // Inline function 'kotlin.require' call
363
+ if (!(byteCount >= 0n)) {
364
+ var message = 'byteCount (' + byteCount.toString() + ') < 0';
365
+ throw IllegalArgumentException.n2(toString(message));
366
+ }
367
+ if (this.p2() < byteCount) {
368
+ sink.s1t(this, this.p2());
369
+ throw EOFException.l1s('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.p2().toString() + ' bytes were written.');
370
+ }
371
+ sink.s1t(this, byteCount);
372
+ }
373
+ u1t(sink) {
374
+ var byteCount = this.p2();
375
+ if (byteCount > 0n) {
376
+ sink.s1t(this, byteCount);
377
+ }
378
+ return byteCount;
379
+ }
380
+ v1t() {
381
+ return buffered(new PeekSource(this));
382
+ }
383
+ w1t(minimumCapacity) {
384
+ // Inline function 'kotlin.require' call
385
+ if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
386
+ var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
387
+ throw IllegalArgumentException.n2(toString(message));
388
+ }
389
+ if (this.g1s_1 == null) {
390
+ var result = SegmentPool_instance.z1t();
391
+ this.f1s_1 = result;
392
+ this.g1s_1 = result;
393
+ return result;
394
+ }
395
+ var t = ensureNotNull(this.g1s_1);
396
+ if ((t.t1s_1 + minimumCapacity | 0) > 8192 || !t.v1s_1) {
397
+ var newTail = t.j1t(SegmentPool_instance.z1t());
398
+ this.g1s_1 = newTail;
399
+ return newTail;
400
+ }
401
+ return t;
402
+ }
403
+ a1u(source, startIndex, endIndex) {
404
+ // Inline function 'kotlinx.io.checkBounds' call
405
+ var size = source.length;
406
+ checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
407
+ var currentOffset = startIndex;
408
+ while (currentOffset < endIndex) {
409
+ var tail = this.w1t(1);
410
+ var tmp0 = endIndex - currentOffset | 0;
411
+ // Inline function 'kotlin.comparisons.minOf' call
412
+ var b = tail.b1u();
413
+ var toCopy = Math.min(tmp0, b);
414
+ tail.c1u(source, currentOffset, currentOffset + toCopy | 0);
415
+ currentOffset = currentOffset + toCopy | 0;
416
+ }
417
+ var tmp = this;
418
+ var tmp0_0 = this.h1s_1;
419
+ // Inline function 'kotlin.Long.plus' call
420
+ var other = endIndex - startIndex | 0;
421
+ tmp.h1s_1 = add(tmp0_0, fromInt(other));
422
+ }
423
+ s1t(source, byteCount) {
424
+ // Inline function 'kotlin.require' call
425
+ if (!!(source === this)) {
426
+ var message = 'source == this';
427
+ throw IllegalArgumentException.n2(toString(message));
428
+ }
429
+ checkOffsetAndCount(source.h1s_1, 0n, byteCount);
430
+ var remainingByteCount = byteCount;
431
+ while (remainingByteCount > 0n) {
432
+ if (remainingByteCount < fromInt(ensureNotNull(source.f1s_1).p2())) {
433
+ var tail = this.g1s_1;
434
+ var tmp;
435
+ if (!(tail == null) && tail.v1s_1) {
436
+ var tmp0 = remainingByteCount;
437
+ // Inline function 'kotlin.Long.plus' call
438
+ var other = tail.t1s_1;
439
+ var tmp0_0 = add(tmp0, fromInt(other));
440
+ // Inline function 'kotlin.Long.minus' call
441
+ var other_0 = tail.e1u() ? 0 : tail.s1s_1;
442
+ tmp = subtract(tmp0_0, fromInt(other_0)) <= 8192n;
443
+ } else {
444
+ tmp = false;
445
+ }
446
+ if (tmp) {
447
+ ensureNotNull(source.f1s_1).g1u(tail, convertToInt(remainingByteCount));
448
+ source.h1s_1 = subtract(source.h1s_1, remainingByteCount);
449
+ this.h1s_1 = add(this.h1s_1, remainingByteCount);
450
+ return Unit_instance;
451
+ } else {
452
+ source.f1s_1 = ensureNotNull(source.f1s_1).f1u(convertToInt(remainingByteCount));
453
+ }
454
+ }
455
+ var segmentToMove = ensureNotNull(source.f1s_1);
456
+ var movedByteCount = fromInt(segmentToMove.p2());
457
+ source.f1s_1 = segmentToMove.h1u();
458
+ if (source.f1s_1 == null) {
459
+ source.g1s_1 = null;
460
+ }
461
+ // Inline function 'kotlinx.io.Buffer.pushSegment' call
462
+ if (this.f1s_1 == null) {
463
+ this.f1s_1 = segmentToMove;
464
+ this.g1s_1 = segmentToMove;
465
+ } else if (true) {
466
+ this.g1s_1 = ensureNotNull(this.g1s_1).j1t(segmentToMove).k1t();
467
+ if (ensureNotNull(this.g1s_1).x1s_1 == null) {
468
+ this.f1s_1 = this.g1s_1;
469
+ }
470
+ } else {
471
+ this.g1s_1 = ensureNotNull(this.g1s_1).j1t(segmentToMove);
472
+ }
473
+ source.h1s_1 = subtract(source.h1s_1, movedByteCount);
474
+ this.h1s_1 = add(this.h1s_1, movedByteCount);
475
+ remainingByteCount = subtract(remainingByteCount, movedByteCount);
476
+ }
477
+ }
478
+ i1u(source) {
479
+ var totalBytesRead = 0n;
480
+ $l$loop: while (true) {
481
+ var readCount = source.r1t(this, 8192n);
482
+ if (readCount === -1n)
483
+ break $l$loop;
484
+ totalBytesRead = add(totalBytesRead, readCount);
485
+ }
486
+ return totalBytesRead;
487
+ }
488
+ j1u(byte) {
489
+ this.w1t(1).k1u(byte);
490
+ this.h1s_1 = add(this.h1s_1, 1n);
491
+ }
492
+ l1u(short) {
493
+ this.w1t(2).m1u(short);
494
+ this.h1s_1 = add(this.h1s_1, 2n);
495
+ }
496
+ n1u(int) {
497
+ this.w1t(4).o1u(int);
498
+ this.h1s_1 = add(this.h1s_1, 4n);
499
+ }
500
+ i1l(long) {
501
+ this.w1t(8).p1u(long);
502
+ this.h1s_1 = add(this.h1s_1, 8n);
503
+ }
504
+ q1u() {
505
+ var result = new Buffer();
506
+ if (this.p2() === 0n)
507
+ return result;
508
+ var head = ensureNotNull(this.f1s_1);
509
+ var headCopy = head.i1t();
510
+ result.f1s_1 = headCopy;
511
+ result.g1s_1 = headCopy;
512
+ var s = head.w1s_1;
513
+ while (!(s == null)) {
514
+ result.g1s_1 = ensureNotNull(result.g1s_1).j1t(s.i1t());
515
+ s = s.w1s_1;
516
+ }
517
+ result.h1s_1 = this.p2();
518
+ return result;
519
+ }
520
+ q6() {
521
+ return Unit_instance;
522
+ }
523
+ toString() {
524
+ if (this.p2() === 0n)
525
+ return 'Buffer(size=0)';
526
+ var maxPrintableBytes = 64;
527
+ // Inline function 'kotlinx.io.minOf' call
528
+ var b = this.p2();
529
+ // Inline function 'kotlin.comparisons.minOf' call
530
+ var a = fromInt(maxPrintableBytes);
531
+ var tmp$ret$0 = a <= b ? a : b;
532
+ var len = convertToInt(tmp$ret$0);
533
+ var builder = StringBuilder.ec(imul(len, 2) + (this.p2() > fromInt(maxPrintableBytes) ? 1 : 0) | 0);
534
+ var bytesWritten = 0;
535
+ // Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
536
+ var curr = this.f1s_1;
537
+ while (!(curr == null)) {
538
+ var tmp0 = get_SegmentReadContextImpl();
539
+ var segment = curr;
540
+ var idx = 0;
541
+ while (bytesWritten < len && idx < segment.p2()) {
542
+ var _unary__edvuaz = idx;
543
+ idx = _unary__edvuaz + 1 | 0;
544
+ var b_0 = tmp0.r1u(segment, _unary__edvuaz);
545
+ bytesWritten = bytesWritten + 1 | 0;
546
+ var tmp = get_HEX_DIGIT_CHARS();
547
+ // Inline function 'kotlinx.io.shr' call
548
+ var tmp$ret$4 = b_0 >> 4;
549
+ var tmp_0 = builder.k1(tmp[tmp$ret$4 & 15]);
550
+ var tmp_1 = get_HEX_DIGIT_CHARS();
551
+ // Inline function 'kotlinx.io.and' call
552
+ var tmp$ret$5 = b_0 & 15;
553
+ tmp_0.k1(tmp_1[tmp$ret$5]);
554
+ }
555
+ curr = curr.w1s_1;
556
+ }
557
+ if (this.p2() > fromInt(maxPrintableBytes)) {
558
+ builder.k1(_Char___init__impl__6a9atx(8230));
559
+ }
560
+ return 'Buffer(size=' + this.p2().toString() + ' hex=' + builder.toString() + ')';
561
+ }
562
+ y1s() {
563
+ var oldHead = ensureNotNull(this.f1s_1);
564
+ var nextHead = oldHead.w1s_1;
565
+ this.f1s_1 = nextHead;
566
+ if (nextHead == null) {
567
+ this.g1s_1 = null;
568
+ } else {
569
+ nextHead.x1s_1 = null;
570
+ }
571
+ oldHead.w1s_1 = null;
572
+ SegmentPool_instance.s1u(oldHead);
573
+ }
574
+ t1u() {
575
+ var oldTail = ensureNotNull(this.g1s_1);
576
+ var newTail = oldTail.x1s_1;
577
+ this.g1s_1 = newTail;
578
+ if (newTail == null) {
579
+ this.f1s_1 = null;
580
+ } else {
581
+ newTail.w1s_1 = null;
582
+ }
583
+ oldTail.x1s_1 = null;
584
+ SegmentPool_instance.s1u(oldTail);
585
+ }
586
+ }
587
+ class PeekSource {
588
+ constructor(upstream) {
589
+ this.u1u_1 = upstream;
590
+ this.v1u_1 = this.u1u_1.m1s();
591
+ this.w1u_1 = this.v1u_1.f1s_1;
592
+ var tmp = this;
593
+ var tmp0_safe_receiver = this.v1u_1.f1s_1;
594
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s1s_1;
595
+ tmp.x1u_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
596
+ this.y1u_1 = false;
597
+ this.z1u_1 = 0n;
598
+ }
599
+ r1t(sink, byteCount) {
600
+ // Inline function 'kotlin.check' call
601
+ if (!!this.y1u_1) {
602
+ var message = 'Source is closed.';
603
+ throw IllegalStateException.o(toString(message));
604
+ }
605
+ // Inline function 'kotlinx.io.checkByteCount' call
606
+ // Inline function 'kotlin.require' call
607
+ if (!(byteCount >= 0n)) {
608
+ var message_0 = 'byteCount (' + byteCount.toString() + ') < 0';
609
+ throw IllegalArgumentException.n2(toString(message_0));
610
+ }
611
+ // Inline function 'kotlin.check' call
612
+ if (!(this.w1u_1 == null || (this.w1u_1 === this.v1u_1.f1s_1 && this.x1u_1 === ensureNotNull(this.v1u_1.f1s_1).s1s_1))) {
613
+ var message_1 = 'Peek source is invalid because upstream source was used';
614
+ throw IllegalStateException.o(toString(message_1));
615
+ }
616
+ if (byteCount === 0n)
617
+ return 0n;
618
+ // Inline function 'kotlin.Long.plus' call
619
+ var this_0 = this.z1u_1;
620
+ var tmp$ret$7 = add(this_0, fromInt(1));
621
+ if (!this.u1u_1.p1s(tmp$ret$7))
622
+ return -1n;
623
+ if (this.w1u_1 == null && !(this.v1u_1.f1s_1 == null)) {
624
+ this.w1u_1 = this.v1u_1.f1s_1;
625
+ this.x1u_1 = ensureNotNull(this.v1u_1.f1s_1).s1s_1;
626
+ }
627
+ // Inline function 'kotlin.comparisons.minOf' call
628
+ var b = subtract(this.v1u_1.p2(), this.z1u_1);
629
+ var toCopy = byteCount <= b ? byteCount : b;
630
+ this.v1u_1.h1t(sink, this.z1u_1, add(this.z1u_1, toCopy));
631
+ this.z1u_1 = add(this.z1u_1, toCopy);
632
+ return toCopy;
633
+ }
634
+ q6() {
635
+ this.y1u_1 = true;
636
+ }
637
+ }
638
+ class RealSource {
639
+ constructor(source) {
640
+ this.a1v_1 = source;
641
+ this.b1v_1 = false;
642
+ this.c1v_1 = new Buffer();
643
+ }
644
+ m1s() {
645
+ return this.c1v_1;
646
+ }
647
+ r1t(sink, byteCount) {
648
+ // Inline function 'kotlinx.io.RealSource.checkNotClosed' call
649
+ // Inline function 'kotlin.check' call
650
+ if (!!this.b1v_1) {
651
+ var message = 'Source is closed.';
652
+ throw IllegalStateException.o(toString(message));
653
+ }
654
+ // Inline function 'kotlin.require' call
655
+ if (!(byteCount >= 0n)) {
656
+ var message_0 = 'byteCount: ' + byteCount.toString();
657
+ throw IllegalArgumentException.n2(toString(message_0));
658
+ }
659
+ if (this.c1v_1.p2() === 0n) {
660
+ var read = this.a1v_1.r1t(this.c1v_1, 8192n);
661
+ if (read === -1n)
662
+ return -1n;
663
+ }
664
+ // Inline function 'kotlin.comparisons.minOf' call
665
+ var b = this.c1v_1.p2();
666
+ var toRead = byteCount <= b ? byteCount : b;
667
+ return this.c1v_1.r1t(sink, toRead);
668
+ }
669
+ n1s() {
670
+ // Inline function 'kotlinx.io.RealSource.checkNotClosed' call
671
+ // Inline function 'kotlin.check' call
672
+ if (!!this.b1v_1) {
673
+ var message = 'Source is closed.';
674
+ throw IllegalStateException.o(toString(message));
675
+ }
676
+ return this.c1v_1.n1s() && this.a1v_1.r1t(this.c1v_1, 8192n) === -1n;
677
+ }
678
+ o1s(byteCount) {
679
+ if (!this.p1s(byteCount))
680
+ throw EOFException.l1s("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
681
+ }
682
+ p1s(byteCount) {
683
+ // Inline function 'kotlinx.io.RealSource.checkNotClosed' call
684
+ // Inline function 'kotlin.check' call
685
+ if (!!this.b1v_1) {
686
+ var message = 'Source is closed.';
687
+ throw IllegalStateException.o(toString(message));
688
+ }
689
+ // Inline function 'kotlin.require' call
690
+ if (!(byteCount >= 0n)) {
691
+ var message_0 = 'byteCount: ' + byteCount.toString();
692
+ throw IllegalArgumentException.n2(toString(message_0));
693
+ }
694
+ while (this.c1v_1.p2() < byteCount) {
695
+ if (this.a1v_1.r1t(this.c1v_1, 8192n) === -1n)
696
+ return false;
697
+ }
698
+ return true;
699
+ }
700
+ q1s() {
701
+ this.o1s(1n);
702
+ return this.c1v_1.q1s();
703
+ }
704
+ p1t(sink, startIndex, endIndex) {
705
+ // Inline function 'kotlinx.io.checkBounds' call
706
+ var size = sink.length;
707
+ checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
708
+ if (this.c1v_1.p2() === 0n) {
709
+ var read = this.a1v_1.r1t(this.c1v_1, 8192n);
710
+ if (read === -1n)
711
+ return -1;
712
+ }
713
+ var tmp0 = endIndex - startIndex | 0;
714
+ // Inline function 'kotlinx.io.minOf' call
715
+ var b = this.c1v_1.p2();
716
+ // Inline function 'kotlin.comparisons.minOf' call
717
+ var a = fromInt(tmp0);
718
+ var tmp$ret$1 = a <= b ? a : b;
719
+ var toRead = convertToInt(tmp$ret$1);
720
+ return this.c1v_1.p1t(sink, startIndex, startIndex + toRead | 0);
721
+ }
722
+ t1t(sink, byteCount) {
723
+ try {
724
+ this.o1s(byteCount);
725
+ } catch ($p) {
726
+ if ($p instanceof EOFException) {
727
+ var e = $p;
728
+ sink.s1t(this.c1v_1, this.c1v_1.p2());
729
+ throw e;
730
+ } else {
731
+ throw $p;
732
+ }
733
+ }
734
+ this.c1v_1.t1t(sink, byteCount);
735
+ }
736
+ u1t(sink) {
737
+ var totalBytesWritten = 0n;
738
+ while (!(this.a1v_1.r1t(this.c1v_1, 8192n) === -1n)) {
739
+ var emitByteCount = this.c1v_1.l1t();
740
+ if (emitByteCount > 0n) {
741
+ totalBytesWritten = add(totalBytesWritten, emitByteCount);
742
+ sink.s1t(this.c1v_1, emitByteCount);
743
+ }
744
+ }
745
+ if (this.c1v_1.p2() > 0n) {
746
+ totalBytesWritten = add(totalBytesWritten, this.c1v_1.p2());
747
+ sink.s1t(this.c1v_1, this.c1v_1.p2());
748
+ }
749
+ return totalBytesWritten;
750
+ }
751
+ a1t() {
752
+ this.o1s(2n);
753
+ return this.c1v_1.a1t();
754
+ }
755
+ e1t() {
756
+ this.o1s(8n);
757
+ return this.c1v_1.e1t();
758
+ }
759
+ v1t() {
760
+ // Inline function 'kotlinx.io.RealSource.checkNotClosed' call
761
+ // Inline function 'kotlin.check' call
762
+ if (!!this.b1v_1) {
763
+ var message = 'Source is closed.';
764
+ throw IllegalStateException.o(toString(message));
765
+ }
766
+ return buffered(new PeekSource(this));
767
+ }
768
+ q6() {
769
+ if (this.b1v_1)
770
+ return Unit_instance;
771
+ this.b1v_1 = true;
772
+ this.a1v_1.q6();
773
+ this.c1v_1.j4();
774
+ }
775
+ toString() {
776
+ return 'buffered(' + toString(this.a1v_1) + ')';
777
+ }
778
+ }
779
+ class Companion {
780
+ constructor() {
781
+ this.d1v_1 = 8192;
782
+ this.e1v_1 = 1024;
783
+ }
784
+ f1v() {
785
+ return Segment.g1v();
786
+ }
787
+ }
788
+ class Segment {
789
+ e1u() {
790
+ var tmp0_safe_receiver = this.u1s_1;
791
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h1v();
792
+ return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
793
+ }
794
+ static g1v() {
795
+ var $this = createThis(this);
796
+ init_kotlinx_io_Segment($this);
797
+ $this.r1s_1 = new Int8Array(8192);
798
+ $this.v1s_1 = true;
799
+ $this.u1s_1 = null;
800
+ return $this;
801
+ }
802
+ static i1v(data, pos, limit, shareToken, owner) {
803
+ var $this = createThis(this);
804
+ init_kotlinx_io_Segment($this);
805
+ $this.r1s_1 = data;
806
+ $this.s1s_1 = pos;
807
+ $this.t1s_1 = limit;
808
+ $this.u1s_1 = shareToken;
809
+ $this.v1s_1 = owner;
810
+ return $this;
811
+ }
812
+ i1t() {
813
+ var tmp0_elvis_lhs = this.u1s_1;
814
+ var tmp;
815
+ if (tmp0_elvis_lhs == null) {
816
+ // Inline function 'kotlin.also' call
817
+ var this_0 = SegmentPool_instance.j1v();
818
+ this.u1s_1 = this_0;
819
+ tmp = this_0;
820
+ } else {
821
+ tmp = tmp0_elvis_lhs;
822
+ }
823
+ var t = tmp;
824
+ var tmp_0 = this.s1s_1;
825
+ var tmp_1 = this.t1s_1;
826
+ // Inline function 'kotlin.also' call
827
+ t.k1v();
828
+ return Segment.i1v(this.r1s_1, tmp_0, tmp_1, t, false);
829
+ }
830
+ h1u() {
831
+ var result = this.w1s_1;
832
+ if (!(this.x1s_1 == null)) {
833
+ ensureNotNull(this.x1s_1).w1s_1 = this.w1s_1;
834
+ }
835
+ if (!(this.w1s_1 == null)) {
836
+ ensureNotNull(this.w1s_1).x1s_1 = this.x1s_1;
837
+ }
838
+ this.w1s_1 = null;
839
+ this.x1s_1 = null;
840
+ return result;
841
+ }
842
+ j1t(segment) {
843
+ segment.x1s_1 = this;
844
+ segment.w1s_1 = this.w1s_1;
845
+ if (!(this.w1s_1 == null)) {
846
+ ensureNotNull(this.w1s_1).x1s_1 = segment;
847
+ }
848
+ this.w1s_1 = segment;
849
+ return segment;
850
+ }
851
+ f1u(byteCount) {
852
+ // Inline function 'kotlin.require' call
853
+ if (!(byteCount > 0 && byteCount <= (this.t1s_1 - this.s1s_1 | 0))) {
854
+ var message = 'byteCount out of range';
855
+ throw IllegalArgumentException.n2(toString(message));
856
+ }
857
+ var prefix;
858
+ if (byteCount >= 1024) {
859
+ prefix = this.i1t();
860
+ } else {
861
+ prefix = SegmentPool_instance.z1t();
862
+ var tmp0 = this.r1s_1;
863
+ var tmp2 = prefix.r1s_1;
864
+ var tmp5 = this.s1s_1;
865
+ // Inline function 'kotlin.collections.copyInto' call
866
+ var endIndex = this.s1s_1 + byteCount | 0;
867
+ // Inline function 'kotlin.js.unsafeCast' call
868
+ // Inline function 'kotlin.js.asDynamic' call
869
+ var tmp = tmp0;
870
+ // Inline function 'kotlin.js.unsafeCast' call
871
+ // Inline function 'kotlin.js.asDynamic' call
872
+ arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
873
+ }
874
+ prefix.t1s_1 = prefix.s1s_1 + byteCount | 0;
875
+ this.s1s_1 = this.s1s_1 + byteCount | 0;
876
+ if (!(this.x1s_1 == null)) {
877
+ ensureNotNull(this.x1s_1).j1t(prefix);
878
+ } else {
879
+ prefix.w1s_1 = this;
880
+ this.x1s_1 = prefix;
881
+ }
882
+ return prefix;
883
+ }
884
+ k1t() {
885
+ // Inline function 'kotlin.check' call
886
+ if (!!(this.x1s_1 == null)) {
887
+ var message = 'cannot compact';
888
+ throw IllegalStateException.o(toString(message));
889
+ }
890
+ if (!ensureNotNull(this.x1s_1).v1s_1)
891
+ return this;
892
+ var byteCount = this.t1s_1 - this.s1s_1 | 0;
893
+ var availableByteCount = (8192 - ensureNotNull(this.x1s_1).t1s_1 | 0) + (ensureNotNull(this.x1s_1).e1u() ? 0 : ensureNotNull(this.x1s_1).s1s_1) | 0;
894
+ if (byteCount > availableByteCount)
895
+ return this;
896
+ var predecessor = this.x1s_1;
897
+ this.g1u(ensureNotNull(predecessor), byteCount);
898
+ var successor = this.h1u();
899
+ // Inline function 'kotlin.check' call
900
+ if (!(successor == null)) {
901
+ throw IllegalStateException.o('Check failed.');
902
+ }
903
+ SegmentPool_instance.s1u(this);
904
+ return predecessor;
905
+ }
906
+ k1u(byte) {
907
+ var _unary__edvuaz = this.t1s_1;
908
+ this.t1s_1 = _unary__edvuaz + 1 | 0;
909
+ this.r1s_1[_unary__edvuaz] = byte;
910
+ }
911
+ m1u(short) {
912
+ var data = this.r1s_1;
913
+ var limit = this.t1s_1;
914
+ var _unary__edvuaz = limit;
915
+ limit = _unary__edvuaz + 1 | 0;
916
+ data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
917
+ var _unary__edvuaz_0 = limit;
918
+ limit = _unary__edvuaz_0 + 1 | 0;
919
+ data[_unary__edvuaz_0] = toByte(short & 255);
920
+ this.t1s_1 = limit;
921
+ }
922
+ o1u(int) {
923
+ var data = this.r1s_1;
924
+ var limit = this.t1s_1;
925
+ var _unary__edvuaz = limit;
926
+ limit = _unary__edvuaz + 1 | 0;
927
+ data[_unary__edvuaz] = toByte((int >>> 24 | 0) & 255);
928
+ var _unary__edvuaz_0 = limit;
929
+ limit = _unary__edvuaz_0 + 1 | 0;
930
+ data[_unary__edvuaz_0] = toByte((int >>> 16 | 0) & 255);
931
+ var _unary__edvuaz_1 = limit;
932
+ limit = _unary__edvuaz_1 + 1 | 0;
933
+ data[_unary__edvuaz_1] = toByte((int >>> 8 | 0) & 255);
934
+ var _unary__edvuaz_2 = limit;
935
+ limit = _unary__edvuaz_2 + 1 | 0;
936
+ data[_unary__edvuaz_2] = toByte(int & 255);
937
+ this.t1s_1 = limit;
938
+ }
939
+ p1u(long) {
940
+ var data = this.r1s_1;
941
+ var limit = this.t1s_1;
942
+ var _unary__edvuaz = limit;
943
+ limit = _unary__edvuaz + 1 | 0;
944
+ data[_unary__edvuaz] = convertToByte(shiftRightUnsigned(long, 56) & 255n);
945
+ var _unary__edvuaz_0 = limit;
946
+ limit = _unary__edvuaz_0 + 1 | 0;
947
+ data[_unary__edvuaz_0] = convertToByte(shiftRightUnsigned(long, 48) & 255n);
948
+ var _unary__edvuaz_1 = limit;
949
+ limit = _unary__edvuaz_1 + 1 | 0;
950
+ data[_unary__edvuaz_1] = convertToByte(shiftRightUnsigned(long, 40) & 255n);
951
+ var _unary__edvuaz_2 = limit;
952
+ limit = _unary__edvuaz_2 + 1 | 0;
953
+ data[_unary__edvuaz_2] = convertToByte(shiftRightUnsigned(long, 32) & 255n);
954
+ var _unary__edvuaz_3 = limit;
955
+ limit = _unary__edvuaz_3 + 1 | 0;
956
+ data[_unary__edvuaz_3] = convertToByte(shiftRightUnsigned(long, 24) & 255n);
957
+ var _unary__edvuaz_4 = limit;
958
+ limit = _unary__edvuaz_4 + 1 | 0;
959
+ data[_unary__edvuaz_4] = convertToByte(shiftRightUnsigned(long, 16) & 255n);
960
+ var _unary__edvuaz_5 = limit;
961
+ limit = _unary__edvuaz_5 + 1 | 0;
962
+ data[_unary__edvuaz_5] = convertToByte(shiftRightUnsigned(long, 8) & 255n);
963
+ var _unary__edvuaz_6 = limit;
964
+ limit = _unary__edvuaz_6 + 1 | 0;
965
+ data[_unary__edvuaz_6] = convertToByte(long & 255n);
966
+ this.t1s_1 = limit;
967
+ }
968
+ z1s() {
969
+ var _unary__edvuaz = this.s1s_1;
970
+ this.s1s_1 = _unary__edvuaz + 1 | 0;
971
+ return this.r1s_1[_unary__edvuaz];
972
+ }
973
+ b1t() {
974
+ var data = this.r1s_1;
975
+ var pos = this.s1s_1;
976
+ var _unary__edvuaz = pos;
977
+ pos = _unary__edvuaz + 1 | 0;
978
+ // Inline function 'kotlinx.io.and' call
979
+ var tmp = (data[_unary__edvuaz] & 255) << 8;
980
+ var _unary__edvuaz_0 = pos;
981
+ pos = _unary__edvuaz_0 + 1 | 0;
982
+ // Inline function 'kotlinx.io.and' call
983
+ var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
984
+ var s = toShort(tmp | tmp$ret$1);
985
+ this.s1s_1 = pos;
986
+ return s;
987
+ }
988
+ d1t() {
989
+ var data = this.r1s_1;
990
+ var pos = this.s1s_1;
991
+ var _unary__edvuaz = pos;
992
+ pos = _unary__edvuaz + 1 | 0;
993
+ // Inline function 'kotlinx.io.and' call
994
+ var tmp = (data[_unary__edvuaz] & 255) << 24;
995
+ var _unary__edvuaz_0 = pos;
996
+ pos = _unary__edvuaz_0 + 1 | 0;
997
+ // Inline function 'kotlinx.io.and' call
998
+ var tmp_0 = tmp | (data[_unary__edvuaz_0] & 255) << 16;
999
+ var _unary__edvuaz_1 = pos;
1000
+ pos = _unary__edvuaz_1 + 1 | 0;
1001
+ // Inline function 'kotlinx.io.and' call
1002
+ var tmp_1 = tmp_0 | (data[_unary__edvuaz_1] & 255) << 8;
1003
+ var _unary__edvuaz_2 = pos;
1004
+ pos = _unary__edvuaz_2 + 1 | 0;
1005
+ // Inline function 'kotlinx.io.and' call
1006
+ var i = tmp_1 | data[_unary__edvuaz_2] & 255;
1007
+ this.s1s_1 = pos;
1008
+ return i;
1009
+ }
1010
+ f1t() {
1011
+ var data = this.r1s_1;
1012
+ var pos = this.s1s_1;
1013
+ var _unary__edvuaz = pos;
1014
+ pos = _unary__edvuaz + 1 | 0;
1015
+ // Inline function 'kotlinx.io.and' call
1016
+ var this_0 = data[_unary__edvuaz];
1017
+ var tmp$ret$0 = fromInt(this_0) & 255n;
1018
+ var tmp = shiftLeft(tmp$ret$0, 56);
1019
+ var _unary__edvuaz_0 = pos;
1020
+ pos = _unary__edvuaz_0 + 1 | 0;
1021
+ // Inline function 'kotlinx.io.and' call
1022
+ var this_1 = data[_unary__edvuaz_0];
1023
+ var tmp$ret$1 = fromInt(this_1) & 255n;
1024
+ var tmp_0 = tmp | shiftLeft(tmp$ret$1, 48);
1025
+ var _unary__edvuaz_1 = pos;
1026
+ pos = _unary__edvuaz_1 + 1 | 0;
1027
+ // Inline function 'kotlinx.io.and' call
1028
+ var this_2 = data[_unary__edvuaz_1];
1029
+ var tmp$ret$2 = fromInt(this_2) & 255n;
1030
+ var tmp_1 = tmp_0 | shiftLeft(tmp$ret$2, 40);
1031
+ var _unary__edvuaz_2 = pos;
1032
+ pos = _unary__edvuaz_2 + 1 | 0;
1033
+ // Inline function 'kotlinx.io.and' call
1034
+ var this_3 = data[_unary__edvuaz_2];
1035
+ var tmp$ret$3 = fromInt(this_3) & 255n;
1036
+ var tmp_2 = tmp_1 | shiftLeft(tmp$ret$3, 32);
1037
+ var _unary__edvuaz_3 = pos;
1038
+ pos = _unary__edvuaz_3 + 1 | 0;
1039
+ // Inline function 'kotlinx.io.and' call
1040
+ var this_4 = data[_unary__edvuaz_3];
1041
+ var tmp$ret$4 = fromInt(this_4) & 255n;
1042
+ var tmp_3 = tmp_2 | shiftLeft(tmp$ret$4, 24);
1043
+ var _unary__edvuaz_4 = pos;
1044
+ pos = _unary__edvuaz_4 + 1 | 0;
1045
+ // Inline function 'kotlinx.io.and' call
1046
+ var this_5 = data[_unary__edvuaz_4];
1047
+ var tmp$ret$5 = fromInt(this_5) & 255n;
1048
+ var tmp_4 = tmp_3 | shiftLeft(tmp$ret$5, 16);
1049
+ var _unary__edvuaz_5 = pos;
1050
+ pos = _unary__edvuaz_5 + 1 | 0;
1051
+ // Inline function 'kotlinx.io.and' call
1052
+ var this_6 = data[_unary__edvuaz_5];
1053
+ var tmp$ret$6 = fromInt(this_6) & 255n;
1054
+ var tmp_5 = tmp_4 | shiftLeft(tmp$ret$6, 8);
1055
+ var _unary__edvuaz_6 = pos;
1056
+ pos = _unary__edvuaz_6 + 1 | 0;
1057
+ // Inline function 'kotlinx.io.and' call
1058
+ var this_7 = data[_unary__edvuaz_6];
1059
+ var v = tmp_5 | fromInt(this_7) & 255n;
1060
+ this.s1s_1 = pos;
1061
+ return v;
1062
+ }
1063
+ g1u(sink, byteCount) {
1064
+ // Inline function 'kotlin.check' call
1065
+ if (!sink.v1s_1) {
1066
+ var message = 'only owner can write';
1067
+ throw IllegalStateException.o(toString(message));
1068
+ }
1069
+ if ((sink.t1s_1 + byteCount | 0) > 8192) {
1070
+ if (sink.e1u())
1071
+ throw IllegalArgumentException.xd();
1072
+ if (((sink.t1s_1 + byteCount | 0) - sink.s1s_1 | 0) > 8192)
1073
+ throw IllegalArgumentException.xd();
1074
+ var tmp0 = sink.r1s_1;
1075
+ var tmp2 = sink.r1s_1;
1076
+ var tmp5 = sink.s1s_1;
1077
+ // Inline function 'kotlin.collections.copyInto' call
1078
+ var endIndex = sink.t1s_1;
1079
+ // Inline function 'kotlin.js.unsafeCast' call
1080
+ // Inline function 'kotlin.js.asDynamic' call
1081
+ var tmp = tmp0;
1082
+ // Inline function 'kotlin.js.unsafeCast' call
1083
+ // Inline function 'kotlin.js.asDynamic' call
1084
+ arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
1085
+ sink.t1s_1 = sink.t1s_1 - sink.s1s_1 | 0;
1086
+ sink.s1s_1 = 0;
1087
+ }
1088
+ var tmp0_0 = this.r1s_1;
1089
+ var tmp2_0 = sink.r1s_1;
1090
+ var tmp4 = sink.t1s_1;
1091
+ var tmp6 = this.s1s_1;
1092
+ // Inline function 'kotlin.collections.copyInto' call
1093
+ var endIndex_0 = this.s1s_1 + byteCount | 0;
1094
+ // Inline function 'kotlin.js.unsafeCast' call
1095
+ // Inline function 'kotlin.js.asDynamic' call
1096
+ var tmp_0 = tmp0_0;
1097
+ // Inline function 'kotlin.js.unsafeCast' call
1098
+ // Inline function 'kotlin.js.asDynamic' call
1099
+ arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
1100
+ sink.t1s_1 = sink.t1s_1 + byteCount | 0;
1101
+ this.s1s_1 = this.s1s_1 + byteCount | 0;
1102
+ }
1103
+ q1t(dst, dstStartOffset, dstEndOffset) {
1104
+ var len = dstEndOffset - dstStartOffset | 0;
1105
+ var tmp0 = this.r1s_1;
1106
+ var tmp6 = this.s1s_1;
1107
+ // Inline function 'kotlin.collections.copyInto' call
1108
+ var endIndex = this.s1s_1 + len | 0;
1109
+ // Inline function 'kotlin.js.unsafeCast' call
1110
+ // Inline function 'kotlin.js.asDynamic' call
1111
+ var tmp = tmp0;
1112
+ // Inline function 'kotlin.js.unsafeCast' call
1113
+ // Inline function 'kotlin.js.asDynamic' call
1114
+ arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
1115
+ this.s1s_1 = this.s1s_1 + len | 0;
1116
+ }
1117
+ c1u(src, srcStartOffset, srcEndOffset) {
1118
+ var tmp2 = this.r1s_1;
1119
+ // Inline function 'kotlin.collections.copyInto' call
1120
+ var destinationOffset = this.t1s_1;
1121
+ // Inline function 'kotlin.js.unsafeCast' call
1122
+ // Inline function 'kotlin.js.asDynamic' call
1123
+ var tmp = src;
1124
+ // Inline function 'kotlin.js.unsafeCast' call
1125
+ // Inline function 'kotlin.js.asDynamic' call
1126
+ arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
1127
+ this.t1s_1 = this.t1s_1 + (srcEndOffset - srcStartOffset | 0) | 0;
1128
+ }
1129
+ p2() {
1130
+ return this.t1s_1 - this.s1s_1 | 0;
1131
+ }
1132
+ b1u() {
1133
+ return this.r1s_1.length - this.t1s_1 | 0;
1134
+ }
1135
+ l1v(readOnly) {
1136
+ return this.r1s_1;
1137
+ }
1138
+ n1t(index) {
1139
+ return this.r1s_1[this.s1s_1 + index | 0];
1140
+ }
1141
+ m1v(index, value) {
1142
+ this.r1s_1[this.t1s_1 + index | 0] = value;
1143
+ }
1144
+ n1v(index, b0, b1) {
1145
+ var d = this.r1s_1;
1146
+ var l = this.t1s_1;
1147
+ d[l + index | 0] = b0;
1148
+ d[(l + index | 0) + 1 | 0] = b1;
1149
+ }
1150
+ o1v(index, b0, b1, b2) {
1151
+ var d = this.r1s_1;
1152
+ var l = this.t1s_1;
1153
+ d[l + index | 0] = b0;
1154
+ d[(l + index | 0) + 1 | 0] = b1;
1155
+ d[(l + index | 0) + 2 | 0] = b2;
1156
+ }
1157
+ p1v(index, b0, b1, b2, b3) {
1158
+ var d = this.r1s_1;
1159
+ var l = this.t1s_1;
1160
+ d[l + index | 0] = b0;
1161
+ d[(l + index | 0) + 1 | 0] = b1;
1162
+ d[(l + index | 0) + 2 | 0] = b2;
1163
+ d[(l + index | 0) + 3 | 0] = b3;
1164
+ }
1165
+ }
1166
+ class SegmentCopyTracker {}
1167
+ class AlwaysSharedCopyTracker extends SegmentCopyTracker {
1168
+ constructor() {
1169
+ AlwaysSharedCopyTracker_instance = null;
1170
+ super();
1171
+ AlwaysSharedCopyTracker_instance = this;
1172
+ }
1173
+ h1v() {
1174
+ return true;
1175
+ }
1176
+ k1v() {
1177
+ return Unit_instance;
1178
+ }
1179
+ }
1180
+ class UnsafeBufferOperations {}
1181
+ class SegmentReadContextImpl$1 {
1182
+ r1u(segment, offset) {
1183
+ return segment.n1t(offset);
1184
+ }
1185
+ }
1186
+ class SegmentWriteContextImpl$1 {
1187
+ t1v(segment, offset, value) {
1188
+ segment.m1v(offset, value);
1189
+ }
1190
+ s1v(segment, offset, b0, b1) {
1191
+ segment.n1v(offset, b0, b1);
1192
+ }
1193
+ r1v(segment, offset, b0, b1, b2) {
1194
+ segment.o1v(offset, b0, b1, b2);
1195
+ }
1196
+ q1v(segment, offset, b0, b1, b2, b3) {
1197
+ segment.p1v(offset, b0, b1, b2, b3);
1198
+ }
1199
+ }
1200
+ class BufferIterationContextImpl$1 {
1201
+ r1u(segment, offset) {
1202
+ return get_SegmentReadContextImpl().r1u(segment, offset);
1203
+ }
1204
+ }
1205
+ class IOException extends Exception {
1206
+ static w1v() {
1207
+ var $this = this.ae();
1208
+ init_kotlinx_io_IOException($this);
1209
+ return $this;
1210
+ }
1211
+ static x1v(message) {
1212
+ var $this = this.be(message);
1213
+ init_kotlinx_io_IOException($this);
1214
+ return $this;
1215
+ }
1216
+ static y1v(message, cause) {
1217
+ var $this = this.ce(message, cause);
1218
+ init_kotlinx_io_IOException($this);
1219
+ return $this;
1220
+ }
1221
+ }
1222
+ class EOFException extends IOException {
1223
+ static z1v() {
1224
+ var $this = this.w1v();
1225
+ init_kotlinx_io_EOFException($this);
1226
+ return $this;
1227
+ }
1228
+ static l1s(message) {
1229
+ var $this = this.x1v(message);
1230
+ init_kotlinx_io_EOFException($this);
1231
+ return $this;
1232
+ }
1233
+ }
1234
+ class SegmentPool {
1235
+ constructor() {
1236
+ this.x1t_1 = 0;
1237
+ this.y1t_1 = 0;
1238
+ }
1239
+ z1t() {
1240
+ return Companion_instance.f1v();
1241
+ }
1242
+ s1u(segment) {
1243
+ }
1244
+ j1v() {
1245
+ return AlwaysSharedCopyTracker_getInstance();
1246
+ }
1247
+ }
1248
+ //endregion
1249
+ function get_HEX_DIGIT_CHARS() {
1250
+ _init_properties__Util_kt__g8tcl9();
1251
+ return HEX_DIGIT_CHARS;
1252
+ }
1253
+ var HEX_DIGIT_CHARS;
1254
+ function checkBounds(size, startIndex, endIndex) {
1255
+ _init_properties__Util_kt__g8tcl9();
1256
+ if (startIndex < 0n || endIndex > size) {
1257
+ throw IndexOutOfBoundsException.ie('startIndex (' + startIndex.toString() + ') and endIndex (' + endIndex.toString() + ') are not within the range [0..size(' + size.toString() + '))');
1258
+ }
1259
+ if (startIndex > endIndex) {
1260
+ throw IllegalArgumentException.n2('startIndex (' + startIndex.toString() + ') > endIndex (' + endIndex.toString() + ')');
1261
+ }
1262
+ }
1263
+ function checkOffsetAndCount(size, offset, byteCount) {
1264
+ _init_properties__Util_kt__g8tcl9();
1265
+ if (offset < 0n || offset > size || subtract(size, offset) < byteCount || byteCount < 0n) {
1266
+ throw IllegalArgumentException.n2('offset (' + offset.toString() + ') and byteCount (' + byteCount.toString() + ') are not within the range [0..size(' + size.toString() + '))');
1267
+ }
1268
+ }
1269
+ var properties_initialized__Util_kt_67kc5b;
1270
+ function _init_properties__Util_kt__g8tcl9() {
1271
+ if (!properties_initialized__Util_kt_67kc5b) {
1272
+ properties_initialized__Util_kt_67kc5b = true;
1273
+ // Inline function 'kotlin.charArrayOf' call
1274
+ HEX_DIGIT_CHARS = charArrayOf([_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(49), _Char___init__impl__6a9atx(50), _Char___init__impl__6a9atx(51), _Char___init__impl__6a9atx(52), _Char___init__impl__6a9atx(53), _Char___init__impl__6a9atx(54), _Char___init__impl__6a9atx(55), _Char___init__impl__6a9atx(56), _Char___init__impl__6a9atx(57), _Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(98), _Char___init__impl__6a9atx(99), _Char___init__impl__6a9atx(100), _Char___init__impl__6a9atx(101), _Char___init__impl__6a9atx(102)]);
1275
+ }
1276
+ }
1277
+ function throwEof($this, byteCount) {
1278
+ throw EOFException.l1s("Buffer doesn't contain required number of bytes (size: " + $this.p2().toString() + ', required: ' + byteCount.toString() + ')');
1279
+ }
1280
+ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
1281
+ startIndex = startIndex === VOID ? 0n : startIndex;
1282
+ endIndex = endIndex === VOID ? _this__u8e3s4.p2() : endIndex;
1283
+ // Inline function 'kotlin.comparisons.minOf' call
1284
+ var b = _this__u8e3s4.p2();
1285
+ var endOffset = endIndex <= b ? endIndex : b;
1286
+ checkBounds(_this__u8e3s4.p2(), startIndex, endOffset);
1287
+ if (startIndex === endOffset)
1288
+ return -1n;
1289
+ $l$block_1: {
1290
+ // Inline function 'kotlinx.io.seek' call
1291
+ if (_this__u8e3s4.f1s_1 == null) {
1292
+ if (-1n === -1n) {
1293
+ return -1n;
1294
+ }
1295
+ var segment = null;
1296
+ var offset = -1n;
1297
+ do {
1298
+ // Inline function 'kotlin.check' call
1299
+ if (!(endOffset > offset)) {
1300
+ throw IllegalStateException.o('Check failed.');
1301
+ }
1302
+ ensureNotNull(segment);
1303
+ var tmp = segment;
1304
+ // Inline function 'kotlin.comparisons.maxOf' call
1305
+ var a = convertToInt(subtract(startIndex, offset));
1306
+ var tmp_0 = Math.max(a, 0);
1307
+ var tmp0 = segment.p2();
1308
+ // Inline function 'kotlin.comparisons.minOf' call
1309
+ var b_0 = convertToInt(subtract(endOffset, offset));
1310
+ var tmp$ret$5 = Math.min(tmp0, b_0);
1311
+ var idx = indexOf_0(tmp, byte, tmp_0, tmp$ret$5);
1312
+ if (!(idx === -1)) {
1313
+ return add(offset, fromInt(idx));
1314
+ }
1315
+ var tmp0_0 = offset;
1316
+ // Inline function 'kotlin.Long.plus' call
1317
+ var other = segment.p2();
1318
+ offset = add(tmp0_0, fromInt(other));
1319
+ segment = segment.w1s_1;
1320
+ }
1321
+ while (!(segment == null) && offset < endOffset);
1322
+ return -1n;
1323
+ }
1324
+ if (subtract(_this__u8e3s4.p2(), startIndex) < startIndex) {
1325
+ var s = _this__u8e3s4.g1s_1;
1326
+ var offset_0 = _this__u8e3s4.p2();
1327
+ $l$loop: while (!(s == null) && offset_0 > startIndex) {
1328
+ offset_0 = subtract(offset_0, fromInt(s.t1s_1 - s.s1s_1 | 0));
1329
+ if (offset_0 <= startIndex)
1330
+ break $l$loop;
1331
+ s = s.x1s_1;
1332
+ }
1333
+ var tmp0_1 = s;
1334
+ var o = offset_0;
1335
+ if (o === -1n) {
1336
+ return -1n;
1337
+ }
1338
+ var segment_0 = tmp0_1;
1339
+ var offset_1 = o;
1340
+ do {
1341
+ // Inline function 'kotlin.check' call
1342
+ if (!(endOffset > offset_1)) {
1343
+ throw IllegalStateException.o('Check failed.');
1344
+ }
1345
+ ensureNotNull(segment_0);
1346
+ var tmp_1 = segment_0;
1347
+ // Inline function 'kotlin.comparisons.maxOf' call
1348
+ var a_0 = convertToInt(subtract(startIndex, offset_1));
1349
+ var tmp_2 = Math.max(a_0, 0);
1350
+ var tmp0_2 = segment_0.p2();
1351
+ // Inline function 'kotlin.comparisons.minOf' call
1352
+ var b_1 = convertToInt(subtract(endOffset, offset_1));
1353
+ var tmp$ret$10 = Math.min(tmp0_2, b_1);
1354
+ var idx_0 = indexOf_0(tmp_1, byte, tmp_2, tmp$ret$10);
1355
+ if (!(idx_0 === -1)) {
1356
+ return add(offset_1, fromInt(idx_0));
1357
+ }
1358
+ var tmp0_3 = offset_1;
1359
+ // Inline function 'kotlin.Long.plus' call
1360
+ var other_0 = segment_0.p2();
1361
+ offset_1 = add(tmp0_3, fromInt(other_0));
1362
+ segment_0 = segment_0.w1s_1;
1363
+ }
1364
+ while (!(segment_0 == null) && offset_1 < endOffset);
1365
+ return -1n;
1366
+ } else {
1367
+ var s_0 = _this__u8e3s4.f1s_1;
1368
+ var offset_2 = 0n;
1369
+ $l$loop_0: while (!(s_0 == null)) {
1370
+ var tmp0_4 = offset_2;
1371
+ // Inline function 'kotlin.Long.plus' call
1372
+ var other_1 = s_0.t1s_1 - s_0.s1s_1 | 0;
1373
+ var nextOffset = add(tmp0_4, fromInt(other_1));
1374
+ if (nextOffset > startIndex)
1375
+ break $l$loop_0;
1376
+ s_0 = s_0.w1s_1;
1377
+ offset_2 = nextOffset;
1378
+ }
1379
+ var tmp0_5 = s_0;
1380
+ var o_0 = offset_2;
1381
+ if (o_0 === -1n) {
1382
+ return -1n;
1383
+ }
1384
+ var segment_1 = tmp0_5;
1385
+ var offset_3 = o_0;
1386
+ do {
1387
+ // Inline function 'kotlin.check' call
1388
+ if (!(endOffset > offset_3)) {
1389
+ throw IllegalStateException.o('Check failed.');
1390
+ }
1391
+ ensureNotNull(segment_1);
1392
+ var tmp_3 = segment_1;
1393
+ // Inline function 'kotlin.comparisons.maxOf' call
1394
+ var a_1 = convertToInt(subtract(startIndex, offset_3));
1395
+ var tmp_4 = Math.max(a_1, 0);
1396
+ var tmp0_6 = segment_1.p2();
1397
+ // Inline function 'kotlin.comparisons.minOf' call
1398
+ var b_2 = convertToInt(subtract(endOffset, offset_3));
1399
+ var tmp$ret$16 = Math.min(tmp0_6, b_2);
1400
+ var idx_1 = indexOf_0(tmp_3, byte, tmp_4, tmp$ret$16);
1401
+ if (!(idx_1 === -1)) {
1402
+ return add(offset_3, fromInt(idx_1));
1403
+ }
1404
+ var tmp0_7 = offset_3;
1405
+ // Inline function 'kotlin.Long.plus' call
1406
+ var other_2 = segment_1.p2();
1407
+ offset_3 = add(tmp0_7, fromInt(other_2));
1408
+ segment_1 = segment_1.w1s_1;
1409
+ }
1410
+ while (!(segment_1 == null) && offset_3 < endOffset);
1411
+ return -1n;
1412
+ }
1413
+ }
1414
+ }
1415
+ function readByteString(_this__u8e3s4, byteCount) {
1416
+ return UnsafeByteStringOperations_instance.e1s(readByteArray_0(_this__u8e3s4, byteCount));
1417
+ }
1418
+ function buffered(_this__u8e3s4) {
1419
+ return new RealSource(_this__u8e3s4);
1420
+ }
1421
+ var Companion_instance;
1422
+ function Companion_getInstance() {
1423
+ return Companion_instance;
1424
+ }
1425
+ function init_kotlinx_io_Segment(_this__u8e3s4) {
1426
+ _this__u8e3s4.s1s_1 = 0;
1427
+ _this__u8e3s4.t1s_1 = 0;
1428
+ _this__u8e3s4.u1s_1 = null;
1429
+ _this__u8e3s4.v1s_1 = false;
1430
+ _this__u8e3s4.w1s_1 = null;
1431
+ _this__u8e3s4.x1s_1 = null;
1432
+ }
1433
+ function isEmpty(_this__u8e3s4) {
1434
+ return _this__u8e3s4.p2() === 0;
1435
+ }
1436
+ var AlwaysSharedCopyTracker_instance;
1437
+ function AlwaysSharedCopyTracker_getInstance() {
1438
+ if (AlwaysSharedCopyTracker_instance === VOID)
1439
+ new AlwaysSharedCopyTracker();
1440
+ return AlwaysSharedCopyTracker_instance;
1441
+ }
1442
+ function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
1443
+ // Inline function 'kotlin.require' call
1444
+ if (!(0 <= startOffset ? startOffset < _this__u8e3s4.p2() : false)) {
1445
+ var message = '' + startOffset;
1446
+ throw IllegalArgumentException.n2(toString(message));
1447
+ }
1448
+ // Inline function 'kotlin.require' call
1449
+ if (!(startOffset <= endOffset ? endOffset <= _this__u8e3s4.p2() : false)) {
1450
+ var message_0 = '' + endOffset;
1451
+ throw IllegalArgumentException.n2(toString(message_0));
1452
+ }
1453
+ var p = _this__u8e3s4.s1s_1;
1454
+ var data = _this__u8e3s4.l1v(true);
1455
+ var inductionVariable = startOffset;
1456
+ if (inductionVariable < endOffset)
1457
+ do {
1458
+ var idx = inductionVariable;
1459
+ inductionVariable = inductionVariable + 1 | 0;
1460
+ if (data[p + idx | 0] === byte) {
1461
+ return idx;
1462
+ }
1463
+ }
1464
+ while (inductionVariable < endOffset);
1465
+ return -1;
1466
+ }
1467
+ var HEX_DIGIT_BYTES;
1468
+ function writeUByte(_this__u8e3s4, byte) {
1469
+ _init_properties_Sinks_kt__92ml72();
1470
+ // Inline function 'kotlin.UByte.toByte' call
1471
+ var tmp$ret$0 = _UByte___get_data__impl__jof9qr(byte);
1472
+ _this__u8e3s4.j1u(tmp$ret$0);
1473
+ }
1474
+ function writeUShortLe(_this__u8e3s4, short) {
1475
+ _init_properties_Sinks_kt__92ml72();
1476
+ // Inline function 'kotlin.UShort.toShort' call
1477
+ var tmp$ret$0 = _UShort___get_data__impl__g0245(short);
1478
+ writeShortLe(_this__u8e3s4, tmp$ret$0);
1479
+ }
1480
+ function writeULongLe(_this__u8e3s4, long) {
1481
+ _init_properties_Sinks_kt__92ml72();
1482
+ // Inline function 'kotlin.ULong.toLong' call
1483
+ var tmp$ret$0 = _ULong___get_data__impl__fggpzb(long);
1484
+ writeLongLe(_this__u8e3s4, tmp$ret$0);
1485
+ }
1486
+ function writeLongLe(_this__u8e3s4, long) {
1487
+ _init_properties_Sinks_kt__92ml72();
1488
+ _this__u8e3s4.i1l(reverseBytes(long));
1489
+ }
1490
+ function writeShortLe(_this__u8e3s4, short) {
1491
+ _init_properties_Sinks_kt__92ml72();
1492
+ _this__u8e3s4.l1u(reverseBytes_0(short));
1493
+ }
1494
+ var properties_initialized_Sinks_kt_u7wmts;
1495
+ function _init_properties_Sinks_kt__92ml72() {
1496
+ if (!properties_initialized_Sinks_kt_u7wmts) {
1497
+ properties_initialized_Sinks_kt_u7wmts = true;
1498
+ var tmp = 0;
1499
+ var tmp_0 = new Int8Array(16);
1500
+ while (tmp < 16) {
1501
+ var tmp_1 = tmp;
1502
+ var tmp_2;
1503
+ if (tmp_1 < 10) {
1504
+ // Inline function 'kotlin.code' call
1505
+ var this_0 = _Char___init__impl__6a9atx(48);
1506
+ tmp_2 = Char__toInt_impl_vasixd(this_0);
1507
+ } else {
1508
+ // Inline function 'kotlin.code' call
1509
+ var this_1 = _Char___init__impl__6a9atx(97);
1510
+ tmp_2 = Char__toInt_impl_vasixd(this_1) - 10 | 0;
1511
+ }
1512
+ tmp_0[tmp_1] = toByte(tmp_2 + tmp_1 | 0);
1513
+ tmp = tmp + 1 | 0;
1514
+ }
1515
+ HEX_DIGIT_BYTES = tmp_0;
1516
+ }
1517
+ }
1518
+ function readByteArray(_this__u8e3s4) {
1519
+ return readByteArrayImpl(_this__u8e3s4, -1);
1520
+ }
1521
+ function readUByte(_this__u8e3s4) {
1522
+ // Inline function 'kotlin.toUByte' call
1523
+ var this_0 = _this__u8e3s4.q1s();
1524
+ return _UByte___init__impl__g9hnc4(this_0);
1525
+ }
1526
+ function readUShortLe(_this__u8e3s4) {
1527
+ // Inline function 'kotlin.toUShort' call
1528
+ var this_0 = readShortLe(_this__u8e3s4);
1529
+ return _UShort___init__impl__jigrne(this_0);
1530
+ }
1531
+ function readByteArray_0(_this__u8e3s4, byteCount) {
1532
+ // Inline function 'kotlinx.io.checkByteCount' call
1533
+ var byteCount_0 = fromInt(byteCount);
1534
+ // Inline function 'kotlin.require' call
1535
+ if (!(byteCount_0 >= 0n)) {
1536
+ var message = 'byteCount (' + byteCount_0.toString() + ') < 0';
1537
+ throw IllegalArgumentException.n2(toString(message));
1538
+ }
1539
+ return readByteArrayImpl(_this__u8e3s4, byteCount);
1540
+ }
1541
+ function readULongLe(_this__u8e3s4) {
1542
+ // Inline function 'kotlin.toULong' call
1543
+ var this_0 = readLongLe(_this__u8e3s4);
1544
+ return _ULong___init__impl__c78o9k(this_0);
1545
+ }
1546
+ function readLongLe(_this__u8e3s4) {
1547
+ return reverseBytes(_this__u8e3s4.e1t());
1548
+ }
1549
+ function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
1550
+ startIndex = startIndex === VOID ? 0n : startIndex;
1551
+ endIndex = endIndex === VOID ? 9223372036854775807n : endIndex;
1552
+ // Inline function 'kotlin.require' call
1553
+ if (!(0n <= startIndex ? startIndex <= endIndex : false)) {
1554
+ var tmp;
1555
+ if (endIndex < 0n) {
1556
+ tmp = 'startIndex (' + startIndex.toString() + ') and endIndex (' + endIndex.toString() + ') should be non negative';
1557
+ } else {
1558
+ tmp = 'startIndex (' + startIndex.toString() + ') is not within the range [0..endIndex(' + endIndex.toString() + '))';
1559
+ }
1560
+ var message = tmp;
1561
+ throw IllegalArgumentException.n2(toString(message));
1562
+ }
1563
+ if (startIndex === endIndex)
1564
+ return -1n;
1565
+ var offset = startIndex;
1566
+ $l$loop: while (true) {
1567
+ var tmp_0;
1568
+ if (offset < endIndex) {
1569
+ // Inline function 'kotlin.Long.plus' call
1570
+ var this_0 = offset;
1571
+ var tmp$ret$2 = add(this_0, fromInt(1));
1572
+ tmp_0 = _this__u8e3s4.p1s(tmp$ret$2);
1573
+ } else {
1574
+ tmp_0 = false;
1575
+ }
1576
+ if (!tmp_0) {
1577
+ break $l$loop;
1578
+ }
1579
+ var tmp_1 = _this__u8e3s4.m1s();
1580
+ var tmp_2 = offset;
1581
+ // Inline function 'kotlin.comparisons.minOf' call
1582
+ var b = _this__u8e3s4.m1s().p2();
1583
+ var tmp$ret$3 = endIndex <= b ? endIndex : b;
1584
+ var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
1585
+ if (!(idx === -1n)) {
1586
+ return idx;
1587
+ }
1588
+ offset = _this__u8e3s4.m1s().p2();
1589
+ }
1590
+ return -1n;
1591
+ }
1592
+ function readByteArrayImpl(_this__u8e3s4, size) {
1593
+ var arraySize = size;
1594
+ if (size === -1) {
1595
+ var fetchSize = 2147483647n;
1596
+ while (_this__u8e3s4.m1s().p2() < 2147483647n && _this__u8e3s4.p1s(fetchSize)) {
1597
+ // Inline function 'kotlin.Long.times' call
1598
+ var this_0 = fetchSize;
1599
+ fetchSize = multiply(this_0, fromInt(2));
1600
+ }
1601
+ // Inline function 'kotlin.check' call
1602
+ if (!(_this__u8e3s4.m1s().p2() < 2147483647n)) {
1603
+ var message = "Can't create an array of size " + _this__u8e3s4.m1s().p2().toString();
1604
+ throw IllegalStateException.o(toString(message));
1605
+ }
1606
+ arraySize = convertToInt(_this__u8e3s4.m1s().p2());
1607
+ } else {
1608
+ _this__u8e3s4.o1s(fromInt(size));
1609
+ }
1610
+ var array = new Int8Array(arraySize);
1611
+ readTo(_this__u8e3s4.m1s(), array);
1612
+ return array;
1613
+ }
1614
+ function readShortLe(_this__u8e3s4) {
1615
+ return reverseBytes_0(_this__u8e3s4.a1t());
1616
+ }
1617
+ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
1618
+ startIndex = startIndex === VOID ? 0 : startIndex;
1619
+ endIndex = endIndex === VOID ? sink.length : endIndex;
1620
+ // Inline function 'kotlinx.io.checkBounds' call
1621
+ var size = sink.length;
1622
+ checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
1623
+ var offset = startIndex;
1624
+ while (offset < endIndex) {
1625
+ var bytesRead = _this__u8e3s4.p1t(sink, offset, endIndex);
1626
+ if (bytesRead === -1) {
1627
+ throw EOFException.l1s('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
1628
+ }
1629
+ offset = offset + bytesRead | 0;
1630
+ }
1631
+ }
1632
+ function readString(_this__u8e3s4, byteCount) {
1633
+ _this__u8e3s4.o1s(byteCount);
1634
+ return commonReadUtf8(_this__u8e3s4.m1s(), byteCount);
1635
+ }
1636
+ function readString_0(_this__u8e3s4) {
1637
+ _this__u8e3s4.p1s(9223372036854775807n);
1638
+ return commonReadUtf8(_this__u8e3s4.m1s(), _this__u8e3s4.m1s().p2());
1639
+ }
1640
+ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
1641
+ startIndex = startIndex === VOID ? 0 : startIndex;
1642
+ endIndex = endIndex === VOID ? string.length : endIndex;
1643
+ // Inline function 'kotlinx.io.checkBounds' call
1644
+ var size = string.length;
1645
+ checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
1646
+ // Inline function 'kotlinx.io.writeToInternalBuffer' call
1647
+ // Inline function 'kotlinx.io.commonWriteUtf8' call
1648
+ var this_0 = _this__u8e3s4.m1s();
1649
+ var i = startIndex;
1650
+ while (i < endIndex) {
1651
+ var p0 = i;
1652
+ // Inline function 'kotlin.code' call
1653
+ var this_1 = charCodeAt(string, p0);
1654
+ var c = Char__toInt_impl_vasixd(this_1);
1655
+ if (c < 128) {
1656
+ $l$block_0: {
1657
+ // Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
1658
+ var tail = this_0.w1t(1);
1659
+ var ctx = get_SegmentWriteContextImpl();
1660
+ var segmentOffset = -i | 0;
1661
+ // Inline function 'kotlin.comparisons.minOf' call
1662
+ var b = i + tail.b1u() | 0;
1663
+ var runLimit = Math.min(endIndex, b);
1664
+ var _unary__edvuaz = i;
1665
+ i = _unary__edvuaz + 1 | 0;
1666
+ ctx.t1v(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
1667
+ $l$loop: while (i < runLimit) {
1668
+ var p0_0 = i;
1669
+ // Inline function 'kotlin.code' call
1670
+ var this_2 = charCodeAt(string, p0_0);
1671
+ c = Char__toInt_impl_vasixd(this_2);
1672
+ if (c >= 128)
1673
+ break $l$loop;
1674
+ var _unary__edvuaz_0 = i;
1675
+ i = _unary__edvuaz_0 + 1 | 0;
1676
+ ctx.t1v(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
1677
+ }
1678
+ var bytesWritten = i + segmentOffset | 0;
1679
+ if (bytesWritten === 1) {
1680
+ tail.t1s_1 = tail.t1s_1 + bytesWritten | 0;
1681
+ var tmp = this_0;
1682
+ // Inline function 'kotlin.Long.plus' call
1683
+ var this_3 = this_0.h1s_1;
1684
+ tmp.h1s_1 = add(this_3, fromInt(bytesWritten));
1685
+ break $l$block_0;
1686
+ }
1687
+ // Inline function 'kotlin.check' call
1688
+ if (!(0 <= bytesWritten ? bytesWritten <= tail.b1u() : false)) {
1689
+ var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.b1u();
1690
+ throw IllegalStateException.o(toString(message));
1691
+ }
1692
+ if (!(bytesWritten === 0)) {
1693
+ tail.t1s_1 = tail.t1s_1 + bytesWritten | 0;
1694
+ var tmp_0 = this_0;
1695
+ // Inline function 'kotlin.Long.plus' call
1696
+ var this_4 = this_0.h1s_1;
1697
+ tmp_0.h1s_1 = add(this_4, fromInt(bytesWritten));
1698
+ break $l$block_0;
1699
+ }
1700
+ if (isEmpty(tail)) {
1701
+ this_0.t1u();
1702
+ }
1703
+ }
1704
+ } else if (c < 2048) {
1705
+ $l$block_2: {
1706
+ // Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
1707
+ var tail_0 = this_0.w1t(2);
1708
+ get_SegmentWriteContextImpl().s1v(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
1709
+ var bytesWritten_0 = 2;
1710
+ if (bytesWritten_0 === 2) {
1711
+ tail_0.t1s_1 = tail_0.t1s_1 + bytesWritten_0 | 0;
1712
+ var tmp_1 = this_0;
1713
+ // Inline function 'kotlin.Long.plus' call
1714
+ var this_5 = this_0.h1s_1;
1715
+ tmp_1.h1s_1 = add(this_5, fromInt(bytesWritten_0));
1716
+ break $l$block_2;
1717
+ }
1718
+ // Inline function 'kotlin.check' call
1719
+ if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.b1u() : false)) {
1720
+ var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.b1u();
1721
+ throw IllegalStateException.o(toString(message_0));
1722
+ }
1723
+ if (!(bytesWritten_0 === 0)) {
1724
+ tail_0.t1s_1 = tail_0.t1s_1 + bytesWritten_0 | 0;
1725
+ var tmp_2 = this_0;
1726
+ // Inline function 'kotlin.Long.plus' call
1727
+ var this_6 = this_0.h1s_1;
1728
+ tmp_2.h1s_1 = add(this_6, fromInt(bytesWritten_0));
1729
+ break $l$block_2;
1730
+ }
1731
+ if (isEmpty(tail_0)) {
1732
+ this_0.t1u();
1733
+ }
1734
+ }
1735
+ i = i + 1 | 0;
1736
+ } else if (c < 55296 || c > 57343) {
1737
+ $l$block_4: {
1738
+ // Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
1739
+ var tail_1 = this_0.w1t(3);
1740
+ get_SegmentWriteContextImpl().r1v(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
1741
+ var bytesWritten_1 = 3;
1742
+ if (bytesWritten_1 === 3) {
1743
+ tail_1.t1s_1 = tail_1.t1s_1 + bytesWritten_1 | 0;
1744
+ var tmp_3 = this_0;
1745
+ // Inline function 'kotlin.Long.plus' call
1746
+ var this_7 = this_0.h1s_1;
1747
+ tmp_3.h1s_1 = add(this_7, fromInt(bytesWritten_1));
1748
+ break $l$block_4;
1749
+ }
1750
+ // Inline function 'kotlin.check' call
1751
+ if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.b1u() : false)) {
1752
+ var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.b1u();
1753
+ throw IllegalStateException.o(toString(message_1));
1754
+ }
1755
+ if (!(bytesWritten_1 === 0)) {
1756
+ tail_1.t1s_1 = tail_1.t1s_1 + bytesWritten_1 | 0;
1757
+ var tmp_4 = this_0;
1758
+ // Inline function 'kotlin.Long.plus' call
1759
+ var this_8 = this_0.h1s_1;
1760
+ tmp_4.h1s_1 = add(this_8, fromInt(bytesWritten_1));
1761
+ break $l$block_4;
1762
+ }
1763
+ if (isEmpty(tail_1)) {
1764
+ this_0.t1u();
1765
+ }
1766
+ }
1767
+ i = i + 1 | 0;
1768
+ } else {
1769
+ var tmp_5;
1770
+ if ((i + 1 | 0) < endIndex) {
1771
+ var p0_1 = i + 1 | 0;
1772
+ // Inline function 'kotlin.code' call
1773
+ var this_9 = charCodeAt(string, p0_1);
1774
+ tmp_5 = Char__toInt_impl_vasixd(this_9);
1775
+ } else {
1776
+ tmp_5 = 0;
1777
+ }
1778
+ var low = tmp_5;
1779
+ if (c > 56319 || !(56320 <= low ? low <= 57343 : false)) {
1780
+ // Inline function 'kotlin.code' call
1781
+ var this_10 = _Char___init__impl__6a9atx(63);
1782
+ var tmp$ret$29 = Char__toInt_impl_vasixd(this_10);
1783
+ this_0.j1u(toByte(tmp$ret$29));
1784
+ i = i + 1 | 0;
1785
+ } else {
1786
+ var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
1787
+ $l$block_6: {
1788
+ // Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
1789
+ var tail_2 = this_0.w1t(4);
1790
+ get_SegmentWriteContextImpl().q1v(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
1791
+ var bytesWritten_2 = 4;
1792
+ if (bytesWritten_2 === 4) {
1793
+ tail_2.t1s_1 = tail_2.t1s_1 + bytesWritten_2 | 0;
1794
+ var tmp_6 = this_0;
1795
+ // Inline function 'kotlin.Long.plus' call
1796
+ var this_11 = this_0.h1s_1;
1797
+ tmp_6.h1s_1 = add(this_11, fromInt(bytesWritten_2));
1798
+ break $l$block_6;
1799
+ }
1800
+ // Inline function 'kotlin.check' call
1801
+ if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.b1u() : false)) {
1802
+ var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.b1u();
1803
+ throw IllegalStateException.o(toString(message_2));
1804
+ }
1805
+ if (!(bytesWritten_2 === 0)) {
1806
+ tail_2.t1s_1 = tail_2.t1s_1 + bytesWritten_2 | 0;
1807
+ var tmp_7 = this_0;
1808
+ // Inline function 'kotlin.Long.plus' call
1809
+ var this_12 = this_0.h1s_1;
1810
+ tmp_7.h1s_1 = add(this_12, fromInt(bytesWritten_2));
1811
+ break $l$block_6;
1812
+ }
1813
+ if (isEmpty(tail_2)) {
1814
+ this_0.t1u();
1815
+ }
1816
+ }
1817
+ i = i + 2 | 0;
1818
+ }
1819
+ }
1820
+ }
1821
+ _this__u8e3s4.g1t();
1822
+ }
1823
+ function commonReadUtf8(_this__u8e3s4, byteCount) {
1824
+ if (byteCount === 0n)
1825
+ return '';
1826
+ // Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
1827
+ var curr = _this__u8e3s4.f1s_1;
1828
+ while (!(curr == null)) {
1829
+ get_SegmentReadContextImpl();
1830
+ if (fromInt(curr.p2()) >= byteCount) {
1831
+ var result = '';
1832
+ // Inline function 'kotlinx.io.unsafe.withData' call
1833
+ var tmp0 = curr.l1v(true);
1834
+ var tmp2 = curr.s1s_1;
1835
+ var tmp0_0 = curr.t1s_1;
1836
+ // Inline function 'kotlin.math.min' call
1837
+ var b = tmp2 + convertToInt(byteCount) | 0;
1838
+ var tmp$ret$4 = Math.min(tmp0_0, b);
1839
+ result = commonToUtf8String(tmp0, tmp2, tmp$ret$4);
1840
+ _this__u8e3s4.o1t(byteCount);
1841
+ return result;
1842
+ }
1843
+ return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
1844
+ }
1845
+ // Inline function 'kotlin.error' call
1846
+ var message = 'Unreacheable';
1847
+ throw IllegalStateException.o(toString(message));
1848
+ }
1849
+ function commonToUtf8String(_this__u8e3s4, beginIndex, endIndex) {
1850
+ beginIndex = beginIndex === VOID ? 0 : beginIndex;
1851
+ endIndex = endIndex === VOID ? _this__u8e3s4.length : endIndex;
1852
+ if (beginIndex < 0 || endIndex > _this__u8e3s4.length || beginIndex > endIndex) {
1853
+ throw IndexOutOfBoundsException.ie('size=' + _this__u8e3s4.length + ' beginIndex=' + beginIndex + ' endIndex=' + endIndex);
1854
+ }
1855
+ var chars = charArray(endIndex - beginIndex | 0);
1856
+ var length = 0;
1857
+ // Inline function 'kotlinx.io.internal.processUtf16Chars' call
1858
+ var index = beginIndex;
1859
+ while (index < endIndex) {
1860
+ var b0 = _this__u8e3s4[index];
1861
+ if (b0 >= 0) {
1862
+ var c = numberToChar(b0);
1863
+ var _unary__edvuaz = length;
1864
+ length = _unary__edvuaz + 1 | 0;
1865
+ chars[_unary__edvuaz] = c;
1866
+ index = index + 1 | 0;
1867
+ while (index < endIndex && _this__u8e3s4[index] >= 0) {
1868
+ var _unary__edvuaz_0 = index;
1869
+ index = _unary__edvuaz_0 + 1 | 0;
1870
+ var c_0 = numberToChar(_this__u8e3s4[_unary__edvuaz_0]);
1871
+ var _unary__edvuaz_1 = length;
1872
+ length = _unary__edvuaz_1 + 1 | 0;
1873
+ chars[_unary__edvuaz_1] = c_0;
1874
+ }
1875
+ } else {
1876
+ // Inline function 'kotlinx.io.shr' call
1877
+ if (b0 >> 5 === -2) {
1878
+ var tmp = index;
1879
+ var tmp2 = index;
1880
+ var tmp$ret$4;
1881
+ $l$block_0: {
1882
+ // Inline function 'kotlinx.io.internal.process2Utf8Bytes' call
1883
+ if (endIndex <= (tmp2 + 1 | 0)) {
1884
+ var c_1 = numberToChar(65533);
1885
+ var _unary__edvuaz_2 = length;
1886
+ length = _unary__edvuaz_2 + 1 | 0;
1887
+ chars[_unary__edvuaz_2] = c_1;
1888
+ tmp$ret$4 = 1;
1889
+ break $l$block_0;
1890
+ }
1891
+ var b0_0 = _this__u8e3s4[tmp2];
1892
+ var b1 = _this__u8e3s4[tmp2 + 1 | 0];
1893
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
1894
+ // Inline function 'kotlinx.io.and' call
1895
+ if (!((b1 & 192) === 128)) {
1896
+ var c_2 = numberToChar(65533);
1897
+ var _unary__edvuaz_3 = length;
1898
+ length = _unary__edvuaz_3 + 1 | 0;
1899
+ chars[_unary__edvuaz_3] = c_2;
1900
+ tmp$ret$4 = 1;
1901
+ break $l$block_0;
1902
+ }
1903
+ var codePoint = 3968 ^ b1 ^ b0_0 << 6;
1904
+ if (codePoint < 128) {
1905
+ var c_3 = numberToChar(65533);
1906
+ var _unary__edvuaz_4 = length;
1907
+ length = _unary__edvuaz_4 + 1 | 0;
1908
+ chars[_unary__edvuaz_4] = c_3;
1909
+ } else {
1910
+ var c_4 = numberToChar(codePoint);
1911
+ var _unary__edvuaz_5 = length;
1912
+ length = _unary__edvuaz_5 + 1 | 0;
1913
+ chars[_unary__edvuaz_5] = c_4;
1914
+ }
1915
+ tmp$ret$4 = 2;
1916
+ }
1917
+ index = tmp + tmp$ret$4 | 0;
1918
+ } else {
1919
+ // Inline function 'kotlinx.io.shr' call
1920
+ if (b0 >> 4 === -2) {
1921
+ var tmp_0 = index;
1922
+ var tmp2_0 = index;
1923
+ var tmp$ret$16;
1924
+ $l$block_4: {
1925
+ // Inline function 'kotlinx.io.internal.process3Utf8Bytes' call
1926
+ if (endIndex <= (tmp2_0 + 2 | 0)) {
1927
+ var c_5 = numberToChar(65533);
1928
+ var _unary__edvuaz_6 = length;
1929
+ length = _unary__edvuaz_6 + 1 | 0;
1930
+ chars[_unary__edvuaz_6] = c_5;
1931
+ var tmp_1;
1932
+ if (endIndex <= (tmp2_0 + 1 | 0)) {
1933
+ tmp_1 = true;
1934
+ } else {
1935
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
1936
+ // Inline function 'kotlinx.io.and' call
1937
+ tmp_1 = !((_this__u8e3s4[tmp2_0 + 1 | 0] & 192) === 128);
1938
+ }
1939
+ if (tmp_1) {
1940
+ tmp$ret$16 = 1;
1941
+ break $l$block_4;
1942
+ } else {
1943
+ tmp$ret$16 = 2;
1944
+ break $l$block_4;
1945
+ }
1946
+ }
1947
+ var b0_1 = _this__u8e3s4[tmp2_0];
1948
+ var b1_0 = _this__u8e3s4[tmp2_0 + 1 | 0];
1949
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
1950
+ // Inline function 'kotlinx.io.and' call
1951
+ if (!((b1_0 & 192) === 128)) {
1952
+ var c_6 = numberToChar(65533);
1953
+ var _unary__edvuaz_7 = length;
1954
+ length = _unary__edvuaz_7 + 1 | 0;
1955
+ chars[_unary__edvuaz_7] = c_6;
1956
+ tmp$ret$16 = 1;
1957
+ break $l$block_4;
1958
+ }
1959
+ var b2 = _this__u8e3s4[tmp2_0 + 2 | 0];
1960
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
1961
+ // Inline function 'kotlinx.io.and' call
1962
+ if (!((b2 & 192) === 128)) {
1963
+ var c_7 = numberToChar(65533);
1964
+ var _unary__edvuaz_8 = length;
1965
+ length = _unary__edvuaz_8 + 1 | 0;
1966
+ chars[_unary__edvuaz_8] = c_7;
1967
+ tmp$ret$16 = 2;
1968
+ break $l$block_4;
1969
+ }
1970
+ var codePoint_0 = -123008 ^ b2 ^ b1_0 << 6 ^ b0_1 << 12;
1971
+ if (codePoint_0 < 2048) {
1972
+ var c_8 = numberToChar(65533);
1973
+ var _unary__edvuaz_9 = length;
1974
+ length = _unary__edvuaz_9 + 1 | 0;
1975
+ chars[_unary__edvuaz_9] = c_8;
1976
+ } else if (55296 <= codePoint_0 ? codePoint_0 <= 57343 : false) {
1977
+ var c_9 = numberToChar(65533);
1978
+ var _unary__edvuaz_10 = length;
1979
+ length = _unary__edvuaz_10 + 1 | 0;
1980
+ chars[_unary__edvuaz_10] = c_9;
1981
+ } else {
1982
+ var c_10 = numberToChar(codePoint_0);
1983
+ var _unary__edvuaz_11 = length;
1984
+ length = _unary__edvuaz_11 + 1 | 0;
1985
+ chars[_unary__edvuaz_11] = c_10;
1986
+ }
1987
+ tmp$ret$16 = 3;
1988
+ }
1989
+ index = tmp_0 + tmp$ret$16 | 0;
1990
+ } else {
1991
+ // Inline function 'kotlinx.io.shr' call
1992
+ if (b0 >> 3 === -2) {
1993
+ var tmp_2 = index;
1994
+ var tmp2_1 = index;
1995
+ var tmp$ret$36;
1996
+ $l$block_10: {
1997
+ // Inline function 'kotlinx.io.internal.process4Utf8Bytes' call
1998
+ if (endIndex <= (tmp2_1 + 3 | 0)) {
1999
+ if (!(65533 === 65533)) {
2000
+ var c_11 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
2001
+ var _unary__edvuaz_12 = length;
2002
+ length = _unary__edvuaz_12 + 1 | 0;
2003
+ chars[_unary__edvuaz_12] = c_11;
2004
+ var c_12 = numberToChar((65533 & 1023) + 56320 | 0);
2005
+ var _unary__edvuaz_13 = length;
2006
+ length = _unary__edvuaz_13 + 1 | 0;
2007
+ chars[_unary__edvuaz_13] = c_12;
2008
+ } else {
2009
+ var c_13 = _Char___init__impl__6a9atx(65533);
2010
+ var _unary__edvuaz_14 = length;
2011
+ length = _unary__edvuaz_14 + 1 | 0;
2012
+ chars[_unary__edvuaz_14] = c_13;
2013
+ }
2014
+ var tmp_3;
2015
+ if (endIndex <= (tmp2_1 + 1 | 0)) {
2016
+ tmp_3 = true;
2017
+ } else {
2018
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
2019
+ // Inline function 'kotlinx.io.and' call
2020
+ tmp_3 = !((_this__u8e3s4[tmp2_1 + 1 | 0] & 192) === 128);
2021
+ }
2022
+ if (tmp_3) {
2023
+ tmp$ret$36 = 1;
2024
+ break $l$block_10;
2025
+ } else {
2026
+ var tmp_4;
2027
+ if (endIndex <= (tmp2_1 + 2 | 0)) {
2028
+ tmp_4 = true;
2029
+ } else {
2030
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
2031
+ // Inline function 'kotlinx.io.and' call
2032
+ tmp_4 = !((_this__u8e3s4[tmp2_1 + 2 | 0] & 192) === 128);
2033
+ }
2034
+ if (tmp_4) {
2035
+ tmp$ret$36 = 2;
2036
+ break $l$block_10;
2037
+ } else {
2038
+ tmp$ret$36 = 3;
2039
+ break $l$block_10;
2040
+ }
2041
+ }
2042
+ }
2043
+ var b0_2 = _this__u8e3s4[tmp2_1];
2044
+ var b1_1 = _this__u8e3s4[tmp2_1 + 1 | 0];
2045
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
2046
+ // Inline function 'kotlinx.io.and' call
2047
+ if (!((b1_1 & 192) === 128)) {
2048
+ if (!(65533 === 65533)) {
2049
+ var c_14 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
2050
+ var _unary__edvuaz_15 = length;
2051
+ length = _unary__edvuaz_15 + 1 | 0;
2052
+ chars[_unary__edvuaz_15] = c_14;
2053
+ var c_15 = numberToChar((65533 & 1023) + 56320 | 0);
2054
+ var _unary__edvuaz_16 = length;
2055
+ length = _unary__edvuaz_16 + 1 | 0;
2056
+ chars[_unary__edvuaz_16] = c_15;
2057
+ } else {
2058
+ var c_16 = _Char___init__impl__6a9atx(65533);
2059
+ var _unary__edvuaz_17 = length;
2060
+ length = _unary__edvuaz_17 + 1 | 0;
2061
+ chars[_unary__edvuaz_17] = c_16;
2062
+ }
2063
+ tmp$ret$36 = 1;
2064
+ break $l$block_10;
2065
+ }
2066
+ var b2_0 = _this__u8e3s4[tmp2_1 + 2 | 0];
2067
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
2068
+ // Inline function 'kotlinx.io.and' call
2069
+ if (!((b2_0 & 192) === 128)) {
2070
+ if (!(65533 === 65533)) {
2071
+ var c_17 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
2072
+ var _unary__edvuaz_18 = length;
2073
+ length = _unary__edvuaz_18 + 1 | 0;
2074
+ chars[_unary__edvuaz_18] = c_17;
2075
+ var c_18 = numberToChar((65533 & 1023) + 56320 | 0);
2076
+ var _unary__edvuaz_19 = length;
2077
+ length = _unary__edvuaz_19 + 1 | 0;
2078
+ chars[_unary__edvuaz_19] = c_18;
2079
+ } else {
2080
+ var c_19 = _Char___init__impl__6a9atx(65533);
2081
+ var _unary__edvuaz_20 = length;
2082
+ length = _unary__edvuaz_20 + 1 | 0;
2083
+ chars[_unary__edvuaz_20] = c_19;
2084
+ }
2085
+ tmp$ret$36 = 2;
2086
+ break $l$block_10;
2087
+ }
2088
+ var b3 = _this__u8e3s4[tmp2_1 + 3 | 0];
2089
+ // Inline function 'kotlinx.io.internal.isUtf8Continuation' call
2090
+ // Inline function 'kotlinx.io.and' call
2091
+ if (!((b3 & 192) === 128)) {
2092
+ if (!(65533 === 65533)) {
2093
+ var c_20 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
2094
+ var _unary__edvuaz_21 = length;
2095
+ length = _unary__edvuaz_21 + 1 | 0;
2096
+ chars[_unary__edvuaz_21] = c_20;
2097
+ var c_21 = numberToChar((65533 & 1023) + 56320 | 0);
2098
+ var _unary__edvuaz_22 = length;
2099
+ length = _unary__edvuaz_22 + 1 | 0;
2100
+ chars[_unary__edvuaz_22] = c_21;
2101
+ } else {
2102
+ var c_22 = _Char___init__impl__6a9atx(65533);
2103
+ var _unary__edvuaz_23 = length;
2104
+ length = _unary__edvuaz_23 + 1 | 0;
2105
+ chars[_unary__edvuaz_23] = c_22;
2106
+ }
2107
+ tmp$ret$36 = 3;
2108
+ break $l$block_10;
2109
+ }
2110
+ var codePoint_1 = 3678080 ^ b3 ^ b2_0 << 6 ^ b1_1 << 12 ^ b0_2 << 18;
2111
+ if (codePoint_1 > 1114111) {
2112
+ if (!(65533 === 65533)) {
2113
+ var c_23 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
2114
+ var _unary__edvuaz_24 = length;
2115
+ length = _unary__edvuaz_24 + 1 | 0;
2116
+ chars[_unary__edvuaz_24] = c_23;
2117
+ var c_24 = numberToChar((65533 & 1023) + 56320 | 0);
2118
+ var _unary__edvuaz_25 = length;
2119
+ length = _unary__edvuaz_25 + 1 | 0;
2120
+ chars[_unary__edvuaz_25] = c_24;
2121
+ } else {
2122
+ var c_25 = _Char___init__impl__6a9atx(65533);
2123
+ var _unary__edvuaz_26 = length;
2124
+ length = _unary__edvuaz_26 + 1 | 0;
2125
+ chars[_unary__edvuaz_26] = c_25;
2126
+ }
2127
+ } else if (55296 <= codePoint_1 ? codePoint_1 <= 57343 : false) {
2128
+ if (!(65533 === 65533)) {
2129
+ var c_26 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
2130
+ var _unary__edvuaz_27 = length;
2131
+ length = _unary__edvuaz_27 + 1 | 0;
2132
+ chars[_unary__edvuaz_27] = c_26;
2133
+ var c_27 = numberToChar((65533 & 1023) + 56320 | 0);
2134
+ var _unary__edvuaz_28 = length;
2135
+ length = _unary__edvuaz_28 + 1 | 0;
2136
+ chars[_unary__edvuaz_28] = c_27;
2137
+ } else {
2138
+ var c_28 = _Char___init__impl__6a9atx(65533);
2139
+ var _unary__edvuaz_29 = length;
2140
+ length = _unary__edvuaz_29 + 1 | 0;
2141
+ chars[_unary__edvuaz_29] = c_28;
2142
+ }
2143
+ } else if (codePoint_1 < 65536) {
2144
+ if (!(65533 === 65533)) {
2145
+ var c_29 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
2146
+ var _unary__edvuaz_30 = length;
2147
+ length = _unary__edvuaz_30 + 1 | 0;
2148
+ chars[_unary__edvuaz_30] = c_29;
2149
+ var c_30 = numberToChar((65533 & 1023) + 56320 | 0);
2150
+ var _unary__edvuaz_31 = length;
2151
+ length = _unary__edvuaz_31 + 1 | 0;
2152
+ chars[_unary__edvuaz_31] = c_30;
2153
+ } else {
2154
+ var c_31 = _Char___init__impl__6a9atx(65533);
2155
+ var _unary__edvuaz_32 = length;
2156
+ length = _unary__edvuaz_32 + 1 | 0;
2157
+ chars[_unary__edvuaz_32] = c_31;
2158
+ }
2159
+ } else {
2160
+ if (!(codePoint_1 === 65533)) {
2161
+ var c_32 = numberToChar((codePoint_1 >>> 10 | 0) + 55232 | 0);
2162
+ var _unary__edvuaz_33 = length;
2163
+ length = _unary__edvuaz_33 + 1 | 0;
2164
+ chars[_unary__edvuaz_33] = c_32;
2165
+ var c_33 = numberToChar((codePoint_1 & 1023) + 56320 | 0);
2166
+ var _unary__edvuaz_34 = length;
2167
+ length = _unary__edvuaz_34 + 1 | 0;
2168
+ chars[_unary__edvuaz_34] = c_33;
2169
+ } else {
2170
+ var c_34 = _Char___init__impl__6a9atx(65533);
2171
+ var _unary__edvuaz_35 = length;
2172
+ length = _unary__edvuaz_35 + 1 | 0;
2173
+ chars[_unary__edvuaz_35] = c_34;
2174
+ }
2175
+ }
2176
+ tmp$ret$36 = 4;
2177
+ }
2178
+ index = tmp_2 + tmp$ret$36 | 0;
2179
+ } else {
2180
+ var c_35 = _Char___init__impl__6a9atx(65533);
2181
+ var _unary__edvuaz_36 = length;
2182
+ length = _unary__edvuaz_36 + 1 | 0;
2183
+ chars[_unary__edvuaz_36] = c_35;
2184
+ index = index + 1 | 0;
2185
+ }
2186
+ }
2187
+ }
2188
+ }
2189
+ }
2190
+ return concatToString(chars, 0, length);
2191
+ }
2192
+ function get_SegmentReadContextImpl() {
2193
+ _init_properties_UnsafeBufferOperations_kt__xw75gy();
2194
+ return SegmentReadContextImpl;
2195
+ }
2196
+ var SegmentReadContextImpl;
2197
+ function get_SegmentWriteContextImpl() {
2198
+ _init_properties_UnsafeBufferOperations_kt__xw75gy();
2199
+ return SegmentWriteContextImpl;
2200
+ }
2201
+ var SegmentWriteContextImpl;
2202
+ var BufferIterationContextImpl;
2203
+ var UnsafeBufferOperations_instance;
2204
+ function UnsafeBufferOperations_getInstance() {
2205
+ return UnsafeBufferOperations_instance;
2206
+ }
2207
+ var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
2208
+ function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
2209
+ if (!properties_initialized_UnsafeBufferOperations_kt_2xfgoc) {
2210
+ properties_initialized_UnsafeBufferOperations_kt_2xfgoc = true;
2211
+ SegmentReadContextImpl = new SegmentReadContextImpl$1();
2212
+ SegmentWriteContextImpl = new SegmentWriteContextImpl$1();
2213
+ BufferIterationContextImpl = new BufferIterationContextImpl$1();
2214
+ }
2215
+ }
2216
+ function init_kotlinx_io_IOException(_this__u8e3s4) {
2217
+ captureStack(_this__u8e3s4, _this__u8e3s4.v1v_1);
2218
+ }
2219
+ function init_kotlinx_io_EOFException(_this__u8e3s4) {
2220
+ captureStack(_this__u8e3s4, _this__u8e3s4.k1s_1);
2221
+ }
2222
+ var SegmentPool_instance;
2223
+ function SegmentPool_getInstance() {
2224
+ return SegmentPool_instance;
2225
+ }
2226
+ function reverseBytes(_this__u8e3s4) {
2227
+ // Inline function 'kotlinx.io.reverseBytesCommon' call
2228
+ return shiftRightUnsigned(_this__u8e3s4 & -72057594037927936n, 56) | shiftRightUnsigned(_this__u8e3s4 & 71776119061217280n, 40) | shiftRightUnsigned(_this__u8e3s4 & 280375465082880n, 24) | shiftRightUnsigned(_this__u8e3s4 & 1095216660480n, 8) | shiftLeft(_this__u8e3s4 & 4278190080n, 8) | shiftLeft(_this__u8e3s4 & 16711680n, 24) | shiftLeft(_this__u8e3s4 & 65280n, 40) | shiftLeft(_this__u8e3s4 & 255n, 56);
2229
+ }
2230
+ function reverseBytes_0(_this__u8e3s4) {
2231
+ // Inline function 'kotlinx.io.reverseBytesCommon' call
2232
+ var i = _this__u8e3s4 & 65535;
2233
+ var reversed = (i & 65280) >>> 8 | 0 | (i & 255) << 8;
2234
+ return toShort(reversed);
2235
+ }
2236
+ //region block: post-declaration
2237
+ initMetadataForInterface(Source, 'Source', VOID, VOID, [AutoCloseable]);
2238
+ initMetadataForInterface(Sink, 'Sink', VOID, VOID, [AutoCloseable]);
2239
+ protoOf(Buffer).d1u = write$default;
2240
+ initMetadataForClass(Buffer, 'Buffer', Buffer, VOID, [Source, Sink]);
2241
+ initMetadataForClass(PeekSource, 'PeekSource', VOID, VOID, [AutoCloseable]);
2242
+ initMetadataForClass(RealSource, 'RealSource', VOID, VOID, [Source]);
2243
+ initMetadataForCompanion(Companion);
2244
+ initMetadataForClass(Segment, 'Segment');
2245
+ initMetadataForClass(SegmentCopyTracker, 'SegmentCopyTracker');
2246
+ initMetadataForObject(AlwaysSharedCopyTracker, 'AlwaysSharedCopyTracker');
2247
+ initMetadataForObject(UnsafeBufferOperations, 'UnsafeBufferOperations');
2248
+ initMetadataForClass(SegmentReadContextImpl$1);
2249
+ initMetadataForClass(SegmentWriteContextImpl$1);
2250
+ initMetadataForClass(BufferIterationContextImpl$1);
2251
+ initMetadataForClass(IOException, 'IOException', IOException.w1v);
2252
+ initMetadataForClass(EOFException, 'EOFException', EOFException.z1v);
2253
+ initMetadataForObject(SegmentPool, 'SegmentPool');
2254
+ //endregion
2255
+ //region block: init
2256
+ Companion_instance = new Companion();
2257
+ UnsafeBufferOperations_instance = new UnsafeBufferOperations();
2258
+ SegmentPool_instance = new SegmentPool();
2259
+ //endregion
2260
+ //region block: exports
2261
+ export {
2262
+ Buffer as Buffergs925ekssbch,
2263
+ EOFException as EOFExceptionh831u25jcq9n,
2264
+ IOException as IOException1wyutdmfe71nu,
2265
+ Source as Source1shr0ps16u4p4,
2266
+ indexOf_1 as indexOf29nspdgx2e3ap,
2267
+ readByteArray_0 as readByteArray1fhzfwi2j014k,
2268
+ readByteArray as readByteArray1ri21h2rciakw,
2269
+ readByteString as readByteString2hnsbql6t4ads,
2270
+ readLongLe as readLongLe2rie7ma7nvb8l,
2271
+ readString_0 as readString2nvggcfaijfhd,
2272
+ readString as readString3v6duspiz33tv,
2273
+ readUByte as readUByte1bk383bbml78s,
2274
+ readULongLe as readULongLe85hcoxmq2r21,
2275
+ readUShortLe as readUShortLe2ulpsf04o6sle,
2276
+ writeLongLe as writeLongLe21f4v9fi8f2ud,
2277
+ writeString as writeString33ca4btrgctw7,
2278
+ writeUByte as writeUByte3nig1vidorr05,
2279
+ writeULongLe as writeULongLe1350gdjm9hbuc,
2280
+ writeUShortLe as writeUShortLe2oghuo8aeevlb,
2281
+ };
2282
+ //endregion
2283
+
2284
+ //# sourceMappingURL=kotlinx-io-kotlinx-io-core.mjs.map