ts-data-forge 11.0.0 → 12.0.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 (185) hide show
  1. package/README.md +2 -2
  2. package/dist/number/branded-types/finite-number.d.mts +47 -61
  3. package/dist/number/branded-types/finite-number.d.mts.map +1 -1
  4. package/dist/number/branded-types/finite-number.mjs +37 -41
  5. package/dist/number/branded-types/finite-number.mjs.map +1 -1
  6. package/dist/number/branded-types/int.d.mts +40 -46
  7. package/dist/number/branded-types/int.d.mts.map +1 -1
  8. package/dist/number/branded-types/int.mjs +29 -31
  9. package/dist/number/branded-types/int.mjs.map +1 -1
  10. package/dist/number/branded-types/int16.d.mts +71 -59
  11. package/dist/number/branded-types/int16.d.mts.map +1 -1
  12. package/dist/number/branded-types/int16.mjs +56 -47
  13. package/dist/number/branded-types/int16.mjs.map +1 -1
  14. package/dist/number/branded-types/int32.d.mts +71 -59
  15. package/dist/number/branded-types/int32.d.mts.map +1 -1
  16. package/dist/number/branded-types/int32.mjs +56 -47
  17. package/dist/number/branded-types/int32.mjs.map +1 -1
  18. package/dist/number/branded-types/negative-finite-number.d.mts +76 -60
  19. package/dist/number/branded-types/negative-finite-number.d.mts.map +1 -1
  20. package/dist/number/branded-types/negative-finite-number.mjs +62 -49
  21. package/dist/number/branded-types/negative-finite-number.mjs.map +1 -1
  22. package/dist/number/branded-types/negative-int.d.mts +66 -49
  23. package/dist/number/branded-types/negative-int.d.mts.map +1 -1
  24. package/dist/number/branded-types/negative-int.mjs +48 -39
  25. package/dist/number/branded-types/negative-int.mjs.map +1 -1
  26. package/dist/number/branded-types/negative-safe-int.d.mts +64 -57
  27. package/dist/number/branded-types/negative-safe-int.d.mts.map +1 -1
  28. package/dist/number/branded-types/negative-safe-int.mjs +49 -44
  29. package/dist/number/branded-types/negative-safe-int.mjs.map +1 -1
  30. package/dist/number/branded-types/non-negative-finite-number.d.mts +80 -65
  31. package/dist/number/branded-types/non-negative-finite-number.d.mts.map +1 -1
  32. package/dist/number/branded-types/non-negative-finite-number.mjs +65 -53
  33. package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
  34. package/dist/number/branded-types/non-negative-int16.d.mts +71 -58
  35. package/dist/number/branded-types/non-negative-int16.d.mts.map +1 -1
  36. package/dist/number/branded-types/non-negative-int16.mjs +55 -45
  37. package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
  38. package/dist/number/branded-types/non-negative-int32.d.mts +71 -59
  39. package/dist/number/branded-types/non-negative-int32.d.mts.map +1 -1
  40. package/dist/number/branded-types/non-negative-int32.mjs +55 -46
  41. package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
  42. package/dist/number/branded-types/non-positive-finite-number.d.mts +70 -55
  43. package/dist/number/branded-types/non-positive-finite-number.d.mts.map +1 -1
  44. package/dist/number/branded-types/non-positive-finite-number.mjs +55 -43
  45. package/dist/number/branded-types/non-positive-finite-number.mjs.map +1 -1
  46. package/dist/number/branded-types/non-positive-int.d.mts +46 -146
  47. package/dist/number/branded-types/non-positive-int.d.mts.map +1 -1
  48. package/dist/number/branded-types/non-positive-int.mjs +33 -108
  49. package/dist/number/branded-types/non-positive-int.mjs.map +1 -1
  50. package/dist/number/branded-types/non-positive-safe-int.d.mts +62 -54
  51. package/dist/number/branded-types/non-positive-safe-int.d.mts.map +1 -1
  52. package/dist/number/branded-types/non-positive-safe-int.mjs +46 -41
  53. package/dist/number/branded-types/non-positive-safe-int.mjs.map +1 -1
  54. package/dist/number/branded-types/non-zero-finite-number.d.mts +62 -49
  55. package/dist/number/branded-types/non-zero-finite-number.d.mts.map +1 -1
  56. package/dist/number/branded-types/non-zero-finite-number.mjs +46 -37
  57. package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
  58. package/dist/number/branded-types/non-zero-int.d.mts +51 -38
  59. package/dist/number/branded-types/non-zero-int.d.mts.map +1 -1
  60. package/dist/number/branded-types/non-zero-int.mjs +31 -27
  61. package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
  62. package/dist/number/branded-types/non-zero-int16.d.mts +59 -54
  63. package/dist/number/branded-types/non-zero-int16.d.mts.map +1 -1
  64. package/dist/number/branded-types/non-zero-int16.mjs +44 -41
  65. package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
  66. package/dist/number/branded-types/non-zero-int32.d.mts +59 -55
  67. package/dist/number/branded-types/non-zero-int32.d.mts.map +1 -1
  68. package/dist/number/branded-types/non-zero-int32.mjs +44 -42
  69. package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
  70. package/dist/number/branded-types/non-zero-safe-int.d.mts +60 -55
  71. package/dist/number/branded-types/non-zero-safe-int.d.mts.map +1 -1
  72. package/dist/number/branded-types/non-zero-safe-int.mjs +44 -42
  73. package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
  74. package/dist/number/branded-types/non-zero-uint16.d.mts +59 -54
  75. package/dist/number/branded-types/non-zero-uint16.d.mts.map +1 -1
  76. package/dist/number/branded-types/non-zero-uint16.mjs +43 -41
  77. package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
  78. package/dist/number/branded-types/non-zero-uint32.d.mts +59 -54
  79. package/dist/number/branded-types/non-zero-uint32.d.mts.map +1 -1
  80. package/dist/number/branded-types/non-zero-uint32.mjs +43 -41
  81. package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
  82. package/dist/number/branded-types/positive-finite-number.d.mts +82 -64
  83. package/dist/number/branded-types/positive-finite-number.d.mts.map +1 -1
  84. package/dist/number/branded-types/positive-finite-number.mjs +67 -52
  85. package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
  86. package/dist/number/branded-types/positive-int.d.mts +53 -70
  87. package/dist/number/branded-types/positive-int.d.mts.map +1 -1
  88. package/dist/number/branded-types/positive-int.mjs +42 -52
  89. package/dist/number/branded-types/positive-int.mjs.map +1 -1
  90. package/dist/number/branded-types/positive-int16.d.mts +68 -58
  91. package/dist/number/branded-types/positive-int16.d.mts.map +1 -1
  92. package/dist/number/branded-types/positive-int16.mjs +52 -45
  93. package/dist/number/branded-types/positive-int16.mjs.map +1 -1
  94. package/dist/number/branded-types/positive-int32.d.mts +68 -58
  95. package/dist/number/branded-types/positive-int32.d.mts.map +1 -1
  96. package/dist/number/branded-types/positive-int32.mjs +52 -45
  97. package/dist/number/branded-types/positive-int32.mjs.map +1 -1
  98. package/dist/number/branded-types/positive-safe-int.d.mts +72 -61
  99. package/dist/number/branded-types/positive-safe-int.d.mts.map +1 -1
  100. package/dist/number/branded-types/positive-safe-int.mjs +56 -48
  101. package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
  102. package/dist/number/branded-types/positive-uint16.d.mts +68 -58
  103. package/dist/number/branded-types/positive-uint16.d.mts.map +1 -1
  104. package/dist/number/branded-types/positive-uint16.mjs +52 -45
  105. package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
  106. package/dist/number/branded-types/positive-uint32.d.mts +68 -59
  107. package/dist/number/branded-types/positive-uint32.d.mts.map +1 -1
  108. package/dist/number/branded-types/positive-uint32.mjs +52 -46
  109. package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
  110. package/dist/number/branded-types/safe-int.d.mts +52 -66
  111. package/dist/number/branded-types/safe-int.d.mts.map +1 -1
  112. package/dist/number/branded-types/safe-int.mjs +45 -47
  113. package/dist/number/branded-types/safe-int.mjs.map +1 -1
  114. package/dist/number/branded-types/safe-uint.d.mts +68 -58
  115. package/dist/number/branded-types/safe-uint.d.mts.map +1 -1
  116. package/dist/number/branded-types/safe-uint.mjs +53 -46
  117. package/dist/number/branded-types/safe-uint.mjs.map +1 -1
  118. package/dist/number/branded-types/uint.d.mts +72 -55
  119. package/dist/number/branded-types/uint.d.mts.map +1 -1
  120. package/dist/number/branded-types/uint.mjs +52 -45
  121. package/dist/number/branded-types/uint.mjs.map +1 -1
  122. package/dist/number/branded-types/uint16.d.mts +66 -59
  123. package/dist/number/branded-types/uint16.d.mts.map +1 -1
  124. package/dist/number/branded-types/uint16.mjs +51 -45
  125. package/dist/number/branded-types/uint16.mjs.map +1 -1
  126. package/dist/number/branded-types/uint32.d.mts +66 -57
  127. package/dist/number/branded-types/uint32.d.mts.map +1 -1
  128. package/dist/number/branded-types/uint32.mjs +50 -45
  129. package/dist/number/branded-types/uint32.mjs.map +1 -1
  130. package/dist/number/enum/int8.d.mts +62 -66
  131. package/dist/number/enum/int8.d.mts.map +1 -1
  132. package/dist/number/enum/int8.mjs +57 -51
  133. package/dist/number/enum/int8.mjs.map +1 -1
  134. package/dist/number/enum/uint8.d.mts +66 -59
  135. package/dist/number/enum/uint8.d.mts.map +1 -1
  136. package/dist/number/enum/uint8.mjs +57 -51
  137. package/dist/number/enum/uint8.mjs.map +1 -1
  138. package/dist/number/refined-number-utils.d.mts +9 -9
  139. package/dist/number/refined-number-utils.d.mts.map +1 -1
  140. package/dist/number/refined-number-utils.mjs +7 -7
  141. package/dist/number/refined-number-utils.mjs.map +1 -1
  142. package/package.json +2 -1
  143. package/src/number/branded-types/finite-number.mts +47 -61
  144. package/src/number/branded-types/int.mts +40 -46
  145. package/src/number/branded-types/int16.mts +72 -60
  146. package/src/number/branded-types/int32.mts +72 -60
  147. package/src/number/branded-types/negative-finite-number.mts +78 -71
  148. package/src/number/branded-types/negative-finite-number.test.mts +4 -4
  149. package/src/number/branded-types/negative-int.mts +68 -60
  150. package/src/number/branded-types/negative-int.test.mts +5 -5
  151. package/src/number/branded-types/negative-safe-int.mts +66 -68
  152. package/src/number/branded-types/negative-safe-int.test.mts +4 -4
  153. package/src/number/branded-types/non-negative-finite-number.mts +81 -66
  154. package/src/number/branded-types/non-negative-int16.mts +72 -59
  155. package/src/number/branded-types/non-negative-int32.mts +72 -60
  156. package/src/number/branded-types/non-positive-finite-number.mts +71 -56
  157. package/src/number/branded-types/non-positive-finite-number.test.mts +7 -7
  158. package/src/number/branded-types/non-positive-int.mts +47 -147
  159. package/src/number/branded-types/non-positive-int.test.mts +7 -7
  160. package/src/number/branded-types/non-positive-safe-int.mts +63 -55
  161. package/src/number/branded-types/non-positive-safe-int.test.mts +7 -7
  162. package/src/number/branded-types/non-zero-finite-number.mts +62 -51
  163. package/src/number/branded-types/non-zero-int.mts +51 -38
  164. package/src/number/branded-types/non-zero-int16.mts +60 -55
  165. package/src/number/branded-types/non-zero-int32.mts +60 -56
  166. package/src/number/branded-types/non-zero-safe-int.mts +61 -56
  167. package/src/number/branded-types/non-zero-uint16.mts +60 -55
  168. package/src/number/branded-types/non-zero-uint32.mts +60 -55
  169. package/src/number/branded-types/positive-finite-number.mts +83 -65
  170. package/src/number/branded-types/positive-int.mts +54 -71
  171. package/src/number/branded-types/positive-int16.mts +69 -59
  172. package/src/number/branded-types/positive-int32.mts +69 -59
  173. package/src/number/branded-types/positive-safe-int.mts +73 -62
  174. package/src/number/branded-types/positive-uint16.mts +69 -59
  175. package/src/number/branded-types/positive-uint32.mts +69 -60
  176. package/src/number/branded-types/safe-int.mts +53 -67
  177. package/src/number/branded-types/safe-uint.mts +69 -59
  178. package/src/number/branded-types/uint.mts +73 -56
  179. package/src/number/branded-types/uint16.mts +67 -60
  180. package/src/number/branded-types/uint32.mts +67 -58
  181. package/src/number/enum/int8.mts +70 -73
  182. package/src/number/enum/int8.test.mts +7 -4
  183. package/src/number/enum/uint8.mts +74 -66
  184. package/src/number/enum/uint8.test.mts +7 -4
  185. package/src/number/refined-number-utils.mts +22 -19
