@fossa-app/bridge 0.1.10 → 0.1.12

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 (211) hide show
  1. package/dist/Models/ApiModels/EnvelopeModels.d.ts +5 -5
  2. package/dist/Models/ApiModels/EnvelopeModels.js +16 -16
  3. package/dist/Models/ApiModels/EnvelopeModels.js.map +1 -1
  4. package/dist/Models/ApiModels/PayloadModels.d.ts +5 -5
  5. package/dist/Models/ApiModels/PayloadModels.js +127 -97
  6. package/dist/Models/ApiModels/PayloadModels.js.map +1 -1
  7. package/dist/Models/ApiModels/SharedModels.d.ts +3 -3
  8. package/dist/Models/ApiModels/SharedModels.js +35 -30
  9. package/dist/Models/ApiModels/SharedModels.js.map +1 -1
  10. package/dist/Services/Clients/BranchClient.d.ts +2 -2
  11. package/dist/Services/Clients/BranchClient.js +26 -37
  12. package/dist/Services/Clients/BranchClient.js.map +1 -1
  13. package/dist/Services/Clients/CompanyClient.d.ts +1 -1
  14. package/dist/Services/Clients/CompanyClient.js +17 -26
  15. package/dist/Services/Clients/CompanyClient.js.map +1 -1
  16. package/dist/Services/Clients/CompanyLicenseClient.d.ts +1 -1
  17. package/dist/Services/Clients/CompanyLicenseClient.js +13 -20
  18. package/dist/Services/Clients/CompanyLicenseClient.js.map +1 -1
  19. package/dist/Services/Clients/CompanySettingsClient.d.ts +1 -1
  20. package/dist/Services/Clients/CompanySettingsClient.js +17 -26
  21. package/dist/Services/Clients/CompanySettingsClient.js.map +1 -1
  22. package/dist/Services/Clients/DepartmentClient.d.ts +2 -2
  23. package/dist/Services/Clients/DepartmentClient.js +26 -37
  24. package/dist/Services/Clients/DepartmentClient.js.map +1 -1
  25. package/dist/Services/Clients/EmployeeClient.d.ts +2 -2
  26. package/dist/Services/Clients/EmployeeClient.js +30 -43
  27. package/dist/Services/Clients/EmployeeClient.js.map +1 -1
  28. package/dist/Services/Clients/IBranchClient.d.ts +1 -1
  29. package/dist/Services/Clients/IBranchClient.js +1 -2
  30. package/dist/Services/Clients/ICompanyClient.js +1 -2
  31. package/dist/Services/Clients/ICompanyLicenseClient.js +1 -2
  32. package/dist/Services/Clients/ICompanySettingsClient.js +1 -2
  33. package/dist/Services/Clients/IDepartmentClient.d.ts +1 -1
  34. package/dist/Services/Clients/IDepartmentClient.js +1 -2
  35. package/dist/Services/Clients/IEmployeeClient.d.ts +1 -1
  36. package/dist/Services/Clients/IEmployeeClient.js +1 -2
  37. package/dist/Services/Clients/IIdentityClient.js +1 -2
  38. package/dist/Services/Clients/ISystemLicenseClient.js +1 -2
  39. package/dist/Services/Clients/IdentityClient.d.ts +1 -1
  40. package/dist/Services/Clients/IdentityClient.js +11 -17
  41. package/dist/Services/Clients/IdentityClient.js.map +1 -1
  42. package/dist/Services/Clients/SystemLicenseClient.d.ts +1 -1
  43. package/dist/Services/Clients/SystemLicenseClient.js +11 -17
  44. package/dist/Services/Clients/SystemLicenseClient.js.map +1 -1
  45. package/dist/Services/Endpoints.js +10 -13
  46. package/dist/Services/Endpoints.js.map +1 -1
  47. package/dist/Services/IHttpTransport.d.ts +4 -4
  48. package/dist/Services/IHttpTransport.js +1 -2
  49. package/dist/Services/UrlHelpers.d.ts +6 -6
  50. package/dist/Services/UrlHelpers.js +44 -62
  51. package/dist/Services/UrlHelpers.js.map +1 -1
  52. package/package.json +7 -2
  53. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.d.ts +0 -125
  54. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.js +0 -1371
  55. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Array.js.map +0 -1
  56. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.d.ts +0 -27
  57. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.js +0 -172
  58. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Async.js.map +0 -1
  59. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.d.ts +0 -59
  60. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.js +0 -194
  61. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/AsyncBuilder.js.map +0 -1
  62. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.d.ts +0 -129
  63. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.js +0 -428
  64. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BigInt.js.map +0 -1
  65. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.d.ts +0 -27
  66. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.js +0 -165
  67. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/BitConverter.js.map +0 -1
  68. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.d.ts +0 -3
  69. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.js +0 -27
  70. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Boolean.js.map +0 -1
  71. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.d.ts +0 -66
  72. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.js +0 -271
  73. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Char.js.map +0 -1
  74. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.d.ts +0 -121
  75. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.js +0 -231
  76. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Choice.js.map +0 -1
  77. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.d.ts +0 -8
  78. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.js +0 -192
  79. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/CollectionUtil.js.map +0 -1
  80. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.d.ts +0 -9
  81. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.js +0 -26
  82. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/ConditionalWeakTable.js.map +0 -1
  83. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.d.ts +0 -70
  84. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.js +0 -812
  85. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Date.js.map +0 -1
  86. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.d.ts +0 -65
  87. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.js +0 -345
  88. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOffset.js.map +0 -1
  89. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.d.ts +0 -18
  90. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.js +0 -143
  91. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/DateOnly.js.map +0 -1
  92. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.d.ts +0 -63
  93. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.js +0 -322
  94. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Decimal.js.map +0 -1
  95. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.d.ts +0 -11
  96. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.js +0 -60
  97. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Double.js.map +0 -1
  98. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.d.ts +0 -12
  99. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.js +0 -178
  100. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Encoding.js.map +0 -1
  101. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.d.ts +0 -31
  102. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.js +0 -109
  103. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Event.js.map +0 -1
  104. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.d.ts +0 -7
  105. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.js +0 -53
  106. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Collections.js.map +0 -1
  107. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.d.ts +0 -12
  108. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.js +0 -38
  109. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.CompilerServices.js.map +0 -1
  110. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.d.ts +0 -30
  111. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.js +0 -185
  112. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/FSharp.Core.js.map +0 -1
  113. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.d.ts +0 -45
  114. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.js +0 -33
  115. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Global.js.map +0 -1
  116. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.d.ts +0 -10
  117. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.js +0 -152
  118. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Guid.js.map +0 -1
  119. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.d.ts +0 -29
  120. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.js +0 -148
  121. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Int32.js.map +0 -1
  122. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.d.ts +0 -143
  123. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.js +0 -1404
  124. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/List.js.map +0 -1
  125. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.d.ts +0 -3
  126. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.js +0 -52
  127. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Long.js.map +0 -1
  128. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.d.ts +0 -25
  129. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.js +0 -104
  130. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MailboxProcessor.js.map +0 -1
  131. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.d.ts +0 -178
  132. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.js +0 -1525
  133. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Map.js.map +0 -1
  134. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.d.ts +0 -12
  135. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.js +0 -141
  136. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MapUtil.js.map +0 -1
  137. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.d.ts +0 -52
  138. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.js +0 -355
  139. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableMap.js.map +0 -1
  140. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.d.ts +0 -39
  141. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.js +0 -246
  142. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/MutableSet.js.map +0 -1
  143. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.d.ts +0 -3
  144. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.js +0 -18
  145. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Native.js.map +0 -1
  146. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.d.ts +0 -20
  147. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.js +0 -87
  148. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Numeric.js.map +0 -1
  149. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.d.ts +0 -32
  150. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.js +0 -128
  151. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Observable.js.map +0 -1
  152. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.d.ts +0 -29
  153. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.js +0 -127
  154. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Option.js.map +0 -1
  155. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.d.ts +0 -38
  156. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.js +0 -186
  157. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Random.js.map +0 -1
  158. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.d.ts +0 -12
  159. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.js +0 -56
  160. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Range.js.map +0 -1
  161. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.d.ts +0 -119
  162. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.js +0 -529
  163. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Reflection.js.map +0 -1
  164. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.d.ts +0 -10
  165. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.js +0 -144
  166. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/RegExp.js.map +0 -1
  167. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.d.ts +0 -38
  168. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.js +0 -191
  169. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Result.js.map +0 -1
  170. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.d.ts +0 -164
  171. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.js +0 -1501
  172. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq.js.map +0 -1
  173. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.d.ts +0 -18
  174. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.js +0 -129
  175. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Seq2.js.map +0 -1
  176. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.d.ts +0 -190
  177. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.js +0 -1931
  178. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Set.js.map +0 -1
  179. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.d.ts +0 -59
  180. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.js +0 -677
  181. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/String.js.map +0 -1
  182. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.d.ts +0 -85
  183. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.js +0 -390
  184. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Collections.Generic.js.map +0 -1
  185. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.d.ts +0 -40
  186. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.js +0 -204
  187. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.Text.js.map +0 -1
  188. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.d.ts +0 -121
  189. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.js +0 -367
  190. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/System.js.map +0 -1
  191. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.d.ts +0 -15
  192. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.js +0 -138
  193. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeOnly.js.map +0 -1
  194. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.d.ts +0 -35
  195. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.js +0 -210
  196. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/TimeSpan.js.map +0 -1
  197. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.d.ts +0 -19
  198. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.js +0 -72
  199. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Timer.js.map +0 -1
  200. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.d.ts +0 -51
  201. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.js +0 -205
  202. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Types.js.map +0 -1
  203. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.d.ts +0 -2
  204. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.js +0 -8
  205. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Unicode.13.0.0.js.map +0 -1
  206. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.d.ts +0 -32
  207. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.js +0 -170
  208. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Uri.js.map +0 -1
  209. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.d.ts +0 -243
  210. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.js +0 -903
  211. package/dist/fable_modules/fable-library-ts.5.0.0-rc.1/Util.js.map +0 -1