@@ -3,43 +3,22 @@ export type NonPositiveInt = TtfImported_NonPositiveInt;
3
3
  /**
4
4
  * Type guard that checks if a value is a non-positive integer.
5
5
  *
6
- * A non-positive integer is any integer less than or equal to zero (<= 0).
7
- * This includes zero and all negative integers, but excludes positive numbers
8
- * and non-integers.
9
- *
10
- * @example
11
- *
12
- * ```ts
13
- * assert.isTrue(isNonPositiveInt(0));
14
- *
15
- * assert.isTrue(isNonPositiveInt(-5));
16
- *
17
- * assert.isFalse(isNonPositiveInt(1));
18
- * ```
6
+ * Returns `true` for a non-positive integer — a value with no fractional
7
+ * component, including values outside the safe integer range (unlike
8
+ * `SafeInt`).
19
9
  *
20
10
  * @param value - The value to check
21
11
  * @returns `true` if the value is a non-positive integer, `false` otherwise
22
12
  */
23
13
  export declare const isNonPositiveInt: (a: number) => a is TtfImported_NonPositiveInt;
24
14
  /**
25
- * Casts a number to a NonPositiveInt branded type.
26
- *
27
- * This function validates that the input is a non-positive integer (<= 0) and
28
- * returns it with the NonPositiveInt brand. This ensures type safety for
29
- * operations that require non-positive integer values.
30
- *
31
- * @example
15
+ * Casts a `number` to the `NonPositiveInt` branded type.
32
16
  *
33
- * ```ts
34
- * const branded = asNonPositiveInt(-7);
35
- *
36
- * assert.isTrue(branded === -7);
37
- *
38
- * assert.isTrue(NonPositiveInt.is(branded));
39
- * ```
17
+ * Validates that the value is a non-positive integer and returns it with the
18
+ * `NonPositiveInt` brand. Throws a `TypeError` otherwise.
40
19
  *
41
20
  * @param value - The value to cast
42
- * @returns The value as a NonPositiveInt branded type
21
+ * @returns The value as a `NonPositiveInt`
43
22
  * @throws {TypeError} If the value is not a non-positive integer
44
23
  */
45
24
  export declare const asNonPositiveInt: <N extends number>(x: N) => number & {
@@ -55,169 +34,90 @@ export declare const asNonPositiveInt: <N extends number>(x: N) => number & {
55
34
  'TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3': unknown;
56
35
  }> & N;
57
36
  /**
58
- * Namespace providing type-safe operations for NonPositiveInt branded types.
59
- *
60
- * NonPositiveInt represents integers that are less than or equal to zero (<= 0).
61
- * All operations automatically clamp results to maintain the non-positive
62
- * constraint, ensuring that arithmetic operations never produce positive values.
37
+ * Namespace providing type-safe operations for the `NonPositiveInt` branded
38
+ * type.
63
39
  *
64
- * This type is essential for:
40
+ * The `NonPositiveInt` type represents a non-positive integer. Division (`div`)
41
+ * uses floor division.
65
42
  *
66
- * - Debts and negative balances
67
- * - Penalties and reductions
68
- * - Offsets and adjustments (downward)
69
- * - Negative counts or differences
70
- * - Depth or altitude below a reference point
43
+ * Unlike `SafeInt`, `NonPositiveInt` allows values outside the safe integer
44
+ * range (±2^53 − 1), so very large magnitudes may lose precision in
45
+ * JavaScript's `number` type.
71
46
  */
72
47
  export declare const NonPositiveInt: {
73
48
  /**
74
49
  * Type guard that checks if a value is a non-positive integer.
75
50
  *
76
- * @example
77
- *
78
- * ```ts
79
- * const value: number = -42;
80
- *
81
- * if (NonPositiveInt.is(value)) {
82
- * // value is now typed as NonPositiveInt
83
- * const debt = value;
84
- * }
85
- * ```
86
- *
87
51
  * @param value - The value to check
88
52
  * @returns `true` if the value is a non-positive integer, `false` otherwise
53
+ * @see {@link isNonPositiveInt} for usage examples
89
54
  */
90
55
  readonly is: (a: number) => a is TtfImported_NonPositiveInt;
91
56
  /**
92
- * The maximum value for a non-positive integer.
93
- *
94
- * @readonly
57
+ * The largest value representable as `NonPositiveInt` (the upper saturation
58
+ * target of `fromNumber`).
95
59
  */
96
60
  readonly MAX_VALUE: 0;
97
61
  /**
98
- * Returns the smaller of two non-positive integers.
99
- *
100
- * Since non-positive integers range from negative infinity to 0, the smaller
101
- * value is the one further from zero (more negative).
102
- *
103
- * @example
104
- *
105
- * ```ts
106
- * const result = NonPositiveInt.min(-5, -10);
107
- *
108
- * assert.strictEqual(result, -10);
109
- * ```
62
+ * Returns the smallest of the given non-positive integers.
110
63
  *
111
- * @param a - The first non-positive integer
112
- * @param b - The second non-positive integer
113
- * @returns The minimum value as a non-positive integer
64
+ * @param values - The non-positive integers to compare (at least one required)
65
+ * @returns The smallest value as a `NonPositiveInt`
114
66
  */
115
67
  readonly min: (...values: readonly import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt>[]) => TtfImported_NonPositiveInt;
116
68
  /**
117
- * Returns the larger of two non-positive integers.
118
- *
119
- * Since non-positive integers range from negative infinity to 0, the larger
120
- * value is the one closer to zero (less negative).
121
- *
122
- * @example
123
- *
124
- * ```ts
125
- * const result = NonPositiveInt.max(-5, -10);
69
+ * Returns the largest of the given non-positive integers.
126
70
  *
127
- * assert.strictEqual(result, -5);
128
- * ```
129
- *
130
- * @param a - The first non-positive integer
131
- * @param b - The second non-positive integer
132
- * @returns The maximum value as a non-positive integer
71
+ * @param values - The non-positive integers to compare (at least one required)
72
+ * @returns The largest value as a `NonPositiveInt`
133
73
  */
134
74
  readonly max: (...values: readonly import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt>[]) => TtfImported_NonPositiveInt;
135
75
  /**
136
- * Clamps a number to the non-positive integer range.
137
- *
138
- * Any positive value is clamped to 0 (the maximum non-positive integer).
139
- * Negative values are preserved as long as they are valid integers.
140
- *
141
- * @example
142
- *
143
- * ```ts
144
- * assert.strictEqual(NonPositiveInt.clamp(5), 0);
76
+ * Converts an arbitrary `number` into a `NonPositiveInt`, rounding to the
77
+ * nearest integer and saturating the result into the range `[MIN_VALUE,
78
+ * MAX_VALUE]`.
145
79
  *
146
- * assert.strictEqual(NonPositiveInt.clamp(-5), -5);
80
+ * Unlike `asNonPositiveInt`, this is total: out-of-range inputs are clamped
81
+ * to the nearest representable `NonPositiveInt` instead of throwing.
147
82
  *
148
- * assert.strictEqual(NonPositiveInt.clamp(0), 0);
149
- * ```
150
- *
151
- * @param value - The number to clamp
152
- * @returns The value clamped to the non-positive integer range
83
+ * @param value - The value to convert
84
+ * @returns The value as a `NonPositiveInt`
153
85
  */
154
- readonly clamp: (x: number) => TtfImported_NonPositiveInt;
86
+ readonly fromNumber: (x: number) => TtfImported_NonPositiveInt;
155
87
  /**
156
- * Generates a random non-positive integer value.
157
- *
158
- * @example
159
- *
160
- * ```ts
161
- * const randomValue = NonPositiveInt.random();
88
+ * Generates a random `NonPositiveInt` within the given range.
162
89
  *
163
- * assert.isTrue(NonPositiveInt.is(randomValue));
164
- * ```
90
+ * The range is inclusive on both ends.
165
91
  *
166
- * @returns A random non-positive integer
92
+ * @param min - The minimum value (inclusive)
93
+ * @param max - The maximum value (inclusive)
94
+ * @returns A random `NonPositiveInt` in `[min, max]`
167
95
  */
168
96
  readonly random: (min?: import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt> | undefined, max?: import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt> | undefined) => TtfImported_NonPositiveInt;
169
97
  /**
170
- * Raises a non-positive integer to the power of another non-positive integer.
171
- *
172
- * The result is clamped to the non-positive integer range.
173
- *
174
- * @example
175
- *
176
- * ```ts
177
- * const result = NonPositiveInt.pow(-2, -1);
178
- * ```
98
+ * Raises `a` to the power `b`, returning `a ** b` as a `NonPositiveInt`
99
+ * (floored to an integer).
179
100
  *
180
101
  * @param a - The base non-positive integer
181
102
  * @param b - The exponent non-positive integer
182
- * @returns `a ** b` clamped to the non-positive integer range
103
+ * @returns `a ** b` as a `NonPositiveInt`
183
104
  */
184
105
  readonly pow: (x: import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt>, y: import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt>) => TtfImported_NonPositiveInt;
185
106
  /**
186
- * Adds two non-positive integers.
187
- *
188
- * The result is clamped to the non-positive integer range. If the sum is
189
- * positive, it is clamped to 0.
190
- *
191
- * @example
192
- *
193
- * ```ts
194
- * assert.strictEqual(NonPositiveInt.add(-5, -3), -8);
195
- *
196
- * assert.strictEqual(NonPositiveInt.add(-5, 10), 0);
197
- * ```
107
+ * Adds two non-positive integers, returning `a + b` as a `NonPositiveInt`.
198
108
  *
199
109
  * @param a - The first non-positive integer
200
110
  * @param b - The second non-positive integer
201
- * @returns `a + b` clamped to the non-positive integer range
111
+ * @returns The sum of `a` and `b` as a `NonPositiveInt`
202
112
  */
203
113
  readonly add: (x: import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt>, y: import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt>) => TtfImported_NonPositiveInt;
204
114
  /**
205
- * Subtracts one non-positive integer from another.
206
- *
207
- * The result is clamped to the non-positive integer range. If the result is
208
- * positive, it is clamped to 0.
115
+ * Subtracts two non-positive integers, returning `a - b` as a
116
+ * `NonPositiveInt`.
209
117
  *
210
- * @example
211
- *
212
- * ```ts
213
- * assert.strictEqual(NonPositiveInt.sub(-10, -3), -7);
214
- *
215
- * assert.strictEqual(NonPositiveInt.sub(-10, 5), 0);
216
- * ```
217
- *
218
- * @param a - The minuend non-positive integer
219
- * @param b - The subtrahend non-positive integer
220
- * @returns `a - b` clamped to the non-positive integer range
118
+ * @param a - The first non-positive integer
119
+ * @param b - The second non-positive integer
120
+ * @returns The difference of `a` and `b` as a `NonPositiveInt`
221
121
  */
222
122
  readonly sub: (x: import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt>, y: import("ts-type-forge").WithSmallInt<TtfImported_NonPositiveInt>) => TtfImported_NonPositiveInt;
223
123
  };
@@ -1 +1 @@
1
- {"version":3,"file":"non-positive-int.d.mts","sourceRoot":"","sources":["../../../src/number/branded-types/non-positive-int.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,IAAI,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAGlF,MAAM,MAAM,cAAc,GAAG,0BAA0B,CAAC;AA4BxD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,gBAAgB,gDAAK,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;MAAW,CAAC;AAEzC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc;IACzB;;;;;;;;;;;;;;;;OAgBG;;IAGH;;;;OAIG;;IAGH;;;;;;;;;;;;;;;;;OAiBG;;IAGH;;;;;;;;;;;;;;;;;OAiBG;;IAGH;;;;;;;;;;;;;;;;;;OAkBG;;IAGH;;;;;;;;;;;;OAYG;;IAGH;;;;;;;;;;;;;;OAcG;;IAGH;;;;;;;;;;;;;;;;;OAiBG;;IAGH;;;;;;;;;;;;;;;;;OAiBG;;CAEK,CAAC"}
1
+ {"version":3,"file":"non-positive-int.d.mts","sourceRoot":"","sources":["../../../src/number/branded-types/non-positive-int.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,IAAI,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAGlF,MAAM,MAAM,cAAc,GAAG,0BAA0B,CAAC;AA4BxD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,gDAAK,CAAC;AAEnC;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;MAAW,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;IACzB;;;;;;OAMG;;IAGH;;;OAGG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;;;;;;OAUG;;IAGH;;;;;;;;OAQG;;IAGH;;;;;;;OAOG;;IAGH;;;;;;OAMG;;IAGH;;;;;;;OAOG;;CAEK,CAAC"}
@@ -5,7 +5,7 @@ const {
5
5
  MAX_VALUE,
6
6
  add,
7
7
  castType,
8
- clamp,
8
+ fromNumber,
9
9
  is,
10
10
  max: max_,
11
11
  min: min_,
@@ -24,151 +24,76 @@ const NonPositiveInt = {
24
24
  /**
25
25
  * Type guard that checks if a value is a non-positive integer.
26
26
  *
27
- * @example
28
- *
29
- * ```ts
30
- * const value: number = -42;
31
- *
32
- * if (NonPositiveInt.is(value)) {
33
- * // value is now typed as NonPositiveInt
34
- * const debt = value;
35
- * }
36
- * ```
37
- *
38
27
  * @param value - The value to check
39
28
  * @returns `true` if the value is a non-positive integer, `false` otherwise
29
+ * @see {@link isNonPositiveInt} for usage examples
40
30
  */
41
31
  is,
42
32
  /**
43
- * The maximum value for a non-positive integer.
44
- *
45
- * @readonly
33
+ * The largest value representable as `NonPositiveInt` (the upper saturation
34
+ * target of `fromNumber`).
46
35
  */
47
36
  MAX_VALUE,
48
37
  /**
49
- * Returns the smaller of two non-positive integers.
50
- *
51
- * Since non-positive integers range from negative infinity to 0, the smaller
52
- * value is the one further from zero (more negative).
38
+ * Returns the smallest of the given non-positive integers.
53
39
  *
54
- * @example
55
- *
56
- * ```ts
57
- * const result = NonPositiveInt.min(-5, -10);
58
- *
59
- * assert.strictEqual(result, -10);
60
- * ```
61
- *
62
- * @param a - The first non-positive integer
63
- * @param b - The second non-positive integer
64
- * @returns The minimum value as a non-positive integer
40
+ * @param values - The non-positive integers to compare (at least one required)
41
+ * @returns The smallest value as a `NonPositiveInt`
65
42
  */
66
43
  min: min_,
67
44
  /**
68
- * Returns the larger of two non-positive integers.
69
- *
70
- * Since non-positive integers range from negative infinity to 0, the larger
71
- * value is the one closer to zero (less negative).
72
- *
73
- * @example
74
- *
75
- * ```ts
76
- * const result = NonPositiveInt.max(-5, -10);
77
- *
78
- * assert.strictEqual(result, -5);
79
- * ```
45
+ * Returns the largest of the given non-positive integers.
80
46
  *
81
- * @param a - The first non-positive integer
82
- * @param b - The second non-positive integer
83
- * @returns The maximum value as a non-positive integer
47
+ * @param values - The non-positive integers to compare (at least one required)
48
+ * @returns The largest value as a `NonPositiveInt`
84
49
  */
85
50
  max: max_,
86
51
  /**
87
- * Clamps a number to the non-positive integer range.
88
- *
89
- * Any positive value is clamped to 0 (the maximum non-positive integer).
90
- * Negative values are preserved as long as they are valid integers.
91
- *
92
- * @example
52
+ * Converts an arbitrary `number` into a `NonPositiveInt`, rounding to the
53
+ * nearest integer and saturating the result into the range `[MIN_VALUE,
54
+ * MAX_VALUE]`.
93
55
  *
94
- * ```ts
95
- * assert.strictEqual(NonPositiveInt.clamp(5), 0);
56
+ * Unlike `asNonPositiveInt`, this is total: out-of-range inputs are clamped
57
+ * to the nearest representable `NonPositiveInt` instead of throwing.
96
58
  *
97
- * assert.strictEqual(NonPositiveInt.clamp(-5), -5);
98
- *
99
- * assert.strictEqual(NonPositiveInt.clamp(0), 0);
100
- * ```
101
- *
102
- * @param value - The number to clamp
103
- * @returns The value clamped to the non-positive integer range
59
+ * @param value - The value to convert
60
+ * @returns The value as a `NonPositiveInt`
104
61
  */
105
- clamp,
62
+ fromNumber,
106
63
  /**
107
- * Generates a random non-positive integer value.
108
- *
109
- * @example
64
+ * Generates a random `NonPositiveInt` within the given range.
110
65
  *
111
- * ```ts
112
- * const randomValue = NonPositiveInt.random();
66
+ * The range is inclusive on both ends.
113
67
  *
114
- * assert.isTrue(NonPositiveInt.is(randomValue));
115
- * ```
116
- *
117
- * @returns A random non-positive integer
68
+ * @param min - The minimum value (inclusive)
69
+ * @param max - The maximum value (inclusive)
70
+ * @returns A random `NonPositiveInt` in `[min, max]`
118
71
  */
119
72
  random,
120
73
  /**
121
- * Raises a non-positive integer to the power of another non-positive integer.
122
- *
123
- * The result is clamped to the non-positive integer range.
124
- *
125
- * @example
126
- *
127
- * ```ts
128
- * const result = NonPositiveInt.pow(-2, -1);
129
- * ```
74
+ * Raises `a` to the power `b`, returning `a ** b` as a `NonPositiveInt`
75
+ * (floored to an integer).
130
76
  *
131
77
  * @param a - The base non-positive integer
132
78
  * @param b - The exponent non-positive integer
133
- * @returns `a ** b` clamped to the non-positive integer range
79
+ * @returns `a ** b` as a `NonPositiveInt`
134
80
  */
135
81
  pow,
136
82
  /**
137
- * Adds two non-positive integers.
138
- *
139
- * The result is clamped to the non-positive integer range. If the sum is
140
- * positive, it is clamped to 0.
141
- *
142
- * @example
143
- *
144
- * ```ts
145
- * assert.strictEqual(NonPositiveInt.add(-5, -3), -8);
146
- *
147
- * assert.strictEqual(NonPositiveInt.add(-5, 10), 0);
148
- * ```
83
+ * Adds two non-positive integers, returning `a + b` as a `NonPositiveInt`.
149
84
  *
150
85
  * @param a - The first non-positive integer
151
86
  * @param b - The second non-positive integer
152
- * @returns `a + b` clamped to the non-positive integer range
87
+ * @returns The sum of `a` and `b` as a `NonPositiveInt`
153
88
  */
154
89
  add,
155
90
  /**
156
- * Subtracts one non-positive integer from another.
157
- *
158
- * The result is clamped to the non-positive integer range. If the result is
159
- * positive, it is clamped to 0.
160
- *
161
- * @example
91
+ * Subtracts two non-positive integers, returning `a - b` as a
92
+ * `NonPositiveInt`.
162
93
  *
163
- * ```ts
164
- * assert.strictEqual(NonPositiveInt.sub(-10, -3), -7);
165
- *
166
- * assert.strictEqual(NonPositiveInt.sub(-10, 5), 0);
167
- * ```
168
- *
169
- * @param a - The minuend non-positive integer
170
- * @param b - The subtrahend non-positive integer
171
- * @returns `a - b` clamped to the non-positive integer range
94
+ * @param a - The first non-positive integer
95
+ * @param b - The second non-positive integer
96
+ * @returns The difference of `a` and `b` as a `NonPositiveInt`
172
97
  */
173
98
  sub
174
99
  };
@@ -1 +1 @@
1
- {"version":3,"file":"non-positive-int.mjs","sources":["../../../src/number/branded-types/non-positive-int.mts"],"sourcesContent":["import { type NonPositiveInt as TtfImported_NonPositiveInt } from 'ts-type-forge';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type NonPositiveInt = TtfImported_NonPositiveInt;\n\ntype ElementType = NonPositiveInt;\n\nconst typeNameInMessage = 'a non-positive integer';\n\nconst {\n MAX_VALUE,\n add,\n castType,\n clamp,\n is,\n max: max_,\n min: min_,\n pow,\n random,\n sub,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger<\n ElementType,\n number,\n 0\n>({\n integerOrSafeInteger: 'Integer',\n MIN_VALUE: -Number.MAX_VALUE,\n MAX_VALUE: 0,\n typeNameInMessage,\n} as const);\n\n/**\n * Type guard that checks if a value is a non-positive integer.\n *\n * A non-positive integer is any integer less than or equal to zero (<= 0).\n * This includes zero and all negative integers, but excludes positive numbers\n * and non-integers.\n *\n * @example\n *\n * ```ts\n * assert.isTrue(isNonPositiveInt(0));\n *\n * assert.isTrue(isNonPositiveInt(-5));\n *\n * assert.isFalse(isNonPositiveInt(1));\n * ```\n *\n * @param value - The value to check\n * @returns `true` if the value is a non-positive integer, `false` otherwise\n */\nexport const isNonPositiveInt = is;\n\n/**\n * Casts a number to a NonPositiveInt branded type.\n *\n * This function validates that the input is a non-positive integer (<= 0) and\n * returns it with the NonPositiveInt brand. This ensures type safety for\n * operations that require non-positive integer values.\n *\n * @example\n *\n * ```ts\n * const branded = asNonPositiveInt(-7);\n *\n * assert.isTrue(branded === -7);\n *\n * assert.isTrue(NonPositiveInt.is(branded));\n * ```\n *\n * @param value - The value to cast\n * @returns The value as a NonPositiveInt branded type\n * @throws {TypeError} If the value is not a non-positive integer\n */\nexport const asNonPositiveInt = castType;\n\n/**\n * Namespace providing type-safe operations for NonPositiveInt branded types.\n *\n * NonPositiveInt represents integers that are less than or equal to zero (<= 0).\n * All operations automatically clamp results to maintain the non-positive\n * constraint, ensuring that arithmetic operations never produce positive values.\n *\n * This type is essential for:\n *\n * - Debts and negative balances\n * - Penalties and reductions\n * - Offsets and adjustments (downward)\n * - Negative counts or differences\n * - Depth or altitude below a reference point\n */\nexport const NonPositiveInt = {\n /**\n * Type guard that checks if a value is a non-positive integer.\n *\n * @example\n *\n * ```ts\n * const value: number = -42;\n *\n * if (NonPositiveInt.is(value)) {\n * // value is now typed as NonPositiveInt\n * const debt = value;\n * }\n * ```\n *\n * @param value - The value to check\n * @returns `true` if the value is a non-positive integer, `false` otherwise\n */\n is,\n\n /**\n * The maximum value for a non-positive integer.\n *\n * @readonly\n */\n MAX_VALUE,\n\n /**\n * Returns the smaller of two non-positive integers.\n *\n * Since non-positive integers range from negative infinity to 0, the smaller\n * value is the one further from zero (more negative).\n *\n * @example\n *\n * ```ts\n * const result = NonPositiveInt.min(-5, -10);\n *\n * assert.strictEqual(result, -10);\n * ```\n *\n * @param a - The first non-positive integer\n * @param b - The second non-positive integer\n * @returns The minimum value as a non-positive integer\n */\n min: min_,\n\n /**\n * Returns the larger of two non-positive integers.\n *\n * Since non-positive integers range from negative infinity to 0, the larger\n * value is the one closer to zero (less negative).\n *\n * @example\n *\n * ```ts\n * const result = NonPositiveInt.max(-5, -10);\n *\n * assert.strictEqual(result, -5);\n * ```\n *\n * @param a - The first non-positive integer\n * @param b - The second non-positive integer\n * @returns The maximum value as a non-positive integer\n */\n max: max_,\n\n /**\n * Clamps a number to the non-positive integer range.\n *\n * Any positive value is clamped to 0 (the maximum non-positive integer).\n * Negative values are preserved as long as they are valid integers.\n *\n * @example\n *\n * ```ts\n * assert.strictEqual(NonPositiveInt.clamp(5), 0);\n *\n * assert.strictEqual(NonPositiveInt.clamp(-5), -5);\n *\n * assert.strictEqual(NonPositiveInt.clamp(0), 0);\n * ```\n *\n * @param value - The number to clamp\n * @returns The value clamped to the non-positive integer range\n */\n clamp,\n\n /**\n * Generates a random non-positive integer value.\n *\n * @example\n *\n * ```ts\n * const randomValue = NonPositiveInt.random();\n *\n * assert.isTrue(NonPositiveInt.is(randomValue));\n * ```\n *\n * @returns A random non-positive integer\n */\n random,\n\n /**\n * Raises a non-positive integer to the power of another non-positive integer.\n *\n * The result is clamped to the non-positive integer range.\n *\n * @example\n *\n * ```ts\n * const result = NonPositiveInt.pow(-2, -1);\n * ```\n *\n * @param a - The base non-positive integer\n * @param b - The exponent non-positive integer\n * @returns `a ** b` clamped to the non-positive integer range\n */\n pow,\n\n /**\n * Adds two non-positive integers.\n *\n * The result is clamped to the non-positive integer range. If the sum is\n * positive, it is clamped to 0.\n *\n * @example\n *\n * ```ts\n * assert.strictEqual(NonPositiveInt.add(-5, -3), -8);\n *\n * assert.strictEqual(NonPositiveInt.add(-5, 10), 0);\n * ```\n *\n * @param a - The first non-positive integer\n * @param b - The second non-positive integer\n * @returns `a + b` clamped to the non-positive integer range\n */\n add,\n\n /**\n * Subtracts one non-positive integer from another.\n *\n * The result is clamped to the non-positive integer range. If the result is\n * positive, it is clamped to 0.\n *\n * @example\n *\n * ```ts\n * assert.strictEqual(NonPositiveInt.sub(-10, -3), -7);\n *\n * assert.strictEqual(NonPositiveInt.sub(-10, 5), 0);\n * ```\n *\n * @param a - The minuend non-positive integer\n * @param b - The subtrahend non-positive integer\n * @returns `a - b` clamped to the non-positive integer range\n */\n sub,\n} as const;\n"],"names":[],"mappings":";;AAOA,MAAM,iBAAA,GAAoB,wBAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA,EAAK,IAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,GAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,SAAA;AAAA,EACtB,SAAA,EAAW,CAAC,MAAA,CAAO,SAAA;AAAA,EACnB,SAAA,EAAW,CAAA;AAAA,EACX;AACF,CAAU,CAAA;AAsBH,MAAM,gBAAA,GAAmB;AAuBzB,MAAM,gBAAA,GAAmB;AAiBzB,MAAM,cAAA,GAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkB5B,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBA;AACF;;;;"}
1
+ {"version":3,"file":"non-positive-int.mjs","sources":["../../../src/number/branded-types/non-positive-int.mts"],"sourcesContent":["import { type NonPositiveInt as TtfImported_NonPositiveInt } from 'ts-type-forge';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type NonPositiveInt = TtfImported_NonPositiveInt;\n\ntype ElementType = NonPositiveInt;\n\nconst typeNameInMessage = 'a non-positive integer';\n\nconst {\n MAX_VALUE,\n add,\n castType,\n fromNumber,\n is,\n max: max_,\n min: min_,\n pow,\n random,\n sub,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger<\n ElementType,\n number,\n 0\n>({\n integerOrSafeInteger: 'Integer',\n MIN_VALUE: -Number.MAX_VALUE,\n MAX_VALUE: 0,\n typeNameInMessage,\n} as const);\n\n/**\n * Type guard that checks if a value is a non-positive integer.\n *\n * Returns `true` for a non-positive integer — a value with no fractional\n * component, including values outside the safe integer range (unlike\n * `SafeInt`).\n *\n * @param value - The value to check\n * @returns `true` if the value is a non-positive integer, `false` otherwise\n */\nexport const isNonPositiveInt = is;\n\n/**\n * Casts a `number` to the `NonPositiveInt` branded type.\n *\n * Validates that the value is a non-positive integer and returns it with the\n * `NonPositiveInt` brand. Throws a `TypeError` otherwise.\n *\n * @param value - The value to cast\n * @returns The value as a `NonPositiveInt`\n * @throws {TypeError} If the value is not a non-positive integer\n */\nexport const asNonPositiveInt = castType;\n\n/**\n * Namespace providing type-safe operations for the `NonPositiveInt` branded\n * type.\n *\n * The `NonPositiveInt` type represents a non-positive integer. Division (`div`)\n * uses floor division.\n *\n * Unlike `SafeInt`, `NonPositiveInt` allows values outside the safe integer\n * range (±2^53 − 1), so very large magnitudes may lose precision in\n * JavaScript's `number` type.\n */\nexport const NonPositiveInt = {\n /**\n * Type guard that checks if a value is a non-positive integer.\n *\n * @param value - The value to check\n * @returns `true` if the value is a non-positive integer, `false` otherwise\n * @see {@link isNonPositiveInt} for usage examples\n */\n is,\n\n /**\n * The largest value representable as `NonPositiveInt` (the upper saturation\n * target of `fromNumber`).\n */\n MAX_VALUE,\n\n /**\n * Returns the smallest of the given non-positive integers.\n *\n * @param values - The non-positive integers to compare (at least one required)\n * @returns The smallest value as a `NonPositiveInt`\n */\n min: min_,\n\n /**\n * Returns the largest of the given non-positive integers.\n *\n * @param values - The non-positive integers to compare (at least one required)\n * @returns The largest value as a `NonPositiveInt`\n */\n max: max_,\n\n /**\n * Converts an arbitrary `number` into a `NonPositiveInt`, rounding to the\n * nearest integer and saturating the result into the range `[MIN_VALUE,\n * MAX_VALUE]`.\n *\n * Unlike `asNonPositiveInt`, this is total: out-of-range inputs are clamped\n * to the nearest representable `NonPositiveInt` instead of throwing.\n *\n * @param value - The value to convert\n * @returns The value as a `NonPositiveInt`\n */\n fromNumber,\n\n /**\n * Generates a random `NonPositiveInt` within the given range.\n *\n * The range is inclusive on both ends.\n *\n * @param min - The minimum value (inclusive)\n * @param max - The maximum value (inclusive)\n * @returns A random `NonPositiveInt` in `[min, max]`\n */\n random,\n\n /**\n * Raises `a` to the power `b`, returning `a ** b` as a `NonPositiveInt`\n * (floored to an integer).\n *\n * @param a - The base non-positive integer\n * @param b - The exponent non-positive integer\n * @returns `a ** b` as a `NonPositiveInt`\n */\n pow,\n\n /**\n * Adds two non-positive integers, returning `a + b` as a `NonPositiveInt`.\n *\n * @param a - The first non-positive integer\n * @param b - The second non-positive integer\n * @returns The sum of `a` and `b` as a `NonPositiveInt`\n */\n add,\n\n /**\n * Subtracts two non-positive integers, returning `a - b` as a\n * `NonPositiveInt`.\n *\n * @param a - The first non-positive integer\n * @param b - The second non-positive integer\n * @returns The difference of `a` and `b` as a `NonPositiveInt`\n */\n sub,\n} as const;\n"],"names":[],"mappings":";;AAOA,MAAM,iBAAA,GAAoB,wBAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA,EAAK,IAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,GAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,SAAA;AAAA,EACtB,SAAA,EAAW,CAAC,MAAA,CAAO,SAAA;AAAA,EACnB,SAAA,EAAW,CAAA;AAAA,EACX;AACF,CAAU,CAAA;AAYH,MAAM,gBAAA,GAAmB;AAYzB,MAAM,gBAAA,GAAmB;AAazB,MAAM,cAAA,GAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ5B,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaL,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA;AACF;;;;"}