@@ -1,677 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StringComparison = void 0;
4
- exports.compare = compare;
5
- exports.compareOrdinal = compareOrdinal;
6
- exports.compareTo = compareTo;
7
- exports.startsWith = startsWith;
8
- exports.endsWith = endsWith;
9
- exports.indexOfAny = indexOfAny;
10
- exports.printf = printf;
11
- exports.interpolate = interpolate;
12
- exports.toConsole = toConsole;
13
- exports.toConsoleError = toConsoleError;
14
- exports.toText = toText;
15
- exports.toFail = toFail;
16
- exports.fsFormat = fsFormat;
17
- exports.format = format;
18
- exports.initialize = initialize;
19
- exports.insert = insert;
20
- exports.isNullOrEmpty = isNullOrEmpty;
21
- exports.isNullOrWhiteSpace = isNullOrWhiteSpace;
22
- exports.concat = concat;
23
- exports.join = join;
24
- exports.joinWithIndices = joinWithIndices;
25
- exports.toBase64String = toBase64String;
26
- exports.fromBase64String = fromBase64String;
27
- exports.padLeft = padLeft;
28
- exports.padRight = padRight;
29
- exports.remove = remove;
30
- exports.replace = replace;
31
- exports.replicate = replicate;
32
- exports.getCharAtIndex = getCharAtIndex;
33
- exports.split = split;
34
- exports.trim = trim;
35
- exports.trimStart = trimStart;
36
- exports.trimEnd = trimEnd;
37
- exports.filter = filter;
38
- exports.substring = substring;
39
- exports.toCharArray2 = toCharArray2;
40
- exports.fmt = fmt;
41
- exports.fmtWith = fmtWith;
42
- exports.getFormat = getFormat;
43
- const Date_ts_1 = require("./Date.js");
44
- const Numeric_ts_1 = require("./Numeric.js");
45
- const RegExp_ts_1 = require("./RegExp.js");
46
- const Types_ts_1 = require("./Types.js");
47
- const Util_ts_1 = require("./Util.js");
48
- const fsFormatRegExp = /(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g;
49
- const interpolateRegExp = /(?:(^|[^%])%([0+\- ]*)(\d+)?(?:\.(\d+))?(\w))?%P\(\)/g;
50
- const formatRegExp = /\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;
51
- function isLessThan(x, y) {
52
- return (0, Numeric_ts_1.compare)(x, y) < 0;
53
- }
54
- exports.StringComparison = {
55
- CurrentCulture: 0,
56
- CurrentCultureIgnoreCase: 1,
57
- InvariantCulture: 2,
58
- InvariantCultureIgnoreCase: 3,
59
- Ordinal: 4,
60
- OrdinalIgnoreCase: 5,
61
- };
62
- function cmp(x, y, ic) {
63
- function isIgnoreCase(i) {
64
- return i === true ||
65
- i === exports.StringComparison.CurrentCultureIgnoreCase ||
66
- i === exports.StringComparison.InvariantCultureIgnoreCase ||
67
- i === exports.StringComparison.OrdinalIgnoreCase;
68
- }
69
- function isOrdinal(i) {
70
- return i === exports.StringComparison.Ordinal ||
71
- i === exports.StringComparison.OrdinalIgnoreCase;
72
- }
73
- if (x == null) {
74
- return y == null ? 0 : -1;
75
- }
76
- if (y == null) {
77
- return 1;
78
- } // everything is bigger than null
79
- if (isOrdinal(ic)) {
80
- if (isIgnoreCase(ic)) {
81
- x = x.toLowerCase();
82
- y = y.toLowerCase();
83
- }
84
- return (x === y) ? 0 : (x < y ? -1 : 1);
85
- }
86
- else {
87
- if (isIgnoreCase(ic)) {
88
- x = x.toLocaleLowerCase();
89
- y = y.toLocaleLowerCase();
90
- }
91
- return x.localeCompare(y);
92
- }
93
- }
94
- function compare(...args) {
95
- switch (args.length) {
96
- case 2: return cmp(args[0], args[1], false);
97
- case 3: return cmp(args[0], args[1], args[2]);
98
- case 4: return cmp(args[0], args[1], args[2] === true);
99
- case 5: return cmp(args[0].slice(args[1], args[1] + args[4]), args[2].slice(args[3], args[3] + args[4]), false);
100
- case 6: return cmp(args[0].slice(args[1], args[1] + args[4]), args[2].slice(args[3], args[3] + args[4]), args[5]);
101
- case 7: return cmp(args[0].slice(args[1], args[1] + args[4]), args[2].slice(args[3], args[3] + args[4]), args[5] === true);
102
- default: throw new Util_ts_1.Exception("String.compare: Unsupported number of parameters");
103
- }
104
- }
105
- function compareOrdinal(x, y) {
106
- return cmp(x, y, exports.StringComparison.Ordinal);
107
- }
108
- function compareTo(x, y) {
109
- return cmp(x, y, exports.StringComparison.CurrentCulture);
110
- }
111
- function startsWith(str, pattern, ic) {
112
- if (ic === exports.StringComparison.Ordinal) { // to avoid substring allocation
113
- return str.startsWith(pattern);
114
- }
115
- if (str.length >= pattern.length) {
116
- return cmp(str.slice(0, pattern.length), pattern, ic) === 0;
117
- }
118
- return false;
119
- }
120
- function endsWith(str, pattern, ic) {
121
- if (ic === exports.StringComparison.Ordinal) { // to avoid substring allocation
122
- return str.endsWith(pattern);
123
- }
124
- if (str.length >= pattern.length) {
125
- return cmp(str.slice(-pattern.length), pattern, ic) === 0;
126
- }
127
- return false;
128
- }
129
- function indexOfAny(str, anyOf, ...args) {
130
- if (str == null || str === "") {
131
- return -1;
132
- }
133
- const startIndex = (args.length > 0) ? args[0] : 0;
134
- if (startIndex < 0) {
135
- throw new Util_ts_1.Exception("Start index cannot be negative");
136
- }
137
- const length = (args.length > 1) ? args[1] : str.length - startIndex;
138
- if (length < 0) {
139
- throw new Util_ts_1.Exception("Length cannot be negative");
140
- }
141
- if (startIndex + length > str.length) {
142
- throw new Util_ts_1.Exception("Invalid startIndex and length");
143
- }
144
- const endIndex = startIndex + length;
145
- const anyOfAsStr = "".concat.apply("", anyOf);
146
- for (let i = startIndex; i < endIndex; i++) {
147
- if (anyOfAsStr.indexOf(str[i]) > -1) {
148
- return i;
149
- }
150
- }
151
- return -1;
152
- }
153
- function printf(input) {
154
- return {
155
- input,
156
- cont: fsFormat(input),
157
- };
158
- }
159
- function interpolate(str, values) {
160
- let valIdx = 0;
161
- let strIdx = 0;
162
- let result = "";
163
- interpolateRegExp.lastIndex = 0;
164
- let match = interpolateRegExp.exec(str);
165
- while (match) {
166
- // The first group corresponds to the no-escape char (^|[^%]), the actual pattern starts in the next char
167
- // Note: we don't use negative lookbehind because some browsers don't support it yet
168
- const matchIndex = match.index + (match[1] || "").length;
169
- result += str.substring(strIdx, matchIndex).replace(/%%/g, "%");
170
- const [, , flags, padLength, precision, format] = match;
171
- // Save interpolateRegExp.lastIndex before running formatReplacement because the values
172
- // may also involve interpolation and make use of interpolateRegExp (see #3078)
173
- strIdx = interpolateRegExp.lastIndex;
174
- result += formatReplacement(values[valIdx++], flags, padLength, precision, format);
175
- // Move interpolateRegExp.lastIndex one char behind to make sure we match the no-escape char next time
176
- interpolateRegExp.lastIndex = strIdx - 1;
177
- match = interpolateRegExp.exec(str);
178
- }
179
- result += str.substring(strIdx).replace(/%%/g, "%");
180
- return result;
181
- }
182
- function continuePrint(cont, arg) {
183
- return typeof arg === "string" ? cont(arg) : arg.cont(cont);
184
- }
185
- function toConsole(arg) {
186
- // Don't remove the lambda here, see #1357
187
- return continuePrint((x) => console.log(x), arg);
188
- }
189
- function toConsoleError(arg) {
190
- return continuePrint((x) => console.error(x), arg);
191
- }
192
- function toText(arg) {
193
- return continuePrint((x) => x, arg);
194
- }
195
- function toFail(arg) {
196
- return continuePrint((x) => {
197
- throw new Util_ts_1.Exception(x);
198
- }, arg);
199
- }
200
- function formatReplacement(rep, flags, padLength, precision, format) {
201
- let sign = "";
202
- flags = flags || "";
203
- format = format || "";
204
- if ((0, Numeric_ts_1.isNumeric)(rep)) {
205
- if (format.toLowerCase() !== "x") {
206
- if (isLessThan(rep, 0)) {
207
- rep = (0, Numeric_ts_1.multiply)(rep, -1);
208
- sign = "-";
209
- }
210
- else {
211
- if (flags.indexOf(" ") >= 0) {
212
- sign = " ";
213
- }
214
- else if (flags.indexOf("+") >= 0) {
215
- sign = "+";
216
- }
217
- }
218
- }
219
- precision = precision == null ? null : parseInt(precision, 10);
220
- switch (format) {
221
- case "f":
222
- case "F":
223
- precision = precision != null ? precision : 6;
224
- rep = (0, Numeric_ts_1.toFixed)(rep, precision);
225
- break;
226
- case "g":
227
- case "G":
228
- rep = precision != null ? (0, Numeric_ts_1.toPrecision)(rep, precision) : (0, Numeric_ts_1.toPrecision)(rep);
229
- break;
230
- case "e":
231
- case "E":
232
- rep = precision != null ? (0, Numeric_ts_1.toExponential)(rep, precision) : (0, Numeric_ts_1.toExponential)(rep);
233
- break;
234
- case "x":
235
- rep = (0, Numeric_ts_1.toHex)(rep);
236
- break;
237
- case "X":
238
- rep = (0, Numeric_ts_1.toHex)(rep).toUpperCase();
239
- break;
240
- default: // AOid
241
- rep = String(rep);
242
- break;
243
- }
244
- }
245
- else if (rep instanceof Date) {
246
- rep = (0, Date_ts_1.toString)(rep);
247
- }
248
- else {
249
- rep = (0, Types_ts_1.toString)(rep);
250
- }
251
- padLength = typeof padLength === "number" ? padLength : parseInt(padLength, 10);
252
- if (!isNaN(padLength)) {
253
- const zeroFlag = flags.indexOf("0") >= 0; // Use '0' for left padding
254
- const minusFlag = flags.indexOf("-") >= 0; // Right padding
255
- const ch = minusFlag || !zeroFlag ? " " : "0";
256
- if (ch === "0") {
257
- rep = pad(rep, padLength - sign.length, ch, minusFlag);
258
- rep = sign + rep;
259
- }
260
- else {
261
- rep = pad(sign + rep, padLength, ch, minusFlag);
262
- }
263
- }
264
- else {
265
- rep = sign + rep;
266
- }
267
- return rep;
268
- }
269
- function createPrinter(cont, _strParts, _matches, _result = "", padArg = -1) {
270
- return (...args) => {
271
- // Make copies of the values passed by reference because the function can be used multiple times
272
- let result = _result;
273
- const strParts = _strParts.slice();
274
- const matches = _matches.slice();
275
- for (const arg of args) {
276
- const [, , flags, _padLength, precision, format] = matches[0];
277
- let padLength = _padLength;
278
- if (padArg >= 0) {
279
- padLength = padArg;
280
- padArg = -1;
281
- }
282
- else if (padLength === "*") {
283
- if (arg < 0) {
284
- throw new Util_ts_1.Exception("Non-negative number required");
285
- }
286
- padArg = arg;
287
- continue;
288
- }
289
- result += strParts[0];
290
- result += formatReplacement(arg, flags, padLength, precision, format);
291
- strParts.splice(0, 1);
292
- matches.splice(0, 1);
293
- }
294
- if (matches.length === 0) {
295
- result += strParts[0];
296
- return cont(result);
297
- }
298
- else {
299
- return createPrinter(cont, strParts, matches, result, padArg);
300
- }
301
- };
302
- }
303
- function fsFormat(str) {
304
- return (cont) => {
305
- fsFormatRegExp.lastIndex = 0;
306
- const strParts = [];
307
- const matches = [];
308
- let strIdx = 0;
309
- let match = fsFormatRegExp.exec(str);
310
- while (match) {
311
- // The first group corresponds to the no-escape char (^|[^%]), the actual pattern starts in the next char
312
- // Note: we don't use negative lookbehind because some browsers don't support it yet
313
- const matchIndex = match.index + (match[1] || "").length;
314
- strParts.push(str.substring(strIdx, matchIndex).replace(/%%/g, "%"));
315
- matches.push(match);
316
- strIdx = fsFormatRegExp.lastIndex;
317
- // Likewise we need to move fsFormatRegExp.lastIndex one char behind to make sure we match the no-escape char next time
318
- fsFormatRegExp.lastIndex -= 1;
319
- match = fsFormatRegExp.exec(str);
320
- }
321
- if (strParts.length === 0) {
322
- return cont(str.replace(/%%/g, "%"));
323
- }
324
- else {
325
- strParts.push(str.substring(strIdx).replace(/%%/g, "%"));
326
- return createPrinter(cont, strParts, matches);
327
- }
328
- };
329
- }
330
- function splitIntAndDecimalPart(value) {
331
- let [repInt, repDecimal] = value.split(".");
332
- repDecimal === undefined && (repDecimal = "");
333
- return {
334
- integral: repInt,
335
- decimal: repDecimal
336
- };
337
- }
338
- function thousandSeparate(value) {
339
- return value.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
340
- }
341
- function format(str, ...args) {
342
- let str2;
343
- if (typeof str === "object") {
344
- // Called with culture info
345
- str2 = String(args[0]);
346
- args.shift();
347
- }
348
- else {
349
- str2 = str;
350
- }
351
- return str2.replace(formatRegExp, (_, idx, padLength, format, precision, pattern) => {
352
- if (idx < 0 || idx >= args.length) {
353
- throw new Util_ts_1.Exception("Index must be greater or equal to zero and less than the arguments' length.");
354
- }
355
- let rep = args[idx];
356
- let parts;
357
- if ((0, Numeric_ts_1.isNumeric)(rep)) {
358
- precision = precision == "" ? null : parseInt(precision, 10);
359
- switch (format) {
360
- case "b":
361
- case "B":
362
- if (!(0, Numeric_ts_1.isIntegral)(rep)) {
363
- throw new Util_ts_1.Exception("Format specifier was invalid.");
364
- }
365
- rep = (rep >>> 0).toString(2).replace(/^0+/, "").padStart(precision || 1, "0");
366
- break;
367
- case "c":
368
- case "C":
369
- const isNegative = isLessThan(rep, 0);
370
- if (isLessThan(rep, 0)) {
371
- rep = (0, Numeric_ts_1.multiply)(rep, -1);
372
- }
373
- precision = precision == null ? 2 : precision;
374
- rep = (0, Numeric_ts_1.toFixed)(rep, precision);
375
- parts = splitIntAndDecimalPart(rep);
376
- rep = "¤" + thousandSeparate(parts.integral) + "." + padRight(parts.decimal, precision, "0");
377
- if (isNegative) {
378
- rep = "(" + rep + ")";
379
- }
380
- break;
381
- case "d":
382
- case "D":
383
- if (!(0, Numeric_ts_1.isIntegral)(rep)) {
384
- throw new Util_ts_1.Exception("Format specifier was invalid.");
385
- }
386
- rep = String(rep);
387
- if (precision != null) {
388
- if (rep.startsWith("-")) {
389
- rep = "-" + padLeft(rep.substring(1), precision, "0");
390
- }
391
- else {
392
- rep = padLeft(rep, precision, "0");
393
- }
394
- }
395
- break;
396
- case "e":
397
- case "E":
398
- rep = precision != null ? (0, Numeric_ts_1.toExponential)(rep, precision) : (0, Numeric_ts_1.toExponential)(rep);
399
- break;
400
- case "f":
401
- case "F":
402
- precision = precision != null ? precision : 2;
403
- rep = (0, Numeric_ts_1.toFixed)(rep, precision);
404
- if (precision > 0) {
405
- parts = splitIntAndDecimalPart(rep);
406
- rep = parts.integral + "." + padRight(parts.decimal, precision, "0");
407
- }
408
- break;
409
- case "g":
410
- case "G":
411
- rep = precision != null ? (0, Numeric_ts_1.toPrecision)(rep, precision) : (0, Numeric_ts_1.toPrecision)(rep);
412
- // TODO: Check why some numbers are formatted with decimal part
413
- rep = trimEnd(trimEnd(rep, "0"), ".");
414
- break;
415
- case "n":
416
- case "N":
417
- precision = precision != null ? precision : 2;
418
- rep = (0, Numeric_ts_1.toFixed)(rep, precision);
419
- parts = splitIntAndDecimalPart(rep);
420
- rep = thousandSeparate(parts.integral) + "." + padRight(parts.decimal, precision, "0");
421
- break;
422
- case "p":
423
- case "P":
424
- precision = precision != null ? precision : 2;
425
- rep = (0, Numeric_ts_1.toFixed)((0, Numeric_ts_1.multiply)(rep, 100), precision);
426
- parts = splitIntAndDecimalPart(rep);
427
- rep = thousandSeparate(parts.integral) + "." + padRight(parts.decimal, precision, "0") + " %";
428
- break;
429
- case "r":
430
- case "R":
431
- throw new Util_ts_1.Exception("The round-trip format is not supported by Fable");
432
- case "x":
433
- case "X":
434
- if (!(0, Numeric_ts_1.isIntegral)(rep)) {
435
- throw new Util_ts_1.Exception("Format specifier was invalid.");
436
- }
437
- precision = precision != null ? precision : 2;
438
- rep = padLeft((0, Numeric_ts_1.toHex)(rep), precision, "0");
439
- if (format === "X") {
440
- rep = rep.toUpperCase();
441
- }
442
- break;
443
- default:
444
- // If we have format and were not able to handle it throw
445
- // See: https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#standard-format-specifiers
446
- if (format) {
447
- throw new Util_ts_1.Exception("Format specifier was invalid.");
448
- }
449
- if (pattern) {
450
- let sign = "";
451
- rep = pattern.replace(/([0#,]+)(\.[0#]+)?/, (_, intPart, decimalPart) => {
452
- if (isLessThan(rep, 0)) {
453
- rep = (0, Numeric_ts_1.multiply)(rep, -1);
454
- sign = "-";
455
- }
456
- decimalPart = decimalPart == null ? "" : decimalPart.substring(1);
457
- rep = (0, Numeric_ts_1.toFixed)(rep, Math.max(decimalPart.length, 0));
458
- let [repInt, repDecimal] = rep.split(".");
459
- repDecimal || (repDecimal = "");
460
- const leftZeroes = intPart.replace(/,/g, "").replace(/^#+/, "").length;
461
- repInt = padLeft(repInt, leftZeroes, "0");
462
- const rightZeros = decimalPart.replace(/#+$/, "").length;
463
- if (rightZeros > repDecimal.length) {
464
- repDecimal = padRight(repDecimal, rightZeros, "0");
465
- }
466
- else if (rightZeros < repDecimal.length) {
467
- repDecimal = repDecimal.substring(0, rightZeros) + repDecimal.substring(rightZeros).replace(/0+$/, "");
468
- }
469
- // Thousands separator
470
- if (intPart.indexOf(",") > 0) {
471
- const i = repInt.length % 3;
472
- const thousandGroups = Math.floor(repInt.length / 3);
473
- let thousands = i > 0 ? repInt.substr(0, i) + (thousandGroups > 0 ? "," : "") : "";
474
- for (let j = 0; j < thousandGroups; j++) {
475
- thousands += repInt.substr(i + j * 3, 3) + (j < thousandGroups - 1 ? "," : "");
476
- }
477
- repInt = thousands;
478
- }
479
- return repDecimal.length > 0 ? repInt + "." + repDecimal : repInt;
480
- });
481
- rep = sign + rep;
482
- }
483
- }
484
- }
485
- else if (rep instanceof Date) {
486
- rep = (0, Date_ts_1.toString)(rep, pattern || format);
487
- }
488
- else {
489
- rep = (0, Types_ts_1.toString)(rep);
490
- }
491
- padLength = parseInt((padLength || " ").substring(1), 10);
492
- if (!isNaN(padLength)) {
493
- rep = pad(String(rep), Math.abs(padLength), " ", padLength < 0);
494
- }
495
- return rep;
496
- });
497
- }
498
- function initialize(n, f) {
499
- if (n < 0) {
500
- throw new Util_ts_1.Exception("String length must be non-negative");
501
- }
502
- const xs = new Array(n);
503
- for (let i = 0; i < n; i++) {
504
- xs[i] = f(i);
505
- }
506
- return xs.join("");
507
- }
508
- function insert(str, startIndex, value) {
509
- if (startIndex < 0 || startIndex > str.length) {
510
- throw new Util_ts_1.Exception("startIndex is negative or greater than the length of this instance.");
511
- }
512
- return str.substring(0, startIndex) + value + str.substring(startIndex);
513
- }
514
- function isNullOrEmpty(str) {
515
- return typeof str !== "string" || str.length === 0;
516
- }
517
- function isNullOrWhiteSpace(str) {
518
- return typeof str !== "string" || /^\s*$/.test(str);
519
- }
520
- function concat(...xs) {
521
- return xs.map((x) => String(x)).join("");
522
- }
523
- function join(delimiter, xs) {
524
- if (Array.isArray(xs)) {
525
- return xs.join(delimiter);
526
- }
527
- else {
528
- return Array.from(xs).join(delimiter);
529
- }
530
- }
531
- function joinWithIndices(delimiter, xs, startIndex, count) {
532
- const endIndexPlusOne = startIndex + count;
533
- if (endIndexPlusOne > xs.length) {
534
- throw new Util_ts_1.Exception("Index and count must refer to a location within the buffer.");
535
- }
536
- return xs.slice(startIndex, endIndexPlusOne).join(delimiter);
537
- }
538
- function notSupported(name) {
539
- throw new Util_ts_1.Exception("The environment doesn't support '" + name + "', please use a polyfill.");
540
- }
541
- function toBase64String(inArray) {
542
- let str = "";
543
- for (let i = 0; i < inArray.length; i++) {
544
- str += String.fromCharCode(inArray[i]);
545
- }
546
- return typeof btoa === "function" ? btoa(str) : notSupported("btoa");
547
- }
548
- function fromBase64String(b64Encoded) {
549
- const binary = typeof atob === "function" ? atob(b64Encoded) : notSupported("atob");
550
- const bytes = new Uint8Array(binary.length);
551
- for (let i = 0; i < binary.length; i++) {
552
- bytes[i] = binary.charCodeAt(i);
553
- }
554
- return bytes;
555
- }
556
- function pad(str, len, ch, isRight) {
557
- ch = ch || " ";
558
- len = len - str.length;
559
- for (let i = 0; i < len; i++) {
560
- str = isRight ? str + ch : ch + str;
561
- }
562
- return str;
563
- }
564
- function padLeft(str, len, ch) {
565
- return pad(str, len, ch);
566
- }
567
- function padRight(str, len, ch) {
568
- return pad(str, len, ch, true);
569
- }
570
- function remove(str, startIndex, count) {
571
- if (startIndex >= str.length) {
572
- throw new Util_ts_1.Exception("startIndex must be less than length of string");
573
- }
574
- if (typeof count === "number" && (startIndex + count) > str.length) {
575
- throw new Util_ts_1.Exception("Index and count must refer to a location within the string.");
576
- }
577
- return str.slice(0, startIndex) + (typeof count === "number" ? str.substr(startIndex + count) : "");
578
- }
579
- function replace(str, search, replace) {
580
- return str.replace(new RegExp((0, RegExp_ts_1.escape)(search), "g"), replace);
581
- }
582
- function replicate(n, x) {
583
- return initialize(n, () => x);
584
- }
585
- function getCharAtIndex(input, index) {
586
- if (index < 0 || index >= input.length) {
587
- throw new Util_ts_1.Exception("Index was outside the bounds of the array.");
588
- }
589
- return input[index];
590
- }
591
- function split(str, splitters, count, options) {
592
- count = typeof count === "number" ? count : undefined;
593
- options = typeof options === "number" ? options : 0;
594
- if (count && count < 0) {
595
- throw new Util_ts_1.Exception("Count cannot be less than zero");
596
- }
597
- if (count === 0) {
598
- return [];
599
- }
600
- const removeEmpty = (options & 1) === 1;
601
- const trim = (options & 2) === 2;
602
- splitters = splitters || [];
603
- splitters = splitters.filter(x => x).map(RegExp_ts_1.escape);
604
- splitters = splitters.length > 0 ? splitters : ["\\s"];
605
- const splits = [];
606
- const reg = new RegExp(splitters.join("|"), "g");
607
- let findSplits = true;
608
- let i = 0;
609
- do {
610
- const match = reg.exec(str);
611
- if (match === null) {
612
- const candidate = trim ? str.substring(i).trim() : str.substring(i);
613
- if (!removeEmpty || candidate.length > 0) {
614
- splits.push(candidate);
615
- }
616
- findSplits = false;
617
- }
618
- else {
619
- const candidate = trim ? str.substring(i, match.index).trim() : str.substring(i, match.index);
620
- if (!removeEmpty || candidate.length > 0) {
621
- if (count != null && splits.length + 1 === count) {
622
- splits.push(trim ? str.substring(i).trim() : str.substring(i));
623
- findSplits = false;
624
- }
625
- else {
626
- splits.push(candidate);
627
- }
628
- }
629
- i = reg.lastIndex;
630
- }
631
- } while (findSplits);
632
- return splits;
633
- }
634
- function trim(str, ...chars) {
635
- if (chars.length === 0) {
636
- return str.trim();
637
- }
638
- const pattern = "[" + (0, RegExp_ts_1.escape)(chars.join("")) + "]+";
639
- return str.replace(new RegExp("^" + pattern), "").replace(new RegExp(pattern + "$"), "");
640
- }
641
- function trimStart(str, ...chars) {
642
- return chars.length === 0
643
- ? str.trimStart()
644
- : str.replace(new RegExp("^[" + (0, RegExp_ts_1.escape)(chars.join("")) + "]+"), "");
645
- }
646
- function trimEnd(str, ...chars) {
647
- return chars.length === 0
648
- ? str.trimEnd()
649
- : str.replace(new RegExp("[" + (0, RegExp_ts_1.escape)(chars.join("")) + "]+$"), "");
650
- }
651
- function filter(pred, x) {
652
- return x.split("").filter((c) => pred(c)).join("");
653
- }
654
- function substring(str, startIndex, length) {
655
- if ((startIndex + (length || 0) > str.length)) {
656
- throw new Util_ts_1.Exception("Invalid startIndex and/or length");
657
- }
658
- return length != null ? str.substr(startIndex, length) : str.substr(startIndex);
659
- }
660
- function toCharArray2(str, startIndex, length) {
661
- return substring(str, startIndex, length).split("");
662
- }
663
- function fmt(strs, ...args) {
664
- return ({ strs, args });
665
- }
666
- function fmtWith(fmts) {
667
- return (strs, ...args) => ({ strs, args, fmts });
668
- }
669
- function getFormat(s) {
670
- const strs = s.strs.map((value) => value.replace(/{/g, '{{').replace(/}/g, '}}'));
671
- return s.fmts
672
- ? strs
673
- .reduce((acc, newPart, index) => acc + `{${String(index - 1) + s.fmts[index - 1]}}` + newPart)
674
- : strs
675
- .reduce((acc, newPart, index) => acc + `{${index - 1}}` + newPart);
676
- }
677
- //# sourceMappingURL=String.js.map